|
|
!(function(){var oC=Object.defineProperty,sC=Object.defineProperties;var lC=Object.getOwnPropertyDescriptors;var Xv=Object.getOwnPropertySymbols;var yw=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var vw=(Yn,qe,dt)=>qe in Yn?oC(Yn,qe,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Yn[qe]=dt,fc=(Yn,qe)=>{for(var dt in qe||(qe={}))yw.call(qe,dt)&&vw(Yn,dt,qe[dt]);if(Xv)for(var dt of Xv(qe))xw.call(qe,dt)&&vw(Yn,dt,qe[dt]);return Yn},Uy=(Yn,qe)=>sC(Yn,lC(qe));var ww=(Yn,qe)=>{var dt={};for(var lt in Yn)yw.call(Yn,lt)&&qe.indexOf(lt)<0&&(dt[lt]=Yn[lt]);if(Yn!=null&&Xv)for(var lt of Xv(Yn))qe.indexOf(lt)<0&&xw.call(Yn,lt)&&(dt[lt]=Yn[lt]);return dt};(self.webpackChunk=self.webpackChunk||[]).push([[8447],{40001:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},26227:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},49198:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},41464:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},73331:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},15277:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},52671:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},8657:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},56082:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},33853:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},15075:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},43531:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},61485:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},47472:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={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"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},87395:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(60499),Dt=dt(59301),It={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},xe=It,_t=dt(7657),Gt=function(Nt,Oe){return Dt.createElement(_t.Z,(0,lt.Z)({},Nt,{ref:Oe,icon:xe}))},Vt=Dt.forwardRef(Gt),me=Vt},88319:function(){"use strict"},94896:function(){"use strict"},74501:function(Yn,qe){"use strict";qe.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},39967:function(Yn,qe){"use strict";qe.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},84915: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 Yn={},qe="5.0",dt={},lt=null,Dt=!1,It=!1,xe=null,_t=!1,Gt=null,Vt=null,me=0;me<arguments.length;me++){var Yt=arguments[me];if(Yt!==null)switch(typeof Yt){case"number":qe=Yt.toFixed(1);break;case"string":Yt.match(new RegExp("^[0-9]\\.[0-9]+$"))?qe=Yt:xe=Yt;break;case"object":typeof Yt.is3D!="undefined"?lt=Yt:dt=Yt;break;case"boolean":Dt=Yt,It=!0;break}}lt===null&&(lt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},dt.material_id!==void 0&&!It&&(Dt=!0)),xe!==null&&dt.id===void 0&&(dt.id=xe);var Nt="",Oe="",jt=!1,Me=null,ce=null,ee=null,Kt=!1,Ht=null,de=null,Ae=null,je=null,se=null;dt.height!==void 0&&(dt.height=Math.round(dt.height)),dt.width!==void 0&&(dt.width=Math.round(dt.width));var Xt=function($t){return parseFloat($t)>4?parseFloat($t):5};Yn.setHTML5Codebase=function($t,Ee){Vt=$t,Ye($t,Ee)},Yn.setJavaCodebase=Yn.setJavaCodebaseVersion=Yn.isCompiledInstalled=Yn.setPreCompiledScriptPath=Yn.setPreCompiledResourcePath=function(){},Yn.setHTML5CodebaseVersion=function($t,Ee){var Be=parseFloat($t);if(Be!==NaN&&Be<5){console.log("The GeoGebra HTML5 codebase version "+Be+" is deprecated. Using version latest instead.");return}Gt=$t,kt($t,Ee)},Yn.getHTML5CodebaseVersion=function(){return ce},Yn.getParameters=function(){return dt},Yn.setFontsCSSURL=function($t){je=$t},Yn.setGiacJSURL=function($t){},Yn.setJNLPFile=function($t){Nt=$t},Yn.setJNLPBaseDir=function($t){},Yn.inject=function(){function $t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ee="auto",Be=dt.id,Cn,Ie=!1,gn=0;gn<arguments.length;gn++){var ke=arguments[gn];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ee=ke:Be=arguments[gn]):typeof ke=="boolean"?Ie=ke:ke instanceof HTMLElement&&(Cn=ke)}Dn();function Dn(){if(!_t){setTimeout(Dn,200);return}Ee=On(Ee);var ln=Cn||document.getElementById(Be);if(!ln){console.log("possibly bug on ajax loading? ");return}if(Yn.removeExistingApplet(ln,!1),dt.width===void 0&&ln.clientWidth&&(dt.width=ln.clientWidth),dt.height===void 0&&ln.clientHeight&&(dt.height=ln.clientHeight),!(dt.width&&dt.height)&&Ee==="html5"&&(delete dt.width,delete dt.height),Me=Ee,Ee==="screenshot")De(ln,dt);else{var bt=!1;dt.hasOwnProperty("playButton")&&dt.playButton||dt.hasOwnProperty("clickToLoad")&&dt.clickToLoad?bt=!0:dt.hasOwnProperty("playButtonAutoDecide")&&dt.playButtonAutoDecide&&(bt=(!ve()||$t())&&Qt()),bt?(Me="screenshot",rn(ln,dt,Ie,Ee)):Re(ln,dt,Ie)}}};function ve(){try{return window.self!==window.top}catch($t){return!0}}function Qt(){return dt.hasOwnProperty("screenshotGenerator")&&dt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Yn.getViews=function(){return lt},Yn.isJavaInstalled=function(){return!1};var Se=function($t){var Ee=function(gn){var ke=JSON.parse(gn),Dn=function(gt){return gt.type=="G"||gt.type=="E"},ln=ke.elements?ke.elements.filter(Dn)[0]:ke;if(!ln||!ln.url){Be();return}dt.fileName=ln.url,be(ln.settings||{}),lt.is3D=!0;var bt="https://www.geogebra.org/images/";Yn.setPreviewImage(Ht||ln.previewUrl,bt+"GeoGebra_loading.png",bt+"applet_play.png"),$t()},Be=function(){dt.onError&&dt.onError(),wn("Error: Fetching material (id "+dt.material_id+") failed.",dt)},Cn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ie="/materials/"+dt.material_id+"?scope=basic";Le("https://"+Cn+"/api/proxy.php?path="+encodeURIComponent(Ie),Ee,Be)};function be($t){var Ee=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Be){$t[Be]=!!$t[Be]}),Ee.forEach(function(Be){dt[Be]===void 0&&$t[Be]!==void 0&&(dt[Be]=$t[Be])}),dt.showToolBarHelp===void 0&&(dt.showToolBarHelp=dt.showToolBar)}function Le($t,Ee,Be){var Cn=new XMLHttpRequest;Cn.open("GET",$t),Cn.onload=function(){Ee(Cn.responseText)},Cn.onerror=Be,Cn.send()}Yn.isHTML5Installed=function(){return!0},Yn.getLoadedAppletType=function(){return Me},Yn.setPreviewImage=function($t,Ee,Be){Ht=$t,de=Ee,Ae=Be},Yn.removeExistingApplet=function($t,Ee){var Be;typeof $t=="string"&&($t=document.getElementById($t)),Me=null;var Cn=null;for(Be=0;Be<$t.childNodes.length;Be++){var Ie=$t.childNodes[Be],gn=Ie.className;gn==="applet_screenshot"?Ee?(Ie.style.display="block",Me="screenshot"):Ie.style.display="none":gn!=="applet_scaler prerender"&&($t.removeChild(Ie),Cn=gn&&gn.indexOf("appletParameters")!=-1?Ie.id:null,Be--)}var ke=dt.id!==void 0?dt.id:Cn,Dn=window[ke];Dn&&typeof Dn.getBase64=="function"&&(Dn.remove(),window[ke]=null)},Yn.refreshHitPoints=function(){if(Xt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var $t=Yn.getAppletObject();return $t&&typeof $t.recalculateEnvironments=="function"?($t.recalculateEnvironments(),!0):!1},Yn.startAnimation=function(){var $t=Yn.getAppletObject();return $t&&typeof $t.startAnimation=="function"?($t.startAnimation(),!0):!1},Yn.stopAnimation=function(){var $t=Yn.getAppletObject();return $t&&typeof $t.stopAnimation=="function"?($t.stopAnimation(),!0):!1},Yn.getAppletObject=function(){var $t=dt.id!==void 0?dt.id:"ggbApplet";return window[$t]},Yn.resize=function(){};var en=function($t,Ee,Be){var Cn=document.createElement("param");Cn.setAttribute("name",Ee),Cn.setAttribute("value",Be),$t.appendChild(Cn)},ie=function($t){return $t&&$t!=="false"},Re=function($t,Ee,Be){Xt(ce)<=4.2&&(Be=!0);var Cn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ce||ggbHTML5LoadedCodebaseIsWebSimple&&!Kt)&&(Cn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ie=document.createElement("div");Ie.classList.add("appletParameters","notranslate");var gn=Ee.width,ke=Ee.height;if(Ee.disableAutoScale=Ee.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ee.disableAutoScale,Ee.width!==void 0)if(Xt(ce)<=4.4)ie(Ee.showToolBar)&&(Ee.height-=7),ie(Ee.showAlgebraInput)&&(Ee.height-=37),Ee.width<605&&ie(Ee.showToolBar)&&(Ee.width=605,gn=605);else{var Dn=100;(ie(Ee.showToolBar)||ie(Ee.showMenuBar))&&(Ee.hasOwnProperty("customToolBar")&&(Ee.customToolbar=Ee.customToolBar),Dn=ie(Ee.showMenuBar)?245:155),gn<Dn&&(Ee.width=Dn,gn=Dn)}Ie.style.border="none",Ie.style.display="inline-block";for(var ln in Ee)Ee.hasOwnProperty(ln)&&ln!=="appletOnLoad"&&Ie.setAttribute("data-param-"+ln,Ee[ln]);je&&Ie.setAttribute("data-param-fontscssurl",je),Yn.resize=function(){GGBAppletUtils.responsiveResize($t,Ee)},window.addEventListener("resize",function(Te){Yn.resize()});var bt=typeof Ee.appletOnLoad=="function"?Ee.appletOnLoad:function(){};if(!Be&&Ee.width!==void 0){Ee.hasOwnProperty("showSplash")||Ie.setAttribute("data-param-showSplash","false");var gt=$t.querySelector(".applet_scaler.prerender"),pt=gt!==null;if(pt)var Ct=gt.querySelector(".ggb_preview");else{var Ct=Ue(gn,ke,Ee.borderColor,!1);gt=document.createElement("div"),gt.className="applet_scaler",gt.style.position="relative",gt.style.display="block",gt.style.width=gn+"px",gt.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(gt,"66%"),Xt(ce)>=5?(Ee.appletOnLoad=function(Te){var tn=$t.querySelector(".ggb_preview");tn&&tn.parentNode.removeChild(tn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(gt),window.GGBT_wsf_view&&$(window).trigger("resize"),bt(Te)},pt||gt.appendChild(Ct)):Ie.appendChild(Ct),gt.appendChild(Ie),pt||$t.appendChild(gt),setTimeout(function(){Yn.resize()},1)}else{var Pt=document.createElement("div");Pt.className="applet_scaler",Pt.style.position="relative",Pt.style.display="block",Pt.appendChild(Ie),$t.appendChild(Pt),Ee.appletOnLoad=function(Te){Yn.resize(),bt(Te)}}function vt(Te,tn){tn&&typeof tn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Te,tn.appletOnLoad):renderGGBElement(Te),wn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",tn)}function Et(Te,tn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Te,params:tn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(te){vt(te.article,te.params)}),html5AppletsToProcess=null)},Xt(ce)<5&&(Te.className+=" geogebraweb")):vt(Te,tn)}if(Cn){scriptLoadStarted=!0;for(var Zt=0;Zt<Ie.childNodes.length;Zt++){var Ve=Ie.childNodes[Zt].tagName;Ve==="TABLE"&&(Ie.removeChild(Ie.childNodes[Zt]),Zt--)}if(ggbHTML5LoadedScript!==null){var ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ue!=null&&ue.parentNode.removeChild(ue)}var re=document.createElement("script"),Ce=function(){Et(Ie,Ee)};re.src=Oe+ee,ggbHTML5LoadedCodebaseIsWebSimple=Kt,ggbHTML5LoadedCodebaseVersion=ce,ggbHTML5LoadedScript=re.src,wn("GeoGebra HTML5 codebase loaded: '"+Oe+"'.",Ee),!Vt&&(!Gt||Gt=="5.0")?(Kt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ce()):Oe.requirejs?__webpack_require__.e(4510).then(function(){var Te=[__webpack_require__(4510)];Ce.apply(null,Te)}.bind(this)).catch(__webpack_require__.oe):(re.onload=Ce,$t.appendChild(re))}else Et(Ie,Ee);Ee.height=ke,Ee.width=gn},De=function($t,Ee,Be){var Cn=Ue(Ee.width,Ee.height,Ee.borderColor,Be),Ie=document.createElement("div");Ie.style.position="relative",Ie.style.display="block",Ie.style.width=Ee.width+"px",Ie.style.height=Ee.height+"px",Ie.className="applet_screenshot applet_scaler"+(Be?" applet_screenshot_play":""),Ie.appendChild(Cn);var gn=GGBAppletUtils.getScale(Ee,$t,Be);Be?($t.appendChild(we()),window.GGBT_wsf_view||($t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ie,"66%"),$t.appendChild(Ie),gn!==1&&!isNaN(gn)&&(GGBAppletUtils.scaleElement(Ie,gn),Ie.style.width=Ee.width+"px",Ie.style.height=Ee.height+"px",Ie.parentNode.style.width=Ee.width*gn+"px",Ie.parentNode.style.height=Ee.height*gn+"px"),Yn.resize=function(){Tt($t,Cn,Ie,Be)},window.addEventListener("resize",function(ke){Yn.resize()}),Yn.resize()};function Tt($t,Ee,Be,Cn){if($t.contains(Ee)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if($t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition($t)}var Ie=GGBAppletUtils.getScale(dt,$t,Cn);Be.parentNode!==null&&(!isNaN(Ie)&&Ie!==1?(GGBAppletUtils.scaleElement(Be,Ie),Be.parentNode.style.width=dt.width*Ie+"px",Be.parentNode.style.height=dt.height*Ie+"px"):(GGBAppletUtils.scaleElement(Be,1),Be.parentNode.style.width=dt.width+"px",Be.parentNode.style.height=dt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter($t),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Yn.onExitFullscreen=function($t,Ee){Ee.appendChild($t)};var rn=function($t,Ee,Be,Cn){De($t,Ee,!0);for(var Ie=function(){var Dn=[];for(ke=0;ke<$t.childNodes.length;ke++)Dn.push($t.childNodes[ke]);if(window.GGBT_wsf_view){var ln=window.GGBT_wsf_view.renderFullScreen($t,Ee.id),bt=document.getElementById("fullscreencontainer"),gt=jQuery($t).find(".fullscreencontent");gt.length>0?(ln.remove(),gt.attr("id","fullscreencontent").show(),jQuery(bt).append(gt),window.dispatchEvent(new Event("resize"))):Re(ln,Ee,!1),window.GGBT_wsf_view.launchFullScreen(bt)}else Me=Cn,Re($t,Ee,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<Dn.length;ke++)$t.removeChild(Dn[ke])},gn=$t.getElementsByClassName("ggb_preview_play"),ke=0;ke<gn.length;ke++)gn[ke].addEventListener("click",Ie,!1),gn[ke].addEventListener("ontouchstart",Ie,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload($t),Qt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},we=function(){var $t=document.createElement("div");if($t.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ee='.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");}',Be=document.createElement("style");Be.styleSheet?Be.styleSheet.cssText=Ee:Be.appendChild(document.createTextNode(Ee)),document.getElementsByTagName("head")[0].appendChild(Be)}return $t},Ue=function($t,Ee,Be,Cn){var Ie=document.createElement("div");Ie.className="ggb_preview",Ie.style.position="absolute",Ie.style.zIndex="90",Ie.style.width=$t-2+"px",Ie.style.height=Ee-2+"px",Ie.style.top="0px",Ie.style.left="0px",Ie.style.overflow="hidden",Ie.style.backgroundColor="white";var gn="lightgrey";Be!==void 0&&(Be==="none"?gn="transparent":gn=Be),Ie.style.border="1px solid "+gn;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",Ht!==null&&ke.setAttribute("src",Ht),ke.style.opacity=.7,de!==null){var Dn,ln,bt;if(!Cn){Dn=document.createElement("img"),Dn.style.position="absolute",Dn.style.zIndex="1001",Dn.style.opacity=1,ke.style.opacity=.3,ln=360,ln>$t/4*3&&(ln=$t/4*3),bt=ln/5.8,Dn.setAttribute("src",de),Dn.setAttribute("width",ln),Dn.setAttribute("height",bt);var gt=($t-ln)/2,pt=(Ee-bt)/2;Dn.style.left=gt+"px",Dn.style.top=pt+"px",Ie.appendChild(Dn)}}return Ie.appendChild(ke),Ie},On=function($t){return $t=$t.toLowerCase(),$t==="html5"||$t==="screenshot"?$t:"html5"},zt=["web","webSimple","web3d","tablet","tablet3d","phone"],kt=function($t,Ee){if(ce=$t,Ee){Ye(ce,!0);return}var Be=!Dt;if(Be){var Cn=Xt(ce);!isNaN(Cn)&&Cn<4.4&&(Be=!1)}var Ie,gn;window.location.protocol.substr(0,4)==="http"?Ie=window.location.protocol:Ie="http:";var ke=ce.indexOf("//");ke>0?gn=ce:ke===0?gn=Ie+ce:gn="https://www.geogebra.org/apps/5.2.814.0/";for(var Dn in zt)if(ce.slice(zt[Dn].length*-1)===zt[Dn]||ce.slice((zt[Dn].length+1)*-1)===zt[Dn]+"/"){Ye(gn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Be&&!lt.is3D&&!lt.AV&&!lt.SV&&!lt.CV&&!lt.EV2&&!lt.CP&&!lt.PC&&!lt.DA&&!lt.FI&&!lt.PV&&!ie(dt.showToolBar)&&!ie(dt.showMenuBar)&&!ie(dt.showAlgebraInput)&&!ie(dt.enableRightClick)&&(!dt.appName||dt.appName=="classic")?gn+="webSimple/":gn+="web3d/",Ye(gn,!1)},Ye=function($t,Ee){if($t.requirejs){Oe=$t;return}$t.slice(-1)!=="/"&&($t+="/"),Oe=$t,Ee===null&&(Ee=$t.indexOf("http")===-1),jt=Ee,ee="web.nocache.js",Kt=!1;var Be=Oe.split("/");Be.length>1&&(!Ee&&Be[Be.length-2]==="webSimple"?(ee="webSimple.nocache.js",Kt=!0):zt.indexOf(Be[Be.length-2])>=0&&(ee=Be[Be.length-2]+".nocache.js")),Be=$t.split("/"),ce=Be[Be.length-3],ce.substr(0,4)==="test"?ce=ce.substr(4,1)+"."+ce.substr(5,1):(ce.substr(0,3)==="war"||ce.substr(0,4)==="beta")&&(ce="5.0");var Cn=parseFloat(ce);Cn!==NaN&&Cn<5&&$t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Cn+" is deprecated. Using version latest instead."),kt("5.0",Ee))},wn=function($t,Ee){window.console&&window.console.log&&(!Ee||typeof Ee.showLogging=="undefined"||Ee.showLogging&&Ee.showLogging!=="false")&&console.log($t)};dt.material_id!==void 0?Se(on):on();function on(){var $t=qe;Gt!==null?$t=Gt:parseFloat($t)<5&&($t="5.0"),kt($t,!1),Vt!==null&&Ye(Vt,jt),_t=!0}return Yn},GGBAppletUtils=function(){"use strict";function Yn(){return window.GGBT_wsf_edit!==void 0}function qe(_t,Gt){Gt!=1?(_t.style.transformOrigin="0% 0% 0px",_t.style.webkitTransformOrigin="0% 0% 0px",_t.style.transform="scale("+Gt+","+Gt+")",_t.style.webkitTransform="scale("+Gt+","+Gt+")",_t.style.maxWidth="initial",_t.querySelector(".ggb_preview")!==null&&(_t.querySelector(".ggb_preview").style.maxWidth="initial"),_t.querySelectorAll(".ggb_preview img")[0]!==void 0&&(_t.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),_t.querySelectorAll(".ggb_preview img")[1]!==void 0&&(_t.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(_t.style.transform="none",_t.style.webkitTransform="none")}function dt(_t,Gt,Vt,me,Yt,Nt){var Oe=null;if(Nt!=null&&Nt!="")for(var jt=_t.parentNode;jt!=null;)if((" "+jt.className+" ").indexOf(" "+Nt+" ")>-1){Oe=jt;break}else jt=jt.parentNode;var Me=0,ce=0,ee=0,Kt=0,Ht=0,de=0,Ae=0;if(Oe)Me=Oe.offsetWidth,ce=Math.max(me?Oe.offsetWidth:0,Oe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Me=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=Me):(Me=window.innerWidth,ce=window.innerHeight,ee=window.innerWidth),_t){var je=_t.getBoundingClientRect();je.left>0&&je.left<=Me&&(Yt===void 0||!Yt)&&(document.dir==="rtl"?(Ht=Me-je.width-je.left,de=ee<=480?10:30):(de=je.left,Ht=ee<=480?10:30),Kt=de+Ht)}if(_t&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var se=_t.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Kt=40,Ae=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Kt=0,Ae=40)}}return _t&&((Vt===void 0||!Vt)&&Gt>0&&Gt+Kt<Me?Me=Gt:Me-=Kt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Vt===void 0||!Vt)&&(ce-=Ae)),{width:Me,height:ce}}function lt(_t,Gt,Vt,me,Yt){if(_t.isScreenshoGenerator)return 1;var Nt=me!==void 0&&me,Oe=_t.noScaleMargin!=null&&_t.noScaleMargin,jt=function(se){return se&&se!=="false"},Me=jt(_t.autoHeight),ce=dt(Gt,_t.width,Vt,Me,Nt&&window.GGBT_wsf_view||Oe,Yt),ee=parseInt(ce.width),Kt=_t.width,Ht=_t.height;if(Kt===void 0){var de=Gt.querySelector(".appletParameters");de&&(Kt=de.offsetWidth,Ht=de.offsetHeight)}var Ae=ee/Kt,je=Nt?1:ce.height/Ht;return Vt!==void 0&&!Vt&&(Ae=Math.min(1,Ae),je=Math.min(1,je)),Math.min(Ae,je)}function Dt(_t,Gt,Vt){var me=1,Yt,Nt=!1;if(_t.hasOwnProperty("allowUpscale")&&(Nt=_t.allowUpscale),_t.hasOwnProperty("scale")&&(me=parseFloat(_t.scale),(isNaN(me)||me===null||me===0)&&(me=1),me>1&&(Nt=!0)),Gt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Nt=!0),!(_t.hasOwnProperty("disableAutoScale")&&_t.disableAutoScale))Yt=lt(_t,Gt,Nt,Vt,_t.scaleContainerClass);else return me;return Nt&&(!_t.hasOwnProperty("scale")||me===1)?Yt:Math.min(me,Yt)}function It(_t){var Gt=Math.min(window.innerWidth,document.documentElement.clientWidth),Vt=Math.min(window.innerHeight,document.documentElement.clientHeight),me=_t.getBoundingClientRect(),Yt=(Gt-me.width)/2,Nt=(Vt-me.height)/2;Nt<0&&(Nt=0),_t.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Yt<40?_t.style.left="40px":_t.style.left=Yt+"px",_t.style.top=Nt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Nt<40?_t.style.top="40px":_t.style.top=Nt+"px",_t.style.left=Yt+"px")}function xe(_t,Gt){var Vt=_t.querySelector(".appletParameters");if(Vt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Gt.id!==Vt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(_t)}if(Vt.parentElement&&/fullscreen/.test(Vt.parentElement.className))return;var me=Dt(Gt,_t);Yn()&&Vt.setAttribute("data-param-scale",me);for(var Yt=null,Nt=0;Nt<_t.childNodes.length;Nt++)if(_t.childNodes[Nt].className!==void 0&&_t.childNodes[Nt].className.match(/^applet_scaler/)){Yt=_t.childNodes[Nt];break}if(Yt!==null&&Yt.querySelector(".noscale")!==null)return;var Oe=Gt.id!==void 0?Gt.id:"ggbApplet",jt=window[Oe];(jt==null||!jt.recalculateEnvironments)&&Yt!==null&&!Yt.className.match(/fullscreen/)&&(Yt.parentNode.style.transform="",!isNaN(me)&&me!==1?(Yt.parentNode.style.width=Gt.width*me+"px",Yt.parentNode.style.height=Gt.height*me+"px",qe(Yt,me)):(qe(Yt,1),Yt.parentNode.style.width=Gt.width+"px",Yt.parentNode.style.height=Gt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&It(_t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Vt).parents(".content-added-content"))}}return{responsiveResize:xe,isFlexibleWorksheetEditor:Yn,positionCenter:It,getScale:Dt,scaleElement:qe}}();__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 Yn=n.location.search;return Yn.indexOf(J)!=-1||Yn.indexOf(K)!=-1}function q(Yn,qe){}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(Yn){var qe=s[L].bindings;s[L].bindings=function(){for(var dt=qe?qe():{},lt=Yn[webModule.__softPermutationId],Dt=O;Dt<lt.length;Dt++){var It=lt[Dt];dt[It[O]]=It[P]}return dt}};var t;function u(){return v(),t}function v(){if(!t){var Yn=o.createElement(Q);if(Yn.id=L,Yn.style.cssText=R+S,Yn.tabIndex=-1,o.body.appendChild(Yn),t=Yn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qe=document.compatMode==U?V:W;t.write(qe+X),t.close()}}}function w(Yn){function qe(lt){function Dt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var It=Dt();if(It){lt();return}function xe(){if(!It){if(!Dt())return;It=!0,lt(),o.removeEventListener&&o.removeEventListener(Z,xe,!1),_t&&clearInterval(_t)}}o.addEventListener&&o.addEventListener(Z,xe,!1);var _t=setInterval(function(){xe()},$)}function dt(lt){var Dt=u(),It=Dt.body,xe=Dt.createElement(_);xe.language=ab,xe.crossOrigin=W,xe.src=lt,webModule.__errFn&&(xe.onerror=function(){webModule.__errFn(L,new Error(bb+lt))}),It.appendChild(xe)}qe(function(){dt(Yn)})}webModule.__startLoadingFragment=function(Yn){return C(Yn)},webModule.__installRunAsyncCode=function(Yn){var qe=u(),dt=qe.body,lt=qe.createElement(_);lt.language=ab,lt.text=Yn,dt.appendChild(lt),dt.removeChild(lt)};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(Yn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Yn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Yn){var qe=c[Yn];return qe==null?null:qe},r=d,webModule.__errFn=e}function B(){function Yn(_t){var Gt=_t.lastIndexOf(rb);Gt==-1&&(Gt=_t.length);var Vt=_t.indexOf(sb);Vt==-1&&(Vt=_t.length);var me=_t.lastIndexOf(tb,Math.min(Vt,Gt));return me>=O?_t.substring(O,me+P):W}function qe(_t){if(!_t.match(/^\w+:\/\//)){var Gt=o.createElement(ub);Gt.src=_t+vb,_t=Yn(Gt.src)}return _t}function dt(){var _t=__gwt_getMetaProperty(wb);return _t!=null?_t:W}function lt(){for(var _t=o.getElementsByTagName(_),Gt=O;Gt<_t.length;++Gt)if(_t[Gt].src.indexOf(xb)!=-1)return Yn(_t[Gt].src);return W}function Dt(){var _t=o.getElementsByTagName(yb);return _t.length>O?_t[_t.length-P].href:W}function It(){var _t=o.location;return _t.href==_t.protocol+zb+_t.host+_t.pathname+_t.search+_t.hash}var xe=dt();return xe==W&&(xe=lt()),xe==W&&(xe=Dt()),xe==W&&It()&&(xe=Yn(o.location.href)),xe=qe(xe),xe}function C(Yn){return Yn.match(/^\//)||Yn.match(/^[a-zA-Z]+:\/\//)?Yn:webModule.__moduleBase+Yn}function D(){var Yn=[],qe=O,dt=[],lt=[];function Dt(_t){var Gt=lt[_t](),Vt=dt[_t];if(Gt in Vt)return Gt;var me=[];for(var Yt in Vt)me[Vt[Yt]]=Yt;throw r&&r(_t,me,Gt),null}if(__gwt_isKnownPropertyValue=function(_t,Gt){return Gt in dt[_t]},webModule.__getPropMap=function(){var _t={};for(var Gt in dt)dt.hasOwnProperty(Gt)&&(_t[Gt]=Dt(Gt));return _t},webModule.__computePropValue=Dt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var It;try{It=Cb;var xe=It.indexOf(Db);xe!=-1&&(qe=parseInt(It.substring(xe+P),$),It=It.substring(O,xe))}catch(_t){}return webModule.__softPermutationId=qe,C(It+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})()},23216:function(Yn,qe,dt){"use strict";dt.d(qe,{Ax:function(){return xe},Ds:function(){return _t},KI:function(){return Vt},SI:function(){return It},f1:function(){return Dt}});var lt=dt(14185);function Dt(me){let Yt=!0;if(me.length>0){for(let Nt=0;Nt<me.length;Nt++)if(me[Nt].compile_success==0||!me[Nt].compile_success){Yt=!1;break}}else Yt=!1;return Yt}function It(me,Yt=""){let Nt=[];for(let Oe=0;Oe<me.length;Oe++){let jt=me[Oe],Me=Yt?`${Yt}/${jt.name}`:`${jt.name}`;Nt.push({title:jt.name,type:jt.type,isLeaf:jt.type!=="tree",key:Me})}return Nt}function xe(me,Yt,Nt){for(let Oe=0;Oe<me.length;Oe++){let jt=me[Oe];if(jt.key===Yt){jt.children=Nt;break}jt.children&&xe(jt.children,Yt,Nt)}return me}function _t(me,Yt,Nt){let Oe;return function(){let jt=this,Me=arguments,ce=function(){Oe=null,Nt||me.apply(jt,Me)},ee=Nt&&!Oe;clearTimeout(Oe),Oe=setTimeout(ce,Yt),ee&&me.apply(jt,Me)}}const Gt=!0,Vt=lt.Z.API_SERVER},40254:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Oe}});var lt=dt(59301),Dt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},It=dt(92310),xe=dt.n(It),_t=dt(29787),Gt=dt(2859),Vt=dt(49317),me=dt(76406),Yt=(jt,Me,ce)=>new Promise((ee,Kt)=>{var Ht=je=>{try{Ae(ce.next(je))}catch(se){Kt(se)}},de=je=>{try{Ae(ce.throw(je))}catch(se){Kt(se)}},Ae=je=>je.done?ee(je.value):Promise.resolve(je.value).then(Ht,de);Ae((ce=ce.apply(jt,Me)).next())}),Oe=({data:jt,className:Me,fullWidth:ce,style:ee={},onClose:Kt,onOk:Ht,showFullTools:de,noAssociationId:Ae})=>{const je=(0,lt.useRef)(null),se=(0,lt.useRef)(null),Xt=(0,lt.useRef)(null),ve=(0,lt.useRef)(null),[Qt,Se]=(0,lt.useState)(!1),[be,Le]=(0,lt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,lt.useEffect)(()=>(Xt.current||(Xt.current=document.createElement("style"),document.head.appendChild(Xt.current)),jt!=null&&jt.visible?(document.body.setAttribute("data-custom","y-hidden"),Xt.current.innerHTML=" html { overflow-y: hidden; }",jt!=null&&jt.src&&en()):(document.body.removeAttribute("data-custom"),Xt.current&&(document.head.removeChild(Xt.current),Xt.current=null)),()=>{document.body.removeAttribute("data-custom"),Xt.current&&(document.head.removeChild(Xt.current),Xt.current=null)}),[jt==null?void 0:jt.visible]);const en=()=>Yt(void 0,null,function*(){Se(!0),Le("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Tt=yield(0,me.ZJ)(jt==null?void 0:jt.src);je.current.src="",je.current.src=Tt,je.current.onload=function(){De()},Se(!1),Le("")}),ie=Tt=>Yt(void 0,null,function*(){Se(!0),Le("\u6B63\u5728\u4FDD\u5B58\u4E2D");const rn=yield(0,Vt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:jt.title,file:Tt.dataUrl}});rn!=null&&rn.id&&!Ae?(yield(0,Vt.ZP)(`/api/attachments/${jt.id}/add_subitem.json`,{method:"post",body:{subitem_id:rn==null?void 0:rn.id,settings:JSON.stringify(Tt.state)}})).status===0&&Ht():rn!=null&&rn.id&&Ht(rn),Se(!1),Le("")}),Re=()=>{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(we=>{const Ue=document.querySelector(we.name);Ue&&Ue.setAttribute("title",we.title)})},De=()=>{se.current=new Gt.hP(je.current),se.current.targetRoot=ve.current,se.current.addEventListener("render",ie),se.current.addEventListener("beforeclose",Kt),de&&(se.current.availableMarkerTypes=se.current.ALL_MARKER_TYPES,se.current.uiStyleSettings.redoButtonVisible=!0,se.current.uiStyleSettings.notesButtonVisible=!0,se.current.uiStyleSettings.zoomButtonVisible=!0,se.current.uiStyleSettings.zoomOutButtonVisible=!0,se.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=se.current.uiStyleSettings,se.current.show(),jt!=null&&jt.snapshotData&&se.current.restoreState(jt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Re()},300)};return lt.createElement(lt.Fragment,null,(jt==null?void 0:jt.visible)&<.createElement(_t.Z,{spinning:Qt,tip:be,style:{position:"absolute",width:"100vw"}},lt.createElement("div",{ref:ve,className:xe()(Dt.imageDimensions,Me,ce?Dt.fullWidth:""),style:ee},lt.createElement("img",{className:Dt.img,ref:je}))))}},9057:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(77019),It=dt(5269),xe=dt(31691),_t=dt(7939),Gt=dt(35883),Vt=dt(74501),me=dt(48136),Yt=dt(59301);const Nt=(0,lt.forwardRef)(({callback:Oe,showSaveButton:jt,value:Me=""},ce)=>{const ee=(0,lt.useRef)(),Kt=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Ht=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],de=se=>{ee.current.setValue(ee.current.getValue()+" "+se.value+" ")},Ae=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Yt.createElement(Dt.Z,{className:Vt.Z.lists,gutter:[10,10]},Kt.map((se,Xt)=>Yt.createElement(It.Z,{flex:"110px",className:Vt.Z.item},Yt.createElement("div",null,Yt.createElement(Gt.Z,{value:`$$${se.value}$$`}),se.name),Yt.createElement("div",{className:Vt.Z.children},se.children.map((ve,Qt)=>Yt.createElement("div",{key:Qt},Yt.createElement("h1",null,ve.name),Yt.createElement(Dt.Z,{gutter:[10,10]},ve.data.map((Se,be)=>Yt.createElement(It.Z,{key:be,onClick:()=>de(Se),className:Vt.Z.diamond},Yt.createElement(Gt.Z,{value:"`$$"+Se.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Yt.createElement(Dt.Z,{className:Vt.Z.lists,gutter:[10,10]},Ht.map((se,Xt)=>Yt.createElement(It.Z,{flex:"110px",className:Vt.Z.item},Yt.createElement("div",null,Yt.createElement(Gt.Z,{value:"`$$"+se.value+"$$`"}),se.name),Yt.createElement("div",{className:Vt.Z.children},se.children.map((ve,Qt)=>Yt.createElement("div",{key:Qt},ve.name&&Yt.createElement("h1",null,ve.name),Yt.createElement(Dt.Z,{gutter:[10,10]},ve.data.map((Se,be)=>Yt.createElement(It.Z,{key:be,onClick:()=>de(Se),className:Vt.Z.diamond},Yt.createElement(Gt.Z,{value:"`$$"+Se.value+"$$`"}))))))))))}],je=()=>{var se=document.createElement("div");se.innerHTML=ee.current.getValue();var Xt=se.innerText;return Oe&&Oe(Xt),Xt};return(0,lt.useImperativeHandle)(ce,()=>({getData:je})),Yt.createElement("div",{className:Vt.Z.mathWrap},Yt.createElement(xe.default,{defaultActiveKey:"1",items:Ae}),Yt.createElement("math-field",{locale:"zh_cn",className:Vt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ee,style:{width:800,marginTop:30,fontSize:18}},Me||""),jt&&Yt.createElement("div",{className:Vt.Z.button},Yt.createElement(_t.ZP,{size:"large",onClick:je,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qe.Z=Nt},90736:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(4977),It=dt(7939),xe=Object.defineProperty,_t=Object.defineProperties,Gt=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Nt=(ce,ee,Kt)=>ee in ce?xe(ce,ee,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):ce[ee]=Kt,Oe=(ce,ee)=>{for(var Kt in ee||(ee={}))me.call(ee,Kt)&&Nt(ce,Kt,ee[Kt]);if(Vt)for(var Kt of Vt(ee))Yt.call(ee,Kt)&&Nt(ce,Kt,ee[Kt]);return ce},jt=(ce,ee)=>_t(ce,Gt(ee));const Me=({img:ce,buttonProps:ee={},styles:Kt={},customText:Ht,ButtonText:de,ButtonClick:Ae,Buttonclass:je,ButtonTwo:se,imgStyles:Xt,loading:ve=!1,className:Qt=""})=>lt.createElement("section",{className:`tc animated fadeIn ${Qt}`,style:Oe({color:"#999",margin:"100px auto",visibility:ve?"hidden":"visible"},Kt)},lt.createElement("img",{src:ce||Dt,style:jt(Oe({},Xt),{pointerEvents:"none",userSelect:"none"})}),lt.createElement("p",{className:"mt20 font14"},Ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),de&<.createElement(It.ZP,Oe({className:je,onClick:Ae},ee),de),se&&se);qe.Z=Me},86974:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return je}});var lt=dt(59301),Dt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},It=dt(7939),xe=dt(70557),_t=dt(34728),Gt=dt(25399),Vt=dt(76406),me=dt(84849),Yt=dt(90736),Nt=dt(14185),Oe=dt(52078),jt=dt(59301),Me=Object.defineProperty,ce=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,Ht=(se,Xt,ve)=>Xt in se?Me(se,Xt,{enumerable:!0,configurable:!0,writable:!0,value:ve}):se[Xt]=ve,de=(se,Xt)=>{for(var ve in Xt||(Xt={}))ee.call(Xt,ve)&&Ht(se,ve,Xt[ve]);if(ce)for(var ve of ce(Xt))Kt.call(Xt,ve)&&Ht(se,ve,Xt[ve]);return se},Ae=(se,Xt,ve)=>new Promise((Qt,Se)=>{var be=ie=>{try{en(ve.next(ie))}catch(Re){Se(Re)}},Le=ie=>{try{en(ve.throw(ie))}catch(Re){Se(Re)}},en=ie=>ie.done?Qt(ie.value):Promise.resolve(ie.value).then(be,Le);en((ve=ve.apply(se,Xt)).next())}),je=({editOffice:se="view",data:Xt,issaver:ve,onSaver:Qt,theme:Se,type:be,filename:Le,monacoEditor:en,className:ie,style:Re,close:De,onClose:Tt,hasMask:rn,disabledDownload:we,onImgDimensions:Ue,showNodata:On,recordInfo:zt})=>{const[kt,Ye]=(0,lt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wn,on]=(0,lt.useState)(""),[$t,Ee]=(0,lt.useState)(),Be=window.ENV==="build"?"/react/build":"",Cn=location.host.startsWith("localhost")?Nt.Z.PROXY_SERVER:Nt.Z.API_SERVER,gn=10*(1024*1024),ke=(0,lt.useRef)();Xt!=null&&Xt.startsWith("/api")&&be!=="txt"&&(Xt=Nt.Z.API_SERVER+Xt);const Dn=Pt=>Pt.substring(Pt.lastIndexOf("/")+1).split(".").pop();Le&&en&&(en.filename=Le),(0,lt.useEffect)(()=>{var Pt,vt;const Et=(vt=(Pt=document.cookie)==null?void 0:Pt.replace(/\s/g,""))==null?void 0:vt.split(";");Et==null||Et.map(Zt=>{let Ve=Zt.split("=");Ve[0]==="_educoder_session"&&on(Ve[1])})},[]),(0,lt.useEffect)(()=>{be==="office"&&(Xt.indexOf("bigfilescdn.")>-1||Xt.indexOf("bigfiles1")>-1?Ee({url:Xt,fileType:Dn(Xt),model:Xt.indexOf("model=edit")?"edit":"view"}):Xt.indexOf("coze")>-1?Ee({url:Xt,fileType:"doc",model:"view"}):bt())},[be,Xt]);function ln(Pt){return Ae(this,null,function*(){Pt.data.type==="pdfdata"&&(Qt(Pt.data.data),window.removeEventListener("message",ln,!1)),console.log("mess---:",Pt.data)})}const bt=()=>Ae(void 0,null,function*(){console.log("data:",Xt);let Pt=Xt;Xt.startsWith("http")||(Pt=location.origin+Pt);let vt=new URL(Pt).pathname.split("/").pop();const Et=yield(0,me.gJ)({attachment_id:vt});Et.url=Cn+Et.url,Ee(Et)}),gt=()=>{if(Xt.startsWith("http")||Xt.startsWith("blob:")){pt();return}(0,Vt.Sv)(Le||"educoder",Xt,Le)},pt=()=>{zt&&(0,Oe.fc)({id:zt==null?void 0:zt.id,watch_type:1,course_id:zt==null?void 0:zt.course_id}),(0,Vt.Nd)(Le||"educoder",decodeURIComponent(Xt))};(0,lt.useEffect)(()=>(window.addEventListener("message",Ct),()=>{window.removeEventListener("message",Ct)}),[]);const Ct=Pt=>{var vt;((vt=Pt==null?void 0:Pt.data)==null?void 0:vt.type)==="closePop"&&Tt()};return jt.createElement("div",{style:de({},Re||{}),className:`${rn&&Dt.bgBlack} ${be?Dt.wrp:"hide"}`},!!be&&De&&jt.createElement("div",{id:"closePop",className:Dt.close,ref:ke},!!Ue&&jt.createElement(Gt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},jt.createElement("span",{onClick:()=>{Tt(),Ue()}},jt.createElement("i",{className:"icon-yulanpizhu"}))),!we&&window.parent===window&&jt.createElement(Gt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},jt.createElement("span",{onClick:pt},jt.createElement("i",{className:"icon-quxiaozhiding"}))),ve&&jt.createElement(Gt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},jt.createElement("span",{className:"",onClick:()=>{const Pt=document.getElementById("pdfiframe");window.addEventListener("message",ln,!1),setTimeout(()=>{Pt.contentWindow.postMessage("getData","*")},300)}},jt.createElement("i",{className:"icon-baocun"}))),jt.createElement(Gt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},jt.createElement("span",{className:"",onClick:()=>{Tt()}},jt.createElement("i",{className:"icon-guanbi1"})))),jt.createElement("div",{className:`${Dt[ie]} ${ie} ${Dt.monaco} ${be==="txt"?"show":"hide"}`},be==="txt"&&jt.createElement(jt.Fragment,null,jt.createElement(_t.ZP,de({},en)))),be==="audio"&&jt.createElement("audio",{controls:!0,src:`${(Xt==null?void 0:Xt.indexOf("http://"))>-1||(Xt==null?void 0:Xt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Xt}`,autoPlay:!0}),be==="video"&&jt.createElement(jt.Fragment,null,(Xt==null?void 0:Xt.indexOf("http"))>-1?jt.createElement("video",{controls:!0,src:`${Xt}`,autoPlay:!0}):jt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Xt}`,autoPlay:!0})),be==="office"&&$t&&jt.createElement("iframe",{src:`${Be}/office.html?key=${$t.key}&url=${btoa($t.url)}&callbackUrl=${Cn+($t.callbackUrl||"")}&fileType=${$t.fileType}&title=${$t.title||""}&model=${se}&officeServer=${Nt.Z.ONLYOFFICE}&disabledDownload=${!!we}`}),be==="html"&&jt.createElement("iframe",{src:Xt+"&disposition=inline"}),be==="pdf"&&jt.createElement("iframe",{id:"pdfiframe",src:`${Be}/js/pdf/index.html?filename=${Le||"educoder.pdf"}&url=${encodeURIComponent(Xt)}&disabledDownload=${!!we}&model=${se}`}),be==="image"&&jt.createElement("img",{src:`${(Xt==null?void 0:Xt.indexOf("http://"))>-1||(Xt==null?void 0:Xt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Xt}`}),(be==="other"||be==="download")&&jt.createElement(jt.Fragment,null,On?jt.createElement(Yt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:jt.createElement(It.ZP,{icon:jt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:gt,disabled:we},"\u4E0B\u8F7D")}):jt.createElement(It.ZP,{type:"primary",size:"middle",onClick:gt,disabled:we},jt.createElement(xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),be==="flowChart"&&jt.createElement("div",{className:"embed"},jt.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Xt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Yn,qe,dt){"use strict";dt.d(qe,{z:function(){return en},Z:function(){return ie}});var lt=dt(59301),Dt=dt(46214),It=dt(20047),xe=dt(64018),_t=dt(16471),Gt=dt(14185),Vt=dt(76406),me=dt(15342),Yt=dt(44104),Nt=dt(7939),Oe=dt(1012),jt=dt(86974),Me=dt(59301),ee=({html:Re})=>{const De=(0,lt.useRef)(null),Tt=(0,lt.useRef)(null),rn=`.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 56px !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,lt.useEffect)(()=>{const we=De.current.attachShadow({mode:"open"});Tt.current=document.createElement("div"),Tt.current.className="markdown-body",Tt.current.innerHTML=Re,we.appendChild(Tt.current);const Ue=document.createElement("style");return Ue.textContent=rn,we.appendChild(Ue),()=>{we.innerHTML=""}},[]),(0,lt.useEffect)(()=>{Tt.current&&(Tt.current.innerHTML=Re)},[Re]),Me.createElement("div",{ref:De})};function Kt(Re){const De=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Tt=new RegExp(`\\b(${De.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),rn=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return Re.replace(Tt,"").replace(rn,"").trim()}var Ht={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},de=Object.defineProperty,Ae=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Xt=(Re,De,Tt)=>De in Re?de(Re,De,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):Re[De]=Tt,ve=(Re,De)=>{for(var Tt in De||(De={}))je.call(De,Tt)&&Xt(Re,Tt,De[Tt]);if(Ae)for(var Tt of Ae(De))se.call(De,Tt)&&Xt(Re,Tt,De[Tt]);return Re};const Qt="@\u2581\u2581@",Se="@\u2581@",be=/<pre[^>]*>/g;function Le(Re){let De=document.createElement("div");return De.innerHTML=Re,De.childNodes.length===0?"":De.childNodes[0].nodeValue}const en=(Re,De)=>{Re=Re||"";const Tt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,we=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return De?Re.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Tt,(On,zt,kt,Ye,wn,on,$t)=>{const Ee=zt||Ye||on,Be=kt||wn||$t||"?";return Gt.Z.API_SERVER+"/api/attachments/"+Ee+Be+"&t="+(0,Vt.Jn)(Ee,Date.now())+(On.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Re=Re.replace(Ue,(On,zt,kt,Ye,wn,on,$t)=>{const Ee=zt||Ye||on,Be=kt||wn||$t||"?";return Gt.Z.API_SERVER+"/attachments/download/"+Ee+Be+"&t="+(0,Vt.Jn)(Ee,Date.now())+(On.indexOf(")")>-1?")":"&")}).replace(Tt,(On,zt,kt,Ye,wn,on,$t)=>{const Ee=zt||Ye||on,Be=kt||wn||$t||"?";return Gt.Z.API_SERVER+"/api/attachments/"+Ee+Be+"&t="+(0,Vt.Jn)(Ee,Date.now())+(On.indexOf(")")>-1?")":"&")}).replace(rn,(On,zt,kt,Ye,wn)=>{const on=zt||Ye,$t=kt||wn||"";return'"'+Gt.Z.API_SERVER+"/api/attachments/"+on+$t+on+$t+"&t="+(0,Vt.Jn)(on,Date.now())}).replace(we,(On,zt,kt,Ye,wn)=>{const on=zt||Ye,$t=kt||wn||"";return"("+Gt.Z.API_SERVER+"/files/uploads/"+on+$t+on+$t+"&t="+(0,Vt.Jn)(on,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),Re)};var ie=({value:Re="",edit:De=!1,className:Tt,showTextOnly:rn,showLines:we,style:Ue={},stylesPrev:On={},highlightKeywords:zt,showProgramFill:kt,isProgramFill:Ye,disabledFill:wn=!1,programFillValue:on,openEditor:$t=()=>{},onFillChange:Ee=Ie=>{},onFillBlur:Be=()=>{},onFillFocus:Cn=()=>{}})=>{let Ie=Kt(String(Re||""));const gn=(0,lt.useRef)(),ke=(0,lt.useRef)(),[Dn,ln]=(0,lt.useState)(""),[bt,gt]=(0,lt.useState)("office"),[pt,Ct]=(0,lt.useState)([]),Pt=(0,lt.useRef)("a"+(0,Oe.Z)()),vt={},Et=sn=>/<style[\s\S]*?>/i.test(sn||""),Zt=(sn,Hn,Mn)=>{const ye=document.createElement(sn===Se?"input":"textarea");ye.style.width="100%",ye.style.height=sn===Se?"40px":"151px",ye.rows=5,ye.spellcheck=!1,ye.name="edu-program-fill",ye.placeholder="\u8BF7\u8F93\u5165",ye.dataset.id=Hn;const Ze=Object.keys(vt).length;return vt[Ze]=ye,`<span class="edu-program-fill-wrap ${sn===Se?"":"show"}" style="width:${sn===Se?"600px":"100%"}" title=${Mn||""}><span>${ye.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ve(sn){return sn=sn.replace(/!\[.*?\]\(.*?\)/g,""),sn=sn.replace(/\[.*?\]\(.*?\)/g,""),sn=sn.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),sn=sn.replace(/<embed.*?>/g,""),sn=sn.replace(/<img.*?>/g,""),sn=sn.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),sn=sn.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),sn=sn.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),sn=sn.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),sn}const ue=sn=>!rn&&Et(Ie)?sn:sn.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Hn,Mn){let ye=Mn.replace(/(\n|\r)/g,"").split("}"),Ze=[];return ye.map(En=>{En!=""&&Ze.push(`.${Pt.current} ${En}`)}),`<style>${Ze.join("}")}</style>`}),re=(0,lt.useMemo)(()=>{(0,It.Iy)();try{const ye=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ze=/\"\/api\/attachments\/|\"\/attachments\/download\//g,En=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,An=/\(\/attachments\/download\//g;Ie=Ie.replace(An,"("+Gt.Z.API_SERVER+"/attachments/download/").replace(ye,"("+Gt.Z.API_SERVER+"/api/attachments/").replace(Ze,'"'+Gt.Z.API_SERVER+"/api/attachments/").replace(En,'"'+Gt.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,`
|
|
|
`),gn.current.style.display="none"}catch(ye){}if(kt){let ye=-1;return Ie=Ie.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ze,En,An){var he;return++ye,Zt(Ze,ye,(he=on==null?void 0:on[ye])==null?void 0:he.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ue(Ie||"")}</pre>`}let sn=ue(Ie);sn=(0,It.ZP)(sn);const Hn=(0,It.ez)();Ie.match(/\[TOC\]/)&&(sn=sn.replace("<p>[TOC]</p>",(0,It.Qv)()),(0,It.Iy)()),sn=sn.replace(/(__special_katext_id_\d+__)/g,(ye,Ze)=>{const{type:En,expression:An}=Hn[Ze];return(0,me.renderToString)(Le(An)||"",{displayMode:En==="block",throwOnError:!1,output:"html"})}),sn=sn.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,It.AL)();const Mn=document.createElement("div");if(Mn.innerHTML=sn,rn)return Mn.innerText;if(zt){const ye=zt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return te(Mn,ye),Mn.innerHTML}return setTimeout(()=>Sn(),500),Mn.innerHTML},[Ie,zt]);(0,lt.useEffect)(()=>{le.current&&le.current.querySelectorAll(["input","textarea"]).forEach(Hn=>{Hn.oninput=Ce,Hn.onblur=Te,Hn.onfocus=tn})},[pt]),(0,lt.useEffect)(()=>{var sn,Hn,Mn,ye,Ze;if(on!=null&&on.length)try{const En=le.current.querySelectorAll(".edu-program-fill-score"),An=le.current.querySelectorAll('[name="edu-program-fill"]');for(const[he,Ke]of An.entries())Ke.value=((sn=on==null?void 0:on[he])==null?void 0:sn.value)||"",((Hn=on==null?void 0:on[he])==null?void 0:Hn.type)==="warning"?Ke.className="program-fill-warning":((Mn=on==null?void 0:on[he])==null?void 0:Mn.type)==="success"?Ke.className="program-fill-success":Ke.className="";for(const[he,Ke]of En.entries())Ke.innerHTML=(ye=on==null?void 0:on[he])!=null&&ye.score?`${(Ze=on==null?void 0:on[he])==null?void 0:Ze.score}\u5206`:"";Ct(on)}catch(En){console.log(En,"error")}},[on]);const Ce=sn=>{pt[sn.target.dataset.id]=pt[sn.target.dataset.id]||{},pt[sn.target.dataset.id].value=sn.target.value,Ct([...pt]),Ee(pt,sn.target.dataset.id)},Te=sn=>{pt[sn.target.dataset.id]=pt[sn.target.dataset.id]||{},pt[sn.target.dataset.id].value=sn.target.value,Ct([...pt]),Be(pt,sn.target.dataset.id)},tn=sn=>{pt[sn.target.dataset.id]=pt[sn.target.dataset.id]||{},pt[sn.target.dataset.id].value=sn.target.value,Ct([...pt]),Cn(pt,sn.target.dataset.id)};function te(sn,Hn){return sn.childNodes.forEach(Mn=>{var ye;if(Mn.childNodes.length>0)te(Mn,Hn);else if(Mn.nodeName!=="IMG")if(Mn.innerHTML)Mn.innerHTML=(ye=Mn.innerHTML)==null?void 0:ye.replace(new RegExp(Hn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ze=document.createElement("span");Ze.innerHTML=Mn.textContent.replace(new RegExp(Hn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Mn.replaceWith(Ze)}})}const le=(0,lt.useRef)();It.jb.WebkitLineClamp=we,we&&(Ue=ve(ve({},Ue),It.jb));function bn(sn){let Hn=sn.target;if(Hn.tagName.toUpperCase()==="A"){let Mn=Hn.getAttribute("href");if(Mn.indexOf("office")>-1)sn.preventDefault(),ln(Mn),gt("office");else if(Mn.indexOf("application/pdf")>-1)sn.preventDefault(),ln(Mn),gt("pdf");else if(Mn.indexOf("text/html")>-1)sn.preventDefault(),ln(Mn),gt("html");else if(Mn.startsWith("#")){sn.preventDefault();let ye=document.getElementById(Mn.replace("#",""));ye&&ye.scrollIntoView(!0)}}}const Sn=()=>{var sn;const Hn=(sn=le.current)==null?void 0:sn.querySelectorAll("video");Hn==null||Hn.forEach(Mn=>{if(Mn.oncontextmenu=()=>!1,Mn.src.indexOf(".m3u8")>-1&&!Mn.canPlayType("application/vnd.apple.mpegurl")){if(_t.ZP.isSupported()){var ye=new _t.ZP;ye.loadSource(Mn.src),ye.attachMedia(Mn)}}})};(0,lt.useEffect)(()=>{if(le.current&&re&&re.match(be)&&window.PR.prettyPrint(),le.current)return le.current.addEventListener("click",bn),()=>{var sn;(sn=le.current)==null||sn.removeEventListener("click",bn),(0,It.AL)(),(0,It.Iy)()}},[re,le.current,bn]);const Rn=sn=>{sn.target.nodeName==="IMG"&&sn.target.className.indexOf("draw-flowchart")>-1?(gn.current.style.zIndex=1,gn.current.style.display="flex",gn.current.style.width=sn.target.clientWidth+"px",gn.current.style.height=sn.target.clientHeight+"px",gn.current.style.top=sn.target.offsetTop+"px",gn.current.style.left=sn.target.offsetLeft+"px",sn.target.id&&(ke.current=sn.target.id)):gn.current.style.display="none"},In=()=>{gn.current.style.display="none"};return(0,lt.useEffect)(()=>{var sn;const Hn=Mn=>{Mn.preventDefault(),Mn.clipboardData.setData("text",window.getSelection().toString())};return(sn=le.current)==null||sn.addEventListener("copy",Hn),()=>{var Mn;(Mn=le.current)==null||Mn.removeEventListener("copy",Hn)}},[le.current]),lt.createElement("div",{style:{position:"relative"},onMouseLeave:In},rn&<.createElement("div",{ref:le,className:`${Ht.mdBody} `},re),!rn&&!Et(re)&<.createElement("div",{ref:le,style:ve({},Ue),onMouseOver:Rn,className:`${Tt||""} ${wn?"disabled-fill":""} markdown-body ${Ht.mdBody} ${Pt.current}`,dangerouslySetInnerHTML:{__html:re}}),!rn&&Et(re)&<.createElement(ee,{html:re}),lt.createElement("div",{ref:gn,className:`${Ht.button} ${De?"":Ht.previewFlowChart}`},lt.createElement(Yt.Z,null,lt.createElement(Nt.ZP,{onClick:()=>{De?$t(ke.current):(ln(ke.current),gt("flowChart"))}},De?"\u7F16\u8F91":"\u9884\u89C8"))),lt.createElement(jt.Z,{close:!0,data:Dn,type:Dn!=null&&Dn.length?bt:"",style:ve({},On),onClose:()=>ln("")}))}},28267:function(Yn,qe,dt){"use strict";dt.d(qe,{h:function(){return se}});var lt=dt(59301),Dt=dt(82326),It=dt(28284),xe=dt(7939),_t=dt(89780),Gt=dt.n(_t),Vt=dt(88319),me=dt(94896),Yt=Object.defineProperty,Nt=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,ee=(Xt,ve,Qt)=>ve in Xt?Yt(Xt,ve,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Xt[ve]=Qt,Kt=(Xt,ve)=>{for(var Qt in ve||(ve={}))Me.call(ve,Qt)&&ee(Xt,Qt,ve[Qt]);if(jt)for(var Qt of jt(ve))ce.call(ve,Qt)&&ee(Xt,Qt,ve[Qt]);return Xt},Ht=(Xt,ve)=>Nt(Xt,Oe(ve));const de=Dt.default.Option,Ae={labelCol:{span:4},wrapperCol:{span:20}},je={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"]};qe.Z=({callback:Xt,onCancel:ve})=>{const[Qt,Se]=(0,lt.useState)("python");function be(en){Se(je[en][1])}function Le(en){Xt(en)}return lt.createElement(It.default,Ht(Kt({},Ae),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Le,style:{width:500}}),lt.createElement(It.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},lt.createElement(Dt.default,{getPopupContainer:en=>en.parentNode,onChange:be},Object.keys(je).map(en=>lt.createElement(de,{key:en,value:en},je[en][0])))),lt.createElement(It.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},lt.createElement(se,{mode:Qt})),lt.createElement("div",{className:"flex-container flex-end"},lt.createElement(xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),lt.createElement(xe.ZP,{type:"ghost",onClick:ve},"\u53D6\u6D88")))};function se({value:Xt,onChange:ve,mode:Qt,options:Se={}}){const be=(0,lt.useRef)(),[Le,en]=(0,lt.useState)();return(0,lt.useEffect)(()=>{if(Le){let ie=function(Re){const De=Re.getValue();ve&&ve(De)};return Le.on("change",ie),()=>{Le.off("change",ie)}}},[Le,ve]),(0,lt.useEffect)(()=>{Le&&Le.setOption("mode",Qt)},[Le,Qt]),(0,lt.useEffect)(()=>{Le&&(Xt!==Le.getValue()||Xt==="")&&setTimeout(()=>{Le.setValue(Xt||"")},300)},[Le,Xt]),(0,lt.useEffect)(()=>{if(be.current&&!Le){const ie=Gt().fromTextArea(be.current,Kt({mode:Qt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Se));en(ie)}},[be.current,Le]),lt.createElement("div",{className:"my-codemirror-container"},lt.createElement("textarea",{ref:be}))}},39116:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Zn}});var lt=dt(59301),Dt=dt(44283),It=dt(89780),xe=dt.n(It),_t=dt(76374),Gt=dt(88319),Vt=dt(6313),me=dt(25717),Yt=dt(99498),Nt=dt(25419),Oe=dt(67549),jt=dt(35883),Me=({value:Nn="",className:Ln,showTextOnly:ii,showLines:Qn,style:xi={}})=>{const Xn=(0,lt.useMemo)(()=>"",[Nn]);return lt.createElement(lt.Fragment,null,lt.createElement("div",{dangerouslySetInnerHTML:{__html:Xn}}))},ce=Object.defineProperty,ee=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,je=(Nn,Ln,ii)=>Ln in Nn?ce(Nn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ii}):Nn[Ln]=ii,se=(Nn,Ln)=>{for(var ii in Ln||(Ln={}))de.call(Ln,ii)&&je(Nn,ii,Ln[ii]);if(Ht)for(var ii of Ht(Ln))Ae.call(Ln,ii)&&je(Nn,ii,Ln[ii]);return Nn},Xt=(Nn,Ln)=>ee(Nn,Kt(Ln));let ve=[{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\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",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 Qt({onActionCallback:Nn,title:Ln,icon:ii,actionName:Qn,className:xi="",children:Xn}){function $n(){Nn(Qn)}return lt.createElement("a",{title:Ln,className:xi,onClick:$n},lt.createElement("i",{className:`${ii}`}),Xn)}var Se=({watch:Nn,showNullButton:Ln,showNullProgramButton:ii,onActionCallback:Qn,fullScreen:xi,insertTemp:Xn,hidetoolBar:$n,extraUse:Hi})=>{const Bi=[...ve,{title:`${Nn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Nn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return lt.createElement("ul",{className:"markdown-toolbar-container"},!$n&&Bi.map((sr,Jn)=>lt.createElement("li",{key:Jn},sr.actionName?lt.createElement(Qt,Xt(se({},sr),{onActionCallback:Qn})):lt.createElement("span",{className:"v-line"}))),Ln?lt.createElement("li",null,lt.createElement(Qt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Qn},lt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,ii?lt.createElement(lt.Fragment,null,lt.createElement("li",null,lt.createElement(Qt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Qn},lt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),lt.createElement("li",null,lt.createElement(Qt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Qn},lt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Xn&<.createElement("li",null,lt.createElement(Qt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Xn}`,onActionCallback:Qn},lt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Hi&<.createElement("li",null,Hi),lt.createElement("li",{className:"btn-full-screen"},lt.createElement(Qt,{icon:`${xi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:xi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Qn})))},be=dt(88487),Le=dt(28284),en=dt(37568),ie=dt(7939),Re=Object.defineProperty,De=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,On=(Nn,Ln,ii)=>Ln in Nn?Re(Nn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ii}):Nn[Ln]=ii,zt=(Nn,Ln)=>{for(var ii in Ln||(Ln={}))we.call(Ln,ii)&&On(Nn,ii,Ln[ii]);if(rn)for(var ii of rn(Ln))Ue.call(Ln,ii)&&On(Nn,ii,Ln[ii]);return Nn},kt=(Nn,Ln)=>De(Nn,Tt(Ln));const Ye={labelCol:{span:4},wrapperCol:{span:20}};var wn=({callback:Nn,onCancel:Ln})=>{function ii(Qn){Nn(Qn)}return lt.createElement(Le.default,kt(zt({},Ye),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ii,style:{width:500}}),lt.createElement(Le.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},lt.createElement(en.default,null)),lt.createElement(Le.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},lt.createElement(en.default,null)),lt.createElement("div",{className:"flex-container flex-end"},lt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),lt.createElement(ie.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},on=dt(28267),$t=dt(53332),Ee=dt(62957),Be=dt(77019),Cn=dt(40254),Ie=dt(59301),gn=({callback:Nn,onCancel:Ln})=>{const ii=document.createElement("canvas"),Qn=ii.getContext("2d");ii.width=1e3,ii.height=800,Qn.fillStyle="#ffffff",Qn.fillRect(0,0,ii.width,ii.height);const xi=ii.toDataURL("image/png");return Ie.createElement(Ee.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ie.createElement(Be.Z,{style:{height:"100vh"}},Ie.createElement(Cn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:xi,visible:!0,title:String(Date.now())},onOk:Xn=>{Nn({src:Xn.url})},onClose:Ln})))},ke=dt(36207),Dn=dt(5269),ln=dt(6767),bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},gt=dt(59301),Ct=(0,lt.forwardRef)(({onCancel:Nn,editImgId:Ln,callback:ii},Qn)=>{let xi=(0,lt.useRef)(),Xn=(0,lt.useRef)(),$n=(0,lt.useRef)(),Hi=(0,lt.useRef)(!1);const Bi=(0,lt.useRef)(!1);console.log("ref:",Qn);const[sr,Jn]=(0,lt.useState)(0),[Vn,oi]=(0,lt.useState)("100vh");return(0,lt.useEffect)(()=>{Jn(1)},[]),(0,lt.useImperativeHandle)(Qn,()=>({setHeight:oi})),gt.createElement("div",{ref:Bi,className:"body-overflow-initial"},gt.createElement(ke.Z,{width:"100vw",height:Vn,footer:null,closable:!0,placement:"bottom",open:!!sr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${bt.drawerWrap}`,onClose:()=>{window.saveDrawData(Ti=>{ii({src:`/api/attachments/${Ti}`,id:Ti})})},title:gt.createElement(Be.Z,{align:"middle"},gt.createElement(Dn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),gt.createElement(Dn.Z,{onClick:()=>{oi(Vn==="60px"?"100vh":"60px")}},gt.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),gt.createElement(Dn.Z,{onClick:()=>{window.saveDrawData(Ti=>{if(Ti===null){ln.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}ln.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),ii({src:`/api/attachments/${Ti}`,id:Ti,disabledClose:!0})})}},gt.createElement(ie.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},gt.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Ln||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Xn})))}),Pt=dt(14185),vt=dt(47889),Et=dt(4875);const Zt=vt.ZP.Group,Ve={margin:"0 8px"};var ue=({callback:Nn,onCancel:Ln})=>{function ii(Qn){Nn(Qn)}return lt.createElement(Le.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ii},lt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},lt.createElement("span",{style:Ve},"\u5355\u5143\u683C\u6570\uFF1A"),lt.createElement("span",{style:Ve},"\u884C\u6570"),lt.createElement(Le.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},lt.createElement(Et.Z,null)),lt.createElement("span",{style:Ve},"\u5217\u6570"),lt.createElement(Le.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},lt.createElement(Et.Z,null))),lt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},lt.createElement("span",{style:Ve},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),lt.createElement(Le.default.Item,{name:"align"},lt.createElement(Zt,null,lt.createElement(vt.ZP,{value:"default"},lt.createElement("i",{className:"fa fa-align-justify"})),lt.createElement(vt.ZP,{value:"left"},lt.createElement("i",{className:"fa fa-align-left"})),lt.createElement(vt.ZP,{value:"center"},lt.createElement("i",{className:"fa fa-align-center"})),lt.createElement(vt.ZP,{value:"right"},lt.createElement("i",{className:"fa fa-align-right"}))))),lt.createElement("div",{className:"flex-container flex-end"},lt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),lt.createElement(ie.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},re=dt(58755),Ce=dt(84915),Te=dt.n(Ce),te=(0,lt.forwardRef)(({use3d:Nn,width:Ln,height:ii,callback:Qn,showSaveButton:xi},Xn)=>{const $n=(0,lt.useRef)(),Hi=(0,lt.useRef)(),[Bi,sr]=(0,lt.useState)(!1),Jn=(0,lt.useRef)({id:$n,appName:"graphing",width:Ln||1e3,height:ii||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,lt.useEffect)(()=>{Hi.current=new(Te())(Jn.current,!0),window.onload=function(){Hi.current.inject("applet_container")}},[]);const Vn=()=>{var oi=window.ggbApplet.getPNGBase64(1,!0,72);return Qn&&Qn(oi),oi};return(0,lt.useEffect)(()=>{Jn.current.appName=Bi?"3D":"graphing",Hi.current.inject("applet_container")},[Bi]),(0,lt.useEffect)(()=>{sr(Nn)},[Nn]),(0,lt.useImperativeHandle)(Xn,()=>({getImgData:Vn})),lt.createElement(lt.Fragment,null,lt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:$n}),lt.createElement(Be.Z,{align:"middle"},lt.createElement(Dn.Z,{flex:1},lt.createElement(re.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Bi,onChange:oi=>sr(oi)})),lt.createElement(Dn.Z,null,lt.createElement(ie.ZP,{size:"large",onClick:Vn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),le=dt(9057);const bn="link",Sn="upload-image",Rn="add-flowchart",In="draw-image",sn="add-flowchart",Hn="code-block",Mn="add-table",ye="------------",Ze={default:ye,left:`:${ye}`,center:`:${ye}:`,right:`${ye}:`};var En=dt(79006),An=dt(76406);function he(){}let Ke=0;const hn=1e4,Pn="\u2581",_n="@\u2581\u2581@",ci="@\u2581@",yi=`
|
|
|
**\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`,Ni=["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 ri(Nn){return/^\d+$/.test(Nn)?`${Nn}px`:Nn}const Tn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",xn={[Tn+"-B"]:"bold",[Tn+"-I"]:"italic"},Bn={[bn]:"\u6DFB\u52A0\u94FE\u63A5",[Hn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Sn]:"\u6DFB\u52A0\u56FE\u7247",[In]:"\u6DFB\u52A0\u753B\u56FE",[Rn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Mn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Zn=({defaultValue:Nn="",onChange:Ln,width:ii="100%",height:Qn=400,miniToolbar:xi=!1,isFocus:Xn=!1,watch:$n,insertTemp:Hi,mode:Bi="markdown",id:sr="markdown-editor-id",showResizeBar:Jn=!1,noStorage:Vn=!1,showNullButton:oi=!1,showNullProgramButton:Ti=!1,hidetoolBar:Ci=!1,fullScreen:Rt=!1,onBlur:Pe,onCMBeforeChange:qt,onFullScreen:He,className:ae="",disablePaste:ze=!1,disabled:Jt=!1,disabledFill:nn=!1,placeholder:cn="",values:Ne="",extraUse:Fe,onAddBlank:Xe})=>{const[Je,vn]=(0,lt.useState)(null),[li,jn]=(0,lt.useState)(Nn),[vi,$i]=(0,lt.useState)($n),[Ji,yn]=(0,lt.useState)(Rt),[zi,Ri]=(0,lt.useState)(""),[Ii,an]=(0,lt.useState)(0),[Qe,We]=(0,lt.useState)(Qn),[mn,fn]=(0,lt.useState)(!1),[Wn,$e]=(0,lt.useState)(0),[Si,pn]=(0,lt.useState)(0),wi=(0,lt.useRef)(),Wi=(0,lt.useRef)(),Ui=(0,lt.useRef)(),Vi=(0,lt.useRef)(),Ki=(0,lt.useRef)(),Oi=(0,lt.useRef)(),qi=(0,Dt.useDispatch)();(0,lt.useEffect)(()=>{const pi=window.scrollY||window.pageYOffset;jn(Ne),Je==null||Je.setValue(Ne),window.scrollTo(0,pi)},[Ne]),(0,lt.useEffect)(()=>{He==null||He(Ji)},[Ji]),(0,lt.useEffect)(()=>{if(wi.current){let pi=function(kn,ji){var br;if(ze){ji.preventDefault();return}const Dr=ji.clipboardData;if(Dr){const Or=Dr.types.toString(),Vr=Dr.items;if(Or==="Files"||Dr.types.indexOf("Files")>-1){if(ji.preventDefault(),Bi=="stex")return;try{let Gr=Vr[1];((br=Vr[0])==null?void 0:br.kind)==="file"&&(Gr=Vr[0]);const Ur=Gr.getAsFile(),ro=Ur.name.split(".").pop();(0,$t.I)(Ur,Kr=>{var uo,un,So;Kr.id?((uo=Ur==null?void 0:Ur.type)==null?void 0:uo.indexOf("image"))>-1?ni.replaceSelection(`<img width="100%" src="/api/attachments/${Kr.id}?type=${Kr.content_type})" alt="" />`):((un=Ur==null?void 0:Ur.type)==null?void 0:un.indexOf("video"))>-1?ni.replaceSelection(`<video width="100%" controls src="/api/attachments/${Kr.id}"></video>`):((So=Ur==null?void 0:Ur.type)==null?void 0:So.indexOf("pdf"))>-1?ni.replaceSelection(`<a href="/api/attachments/${Kr.id}?type=${Ur.type}&disposition=inline" target="_blank">${Ur.name}</a>`):Ni.includes(ro)?ni.replaceSelection(`<a href="/api/attachments/${Kr.id}?type=office&disposition=inline" target="_blank">${Ur.name}</a>`):ni.replaceSelection(`[${Ur.name}](/api/attachments/${Kr.id}?type=${Kr.content_type})`):(Kr==null?void 0:Kr.status)===401&&(document.location.href="/user/login")})}catch(Gr){ln.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ni=xe().fromTextArea(wi.current,{mode:Bi,lineNumbers:!xi,lineWrapping:!0,value:Nn,autoCloseTags:!0,autoCloseBrackets:!0});return ni.on("keyup",function(kn,ji){ji.keyCode===8&&(kn.getValue()==""?ni.setOption("placeholder",cn):ni.setOption("placeholder",null))}),ni.on("keydown",function(kn,ji){if(ji.keyCode===8){var br=tr(kn);br&&ji.preventDefault()}}),Xn&&ni.focus(),ni.on("paste",pi),Jt&&ni.on("beforeChange",function(kn,ji){(ji.origin==="paste"||ji.origin==="+input")&&ji.cancel()}),vn(ni),()=>{ni.off("paste",pi)}}},[]);const fr=(0,lt.useCallback)(()=>{if(Wi.current)try{}catch(pi){console.log(pi,"---- to set md editor body height")}},[Qe,Wi,Ji]);(0,lt.useEffect)(()=>{function pi(){let ni=new _t.Z(kn=>{for(let ji of kn)(ji.target.offsetHeight>0||ji.target.offsetWidth>0)&&(fr(),Je.setSize("100%","100%"),Je.refresh())});return ni.observe(wi.current.parentElement),ni}if(Je){const ni=pi();return()=>{var kn,ji;(kn=wi.current)!=null&&kn.parentElement&&ni.unobserve((ji=wi.current)==null?void 0:ji.parentElement)}}},[Je,fr]),(0,lt.useEffect)(()=>{if(Je){let pi=[];for(const[ni,kn]of Object.entries(xn)){let ji={[ni]:()=>{ai(kn)}};pi.push(ji),Je.addKeyMap(ji)}return()=>{for(let ni of pi)Je.removeKeyMap(ni)}}},[Je]),(0,lt.useEffect)(()=>{Rt!==Ji&&yn(Rt)},[Rt]),(0,En.Z)(()=>{if(!Vn&&Ii>0){let pi=new Date().getTime(),ni=window.sessionStorage.getItem(sr);pi>=Ii+hn&&(!ni||ni!==li)&&(window.sessionStorage.setItem(sr,li),fn(!0))}},hn),(0,lt.useEffect)(()=>{$i($n)},[Je,$n]),(0,lt.useEffect)(()=>{Je&&Xn&&Je.focus()},[Je,Xn]),(0,lt.useEffect)(()=>{if(vi&&Je){let pi=function(kn){let ji=kn.target;if(Vi.current){let br=ji.scrollTop/ji.scrollHeight;Vi.current.scrollTop=Vi.current.scrollHeight*br}};const ni=Je.getScrollerElement();return ni.addEventListener("scroll",pi),()=>{ni.removeEventListener("scroll",pi)}}},[Je,vi]),(0,lt.useEffect)(()=>{if(Je&&qt){let pi=function(ni,kn){qt(ni,kn)};return Je.on("beforeChange",pi),()=>{Je.off("beforeChange",pi)}}},[Je,qt]),(0,lt.useEffect)(()=>{if(Je&&Pe){let pi=function(){Pe(Je.getValue())};return Je.on("blur",pi),()=>{Je.off("blur",pi)}}},[Je,Pe]);function tr(pi,ni){var kn=pi.getDoc(),ji=kn.getCursor(),br=kn.getLine(ji.line),Dr=br.charAt(ji.ch-1),Or=br.lastIndexOf("@\u2581@",ji.ch),Vr=br.lastIndexOf("@\u2581\u2581@",ji.ch),Gr=Or>Vr?Or:Vr,Ur=Or>Vr?3:4;if(_n.indexOf(Dr)===-1)return null;if(console.log("change1:",ni,pi,br,ji,Gr,Or,Vr,Dr),Gr>=0&&ji.ch-Gr<5){var ro=Gr+Ur;return kn.replaceRange("",{line:ji.line,ch:Gr},{line:ji.line,ch:ro}),{line:ji.line,ch:ro}}return null}(0,lt.useEffect)(()=>{if(Je){let pi=function(ni,kn){const ji=ni.getValue();jn(ji),an(new Date().getTime()),ni.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ln&&(Ti?Ln(ji,Ei(ji)):Ln(ji))};return Je.on("change",pi),()=>{Je.off("change",pi)}}},[Je,Ln]),(0,lt.useEffect)(()=>{if(Je)if(Nn==null)Je.setValue(""),jn("");else{const pi=window.scrollY||window.pageYOffset;Nn!==Je.getValue()&&(Je.setValue(Nn),jn(Nn),Je.setCursor(Jt?1:Je.lineCount(),0),window.scrollTo(0,pi))}},[Je,Nn]);const ai=(0,lt.useCallback)(pi=>{const ni=Je.getCursor(),kn=Je.getSelection();let ji=kn.split(`
|
|
|
`);switch(pi){case"bold":return Je.replaceSelection("**"+kn+"**"),kn===""&&Je.setCursor(ni.line,ni.ch+2),Je.focus();case"italic":return Je.replaceSelection("*"+kn+"*"),kn===""&&Je.setCursor(ni.line,ni.ch+1),Je.focus();case"code":return Je.replaceSelection("`"+kn+"`"),kn===""&&Je.setCursor(ni.line,ni.ch+1),Je.focus();case"inline-latex":return(0,An.Ye)(qi)?void 0:(Ri("inline-latex"),Je.focus());case"latex":return Je.replaceSelection("```latex\n"+kn+"\n```"),Je.setCursor(ni.line+1,kn.length+1),Je.focus();case"line-break":return Je.replaceSelection(`<br/>
|
|
|
`),Je.focus();case"list-ul":return kn===""?Je.replaceSelection("- "+kn):Je.replaceSelection(ji.map(br=>br===""?"":`- ${br}`).join(`
|
|
|
`)),Je.focus();case"list-ol":return kn===""?Je.replaceSelection("1. "+kn):Je.replaceSelection(ji.map((br,Dr)=>br===""?"":`${Dr+1}. ${br}`).join(`
|
|
|
`)),Je.focus();case"add-null-ch":Xe==null||Xe();return;case"add-signal":return kn===""&&Je.setCursor(ni.line,ni.ch),Je.replaceSelection(ci),Je.focus();case"add-multiple":return kn===""&&Je.setCursor(ni.line,ni.ch),Je.replaceSelection(_n),Je.focus();case"inster-template-1":return kn===""&&Je.setCursor(ni.line,ni.ch),Je.replaceSelection(yi),Je.focus();case"eraser":return Je.setValue(""),Je.focus();case"trigger-watch":return $i(!vi),Je.focus();case"trigger-full-screen":return yn(!Ji),Je.focus();case bn:Ri(bn);return;case Hn:Ri(Hn);return;case Sn:Ri(Sn);return;case In:Ri(In);return;case"maths-latex":if((0,An.Ye)(qi))return;Ri("maths-latex");return;case Rn:Ki.current="",sessionStorage.removeItem("file_id"),Ri(Rn);return;case Mn:Ri(Mn);return;default:throw new Error}},[Je,vi,Ji]),Lt=(0,lt.useCallback)((pi,ni)=>{var kn,ji,br,Dr,Or,Vr;pi!=null&&pi.disabledClose||Ri("");const{src:Gr,alt:Ur,id:ro}=pi||{};switch(zi){case bn:const{title:Io,link:ho}=pi;return Je.replaceSelection(`[${Io}](${ho})`),Je.focus();case Hn:const{language:to,content:wr}=pi;return Je.replaceSelection(["```"+to,wr,"```"].join(`
|
|
|
`)),Je.focus();case"maths-latex":for(var Kr=atob(pi),uo=new Uint8Array(Kr.length),un=0;un<Kr.length;un++)uo[un]=Kr.charCodeAt(un);var So=new Blob([uo],{type:"image/png"});return(0,$t.I)(So,Er=>{Er.id?Je.replaceSelection(``):(Er==null?void 0:Er.status)===401&&(document.location.href="/user/login")}),Je.focus();case"inline-latex":return(0,An.Ye)(qi)?void 0:(Je.replaceSelection("`$$"+pi+"$$`"),Je.focus());case sn:return ro?(Je.getValue().indexOf(Gr)===-1?Je.replaceSelection(`<center><img id="${ro}" width="80%" src="${Gr}" class="draw-flowchart" alt="${Ur||""}" /></center>`):document.getElementById(ro).src=Pt.Z.API_SERVER+Gr+"?t="+Date.now(),Je.focus()):void 0;case Sn:case In:const Cr=ni,bo=(br=(ji=(kn=Cr==null?void 0:Cr.name)==null?void 0:kn.split("."))==null?void 0:ji.pop)==null?void 0:br.call(ji);return((Dr=Cr==null?void 0:Cr.type)==null?void 0:Dr.indexOf("image"))>-1||!(Cr!=null&&Cr.type)?Cr!=null&&Cr.align||Cr!=null&&Cr.width?Je.replaceSelection(`<p style="text-align:${Cr.align||"initial"}"><img width="${Cr.width?Cr.width+"%":"initial"}" src="${Gr}" alt="${Ur||""}" /></p>`):Je.replaceSelection(`<img width="100%" src="${Gr}" alt="${Ur||""}" />`):((Or=Cr==null?void 0:Cr.type)==null?void 0:Or.indexOf("video"))>-1?Je.replaceSelection(`<video width="100%" controls src="${Gr}"></video>`):((Vr=Cr==null?void 0:Cr.type)==null?void 0:Vr.indexOf("pdf"))>-1?Je.replaceSelection(`<a href="${Gr}?type=${Cr.type}&disposition=inline" target="_blank">${Cr.name}</a>`):Ni.includes(bo)?Je.replaceSelection(`<a href="${Gr}?type=office&disposition=inline" target="_blank">${Cr.name}</a>`):Je.replaceSelection(`[${Cr.name}](${Gr})`),Je.focus();case Mn:const{row:Ar,col:Sr,align:lo}=pi;let $r=`
|
|
|
`;for(let Er=0;Er<Ar;Er++){let oo=[],Xi=[];for(let vs=0;vs<Sr;vs++)Er===1&&Xi.push(Ze[lo]),oo.push(" ");Er===1&&($r+=`| ${Xi.join(" | ")} |
|
|
|
`),$r+=`| ${oo.join(Sr===1?"":" | ")} |
|
|
|
`}return Je.replaceSelection($r+`
|
|
|
`),Je.focus();default:throw new Error}},[Je,zi]),ur=(0,lt.useMemo)(()=>{switch(zi){case bn:return lt.createElement(wn,{callback:Lt,onCancel:Qi});case Hn:return lt.createElement(on.Z,{callback:Lt,onCancel:Qi});case Sn:return lt.createElement($t.Z,{callback:Lt,onCancel:Qi});case Rn:return lt.createElement(Ct,{editImgId:Ki.current,callback:Lt,onCancel:Qi});case Mn:return lt.createElement(ue,{callback:Lt,onCancel:Qi});case"maths-latex":return lt.createElement(te,{showSaveButton:!0,callback:Lt});case"inline-latex":return lt.createElement(le.Z,{showSaveButton:!0,callback:Lt});default:return null}},[zi]);function Qi(){Ri("")}(0,lt.useEffect)(()=>{if(Ui.current){let pi=function(Or){br=!0,Dr=Or.pageY},ni=function(){br=!1},kn=function(Or){if(br){let Vr=Or.pageY-Dr;Vr<0&&(Vr=0),Vr>300&&(Vr=300);let Gr=Qn+Vr+"px";We(Gr)}},ji=Ui.current,br=!1,Dr=0;return ji.addEventListener("mousedown",pi),document.addEventListener("mousemove",kn),document.addEventListener("mouseup",ni),()=>{ji.removeEventListener("mousedown",pi),document.removeEventListener("mousemove",kn),document.removeEventListener("mouseup",ni)}}},[Je,Ui]),(0,lt.useEffect)(()=>{We(Qn)},[Qn]);const Yi=ri(ii),nr=ri(Qe),_i={width:Yi,height:nr},ui=(0,lt.useMemo)(()=>{if(Ii){let pi=new Date(Ii),ni=pi.getHours(),kn=pi.getMinutes(),ji=pi.getSeconds();return ni=ni<10?"0"+ni:ni,kn=kn<10?"0"+kn:kn,ji=ji<10?"0"+ji:ji,`${ni}:${kn}:${ji}`}return 0},[Ii]),Ei=pi=>{const ni=[];if(Ti){let kn=-1;pi=pi.replace(/(@▁▁@|@▁@)/g,function(ji,br,Dr){ni.push({multiLine:ji!==ci})})}return ni};function Mi(){window.sessionStorage.removeItem(sr),fn(!1),an(0)}function Gn(){fn(!1),an(0),Je.setValue(window.sessionStorage.getItem(sr))}(0,lt.useEffect)(()=>{Bn[zi]&&zi!==In&&zi!==Rn&&setTimeout(()=>{const pi=document.getElementsByClassName("markdown-popup-form")[0],ni=window.innerWidth/2-pi.offsetWidth/2,kn=window.innerHeight/2-pi.offsetHeight/2;$e(ni),pn(kn)},0)},[zi]);const gi=pi=>{pi.preventDefault();const ni=pi.clientX-Wn,kn=pi.clientY-Si;document.body.onmousemove=ji=>{let br=ji.clientX-ni,Dr=ji.clientY-kn;const Or=document.getElementsByClassName("markdown-popup-form")[0],Vr=window.innerWidth-Or.offsetWidth,Gr=window.innerHeight-Or.offsetHeight;br=Math.max(0,Math.min(br,Vr)),Dr=Math.max(0,Math.min(Dr,Gr)),Li(ji.clientX,ji.clientY,ni,kn)&&($e(br),pn(Dr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Li=(pi,ni,kn,ji)=>{const br=document.body.clientHeight,Dr=document.body.clientWidth;return pi<20&&kn>pi||pi>Dr-20&&kn<pi||ni<20&&ji>ni||ni>br-20&&ji<ni?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return lt.createElement(lt.Fragment,null,lt.createElement("div",{className:"markdown-editor-wrapper",ref:Wi},lt.createElement("div",{className:`markdown-editor-container ${ae} ${vi?"on-preview":""} ${xi?"mini":""} ${Ji?"full-screen":""}`,style:_i},lt.createElement(Se,{insertTemp:Hi,watch:vi,fullScreen:Ji,showNullButton:oi,showNullProgramButton:Ti,onActionCallback:ai,hidetoolBar:Ci,extraUse:Fe}),lt.createElement("div",{className:"markdown-editor-body"},lt.createElement("div",{className:"codemirror-container"},lt.createElement("textarea",{ref:wi,placeholder:cn})),vi?lt.createElement("div",{ref:Vi,className:"preview-container"},Bi==="stex"&<.createElement(Me,{value:li}),Bi!=="stex"&<.createElement(jt.Z,{edit:!0,disabledFill:nn,showProgramFill:Ti,value:li,openEditor:pi=>{var ni;Ki.current=pi,(ni=Oi.current)==null||ni.setHeight("100vh"),setTimeout(()=>{Ri("add-flowchart")},150)}})):null))),Jn?lt.createElement("a",{ref:Ui,className:"editor-resize"}):null,zi===In&<.createElement(gn,{callback:Lt,onCancel:Qi}),zi===Rn&<.createElement(Ct,{ref:Oi,editImgId:Ki.current,callback:Lt,onCancel:Qi}),lt.createElement(be.Z,null,Bn[zi]&&zi!==In&&zi!==Rn?lt.createElement(Ee.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Wn,top:Si},title:lt.createElement("div",{style:{cursor:"move"},onMouseDown:gi},Bn[zi]),open:!0,onCancel:Qi,footer:null,destroyOnClose:!0,width:zi===Rn?"1200px":null,height:zi===Rn?"80vh":null,className:"markdown-popup-form"},ur):null))}},53332:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return ve},I:function(){return Se}});var lt=dt(28284),Dt=dt(6767),It=dt(37568),xe=dt(44104),_t=dt(4875),Gt=dt(47889),Vt=dt(7939),me=dt(23216),Yt=dt(59301),Nt=dt(59301),Oe=Object.defineProperty,jt=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,Ht=(be,Le,en)=>Le in be?Oe(be,Le,{enumerable:!0,configurable:!0,writable:!0,value:en}):be[Le]=en,de=(be,Le)=>{for(var en in Le||(Le={}))ee.call(Le,en)&&Ht(be,en,Le[en]);if(ce)for(var en of ce(Le))Kt.call(Le,en)&&Ht(be,en,Le[en]);return be},Ae=(be,Le)=>jt(be,Me(Le));const{useForm:je}=lt.default,se={width:280,marginRight:10},Xt={labelCol:{span:5},wrapperCol:{span:19}};var ve=({callback:be,onCancel:Le})=>{const[en]=je();let ie=(0,Yt.useRef)();function Re(rn){ie.current.width=en.getFieldValue("width"),ie.current.align=en.getFieldValue("align"),be(rn,ie.current)}function De(rn,we){if(rn.status===-1){Dt.ZP.error(rn.message);return}en.setFieldsValue({src:`/api/attachments/${rn.id}`,type:we.type})}function Tt(rn){let we=rn.target.files[0];ie.current=we,Se(we,De)}return Nt.createElement(lt.default,Ae(de({form:en},Xt),{className:"upload-image-panel",onFinish:Re,style:{width:470,overflow:"hidden"}}),Nt.createElement(lt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Nt.createElement("div",{className:"flex-container"},Nt.createElement(lt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Nt.createElement(It.default,{style:se})),Nt.createElement(Qt,{onFileChange:Tt}))),Nt.createElement(lt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Nt.createElement(It.default,{style:{width:264}})),Nt.createElement(lt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Nt.createElement(xe.Z,null,Nt.createElement(lt.default.Item,{name:"width",style:{margin:0}},Nt.createElement(_t.Z,{style:{width:264}})),Nt.createElement("span",{className:"ml8"},"%"))),Nt.createElement(lt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Nt.createElement(Gt.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"}]})),Nt.createElement("aside",null,Nt.createElement(lt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Nt.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Nt.createElement(Vt.ZP,{type:"default",onClick:Le},"\u53D6\u6D88"))))};function Qt({onFileChange:be}){return Nt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Nt.createElement("input",{type:"file",onChange:be}))}function Se(be,Le){if(!be)throw new String("\u6CA1\u6709\u6587\u4EF6");let en=new FormData;en.append("editormd-image-file",be),en.append("file_param_name","editormd-image-file"),en.append("byxhr","true");var ie=new window.XMLHttpRequest;ie.withCredentials=!0,ie.addEventListener("load",function(Re){Le(JSON.parse(Re.target.responseText),be)},!1),ie.addEventListener("error",function(Re){console.error(Re)},!1),ie.open("POST",`${me.KI}/api/attachments.json`),ie.send(en)}},88487:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return It}});var lt=dt(59301),Dt=dt(4676);class It extends lt.Component{constructor(_t){super(_t);const Gt=window.document;this.node=Gt.createElement("div"),Gt.body.appendChild(this.node)}render(){const{children:_t}=this.props;return(0,Dt.createPortal)(_t,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},34728:function(Yn,qe,dt){"use strict";dt.d(qe,{SV:function(){return gn},ZP:function(){return Ie}});var lt=dt(59301),Dt=dt(76374);const It={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"]},xe={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"]},_t={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(`
|
|
|
`)}]},Gt={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(`
|
|
|
`)}]},Vt={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 me=dt(53184),Yt=dt.n(me),Nt=(ke,Dn,ln)=>new Promise((bt,gt)=>{var pt=vt=>{try{Pt(ln.next(vt))}catch(Et){gt(Et)}},Ct=vt=>{try{Pt(ln.throw(vt))}catch(Et){gt(Et)}},Pt=vt=>vt.done?bt(vt.value):Promise.resolve(vt.value).then(pt,Ct);Pt((ln=ln.apply(ke,Dn)).next())});const Oe={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"]}},jt=(ke,Dn,ln,bt)=>{const gt=Dn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ln.lineNumber,endColumn:ln.column});return Array.from(new Set(gt.match(/\b\w{2,}\b/g)||[])).map(Ct=>({label:Ct,kind:ke.languages.CompletionItemKind.Text,insertText:Ct,range:bt}))},Me=(ke,Dn,ln,bt)=>{ke.languages.registerCompletionItemProvider(Dn,{provideCompletionItems(gt,pt){const Ct=gt.getWordUntilPosition(pt),Pt={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Ct.startColumn,endColumn:Ct.endColumn},vt=gt.getLineContent(pt.lineNumber).substring(Ct.startColumn-2,Ct.endColumn);return{suggestions:[...jt(ke,gt,pt,Pt),...ln.map(Zt=>({label:Zt,kind:ke.languages.CompletionItemKind.Keyword,documentation:Zt,insertText:Zt,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Pt})),...bt.map(Zt=>({label:Zt.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:Zt.content,insertText:vt.startsWith("#")?Zt.content.replace(/#/,""):Zt.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Pt}))]}}})};var ce=ke=>{Oe.languages.forEach(Dn=>{ke.languages.registerDocumentFormattingEditProvider(Dn,{provideDocumentFormattingEdits(ln){return Nt(this,null,function*(){const bt=Yt()(ln.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:ln.getFullModelRange(),text:bt}]})}})}),Me(ke,"java",xe.keywords,xe.quickKey),Me(ke,"cpp",_t.keywords,_t.quickKey),Me(ke,"c",It.keywords,[]),Me(ke,"python",Gt.keywords,Gt.quickKey),Me(ke,"scala",Vt.keywords,Vt.quickKey)};const ee="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Kt=Object.defineProperty,Ht=(ke,Dn,ln)=>Dn in ke?Kt(ke,Dn,{enumerable:!0,configurable:!0,writable:!0,value:ln}):ke[Dn]=ln,de=(ke,Dn,ln)=>Ht(ke,typeof Dn!="symbol"?Dn+"":Dn,ln);const Ae=class Cw{constructor(Dn,ln,bt){this.placeholder=Dn,this.editor=ln,this.monaco=bt,ln.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Cw.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)}};de(Ae,"ID","editor.widget.placeholderHint");var se=Ae,Xt=dt(96236),ve=dt(6767),Qt=dt(25399),Se=dt(78267),be=dt(33156),Le=dt(56102),en=Object.defineProperty,ie=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,we=(ke,Dn,ln)=>Dn in ke?en(ke,Dn,{enumerable:!0,configurable:!0,writable:!0,value:ln}):ke[Dn]=ln,Ue=(ke,Dn)=>{for(var ln in Dn||(Dn={}))Tt.call(Dn,ln)&&we(ke,ln,Dn[ln]);if(De)for(var ln of De(Dn))rn.call(Dn,ln)&&we(ke,ln,Dn[ln]);return ke},On=(ke,Dn)=>ie(ke,Re(Dn)),zt=(ke,Dn)=>{var ln={};for(var bt in ke)Tt.call(ke,bt)&&Dn.indexOf(bt)<0&&(ln[bt]=ke[bt]);if(ke!=null&&De)for(var bt of De(ke))Dn.indexOf(bt)<0&&rn.call(ke,bt)&&(ln[bt]=ke[bt]);return ln},kt=(ke,Dn,ln)=>new Promise((bt,gt)=>{var pt=vt=>{try{Pt(ln.next(vt))}catch(Et){gt(Et)}},Ct=vt=>{try{Pt(ln.throw(vt))}catch(Et){gt(Et)}},Pt=vt=>vt.done?bt(vt.value):Promise.resolve(vt.value).then(pt,Ct);Pt((ln=ln.apply(ke,Dn)).next())});function Ye(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function wn(){}let on=!1;const $t={"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 Ee(ke=[]){let Dn=ke;if(Array.isArray(ke)){for(let ln=0;ln<ke.length;ln++){let bt=$t[ke[ln]];if(bt)return bt}return Dn[0]}return $t[Dn]||Dn}let Be=null;const Cn=()=>kt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var Ie=ke=>{var Dn=ke,{width:ln="100%",height:bt="100%",value:gt,language:pt="javascript",style:Ct={},options:Pt={},overrideServices:vt={},theme:Et="vs-dark",onEditBlur:Zt,isCopy:Ve=!1,onSave:ue,autoHeight:re=!1,forbidCopy:Ce=!1,forbidCopyTips:Te,onChange:tn=wn,editorDidMount:te=wn,onFocus:le=wn,onBreakPoint:bn=wn,breakPointValue:Sn=[],filename:Rn="educoder.txt",errorLine:In,errorContent:sn="",highlightLine:Hn,openBreakPoint:Mn=!1,placeholder:ye="",showMiniMap:Ze=!0}=Dn,En=zt(Dn,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const An=(0,lt.useRef)(),he=(0,lt.useRef)({}),Ke=(0,lt.useRef)(),hn=(0,lt.useRef)(),Pn=(0,lt.useRef)([]),_n=(0,lt.useRef)(!1),ci=(0,lt.useRef)(),yi=(0,lt.useRef)(),Ni=(0,lt.useRef)(!1),[ri,yt]=(0,lt.useState)(!1);function Tn(){let Vn;return An.current&&(Vn=new Dt.Z(oi=>{for(let Ti of oi)(Ti.target.offsetHeight>0||Ti.target.offsetWidth>0)&&he.current.instance.layout()}),Vn.observe(An.current)),Vn}function xn(){ve.ZP.warning({content:decodeURIComponent(Te||ee),key:"monaco-editor-tip"})}const Bn=()=>{let Vn=he.current.instance;if(gt!=null&&Vn&&ri){const oi=Vn.getModel();oi&>!==oi.getValue()&&(on=!0,oi.setValue(gt),Vn.layout(),on=!1)}};(0,lt.useEffect)(()=>{const Vn=be.Z.subscribe("formatDocument",oi=>{var Ti;let Ci=he.current.instance;(Ti=Ci==null?void 0:Ci.getAction)==null||Ti.call(Ci,"editor.action.formatDocument").run()});return window.updateMonacoValue=oi=>{tn(oi)},Vn},[]),(0,lt.useEffect)(()=>{var Vn;let oi=he.current.instance;hn.current&&clearTimeout(hn.current),hn.current=setTimeout(()=>{Bn()},500),gt&&(gt!=null&>.length)&&((Vn=oi==null?void 0:oi.updateOptions)==null||Vn.call(oi,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(gt.split(/\r\n|\r|\n/g).length))+3,5)}))},[gt,ri,he.current]),(0,lt.useEffect)(()=>{if(In&&he.current&&he.current.instance){let oi=he.current.instance;oi.changeViewZones(function(Ti){var Ci=document.createElement("div");Ci.style.padding="10px 20px",Ci.style.width="calc(100% - 20px)",Ci.className="my-error-line-wrp",Ci.innerHTML=sn,Ti.addZone({afterLineNumber:In||11,heightInLines:3,domNode:Ci})});var Vn={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}};oi.addOverlayWidget(Vn),oi.revealPositionInCenter({lineNumber:20,column:1})}},[In,he.current,ri]);const Zn=(Vn="",oi)=>{if(!Vn||Vn.trim()==="")return!0;const Ci=he.current.instance.getModel().getLineTokens(oi);let Rt=!1;for(let Pe=0;Pe<2;Pe++)Ci.getStandardTokenType(Pe)===1&&(Rt=!0);return Rt};(0,lt.useEffect)(()=>{var Vn;const oi=(Vn=he.current)==null?void 0:Vn.instance;if(oi&&ri&&Ce){const Ti=oi.onDidBlurEditorWidget(()=>{Ni.current=!1}),Ci=oi.onDidFocusEditorText(()=>{Ni.current=!0});return()=>{Ti.dispose(),Ci.dispose()}}},[he.current,ri,Ce]),(0,lt.useEffect)(()=>{var Vn;if((Vn=he.current)!=null&&Vn.instance&&ri&&Mn){let oi=he.current.instance,Ti=oi.getModel();if(!Ti)return;(()=>{var Fe;let Xe=[],Je=[];const vn=Ti.getAllDecorations();for(let jn of vn)jn.options.className==="highlighted-line"&&(Xe.push((Fe=jn==null?void 0:jn.range)==null?void 0:Fe.startLineNumber),Je.push(jn==null?void 0:jn.id));if(Hn===Xe[0])return;Ti.deltaDecorations(Je,[]);const li=Ti.getLineCount();Hn&&Hn<=li&&(oi.deltaDecorations([],[{range:new Be.Range(Hn,1,Hn,Ti.getLineMaxColumn(Hn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),oi.revealLineInCenter(Hn))})();const Rt=(Fe=!1)=>{var Xe;let Je=[],vn=[];const li=Ti.getAllDecorations();for(let jn of li)jn.options.linesDecorationsClassName==="breakpoints-select"&&(Je.push((Xe=jn==null?void 0:jn.range)==null?void 0:Xe.startLineNumber),vn.push(jn==null?void 0:jn.id));if(Fe)return{lines:Je,ids:vn};bn(Je)},Pe=Fe=>kt(void 0,null,function*(){let Xe={range:new Be.Range(Fe,1,Fe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ti.deltaDecorations([],[Xe]),Rt()}),qt=Fe=>kt(void 0,null,function*(){let Xe=[];const Je=oi.getLineDecorations(Fe);for(let vn of Je)vn.options.linesDecorationsClassName==="breakpoints-select"&&Xe.push(vn.id);yield Ti.deltaDecorations(Xe,[]),Rt()}),He=Fe=>{let Xe=oi.getLineDecorations(Fe);for(let Je of Xe)if(Je.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Se.isEqual)(Sn,Rt(!0).lines)){Ti.deltaDecorations(Rt(!0).ids,[]);const Fe=Sn.map(Xe=>({range:new Be.Range(Xe,1,Xe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ti.deltaDecorations([],Fe)}const ae=oi.onDidChangeModelContent(Fe=>{let Xe=oi.getPosition();if(Xe){let Je=Xe.lineNumber;clearTimeout(yi.current),yi.current=setTimeout(()=>{Zn(Ti.getLineContent(Je),Je)?qt(Je):He(Je)?(qt(Je),Pe(Je)):Rt()},100)}}),ze=oi.onMouseDown(Fe=>{var Xe,Je,vn;if(Fe.target.detail&&((vn=(Je=(Xe=Fe.target)==null?void 0:Xe.element)==null?void 0:Je.className)!=null&&vn.includes("line-numbers"))){let li=Fe.target.position.lineNumber;if(Zn(Ti.getLineContent(li),li))return;He(li)?qt(li):Pe(li)}}),Jt=Fe=>{let Xe={range:new Be.Range(Fe,1,Fe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Pn.current=oi.deltaDecorations(Pn.current,[Xe])},nn=()=>{Pn.current=oi.deltaDecorations(Pn.current,[])},cn=oi.onMouseMove(Fe=>{var Xe,Je,vn;if(nn(),Fe.target.detail&&((vn=(Je=(Xe=Fe.target)==null?void 0:Xe.element)==null?void 0:Je.className)!=null&&vn.includes("line-numbers"))){let li=Fe.target.position.lineNumber;if(Zn(Ti.getLineContent(li),li))return;Jt(li)}}),Ne=oi.onMouseLeave(()=>{nn()});return()=>{ae.dispose(),ze.dispose(),cn.dispose(),Ne.dispose()}}},[he.current,ri,Sn,Hn,Mn,pt]),(0,lt.useEffect)(()=>{var Vn;(Vn=he.current)!=null&&Vn.instance&&Mn&&he.current.instance.setPosition({lineNumber:0,column:0})},[Hn]);function Nn(){let Vn=he.current.instance;if(Vn){const oi=Vn.getSelection(),Ti=he.current.pastePos||{},Ci=new Be.Range(Ti.startLineNumber||oi.endLineNumber,Ti.startColumn||oi.endColumn,Ti.endLineNumber||oi.endLineNumber,Ti.endColumn||oi.endColumn);setTimeout(()=>{Vn.executeEdits("",[{range:Ci,text:""}])},300)}}function Ln(Vn){(window.navigator.platform.match("Mac")?Vn.metaKey:Vn.ctrlKey)&&Vn.keyCode==83&&(Vn.preventDefault(),ue())}const ii=()=>{if(re&&he.current.instance){const Vn=he.current.instance.getContentHeight();sr(Vn<bt?bt:Vn)}else sr(bt)};function Qn(Vn){var oi=document.createEvent("MouseEvents");oi.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Vn.dispatchEvent(oi)}const xi=Vn=>{if(!Ni.current)return;const{keyCode:oi,ctrlKey:Ti,metaKey:Ci,target:Rt,type:Pe}=Vn;return(Pe==="paste"||(oi===67||oi===86)&&(Ci||Ti))&&Rt.nodeName==="TEXTAREA"&&(xn(),Vn.preventDefault()),!1};function Xn(Vn,oi){var Ti=window.URL||window.webkitURL||window,Ci=new Blob([oi]),Rt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Rt.href=Ti.createObjectURL(Ci),Rt.download=Vn,Qn(Rt)}(0,lt.useEffect)(()=>{ii()},[ii]),(0,lt.useEffect)(()=>{An.current&&!ri&&Promise.all([dt.e(8909),dt.e(5977)]).then(dt.bind(dt,71448)).then(Vn=>{try{Be=Vn,he.current.instance=Be.editor.create(An.current,{value:gt,language:Ee(pt),theme:Et,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ze||!1}},vt);const oi=he.current.instance;let Rt=[...Xt.BH._menuItems].find(ae=>ae[0]._debugName=="EditorContext")[1],Pe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],qt=(ae,ze)=>{var Jt,nn;let cn=ae._first;do ze.includes((nn=(Jt=cn.element)==null?void 0:Jt.command)==null?void 0:nn.id)&&ae._remove(cn);while(cn=cn.next)};if(te(oi,Be),setTimeout(()=>{ii(),he.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Xn(Rn||"educoder.txt",oi.getValue())}})},500),he.current.subscription=oi.onDidChangeModelContent(ae=>{_n.current?clearTimeout(ci.current):(ii(),tn(oi.getValue(),ae)),ci.current=setTimeout(()=>{_n.current=!1},500)}),window.Monaco||ce(Be,Ee(pt)),Ce&&(qt(Rt,Pe),An.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",xi),window.removeEventListener("paste",xi),window.addEventListener("keydown",xi),window.addEventListener("paste",xi)),window.Monaco=Be,Zt&&oi.onDidBlurEditorWidget(()=>{Zt(oi.getValue())}),le&&oi.onDidFocusEditorText(()=>{Ce&&Cn(),le(oi.getValue())}),Ce){Cn();try{oi.onDidPaste(ae=>{const ze=oi.getSelection(),Jt=he.current.pastePos||{},nn=new Be.Range(Jt.startLineNumber||ze.endLineNumber,Jt.startColumn||ze.endColumn,Jt.endLineNumber||ze.endLineNumber,Jt.endColumn||ze.endColumn);oi.executeEdits("",[{range:ae.range,text:""}])})}catch(ae){}}let He=Tn();return ye&&typeof ye=="string"&&new se(ye,oi,Be),yt(!0),()=>{const ae=he.current.instance;ae.dispose();const ze=ae.getModel();ze&&ze.dispose(),he.current.subscription&&he.current.subscription.dispose(),He.unobserve(An.current)}}catch(oi){}})},[]),(0,lt.useEffect)(()=>{if(he.current.instance&&ri)return document.addEventListener("keydown",Ln,!1),()=>{document.removeEventListener("keydown",Ln)}},[ue,ri]),(0,lt.useEffect)(()=>{let Vn=he.current.instance;if(Vn&&ri){let oi=Ee(pt);Be.editor.setModelLanguage(Vn.getModel(),oi)}},[pt,ri]),(0,lt.useEffect)(()=>{he.current.instance&&ri&&Be.editor.setTheme(Et)},[Et,ri]),(0,lt.useEffect)(()=>{let Vn=he.current.instance;Ke.current=Pt,Vn&&ri&&(Vn.updateOptions(Ue({},Pt)),setTimeout(()=>{Vn.getModel().updateOptions(Ue({},Pt))},200))},[JSON.stringify(Pt),ri]),(0,lt.useEffect)(()=>{let Vn=he.current.instance;Vn&&ri&&Vn.layout()},[ln,bt,ri]);const[$n,Hi]=(0,lt.useState)(Ye(ln)),[Bi,sr]=(0,lt.useState)(Ye(bt)),Jn=On(Ue({},Ct),{width:$n,height:Bi,position:"relative"});return lt.createElement("div",{className:"my-monaco-editor",ref:An,style:Jn,onFocus:()=>{Ce&&Cn()}},Ve&<.createElement(Le.CopyToClipboard,{text:gt,onCopy:()=>ve.ZP.success("\u590D\u5236\u6210\u529F")},lt.createElement(Qt.Z,{title:"\u590D\u5236\u4EE3\u7801"},lt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},lt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function gn({width:ke="100%",height:Dn="100%",original:ln,modified:bt,language:gt,options:pt={}}){const Ct=(0,lt.useRef)(),[Pt,vt]=(0,lt.useState)(null);function Et(re){let Ce;return Ct.current&&(Ce=new Dt.Z(Te=>{for(let tn of Te)(tn.target.offsetHeight>0||tn.target.offsetWidth>0)&&re.layout()}),Ce.observe(Ct.current)),Ce}(0,lt.useEffect)(()=>(Ct.current&&Promise.all([dt.e(8909),dt.e(9404)]).then(dt.bind(dt,2550)).then(re=>{Be=re;const Ce=Be.editor.createDiffEditor(Ct.current,On(Ue({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},pt),{wordWrap:!0}));vt(Ce);let Te=Et(Ce);return()=>{Ce.dispose();const tn=Ce.getModel();tn&&tn.dispose(),Te.unobserve(Ct.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,lt.useEffect)(()=>{Pt&&Pt.setModel({original:Be.editor.createModel(ln,gt),modified:Be.editor.createModel(bt,gt)})},[ln,bt,gt,Pt]);const Zt=Ye(ke),Ve=Ye(Dn),ue={width:Zt,height:Ve};return lt.createElement("div",{className:"my-diff-editor",ref:Ct,style:ue})}},54077:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Oe}});var lt={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",wrapisCurrent:"wrapisCurrent___qIfQT",tagsDom:"tagsDom___COQg7",hiddenbq:"hiddenbq___TqlUF"},Dt=dt(29787),It=dt(25399),xe=dt(89787),_t=dt(92310),Gt=dt.n(_t),Vt=dt(76406),me=dt(90736),Yt=dt(59301),Oe=({className:jt,dataSource:Me=[],col:ce=4,right:ee,bottom:Kt=23,precision:Ht=0,wrapWidth:de=1200,trackEventItems:Ae,loading:je,onRemove:se=()=>{},isCurrent:Xt=!0,showProgress:ve=!1,showAlias:Qt=!1,category:Se="notDisplay",hiddenClick:be=()=>{}})=>{const Le=Math.floor((de-(ce-1)*ee)/ce),en=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png",ptclass:"sprite-70",swclass:"sprite-68"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png",ptclass:"sprite-60",swclass:"sprite-65"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png",ptclass:"sprite-58",swclass:"sprite-63"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png",ptclass:"sprite-62",swclass:"sprite-67"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png",ptclass:"sprite-61",swclass:"sprite-66"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png",ptclass:"sprite-59",swclass:"sprite-64"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png",ptclass:"sprite-71",swclass:"sprite-69"}];return Yt.createElement(Dt.Z,{spinning:je},Yt.createElement("div",{className:Gt()(lt.list,jt)},!!(Me!=null&&Me.length)&&(Me==null?void 0:Me.map((ie,Re)=>{var De,Tt,rn,we,Ue,On,zt;const{name:kt,id:Ye,identifier:wn,featured:on,school_name:$t,image_url:Ee,excellent:Be,is_plan:Cn}=ie;return Yt.createElement("div",{key:Ye,className:Xt&&ve?lt.wrapisCurrent:lt.wrap,style:{width:Le,marginRight:(1+Re)%ce===0?0:ee+Ht,marginBottom:Kt}},Yt.createElement("a",{className:lt.li,onClick:Ie=>{Ie.preventDefault(),Ie.stopPropagation(),Ae&&(0,Vt.L9)([Ae]),(0,Vt.xg)(`/paths/${wn}`)}},Yt.createElement("div",{className:lt.img},Yt.createElement("img",{className:lt.cover,src:`${Ee}`}),(De=ie==null?void 0:ie.subject_tags)==null?void 0:De.map((Ie,gn)=>{var ke,Dn;if(gn===0){const bt=(ke=en.find(gt=>gt.name==Ie))==null?void 0:ke.swclass;return Yt.createElement("span",{className:`sprite ${bt} ${lt.sign}`,style:{left:"-4px"}})}const ln=(Dn=en.find(bt=>bt.name==Ie))==null?void 0:Dn.ptclass;return Yt.createElement("span",{className:`sprite ${ln} ${lt.sign}`,style:{left:`${48+52*(gn-1)+2*gn}px`}})}),Yt.createElement("div",{className:lt.tagsDom},Yt.createElement("div",{className:"flex flex-wrap item-center",style:{gap:"0 6px"}},(ie==null?void 0:ie.excellent)&&Yt.createElement("div",{className:lt.bq},"\u5F00\u653E\u8BFE\u7A0B"),((Tt=ie==null?void 0:ie.custom_tags)==null?void 0:Tt.length)>0&&(ie==null?void 0:ie.custom_tags.map((Ie,gn)=>{var ke;return Yt.createElement(It.Z,{title:Ie==null?void 0:Ie.tag_name,key:gn},Yt.createElement("div",{className:"font12 rounded-2px c-white flex item-center",style:{height:22,padding:"0 6px",maxWidth:((ke=ie==null?void 0:ie.custom_tags)==null?void 0:ke.length)>2?"60px":"71px",background:"rgba(48, 97, 208, .6)",border:"1px solid #8FAFF8"}},Yt.createElement("span",{className:"multi-llipsis1e"},Ie==null?void 0:Ie.tag_name)))})))),Se=="hide"&&(ie==null?void 0:ie.studying)&&Xt&&Yt.createElement("div",{className:`${lt.movebq} user-path-items`,onClick:Ie=>{Ie.stopPropagation(),se(ie)}},Yt.createElement("i",{className:"iconfont icon-yichu1 font12"}),Yt.createElement("span",null,"\u79FB\u9664")),!["notDisplay","collect","payed"].includes(Se)&&Xt&&Yt.createElement("div",{className:`${lt.hiddenbq} user-path-items`,onClick:Ie=>{Ie.stopPropagation(),be(ie)}},Yt.createElement("i",{className:`iconfont ${Se=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),Yt.createElement("span",null,Se=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF"))),Yt.createElement("div",{className:lt.name},Yt.createElement(It.Z,{title:Qt&&(ie!=null&&ie.excellent_alias_name)?Yt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${kt}`,Yt.createElement("br",null),Yt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ie==null?void 0:ie.excellent_alias_name}`)):kt},Yt.createElement("span",{className:lt.e},Qt&&(ie==null?void 0:ie.excellent_alias_name)||kt))),Xt&&ve&&((rn=ie==null?void 0:ie.progress)==null?void 0:rn.all_score)!=0&&Yt.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},Yt.createElement(xe.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((we=ie==null?void 0:ie.progress)==null?void 0:we.my_score)/((Ue=ie==null?void 0:ie.progress)==null?void 0:Ue.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(On=ie==null?void 0:ie.progress)==null?void 0:On.my_score,"/",(zt=ie==null?void 0:ie.progress)==null?void 0:zt.all_score),(!Xt||!ve)&&Yt.createElement(It.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${$t}`},Yt.createElement("div",{className:lt.unit},Yt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),$t)),(!Xt||!ve)&&Yt.createElement("div",{className:lt.tags},Yt.createElement("div",null,Yt.createElement(It.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Yt.createElement("span",null,ie.stages_count))),Yt.createElement(It.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Yt.createElement("span",null,ie.members_count)))))))})),!Me.length&&Yt.createElement(me.Z,null)))}},70467:function(Yn,qe,dt){"use strict";dt.d(qe,{jL:function(){return xe},w9:function(){return kt},QD:function(){return Sn},cQ:function(){return Re.Z},op:function(){return Ce},O5:function(){return Tn},_b:function(){return ye},t7:function(){return Ht},Gi:function(){return Be},YG:function(){return $t},qp:function(){return Nt},vr:function(){return sn},qE:function(){return te},Je:function(){return je},wb:function(){return ie},cq:function(){return ln},tp:function(){return Me}});var lt=dt(59301),Dt={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"},xe=({dataSource:xn=[],img:Bn,imgWidth:Zn=346,title:Nn,sunTitle:Ln,bannerExtraContent:ii})=>lt.createElement("div",{className:Dt.banner},lt.createElement("div",{className:Dt.content},lt.createElement("aside",null,lt.createElement("p",null,lt.createElement("b",null,Nn),lt.createElement("span",null,Ln)),xn.length>0&<.createElement("div",{className:Dt.btns},xn.map((Qn,xi)=>lt.createElement("div",{key:xi,onClick:Qn.click},Qn.name,Qn.sign?lt.createElement("span",{className:"sprite sprite-33"}):null))),ii),Bn&<.createElement("img",{style:{marginTop:33,marginRight:38},src:Bn,width:Zn}))),_t={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"},Gt=dt(92310),Vt=dt.n(Gt),me=dt(78267),Nt=({dataSource:xn=[],value:Bn,onChange:Zn,onTitleChange:Nn,className:Ln,title:ii,titleWidth:Qn=41,style:xi={},fontColor:Xn="#6A7283",showCount:$n})=>{const[Hi,Bi]=(0,lt.useState)(1),[sr,Jn]=(0,lt.useState)(!1),Vn=(0,lt.useRef)(null),oi=(0,lt.useRef)(null);return(0,lt.useEffect)(()=>{var Ti;xn.length!==0&&(((Ti=Vn==null?void 0:Vn.current)==null?void 0:Ti.clientHeight)>97?Bi(1):Bi(0)),xn.length===0&&Bi(0),Jn(!1)},[xn]),lt.createElement("div",{className:Vt()(_t.row,Ln,"fadeIn","animated"),style:xi},lt.createElement("div",{onClick:(0,me.throttle)(()=>Nn==null?void 0:Nn(),2e3),style:{width:Qn,marginTop:sr?12:4},className:`${_t.title} ${Nn?"current":""}`},ii),lt.createElement("div",{className:sr?`${_t.tagsWrap} ${_t.tagsBorderWrap}`:_t.tagsWrap},lt.createElement("div",{className:_t.bar,ref:oi,style:Hi>0?{height:Hi===1?97:"auto",overflow:Hi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},lt.createElement("div",{className:_t.tag,ref:Vn},xn==null?void 0:xn.map(Ti=>lt.createElement("span",{onClick:()=>Zn(Ti.id),key:Ti.id,style:{color:Xn},className:Bn===Ti.id?_t.active:""},lt.createElement("span",{title:Ti.name,className:_t.name},Ti.name),!!$n&<.createElement("span",{className:_t.num},Ti.count))))),!!Hi&<.createElement(lt.Fragment,null,Hi===1?lt.createElement("div",{onClick:()=>{var Ti;Bi(2),((Ti=Vn==null?void 0:Vn.current)==null?void 0:Ti.clientHeight)>245?Jn(!0):Jn(!1)},className:_t.action},"\u5C55\u5F00",lt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):lt.createElement("div",{onClick:()=>{oi.current.scrollTop=0,Bi(1),Jn(!1)},className:_t.action},"\u6536\u8D77",lt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Oe={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"},Me=({dataSource:xn=[],value:Bn,onChange:Zn,className:Nn,style:Ln={}})=>lt.createElement("div",{style:Ln,className:Vt()(Oe.tabs,Nn)},xn.map(ii=>lt.createElement("span",{onClick:()=>Zn(ii.id),className:Bn===ii.id?Oe.active:"",key:ii.id},ii.name))),ce={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=dt(37568),Ht=({dataSource:xn=[],value:Bn="",onChange:Zn,onInputChange:Nn=()=>{},className:Ln,style:ii={},placeholder:Qn,allowClear:xi=!1})=>{var Xn;const[$n,Hi]=(0,lt.useState)(""),[Bi,sr]=(0,lt.useState)("");(0,lt.useEffect)(()=>{var oi;let Ti=Bn;(oi=JSON.stringify(Bn))!=null&&oi.includes("{")&&(Hi(Bn.id),Ti=Bn.value||"");try{sr(decodeURIComponent(Ti||""))}catch(Ci){sr(decodeURIComponent(Ti||""))}},[Bn]);const Jn=()=>{Zn(encodeURIComponent(Bi),$n||null)},Vn=oi=>{oi!==$n&&(Hi(oi),Zn(encodeURIComponent(Bi),oi))};return lt.createElement("div",{className:Vt()(ce.input,Ln),style:ii},!!xn.length&<.createElement("div",{className:ce.dropdown},lt.createElement("div",{className:ce.text},(Xn=xn.find(oi=>oi.id===$n))==null?void 0:Xn.name,lt.createElement("i",{className:"iconfont icon-zhankai4"}),lt.createElement("b",{className:ce.b1}),lt.createElement("b",{className:ce.b2})),lt.createElement("div",{className:ce.menu},xn.map((oi,Ti)=>lt.createElement("div",{key:Ti,onClick:()=>Vn(oi.id)},oi.name)))),lt.createElement(ee.default,{onPressEnter:Jn,value:Bi,onChange:oi=>{sr(oi.target.value),Nn(encodeURIComponent(oi.target.value),$n||null)},placeholder:Qn,variant:"borderless",allowClear:xi,onClear:()=>Zn("",$n||null)}),lt.createElement("i",{onClick:Jn,className:"iconfont icon-sousuo9 font14 current"}))},de={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},je=({value:xn,onChange:Bn,className:Zn,total:Nn,pageSize:Ln,style:ii={}})=>{const Qn=xn<2,xi=xn>=Math.ceil(Nn/Ln);return Nn<=Ln?lt.createElement(lt.Fragment,null):lt.createElement("div",{className:Vt()(de.quickPager,Zn),style:ii},lt.createElement("div",{onClick:()=>{Qn||Bn(xn-1,"prev")},className:Qn?de.disabled:""},"\u4E0A\u4E00\u9875"),lt.createElement("div",{onClick:()=>{xi||Bn(xn+1,"next")},className:xi?de.disabled:""},"\u4E0B\u4E00\u9875"))},se={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"},Xt=dt(29787),ve=dt(25399),Qt=dt(63139),Se=dt(14185),be=dt(76406),Le=dt(90736),ie=({className:xn,dataSource:Bn=[],col:Zn=4,right:Nn,bottom:Ln=23,precision:ii=0,wrapWidth:Qn=1200,trackEventItems:xi,loading:Xn})=>{const $n=Math.floor((Qn-(Zn-1)*Nn)/Zn);return lt.createElement(Xt.Z,{spinning:Xn},lt.createElement("div",{className:Vt()(se.list,xn)},!!Bn.length&&Bn.map((Hi,Bi)=>{const{name:sr,id:Jn,identifier:Vn,power:oi,cover_image_id:Ti,pic:Ci}=Hi;return lt.createElement("div",{className:se.wrap,key:Jn,style:{width:$n,marginRight:(1+Bi)%Zn===0?0:Nn+ii,marginBottom:Ln}},lt.createElement("a",{target:"_blank",href:`/shixuns/${Vn}/challenges`,className:se.li,onClick:Rt=>{Rt.preventDefault(),xi&&(0,be.L9)([xi]),oi&&(0,be.xg)(`/shixuns/${Vn}/challenges`)}},lt.createElement("div",{className:se.img},lt.createElement("img",{className:se.cover,src:`${Ci}`}),Hi.is_jupyter&<.createElement("span",{className:`sprite sprite-43 ${se.sign}`}),Hi.is_jupyter_lab&<.createElement("span",{className:`sprite sprite-42 ${se.sign}`}),Hi.is_unity_3d&<.createElement("span",{className:`sprite sprite-44 ${se.sign}`})),lt.createElement("div",{className:se.name},lt.createElement(ve.Z,{title:sr||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},lt.createElement("span",{className:se.e},sr||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),lt.createElement("div",{className:se.tags},lt.createElement(ve.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},lt.createElement("span",null,lt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),lt.createElement("span",null,Hi.challenges_count))),!!Hi.myshixuns_count&<.createElement(ve.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},lt.createElement("span",null,lt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),lt.createElement("span",null,Hi.myshixuns_count))),lt.createElement(ve.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},lt.createElement("span",null,lt.createElement("span",null,Hi.level))),lt.createElement("div",{className:se.rate},lt.createElement(Qt.Z,{allowHalf:!0,disabled:!0,defaultValue:Hi.score_info}),lt.createElement("span",null,"\xA0",Hi.score_info?`${Hi.score_info}\u5206`:"5\u5206")))),!oi&<.createElement("div",{className:se.lockWrap},lt.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),lt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Bn.length&<.createElement(Le.Z,null)))},Re=dt(54077),De={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",hidden:"hidden___NniIi",wrap:"wrap___pKgcW",btnsTop:"btnsTop___Lrm6T",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Tt=dt(62957),rn=dt(96599),we="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",Ue=dt(59301),On=(xn,Bn,Zn)=>new Promise((Nn,Ln)=>{var ii=Xn=>{try{xi(Zn.next(Xn))}catch($n){Ln($n)}},Qn=Xn=>{try{xi(Zn.throw(Xn))}catch($n){Ln($n)}},xi=Xn=>Xn.done?Nn(Xn.value):Promise.resolve(Xn.value).then(ii,Qn);xi((Zn=Zn.apply(xn,Bn)).next())}),kt=({className:xn,dataSource:Bn=[],col:Zn=4,right:Nn,bottom:Ln=23,precision:ii=0,wrapWidth:Qn=1200,trackEventItems:xi,loading:Xn,category:$n,hiddenClick:Hi,handleVery:Bi=()=>!0,isCurrent:sr})=>{const[Jn,Vn]=Tt.default.useModal(),oi=Math.floor((Qn-(Zn-1)*Nn)/Zn),Ti=Ci=>On(void 0,null,function*(){Jn.confirm({title:"\u7F6E\u9876",width:500,content:Ue.createElement("div",null,"\u60A8\u786E\u5B9A\u8981\u5C06",Ue.createElement("span",{className:"c-blue"},"\u201C",Ci.name,"\u201D"),"\u8BFE\u5802\u7F6E\u9876\u5417\uFF1F"),okText:"\u786E\u8BA4\u7F6E\u9876",centered:!0,cancelText:"\u53D6\u6D88"})});return Ue.createElement(Xt.Z,{spinning:Xn},Vn,Ue.createElement("div",{className:Vt()(De.list,xn)},!!Bn.length&&Bn.map((Ci,Rt)=>{const{subject_identifier:Pe,id:qt,identifier:He,power:ae}=Ci,ze=Ci.is_public!=0&&Ci.is_public;return Ue.createElement("div",{className:De.wrap,key:qt,style:{width:oi,marginRight:(1+Rt)%Zn===0?0:Nn+ii,marginBottom:Ln}},Ci.homepage_show&&Ue.createElement("div",{className:De.btnsTop},Ue.createElement(rn.default,{color:"red"},"\u7F6E\u9876")),Ue.createElement("a",{className:De.li,onClick:Jt=>{Jt.preventDefault(),Bi(Ci==null?void 0:Ci.first_category_url)&&(xi&&(0,be.L9)([xi]),(0,be.xg)(Ci.first_category_url))}},Ue.createElement("div",{className:De.top},Ue.createElement(ve.Z,{title:Ci.name},Ue.createElement("div",{className:De.name},Ci.name)),Ue.createElement("img",{className:De.img,src:Se.Z.IMG_SERVER+"/images/"+Ci.avatar_url}),Ue.createElement("div",{className:De.text,title:Ci.creator},Ci.creator),Pe&&Ue.createElement("div",{className:De.btns},Ue.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Ue.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),ze&&Ue.createElement("div",{className:De.sign},"\u516C\u5F00"),sr&&Ue.createElement("div",{className:De.hidden,onClick:Jt=>{Jt.stopPropagation(),Hi(Ci)}},Ue.createElement("i",{className:`iconfont ${$n=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),$n=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")),Ue.createElement("div",{className:De.bottom},Ci.visits>0&&Ue.createElement(ve.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Ue.createElement("span",null,Ue.createElement("i",{className:"iconfont icon-liulanyan"}),Ue.createElement("span",null,Ci.visits))),Ci.course_members_count>0&&Ue.createElement(ve.Z,{title:"\u6210\u5458",placement:"bottom"},Ue.createElement("span",null,Ue.createElement("i",{className:"iconfont icon-chengyuan"}),Ci.course_members_count)),Ci.tasks_count>0&&Ue.createElement(ve.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Ue.createElement("span",null,Ue.createElement("i",{className:"iconfont icon-zuoye"}),Ci.tasks_count)),Ci.is_end?Ue.createElement("div",{style:{color:"#6B758B"}}):Ue.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Ci.is_accessible&&Ue.createElement("div",{className:De.lockWrap},Ue.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ue.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Bn.length&&Ue.createElement(Le.Z,null)))},Ye={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"},wn=dt(44283),$t=({dataSource:xn=[],value:Bn,onChange:Zn,className:Nn,style:Ln={},tabBarExtraContent:ii})=>lt.createElement("div",{className:Vt()(Ye.tabs,Nn),style:Ln},lt.createElement("div",{className:Ye.tabsWrap},xn.map((Qn,xi)=>!(Qn!=null&&Qn.hide)&<.createElement("aside",{className:Ye.tab,onClick:()=>{Zn(Qn.id),Qn.link&&wn.history.push(Qn.link)},key:xi},lt.createElement("div",{className:Bn===Qn.id?Ye.active:""},Qn.name),(Qn==null?void 0:Qn.resetCount)==null&&(Qn==null?void 0:Qn.total)!==void 0&<.createElement("span",null,"\uFF08",Qn==null?void 0:Qn.total,"\uFF09"),(Qn==null?void 0:Qn.resetCount)!==void 0&&(Qn==null?void 0:Qn.total)!==void 0&<.createElement(ve.Z,{title:(Qn==null?void 0:Qn.tip)!=null?Qn==null?void 0:Qn.tip:""},lt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",lt.createElement("span",{style:{color:"#000"}},Qn==null?void 0:Qn.resetCount),"/",lt.createElement("span",null,Qn==null?void 0:Qn.total),"\uFF09"))))),lt.createElement("div",{className:Ye.tabBar},ii)),Be=({className:xn,style:Bn={},children:Zn})=>lt.createElement("div",{className:Vt()(xn),style:Bn},Zn),Cn={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"},Ie=dt(75727),gn=dt(93041);const ke=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ln=({sortValue:xn,dropValue:Bn,className:Zn,onSort:Nn,onDrop:Ln,dataSource:ii=ke})=>{var Qn;return lt.createElement("div",{className:Vt()(Cn.orderWrap,Zn)},lt.createElement(Ie.Z,{dropdownRender:()=>lt.createElement(gn.default,null,ii.map((xi,Xn)=>lt.createElement(gn.default.Item,{key:Xn,onClick:()=>Ln(xi.id)},xi.name)))},lt.createElement("span",{className:Cn.orderTextWrap},(Qn=ii.find(xi=>Bn===xi.id))==null?void 0:Qn.name)),lt.createElement("span",{className:Cn.orderIconWrap},lt.createElement("span",{className:Cn.orderAsc},lt.createElement("i",{className:xn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Cn.cursorPointer} ${Cn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Cn.cursorPointer}`,onClick:()=>Nn(xn==="asc"?"desc":"asc")})),lt.createElement("span",{className:Cn.orderDesc},lt.createElement("i",{className:xn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Cn.cursorPointer} ${Cn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Cn.cursorPointer}`,onClick:()=>Nn(xn==="asc"?"desc":"asc")}))))},bt={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"},gt=dt(7939),pt=Object.defineProperty,Ct=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Et=(xn,Bn,Zn)=>Bn in xn?pt(xn,Bn,{enumerable:!0,configurable:!0,writable:!0,value:Zn}):xn[Bn]=Zn,Zt=(xn,Bn)=>{for(var Zn in Bn||(Bn={}))Pt.call(Bn,Zn)&&Et(xn,Zn,Bn[Zn]);if(Ct)for(var Zn of Ct(Bn))vt.call(Bn,Zn)&&Et(xn,Zn,Bn[Zn]);return xn},Ve=(xn,Bn)=>{var Zn={};for(var Nn in xn)Pt.call(xn,Nn)&&Bn.indexOf(Nn)<0&&(Zn[Nn]=xn[Nn]);if(xn!=null&&Ct)for(var Nn of Ct(xn))Bn.indexOf(Nn)<0&&vt.call(xn,Nn)&&(Zn[Nn]=xn[Nn]);return Zn},ue=(xn,Bn,Zn)=>new Promise((Nn,Ln)=>{var ii=Xn=>{try{xi(Zn.next(Xn))}catch($n){Ln($n)}},Qn=Xn=>{try{xi(Zn.throw(Xn))}catch($n){Ln($n)}},xi=Xn=>Xn.done?Nn(Xn.value):Promise.resolve(Xn.value).then(ii,Qn);xi((Zn=Zn.apply(xn,Bn)).next())}),Ce=xn=>{var Bn=xn,{className:Zn,style:Nn,children:Ln,loading:ii=!1,openLoading:Qn,onClick:xi=()=>{},size:Xn="middle",shape:$n="round"}=Bn,Hi=Ve(Bn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Bi,sr]=(0,lt.useState)(!1);return lt.createElement(gt.ZP,Zt({onClick:(0,me.throttle)(Jn=>ue(void 0,null,function*(){Qn&&sr(!0);try{yield xi(Jn)}catch(Vn){console.log("error",Vn)}Qn&&sr(!1)}),2e3,{leading:!0,trailing:!1}),className:Vt()(bt.btn,bt[`${Xn}-${$n}`],Zn),style:Nn,size:Xn,shape:$n,loading:Bi||ii},Hi),Ln)},Te={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"},te=({className:xn,style:Bn,children:Zn=null,onClick:Nn,title:Ln})=>lt.createElement("div",{className:Vt()(Te.head,xn),style:Bn},lt.createElement("span",{className:"primary-hover",onClick:Nn},lt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),lt.createElement("b",{title:Ln},Ln),lt.createElement("div",{className:Te.node},Zn)),le={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"},Sn=({confirmShow:xn=!0,confirmTitle:Bn,confirmClick:Zn,cancelShow:Nn=!0,cancelTitle:Ln,cancelClick:ii,className:Qn,style:xi,confirmLoading:Xn=!1})=>lt.createElement("div",{className:Vt()(le.btns,Qn),style:xi},xn&<.createElement(gt.ZP,{loading:Xn,onClick:Zn,type:"primary",className:le.confirm},Bn),Nn&<.createElement(gt.ZP,{onClick:ii,className:le.cancel},Ln)),Rn={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"},sn=({className:xn,style:Bn={},LeftContent:Zn,children:Nn,RightContent:Ln})=>lt.createElement("div",{className:Vt()(Rn.fixedBottom,xn),style:Bn},lt.createElement("div",{className:Rn.wrap},lt.createElement("div",{className:Rn.left},Zn),lt.createElement("div",{className:Rn.center},Nn),lt.createElement("div",{className:Rn.right},Ln))),Hn={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"},ye=({className:xn,style:Bn={},dataSource:Zn=[]})=>lt.createElement("div",{className:Vt()(Hn.crumbs,xn),style:Bn},Zn.map((Nn,Ln)=>Ln<Zn.length-1?lt.createElement(lt.Fragment,{key:Ln},Nn.path||Nn.onClick?lt.createElement("span",{className:Hn.hover,onClick:Nn!=null&&Nn.onClick?Nn.onClick:()=>wn.history.push(Nn.path)},Nn.name):lt.createElement("span",null,Nn.name),lt.createElement("span",null,"\xA0",">","\xA0")):lt.createElement("span",{key:Ln,style:{color:"#5F6368"}},Nn.name))),Ze=dt(11938),En=Object.defineProperty,An=Object.defineProperties,he=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,_n=(xn,Bn,Zn)=>Bn in xn?En(xn,Bn,{enumerable:!0,configurable:!0,writable:!0,value:Zn}):xn[Bn]=Zn,ci=(xn,Bn)=>{for(var Zn in Bn||(Bn={}))hn.call(Bn,Zn)&&_n(xn,Zn,Bn[Zn]);if(Ke)for(var Zn of Ke(Bn))Pn.call(Bn,Zn)&&_n(xn,Zn,Bn[Zn]);return xn},yi=(xn,Bn)=>An(xn,he(Bn)),Ni=(xn,Bn)=>{var Zn={};for(var Nn in xn)hn.call(xn,Nn)&&Bn.indexOf(Nn)<0&&(Zn[Nn]=xn[Nn]);if(xn!=null&&Ke)for(var Nn of Ke(xn))Bn.indexOf(Nn)<0&&Pn.call(xn,Nn)&&(Zn[Nn]=xn[Nn]);return Zn};const{Countdown:ri}=Ze.default;var Tn=xn=>{var Bn=xn,{onChange:Zn}=Bn,Nn=Ni(Bn,["onChange"]);const[Ln,ii]=(0,lt.useState)(null);(0,lt.useEffect)(()=>{typeof Ln=="number"&&Ln>=0&&Zn(Ln)},[Ln]);const Qn=xi=>{const Xn=Math.floor(xi/1e3);ii(Xn)};return lt.createElement(ri,yi(ci({},Nn),{onChange:Qn}))}},79006:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Dt}});var lt=dt(59301);function Dt(It,xe){const _t=(0,lt.useRef)();(0,lt.useEffect)(()=>{_t.current=It}),(0,lt.useEffect)(()=>{function Gt(){_t.current()}if(xe!==null){let Vt=setInterval(Gt,xe);return()=>clearInterval(Vt)}},[xe])}},86275:function(Yn,qe,dt){"use strict";dt.r(qe),dt.d(qe,{default:function(){return Ii}});var lt=dt(59301),Dt=dt(44283),It=dt(28284),xe=dt(62957),_t=dt(77019),Gt=dt(29787),Vt=dt(6767),me=dt(62673),Yt={flex_box_center:"flex_box_center___JKPl3",flex_space_between:"flex_space_between___QuVBb",flex_box_vertical_center:"flex_box_vertical_center___Ksaxh",flex_box_center_end:"flex_box_center_end___nIhjx",flex_box_column:"flex_box_column___NAJ16",wrap:"wrap___NZWPs",content:"content___OLcvS",name:"name____Thh2",list:"list___F7fxl",head:"head___ffJpn",models:"models___kudCc",btns:"btns___CQDPq",rowsHead:"rowsHead___oC1SU",time:"time___r7Qed",rowsBody:"rowsBody___ZNF9c"},Nt=dt(49317),Oe=dt(70467),jt=dt(39116),Me=dt(35883),ce=dt(39967),ee=dt(15267),Kt=dt(76406),Ht=dt(7939),de=dt(25399),Ae=dt(75727),je=dt(82326),se=dt(37568),Xt=dt(18287),ve=dt(5269),Qt=dt(94968),Se=dt(26906),be=dt(92310),Le=dt.n(be),en=dt(29301),ie=dt(8654),Re=dt(47999),De=dt(48755),Tt=dt(83397),rn=dt(31756),we=dt(13783),On=lt.createContext({}),zt=dt(36237),kt=dt(63356),Ye=dt(16931),wn=dt(51636);const on=an=>{const{antCls:Qe,componentCls:We,iconCls:mn,avatarBg:fn,avatarColor:Wn,containerSize:$e,containerSizeLG:Si,containerSizeSM:pn,textFontSize:wi,textFontSizeLG:Wi,textFontSizeSM:Ui,borderRadius:Vi,borderRadiusLG:Ki,borderRadiusSM:Oi,lineWidth:qi,lineType:fr}=an,tr=(ai,Lt,ur)=>({width:ai,height:ai,borderRadius:"50%",[`&${We}-square`]:{borderRadius:ur},[`&${We}-icon`]:{fontSize:Lt,[`> ${mn}`]:{margin:0}}});return{[We]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,kt.Wf)(an)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:Wn,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:fn,border:`${(0,zt.unit)(qi)} ${fr} transparent`,"&-image":{background:"transparent"},[`${Qe}-image-img`]:{display:"block"}}),tr($e,wi,Vi)),{"&-lg":Object.assign({},tr(Si,Wi,Ki)),"&-sm":Object.assign({},tr(pn,Ui,Oi)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},$t=an=>{const{componentCls:Qe,groupBorderColor:We,groupOverlapping:mn,groupSpace:fn}=an;return{[`${Qe}-group`]:{display:"inline-flex",[Qe]:{borderColor:We},"> *:not(:first-child)":{marginInlineStart:mn}},[`${Qe}-group-popover`]:{[`${Qe} + ${Qe}`]:{marginInlineStart:fn}}}},Ee=an=>{const{controlHeight:Qe,controlHeightLG:We,controlHeightSM:mn,fontSize:fn,fontSizeLG:Wn,fontSizeXL:$e,fontSizeHeading3:Si,marginXS:pn,marginXXS:wi,colorBorderBg:Wi}=an;return{containerSize:Qe,containerSizeLG:We,containerSizeSM:mn,textFontSize:Math.round((Wn+$e)/2),textFontSizeLG:Si,textFontSizeSM:fn,groupSpace:wi,groupOverlapping:-pn,groupBorderColor:Wi}};var Be=(0,Ye.I$)("Avatar",an=>{const{colorTextLightSolid:Qe,colorTextPlaceholder:We}=an,mn=(0,wn.mergeToken)(an,{avatarBg:We,avatarColor:Qe});return[on(mn),$t(mn)]},Ee),Cn=function(an,Qe){var We={};for(var mn in an)Object.prototype.hasOwnProperty.call(an,mn)&&Qe.indexOf(mn)<0&&(We[mn]=an[mn]);if(an!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,mn=Object.getOwnPropertySymbols(an);fn<mn.length;fn++)Qe.indexOf(mn[fn])<0&&Object.prototype.propertyIsEnumerable.call(an,mn[fn])&&(We[mn[fn]]=an[mn[fn]]);return We},gn=lt.forwardRef((an,Qe)=>{const{prefixCls:We,shape:mn,size:fn,src:Wn,srcSet:$e,icon:Si,className:pn,rootClassName:wi,style:Wi,alt:Ui,draggable:Vi,children:Ki,crossOrigin:Oi,gap:qi=4,onError:fr}=an,tr=Cn(an,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[ai,Lt]=lt.useState(1),[ur,Qi]=lt.useState(!1),[Yi,nr]=lt.useState(!0),_i=lt.useRef(null),ui=lt.useRef(null),Ei=(0,ie.sQ)(Qe,_i),{getPrefixCls:Mi,avatar:Gn}=lt.useContext(De.E_),gi=lt.useContext(On),Li=()=>{if(!ui.current||!_i.current)return;const ho=ui.current.offsetWidth,to=_i.current.offsetWidth;ho!==0&&to!==0&&qi*2<to&&Lt(to-qi*2<ho?(to-qi*2)/ho:1)};lt.useEffect(()=>{Qi(!0)},[]),lt.useEffect(()=>{nr(!0),Lt(1)},[Wn]),lt.useEffect(Li,[qi]);const pi=()=>{(fr==null?void 0:fr())!==!1&&nr(!1)},ni=(0,rn.Z)(ho=>{var to,wr;return(wr=(to=fn!=null?fn:gi==null?void 0:gi.size)!==null&&to!==void 0?to:ho)!==null&&wr!==void 0?wr:"default"}),kn=Object.keys(typeof ni=="object"?ni||{}:{}).some(ho=>["xs","sm","md","lg","xl","xxl"].includes(ho)),ji=(0,we.Z)(kn),br=lt.useMemo(()=>{if(typeof ni!="object")return{};const ho=Re.c4.find(wr=>ji[wr]),to=ni[ho];return to?{width:to,height:to,fontSize:to&&(Si||Ki)?to/2:18}:{}},[ji,ni]),Dr=Mi("avatar",We),Or=(0,Tt.Z)(Dr),[Vr,Gr,Ur]=Be(Dr,Or),ro=Le()({[`${Dr}-lg`]:ni==="large",[`${Dr}-sm`]:ni==="small"}),Kr=lt.isValidElement(Wn),uo=mn||(gi==null?void 0:gi.shape)||"circle",un=Le()(Dr,ro,Gn==null?void 0:Gn.className,`${Dr}-${uo}`,{[`${Dr}-image`]:Kr||Wn&&Yi,[`${Dr}-icon`]:!!Si},Ur,Or,pn,wi,Gr),So=typeof ni=="number"?{width:ni,height:ni,fontSize:Si?ni/2:18}:{};let Io;if(typeof Wn=="string"&&Yi)Io=lt.createElement("img",{src:Wn,draggable:Vi,srcSet:$e,onError:pi,alt:Ui,crossOrigin:Oi});else if(Kr)Io=Wn;else if(Si)Io=Si;else if(ur||ai!==1){const ho=`scale(${ai})`,to={msTransform:ho,WebkitTransform:ho,transform:ho};Io=lt.createElement(en.Z,{onResize:Li},lt.createElement("span",{className:`${Dr}-string`,ref:ui,style:Object.assign({},to)},Ki))}else Io=lt.createElement("span",{className:`${Dr}-string`,style:{opacity:0},ref:ui},Ki);return Vr(lt.createElement("span",Object.assign({},tr,{style:Object.assign(Object.assign(Object.assign(Object.assign({},So),br),Gn==null?void 0:Gn.style),Wi),className:un,ref:Ei}),Io))}),ke=dt(11592),Dn=dt(22703),ln=dt(37639);const bt=an=>{const{size:Qe,shape:We}=lt.useContext(On),mn=lt.useMemo(()=>({size:an.size||Qe,shape:an.shape||We}),[an.size,an.shape,Qe,We]);return lt.createElement(On.Provider,{value:mn},an.children)};var pt=an=>{var Qe,We,mn,fn;const{getPrefixCls:Wn,direction:$e}=lt.useContext(De.E_),{prefixCls:Si,className:pn,rootClassName:wi,style:Wi,maxCount:Ui,maxStyle:Vi,size:Ki,shape:Oi,maxPopoverPlacement:qi,maxPopoverTrigger:fr,children:tr,max:ai}=an,Lt=Wn("avatar",Si),ur=`${Lt}-group`,Qi=(0,Tt.Z)(Lt),[Yi,nr,_i]=Be(Lt,Qi),ui=Le()(ur,{[`${ur}-rtl`]:$e==="rtl"},_i,Qi,pn,wi,nr),Ei=(0,ke.Z)(tr).map((gi,Li)=>(0,Dn.Tm)(gi,{key:`avatar-key-${Li}`})),Mi=(ai==null?void 0:ai.count)||Ui,Gn=Ei.length;if(Mi&&Mi<Gn){const gi=Ei.slice(0,Mi),Li=Ei.slice(Mi,Gn),pi=(ai==null?void 0:ai.style)||Vi,ni=((Qe=ai==null?void 0:ai.popover)===null||Qe===void 0?void 0:Qe.trigger)||fr||"hover",kn=((We=ai==null?void 0:ai.popover)===null||We===void 0?void 0:We.placement)||qi||"top",ji=Object.assign(Object.assign({content:Li},ai==null?void 0:ai.popover),{classNames:{root:Le()(`${ur}-popover`,(fn=(mn=ai==null?void 0:ai.popover)===null||mn===void 0?void 0:mn.classNames)===null||fn===void 0?void 0:fn.root)},placement:kn,trigger:ni});return gi.push(lt.createElement(ln.Z,Object.assign({key:"avatar-popover-key",destroyTooltipOnHide:!0},ji),lt.createElement(gn,{style:pi},`+${Gn-Mi}`))),Yi(lt.createElement(bt,{shape:Oi,size:Ki},lt.createElement("div",{className:ui,style:Wi},gi)))}return Yi(lt.createElement(bt,{shape:Oi,size:Ki},lt.createElement("div",{className:ui,style:Wi},Ei)))};const Ct=gn;Ct.Group=pt;var Pt=Ct,vt=function(an,Qe){return vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(We,mn){We.__proto__=mn}||function(We,mn){for(var fn in mn)Object.prototype.hasOwnProperty.call(mn,fn)&&(We[fn]=mn[fn])},vt(an,Qe)};function Et(an,Qe){if(typeof Qe!="function"&&Qe!==null)throw new TypeError("Class extends value "+String(Qe)+" is not a constructor or null");vt(an,Qe);function We(){this.constructor=an}an.prototype=Qe===null?Object.create(Qe):(We.prototype=Qe.prototype,new We)}var Zt=function(){return Zt=Object.assign||function(Qe){for(var We,mn=1,fn=arguments.length;mn<fn;mn++){We=arguments[mn];for(var Wn in We)Object.prototype.hasOwnProperty.call(We,Wn)&&(Qe[Wn]=We[Wn])}return Qe},Zt.apply(this,arguments)};function Ve(an,Qe){var We={};for(var mn in an)Object.prototype.hasOwnProperty.call(an,mn)&&Qe.indexOf(mn)<0&&(We[mn]=an[mn]);if(an!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,mn=Object.getOwnPropertySymbols(an);fn<mn.length;fn++)Qe.indexOf(mn[fn])<0&&Object.prototype.propertyIsEnumerable.call(an,mn[fn])&&(We[mn[fn]]=an[mn[fn]]);return We}function ue(an,Qe,We,mn){var fn=arguments.length,Wn=fn<3?Qe:mn===null?mn=Object.getOwnPropertyDescriptor(Qe,We):mn,$e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Wn=Reflect.decorate(an,Qe,We,mn);else for(var Si=an.length-1;Si>=0;Si--)($e=an[Si])&&(Wn=(fn<3?$e(Wn):fn>3?$e(Qe,We,Wn):$e(Qe,We))||Wn);return fn>3&&Wn&&Object.defineProperty(Qe,We,Wn),Wn}function re(an,Qe){return function(We,mn){Qe(We,mn,an)}}function Ce(an,Qe,We,mn,fn,Wn){function $e(tr){if(tr!==void 0&&typeof tr!="function")throw new TypeError("Function expected");return tr}for(var Si=mn.kind,pn=Si==="getter"?"get":Si==="setter"?"set":"value",wi=!Qe&&an?mn.static?an:an.prototype:null,Wi=Qe||(wi?Object.getOwnPropertyDescriptor(wi,mn.name):{}),Ui,Vi=!1,Ki=We.length-1;Ki>=0;Ki--){var Oi={};for(var qi in mn)Oi[qi]=qi==="access"?{}:mn[qi];for(var qi in mn.access)Oi.access[qi]=mn.access[qi];Oi.addInitializer=function(tr){if(Vi)throw new TypeError("Cannot add initializers after decoration has completed");Wn.push($e(tr||null))};var fr=(0,We[Ki])(Si==="accessor"?{get:Wi.get,set:Wi.set}:Wi[pn],Oi);if(Si==="accessor"){if(fr===void 0)continue;if(fr===null||typeof fr!="object")throw new TypeError("Object expected");(Ui=$e(fr.get))&&(Wi.get=Ui),(Ui=$e(fr.set))&&(Wi.set=Ui),(Ui=$e(fr.init))&&fn.unshift(Ui)}else(Ui=$e(fr))&&(Si==="field"?fn.unshift(Ui):Wi[pn]=Ui)}wi&&Object.defineProperty(wi,mn.name,Wi),Vi=!0}function Te(an,Qe,We){for(var mn=arguments.length>2,fn=0;fn<Qe.length;fn++)We=mn?Qe[fn].call(an,We):Qe[fn].call(an);return mn?We:void 0}function tn(an){return typeof an=="symbol"?an:"".concat(an)}function te(an,Qe,We){return typeof Qe=="symbol"&&(Qe=Qe.description?"[".concat(Qe.description,"]"):""),Object.defineProperty(an,"name",{configurable:!0,value:We?"".concat(We," ",Qe):Qe})}function le(an,Qe){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(an,Qe)}function bn(an,Qe,We,mn){function fn(Wn){return Wn instanceof We?Wn:new We(function($e){$e(Wn)})}return new(We||(We=Promise))(function(Wn,$e){function Si(Wi){try{wi(mn.next(Wi))}catch(Ui){$e(Ui)}}function pn(Wi){try{wi(mn.throw(Wi))}catch(Ui){$e(Ui)}}function wi(Wi){Wi.done?Wn(Wi.value):fn(Wi.value).then(Si,pn)}wi((mn=mn.apply(an,Qe||[])).next())})}function Sn(an,Qe){var We={label:0,sent:function(){if(Wn[0]&1)throw Wn[1];return Wn[1]},trys:[],ops:[]},mn,fn,Wn,$e;return $e={next:Si(0),throw:Si(1),return:Si(2)},typeof Symbol=="function"&&($e[Symbol.iterator]=function(){return this}),$e;function Si(wi){return function(Wi){return pn([wi,Wi])}}function pn(wi){if(mn)throw new TypeError("Generator is already executing.");for(;$e&&($e=0,wi[0]&&(We=0)),We;)try{if(mn=1,fn&&(Wn=wi[0]&2?fn.return:wi[0]?fn.throw||((Wn=fn.return)&&Wn.call(fn),0):fn.next)&&!(Wn=Wn.call(fn,wi[1])).done)return Wn;switch(fn=0,Wn&&(wi=[wi[0]&2,Wn.value]),wi[0]){case 0:case 1:Wn=wi;break;case 4:return We.label++,{value:wi[1],done:!1};case 5:We.label++,fn=wi[1],wi=[0];continue;case 7:wi=We.ops.pop(),We.trys.pop();continue;default:if(Wn=We.trys,!(Wn=Wn.length>0&&Wn[Wn.length-1])&&(wi[0]===6||wi[0]===2)){We=0;continue}if(wi[0]===3&&(!Wn||wi[1]>Wn[0]&&wi[1]<Wn[3])){We.label=wi[1];break}if(wi[0]===6&&We.label<Wn[1]){We.label=Wn[1],Wn=wi;break}if(Wn&&We.label<Wn[2]){We.label=Wn[2],We.ops.push(wi);break}Wn[2]&&We.ops.pop(),We.trys.pop();continue}wi=Qe.call(an,We)}catch(Wi){wi=[6,Wi],fn=0}finally{mn=Wn=0}if(wi[0]&5)throw wi[1];return{value:wi[0]?wi[1]:void 0,done:!0}}}var Rn=Object.create?function(an,Qe,We,mn){mn===void 0&&(mn=We);var fn=Object.getOwnPropertyDescriptor(Qe,We);(!fn||("get"in fn?!Qe.__esModule:fn.writable||fn.configurable))&&(fn={enumerable:!0,get:function(){return Qe[We]}}),Object.defineProperty(an,mn,fn)}:function(an,Qe,We,mn){mn===void 0&&(mn=We),an[mn]=Qe[We]};function In(an,Qe){for(var We in an)We!=="default"&&!Object.prototype.hasOwnProperty.call(Qe,We)&&Rn(Qe,an,We)}function sn(an){var Qe=typeof Symbol=="function"&&Symbol.iterator,We=Qe&&an[Qe],mn=0;if(We)return We.call(an);if(an&&typeof an.length=="number")return{next:function(){return an&&mn>=an.length&&(an=void 0),{value:an&&an[mn++],done:!an}}};throw new TypeError(Qe?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hn(an,Qe){var We=typeof Symbol=="function"&&an[Symbol.iterator];if(!We)return an;var mn=We.call(an),fn,Wn=[],$e;try{for(;(Qe===void 0||Qe-- >0)&&!(fn=mn.next()).done;)Wn.push(fn.value)}catch(Si){$e={error:Si}}finally{try{fn&&!fn.done&&(We=mn.return)&&We.call(mn)}finally{if($e)throw $e.error}}return Wn}function Mn(){for(var an=[],Qe=0;Qe<arguments.length;Qe++)an=an.concat(Hn(arguments[Qe]));return an}function ye(){for(var an=0,Qe=0,We=arguments.length;Qe<We;Qe++)an+=arguments[Qe].length;for(var mn=Array(an),fn=0,Qe=0;Qe<We;Qe++)for(var Wn=arguments[Qe],$e=0,Si=Wn.length;$e<Si;$e++,fn++)mn[fn]=Wn[$e];return mn}function Ze(an,Qe,We){if(We||arguments.length===2)for(var mn=0,fn=Qe.length,Wn;mn<fn;mn++)(Wn||!(mn in Qe))&&(Wn||(Wn=Array.prototype.slice.call(Qe,0,mn)),Wn[mn]=Qe[mn]);return an.concat(Wn||Array.prototype.slice.call(Qe))}function En(an){return this instanceof En?(this.v=an,this):new En(an)}function An(an,Qe,We){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var mn=We.apply(an,Qe||[]),fn,Wn=[];return fn={},$e("next"),$e("throw"),$e("return"),fn[Symbol.asyncIterator]=function(){return this},fn;function $e(Vi){mn[Vi]&&(fn[Vi]=function(Ki){return new Promise(function(Oi,qi){Wn.push([Vi,Ki,Oi,qi])>1||Si(Vi,Ki)})})}function Si(Vi,Ki){try{pn(mn[Vi](Ki))}catch(Oi){Ui(Wn[0][3],Oi)}}function pn(Vi){Vi.value instanceof En?Promise.resolve(Vi.value.v).then(wi,Wi):Ui(Wn[0][2],Vi)}function wi(Vi){Si("next",Vi)}function Wi(Vi){Si("throw",Vi)}function Ui(Vi,Ki){Vi(Ki),Wn.shift(),Wn.length&&Si(Wn[0][0],Wn[0][1])}}function he(an){var Qe,We;return Qe={},mn("next"),mn("throw",function(fn){throw fn}),mn("return"),Qe[Symbol.iterator]=function(){return this},Qe;function mn(fn,Wn){Qe[fn]=an[fn]?function($e){return(We=!We)?{value:En(an[fn]($e)),done:!1}:Wn?Wn($e):$e}:Wn}}function Ke(an){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Qe=an[Symbol.asyncIterator],We;return Qe?Qe.call(an):(an=typeof sn=="function"?sn(an):an[Symbol.iterator](),We={},mn("next"),mn("throw"),mn("return"),We[Symbol.asyncIterator]=function(){return this},We);function mn(Wn){We[Wn]=an[Wn]&&function($e){return new Promise(function(Si,pn){$e=an[Wn]($e),fn(Si,pn,$e.done,$e.value)})}}function fn(Wn,$e,Si,pn){Promise.resolve(pn).then(function(wi){Wn({value:wi,done:Si})},$e)}}function hn(an,Qe){return Object.defineProperty?Object.defineProperty(an,"raw",{value:Qe}):an.raw=Qe,an}var Pn=Object.create?function(an,Qe){Object.defineProperty(an,"default",{enumerable:!0,value:Qe})}:function(an,Qe){an.default=Qe};function _n(an){if(an&&an.__esModule)return an;var Qe={};if(an!=null)for(var We in an)We!=="default"&&Object.prototype.hasOwnProperty.call(an,We)&&Rn(Qe,an,We);return Pn(Qe,an),Qe}function ci(an){return an&&an.__esModule?an:{default:an}}function yi(an,Qe,We,mn){if(We==="a"&&!mn)throw new TypeError("Private accessor was defined without a getter");if(typeof Qe=="function"?an!==Qe||!mn:!Qe.has(an))throw new TypeError("Cannot read private member from an object whose class did not declare it");return We==="m"?mn:We==="a"?mn.call(an):mn?mn.value:Qe.get(an)}function Ni(an,Qe,We,mn,fn){if(mn==="m")throw new TypeError("Private method is not writable");if(mn==="a"&&!fn)throw new TypeError("Private accessor was defined without a setter");if(typeof Qe=="function"?an!==Qe||!fn:!Qe.has(an))throw new TypeError("Cannot write private member to an object whose class did not declare it");return mn==="a"?fn.call(an,We):fn?fn.value=We:Qe.set(an,We),We}function ri(an,Qe){if(Qe===null||typeof Qe!="object"&&typeof Qe!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof an=="function"?Qe===an:an.has(Qe)}var yt={__extends:Et,__assign:Zt,__rest:Ve,__decorate:ue,__param:re,__metadata:le,__awaiter:bn,__generator:Sn,__createBinding:Rn,__exportStar:In,__values:sn,__read:Hn,__spread:Mn,__spreadArrays:ye,__spreadArray:Ze,__await:En,__asyncGenerator:An,__asyncDelegator:he,__asyncValues:Ke,__makeTemplateObject:hn,__importStar:_n,__importDefault:ci,__classPrivateFieldGet:yi,__classPrivateFieldSet:Ni,__classPrivateFieldIn:ri},Tn=dt(12378);var xn=function(an){Et(Qe,an);function Qe(We){var mn=an.call(this,We)||this;return mn.wasCleared=!1,mn.modelChangedListener=null,mn.divRef=lt.createRef(),mn}return Qe.prototype.getDiagram=function(){return this.divRef.current===null?null:Tn.S0.fromDiv(this.divRef.current)},Qe.prototype.clear=function(){var We=this.getDiagram();We!==null&&(We.clear(),this.wasCleared=!0)},Qe.prototype.componentDidMount=function(){var We=this;if(this.divRef.current!==null){var mn=this.props.initDiagram();mn.div=this.divRef.current,this.modelChangedListener=function(fn){if(fn.isTransactionFinished&&fn.model&&!fn.model.isReadOnly&&We.props.onModelChange){var Wn=fn.model.toIncrementalData(fn);Wn!==null&&We.props.onModelChange(Wn,fn)}},mn.addModelChangedListener(this.modelChangedListener),mn.delayInitialization(function(){We.mergeData(mn,!0)})}},Qe.prototype.componentWillUnmount=function(){var We=this.getDiagram();We!==null&&(We.div=null,this.modelChangedListener!==null&&(We.removeModelChangedListener(this.modelChangedListener),this.modelChangedListener=null))},Qe.prototype.shouldComponentUpdate=function(We,mn){return We.divClassName!==this.props.divClassName||We.style!==this.props.style?!0:!(We.skipsDiagramUpdate||We.nodeDataArray===this.props.nodeDataArray&&We.linkDataArray===this.props.linkDataArray&&We.modelData===this.props.modelData)},Qe.prototype.componentDidUpdate=function(We,mn){var fn=this;if(!(We.nodeDataArray===this.props.nodeDataArray&&We.linkDataArray===this.props.linkDataArray&&We.modelData===this.props.modelData)){var Wn=this.getDiagram();Wn!==null&&(this.wasCleared?Wn.delayInitialization(function(){fn.mergeData(Wn,!0),fn.wasCleared=!1}):this.mergeData(Wn,!1))}},Qe.prototype.mergeData=function(We,mn){var fn=this,Wn=We.model;Wn.commit(function($e){fn.props.modelData!==void 0&&$e.assignAllDataProperties($e.modelData,fn.props.modelData),$e.mergeNodeDataArray(fn.props.nodeDataArray),fn.props.linkDataArray!==void 0&&$e instanceof Tn.FJ&&$e.mergeLinkDataArray(fn.props.linkDataArray)},mn?"initial merge":"merge data")},Qe.prototype.render=function(){return lt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Qe}(lt.Component),Bn=function(an){Et(Qe,an);function Qe(We){var mn=an.call(this,We)||this;return mn.divRef=lt.createRef(),mn}return Qe.prototype.getOverview=function(){return this.divRef.current===null?null:Tn.S0.fromDiv(this.divRef.current)},Qe.prototype.componentDidMount=function(){if(this.divRef.current!==null){var We;this.props.initOverview!==void 0?We=this.props.initOverview():(We=new Tn.g2,We.contentAlignment=Tn.z6.Center),We.div=this.divRef.current,We.observed=this.props.observedDiagram}},Qe.prototype.componentWillUnmount=function(){var We=this.getOverview();We!==null&&(We.div=null,We.observed=null)},Qe.prototype.shouldComponentUpdate=function(We,mn){return We.divClassName!==this.props.divClassName||We.style!==this.props.style?!0:We.observedDiagram!==this.props.observedDiagram},Qe.prototype.componentDidUpdate=function(We,mn){if(We.observedDiagram!==this.props.observedDiagram){var fn=this.getOverview();fn!==null&&(fn.observed=this.props.observedDiagram)}},Qe.prototype.render=function(){return lt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Qe}(lt.Component),Zn=function(an){Et(Qe,an);function Qe(We){var mn=an.call(this,We)||this;return mn.wasCleared=!1,mn.divRef=lt.createRef(),mn}return Qe.prototype.getPalette=function(){return this.divRef.current===null?null:Tn.S0.fromDiv(this.divRef.current)},Qe.prototype.clear=function(){var We=this.getPalette();We!==null&&(We.clear(),this.wasCleared=!0)},Qe.prototype.componentDidMount=function(){var We=this;if(this.divRef.current!==null){var mn=this.props.initPalette();mn.div=this.divRef.current,mn.delayInitialization(function(){We.mergeData(mn,!0)})}},Qe.prototype.componentWillUnmount=function(){var We=this.getPalette();We!==null&&(We.div=null)},Qe.prototype.shouldComponentUpdate=function(We,mn){return We.divClassName!==this.props.divClassName||We.style!==this.props.style?!0:!(We.nodeDataArray===this.props.nodeDataArray&&We.linkDataArray===this.props.linkDataArray&&We.modelData===this.props.modelData)},Qe.prototype.componentDidUpdate=function(We,mn){var fn=this;if(!(We.nodeDataArray===this.props.nodeDataArray&&We.linkDataArray===this.props.linkDataArray&&We.modelData===this.props.modelData)){var Wn=this.getPalette();Wn!==null&&(this.wasCleared?Wn.delayInitialization(function(){fn.mergeData(Wn,!0),fn.wasCleared=!1}):this.mergeData(Wn,!1))}},Qe.prototype.mergeData=function(We,mn){var fn=this,Wn=We.model;Wn.commit(function($e){fn.props.modelData!==void 0&&$e.assignAllDataProperties($e.modelData,fn.props.modelData),$e.mergeNodeDataArray(fn.props.nodeDataArray),fn.props.linkDataArray!==void 0&&$e instanceof Tn.FJ&&$e.mergeLinkDataArray(fn.props.linkDataArray)},mn?"initial merge":"merge data")},Qe.prototype.render=function(){return lt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Qe}(lt.Component),Nn=dt(67195),Ln={flex_box_center:"flex_box_center___dw6yv",flex_space_between:"flex_space_between___bkc32",flex_box_vertical_center:"flex_box_vertical_center___jDpm2",flex_box_center_end:"flex_box_center_end___g9JOB",flex_box_column:"flex_box_column___ngIjI","diagram-component":"diagram-component___fHDp0",rightmodal:"rightmodal___Fwj_F",title:"title___YZZgl",button:"button___yQKxh",linetitles:"linetitles___CFVw5",line:"line___hSEjG",additem:"additem___cy1wv",lebels:"lebels___E2znG",describe:"describe___emw2X",describetitle:"describetitle___bgNOs",ehover:"ehover____RCDx",dhover:"dhover___IP_3b",header:"header___PCDQg",headeractivite:"headeractivite___x56tJ",a:"a___QYqeC"},ii=dt(90736),Qn=dt(14185),xi=dt(96249),Xn=dt.n(xi),$n=dt(26724),Hi=dt.n($n),Bi=Object.defineProperty,sr=Object.defineProperties,Jn=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,oi=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,Ci=(an,Qe,We)=>Qe in an?Bi(an,Qe,{enumerable:!0,configurable:!0,writable:!0,value:We}):an[Qe]=We,Rt=(an,Qe)=>{for(var We in Qe||(Qe={}))oi.call(Qe,We)&&Ci(an,We,Qe[We]);if(Vn)for(var We of Vn(Qe))Ti.call(Qe,We)&&Ci(an,We,Qe[We]);return an},Pe=(an,Qe)=>sr(an,Jn(Qe)),qt=(an,Qe,We)=>new Promise((mn,fn)=>{var Wn=pn=>{try{Si(We.next(pn))}catch(wi){fn(wi)}},$e=pn=>{try{Si(We.throw(pn))}catch(wi){fn(wi)}},Si=pn=>pn.done?mn(pn.value):Promise.resolve(pn.value).then(Wn,$e);Si((We=We.apply(an,Qe)).next())});class He extends Tn.hD{isFixed(Qe){return Qe.node.isSelected}doLayout(Qe){this._isObserving||(this._isObserving=!0,this.diagram.addModelChangedListener(mn=>{(mn.modelChange!==""||mn.change===Tn.Vk.Transaction&&mn.propertyName==="StartingFirstTransaction")&&(this.network=null)}));var We=this.network;We===null?this.network=We=this.makeNetwork(Qe):this.diagram.nodes.each(mn=>{var fn=We.findVertex(mn);fn!==null&&(fn.bounds=mn.actualBounds)}),super.doLayout(Qe),this.network=We}}let ae=["\u6839\u8282\u70B9","\u7AE0\u8282\u77E5\u8BC6\u5355\u5143","\u8D44\u6E90\u77E5\u8BC6\u5355\u5143","\u77E5\u8BC6\u70B9"],ze=["#3CDAA3","#30A7F1","#F84F90","#6656FF"],Jt=[{name:"\u5B9E\u8BAD",type:"Shixun"},{name:"\u8BFE\u4EF6",type:"Attachment"},{name:"\u89C6\u9891",type:"VideoItem"},{name:"\u8003\u8BD5",type:"ExaminationBank"},{name:"\u4F5C\u4E1A",type:"SubjectHomework"},{name:"\u7EC3\u4E60",type:"Practice"},{name:"\u6587\u672C",type:"Text"}];const nn=({globalSetting:an,dispatch:Qe,virtualSpaces:We})=>{var mn,fn,Wn,$e;const Si=(0,Dt.useParams)(),pn=(0,lt.useRef)(),[wi,Wi]=(0,lt.useState)(!1),[Ui,Vi]=(0,lt.useState)(!1),[Ki,Oi]=(0,lt.useState)(!1),[qi,fr]=(0,lt.useState)(!1),[tr,ai]=(0,lt.useState)(!0),[Lt,ur]=(0,lt.useState)(!1);let[Qi,Yi]=(0,lt.useState)({});const[nr]=It.default.useForm(),[_i,ui]=(0,lt.useState)(!1),[Ei,Mi]=(0,lt.useState)(!0),[Gn,gi]=(0,lt.useState)({index:"",name:"",add:!1});let[Li,pi]=(0,lt.useState)({});const ni=(0,lt.useRef)(null),[kn,ji]=(0,lt.useState)(!1),[br,Dr]=(0,lt.useState)(!1),[Or,Vr]=(0,lt.useState)([]),[Gr,Ur]=(0,lt.useState)([]),[ro,Kr]=(0,lt.useState)([]),[uo,un]=(0,lt.useState)(""),[So,Io]=(0,lt.useState)(!0),[ho,to]=(0,lt.useState)(),[wr,Cr]=(0,lt.useState)([]),[bo,Ar]=(0,lt.useState)(!1),[Sr,lo]=(0,lt.useState)(!1),$r=(0,lt.useRef)(),Er=(0,lt.useRef)(),[oo,Xi]=(0,lt.useState)(!1),[vs,ws]=(0,lt.useState)({left:0,top:0,bottom:0,right:0}),Qo=(0,lt.useRef)(null),{virtualSpacesDetails:qo}=We,Js=(qo==null?void 0:qo.is_member)||(0,ee.Ny)(),[Fi,mr]=(0,lt.useState)(!1),[gr,Lr]=(0,lt.useState)(!1),[zr,go]=(0,lt.useState)([]),[cr,ol]=(0,lt.useState)(!1),[hs,rs]=(0,lt.useState)(1),[Eo,Is]=(0,lt.useState)(!1),pl=(fi,di)=>{var lr;const{clientWidth:Nr,clientHeight:Ir}=window.document.documentElement,Jr=(lr=Qo.current)==null?void 0:lr.getBoundingClientRect();ws({left:-Jr.left+di.x,right:Nr-(Jr.right-di.x),top:-Jr.top+di.y,bottom:Ir-(Jr.bottom-di.y)-70})};let[As,sl]=(0,lt.useState)(600);(0,lt.useEffect)(()=>{pi({}),Cs()},[Si,tr]),(0,lt.useEffect)(()=>{da(),Vt.ZP.config({getContainer:()=>ni.current,top:100})},[]);const da=()=>{if(Er.current)return;const fi=Tn.bx.make;var di=new Tn.S0("myDiagramDiv",{"commandHandler.copiesTree":!1,"commandHandler.copiesParentKey":!1,"commandHandler.deletesTree":!1,"draggingTool.dragsTree":!1,"undoManager.isEnabled":!1,doubleClick:!1});Er.current=di;var lr=Tn.bx.make(Tn.FF);lr.angle=0,lr.arrangement=Tn.FF.ArrangementFixedRoots,di.layout=lr,di.nodeTemplate=fi(Tn.NB,"Vertical",{selectionObjectName:"TEXT"},fi(Tn.al,{name:"TEXT",minSize:new Tn.$u(30,15)},new Tn.KX("text","text").makeTwoWay(),new Tn.KX("scale","scale").makeTwoWay(),new Tn.KX("font","font").makeTwoWay()),fi(Tn.bn,"LineH",{stretch:Tn.bx.Horizontal,strokeWidth:3,height:3,portId:"",fromSpot:Tn.z6.LeftRightSides,toSpot:Tn.z6.LeftRightSides},new Tn.KX("stroke","brush"),new Tn.KX("fromSpot","dir",Ir=>qa(Ir,!0)),new Tn.KX("toSpot","dir",Ir=>qa(Ir,!1))),new Tn.KX("location","loc",Tn.E9.parse).makeTwoWay(Tn.E9.stringify),new Tn.KX("locationSpot","dir",Ir=>qa(Ir,!1)),{click(Ir,Jr){Lr(!1),Yi(Jr==null?void 0:Jr.data),ws({left:0,top:0,bottom:0,right:0})}}),di.allowDoubleClick=!1,di.allowSelect="single",di.commandHandler.canDeleteSelection=!1,di.commandHandler.canUndo=!1;const Nr=di.toolManager.clickSelectingTool;Nr.canStartMulti=!1,di.linkTemplate=fi(Tn.rU,{curve:Tn.rU.Bezier,fromShortLength:-2,toShortLength:-2,selectable:!1},fi(Tn.bn,{strokeWidth:3},new Tn.KX("stroke","toNode",Ir=>Ir.data.brush?Ir.data.brush:"black").ofObject()))};function jl(fi,di){var lr=fi.findNodeForKey(di);if(lr!==null){fi.startTransaction("Layout");var Nr=new Tn.l4,Ir=new Tn.l4;lr.findLinksConnected().each(Jr=>{var vo=Jr.toNode;vo.data.dir==="left"?(Ir.add(lr),Ir.add(Jr),Ir.addAll(vo.findTreeParts())):(Nr.add(lr),Nr.add(Jr),Nr.addAll(vo.findTreeParts()))}),$a(Nr,0),$a(Ir,180),fi.commitTransaction("Layout")}}function $a(fi,di){var lr=Tn.bx.make(Tn.FF,{angle:di,arrangement:Tn.FF.ArrangementFixedRoots,nodeSpacing:5,layerSpacing:20,setsPortSpot:!1,setsChildPortSpot:!1});lr.doLayout(fi)}function Ph(fi){var di;const lr=(di=fi==null?void 0:fi[0])==null?void 0:di.id;let Nr=0;Er.current.model=Tn.Hn.fromJson(JSON.stringify({class:"go.TreeModel",nodeDataArray:fi.map(Ir=>(Ir.parent==lr&&(Nr%2===0?Ir.dir="left":Ir.dir="right",++Nr),Ir.brush=Ir.unit_type===0?"#3CDAA3":[1,2,5,6,7,8].includes(Ir.unit_type)?"#F84F90":Ir.unit_type===3?"#30A7F1":"#6656FF",Ir))})),jl(Er.current,lr)}function Cs(){return qt(this,null,function*(){var fi,di;let lr=tr?"/api/knowledge_graphs/tree.json":"/api/knowledge_graphs/map.json",Nr=yield(0,Nt.ZP)(lr,{method:"get",params:{type:2,identifier:Si.virtual_spacesId,type:2,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});if(Nr.status===0){let Ir=(fi=Nr==null?void 0:Nr.nodeData)==null?void 0:fi.map((vo,Zo)=>Pe(Rt({},vo),{bgcolor:vo.unit_type===0?"#3CDAA3":[1,2,5,6,7,8].includes(vo.unit_type)?"#F84F90":vo.unit_type===3?"#30A7F1":"#6656FF",parent:vo.parent_id}));pi(Pe(Rt({},Nr),{nodeData:Ir})),tr?(Ph(Ir),setTimeout(()=>{tu()},300)):tu();let Jr=(di=Nr==null?void 0:Nr.nodeData)==null?void 0:di.filter(vo=>vo.id===Qi.id);(Jr==null?void 0:Jr.length)>0&&Yi(Rt({},Jr==null?void 0:Jr[0]))}})}const Ql={onRemove:()=>{Vr([])},beforeUpload:fi=>{if(console.log(fi),(fi==null?void 0:fi.size)>1024*1024*50)return Vt.ZP.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;let di=[];return di.push(fi),Vr([...di]),!1},fileList:Or,accept:".xls,.xlsx"},fa=(0,lt.useMemo)(()=>{const fi=di=>di.map(lr=>{const Nr=lr.title,Ir=Nr.indexOf(uo),Jr=Nr.substring(0,Ir),vo=Nr.slice(Ir+uo.length),Zo=Ir>-1?lt.createElement("span",null,Jr,lt.createElement("span",{style:{color:"#f50"}},uo),vo):lt.createElement("span",null,Nr);return lr.children?{title:Zo,key:lr.key,children:fi(lr.children)}:{title:Zo,key:lr.key}});return fi(Gr)},[uo,Gr]);function Pl(){const fi=Tn.bx.make,di=fi(Tn.S0,{allowSelect:!1,"undoManager.isEnabled":!0,initialAutoScale:Tn.S0.Uniform,contentAlignment:Tn.z6.Center,layout:fi(He,{defaultSpringLength:30,defaultElectricalCharge:100}),SelectionMoved:Nr=>Nr.diagram.layout.invalidateLayout(),model:fi(Tn.FJ,{linkKeyProperty:"key",makeUniqueKeyFunction:(Nr,Ir)=>{let Jr=Ir.key||1;for(;Nr.findNodeDataForKey(Jr);)Jr++;return Ir.key=Jr,Jr},makeUniqueLinkKeyFunction:(Nr,Ir)=>{let Jr=Ir.key||-1;for(;Nr.findLinkDataForKey(Jr);)Jr--;return Ir.key=Jr,Jr}})});di.toolManager.draggingTool.doMouseMove=function(){Tn.h1.prototype.doMouseMove.call(this),this.isActive&&this.diagram.layout.doLayout(!0)},di.nodeTemplate=fi(Tn.NB,"Auto",{minSize:new Tn.$u(100,100)},fi(Tn.bn,"Circle",{stroke:"white",spot1:new Tn.z6(0,0,5,5),spot2:new Tn.z6(1,1,-5,-5)},new Tn.KX("fill","bgcolor")),fi(Tn.al,{font:"bold 10pt helvetica, bold arial, sans-serif",stroke:"white",textAlign:"center",maxSize:new Tn.$u(100,NaN)},new Tn.KX("text","text")),{click(Nr,Ir){Lr(!1),Yi(Ir==null?void 0:Ir.data),ws({left:0,top:0,bottom:0,right:0})}}),di.linkTemplate=fi(Tn.rU,{layerName:"Background"},fi(Tn.bn,{stroke:"black"}),fi(Tn.bn,{toArrow:"standard",stroke:null}),fi(Tn.s_,"Auto",fi(Tn.bn,{fill:fi(Tn.BD,"Radial",{0:"rgb(240, 240, 240)",.3:"rgb(240, 240, 240)",1:"rgba(240, 240, 240, 0)"}),stroke:null}),fi(Tn.al,{textAlign:"center",font:"10pt helvetica, arial, sans-serif",stroke:"#555555",margin:4},new Tn.KX("text","text")))),di.doubleClick=!1,di.allowDoubleClick=!1,di.allowSelect="single",di.commandHandler.canDeleteSelection=!1,di.commandHandler.canUndo=!1,di.allowInsert=!1;const lr=di.toolManager.clickSelectingTool;return lr.canStartMulti=!1,$r.current=di,di}function qa(fi,di){return fi==="left"?di?Tn.z6.Left:Tn.z6.Right:di?Tn.z6.Right:Tn.z6.Left}function tu(){var fi,di,lr,Nr;sl(600),(di=(fi=Er.current)==null?void 0:fi.zoomToFit)==null||di.call(fi),(Nr=(lr=$r.current)==null?void 0:lr.zoomToFit)==null||Nr.call(lr)}return lt.createElement("div",{ref:ni,style:{paddingBottom:20,background:"#FFF",position:"relative",height:"100vh"}},lt.createElement(Gt.Z,{spinning:Lt},(Li==null?void 0:Li.is_root)&<.createElement(ii.Z,{ButtonClick:()=>qt(void 0,null,function*(){ur(!0);let fi=yield(0,Nt.ZP)("/api/knowledge_graphs/set_root.json",{method:"post",body:{type:2,identifier:Si.virtual_spacesId,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});ur(!1),fi.status===0&&Cs()}),buttonProps:{type:"primary"},ButtonText:Js&&"\u65B0\u589E\u8282\u70B9",ButtonTwo:Js&<.createElement(Ht.ZP,{style:{marginLeft:20},onClick:()=>{Dr(!0)},type:"primary"},"\u6587\u4EF6\u5BFC\u5165"),styles:{margin:"auto",paddingTop:100}}),!(Li!=null&&Li.is_root)&<.createElement("div",{style:{height:60,border:"1px solid #e7e7e7",display:"flex"}},lt.createElement("div",{onClick:()=>{ai(!0),Yi({})},className:tr?Ln.headeractivite:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-zhishishu"})),lt.createElement("div",null,"\u77E5\u8BC6\u6811")),lt.createElement("div",{onClick:()=>{ai(!1),Yi({})},className:tr?Ln.header:Ln.headeractivite},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-guanxitu"})),lt.createElement("div",null,"\u5173\u7CFB\u56FE")),lt.createElement("div",{onClick:()=>{var fi,di,lr,Nr,Ir=tr?Er.current.viewportBounds.width:$r.current.viewportBounds.width,Jr=tr?Er.current.viewportBounds.height:$r.current.viewportBounds.height;(di=(fi=Er.current)==null?void 0:fi.zoomToRect)==null||di.call(fi,new Tn.UL(1,1,Ir/1.1,Jr/1.1)),(Nr=(lr=$r.current)==null?void 0:lr.zoomToRect)==null||Nr.call(lr,new Tn.UL(1,1,Ir/1.1,Jr/1.1))},className:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-fangda3"})),lt.createElement("div",null,"\u653E\u5927")),lt.createElement("div",{onClick:()=>{var fi,di,lr,Nr,Ir=tr?Er.current.viewportBounds.width:$r.current.viewportBounds.width,Jr=tr?Er.current.viewportBounds.height:$r.current.viewportBounds.height;(di=(fi=Er.current)==null?void 0:fi.zoomToRect)==null||di.call(fi,new Tn.UL(1,1,Ir*1.1,Jr*1.1)),(Nr=(lr=$r.current)==null?void 0:lr.zoomToRect)==null||Nr.call(lr,new Tn.UL(1,1,Ir*1.1,Jr*1.1))},className:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-suoxiao3"})),lt.createElement("div",null,"\u7F29\u5C0F")),lt.createElement("div",{onClick:()=>{var fi,di,lr,Nr;sl(600),(di=(fi=Er.current)==null?void 0:fi.zoomToFit)==null||di.call(fi),(Nr=(lr=$r.current)==null?void 0:lr.zoomToFit)==null||Nr.call(lr)},className:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-zishiying"})),lt.createElement("div",null,"\u6700\u4F73\u9002\u5E94")),lt.createElement("div",{onClick:()=>qt(void 0,null,function*(){var fi;lo(!0);let di=yield(0,Nt.ZP)("/api/knowledge_graphs.json",{method:"get",params:{type:2,identifier:Si.virtual_spacesId}});di.status===0&&(Cr(di==null?void 0:di.list),Ur(di==null?void 0:di.knowledge_graphs),Kr((fi=di==null?void 0:di.list)==null?void 0:fi.map(lr=>lr.key)))}),className:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-chazhao"})),lt.createElement("div",null,"\u67E5\u627E")),Js&<.createElement("div",{onClick:()=>{Dr(!0)},className:Ln.header},lt.createElement("div",null," ",lt.createElement("i",{className:"iconfont icon-daoru"})),lt.createElement("div",null,"\u5BFC\u5165")),lt.createElement("div",{style:{flex:1,textAlign:"end",lineHeight:"60px"}},Js&<.createElement(de.Z,{title:"\u5386\u53F2\u8BB0\u5F55"},lt.createElement("i",{className:`iconfont icon-lishijilu ${Ln.ehover}`,onClick:()=>qt(void 0,null,function*(){var fi;let di=yield(0,Nt.ZP)("/api/knowledge_graphs/history.json",{method:"get",params:{identifier:Si.virtual_spacesId,limit:10,type:2,page:hs}});di.status===0&&(Is(!0),((fi=di==null?void 0:di.histories)==null?void 0:fi.length)<10&&ol(!1),go(di==null?void 0:di.histories))}),style:{marginRight:30}})),Js&<.createElement(de.Z,{title:"\u6E05\u7A7A\u6240\u6709\u6570\u636E",getPopupContainer:()=>ni.current},lt.createElement("i",{onClick:()=>{xe.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,getContainer:()=>ni.current,content:"\u8BF7\u786E\u5B9A\u662F\u5426\u5C06\u77E5\u8BC6\u56FE\u8C31\u6240\u6709\u7684\u6570\u636E\u6E05\u7A7A\uFF0C\u6062\u590D\u7A7A\u72B6\u6001\uFF0C\u6E05\u7A7A\u540E\u6570\u636E\u4E0D\u53EF\u6062\u590D\uFF01\u672C\u6B21\u6E05\u7A7A\u4E0D\u4F1A\u5F71\u54CD\u5230\u8BFE\u7A0B\u7AE0\u8282\u5185\u5BB9\uFF0C\u4EC5\u4F5C\u7528\u4E8E\u77E5\u8BC6\u56FE\u8C31\u7684\u6570\u636E\u3002",onOk:()=>qt(void 0,null,function*(){(yield(0,Nt.ZP)("/api/knowledge_graphs/delete_all.json",{method:"DELETE",body:{type:2,identifier:Si.virtual_spacesId,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}})).status===0&&(Cs(),Yi({}))})})},className:`iconfont icon-shanchu14 ${Ln.dhover}`})),Js&<.createElement(de.Z,{title:"\u540C\u6B65\u8BFE\u7A0B\u77E5\u8BC6\u7ED3\u6784",getPopupContainer:()=>ni.current},lt.createElement("i",{onClick:()=>{xe.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,getContainer:()=>ni.current,content:"\u8BF7\u786E\u5B9A\u662F\u5426\u5C06\u540C\u6B65\u8BFE\u7A0B\u77E5\u8BC6\u7ED3\u6784\uFF0C\u66F4\u65B0\u540E\u539F\u6709\u77E5\u8BC6\u7ED3\u6784\u5C06\u88AB\u8986\u76D6\uFF0C\u8986\u76D6\u540E\u4E0D\u53EF\u64A4\u9500\u6062\u590D\u3002",onOk:()=>qt(void 0,null,function*(){ur(!0);let fi=yield(0,Nt.ZP)("/api/knowledge_graphs/sync.json",{method:"post",body:{identifier:Si.pathId,type:2}});ur(!1),fi.status===0&&Cs()})})},style:{margin:"0px 30px"},className:`iconfont icon-jiazai_shuaxin_o ${Ln.ehover}`})),Js&<.createElement(Ae.Z,{getPopupContainer:()=>ni.current,menu:{items:[{key:"1",style:{width:100},label:lt.createElement("a",{href:`${Qn.Z.API_SERVER}/api/knowledge_graphs/export.xlsx?identifier=${Si.virtual_spacesId}&type=2`},"\u5BFC\u51FAExcel")},{key:"2",label:lt.createElement("a",{href:`${Qn.Z.API_SERVER}/api/knowledge_graphs/export.json?identifier=${Si.virtual_spacesId}&type=2`},"\u5BFC\u51FAWord")}]}},lt.createElement("i",{className:`iconfont icon-xiazai6 ${Ln.ehover}`})),lt.createElement("i",{onClick:()=>{(0,Nn.vp)()?(ji(!1),(0,Nn.BU)()):(ji(!0),(0,Nn.Dj)(ni.current)),tu()},style:{marginLeft:30,marginRight:20},className:`iconfont ${kn?"icon-tuichuquanping3":"icon-quanping4"} ${Ln.ehover}`}))),lt.createElement("div",{className:"relative"},!tr&<.createElement(xn,{ref:pn,divClassName:"diagram-component",style:{backgroundColor:"#fff",height:kn?"calc(100vh - 100px)":540,visibility:Li!=null&&Li.is_root?"hidden":"visible"},initDiagram:Pl,nodeDataArray:Li==null?void 0:Li.nodeData,linkDataArray:Li==null?void 0:Li.linkData}),lt.createElement("div",{id:"myDiagramDiv",style:{height:kn?"calc(100vh - 100px)":540,width:"100%",visibility:Li!=null&&Li.is_root?"hidden":tr?"visible":"hidden",position:tr?"relative":"absolute"}})),lt.createElement("div",null,!(Li!=null&&Li.is_root)&&ae.map((fi,di)=>lt.createElement("span",{style:{marginLeft:di===0&&20,marginRight:30}},lt.createElement("span",{style:{marginRight:6,width:16,height:8,background:ze[di],display:"inline-flex",borderRadius:4}}),lt.createElement("span",{style:{color:"#9096A3"}},fi))))),lt.createElement("div",{style:{zIndex:1e3}},lt.createElement(Xn(),{disabled:oo,bounds:vs,onStart:(fi,di)=>pl(fi,di)},lt.createElement("div",{ref:Qo,style:{position:"fixed",cursor:"move",right:0,top:kn?60:260,zIndex:12}},lt.createElement("div",{onMouseOver:()=>{oo&&Xi(!Ei)},onMouseOut:()=>{Xi(!0)}},Qi.id&<.createElement("div",{className:Ln.rightmodal},lt.createElement(Gt.Z,{spinning:Lt},lt.createElement("div",{style:{display:"flex",padding:25,paddingBottom:0}},lt.createElement("div",{className:Ln.title},Qi.text," ",gr&<.createElement("i",{onClick:()=>{Wi(!0),nr.setFieldsValue({name:Qi.text})},className:"iconfont icon-bianji3",style:{marginLeft:14,color:"#666666",cursor:"pointer"}})),lt.createElement("div",null,lt.createElement("i",{style:{cursor:"pointer"},onClick:()=>{var fi,di;if(gr){Lr(!1);return}Yi({}),(fi=Er.current)==null||fi.clearSelection(),(di=$r.current)==null||di.clearSelection()},className:"iconfont icon-danchuangguanbi"}))),lt.createElement("div",{style:{maxHeight:580,overflow:"auto",padding:25,paddingTop:0}},gr&<.createElement("div",{style:{marginTop:25}},lt.createElement("span",{className:Ln.button,onClick:()=>{if(Qi.unit_type>=4||Qi.unit_type===0){Qi.unit_type===0?Vt.ZP.info("\u6839\u8282\u70B9\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u70B9"):Vt.ZP.info("\u77E5\u8BC6\u70B9\u4E3A\u6700\u5C0F\u5355\u4F4D\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u70B9");return}nr.setFieldsValue({name:""}),Oi(!0)}},lt.createElement("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidian1"})," \u63D2\u5165\u77E5\u8BC6\u70B9"),lt.createElement("span",{className:Ln.button,onClick:()=>{if(Qi.unit_type>=4){Vt.ZP.info("\u77E5\u8BC6\u70B9\u4E3A\u6700\u5C0F\u5355\u4F4D\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u5355\u5143");return}nr.setFieldsValue({name:"",unit_type:3,url:""}),fr(!0)}},lt.createElement("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidanyuan"})," \u63D2\u5165\u77E5\u8BC6\u5355\u5143"),lt.createElement("span",{className:Ln.button,onClick:()=>{xe.default.confirm({icon:null,title:"\u63D0\u793A",centered:!0,getContainer:()=>ni.current,content:"\u5220\u9664\u8BE5\u8282\u70B9\u4F1A\u5BFC\u81F4\u5B83\u7684\u5B50\u8282\u70B9\u4E00\u5E76\u5220\u9664\uFF0C\u5220\u9664\u8282\u70B9\u4E0D\u4F1A\u5F71\u54CD\u5230\u8BFE\u7A0B\u7AE0\u8282\u5185\u5BB9\uFF0C\u5220\u9664\u540E\uFF0C\u6570\u636E\u4E0D\u53EF\u6062\u590D\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>qt(void 0,null,function*(){ur(!0);let fi=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"DELETE"});ur(!1),(fi==null?void 0:fi.status)===0&&(Yi({}),Cs())})})}},lt.createElement("i",{style:{marginRight:8},className:"iconfont icon-shanchujiedian"})," \u5220\u9664\u8282\u70B9"),lt.createElement("span",{className:Ln.button,onClick:()=>qt(void 0,null,function*(){var fi;ui(!0);let di=yield(0,Nt.ZP)("/api/knowledge_graphs.json",{method:"get",params:{identifier:Si.pathId,type:2}});di.status===0&&(Cr(di==null?void 0:di.list),Ur(di==null?void 0:di.knowledge_graphs),Kr((fi=di==null?void 0:di.list)==null?void 0:fi.map(lr=>lr.key)))})},lt.createElement("i",{style:{marginRight:8},className:"iconfont icon-guanxi"})," \u5173\u7CFB")),gr&<.createElement("div",{style:{marginTop:20}},lt.createElement("div",{className:Ln.linetitles},lt.createElement("span",{className:Ln.line}),"\u5C5E\u6027"),Qi.unit_type!=4&&Qi.unit_type>0&<.createElement("div",{style:{paddingLeft:8}},lt.createElement("label",{className:Ln.lebels},"\u7C7B\u578B"),lt.createElement(je.default,{size:"large",getPopupContainer:()=>ni.current,style:{width:"100%",marginTop:6},value:Qi.unit_type,onChange:fi=>qt(void 0,null,function*(){Qi.unit_type=fi,Yi(Rt({},Qi)),ur(!0);let di=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"put",body:{unit_type:fi}});ur(!1),di.status===0&&(Wi(!1),Cs())}),placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},lt.createElement(je.default.Option,{value:1},"\u8BFE\u4EF6"),lt.createElement(je.default.Option,{value:3},"\u6587\u672C"),lt.createElement(je.default.Option,{value:2},"\u5B9E\u8BAD"),lt.createElement(je.default.Option,{value:5},"\u8003\u8BD5"),lt.createElement(je.default.Option,{value:6},"\u4F5C\u4E1A"),lt.createElement(je.default.Option,{value:7},"\u7EC3\u4E60"),lt.createElement(je.default.Option,{value:8},"\u89C6\u9891"))),lt.createElement("div",{style:{paddingLeft:8,marginTop:15}},lt.createElement("label",{className:Ln.lebels,style:{display:"flex"}},"\u8DF3\u8F6C\u5730\u5740"),lt.createElement(se.default,{size:"large",value:Qi.url,onChange:fi=>{Qi.url=fi.target.value,Yi(Rt({},Qi))},disabled:Ei,onBlur:fi=>qt(void 0,null,function*(){if(Xi(!1),fi.target.value){var di=new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i");if(!di.test(fi.target.value)){Vt.ZP.info("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8DF3\u8F6C\u5730\u5740");return}}ur(!0);let lr=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"put",body:{url:fi.target.value}});ur(!1),Mi(!0),lr.status===0&&(Wi(!1),Cs())}),style:{width:"81%",marginTop:6}}),lt.createElement("i",{onClick:()=>{Mi(!1)},className:"iconfont icon-bianji3",style:{marginLeft:12,marginRight:20,color:"#666666",cursor:"pointer"}}),lt.createElement("span",{className:Ln.button,style:{marginRight:0},onClick:()=>{if(!Qi.url){Vt.ZP.info("\u94FE\u63A5\u4E0D\u80FD\u4E3A\u7A7A");return}window.open(Qi.url)}},"\u8DF3\u8F6C"))),gr&<.createElement("div",{style:{marginTop:20}},lt.createElement("div",{className:Ln.linetitles},lt.createElement("span",{className:Ln.line}),"\u5173\u7CFB"),(mn=Qi==null?void 0:Qi.relations)==null?void 0:mn.map((fi,di)=>lt.createElement("div",{style:{display:"flex",paddingLeft:8}},lt.createElement("div",{className:Ln.multi_ellipsis1},"\u4E0E\u8282\u70B9\u201C",lt.createElement("span",{style:{fontWeight:600,color:"#000000"}},fi.name),"\u201D\u4E3A",fi.relation,"\u5173\u7CFB"),lt.createElement("div",{style:{width:"10%",textAlign:"end"}},lt.createElement("i",{onClick:()=>{xe.default.confirm({icon:null,title:"\u63D0\u793A",getContainer:()=>ni.current,centered:!0,content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u8282\u70B9\u4E4B\u95F4\u7684\u5173\u7CFB\u89E3\u7ED1",onOk:()=>qt(void 0,null,function*(){var lr;ur(!0);let Nr=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi==null?void 0:Qi.id}/delete_relation.json`,{method:"POST",body:{relation_id:fi.relation_id}});ur(!1),Nr.status===0&&((lr=Qi.relations)==null||lr.splice(di,1),Yi(Rt({},Qi)),Cs())})})},className:`${Ln.dhover} iconfont icon-shanchu10`}))))),!gr&<.createElement("div",{style:{marginTop:20}},lt.createElement("div",{className:Ln.linetitles},lt.createElement("span",{className:Ln.line}),"\u5B66\u4E60\u8D44\u6E90"),(fn=Qi==null?void 0:Qi.sub_knowledge_graphs)==null?void 0:fn.map((fi,di)=>{var lr,Nr;return lt.createElement("div",{className:Ln.a,onClick:()=>{window.open(fi==null?void 0:fi.url)},style:{display:"flex",paddingLeft:8,alignItems:"center",cursor:"pointer"}},lt.createElement("i",{className:"iconfont icon-lianjie2",style:{marginRight:10,fontSize:12}}),lt.createElement("span",{className:`${Ln.multi_ellipsis1} ${Ln.a}`,style:{fontWeight:600,marginTop:0,width:"90%",display:"inline-flex"}}," \u3010",((Nr=(lr=Jt==null?void 0:Jt.filter(Ir=>fi.type===Ir.type))==null?void 0:lr[0])==null?void 0:Nr.name)||"\u6587\u672C","\u3011 ",fi.name," "),lt.createElement("div",null,"\u67E5\u770B"))})),!gr&<.createElement("div",{style:{marginTop:20}},lt.createElement("div",{className:Ln.linetitles},lt.createElement("span",{className:Ln.line}),"\u5B58\u5728\u5173\u7CFB\u7684\u77E5\u8BC6\u8282\u70B9"),(Wn=Qi==null?void 0:Qi.relations)==null?void 0:Wn.map((fi,di)=>lt.createElement("div",{className:Ln.a,onClick:()=>{var lr,Nr,Ir,Jr,vo,Zo,Wo,ts,ql,Nl,Po,co;(lr=Er.current)==null||lr.clearSelection(),(Nr=$r.current)==null||Nr.clearSelection();const Yr=(Jr=(Ir=$r.current)==null?void 0:Ir.findNodeForKey)==null?void 0:Jr.call(Ir,fi==null?void 0:fi.relation_id),ys=(Zo=(vo=Er.current)==null?void 0:vo.findNodeForKey)==null?void 0:Zo.call(vo,fi==null?void 0:fi.relation_id);(ts=(Wo=Er.current)==null?void 0:Wo.commandHandler)==null||ts.scrollToPart(ys),(Nl=(ql=$r.current)==null?void 0:ql.commandHandler)==null||Nl.scrollToPart(Yr),Yr&&(Yr.isSelected=!0),ys&&(ys.isSelected=!0);let er=(co=(Po=Li==null?void 0:Li.nodeData)==null?void 0:Po.filter(os=>(os==null?void 0:os.id)===(fi==null?void 0:fi.relation_id)))==null?void 0:co[0];Yi(Rt({},er))},style:{display:"flex",paddingLeft:8,cursor:"pointer"}},lt.createElement("div",{className:Ln.multi_ellipsis1},"\u3010",fi.relation,"\u3011",fi.name)))),lt.createElement("div",{style:{marginTop:20}},lt.createElement("div",{className:Ln.linetitles},lt.createElement("span",{className:Ln.line}),"\u63CF\u8FF0",lt.createElement("div",{style:{flex:1,textAlign:"end"}},gr&<.createElement("span",{onClick:()=>{gi({add:!0,name:""}),nr.setFieldsValue({describe:""})},className:Ln.additem},lt.createElement("i",{style:{fontSize:12},className:"iconfont icon-tianjiashitixiaojiahao"})," \u6DFB\u52A0"))),lt.createElement("div",{style:{height:200,overflow:"auto"}},($e=Qi.descriptions)==null?void 0:$e.map((fi,di)=>lt.createElement("div",{className:Ln.describe},lt.createElement("div",{className:Ln.describetitle},lt.createElement("div",{style:{fontSize:14,color:"#000000",fontWeight:500}},"\u63CF\u8FF0",di+1),gr&<.createElement("div",null,lt.createElement("i",{onClick:()=>{gi({index:di,name:fi}),nr.setFieldsValue({describe:fi})},style:{marginRight:10},className:`iconfont icon-bianji-moren ${Ln.ehover}`}),lt.createElement("i",{onClick:()=>{xe.default.confirm({icon:null,title:"\u63D0\u793A",getContainer:()=>ni.current,centered:!0,content:"\u5220\u9664\u63CF\u8FF0\u540E\uFF0C\u6570\u636E\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>qt(void 0,null,function*(){var lr;(lr=Qi.descriptions)==null||lr.splice(di,1),Yi(Rt({},Qi)),ur(!0);let Nr=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"put",body:{descriptions:Qi.descriptions}});ur(!1),Nr.status===0&&(Wi(!1),Cs())})})},className:`iconfont icon-shanchutimu ${Ln.dhover}`}))),lt.createElement(Me.Z,{value:fi||""})))),!gr&&Js&<.createElement("div",{style:{textAlign:"center",marginTop:10}},lt.createElement(Ht.ZP,{type:"primary",style:{width:120},onClick:()=>{Lr(!0)}},"\u7F16\u8F91")))))))))),lt.createElement(xe.default,{open:wi,centered:!0,title:"\u7F16\u8F91",getContainer:()=>ni.current,onCancel:()=>Wi(!1),okButtonProps:{loading:Ui},onOk:()=>{nr.submit()}},lt.createElement(It.default,{size:"large",form:nr,onFinish:fi=>qt(void 0,null,function*(){Vi(!0);let di=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"put",body:{type:2,name:fi.name}});Vi(!1),di.status===0&&(tr&&(Qi.text=fi.name,Yi(Qi)),Wi(!1),Vt.ZP.info("\u4FEE\u6539\u6210\u529F"),Cs())})},lt.createElement(It.default.Item,{name:"name",label:"\u540D\u79F0",rules:[{required:!0,validator:(fi,di)=>{var lr;return((lr=di==null?void 0:di.replaceAll(" ",""))==null?void 0:lr.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u540D\u79F0")}}]},lt.createElement(se.default,{maxLength:30})))),lt.createElement(xe.default,{open:Ki,centered:!0,title:"\u63D2\u5165\u77E5\u8BC6\u70B9",getContainer:()=>ni.current,onCancel:()=>Oi(!1),okButtonProps:{loading:Ui},onOk:()=>{nr.submit()}},lt.createElement(It.default,{size:"large",form:nr,onFinish:fi=>qt(void 0,null,function*(){Vi(!0);let di=yield(0,Nt.ZP)("/api/knowledge_graphs.json",{method:"post",body:Pe(Rt({},fi),{unit_type:4,type:2,identifier:Si.virtual_spacesId,parent_id:Qi.id,virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});Vi(!1),di.status===0&&(Oi(!1),Cs(),Vt.ZP.info("\u63D2\u5165\u77E5\u8BC6\u70B9\u6210\u529F"))})},lt.createElement(It.default.Item,{name:"name",label:"\u77E5\u8BC6\u70B9\u540D\u79F0",rules:[{required:!0,validator:(fi,di)=>{var lr;return((lr=di==null?void 0:di.replaceAll(" ",""))==null?void 0:lr.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0")}}]},lt.createElement(se.default,{maxLength:20})))),lt.createElement(xe.default,{open:qi,centered:!0,width:550,title:"\u63D2\u5165\u77E5\u8BC6\u5355\u5143",getContainer:()=>ni.current,onCancel:()=>fr(!1),okButtonProps:{loading:Ui},onOk:()=>{nr.submit()}},lt.createElement(It.default,{size:"large",form:nr,labelCol:{span:5},onFinish:fi=>qt(void 0,null,function*(){let di=yield(0,Nt.ZP)("/api/knowledge_graphs.json",{method:"post",body:Pe(Rt({},fi),{type:2,identifier:Si.virtual_spacesId,parent_id:Qi.id,virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});Vi(!1),di.status===0&&(fr(!1),Cs(),Vt.ZP.info("\u63D2\u5165\u77E5\u8BC6\u5355\u5143\u6210\u529F"))})},lt.createElement(It.default.Item,{name:"name",label:"\u77E5\u8BC6\u5355\u5143\u540D\u79F0",rules:[{required:!0,validator:(fi,di)=>{var lr;return((lr=di==null?void 0:di.replaceAll(" ",""))==null?void 0:lr.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u77E5\u8BC6\u5355\u5143\u540D\u79F0")}}]},lt.createElement(se.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u5355\u5143\u540D\u79F0",maxLength:20})),lt.createElement(It.default.Item,{name:"unit_type",label:"\u7C7B\u578B"},lt.createElement(je.default,{getPopupContainer:()=>ni.current,placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},lt.createElement(je.default.Option,{value:1},"\u8BFE\u4EF6"),lt.createElement(je.default.Option,{value:3},"\u6587\u672C"),lt.createElement(je.default.Option,{value:2},"\u5B9E\u8BAD"),lt.createElement(je.default.Option,{value:5},"\u8003\u8BD5"),lt.createElement(je.default.Option,{value:6},"\u4F5C\u4E1A"),lt.createElement(je.default.Option,{value:7},"\u7EC3\u4E60"),lt.createElement(je.default.Option,{value:8},"\u89C6\u9891"))),lt.createElement(It.default.Item,{name:"url",label:"\u8DF3\u8F6C\u5730\u5740",rules:[{pattern:new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i"),message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u5730\u5740"}]},lt.createElement(se.default,{placeholder:"\u8BF7\u8F93\u5165\u70B9\u51FB\u8BE5\u8282\u70B9\u8DF3\u8F6C\u7684\u94FE\u63A5\u5730\u5740"})))),_i&<.createElement(xe.default,{open:_i,centered:!0,width:550,title:"\u6DFB\u52A0\u5173\u7CFB",getContainer:()=>ni.current,onCancel:()=>{to(""),ui(!1)},okButtonProps:{loading:Ui},onOk:()=>{if(!ho){Vt.ZP.info("\u8BF7\u5148\u9009\u62E9\u8282\u70B9");return}ui(!1),Ar(!0),nr.setFieldsValue({relation:1}),un("")}},lt.createElement(se.default.Search,{size:"large",onChange:fi=>{let di=fi.target.value;const lr=wr.filter(Nr=>Nr.title.indexOf(di)>-1).map(Nr=>Nr.key);Kr(lr),Io(!0),un(fi.target.value)}}),lt.createElement(Xt.default,{onExpand:fi=>{Kr(fi),Io(!1)},style:{maxHeight:300,height:300,marginTop:20,overflow:"auto"},onSelect:fi=>{console.log("---",fi),to(fi==null?void 0:fi[0])},expandedKeys:ro,defaultExpandAll:!0,autoExpandParent:So,treeData:fa})),(Gn.name||Gn.add)&<.createElement(xe.default,{open:Gn.name||Gn.add,title:"\u63CF\u8FF0",width:900,getContainer:()=>ni.current,centered:!0,onCancel:()=>{gi("")},okButtonProps:{loading:Ui},onOk:()=>{nr.submit()}},lt.createElement(It.default,{form:nr,onFinish:fi=>qt(void 0,null,function*(){Vi(!0),Gn.add?(Qi.descriptions.push(fi.describe),Yi(Rt({},Qi))):(Qi.descriptions[Gn.index]=fi.describe,Yi(Rt({},Qi)));let di=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}.json`,{method:"put",body:{type:2,descriptions:Qi.descriptions}});Vi(!1),gi(""),di.status===0&&(Wi(!1),Cs())})},lt.createElement(It.default.Item,{name:"describe",style:{marginBottom:-10},rules:[{required:!0,validator:(fi,di)=>{var lr;return((lr=di==null?void 0:di.replaceAll(" ",""))==null?void 0:lr.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9")}}]},lt.createElement(jt.Z,{placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u5236\u4E3A65000\u4E2A\u5B57\u7B26",watch:!0,defaultValue:Gn.name})))),lt.createElement(xe.default,{title:"\u6587\u4EF6\u5BFC\u5165",open:br,centered:!0,getContainer:()=>ni.current,okButtonProps:{loading:Ui},onCancel:()=>{Dr(!1),Vr([])},onOk:()=>qt(void 0,null,function*(){var fi;const di=new FormData;if(Or.length>0)di.append("file",Or[0]);else{Vt.ZP.warning("\u8BF7\u9009\u62E9\u6587\u4EF6");return}Vi(!0),di.append("ec_year_id",Si.ec_year_id),di.append("identifier",Si.virtual_spacesId),di.append("type","2"),di.append("virtual_module_id",window.localStorage.getItem("vtrsModuleId"));let lr=yield(0,Nt.ZP)("/api/knowledge_graphs/import.json",{method:"post",body:di},!0);Vi(!1),(lr==null?void 0:lr.status)===0&&(((fi=lr==null?void 0:lr.fail)==null?void 0:fi.length)>0&&xe.default.confirm({icon:null,title:"\u5BFC\u5165\u5931\u8D25",content:lt.createElement("span",null,"\u68C0\u6D4B\u5230\u672C\u6B21\u5BFC\u5165\u5B58\u5728\u4E0D\u7B26\u5408\u8981\u6C42\u7684\u6570\u636E\uFF0C\u70B9\u51FB\u4E0B\u8F7D",lt.createElement("a",{href:`${Qn.Z.API_SERVER}${lr==null?void 0:lr.url}`,download:"\u5931\u8D25\u6570\u636E.xlsx"},"\u5BFC\u5165\u5931\u8D25\u7684\u6570\u636E"),"\u67E5\u770B")}),Vr([]),Qi={},Yi({}),(lr==null?void 0:lr.success)>0&&Vt.ZP.info("\u6DFB\u52A0\u6210\u529F"),Cs(),Dr(!1))})},!(Li!=null&&Li.is_root)&<.createElement("div",{style:{marginBottom:30,color:"#333333"}},"\u68C0\u6D4B\u5F53\u524D\u5DF2\u5B58\u5728\u6570\u636E\uFF0C\u5BFC\u5165\u540E\u539F\u6570\u636E\u5C06\u4F1A\u88AB\u5220\u9664\uFF0C\u6309\u7167\u6700\u65B0\u5BFC\u5165\u7684\u4E3A\u4E3B\uFF0C\u5982\u7EE7\u7EED\u5BFC\u5165\uFF0C\u8BF7\u6309\u7167\u4E0B\u65B9\u6B65\u9AA4\u8FDB\u884C"),lt.createElement("p",{style:{color:"#5F6368"}},"\u6B65\u9AA41\uFF1A",lt.createElement("span",{style:{color:"#000000"}},"\u4E0B\u8F7D"),lt.createElement("a",{href:`${Qn.Z.API_SERVER}/api/knowledge_graphs/down_template.json`,download:"\u6A21\u7248.xlsx"},"\u77E5\u8BC6\u56FE\u8C31\u5BFC\u5165\u6A21\u7248")),lt.createElement(_t.Z,null,lt.createElement(ve.Z,{style:{color:"#5F6368"}},"\u6B65\u9AA42\uFF1A",lt.createElement("span",{style:{color:"#000000"}},"\u4E0A\u4F20\u586B\u5199\u597D\u7684\u300A\u77E5\u8BC6\u56FE\u8C31\u5BFC\u5165\u6A21\u7248\u300B"))),lt.createElement(_t.Z,{style:{marginTop:10,marginLeft:50}},lt.createElement(Qt.default,Rt({},Ql),lt.createElement("span",{style:{padding:"0px 16px",color:"#3061D0",cursor:"pointer",height:32,alignItems:"center",display:"inline-flex",borderRadius:2,border:"1px solid #BACFFE",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)"}},lt.createElement("i",{style:{fontSize:12,marginRight:6},className:"iconfont icon-tianjiashitixiaojiahao"})," \u9009\u62E9\u6587\u4EF6")))),lt.createElement(xe.default,{open:bo,title:"\u6DFB\u52A0\u5173\u7CFB",width:500,getContainer:()=>ni.current,centered:!0,onCancel:()=>{Ar(!1),nr.setFieldsValue({relation:null})},okButtonProps:{loading:Ui},onOk:()=>{nr.submit()}},lt.createElement(It.default,{form:nr,onFinish:fi=>qt(void 0,null,function*(){Vi(!0);let di=yield(0,Nt.ZP)(`/api/knowledge_graphs/${Qi.id}/relation.json`,{method:"post",body:Rt({type:2,parent_id:ho},fi)});Vi(!1),di.status===0&&(Vt.ZP.info("\u5173\u8054\u6210\u529F"),Cs(),to(""),Ar(!1),nr.setFieldsValue({relation:null}))})},lt.createElement(It.default.Item,{name:"relation",label:"\u7C7B\u578B"},lt.createElement(je.default,{getPopupContainer:()=>ni.current,placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},lt.createElement(je.default.Option,{value:1},"\u5173\u8054"),lt.createElement(je.default.Option,{value:2},"\u540E\u5E8F"))))),Sr&<.createElement(xe.default,{open:Sr,centered:!0,width:550,title:"\u67E5\u627E",getContainer:()=>ni.current,onCancel:()=>{to(""),lo(!1)},okButtonProps:{loading:Ui},onOk:()=>{var fi,di,lr,Nr,Ir,Jr,vo,Zo,Wo,ts;lo(!1),(fi=Er.current)==null||fi.clearSelection(),(di=$r.current)==null||di.clearSelection();const ql=(Nr=(lr=$r.current)==null?void 0:lr.findNodeForKey)==null?void 0:Nr.call(lr,ho),Nl=(Jr=(Ir=Er.current)==null?void 0:Ir.findNodeForKey)==null?void 0:Jr.call(Ir,ho);(Zo=(vo=Er.current)==null?void 0:vo.commandHandler)==null||Zo.scrollToPart(Nl),(ts=(Wo=$r.current)==null?void 0:Wo.commandHandler)==null||ts.scrollToPart(ql),ql&&(ql.isSelected=!0,Js&&(ws({left:0,top:0,bottom:0,right:0}),Yi(ql.data))),Nl&&(Nl.isSelected=!0,Js&&(ws({left:0,top:0,bottom:0,right:0}),Yi(Nl.data))),to(""),un("")}},lt.createElement(se.default.Search,{size:"large",allowClear:!0,onChange:fi=>{let di=fi.target.value;const lr=wr.filter(Nr=>Nr.title.indexOf(di)>-1).map(Nr=>Nr.key);Kr(lr),lr.length<=0?mr(!0):mr(!1),Io(!0),un(fi.target.value)}}),Fi?lt.createElement(ii.Z,null):lt.createElement(Xt.default,{onExpand:fi=>{Kr(fi),Io(!1)},style:{maxHeight:400,height:400,marginTop:20,overflow:"auto"},onSelect:fi=>{to(fi==null?void 0:fi[0])},expandedKeys:ro,defaultExpandAll:!0,autoExpandParent:So,treeData:fa})),lt.createElement(xe.default,{title:"\u5386\u53F2\u8BB0\u5F55",open:Eo,onCancel:()=>Is(!1),footer:!1},lt.createElement("div",{style:{maxHeight:200,overflow:"auto",padding:10}},lt.createElement(Hi(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:()=>qt(void 0,null,function*(){var fi;rs(hs+1);let di=yield(0,Nt.ZP)("/api/knowledge_graphs/history.json",{method:"get",params:{identifier:Si.virtual_spacesId,limit:10,page:hs+1}});di.status===0&&(go([...zr,...di==null?void 0:di.histories]),((fi=di==null?void 0:di.histories)==null?void 0:fi.length)<10&&ol(!1))}),hasMore:cr,useWindow:!1},lt.createElement(Se.Z,{dataSource:zr,renderItem:fi=>lt.createElement(Se.Z.Item,{key:fi.id},lt.createElement(Se.Z.Item.Meta,{avatar:lt.createElement(Pt,{src:Qn.Z.IMG_SERVER+"/images/"+fi.avatar_url}),title:lt.createElement("span",null,fi.real_name),description:fi.content}),lt.createElement("div",null,fi.created_at))})))))};var cn=(0,Dt.connect)(({virtualSpaces:an,globalSetting:Qe})=>({globalSetting:Qe,virtualSpaces:an}))(nn),Ne=dt(59301),Fe=Object.defineProperty,Xe=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,vi=(an,Qe,We)=>Qe in an?Fe(an,Qe,{enumerable:!0,configurable:!0,writable:!0,value:We}):an[Qe]=We,$i=(an,Qe)=>{for(var We in Qe||(Qe={}))li.call(Qe,We)&&vi(an,We,Qe[We]);if(vn)for(var We of vn(Qe))jn.call(Qe,We)&&vi(an,We,Qe[We]);return an},Ji=(an,Qe)=>Xe(an,Je(Qe)),yn=(an,Qe,We)=>new Promise((mn,fn)=>{var Wn=pn=>{try{Si(We.next(pn))}catch(wi){fn(wi)}},$e=pn=>{try{Si(We.throw(pn))}catch(wi){fn(wi)}},Si=pn=>pn.done?mn(pn.value):Promise.resolve(pn.value).then(Wn,$e);Si((We=We.apply(an,Qe)).next())});const zi={1:"position_and_target",2:"desc",3:"knowledge_graph",4:"knowledge"},Ri=({globalSetting:an,dispatch:Qe,virtualSpaces:We})=>{var mn;const[fn]=(0,Dt.useSearchParams)(),[Wn,$e]=(0,lt.useState)(!0),[Si,pn]=(0,lt.useState)(!1),[wi,Wi]=(0,lt.useState)(!1),[Ui,Vi]=(0,lt.useState)(!1),[Ki,Oi]=(0,lt.useState)({}),[qi,fr]=(0,lt.useState)(""),[tr,ai]=(0,lt.useState)((fn==null?void 0:fn.get("active"))||"position_and_target"),{virtualSpacesDetails:Lt}=We,ur=(0,Dt.useParams)(),Qi=(Lt==null?void 0:Lt.is_member)||(0,ee.Ny)(),[Yi]=It.default.useForm();(0,lt.useEffect)(()=>{ui()},[tr,window.localStorage.getItem("vtrsModuleId")]);const[nr,_i]=(0,lt.useState)([]),ui=()=>yn(void 0,null,function*(){$e(!0);let Gn=yield(0,Nt.ZP)(`/api/virtual_classrooms/${ur.virtual_spacesId}/knowledge_systems/show.json`,{method:"get",params:{column:tr,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});if((Gn==null?void 0:Gn.status)!==-1){Oi($i({},Gn)),fr((Gn==null?void 0:Gn[tr])||"");let gi=[],Li=[],pi=[];const ni=Gn==null?void 0:Gn.knowledge_tabs;Object.entries(ni).forEach(([kn,ji])=>{if(ji)switch(kn){case"show_position_and_target":gi.push(1),pi.push("position_and_target"),Li.push({id:"position_and_target",name:"\u8BFE\u7A0B\u5B9A\u4F4D\u4E0E\u76EE\u6807"});break;case"show_knowledge_point":gi.push(2),pi.push("desc"),Li.push({id:"desc",name:"\u8BFE\u7A0B\u77E5\u8BC6\u70B9"});break;case"show_knowledge_graph_desc":gi.push(3),pi.push("knowledge_graph"),Li.push({id:"knowledge_graph",name:"\u77E5\u8BC6\u56FE\u8C31\u63CF\u8FF0"});break;case"show_knowledge_graph":gi.push(4),pi.push("knowledge"),Li.push({id:"knowledge",name:"\u77E5\u8BC6\u56FE\u8C31"});break;default:break}}),Yi.setFieldValue("checkData",gi),_i([...Li]),pi!=null&&pi.includes(tr)||ai(zi[gi[0]])}$e(!1)}),Ei=()=>yn(void 0,null,function*(){pn(!0);const Gn={};Gn[tr]=qi;let gi=yield(0,Nt.ZP)(`/api/virtual_classrooms/${ur.virtual_spacesId}/knowledge_systems/edit.json`,{method:"put",body:Ji($i({},Gn),{virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});(gi==null?void 0:gi.status)!==-1&&(ui(),Wi(!1)),pn(!1)}),Mi=(Gn,gi)=>{xe.default.confirm({title:"\u63D0\u793A",okText:"\u786E\u5B9A\u5220\u9664",okButtonProps:{danger:!0},icon:!1,className:ce.Z.CustomTipsModalCss,cancelText:"\u53D6\u6D88",content:Ne.createElement("div",null,Ne.createElement("div",null,"\u786E\u8BA4\u5220\u9664 ",gi," \u5417\uFF1F"),Ne.createElement("div",{className:"mt10"},"\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C")),onOk:()=>yn(void 0,null,function*(){const Li=yield(0,Nt.ZP)(`/api/virtual_classrooms/${ur.virtual_spacesId}/knowledge_systems/${Gn}/del_content.json`,{method:"delete"});(Li==null?void 0:Li.status)!==-1&&ui()})})};return Ne.createElement("section",{className:Yt.wrap},Ne.createElement(Oe.YG,{value:tr,onChange:Gn=>{Gn!==tr&&(ai(Gn),Wi(!1))},tabBarExtraContent:Qi&&Ne.createElement("div",{style:{display:"flex",alignItems:"center"}},Ne.createElement("i",{className:"iconfont icon-a-bianzu21 font20 mr20",style:{cursor:"pointer"},onClick:()=>{Vi(!0)}}),tr==="position_and_target"&&Ne.createElement(Oe.op,{onClick:()=>Wi(!0)}," ",Ne.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91"),tr==="desc"&&Ne.createElement(_t.Z,{align:"middle"},Ne.createElement(Oe.op,{onClick:()=>Wi(!0)}," ",Ne.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91\u8BF4\u660E"),Ne.createElement(Oe.op,{onClick:()=>{Dt.history.push(`/${Kt.AS}/${ur.virtual_spacesId}/knowledge/add?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},className:"ml20"}," ",Ne.createElement("i",{className:"iconfont icon-tianjiashitixiaojiahao font14 mr5"}),"\u65B0\u589E\u77E5\u8BC6\u70B9\u6A21\u5757")),tr==="knowledge_graph"&&Ne.createElement(Oe.op,{onClick:()=>Wi(!0)}," ",Ne.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91\u77E5\u8BC6\u56FE\u8C31")),dataSource:nr}),Ne.createElement(Gt.Z,{spinning:Wn},tr!=="desc"&&Ne.createElement("div",{className:tr!=="knowledge"&&"mt20"},wi?Ne.createElement(Ne.Fragment,null,Ne.createElement(jt.Z,{onChange:Gn=>fr(Gn),watch:!0,defaultValue:qi}),Ne.createElement(Oe.QD,{confirmTitle:"\u4FDD\u5B58",confirmLoading:Si,confirmClick:Ei,cancelClick:()=>{Wi(!1),fr(Ki[tr]||"")},cancelTitle:"\u53D6\u6D88",className:"mb25"})):Ne.createElement(Me.Z,{value:qi})),tr==="knowledge"&&Ne.createElement(cn,null),tr==="desc"&&Ne.createElement("div",{className:Yt.content},!!qi&&Ne.createElement("div",{className:Yt.name},Ne.createElement("aside",null,"\u8BF4\u660E"),Ne.createElement(Me.Z,{value:qi})),(mn=Ki==null?void 0:Ki.subject_modules)==null?void 0:mn.map(Gn=>{const{members:{module_content:gi,module_name:Li,subject_module_id:pi}}=Gn;return Ne.createElement("div",{className:Yt.list,key:pi},Ne.createElement("div",{className:Yt.head},Ne.createElement("div",{className:Yt.models},Li),Qi&&Ne.createElement("div",{className:Yt.btns},Ne.createElement("div",{onClick:()=>Dt.history.push(`/${Kt.AS}/${ur.virtual_spacesId}/knowledge/${pi}/edit?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},Ne.createElement("span",{className:"primary-hover"},Ne.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91")),Ne.createElement("div",{onClick:()=>Mi(pi,Li)},Ne.createElement("span",{className:"delete-hover"}," ",Ne.createElement("i",{className:"iconfont icon-piliangshanchubeifen font14 mr5"}),"\u5220\u9664")))),Ne.createElement("div",{className:Yt.rowsHead},Ne.createElement("div",null,"\u77E5\u8BC6\u70B9"),Ne.createElement("div",null,"\u4E3B\u8981\u5185\u5BB9"),Ne.createElement("div",null,"\u80FD\u529B\u76EE\u6807"),Ne.createElement("div",{className:Yt.time},"\u5B66\u65F6"),Ne.createElement("div",{style:{marginRight:0}},"\u6559\u6848")),gi==null?void 0:gi.map((ni,kn)=>{const{knowledge_point:ji,content:br,target:Dr,class_hour:Or,lesson_plan:Vr}=ni;return Ne.createElement("div",{className:Yt.rowsBody,key:kn},Ne.createElement("div",null,ji),Ne.createElement("pre",null,br),Ne.createElement("pre",null,Dr),Ne.createElement("div",{className:Yt.time},Or),Ne.createElement("div",{style:{marginRight:0}},Ne.createElement(Me.Z,{value:Vr})))}))})),Ne.createElement(xe.default,{title:"\u7F16\u8F91\u8BF4\u660E",destroyOnClose:!0,open:tr==="desc"&&wi,onOk:Ei,centered:!0,onCancel:()=>{Wi(!1),fr(Ki[tr]||"")},confirmLoading:Si,width:686,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:ce.Z.CustomCss},Ne.createElement("div",null,"\u8BF4\u660E\uFF1A"),Ne.createElement(jt.Z,{onChange:Gn=>fr(Gn),watch:!0,defaultValue:qi})),Ne.createElement(xe.default,{title:"\u77E5\u8BC6\u4F53\u7CFB\u6A21\u5757\u8BBE\u7F6E",destroyOnClose:!0,open:Ui,onOk:()=>yn(void 0,null,function*(){var Gn,gi,Li,pi,ni;if(((Gn=Yi.getFieldValue("checkData"))==null?void 0:Gn.length)==0)return Vt.ZP.error("\u81F3\u5C11\u9700\u8981\u9009\u62E9\u4E00\u4E2A\u9009\u9879"),!1;const kn=yield(0,Nt.ZP)(`/api/virtual_classrooms/${ur.virtual_spacesId}/knowledge_systems/tabs_setting.json`,{method:"put",body:{virtual_module_id:window.localStorage.getItem("vtrsModuleId"),knowledge_system_id:Ki==null?void 0:Ki.id,show_position_and_target:(gi=Yi.getFieldValue("checkData"))==null?void 0:gi.includes(1),show_knowledge_point:(Li=Yi.getFieldValue("checkData"))==null?void 0:Li.includes(2),show_knowledge_graph_desc:(pi=Yi.getFieldValue("checkData"))==null?void 0:pi.includes(3),show_knowledge_graph:(ni=Yi.getFieldValue("checkData"))==null?void 0:ni.includes(4)}});(kn==null?void 0:kn.status)!==-1&&(ui(),Vi(!1))}),centered:!0,onCancel:()=>{Vi(!1)},confirmLoading:Si,width:530,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:ce.Z.CustomCss},Ne.createElement(It.default,{form:Yi,style:{marginBottom:"-20px",marginTop:"10px"}},Ne.createElement(It.default.Item,{name:"checkData"},Ne.createElement(me.default.Group,null,Ne.createElement(me.default,{value:1},"\u8BFE\u7A0B\u5B9A\u4F4D\u4E0E\u76EE\u6807"),Ne.createElement(me.default,{value:2},"\u8BFE\u7A0B\u77E5\u8BC6\u70B9"),Ne.createElement(me.default,{value:3},"\u77E5\u8BC6\u56FE\u8C31\u63CF\u8FF0"),Ne.createElement(me.default,{value:4},"\u77E5\u8BC6\u56FE\u8C31")))))))};var Ii=(0,Dt.connect)(({virtualSpaces:an,globalSetting:Qe})=>({globalSetting:Qe,virtualSpaces:an}))(Ri)},67195:function(Yn,qe,dt){"use strict";dt.d(qe,{BU:function(){return Dt},Dj:function(){return lt},gH:function(){return It},vp:function(){return xe}});function lt(_t){try{_t.mozRequestFullScreen?_t.mozRequestFullScreen():_t.webkitRequestFullScreen&&_t.webkitRequestFullScreen()}catch(Gt){console.log(Gt,":e")}}function Dt(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const It=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function xe(){var _t=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Gt=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",_t),window.isFullScreen?window.isFullScreen:_t!=null}},20047:function(Yn,qe,dt){"use strict";dt.d(qe,{AL:function(){return se},Iy:function(){return Oe},Qv:function(){return ce},ez:function(){return je},jb:function(){return jt}});var lt=dt(32834),Dt=dt.n(lt),It=dt(11690),xe=dt.n(It);let _t=1;function Gt(be,Le){const en=be.match(/^(\s+)(?:```)/);if(en===null)return Le;const ie=en[1];return Le.split(`
|
|
|
`).map(Re=>{const De=Re.match(/^\s+/);if(De===null)return Re;const[Tt]=De;return Tt.length>=ie.length?Re.slice(ie.length):Re}).join(`
|
|
|
`)}let Vt=[],me=["<ul>"];const Yt=new(Dt()).Renderer,Nt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Oe(){Vt.length=0,me=["<ul>"]}const jt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Me(be,Le,en,ie){if(Le>=be.length||be[Le].level<=en)return Le;var Re=be[Le];ie.push("<li><a href='#"+_t+Re.anchor+"'>"+Re.text+"</a>"),Le++;var De=[];return Le=Me(be,Le,Re.level,De),De.length>0&&(ie.push("<ul>"),De.forEach(function(Tt){ie.push(Tt)}),ie.push("</ul>")),ie.push("</li>"),Le=Me(be,Le,en,ie),Le}function ce(){return Me(Vt,0,0,me),me.push("</ul>"),me.join("")}const ee={heading(be){const Le=Nt.exec(be);if(_t+=1,Le)return{type:"heading",raw:Le[0],depth:Le[1].length,text:Le[2]}},fences(be){const Le=this.rules.block.fences.exec(be);if(Le){const en=Le[0];let ie=Gt(en,Le[3]||"");const Re=Le[2]?Le[2].trim():Le[2];if(["latex","katex","math"].indexOf(Re)>=0){const De=de(),Tt=ie;ie=De,Ae[De]={type:"block",expression:Tt}}return{type:"code",raw:en,lang:Re,text:ie}}}},Kt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ht=0;const de=()=>`__special_katext_id_${Ht++}__`;let Ae={};function je(){return Ae}function se(){Ht=0,Ae={}}function Xt(be){return be=be.replace(Kt,(Le,en)=>{const ie=de();return Ae[ie]={type:"inline",expression:en},ie}),be}const ve=Yt.listitem;Yt.listitem=function(be){return ve(Xt(be))};const Qt=Yt.paragraph;Yt.paragraph=function(be){return Qt(Xt(be))};const Se=Yt.tablecell;Yt.tablecell=function(be,Le){return Se(Xt(be),Le)},Yt.code=function(be,Le,en){const ie=(Le||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?`<p class='editormd-tex'>${be}</p>`:`<pre class="prettyprint linenums"><code class="language-${Le}">${en?be:(0,It.escape)(be,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(en?be:(0,It.escape)(be,!0))+"</code></pre>"},Yt.heading=function(be,Le,en){let ie=this.options.headerPrefix+en.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Vt.push({anchor:ie,level:Le,text:be}),"<h"+Le+' id="'+_t+ie+'">'+be+"</h"+Le+">"},Dt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Dt().use({tokenizer:ee,renderer:Yt}),qe.ZP=Dt()},9981:function(Yn,qe){"use strict";const dt=function(){const lt=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Dt=1;Dt<arguments.length;Dt++){const It=Dt<0||arguments.length<=Dt?void 0:arguments[Dt];It&&Object.keys(It).forEach(xe=>{const _t=It[xe];_t!==void 0&&(lt[xe]=_t)})}return lt};qe.Z=dt},86013:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(19248);const It=xe=>{let _t;return typeof xe=="object"&&(xe!=null&&xe.clearIcon)?_t=xe:xe&&(_t={clearIcon:lt.createElement(Dt.Z,null)}),_t};qe.Z=It},54500:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return lt}});const lt=Dt=>Dt?typeof Dt=="function"?Dt():Dt:null},62673:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return be}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(16632),_t=dt(8654),Gt=dt(12919),Vt=dt(63872),me=dt(48755),Yt=dt(2171),Nt=dt(83397),Oe=dt(56553),Me=lt.createContext(null),ce=dt(36170),ee=dt(74632),Kt=function(Le,en){var ie={};for(var Re in Le)Object.prototype.hasOwnProperty.call(Le,Re)&&en.indexOf(Re)<0&&(ie[Re]=Le[Re]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Re=Object.getOwnPropertySymbols(Le);De<Re.length;De++)en.indexOf(Re[De])<0&&Object.prototype.propertyIsEnumerable.call(Le,Re[De])&&(ie[Re[De]]=Le[Re[De]]);return ie};const Ht=(Le,en)=>{var ie;const{prefixCls:Re,className:De,rootClassName:Tt,children:rn,indeterminate:we=!1,style:Ue,onMouseEnter:On,onMouseLeave:zt,skipGroup:kt=!1,disabled:Ye}=Le,wn=Kt(Le,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:on,direction:$t,checkbox:Ee}=lt.useContext(me.E_),Be=lt.useContext(Me),{isFormItemInput:Cn}=lt.useContext(Oe.aM),Ie=lt.useContext(Yt.Z),gn=(ie=(Be==null?void 0:Be.disabled)||Ye)!==null&&ie!==void 0?ie:Ie,ke=lt.useRef(wn.value),Dn=lt.useRef(null),ln=(0,_t.sQ)(en,Dn);lt.useEffect(()=>{Be==null||Be.registerValue(wn.value)},[]),lt.useEffect(()=>{if(!kt)return wn.value!==ke.current&&(Be==null||Be.cancelValue(ke.current),Be==null||Be.registerValue(wn.value),ke.current=wn.value),()=>Be==null?void 0:Be.cancelValue(wn.value)},[wn.value]),lt.useEffect(()=>{var re;!((re=Dn.current)===null||re===void 0)&&re.input&&(Dn.current.input.indeterminate=we)},[we]);const bt=on("checkbox",Re),gt=(0,Nt.Z)(bt),[pt,Ct,Pt]=(0,ce.ZP)(bt,gt),vt=Object.assign({},wn);Be&&!kt&&(vt.onChange=function(){wn.onChange&&wn.onChange.apply(wn,arguments),Be.toggleOption&&Be.toggleOption({label:rn,value:wn.value})},vt.name=Be.name,vt.checked=Be.value.includes(wn.value));const Et=It()(`${bt}-wrapper`,{[`${bt}-rtl`]:$t==="rtl",[`${bt}-wrapper-checked`]:vt.checked,[`${bt}-wrapper-disabled`]:gn,[`${bt}-wrapper-in-form-item`]:Cn},Ee==null?void 0:Ee.className,De,Tt,Pt,gt,Ct),Zt=It()({[`${bt}-indeterminate`]:we},Vt.A,Ct),[Ve,ue]=(0,ee.Z)(vt.onClick);return pt(lt.createElement(Gt.Z,{component:"Checkbox",disabled:gn},lt.createElement("label",{className:Et,style:Object.assign(Object.assign({},Ee==null?void 0:Ee.style),Ue),onMouseEnter:On,onMouseLeave:zt,onClick:Ve},lt.createElement(xe.Z,Object.assign({},vt,{onClick:ue,prefixCls:bt,className:Zt,disabled:gn,ref:ln})),rn!==void 0&<.createElement("span",{className:`${bt}-label`},rn))))};var Ae=lt.forwardRef(Ht),je=dt(77654),se=dt(2738),Xt=function(Le,en){var ie={};for(var Re in Le)Object.prototype.hasOwnProperty.call(Le,Re)&&en.indexOf(Re)<0&&(ie[Re]=Le[Re]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Re=Object.getOwnPropertySymbols(Le);De<Re.length;De++)en.indexOf(Re[De])<0&&Object.prototype.propertyIsEnumerable.call(Le,Re[De])&&(ie[Re[De]]=Le[Re[De]]);return ie},Qt=lt.forwardRef((Le,en)=>{const{defaultValue:ie,children:Re,options:De=[],prefixCls:Tt,className:rn,rootClassName:we,style:Ue,onChange:On}=Le,zt=Xt(Le,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:kt,direction:Ye}=lt.useContext(me.E_),[wn,on]=lt.useState(zt.value||ie||[]),[$t,Ee]=lt.useState([]);lt.useEffect(()=>{"value"in zt&&on(zt.value||[])},[zt.value]);const Be=lt.useMemo(()=>De.map(Zt=>typeof Zt=="string"||typeof Zt=="number"?{label:Zt,value:Zt}:Zt),[De]),Cn=Zt=>{Ee(Ve=>Ve.filter(ue=>ue!==Zt))},Ie=Zt=>{Ee(Ve=>[].concat((0,je.Z)(Ve),[Zt]))},gn=Zt=>{const Ve=wn.indexOf(Zt.value),ue=(0,je.Z)(wn);Ve===-1?ue.push(Zt.value):ue.splice(Ve,1),"value"in zt||on(ue),On==null||On(ue.filter(re=>$t.includes(re)).sort((re,Ce)=>{const Te=Be.findIndex(te=>te.value===re),tn=Be.findIndex(te=>te.value===Ce);return Te-tn}))},ke=kt("checkbox",Tt),Dn=`${ke}-group`,ln=(0,Nt.Z)(ke),[bt,gt,pt]=(0,ce.ZP)(ke,ln),Ct=(0,se.Z)(zt,["value","disabled"]),Pt=De.length?Be.map(Zt=>lt.createElement(Ae,{prefixCls:ke,key:Zt.value.toString(),disabled:"disabled"in Zt?Zt.disabled:zt.disabled,value:Zt.value,checked:wn.includes(Zt.value),onChange:Zt.onChange,className:`${Dn}-item`,style:Zt.style,title:Zt.title,id:Zt.id,required:Zt.required},Zt.label)):Re,vt={toggleOption:gn,value:wn,disabled:zt.disabled,name:zt.name,registerValue:Ie,cancelValue:Cn},Et=It()(Dn,{[`${Dn}-rtl`]:Ye==="rtl"},rn,we,pt,ln,gt);return bt(lt.createElement("div",Object.assign({className:Et,style:Ue},Ct,{ref:en}),lt.createElement(Me.Provider,{value:vt},Pt)))});const Se=Ae;Se.Group=Qt,Se.__ANT_CHECKBOX=!0;var be=Se},36170:function(Yn,qe,dt){"use strict";dt.d(qe,{C2:function(){return Gt}});var lt=dt(36237),Dt=dt(63356),It=dt(51636),xe=dt(16931);const _t=Vt=>{const{checkboxCls:me}=Vt,Yt=`${me}-wrapper`;return[{[`${me}-group`]:Object.assign(Object.assign({},(0,Dt.Wf)(Vt)),{display:"inline-flex",flexWrap:"wrap",columnGap:Vt.marginXS,[`> ${Vt.antCls}-row`]:{flex:1}}),[Yt]:Object.assign(Object.assign({},(0,Dt.Wf)(Vt)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Yt}`]:{marginInlineStart:0},[`&${Yt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[me]:Object.assign(Object.assign({},(0,Dt.Wf)(Vt)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Vt.borderRadiusSM,alignSelf:"center",[`${me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${me}-inner`]:Object.assign({},(0,Dt.oN)(Vt))},[`${me}-inner`]:{boxSizing:"border-box",display:"block",width:Vt.checkboxSize,height:Vt.checkboxSize,direction:"ltr",backgroundColor:Vt.colorBgContainer,border:`${(0,lt.unit)(Vt.lineWidth)} ${Vt.lineType} ${Vt.colorBorder}`,borderRadius:Vt.borderRadiusSM,borderCollapse:"separate",transition:`all ${Vt.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:Vt.calc(Vt.checkboxSize).div(14).mul(5).equal(),height:Vt.calc(Vt.checkboxSize).div(14).mul(8).equal(),border:`${(0,lt.unit)(Vt.lineWidthBold)} solid ${Vt.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Vt.motionDurationFast} ${Vt.motionEaseInBack}, opacity ${Vt.motionDurationFast}`}},"& + span":{paddingInlineStart:Vt.paddingXS,paddingInlineEnd:Vt.paddingXS}})},{[`
|
|
|
${Yt}:not(${Yt}-disabled),
|
|
|
${me}:not(${me}-disabled)
|
|
|
`]:{[`&:hover ${me}-inner`]:{borderColor:Vt.colorPrimary}},[`${Yt}:not(${Yt}-disabled)`]:{[`&:hover ${me}-checked:not(${me}-disabled) ${me}-inner`]:{backgroundColor:Vt.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${me}-checked:not(${me}-disabled):after`]:{borderColor:Vt.colorPrimaryHover}}},{[`${me}-checked`]:{[`${me}-inner`]:{backgroundColor:Vt.colorPrimary,borderColor:Vt.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Vt.motionDurationMid} ${Vt.motionEaseOutBack} ${Vt.motionDurationFast}`}}},[`
|
|
|
${Yt}-checked:not(${Yt}-disabled),
|
|
|
${me}-checked:not(${me}-disabled)
|
|
|
`]:{[`&:hover ${me}-inner`]:{backgroundColor:Vt.colorPrimaryHover,borderColor:"transparent"}}},{[me]:{"&-indeterminate":{[`${me}-inner`]:{backgroundColor:`${Vt.colorBgContainer} !important`,borderColor:`${Vt.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:Vt.calc(Vt.fontSizeLG).div(2).equal(),height:Vt.calc(Vt.fontSizeLG).div(2).equal(),backgroundColor:Vt.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${me}-inner`]:{backgroundColor:`${Vt.colorBgContainer} !important`,borderColor:`${Vt.colorPrimary} !important`}}}},{[`${Yt}-disabled`]:{cursor:"not-allowed"},[`${me}-disabled`]:{[`&, ${me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${me}-inner`]:{background:Vt.colorBgContainerDisabled,borderColor:Vt.colorBorder,"&:after":{borderColor:Vt.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Vt.colorTextDisabled},[`&${me}-indeterminate ${me}-inner::after`]:{background:Vt.colorTextDisabled}}}]};function Gt(Vt,me){const Yt=(0,It.mergeToken)(me,{checkboxCls:`.${Vt}`,checkboxSize:me.controlInteractiveSize});return[_t(Yt)]}qe.ZP=(0,xe.I$)("Checkbox",(Vt,me)=>{let{prefixCls:Yt}=me;return[Gt(Yt,Vt)]})},38406:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(48755),It=dt(584);const xe=_t=>{const{componentName:Gt}=_t,{getPrefixCls:Vt}=(0,lt.useContext)(Dt.E_),me=Vt("empty");switch(Gt){case"Table":case"List":return lt.createElement(It.Z,{image:It.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return lt.createElement(It.Z,{image:It.Z.PRESENTED_IMAGE_SIMPLE,className:`${me}-small`});case"Table.filter":return null;default:return lt.createElement(It.Z,null)}};qe.Z=xe},36207:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Ve}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(85899),_t=dt(72190),Gt=dt(43403),Vt=dt(34280),me=lt.createContext(null),Yt=lt.createContext({}),Nt=me,Oe=dt(18642),jt=dt(60499),Me=dt(77900),ce=dt(10228),ee=dt(26112),Kt=dt(42244),Ht=dt(8654),de=["prefixCls","className","containerRef"],Ae=function(re){var Ce=re.prefixCls,Te=re.className,tn=re.containerRef,te=(0,Kt.Z)(re,de),le=lt.useContext(Yt),bn=le.panel,Sn=(0,Ht.x1)(bn,tn);return lt.createElement("div",(0,jt.Z)({className:It()("".concat(Ce,"-content"),Te),role:"dialog",ref:Sn},(0,ee.Z)(re,{aria:!0}),{"aria-modal":"true"},te))},je=Ae,se=dt(48736);function Xt(ue){return typeof ue=="string"&&String(Number(ue))===ue?((0,se.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(ue)):ue}function ve(ue){warning(!("wrapperClassName"in ue),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!ue.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Qt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Se(ue,re){var Ce,Te,tn,te=ue.prefixCls,le=ue.open,bn=ue.placement,Sn=ue.inline,Rn=ue.push,In=ue.forceRender,sn=ue.autoFocus,Hn=ue.keyboard,Mn=ue.classNames,ye=ue.rootClassName,Ze=ue.rootStyle,En=ue.zIndex,An=ue.className,he=ue.id,Ke=ue.style,hn=ue.motion,Pn=ue.width,_n=ue.height,ci=ue.children,yi=ue.mask,Ni=ue.maskClosable,ri=ue.maskMotion,yt=ue.maskClassName,Tn=ue.maskStyle,xn=ue.afterOpenChange,Bn=ue.onClose,Zn=ue.onMouseEnter,Nn=ue.onMouseOver,Ln=ue.onMouseLeave,ii=ue.onClick,Qn=ue.onKeyDown,xi=ue.onKeyUp,Xn=ue.styles,$n=ue.drawerRender,Hi=lt.useRef(),Bi=lt.useRef(),sr=lt.useRef();lt.useImperativeHandle(re,function(){return Hi.current});var Jn=function(Xe){var Je=Xe.keyCode,vn=Xe.shiftKey;switch(Je){case ce.Z.TAB:{if(Je===ce.Z.TAB){if(!vn&&document.activeElement===sr.current){var li;(li=Bi.current)===null||li===void 0||li.focus({preventScroll:!0})}else if(vn&&document.activeElement===Bi.current){var jn;(jn=sr.current)===null||jn===void 0||jn.focus({preventScroll:!0})}}break}case ce.Z.ESC:{Bn&&Hn&&(Xe.stopPropagation(),Bn(Xe));break}}};lt.useEffect(function(){if(le&&sn){var Fe;(Fe=Hi.current)===null||Fe===void 0||Fe.focus({preventScroll:!0})}},[le]);var Vn=lt.useState(!1),oi=(0,_t.Z)(Vn,2),Ti=oi[0],Ci=oi[1],Rt=lt.useContext(Nt),Pe;typeof Rn=="boolean"?Pe=Rn?{}:{distance:0}:Pe=Rn||{};var qt=(Ce=(Te=(tn=Pe)===null||tn===void 0?void 0:tn.distance)!==null&&Te!==void 0?Te:Rt==null?void 0:Rt.pushDistance)!==null&&Ce!==void 0?Ce:180,He=lt.useMemo(function(){return{pushDistance:qt,push:function(){Ci(!0)},pull:function(){Ci(!1)}}},[qt]);lt.useEffect(function(){if(le){var Fe;Rt==null||(Fe=Rt.push)===null||Fe===void 0||Fe.call(Rt)}else{var Xe;Rt==null||(Xe=Rt.pull)===null||Xe===void 0||Xe.call(Rt)}},[le]),lt.useEffect(function(){return function(){var Fe;Rt==null||(Fe=Rt.pull)===null||Fe===void 0||Fe.call(Rt)}},[]);var ae=yi&<.createElement(Me.default,(0,jt.Z)({key:"mask"},ri,{visible:le}),function(Fe,Xe){var Je=Fe.className,vn=Fe.style;return lt.createElement("div",{className:It()("".concat(te,"-mask"),Je,Mn==null?void 0:Mn.mask,yt),style:(0,xe.Z)((0,xe.Z)((0,xe.Z)({},vn),Tn),Xn==null?void 0:Xn.mask),onClick:Ni&&le?Bn:void 0,ref:Xe})}),ze=typeof hn=="function"?hn(bn):hn,Jt={};if(Ti&&qt)switch(bn){case"top":Jt.transform="translateY(".concat(qt,"px)");break;case"bottom":Jt.transform="translateY(".concat(-qt,"px)");break;case"left":Jt.transform="translateX(".concat(qt,"px)");break;default:Jt.transform="translateX(".concat(-qt,"px)");break}bn==="left"||bn==="right"?Jt.width=Xt(Pn):Jt.height=Xt(_n);var nn={onMouseEnter:Zn,onMouseOver:Nn,onMouseLeave:Ln,onClick:ii,onKeyDown:Qn,onKeyUp:xi},cn=lt.createElement(Me.default,(0,jt.Z)({key:"panel"},ze,{visible:le,forceRender:In,onVisibleChanged:function(Xe){xn==null||xn(Xe)},removeOnLeave:!1,leavedClassName:"".concat(te,"-content-wrapper-hidden")}),function(Fe,Xe){var Je=Fe.className,vn=Fe.style,li=lt.createElement(je,(0,jt.Z)({id:he,containerRef:Xe,prefixCls:te,className:It()(An,Mn==null?void 0:Mn.content),style:(0,xe.Z)((0,xe.Z)({},Ke),Xn==null?void 0:Xn.content)},(0,ee.Z)(ue,{aria:!0}),nn),ci);return lt.createElement("div",(0,jt.Z)({className:It()("".concat(te,"-content-wrapper"),Mn==null?void 0:Mn.wrapper,Je),style:(0,xe.Z)((0,xe.Z)((0,xe.Z)({},Jt),vn),Xn==null?void 0:Xn.wrapper)},(0,ee.Z)(ue,{data:!0})),$n?$n(li):li)}),Ne=(0,xe.Z)({},Ze);return En&&(Ne.zIndex=En),lt.createElement(Nt.Provider,{value:He},lt.createElement("div",{className:It()(te,"".concat(te,"-").concat(bn),ye,(0,Oe.Z)((0,Oe.Z)({},"".concat(te,"-open"),le),"".concat(te,"-inline"),Sn)),style:Ne,tabIndex:-1,ref:Hi,onKeyDown:Jn},ae,lt.createElement("div",{tabIndex:0,ref:Bi,style:Qt,"aria-hidden":"true","data-sentinel":"start"}),cn,lt.createElement("div",{tabIndex:0,ref:sr,style:Qt,"aria-hidden":"true","data-sentinel":"end"})))}var be=lt.forwardRef(Se),Le=be,en=function(re){var Ce=re.open,Te=Ce===void 0?!1:Ce,tn=re.prefixCls,te=tn===void 0?"rc-drawer":tn,le=re.placement,bn=le===void 0?"right":le,Sn=re.autoFocus,Rn=Sn===void 0?!0:Sn,In=re.keyboard,sn=In===void 0?!0:In,Hn=re.width,Mn=Hn===void 0?378:Hn,ye=re.mask,Ze=ye===void 0?!0:ye,En=re.maskClosable,An=En===void 0?!0:En,he=re.getContainer,Ke=re.forceRender,hn=re.afterOpenChange,Pn=re.destroyOnClose,_n=re.onMouseEnter,ci=re.onMouseOver,yi=re.onMouseLeave,Ni=re.onClick,ri=re.onKeyDown,yt=re.onKeyUp,Tn=re.panelRef,xn=lt.useState(!1),Bn=(0,_t.Z)(xn,2),Zn=Bn[0],Nn=Bn[1],Ln=lt.useState(!1),ii=(0,_t.Z)(Ln,2),Qn=ii[0],xi=ii[1];(0,Vt.Z)(function(){xi(!0)},[]);var Xn=Qn?Te:!1,$n=lt.useRef(),Hi=lt.useRef();(0,Vt.Z)(function(){Xn&&(Hi.current=document.activeElement)},[Xn]);var Bi=function(Ti){var Ci;if(Nn(Ti),hn==null||hn(Ti),!Ti&&Hi.current&&!((Ci=$n.current)!==null&&Ci!==void 0&&Ci.contains(Hi.current))){var Rt;(Rt=Hi.current)===null||Rt===void 0||Rt.focus({preventScroll:!0})}},sr=lt.useMemo(function(){return{panel:Tn}},[Tn]);if(!Ke&&!Zn&&!Xn&&Pn)return null;var Jn={onMouseEnter:_n,onMouseOver:ci,onMouseLeave:yi,onClick:Ni,onKeyDown:ri,onKeyUp:yt},Vn=(0,xe.Z)((0,xe.Z)({},re),{},{open:Xn,prefixCls:te,placement:bn,autoFocus:Rn,keyboard:sn,width:Mn,mask:Ze,maskClosable:An,inline:he===!1,afterOpenChange:Bi,ref:$n},Jn);return lt.createElement(Yt.Provider,{value:sr},lt.createElement(Gt.Z,{open:Xn||Ke||Zn,autoDestroy:!1,getContainer:he,autoLock:Ze&&(Xn||Zn)},lt.createElement(Le,Vn)))},ie=en,Re=ie,De=dt(62487),Tt=dt(75030),rn=dt(86641),we=dt(55743),Ue=dt(48755),On=dt(91190),zt=dt(78776),kt=dt(458),wn=ue=>{var re,Ce;const{prefixCls:Te,title:tn,footer:te,extra:le,loading:bn,onClose:Sn,headerStyle:Rn,bodyStyle:In,footerStyle:sn,children:Hn,classNames:Mn,styles:ye}=ue,Ze=(0,Ue.dj)("drawer"),En=lt.useCallback(Pn=>lt.createElement("button",{type:"button",onClick:Sn,"aria-label":"Close",className:`${Te}-close`},Pn),[Sn]),[An,he]=(0,zt.Z)((0,zt.w)(ue),(0,zt.w)(Ze),{closable:!0,closeIconRender:En}),Ke=lt.useMemo(()=>{var Pn,_n;return!tn&&!An?null:lt.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(Pn=Ze.styles)===null||Pn===void 0?void 0:Pn.header),Rn),ye==null?void 0:ye.header),className:It()(`${Te}-header`,{[`${Te}-header-close-only`]:An&&!tn&&!le},(_n=Ze.classNames)===null||_n===void 0?void 0:_n.header,Mn==null?void 0:Mn.header)},lt.createElement("div",{className:`${Te}-header-title`},he,tn&<.createElement("div",{className:`${Te}-title`},tn)),le&<.createElement("div",{className:`${Te}-extra`},le))},[An,he,le,Rn,Te,tn]),hn=lt.useMemo(()=>{var Pn,_n;if(!te)return null;const ci=`${Te}-footer`;return lt.createElement("div",{className:It()(ci,(Pn=Ze.classNames)===null||Pn===void 0?void 0:Pn.footer,Mn==null?void 0:Mn.footer),style:Object.assign(Object.assign(Object.assign({},(_n=Ze.styles)===null||_n===void 0?void 0:_n.footer),sn),ye==null?void 0:ye.footer)},te)},[te,sn,Te]);return lt.createElement(lt.Fragment,null,Ke,lt.createElement("div",{className:It()(`${Te}-body`,Mn==null?void 0:Mn.body,(re=Ze.classNames)===null||re===void 0?void 0:re.body),style:Object.assign(Object.assign(Object.assign({},(Ce=Ze.styles)===null||Ce===void 0?void 0:Ce.body),In),ye==null?void 0:ye.body)},bn?lt.createElement(kt.Z,{active:!0,title:!1,paragraph:{rows:5},className:`${Te}-body-skeleton`}):Hn),hn)},on=dt(36237),$t=dt(63356),Ee=dt(16931),Be=dt(51636);const Cn=ue=>{const re="100%";return{left:`translateX(-${re})`,right:`translateX(${re})`,top:`translateY(-${re})`,bottom:`translateY(${re})`}[ue]},Ie=(ue,re)=>({"&-enter, &-appear":Object.assign(Object.assign({},ue),{"&-active":re}),"&-leave":Object.assign(Object.assign({},re),{"&-active":ue})}),gn=(ue,re)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${re}`}}},Ie({opacity:ue},{opacity:1})),ke=(ue,re)=>[gn(.7,re),Ie({transform:Cn(ue)},{transform:"none"})];var ln=ue=>{const{componentCls:re,motionDurationSlow:Ce}=ue;return{[re]:{[`${re}-mask-motion`]:gn(0,Ce),[`${re}-panel-motion`]:["left","right","top","bottom"].reduce((Te,tn)=>Object.assign(Object.assign({},Te),{[`&-${tn}`]:ke(tn,Ce)}),{})}}};const bt=ue=>{const{borderRadiusSM:re,componentCls:Ce,zIndexPopup:Te,colorBgMask:tn,colorBgElevated:te,motionDurationSlow:le,motionDurationMid:bn,paddingXS:Sn,padding:Rn,paddingLG:In,fontSizeLG:sn,lineHeightLG:Hn,lineWidth:Mn,lineType:ye,colorSplit:Ze,marginXS:En,colorIcon:An,colorIconHover:he,colorBgTextHover:Ke,colorBgTextActive:hn,colorText:Pn,fontWeightStrong:_n,footerPaddingBlock:ci,footerPaddingInline:yi,calc:Ni}=ue,ri=`${Ce}-content-wrapper`;return{[Ce]:{position:"fixed",inset:0,zIndex:Te,pointerEvents:"none",color:Pn,"&-pure":{position:"relative",background:te,display:"flex",flexDirection:"column",[`&${Ce}-left`]:{boxShadow:ue.boxShadowDrawerLeft},[`&${Ce}-right`]:{boxShadow:ue.boxShadowDrawerRight},[`&${Ce}-top`]:{boxShadow:ue.boxShadowDrawerUp},[`&${Ce}-bottom`]:{boxShadow:ue.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Ce}-mask`]:{position:"absolute",inset:0,zIndex:Te,background:tn,pointerEvents:"auto"},[ri]:{position:"absolute",zIndex:Te,maxWidth:"100vw",transition:`all ${le}`,"&-hidden":{display:"none"}},[`&-left > ${ri}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:ue.boxShadowDrawerLeft},[`&-right > ${ri}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:ue.boxShadowDrawerRight},[`&-top > ${ri}`]:{top:0,insetInline:0,boxShadow:ue.boxShadowDrawerUp},[`&-bottom > ${ri}`]:{bottom:0,insetInline:0,boxShadow:ue.boxShadowDrawerDown},[`${Ce}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:te,pointerEvents:"auto"},[`${Ce}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,on.unit)(Rn)} ${(0,on.unit)(In)}`,fontSize:sn,lineHeight:Hn,borderBottom:`${(0,on.unit)(Mn)} ${ye} ${Ze}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Ce}-extra`]:{flex:"none"},[`${Ce}-close`]:Object.assign({display:"inline-flex",width:Ni(sn).add(Sn).equal(),height:Ni(sn).add(Sn).equal(),borderRadius:re,justifyContent:"center",alignItems:"center",marginInlineEnd:En,color:An,fontWeight:_n,fontSize:sn,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${bn}`,textRendering:"auto","&:hover":{color:he,backgroundColor:Ke,textDecoration:"none"},"&:active":{backgroundColor:hn}},(0,$t.Qy)(ue)),[`${Ce}-title`]:{flex:1,margin:0,fontWeight:ue.fontWeightStrong,fontSize:sn,lineHeight:Hn},[`${Ce}-body`]:{flex:1,minWidth:0,minHeight:0,padding:In,overflow:"auto",[`${Ce}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${Ce}-footer`]:{flexShrink:0,padding:`${(0,on.unit)(ci)} ${(0,on.unit)(yi)}`,borderTop:`${(0,on.unit)(Mn)} ${ye} ${Ze}`},"&-rtl":{direction:"rtl"}}}},gt=ue=>({zIndexPopup:ue.zIndexPopupBase,footerPaddingBlock:ue.paddingXS,footerPaddingInline:ue.padding});var pt=(0,Ee.I$)("Drawer",ue=>{const re=(0,Be.mergeToken)(ue,{});return[bt(re),ln(re)]},gt),Ct=function(ue,re){var Ce={};for(var Te in ue)Object.prototype.hasOwnProperty.call(ue,Te)&&re.indexOf(Te)<0&&(Ce[Te]=ue[Te]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tn=0,Te=Object.getOwnPropertySymbols(ue);tn<Te.length;tn++)re.indexOf(Te[tn])<0&&Object.prototype.propertyIsEnumerable.call(ue,Te[tn])&&(Ce[Te[tn]]=ue[Te[tn]]);return Ce};const Pt=null,vt={distance:180},Et=ue=>{var re;const{rootClassName:Ce,width:Te,height:tn,size:te="default",mask:le=!0,push:bn=vt,open:Sn,afterOpenChange:Rn,onClose:In,prefixCls:sn,getContainer:Hn,style:Mn,className:ye,visible:Ze,afterVisibleChange:En,maskStyle:An,drawerStyle:he,contentWrapperStyle:Ke}=ue,hn=Ct(ue,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:Pn,getPrefixCls:_n,direction:ci,className:yi,style:Ni,classNames:ri,styles:yt}=(0,Ue.dj)("drawer"),Tn=_n("drawer",sn),[xn,Bn,Zn]=pt(Tn),Nn=Hn===void 0&&Pn?()=>Pn(document.body):Hn,Ln=It()({"no-mask":!le,[`${Tn}-rtl`]:ci==="rtl"},Ce,Bn,Zn),ii=lt.useMemo(()=>Te!=null?Te:te==="large"?736:378,[Te,te]),Qn=lt.useMemo(()=>tn!=null?tn:te==="large"?736:378,[tn,te]),xi={motionName:(0,rn.m)(Tn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Xn=Vn=>({motionName:(0,rn.m)(Tn,`panel-motion-${Vn}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),$n=(0,On.H)(),[Hi,Bi]=(0,Tt.Cn)("Drawer",hn.zIndex),{classNames:sr={},styles:Jn={}}=hn;return xn(lt.createElement(De.Z,{form:!0,space:!0},lt.createElement(we.Z.Provider,{value:Bi},lt.createElement(Re,Object.assign({prefixCls:Tn,onClose:In,maskMotion:xi,motion:Xn},hn,{classNames:{mask:It()(sr.mask,ri.mask),content:It()(sr.content,ri.content),wrapper:It()(sr.wrapper,ri.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},Jn.mask),An),yt.mask),content:Object.assign(Object.assign(Object.assign({},Jn.content),he),yt.content),wrapper:Object.assign(Object.assign(Object.assign({},Jn.wrapper),Ke),yt.wrapper)},open:Sn!=null?Sn:Ze,mask:le,push:bn,width:ii,height:Qn,style:Object.assign(Object.assign({},Ni),Mn),className:It()(yi,ye),rootClassName:Ln,getContainer:Nn,afterOpenChange:Rn!=null?Rn:En,panelRef:$n,zIndex:Hi}),lt.createElement(wn,Object.assign({prefixCls:Tn},hn,{onClose:In}))))))},Zt=ue=>{const{prefixCls:re,style:Ce,className:Te,placement:tn="right"}=ue,te=Ct(ue,["prefixCls","style","className","placement"]),{getPrefixCls:le}=lt.useContext(Ue.E_),bn=le("drawer",re),[Sn,Rn,In]=pt(bn),sn=It()(bn,`${bn}-pure`,`${bn}-${tn}`,Rn,In,Te);return Sn(lt.createElement("div",{className:sn,style:Ce},lt.createElement(wn,Object.assign({prefixCls:bn},te))))};Et._InternalPanelDoNotUseOrYouWillBeFired=Zt;var Ve=Et},19563:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return on}});var lt=dt(59301),Dt=dt(33853),It=dt(38819),xe=dt(92310),_t=dt.n(xe),Gt=dt(96478),Vt=dt(6089),me=dt(18929),Yt=dt(2738),Nt=dt(75030),jt=$t=>typeof $t!="object"&&typeof $t!="function"||$t===null,Me=dt(52838),ce=dt(45915),ee=dt(22703),Kt=dt(32383),Ht=dt(55743),de=dt(48755),Ae=dt(83397),je=dt(93041),se=dt(78857),Xt=dt(57700),ve=dt(36237),Qt=dt(63356),Se=dt(46e3),be=dt(93873),Le=dt(34925),en=dt(37645),ie=dt(36305),Re=dt(16931),De=dt(51636),rn=$t=>{const{componentCls:Ee,menuCls:Be,colorError:Cn,colorTextLightSolid:Ie}=$t,gn=`${Be}-item`;return{[`${Ee}, ${Ee}-menu-submenu`]:{[`${Be} ${gn}`]:{[`&${gn}-danger:not(${gn}-disabled)`]:{color:Cn,"&:hover":{color:Ie,backgroundColor:Cn}}}}}};const we=$t=>{const{componentCls:Ee,menuCls:Be,zIndexPopup:Cn,dropdownArrowDistance:Ie,sizePopupArrow:gn,antCls:ke,iconCls:Dn,motionDurationMid:ln,paddingBlock:bt,fontSize:gt,dropdownEdgeChildPadding:pt,colorTextDisabled:Ct,fontSizeIcon:Pt,controlPaddingHorizontal:vt,colorBgElevated:Et}=$t;return[{[Ee]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Cn,display:"block","&::before":{position:"absolute",insetBlock:$t.calc(gn).div(2).sub(Ie).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${ke}-btn`]:{[`& > ${Dn}-down, & > ${ke}-btn-icon > ${Dn}-down`]:{fontSize:Pt}},[`${Ee}-wrap`]:{position:"relative",[`${ke}-btn > ${Dn}-down`]:{fontSize:Pt},[`${Dn}-down::before`]:{transition:`transform ${ln}`}},[`${Ee}-wrap-open`]:{[`${Dn}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${ke}-slide-down-enter${ke}-slide-down-enter-active${Ee}-placement-bottomLeft,
|
|
|
&${ke}-slide-down-appear${ke}-slide-down-appear-active${Ee}-placement-bottomLeft,
|
|
|
&${ke}-slide-down-enter${ke}-slide-down-enter-active${Ee}-placement-bottom,
|
|
|
&${ke}-slide-down-appear${ke}-slide-down-appear-active${Ee}-placement-bottom,
|
|
|
&${ke}-slide-down-enter${ke}-slide-down-enter-active${Ee}-placement-bottomRight,
|
|
|
&${ke}-slide-down-appear${ke}-slide-down-appear-active${Ee}-placement-bottomRight`]:{animationName:Se.fJ},[`&${ke}-slide-up-enter${ke}-slide-up-enter-active${Ee}-placement-topLeft,
|
|
|
&${ke}-slide-up-appear${ke}-slide-up-appear-active${Ee}-placement-topLeft,
|
|
|
&${ke}-slide-up-enter${ke}-slide-up-enter-active${Ee}-placement-top,
|
|
|
&${ke}-slide-up-appear${ke}-slide-up-appear-active${Ee}-placement-top,
|
|
|
&${ke}-slide-up-enter${ke}-slide-up-enter-active${Ee}-placement-topRight,
|
|
|
&${ke}-slide-up-appear${ke}-slide-up-appear-active${Ee}-placement-topRight`]:{animationName:Se.Qt},[`&${ke}-slide-down-leave${ke}-slide-down-leave-active${Ee}-placement-bottomLeft,
|
|
|
&${ke}-slide-down-leave${ke}-slide-down-leave-active${Ee}-placement-bottom,
|
|
|
&${ke}-slide-down-leave${ke}-slide-down-leave-active${Ee}-placement-bottomRight`]:{animationName:Se.Uw},[`&${ke}-slide-up-leave${ke}-slide-up-leave-active${Ee}-placement-topLeft,
|
|
|
&${ke}-slide-up-leave${ke}-slide-up-leave-active${Ee}-placement-top,
|
|
|
&${ke}-slide-up-leave${ke}-slide-up-leave-active${Ee}-placement-topRight`]:{animationName:Se.ly}}},(0,en.ZP)($t,Et,{arrowPlacement:{top:!0,bottom:!0}}),{[`${Ee} ${Be}`]:{position:"relative",margin:0},[`${Be}-submenu-popup`]:{position:"absolute",zIndex:Cn,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Ee}, ${Ee}-menu-submenu`]:Object.assign(Object.assign({},(0,Qt.Wf)($t)),{[Be]:Object.assign(Object.assign({padding:pt,listStyleType:"none",backgroundColor:Et,backgroundClip:"padding-box",borderRadius:$t.borderRadiusLG,outline:"none",boxShadow:$t.boxShadowSecondary},(0,Qt.Qy)($t)),{"&:empty":{padding:0,boxShadow:"none"},[`${Be}-item-group-title`]:{padding:`${(0,ve.unit)(bt)} ${(0,ve.unit)(vt)}`,color:$t.colorTextDescription,transition:`all ${ln}`},[`${Be}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Be}-item-icon`]:{minWidth:gt,marginInlineEnd:$t.marginXS,fontSize:$t.fontSizeSM},[`${Be}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${ln}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${Be}-item-extra`]:{paddingInlineStart:$t.padding,marginInlineStart:"auto",fontSize:$t.fontSizeSM,color:$t.colorTextDescription}},[`${Be}-item, ${Be}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,ve.unit)(bt)} ${(0,ve.unit)(vt)}`,color:$t.colorText,fontWeight:"normal",fontSize:gt,lineHeight:$t.lineHeight,cursor:"pointer",transition:`all ${ln}`,borderRadius:$t.borderRadiusSM,"&:hover, &-active":{backgroundColor:$t.controlItemBgHover}},(0,Qt.Qy)($t)),{"&-selected":{color:$t.colorPrimary,backgroundColor:$t.controlItemBgActive,"&:hover, &-active":{backgroundColor:$t.controlItemBgActiveHover}},"&-disabled":{color:Ct,cursor:"not-allowed","&:hover":{color:Ct,backgroundColor:Et,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,ve.unit)($t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:$t.colorSplit},[`${Ee}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:$t.paddingXS,[`${Ee}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:$t.colorTextDescription,fontSize:Pt,fontStyle:"normal"}}}),[`${Be}-item-group-list`]:{margin:`0 ${(0,ve.unit)($t.marginXS)}`,padding:0,listStyle:"none"},[`${Be}-submenu-title`]:{paddingInlineEnd:$t.calc(vt).add($t.fontSizeSM).equal()},[`${Be}-submenu-vertical`]:{position:"relative"},[`${Be}-submenu${Be}-submenu-disabled ${Ee}-menu-submenu-title`]:{[`&, ${Ee}-menu-submenu-arrow-icon`]:{color:Ct,backgroundColor:Et,cursor:"not-allowed"}},[`${Be}-submenu-selected ${Ee}-menu-submenu-title`]:{color:$t.colorPrimary}})})},[(0,Se.oN)($t,"slide-up"),(0,Se.oN)($t,"slide-down"),(0,be.Fm)($t,"move-up"),(0,be.Fm)($t,"move-down"),(0,Le._y)($t,"zoom-big")]]},Ue=$t=>Object.assign(Object.assign({zIndexPopup:$t.zIndexPopupBase+50,paddingBlock:($t.controlHeight-$t.fontSize*$t.lineHeight)/2},(0,en.wZ)({contentRadius:$t.borderRadiusLG,limitVerticalRadius:!0})),(0,ie.w)($t));var On=(0,Re.I$)("Dropdown",$t=>{const{marginXXS:Ee,sizePopupArrow:Be,paddingXXS:Cn,componentCls:Ie}=$t,gn=(0,De.mergeToken)($t,{menuCls:`${Ie}-menu`,dropdownArrowDistance:$t.calc(Be).div(2).add(Ee).equal(),dropdownEdgeChildPadding:Cn});return[we(gn),rn(gn)]},Ue,{resetStyle:!1});const zt=null,kt=$t=>{var Ee;const{menu:Be,arrow:Cn,prefixCls:Ie,children:gn,trigger:ke,disabled:Dn,dropdownRender:ln,getPopupContainer:bt,overlayClassName:gt,rootClassName:pt,overlayStyle:Ct,open:Pt,onOpenChange:vt,visible:Et,onVisibleChange:Zt,mouseEnterDelay:Ve=.15,mouseLeaveDelay:ue=.1,autoAdjustOverflow:re=!0,placement:Ce="",overlay:Te,transitionName:tn}=$t,{getPopupContainer:te,getPrefixCls:le,direction:bn,dropdown:Sn}=lt.useContext(de.E_),Rn=(0,Kt.ln)("Dropdown"),In=lt.useMemo(()=>{const Nn=le();return tn!==void 0?tn:Ce.includes("top")?`${Nn}-slide-down`:`${Nn}-slide-up`},[le,Ce,tn]),sn=lt.useMemo(()=>Ce?Ce.includes("Center")?Ce.slice(0,Ce.indexOf("Center")):Ce:bn==="rtl"?"bottomRight":"bottomLeft",[Ce,bn]),Hn=le("dropdown",Ie),Mn=(0,Ae.Z)(Hn),[ye,Ze,En]=On(Hn,Mn),[,An]=(0,Xt.ZP)(),he=lt.Children.only(jt(gn)?lt.createElement("span",null,gn):gn),Ke=(0,ee.Tm)(he,{className:_t()(`${Hn}-trigger`,{[`${Hn}-rtl`]:bn==="rtl"},he.props.className),disabled:(Ee=he.props.disabled)!==null&&Ee!==void 0?Ee:Dn}),hn=Dn?[]:ke,Pn=!!(hn!=null&&hn.includes("contextMenu")),[_n,ci]=(0,me.Z)(!1,{value:Pt!=null?Pt:Et}),yi=(0,Vt.Z)(Nn=>{vt==null||vt(Nn,{source:"trigger"}),Zt==null||Zt(Nn),ci(Nn)}),Ni=_t()(gt,pt,Ze,En,Mn,Sn==null?void 0:Sn.className,{[`${Hn}-rtl`]:bn==="rtl"}),ri=(0,Me.Z)({arrowPointAtCenter:typeof Cn=="object"&&Cn.pointAtCenter,autoAdjustOverflow:re,offset:An.marginXXS,arrowWidth:Cn?An.sizePopupArrow:0,borderRadius:An.borderRadius}),yt=lt.useCallback(()=>{Be!=null&&Be.selectable&&(Be!=null&&Be.multiple)||(vt==null||vt(!1,{source:"menu"}),ci(!1))},[Be==null?void 0:Be.selectable,Be==null?void 0:Be.multiple]),Tn=()=>{let Nn;return Be!=null&&Be.items?Nn=lt.createElement(je.default,Object.assign({},Be)):typeof Te=="function"?Nn=Te():Nn=Te,ln&&(Nn=ln(Nn)),Nn=lt.Children.only(typeof Nn=="string"?lt.createElement("span",null,Nn):Nn),lt.createElement(se.J,{prefixCls:`${Hn}-menu`,rootClassName:_t()(En,Mn),expandIcon:lt.createElement("span",{className:`${Hn}-menu-submenu-arrow`},bn==="rtl"?lt.createElement(Dt.Z,{className:`${Hn}-menu-submenu-arrow-icon`}):lt.createElement(It.Z,{className:`${Hn}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:yt,validator:Ln=>{let{mode:ii}=Ln}},Nn)},[xn,Bn]=(0,Nt.Cn)("Dropdown",Ct==null?void 0:Ct.zIndex);let Zn=lt.createElement(Gt.Z,Object.assign({alignPoint:Pn},(0,Yt.Z)($t,["rootClassName"]),{mouseEnterDelay:Ve,mouseLeaveDelay:ue,visible:_n,builtinPlacements:ri,arrow:!!Cn,overlayClassName:Ni,prefixCls:Hn,getPopupContainer:bt||te,transitionName:In,trigger:hn,overlay:Tn,placement:sn,onVisibleChange:yi,overlayStyle:Object.assign(Object.assign(Object.assign({},Sn==null?void 0:Sn.style),Ct),{zIndex:xn})}),Ke);return xn&&(Zn=lt.createElement(Ht.Z.Provider,{value:Bn},Zn)),ye(Zn)},Ye=(0,ce.Z)(kt,"align",void 0,"dropdown",$t=>$t),wn=$t=>lt.createElement(Ye,Object.assign({},$t),lt.createElement("span",null));kt._InternalPanelDoNotUseOrYouWillBeFired=wn;var on=kt},75727:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return ce}});var lt=dt(19563),Dt=dt(59301),It=dt(18785),xe=dt(92310),_t=dt.n(xe),Gt=dt(7939),Vt=dt(48755),me=dt(44104),Yt=dt(70045),Nt=function(ee,Kt){var Ht={};for(var de in ee)Object.prototype.hasOwnProperty.call(ee,de)&&Kt.indexOf(de)<0&&(Ht[de]=ee[de]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,de=Object.getOwnPropertySymbols(ee);Ae<de.length;Ae++)Kt.indexOf(de[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ee,de[Ae])&&(Ht[de[Ae]]=ee[de[Ae]]);return Ht};const Oe=ee=>{const{getPopupContainer:Kt,getPrefixCls:Ht,direction:de}=Dt.useContext(Vt.E_),{prefixCls:Ae,type:je="default",danger:se,disabled:Xt,loading:ve,onClick:Qt,htmlType:Se,children:be,className:Le,menu:en,arrow:ie,autoFocus:Re,overlay:De,trigger:Tt,align:rn,open:we,onOpenChange:Ue,placement:On,getPopupContainer:zt,href:kt,icon:Ye=Dt.createElement(It.Z,null),title:wn,buttonsRender:on=Ve=>Ve,mouseEnterDelay:$t,mouseLeaveDelay:Ee,overlayClassName:Be,overlayStyle:Cn,destroyPopupOnHide:Ie,dropdownRender:gn}=ee,ke=Nt(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"]),Dn=Ht("dropdown",Ae),ln=`${Dn}-button`,bt={menu:en,arrow:ie,autoFocus:Re,align:rn,disabled:Xt,trigger:Xt?[]:Tt,onOpenChange:Ue,getPopupContainer:zt||Kt,mouseEnterDelay:$t,mouseLeaveDelay:Ee,overlayClassName:Be,overlayStyle:Cn,destroyPopupOnHide:Ie,dropdownRender:gn},{compactSize:gt,compactItemClassnames:pt}=(0,Yt.ri)(Dn,de),Ct=_t()(ln,pt,Le);"overlay"in ee&&(bt.overlay=De),"open"in ee&&(bt.open=we),"placement"in ee?bt.placement=On:bt.placement=de==="rtl"?"bottomLeft":"bottomRight";const Pt=Dt.createElement(Gt.ZP,{type:je,danger:se,disabled:Xt,loading:ve,onClick:Qt,htmlType:Se,href:kt,title:wn},be),vt=Dt.createElement(Gt.ZP,{type:je,danger:se,icon:Ye}),[Et,Zt]=on([Pt,vt]);return Dt.createElement(me.Z.Compact,Object.assign({className:Ct,size:gt,block:!0},ke),Et,Dt.createElement(lt.Z,Object.assign({},bt),Zt))};Oe.__ANT_BUTTON=!0;var jt=Oe;const Me=lt.Z;Me.Button=jt;var ce=Me},584:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return je}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(9017),_t=dt(17835),Gt=dt(57700),me=()=>{const[,se]=(0,Gt.ZP)(),[Xt]=(0,xe.Z)("Empty"),Qt=new _t.FastColor(se.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return lt.createElement("svg",{style:Qt,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},lt.createElement("title",null,(Xt==null?void 0:Xt.description)||"Empty"),lt.createElement("g",{fill:"none",fillRule:"evenodd"},lt.createElement("g",{transform:"translate(24 31.67)"},lt.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),lt.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"}),lt.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)"}),lt.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"}),lt.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"})),lt.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"}),lt.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},lt.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),lt.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Nt=()=>{const[,se]=(0,Gt.ZP)(),[Xt]=(0,xe.Z)("Empty"),{colorFill:ve,colorFillTertiary:Qt,colorFillQuaternary:Se,colorBgContainer:be}=se,{borderColor:Le,shadowColor:en,contentColor:ie}=(0,lt.useMemo)(()=>({borderColor:new _t.FastColor(ve).onBackground(be).toHexString(),shadowColor:new _t.FastColor(Qt).onBackground(be).toHexString(),contentColor:new _t.FastColor(Se).onBackground(be).toHexString()}),[ve,Qt,Se,be]);return lt.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},lt.createElement("title",null,(Xt==null?void 0:Xt.description)||"Empty"),lt.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},lt.createElement("ellipse",{fill:en,cx:"32",cy:"33",rx:"32",ry:"7"}),lt.createElement("g",{fillRule:"nonzero",stroke:Le},lt.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"}),lt.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:ie}))))},Oe=dt(16931),jt=dt(51636);const Me=se=>{const{componentCls:Xt,margin:ve,marginXS:Qt,marginXL:Se,fontSize:be,lineHeight:Le}=se;return{[Xt]:{marginInline:Qt,fontSize:be,lineHeight:Le,textAlign:"center",[`${Xt}-image`]:{height:se.emptyImgHeight,marginBottom:Qt,opacity:se.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Xt}-description`]:{color:se.colorTextDescription},[`${Xt}-footer`]:{marginTop:ve},"&-normal":{marginBlock:Se,color:se.colorTextDescription,[`${Xt}-description`]:{color:se.colorTextDescription},[`${Xt}-image`]:{height:se.emptyImgHeightMD}},"&-small":{marginBlock:Qt,color:se.colorTextDescription,[`${Xt}-image`]:{height:se.emptyImgHeightSM}}}}};var ce=(0,Oe.I$)("Empty",se=>{const{componentCls:Xt,controlHeightLG:ve,calc:Qt}=se,Se=(0,jt.mergeToken)(se,{emptyImgCls:`${Xt}-img`,emptyImgHeight:Qt(ve).mul(2.5).equal(),emptyImgHeightMD:ve,emptyImgHeightSM:Qt(ve).mul(.875).equal()});return[Me(Se)]}),ee=dt(48755),Kt=function(se,Xt){var ve={};for(var Qt in se)Object.prototype.hasOwnProperty.call(se,Qt)&&Xt.indexOf(Qt)<0&&(ve[Qt]=se[Qt]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,Qt=Object.getOwnPropertySymbols(se);Se<Qt.length;Se++)Xt.indexOf(Qt[Se])<0&&Object.prototype.propertyIsEnumerable.call(se,Qt[Se])&&(ve[Qt[Se]]=se[Qt[Se]]);return ve};const Ht=lt.createElement(me,null),de=lt.createElement(Nt,null),Ae=se=>{const{className:Xt,rootClassName:ve,prefixCls:Qt,image:Se=Ht,description:be,children:Le,imageStyle:en,style:ie,classNames:Re,styles:De}=se,Tt=Kt(se,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:rn,direction:we,className:Ue,style:On,classNames:zt,styles:kt}=(0,ee.dj)("empty"),Ye=rn("empty",Qt),[wn,on,$t]=ce(Ye),[Ee]=(0,xe.Z)("Empty"),Be=typeof be!="undefined"?be:Ee==null?void 0:Ee.description,Cn=typeof Be=="string"?Be:"empty";let Ie=null;return typeof Se=="string"?Ie=lt.createElement("img",{alt:Cn,src:Se}):Ie=Se,wn(lt.createElement("div",Object.assign({className:It()(on,$t,Ye,Ue,{[`${Ye}-normal`]:Se===de,[`${Ye}-rtl`]:we==="rtl"},Xt,ve,zt.root,Re==null?void 0:Re.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},kt.root),On),De==null?void 0:De.root),ie)},Tt),lt.createElement("div",{className:It()(`${Ye}-image`,zt.image,Re==null?void 0:Re.image),style:Object.assign(Object.assign(Object.assign({},en),kt.image),De==null?void 0:De.image)},Ie),Be&<.createElement("div",{className:It()(`${Ye}-description`,zt.description,Re==null?void 0:Re.description),style:Object.assign(Object.assign({},kt.description),De==null?void 0:De.description)},Be),Le&<.createElement("div",{className:It()(`${Ye}-footer`,zt.footer,Re==null?void 0:Re.footer),style:Object.assign(Object.assign({},kt.footer),De==null?void 0:De.footer)},Le)))};Ae.PRESENTED_IMAGE_DEFAULT=Ht,Ae.PRESENTED_IMAGE_SIMPLE=de;var je=Ae},28284:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return Pe}});var lt=dt(56553),Dt=dt(77654),It=dt(59301),xe=dt(92310),_t=dt.n(xe),Gt=dt(77900),Vt=dt(86641),me=dt(83397);function Yt(qt){const[He,ae]=It.useState(qt);return It.useEffect(()=>{const ze=setTimeout(()=>{ae(qt)},qt.length?0:10);return()=>{clearTimeout(ze)}},[qt]),He}var Nt=dt(36237),Oe=dt(63356),jt=dt(34925),Me=dt(34961),ce=dt(51636),ee=dt(16931),Ht=qt=>{const{componentCls:He}=qt,ae=`${He}-show-help`,ze=`${He}-show-help-item`;return{[ae]:{transition:`opacity ${qt.motionDurationFast} ${qt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ze]:{overflow:"hidden",transition:`height ${qt.motionDurationFast} ${qt.motionEaseInOut},
|
|
|
opacity ${qt.motionDurationFast} ${qt.motionEaseInOut},
|
|
|
transform ${qt.motionDurationFast} ${qt.motionEaseInOut} !important`,[`&${ze}-appear, &${ze}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ze}-leave-active`]:{transform:"translateY(-5px)"}}}}};const de=qt=>({legend:{display:"block",width:"100%",marginBottom:qt.marginLG,padding:0,color:qt.colorTextDescription,fontSize:qt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,Nt.unit)(qt.lineWidth)} ${qt.lineType} ${qt.colorBorder}`},'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 ${(0,Nt.unit)(qt.controlOutlineWidth)} ${qt.controlOutline}`},output:{display:"block",paddingTop:15,color:qt.colorText,fontSize:qt.fontSize,lineHeight:qt.lineHeight}}),Ae=(qt,He)=>{const{formItemCls:ae}=qt;return{[ae]:{[`${ae}-label > label`]:{height:He},[`${ae}-control-input`]:{minHeight:He}}}},je=qt=>{const{componentCls:He}=qt;return{[qt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Oe.Wf)(qt)),de(qt)),{[`${He}-text`]:{display:"inline-block",paddingInlineEnd:qt.paddingSM},"&-small":Object.assign({},Ae(qt,qt.controlHeightSM)),"&-large":Object.assign({},Ae(qt,qt.controlHeightLG))})}},se=qt=>{const{formItemCls:He,iconCls:ae,rootPrefixCls:ze,antCls:Jt,labelRequiredMarkColor:nn,labelColor:cn,labelFontSize:Ne,labelHeight:Fe,labelColonMarginInlineStart:Xe,labelColonMarginInlineEnd:Je,itemMarginBottom:vn}=qt;return{[He]:Object.assign(Object.assign({},(0,Oe.Wf)(qt)),{marginBottom:vn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${Jt}-row`]:{display:"none"},"&-has-warning":{[`${He}-split`]:{color:qt.colorError}},"&-has-error":{[`${He}-split`]:{color:qt.colorWarning}},[`${He}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:qt.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Fe,color:cn,fontSize:Ne,[`> ${ae}`]:{fontSize:qt.fontSize,verticalAlign:"top"},[`&${He}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:qt.marginXXS,color:nn,fontSize:qt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${He}-required-mark-hidden, &${He}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${He}-optional`]:{display:"inline-block",marginInlineStart:qt.marginXXS,color:qt.colorTextDescription,[`&${He}-required-mark-hidden`]:{display:"none"}},[`${He}-tooltip`]:{color:qt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:qt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Xe,marginInlineEnd:Je},[`&${He}-no-colon::after`]:{content:'"\\a0"'}}},[`${He}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ze}-col-'"]):not([class*="' ${ze}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:qt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[He]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:qt.colorTextDescription,fontSize:qt.fontSize,lineHeight:qt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:qt.controlHeightSM,transition:`color ${qt.motionDurationMid} ${qt.motionEaseOut}`},"&-explain":{"&-error":{color:qt.colorError},"&-warning":{color:qt.colorWarning}}},[`&-with-help ${He}-explain`]:{height:"auto",opacity:1},[`${He}-feedback-icon`]:{fontSize:qt.fontSize,textAlign:"center",visibility:"visible",animationName:jt.kr,animationDuration:qt.motionDurationMid,animationTimingFunction:qt.motionEaseOutBack,pointerEvents:"none","&-success":{color:qt.colorSuccess},"&-error":{color:qt.colorError},"&-warning":{color:qt.colorWarning},"&-validating":{color:qt.colorPrimary}}})}},Xt=(qt,He)=>{const{formItemCls:ae}=qt;return{[`${He}-horizontal`]:{[`${ae}-label`]:{flexGrow:0},[`${ae}-control`]:{flex:"1 1 0",minWidth:0},[`${ae}-label[class$='-24'], ${ae}-label[class*='-24 ']`]:{[`& + ${ae}-control`]:{minWidth:"unset"}}}}},ve=qt=>{const{componentCls:He,formItemCls:ae,inlineItemMarginBottom:ze}=qt;return{[`${He}-inline`]:{display:"flex",flexWrap:"wrap",[ae]:{flex:"none",marginInlineEnd:qt.margin,marginBottom:ze,"&-row":{flexWrap:"nowrap"},[`> ${ae}-label,
|
|
|
> ${ae}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ae}-label`]:{flex:"none"},[`${He}-text`]:{display:"inline-block"},[`${ae}-has-feedback`]:{display:"inline-block"}}}}},Qt=qt=>({padding:qt.verticalLabelPadding,margin:qt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Se=qt=>{const{componentCls:He,formItemCls:ae,rootPrefixCls:ze}=qt;return{[`${ae} ${ae}-label`]:Qt(qt),[`${He}:not(${He}-inline)`]:{[ae]:{flexWrap:"wrap",[`${ae}-label, ${ae}-control`]:{[`&:not([class*=" ${ze}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},be=qt=>{const{componentCls:He,formItemCls:ae,antCls:ze}=qt;return{[`${He}-vertical`]:{[`${ae}:not(${ae}-horizontal)`]:{[`${ae}-row`]:{flexDirection:"column"},[`${ae}-label > label`]:{height:"auto"},[`${ae}-control`]:{width:"100%"},[`${ae}-label,
|
|
|
${ze}-col-24${ae}-label,
|
|
|
${ze}-col-xl-24${ae}-label`]:Qt(qt)}},[`@media (max-width: ${(0,Nt.unit)(qt.screenXSMax)})`]:[Se(qt),{[He]:{[`${ae}:not(${ae}-horizontal)`]:{[`${ze}-col-xs-24${ae}-label`]:Qt(qt)}}}],[`@media (max-width: ${(0,Nt.unit)(qt.screenSMMax)})`]:{[He]:{[`${ae}:not(${ae}-horizontal)`]:{[`${ze}-col-sm-24${ae}-label`]:Qt(qt)}}},[`@media (max-width: ${(0,Nt.unit)(qt.screenMDMax)})`]:{[He]:{[`${ae}:not(${ae}-horizontal)`]:{[`${ze}-col-md-24${ae}-label`]:Qt(qt)}}},[`@media (max-width: ${(0,Nt.unit)(qt.screenLGMax)})`]:{[He]:{[`${ae}:not(${ae}-horizontal)`]:{[`${ze}-col-lg-24${ae}-label`]:Qt(qt)}}}}},Le=qt=>{const{formItemCls:He,antCls:ae}=qt;return{[`${He}-vertical`]:{[`${He}-row`]:{flexDirection:"column"},[`${He}-label > label`]:{height:"auto"},[`${He}-control`]:{width:"100%"}},[`${He}-vertical ${He}-label,
|
|
|
${ae}-col-24${He}-label,
|
|
|
${ae}-col-xl-24${He}-label`]:Qt(qt),[`@media (max-width: ${(0,Nt.unit)(qt.screenXSMax)})`]:[Se(qt),{[He]:{[`${ae}-col-xs-24${He}-label`]:Qt(qt)}}],[`@media (max-width: ${(0,Nt.unit)(qt.screenSMMax)})`]:{[He]:{[`${ae}-col-sm-24${He}-label`]:Qt(qt)}},[`@media (max-width: ${(0,Nt.unit)(qt.screenMDMax)})`]:{[He]:{[`${ae}-col-md-24${He}-label`]:Qt(qt)}},[`@media (max-width: ${(0,Nt.unit)(qt.screenLGMax)})`]:{[He]:{[`${ae}-col-lg-24${He}-label`]:Qt(qt)}}}},en=qt=>({labelRequiredMarkColor:qt.colorError,labelColor:qt.colorTextHeading,labelFontSize:qt.fontSize,labelHeight:qt.controlHeight,labelColonMarginInlineStart:qt.marginXXS/2,labelColonMarginInlineEnd:qt.marginXS,itemMarginBottom:qt.marginLG,verticalLabelPadding:`0 0 ${qt.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ie=(qt,He)=>(0,ce.mergeToken)(qt,{formItemCls:`${qt.componentCls}-item`,rootPrefixCls:He});var Re=(0,ee.I$)("Form",(qt,He)=>{let{rootPrefixCls:ae}=He;const ze=ie(qt,ae);return[je(ze),se(ze),Ht(ze),Xt(ze,ze.componentCls),Xt(ze,ze.formItemCls),ve(ze),be(ze),Le(ze),(0,Me.Z)(ze),jt.kr]},en,{order:-1e3});const De=[];function Tt(qt,He,ae){let ze=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof qt=="string"?qt:`${He}-${ze}`,error:qt,errorStatus:ae}}var we=qt=>{let{help:He,helpStatus:ae,errors:ze=De,warnings:Jt=De,className:nn,fieldId:cn,onVisibleChanged:Ne}=qt;const{prefixCls:Fe}=It.useContext(lt.Rk),Xe=`${Fe}-item-explain`,Je=(0,me.Z)(Fe),[vn,li,jn]=Re(Fe,Je),vi=It.useMemo(()=>(0,Vt.Z)(Fe),[Fe]),$i=Yt(ze),Ji=Yt(Jt),yn=It.useMemo(()=>He!=null?[Tt(He,"help",ae)]:[].concat((0,Dt.Z)($i.map((Ii,an)=>Tt(Ii,"error","error",an))),(0,Dt.Z)(Ji.map((Ii,an)=>Tt(Ii,"warning","warning",an)))),[He,ae,$i,Ji]),zi=It.useMemo(()=>{const Ii={};return yn.forEach(an=>{let{key:Qe}=an;Ii[Qe]=(Ii[Qe]||0)+1}),yn.map((an,Qe)=>Object.assign(Object.assign({},an),{key:Ii[an.key]>1?`${an.key}-fallback-${Qe}`:an.key}))},[yn]),Ri={};return cn&&(Ri.id=`${cn}_help`),vn(It.createElement(Gt.default,{motionDeadline:vi.motionDeadline,motionName:`${Fe}-show-help`,visible:!!zi.length,onVisibleChanged:Ne},Ii=>{const{className:an,style:Qe}=Ii;return It.createElement("div",Object.assign({},Ri,{className:_t()(Xe,an,jn,Je,nn,li),style:Qe}),It.createElement(Gt.CSSMotionList,Object.assign({keys:zi},(0,Vt.Z)(Fe),{motionName:`${Fe}-show-help-item`,component:!1}),We=>{const{key:mn,error:fn,errorStatus:Wn,className:$e,style:Si}=We;return It.createElement("div",{key:mn,className:_t()($e,{[`${Xe}-${Wn}`]:Wn}),style:Si},fn)}))}))},Ue=dt(69180),On=dt(48755),zt=dt(2171),kt=dt(31756),Ye=dt(23069),wn=dt(76846),on=dt(16722);const $t=["parentNode"],Ee="form_item";function Be(qt){return qt===void 0||qt===!1?[]:Array.isArray(qt)?qt:[qt]}function Cn(qt,He){if(!qt.length)return;const ae=qt.join("_");return He?`${He}_${ae}`:$t.includes(ae)?`${Ee}_${ae}`:ae}function Ie(qt,He,ae,ze,Jt,nn){let cn=ze;return nn!==void 0?cn=nn:ae.validating?cn="validating":qt.length?cn="error":He.length?cn="warning":(ae.touched||Jt&&ae.validated)&&(cn="success"),cn}var gn=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae};function ke(qt){return Be(qt).join("_")}function Dn(qt,He){const ae=He.getFieldInstance(qt),ze=(0,wn.bn)(ae);if(ze)return ze;const Jt=Cn(Be(qt),He.__INTERNAL__.name);if(Jt)return document.getElementById(Jt)}function ln(qt){const[He]=(0,Ue.useForm)(),ae=It.useRef({}),ze=It.useMemo(()=>qt!=null?qt:Object.assign(Object.assign({},He),{__INTERNAL__:{itemRef:Jt=>nn=>{const cn=ke(Jt);nn?ae.current[cn]=nn:delete ae.current[cn]}},scrollToField:function(Jt){let nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:cn}=nn,Ne=gn(nn,["focus"]),Fe=Dn(Jt,ze);Fe&&((0,on.Z)(Fe,Object.assign({scrollMode:"if-needed",block:"nearest"},Ne)),cn&&ze.focusField(Jt))},focusField:Jt=>{var nn,cn;const Ne=ze.getFieldInstance(Jt);typeof(Ne==null?void 0:Ne.focus)=="function"?Ne.focus():(cn=(nn=Dn(Jt,ze))===null||nn===void 0?void 0:nn.focus)===null||cn===void 0||cn.call(nn)},getFieldInstance:Jt=>{const nn=ke(Jt);return ae.current[nn]}}),[qt,He]);return[ze]}var bt=dt(98350),gt=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae};const pt=(qt,He)=>{const ae=It.useContext(zt.Z),{getPrefixCls:ze,direction:Jt,requiredMark:nn,colon:cn,scrollToFirstError:Ne,className:Fe,style:Xe}=(0,On.dj)("form"),{prefixCls:Je,className:vn,rootClassName:li,size:jn,disabled:vi=ae,form:$i,colon:Ji,labelAlign:yn,labelWrap:zi,labelCol:Ri,wrapperCol:Ii,hideRequiredMark:an,layout:Qe="horizontal",scrollToFirstError:We,requiredMark:mn,onFinishFailed:fn,name:Wn,style:$e,feedbackIcons:Si,variant:pn}=qt,wi=gt(qt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Wi=(0,kt.Z)(jn),Ui=It.useContext(bt.Z),Vi=It.useMemo(()=>mn!==void 0?mn:an?!1:nn!==void 0?nn:!0,[an,mn,nn]),Ki=Ji!=null?Ji:cn,Oi=ze("form",Je),qi=(0,me.Z)(Oi),[fr,tr,ai]=Re(Oi,qi),Lt=_t()(Oi,`${Oi}-${Qe}`,{[`${Oi}-hide-required-mark`]:Vi===!1,[`${Oi}-rtl`]:Jt==="rtl",[`${Oi}-${Wi}`]:Wi},ai,qi,tr,Fe,vn,li),[ur]=ln($i),{__INTERNAL__:Qi}=ur;Qi.name=Wn;const Yi=It.useMemo(()=>({name:Wn,labelAlign:yn,labelCol:Ri,labelWrap:zi,wrapperCol:Ii,vertical:Qe==="vertical",colon:Ki,requiredMark:Vi,itemRef:Qi.itemRef,form:ur,feedbackIcons:Si}),[Wn,yn,Ri,Ii,Qe,Ki,Vi,ur,Si]),nr=It.useRef(null);It.useImperativeHandle(He,()=>{var Ei;return Object.assign(Object.assign({},ur),{nativeElement:(Ei=nr.current)===null||Ei===void 0?void 0:Ei.nativeElement})});const _i=(Ei,Mi)=>{if(Ei){let Gn={block:"nearest"};typeof Ei=="object"&&(Gn=Object.assign(Object.assign({},Gn),Ei)),ur.scrollToField(Mi,Gn)}},ui=Ei=>{if(fn==null||fn(Ei),Ei.errorFields.length){const Mi=Ei.errorFields[0].name;if(We!==void 0){_i(We,Mi);return}Ne!==void 0&&_i(Ne,Mi)}};return fr(It.createElement(lt.pg.Provider,{value:pn},It.createElement(zt.n,{disabled:vi},It.createElement(Ye.Z.Provider,{value:Wi},It.createElement(lt.RV,{validateMessages:Ui},It.createElement(lt.q3.Provider,{value:Yi},It.createElement(Ue.default,Object.assign({id:Wn},wi,{name:Wn,onFinishFailed:ui,form:ur,ref:nr,style:Object.assign(Object.assign({},Xe),$e),className:Lt}))))))))};var Pt=It.forwardRef(pt),vt=dt(41799),Et=dt(8654),Zt=dt(22703),Ve=dt(32383),ue=dt(11592);function re(qt){if(typeof qt=="function")return qt;const He=(0,ue.Z)(qt);return He.length<=1?He[0]:He}const Ce=()=>{const{status:qt,errors:He=[],warnings:ae=[]}=It.useContext(lt.aM);return{status:qt,errors:He,warnings:ae}};Ce.Context=lt.aM;var Te=Ce,tn=dt(16089);function te(qt){const[He,ae]=It.useState(qt),ze=It.useRef(null),Jt=It.useRef([]),nn=It.useRef(!1);It.useEffect(()=>(nn.current=!1,()=>{nn.current=!0,tn.Z.cancel(ze.current),ze.current=null}),[]);function cn(Ne){nn.current||(ze.current===null&&(Jt.current=[],ze.current=(0,tn.Z)(()=>{ze.current=null,ae(Fe=>{let Xe=Fe;return Jt.current.forEach(Je=>{Xe=Je(Xe)}),Xe})})),Jt.current.push(Ne))}return[He,cn]}function le(){const{itemRef:qt}=It.useContext(lt.q3),He=It.useRef({});function ae(ze,Jt){const nn=Jt&&typeof Jt=="object"&&(0,Et.C4)(Jt),cn=ze.join("_");return(He.current.name!==cn||He.current.originRef!==nn)&&(He.current.name=cn,He.current.originRef=nn,He.current.ref=(0,Et.sQ)(qt(ze),nn)),He.current.ref}return ae}var bn=dt(29194),Sn=dt(34280),Rn=dt(2738),In=dt(65970),sn=dt(70425),Hn=dt(5472);const Mn=qt=>{const{formItemCls:He}=qt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${He}-control`]:{display:"flex"}}}};var ye=(0,ee.bk)(["Form","item-item"],(qt,He)=>{let{rootPrefixCls:ae}=He;const ze=ie(qt,ae);return[Mn(ze)]}),Ze=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae};const En=24;var he=qt=>{const{prefixCls:He,status:ae,labelCol:ze,wrapperCol:Jt,children:nn,errors:cn,warnings:Ne,_internalItemRender:Fe,extra:Xe,help:Je,fieldId:vn,marginBottom:li,onErrorVisibleChanged:jn,label:vi}=qt,$i=`${He}-item`,Ji=It.useContext(lt.q3),yn=It.useMemo(()=>{let wi=Object.assign({},Jt||Ji.wrapperCol||{});return vi===null&&!ze&&!Jt&&Ji.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(Ui=>{const Vi=Ui?[Ui]:[],Ki=(0,sn.U2)(Ji.labelCol,Vi),Oi=typeof Ki=="object"?Ki:{},qi=(0,sn.U2)(wi,Vi),fr=typeof qi=="object"?qi:{};"span"in Oi&&!("offset"in fr)&&Oi.span<En&&(wi=(0,sn.t8)(wi,[].concat(Vi,["offset"]),Oi.span))}),wi},[Jt,Ji]),zi=_t()(`${$i}-control`,yn.className),Ri=It.useMemo(()=>{const{labelCol:wi,wrapperCol:Wi}=Ji;return Ze(Ji,["labelCol","wrapperCol"])},[Ji]),Ii=It.useRef(null),[an,Qe]=It.useState(0);(0,Sn.Z)(()=>{Xe&&Ii.current?Qe(Ii.current.clientHeight):Qe(0)},[Xe]);const We=It.createElement("div",{className:`${$i}-control-input`},It.createElement("div",{className:`${$i}-control-input-content`},nn)),mn=It.useMemo(()=>({prefixCls:He,status:ae}),[He,ae]),fn=li!==null||cn.length||Ne.length?It.createElement(lt.Rk.Provider,{value:mn},It.createElement(we,{fieldId:vn,errors:cn,warnings:Ne,help:Je,helpStatus:ae,className:`${$i}-explain-connected`,onVisibleChanged:jn})):null,Wn={};vn&&(Wn.id=`${vn}_extra`);const $e=Xe?It.createElement("div",Object.assign({},Wn,{className:`${$i}-extra`,ref:Ii}),Xe):null,Si=fn||$e?It.createElement("div",{className:`${$i}-additional`,style:li?{minHeight:li+an}:{}},fn,$e):null,pn=Fe&&Fe.mark==="pro_table_render"&&Fe.render?Fe.render(qt,{input:We,errorList:fn,extra:$e}):It.createElement(It.Fragment,null,We,Si);return It.createElement(lt.q3.Provider,{value:Ri},It.createElement(Hn.Z,Object.assign({},yn,{className:zi}),pn),It.createElement(ye,{prefixCls:He}))},Ke=dt(61485),hn=dt(9017),Pn=dt(85981),_n=dt(25399),ci=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae};function yi(qt){return qt?typeof qt=="object"&&!It.isValidElement(qt)?qt:{title:qt}:null}var ri=qt=>{let{prefixCls:He,label:ae,htmlFor:ze,labelCol:Jt,labelAlign:nn,colon:cn,required:Ne,requiredMark:Fe,tooltip:Xe,vertical:Je}=qt;var vn;const[li]=(0,hn.Z)("Form"),{labelAlign:jn,labelCol:vi,labelWrap:$i,colon:Ji}=It.useContext(lt.q3);if(!ae)return null;const yn=Jt||vi||{},zi=nn||jn,Ri=`${He}-item-label`,Ii=_t()(Ri,zi==="left"&&`${Ri}-left`,yn.className,{[`${Ri}-wrap`]:!!$i});let an=ae;const Qe=cn===!0||Ji!==!1&&cn!==!1;Qe&&!Je&&typeof ae=="string"&&ae.trim()&&(an=ae.replace(/[:|:]\s*$/,""));const mn=yi(Xe);if(mn){const{icon:wi=It.createElement(Ke.Z,null)}=mn,Wi=ci(mn,["icon"]),Ui=It.createElement(_n.Z,Object.assign({},Wi),It.cloneElement(wi,{className:`${He}-item-tooltip`,title:"",onClick:Vi=>{Vi.preventDefault()},tabIndex:null}));an=It.createElement(It.Fragment,null,an,Ui)}const fn=Fe==="optional",Wn=typeof Fe=="function",$e=Fe===!1;Wn?an=Fe(an,{required:!!Ne}):fn&&!Ne&&(an=It.createElement(It.Fragment,null,an,It.createElement("span",{className:`${He}-item-optional`,title:""},(li==null?void 0:li.optional)||((vn=Pn.Z.Form)===null||vn===void 0?void 0:vn.optional))));let Si;$e?Si="hidden":(fn||Wn)&&(Si="optional");const pn=_t()({[`${He}-item-required`]:Ne,[`${He}-item-required-mark-${Si}`]:Si,[`${He}-item-no-colon`]:!Qe});return It.createElement(Hn.Z,Object.assign({},yn,{className:Ii}),It.createElement("label",{htmlFor:ze,className:pn,title:typeof ae=="string"?ae:""},an))},yt=dt(29679),Tn=dt(19248),xn=dt(96512),Bn=dt(58617);const Zn={success:yt.Z,warning:xn.Z,error:Tn.Z,validating:Bn.Z};function Nn(qt){let{children:He,errors:ae,warnings:ze,hasFeedback:Jt,validateStatus:nn,prefixCls:cn,meta:Ne,noStyle:Fe}=qt;const Xe=`${cn}-item`,{feedbackIcons:Je}=It.useContext(lt.q3),vn=Ie(ae,ze,Ne,null,!!Jt,nn),{isFormItemInput:li,status:jn,hasFeedback:vi,feedbackIcon:$i}=It.useContext(lt.aM),Ji=It.useMemo(()=>{var yn;let zi;if(Jt){const Ii=Jt!==!0&&Jt.icons||Je,an=vn&&((yn=Ii==null?void 0:Ii({status:vn,errors:ae,warnings:ze}))===null||yn===void 0?void 0:yn[vn]),Qe=vn&&Zn[vn];zi=an!==!1&&Qe?It.createElement("span",{className:_t()(`${Xe}-feedback-icon`,`${Xe}-feedback-icon-${vn}`)},an||It.createElement(Qe,null)):null}const Ri={status:vn||"",errors:ae,warnings:ze,hasFeedback:!!Jt,feedbackIcon:zi,isFormItemInput:!0};return Fe&&(Ri.status=(vn!=null?vn:jn)||"",Ri.isFormItemInput=li,Ri.hasFeedback=!!(Jt!=null?Jt:vi),Ri.feedbackIcon=Jt!==void 0?Ri.feedbackIcon:$i),Ri},[vn,Jt,Fe,li,jn]);return It.createElement(lt.aM.Provider,{value:Ji},He)}var Ln=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae};function ii(qt){const{prefixCls:He,className:ae,rootClassName:ze,style:Jt,help:nn,errors:cn,warnings:Ne,validateStatus:Fe,meta:Xe,hasFeedback:Je,hidden:vn,children:li,fieldId:jn,required:vi,isRequired:$i,onSubItemMetaChange:Ji,layout:yn}=qt,zi=Ln(qt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),Ri=`${He}-item`,{requiredMark:Ii,vertical:an}=It.useContext(lt.q3),Qe=an||yn==="vertical",We=It.useRef(null),mn=Yt(cn),fn=Yt(Ne),Wn=nn!=null,$e=!!(Wn||cn.length||Ne.length),Si=!!We.current&&(0,bn.Z)(We.current),[pn,wi]=It.useState(null);(0,Sn.Z)(()=>{if($e&&We.current){const Oi=getComputedStyle(We.current);wi(parseInt(Oi.marginBottom,10))}},[$e,Si]);const Wi=Oi=>{Oi||wi(null)},Vi=function(){let Oi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const qi=Oi?mn:Xe.errors,fr=Oi?fn:Xe.warnings;return Ie(qi,fr,Xe,"",!!Je,Fe)}(),Ki=_t()(Ri,ae,ze,{[`${Ri}-with-help`]:Wn||mn.length||fn.length,[`${Ri}-has-feedback`]:Vi&&Je,[`${Ri}-has-success`]:Vi==="success",[`${Ri}-has-warning`]:Vi==="warning",[`${Ri}-has-error`]:Vi==="error",[`${Ri}-is-validating`]:Vi==="validating",[`${Ri}-hidden`]:vn,[`${Ri}-${yn}`]:yn});return It.createElement("div",{className:Ki,style:Jt,ref:We},It.createElement(In.Z,Object.assign({className:`${Ri}-row`},(0,Rn.Z)(zi,["_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"])),It.createElement(ri,Object.assign({htmlFor:jn},qt,{requiredMark:Ii,required:vi!=null?vi:$i,prefixCls:He,vertical:Qe})),It.createElement(he,Object.assign({},qt,Xe,{errors:mn,warnings:fn,prefixCls:He,status:Vi,help:nn,marginBottom:pn,onErrorVisibleChanged:Wi}),It.createElement(lt.qI.Provider,{value:Ji},It.createElement(Nn,{prefixCls:He,meta:Xe,errors:Xe.errors,warnings:Xe.warnings,hasFeedback:Je,validateStatus:Vi},li)))),!!pn&&It.createElement("div",{className:`${Ri}-margin-offset`,style:{marginBottom:-pn}}))}const Qn="__SPLIT__",xi=null;function Xn(qt,He){const ae=Object.keys(qt),ze=Object.keys(He);return ae.length===ze.length&&ae.every(Jt=>{const nn=qt[Jt],cn=He[Jt];return nn===cn||typeof nn=="function"||typeof cn=="function"})}const $n=It.memo(qt=>{let{children:He}=qt;return He},(qt,He)=>Xn(qt.control,He.control)&&qt.update===He.update&&qt.childProps.length===He.childProps.length&&qt.childProps.every((ae,ze)=>ae===He.childProps[ze]));function Hi(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Bi(qt){const{name:He,noStyle:ae,className:ze,dependencies:Jt,prefixCls:nn,shouldUpdate:cn,rules:Ne,children:Fe,required:Xe,label:Je,messageVariables:vn,trigger:li="onChange",validateTrigger:jn,hidden:vi,help:$i,layout:Ji}=qt,{getPrefixCls:yn}=It.useContext(On.E_),{name:zi}=It.useContext(lt.q3),Ri=re(Fe),Ii=typeof Ri=="function",an=It.useContext(lt.qI),{validateTrigger:Qe}=It.useContext(Ue.FieldContext),We=jn!==void 0?jn:Qe,mn=He!=null,fn=yn("form",nn),Wn=(0,me.Z)(fn),[$e,Si,pn]=Re(fn,Wn),wi=(0,Ve.ln)("Form.Item"),Wi=It.useContext(Ue.ListContext),Ui=It.useRef(null),[Vi,Ki]=te({}),[Oi,qi]=(0,vt.Z)(()=>Hi()),fr=nr=>{const _i=Wi==null?void 0:Wi.getKey(nr.name);if(qi(nr.destroy?Hi():nr,!0),ae&&$i!==!1&&an){let ui=nr.name;if(nr.destroy)ui=Ui.current||ui;else if(_i!==void 0){const[Ei,Mi]=_i;ui=[Ei].concat((0,Dt.Z)(Mi)),Ui.current=ui}an(nr,ui)}},tr=(nr,_i)=>{Ki(ui=>{const Ei=Object.assign({},ui),Gn=[].concat((0,Dt.Z)(nr.name.slice(0,-1)),(0,Dt.Z)(_i)).join(Qn);return nr.destroy?delete Ei[Gn]:Ei[Gn]=nr,Ei})},[ai,Lt]=It.useMemo(()=>{const nr=(0,Dt.Z)(Oi.errors),_i=(0,Dt.Z)(Oi.warnings);return Object.values(Vi).forEach(ui=>{nr.push.apply(nr,(0,Dt.Z)(ui.errors||[])),_i.push.apply(_i,(0,Dt.Z)(ui.warnings||[]))}),[nr,_i]},[Vi,Oi.errors,Oi.warnings]),ur=le();function Qi(nr,_i,ui){return ae&&!vi?It.createElement(Nn,{prefixCls:fn,hasFeedback:qt.hasFeedback,validateStatus:qt.validateStatus,meta:Oi,errors:ai,warnings:Lt,noStyle:!0},nr):It.createElement(ii,Object.assign({key:"row"},qt,{className:_t()(ze,pn,Wn,Si),prefixCls:fn,fieldId:_i,isRequired:ui,errors:ai,warnings:Lt,meta:Oi,onSubItemMetaChange:tr,layout:Ji}),nr)}if(!mn&&!Ii&&!Jt)return $e(Qi(Ri));let Yi={};return typeof Je=="string"?Yi.label=Je:He&&(Yi.label=String(He)),vn&&(Yi=Object.assign(Object.assign({},Yi),vn)),$e(It.createElement(Ue.Field,Object.assign({},qt,{messageVariables:Yi,trigger:li,validateTrigger:We,onMetaChange:fr}),(nr,_i,ui)=>{const Ei=Be(He).length&&_i?_i.name:[],Mi=Cn(Ei,zi),Gn=Xe!==void 0?Xe:!!(Ne!=null&&Ne.some(pi=>{if(pi&&typeof pi=="object"&&pi.required&&!pi.warningOnly)return!0;if(typeof pi=="function"){const ni=pi(ui);return(ni==null?void 0:ni.required)&&!(ni!=null&&ni.warningOnly)}return!1})),gi=Object.assign({},nr);let Li=null;if(Array.isArray(Ri)&&mn)Li=Ri;else if(!(Ii&&(!(cn||Jt)||mn))){if(!(Jt&&!Ii&&!mn))if(It.isValidElement(Ri)){const pi=Object.assign(Object.assign({},Ri.props),gi);if(pi.id||(pi.id=Mi),$i||ai.length>0||Lt.length>0||qt.extra){const ji=[];($i||ai.length>0)&&ji.push(`${Mi}_help`),qt.extra&&ji.push(`${Mi}_extra`),pi["aria-describedby"]=ji.join(" ")}ai.length>0&&(pi["aria-invalid"]="true"),Gn&&(pi["aria-required"]="true"),(0,Et.Yr)(Ri)&&(pi.ref=ur(Ei,Ri)),new Set([].concat((0,Dt.Z)(Be(li)),(0,Dt.Z)(Be(We)))).forEach(ji=>{pi[ji]=function(){for(var br,Dr,Or,Vr,Gr,Ur=arguments.length,ro=new Array(Ur),Kr=0;Kr<Ur;Kr++)ro[Kr]=arguments[Kr];(Or=gi[ji])===null||Or===void 0||(br=Or).call.apply(br,[gi].concat(ro)),(Gr=(Vr=Ri.props)[ji])===null||Gr===void 0||(Dr=Gr).call.apply(Dr,[Vr].concat(ro))}});const kn=[pi["aria-required"],pi["aria-invalid"],pi["aria-describedby"]];Li=It.createElement($n,{control:gi,update:Ri,childProps:kn},(0,Zt.Tm)(Ri,pi))}else Ii&&(cn||Jt)&&!mn?Li=Ri(ui):Li=Ri}return Qi(Li,Mi,Gn)}))}const sr=Bi;sr.useStatus=Te;var Jn=sr,Vn=function(qt,He){var ae={};for(var ze in qt)Object.prototype.hasOwnProperty.call(qt,ze)&&He.indexOf(ze)<0&&(ae[ze]=qt[ze]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jt=0,ze=Object.getOwnPropertySymbols(qt);Jt<ze.length;Jt++)He.indexOf(ze[Jt])<0&&Object.prototype.propertyIsEnumerable.call(qt,ze[Jt])&&(ae[ze[Jt]]=qt[ze[Jt]]);return ae},Ti=qt=>{var{prefixCls:He,children:ae}=qt,ze=Vn(qt,["prefixCls","children"]);const{getPrefixCls:Jt}=It.useContext(On.E_),nn=Jt("form",He),cn=It.useMemo(()=>({prefixCls:nn,status:"error"}),[nn]);return It.createElement(Ue.List,Object.assign({},ze),(Ne,Fe,Xe)=>It.createElement(lt.Rk.Provider,{value:cn},ae(Ne.map(Je=>Object.assign(Object.assign({},Je),{fieldKey:Je.key})),Fe,{errors:Xe.errors,warnings:Xe.warnings})))};function Ci(){const{form:qt}=It.useContext(lt.q3);return qt}const Rt=Pt;Rt.Item=Jn,Rt.List=Ti,Rt.ErrorList=we,Rt.useForm=ln,Rt.useFormInstance=Ci,Rt.useWatch=Ue.useWatch,Rt.Provider=lt.RV,Rt.create=()=>{};var Pe=Rt},4875:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return An}});var lt=dt(59301),Dt=dt(84105),It=dt(87395),xe=dt(92310),_t=dt.n(xe),Gt=dt(60499),Vt=dt(18642),me=dt(43749),Yt=dt(72190),Nt=dt(42244),Oe=dt(38705),jt=dt(17212);function Me(){return typeof BigInt=="function"}function ce(he){return!he&&he!==0&&!Number.isNaN(he)||!String(he).trim()}function ee(he){var Ke=he.trim(),hn=Ke.startsWith("-");hn&&(Ke=Ke.slice(1)),Ke=Ke.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Ke.startsWith(".")&&(Ke="0".concat(Ke));var Pn=Ke||"0",_n=Pn.split("."),ci=_n[0]||"0",yi=_n[1]||"0";ci==="0"&&yi==="0"&&(hn=!1);var Ni=hn?"-":"";return{negative:hn,negativeStr:Ni,trimStr:Pn,integerStr:ci,decimalStr:yi,fullStr:"".concat(Ni).concat(Pn)}}function Kt(he){var Ke=String(he);return!Number.isNaN(Number(Ke))&&Ke.includes("e")}function Ht(he){var Ke=String(he);if(Kt(he)){var hn=Number(Ke.slice(Ke.indexOf("e-")+2)),Pn=Ke.match(/\.(\d+)/);return Pn!=null&&Pn[1]&&(hn+=Pn[1].length),hn}return Ke.includes(".")&&Ae(Ke)?Ke.length-Ke.indexOf(".")-1:0}function de(he){var Ke=String(he);if(Kt(he)){if(he>Number.MAX_SAFE_INTEGER)return String(Me()?BigInt(he).toString():Number.MAX_SAFE_INTEGER);if(he<Number.MIN_SAFE_INTEGER)return String(Me()?BigInt(he).toString():Number.MIN_SAFE_INTEGER);Ke=he.toFixed(Ht(Ke))}return ee(Ke).fullStr}function Ae(he){return typeof he=="number"?!Number.isNaN(he):he?/^\s*-?\d+(\.\d+)?\s*$/.test(he)||/^\s*-?\d+\.\s*$/.test(he)||/^\s*-?\.\d+\s*$/.test(he):!1}var je=function(){function he(Ke){if((0,Oe.Z)(this,he),(0,Vt.Z)(this,"origin",""),(0,Vt.Z)(this,"negative",void 0),(0,Vt.Z)(this,"integer",void 0),(0,Vt.Z)(this,"decimal",void 0),(0,Vt.Z)(this,"decimalLen",void 0),(0,Vt.Z)(this,"empty",void 0),(0,Vt.Z)(this,"nan",void 0),ce(Ke)){this.empty=!0;return}if(this.origin=String(Ke),Ke==="-"||Number.isNaN(Ke)){this.nan=!0;return}var hn=Ke;if(Kt(hn)&&(hn=Number(hn)),hn=typeof hn=="string"?hn:de(hn),Ae(hn)){var Pn=ee(hn);this.negative=Pn.negative;var _n=Pn.trimStr.split(".");this.integer=BigInt(_n[0]);var ci=_n[1]||"0";this.decimal=BigInt(ci),this.decimalLen=ci.length}else this.nan=!0}return(0,jt.Z)(he,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(hn){var Pn="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(hn,"0"));return BigInt(Pn)}},{key:"negate",value:function(){var hn=new he(this.toString());return hn.negative=!hn.negative,hn}},{key:"cal",value:function(hn,Pn,_n){var ci=Math.max(this.getDecimalStr().length,hn.getDecimalStr().length),yi=this.alignDecimal(ci),Ni=hn.alignDecimal(ci),ri=Pn(yi,Ni).toString(),yt=_n(ci),Tn=ee(ri),xn=Tn.negativeStr,Bn=Tn.trimStr,Zn="".concat(xn).concat(Bn.padStart(yt+1,"0"));return new he("".concat(Zn.slice(0,-yt),".").concat(Zn.slice(-yt)))}},{key:"add",value:function(hn){if(this.isInvalidate())return new he(hn);var Pn=new he(hn);return Pn.isInvalidate()?this:this.cal(Pn,function(_n,ci){return _n+ci},function(_n){return _n})}},{key:"multi",value:function(hn){var Pn=new he(hn);return this.isInvalidate()||Pn.isInvalidate()?new he(NaN):this.cal(Pn,function(_n,ci){return _n*ci},function(_n){return _n*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(hn){return this.toString()===(hn==null?void 0:hn.toString())}},{key:"lessEquals",value:function(hn){return this.add(hn.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return hn?this.isInvalidate()?"":ee("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),he}(),se=function(){function he(Ke){if((0,Oe.Z)(this,he),(0,Vt.Z)(this,"origin",""),(0,Vt.Z)(this,"number",void 0),(0,Vt.Z)(this,"empty",void 0),ce(Ke)){this.empty=!0;return}this.origin=String(Ke),this.number=Number(Ke)}return(0,jt.Z)(he,[{key:"negate",value:function(){return new he(-this.toNumber())}},{key:"add",value:function(hn){if(this.isInvalidate())return new he(hn);var Pn=Number(hn);if(Number.isNaN(Pn))return this;var _n=this.number+Pn;if(_n>Number.MAX_SAFE_INTEGER)return new he(Number.MAX_SAFE_INTEGER);if(_n<Number.MIN_SAFE_INTEGER)return new he(Number.MIN_SAFE_INTEGER);var ci=Math.max(Ht(this.number),Ht(Pn));return new he(_n.toFixed(ci))}},{key:"multi",value:function(hn){var Pn=Number(hn);if(this.isInvalidate()||Number.isNaN(Pn))return new he(NaN);var _n=this.number*Pn;if(_n>Number.MAX_SAFE_INTEGER)return new he(Number.MAX_SAFE_INTEGER);if(_n<Number.MIN_SAFE_INTEGER)return new he(Number.MIN_SAFE_INTEGER);var ci=Math.max(Ht(this.number),Ht(Pn));return new he(_n.toFixed(ci))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(hn){return this.toNumber()===(hn==null?void 0:hn.toNumber())}},{key:"lessEquals",value:function(hn){return this.add(hn.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return hn?this.isInvalidate()?"":de(this.number):this.origin}}]),he}();function Xt(he){return Me()?new je(he):new se(he)}function ve(he,Ke,hn){var Pn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(he==="")return"";var _n=ee(he),ci=_n.negativeStr,yi=_n.integerStr,Ni=_n.decimalStr,ri="".concat(Ke).concat(Ni),yt="".concat(ci).concat(yi);if(hn>=0){var Tn=Number(Ni[hn]);if(Tn>=5&&!Pn){var xn=Xt(he).add("".concat(ci,"0.").concat("0".repeat(hn)).concat(10-Tn));return ve(xn.toString(),Ke,hn,Pn)}return hn===0?yt:"".concat(yt).concat(Ke).concat(Ni.padEnd(hn,"0").slice(0,hn))}return ri===".0"?yt:"".concat(yt).concat(ri)}var Qt=Xt,Se=dt(36901),be=dt(34280);function Le(he,Ke){return typeof Proxy!="undefined"&&he?new Proxy(he,{get:function(Pn,_n){if(Ke[_n])return Ke[_n];var ci=Pn[_n];return typeof ci=="function"?ci.bind(Pn):ci}}):he}var en=dt(8654),ie=dt(48736);function Re(he,Ke){var hn=(0,lt.useRef)(null);function Pn(){try{var ci=he.selectionStart,yi=he.selectionEnd,Ni=he.value,ri=Ni.substring(0,ci),yt=Ni.substring(yi);hn.current={start:ci,end:yi,value:Ni,beforeTxt:ri,afterTxt:yt}}catch(Tn){}}function _n(){if(he&&hn.current&&Ke)try{var ci=he.value,yi=hn.current,Ni=yi.beforeTxt,ri=yi.afterTxt,yt=yi.start,Tn=ci.length;if(ci.startsWith(Ni))Tn=Ni.length;else if(ci.endsWith(ri))Tn=ci.length-hn.current.afterTxt.length;else{var xn=Ni[yt-1],Bn=ci.indexOf(xn,yt-1);Bn!==-1&&(Tn=Bn+1)}he.setSelectionRange(Tn,Tn)}catch(Zn){(0,ie.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Zn.message))}}return[Pn,_n]}var De=dt(49658),Tt=function(){var Ke=(0,lt.useState)(!1),hn=(0,Yt.Z)(Ke,2),Pn=hn[0],_n=hn[1];return(0,be.Z)(function(){_n((0,De.Z)())},[]),Pn},rn=Tt,we=dt(16089),Ue=200,On=600;function zt(he){var Ke=he.prefixCls,hn=he.upNode,Pn=he.downNode,_n=he.upDisabled,ci=he.downDisabled,yi=he.onStep,Ni=lt.useRef(),ri=lt.useRef([]),yt=lt.useRef();yt.current=yi;var Tn=function(){clearTimeout(Ni.current)},xn=function(Xn,$n){Xn.preventDefault(),Tn(),yt.current($n);function Hi(){yt.current($n),Ni.current=setTimeout(Hi,Ue)}Ni.current=setTimeout(Hi,On)};lt.useEffect(function(){return function(){Tn(),ri.current.forEach(function(xi){return we.Z.cancel(xi)})}},[]);var Bn=rn();if(Bn)return null;var Zn="".concat(Ke,"-handler"),Nn=_t()(Zn,"".concat(Zn,"-up"),(0,Vt.Z)({},"".concat(Zn,"-up-disabled"),_n)),Ln=_t()(Zn,"".concat(Zn,"-down"),(0,Vt.Z)({},"".concat(Zn,"-down-disabled"),ci)),ii=function(){return ri.current.push((0,we.Z)(Tn))},Qn={unselectable:"on",role:"button",onMouseUp:ii,onMouseLeave:ii};return lt.createElement("div",{className:"".concat(Zn,"-wrap")},lt.createElement("span",(0,Gt.Z)({},Qn,{onMouseDown:function(Xn){xn(Xn,!0)},"aria-label":"Increase Value","aria-disabled":_n,className:Nn}),hn||lt.createElement("span",{unselectable:"on",className:"".concat(Ke,"-handler-up-inner")})),lt.createElement("span",(0,Gt.Z)({},Qn,{onMouseDown:function(Xn){xn(Xn,!1)},"aria-label":"Decrease Value","aria-disabled":ci,className:Ln}),Pn||lt.createElement("span",{unselectable:"on",className:"".concat(Ke,"-handler-down-inner")})))}function kt(he){var Ke=typeof he=="number"?de(he):ee(he).fullStr,hn=Ke.includes(".");return hn?ee(Ke.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:he+"0"}var Ye=dt(30292),wn=function(){var he=(0,lt.useRef)(0),Ke=function(){we.Z.cancel(he.current)};return(0,lt.useEffect)(function(){return Ke},[]),function(hn){Ke(),he.current=(0,we.Z)(function(){hn()})}},on=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],$t=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Ee=function(Ke,hn){return Ke||hn.isEmpty()?hn.toString():hn.toNumber()},Be=function(Ke){var hn=Qt(Ke);return hn.isInvalidate()?null:hn},Cn=lt.forwardRef(function(he,Ke){var hn=he.prefixCls,Pn=he.className,_n=he.style,ci=he.min,yi=he.max,Ni=he.step,ri=Ni===void 0?1:Ni,yt=he.defaultValue,Tn=he.value,xn=he.disabled,Bn=he.readOnly,Zn=he.upHandler,Nn=he.downHandler,Ln=he.keyboard,ii=he.changeOnWheel,Qn=ii===void 0?!1:ii,xi=he.controls,Xn=xi===void 0?!0:xi,$n=he.classNames,Hi=he.stringMode,Bi=he.parser,sr=he.formatter,Jn=he.precision,Vn=he.decimalSeparator,oi=he.onChange,Ti=he.onInput,Ci=he.onPressEnter,Rt=he.onStep,Pe=he.changeOnBlur,qt=Pe===void 0?!0:Pe,He=he.domRef,ae=(0,Nt.Z)(he,on),ze="".concat(hn,"-input"),Jt=lt.useRef(null),nn=lt.useState(!1),cn=(0,Yt.Z)(nn,2),Ne=cn[0],Fe=cn[1],Xe=lt.useRef(!1),Je=lt.useRef(!1),vn=lt.useRef(!1),li=lt.useState(function(){return Qt(Tn!=null?Tn:yt)}),jn=(0,Yt.Z)(li,2),vi=jn[0],$i=jn[1];function Ji(Mi){Tn===void 0&&$i(Mi)}var yn=lt.useCallback(function(Mi,Gn){if(!Gn)return Jn>=0?Jn:Math.max(Ht(Mi),Ht(ri))},[Jn,ri]),zi=lt.useCallback(function(Mi){var Gn=String(Mi);if(Bi)return Bi(Gn);var gi=Gn;return Vn&&(gi=gi.replace(Vn,".")),gi.replace(/[^\w.-]+/g,"")},[Bi,Vn]),Ri=lt.useRef(""),Ii=lt.useCallback(function(Mi,Gn){if(sr)return sr(Mi,{userTyping:Gn,input:String(Ri.current)});var gi=typeof Mi=="number"?de(Mi):Mi;if(!Gn){var Li=yn(gi,Gn);if(Ae(gi)&&(Vn||Li>=0)){var pi=Vn||".";gi=ve(gi,pi,Li)}}return gi},[sr,yn,Vn]),an=lt.useState(function(){var Mi=yt!=null?yt:Tn;return vi.isInvalidate()&&["string","number"].includes((0,me.Z)(Mi))?Number.isNaN(Mi)?"":Mi:Ii(vi.toString(),!1)}),Qe=(0,Yt.Z)(an,2),We=Qe[0],mn=Qe[1];Ri.current=We;function fn(Mi,Gn){mn(Ii(Mi.isInvalidate()?Mi.toString(!1):Mi.toString(!Gn),Gn))}var Wn=lt.useMemo(function(){return Be(yi)},[yi,Jn]),$e=lt.useMemo(function(){return Be(ci)},[ci,Jn]),Si=lt.useMemo(function(){return!Wn||!vi||vi.isInvalidate()?!1:Wn.lessEquals(vi)},[Wn,vi]),pn=lt.useMemo(function(){return!$e||!vi||vi.isInvalidate()?!1:vi.lessEquals($e)},[$e,vi]),wi=Re(Jt.current,Ne),Wi=(0,Yt.Z)(wi,2),Ui=Wi[0],Vi=Wi[1],Ki=function(Gn){return Wn&&!Gn.lessEquals(Wn)?Wn:$e&&!$e.lessEquals(Gn)?$e:null},Oi=function(Gn){return!Ki(Gn)},qi=function(Gn,gi){var Li=Gn,pi=Oi(Li)||Li.isEmpty();if(!Li.isEmpty()&&!gi&&(Li=Ki(Li)||Li,pi=!0),!Bn&&!xn&&pi){var ni=Li.toString(),kn=yn(ni,gi);return kn>=0&&(Li=Qt(ve(ni,".",kn)),Oi(Li)||(Li=Qt(ve(ni,".",kn,!0)))),Li.equals(vi)||(Ji(Li),oi==null||oi(Li.isEmpty()?null:Ee(Hi,Li)),Tn===void 0&&fn(Li,gi)),Li}return vi},fr=wn(),tr=function Mi(Gn){if(Ui(),Ri.current=Gn,mn(Gn),!Je.current){var gi=zi(Gn),Li=Qt(gi);Li.isNaN()||qi(Li,!0)}Ti==null||Ti(Gn),fr(function(){var pi=Gn;Bi||(pi=Gn.replace(/。/g,".")),pi!==Gn&&Mi(pi)})},ai=function(){Je.current=!0},Lt=function(){Je.current=!1,tr(Jt.current.value)},ur=function(Gn){tr(Gn.target.value)},Qi=function(Gn){var gi;if(!(Gn&&Si||!Gn&&pn)){Xe.current=!1;var Li=Qt(vn.current?kt(ri):ri);Gn||(Li=Li.negate());var pi=(vi||Qt(0)).add(Li.toString()),ni=qi(pi,!1);Rt==null||Rt(Ee(Hi,ni),{offset:vn.current?kt(ri):ri,type:Gn?"up":"down"}),(gi=Jt.current)===null||gi===void 0||gi.focus()}},Yi=function(Gn){var gi=Qt(zi(We)),Li;gi.isNaN()?Li=qi(vi,Gn):Li=qi(gi,Gn),Tn!==void 0?fn(vi,!1):Li.isNaN()||fn(Li,!1)},nr=function(){Xe.current=!0},_i=function(Gn){var gi=Gn.key,Li=Gn.shiftKey;Xe.current=!0,vn.current=Li,gi==="Enter"&&(Je.current||(Xe.current=!1),Yi(!1),Ci==null||Ci(Gn)),Ln!==!1&&!Je.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gi)&&(Qi(gi==="Up"||gi==="ArrowUp"),Gn.preventDefault())},ui=function(){Xe.current=!1,vn.current=!1};lt.useEffect(function(){if(Qn&&Ne){var Mi=function(Li){Qi(Li.deltaY<0),Li.preventDefault()},Gn=Jt.current;if(Gn)return Gn.addEventListener("wheel",Mi,{passive:!1}),function(){return Gn.removeEventListener("wheel",Mi)}}});var Ei=function(){qt&&Yi(!1),Fe(!1),Xe.current=!1};return(0,be.o)(function(){vi.isInvalidate()||fn(vi,!1)},[Jn,sr]),(0,be.o)(function(){var Mi=Qt(Tn);$i(Mi);var Gn=Qt(zi(We));(!Mi.equals(Gn)||!Xe.current||sr)&&fn(Mi,Xe.current)},[Tn]),(0,be.o)(function(){sr&&Vi()},[We]),lt.createElement("div",{ref:He,className:_t()(hn,Pn,(0,Vt.Z)((0,Vt.Z)((0,Vt.Z)((0,Vt.Z)((0,Vt.Z)({},"".concat(hn,"-focused"),Ne),"".concat(hn,"-disabled"),xn),"".concat(hn,"-readonly"),Bn),"".concat(hn,"-not-a-number"),vi.isNaN()),"".concat(hn,"-out-of-range"),!vi.isInvalidate()&&!Oi(vi))),style:_n,onFocus:function(){Fe(!0)},onBlur:Ei,onKeyDown:_i,onKeyUp:ui,onCompositionStart:ai,onCompositionEnd:Lt,onBeforeInput:nr},Xn&<.createElement(zt,{prefixCls:hn,upNode:Zn,downNode:Nn,upDisabled:Si,downDisabled:pn,onStep:Qi}),lt.createElement("div",{className:"".concat(ze,"-wrap")},lt.createElement("input",(0,Gt.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":ci,"aria-valuemax":yi,"aria-valuenow":vi.isInvalidate()?null:vi.toString(),step:ri},ae,{ref:(0,en.sQ)(Jt,Ke),className:ze,value:We,onChange:ur,disabled:xn,readOnly:Bn}))))}),Ie=lt.forwardRef(function(he,Ke){var hn=he.disabled,Pn=he.style,_n=he.prefixCls,ci=_n===void 0?"rc-input-number":_n,yi=he.value,Ni=he.prefix,ri=he.suffix,yt=he.addonBefore,Tn=he.addonAfter,xn=he.className,Bn=he.classNames,Zn=(0,Nt.Z)(he,$t),Nn=lt.useRef(null),Ln=lt.useRef(null),ii=lt.useRef(null),Qn=function(Xn){ii.current&&(0,Ye.nH)(ii.current,Xn)};return lt.useImperativeHandle(Ke,function(){return Le(ii.current,{focus:Qn,nativeElement:Nn.current.nativeElement||Ln.current})}),lt.createElement(Se.BaseInput,{className:xn,triggerFocus:Qn,prefixCls:ci,value:yi,disabled:hn,style:Pn,prefix:Ni,suffix:ri,addonAfter:Tn,addonBefore:yt,classNames:Bn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:Nn},lt.createElement(Cn,(0,Gt.Z)({prefixCls:ci,disabled:hn,ref:ii,domRef:Ln,className:Bn==null?void 0:Bn.input},Zn)))}),gn=Ie,ke=gn,Dn=dt(62487),ln=dt(82855),bt=dt(48755),gt=dt(60840),pt=dt(2171),Ct=dt(83397),Pt=dt(31756),vt=dt(56553),Et=dt(24971),Zt=dt(70045),Ve=dt(36237),ue=dt(53075),re=dt(64910),Ce=dt(39082),Te=dt(63356),tn=dt(56119),te=dt(16931),le=dt(51636),bn=dt(17835);const Sn=he=>{var Ke;const hn=(Ke=he.handleVisible)!==null&&Ke!==void 0?Ke:"auto",Pn=he.controlHeightSM-he.lineWidth*2;return Object.assign(Object.assign({},(0,re.T)(he)),{controlWidth:90,handleWidth:Pn,handleFontSize:he.fontSize/2,handleVisible:hn,handleActiveBg:he.colorFillAlter,handleBg:he.colorBgContainer,filledHandleBg:new bn.FastColor(he.colorFillSecondary).onBackground(he.colorBgContainer).toHexString(),handleHoverColor:he.colorPrimary,handleBorderColor:he.colorBorder,handleOpacity:hn===!0?1:0,handleVisibleWidth:hn===!0?Pn:0})},Rn=(he,Ke)=>{let{componentCls:hn,borderRadiusSM:Pn,borderRadiusLG:_n}=he;const ci=Ke==="lg"?_n:Pn;return{[`&-${Ke}`]:{[`${hn}-handler-wrap`]:{borderStartEndRadius:ci,borderEndEndRadius:ci},[`${hn}-handler-up`]:{borderStartEndRadius:ci},[`${hn}-handler-down`]:{borderEndEndRadius:ci}}}},In=he=>{const{componentCls:Ke,lineWidth:hn,lineType:Pn,borderRadius:_n,inputFontSizeSM:ci,inputFontSizeLG:yi,controlHeightLG:Ni,controlHeightSM:ri,colorError:yt,paddingInlineSM:Tn,paddingBlockSM:xn,paddingBlockLG:Bn,paddingInlineLG:Zn,colorTextDescription:Nn,motionDurationMid:Ln,handleHoverColor:ii,handleOpacity:Qn,paddingInline:xi,paddingBlock:Xn,handleBg:$n,handleActiveBg:Hi,colorTextDisabled:Bi,borderRadiusSM:sr,borderRadiusLG:Jn,controlWidth:Vn,handleBorderColor:oi,filledHandleBg:Ti,lineHeightLG:Ci,calc:Rt}=he;return[{[Ke]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Te.Wf)(he)),(0,ue.ik)(he)),{display:"inline-block",width:Vn,margin:0,padding:0,borderRadius:_n}),(0,Ce.qG)(he,{[`${Ke}-handler-wrap`]:{background:$n,[`${Ke}-handler-down`]:{borderBlockStart:`${(0,Ve.unit)(hn)} ${Pn} ${oi}`}}})),(0,Ce.H8)(he,{[`${Ke}-handler-wrap`]:{background:Ti,[`${Ke}-handler-down`]:{borderBlockStart:`${(0,Ve.unit)(hn)} ${Pn} ${oi}`}},"&:focus-within":{[`${Ke}-handler-wrap`]:{background:$n}}})),(0,Ce.vc)(he,{[`${Ke}-handler-wrap`]:{background:$n,[`${Ke}-handler-down`]:{borderBlockStart:`${(0,Ve.unit)(hn)} ${Pn} ${oi}`}}})),(0,Ce.Mu)(he)),{"&-rtl":{direction:"rtl",[`${Ke}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:yi,lineHeight:Ci,borderRadius:Jn,[`input${Ke}-input`]:{height:Rt(Ni).sub(Rt(hn).mul(2)).equal(),padding:`${(0,Ve.unit)(Bn)} ${(0,Ve.unit)(Zn)}`}},"&-sm":{padding:0,fontSize:ci,borderRadius:sr,[`input${Ke}-input`]:{height:Rt(ri).sub(Rt(hn).mul(2)).equal(),padding:`${(0,Ve.unit)(xn)} ${(0,Ve.unit)(Tn)}`}},"&-out-of-range":{[`${Ke}-input-wrap`]:{input:{color:yt}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Te.Wf)(he)),(0,ue.s7)(he)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Ke}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Ke}-group-addon`]:{borderRadius:Jn,fontSize:he.fontSizeLG}},"&-sm":{[`${Ke}-group-addon`]:{borderRadius:sr}}},(0,Ce.ir)(he)),(0,Ce.S5)(he)),{[`&:not(${Ke}-compact-first-item):not(${Ke}-compact-last-item)${Ke}-compact-item`]:{[`${Ke}, ${Ke}-group-addon`]:{borderRadius:0}},[`&:not(${Ke}-compact-last-item)${Ke}-compact-first-item`]:{[`${Ke}, ${Ke}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Ke}-compact-first-item)${Ke}-compact-last-item`]:{[`${Ke}, ${Ke}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${Ke}-input`]:{cursor:"not-allowed"},[Ke]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Te.Wf)(he)),{width:"100%",padding:`${(0,Ve.unit)(Xn)} ${(0,Ve.unit)(xi)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:_n,outline:0,transition:`all ${Ln} linear`,appearance:"textfield",fontSize:"inherit"}),(0,ue.nz)(he.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${Ke}-handler-wrap, &-focused ${Ke}-handler-wrap`]:{width:he.handleWidth,opacity:1}})},{[Ke]:Object.assign(Object.assign(Object.assign({[`${Ke}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:he.handleVisibleWidth,opacity:Qn,height:"100%",borderStartStartRadius:0,borderStartEndRadius:_n,borderEndEndRadius:_n,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${Ln}`,overflow:"hidden",[`${Ke}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${Ke}-handler-up-inner,
|
|
|
${Ke}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:he.handleFontSize}}},[`${Ke}-handler`]:{height:"50%",overflow:"hidden",color:Nn,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,Ve.unit)(hn)} ${Pn} ${oi}`,transition:`all ${Ln} linear`,"&:active":{background:Hi},"&:hover":{height:"60%",[`
|
|
|
${Ke}-handler-up-inner,
|
|
|
${Ke}-handler-down-inner
|
|
|
`]:{color:ii}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Te.Ro)()),{color:Nn,transition:`all ${Ln} linear`,userSelect:"none"})},[`${Ke}-handler-up`]:{borderStartEndRadius:_n},[`${Ke}-handler-down`]:{borderEndEndRadius:_n}},Rn(he,"lg")),Rn(he,"sm")),{"&-disabled, &-readonly":{[`${Ke}-handler-wrap`]:{display:"none"},[`${Ke}-input`]:{color:"inherit"}},[`
|
|
|
${Ke}-handler-up-disabled,
|
|
|
${Ke}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${Ke}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${Ke}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Bi}})}]},sn=he=>{const{componentCls:Ke,paddingBlock:hn,paddingInline:Pn,inputAffixPadding:_n,controlWidth:ci,borderRadiusLG:yi,borderRadiusSM:Ni,paddingInlineLG:ri,paddingInlineSM:yt,paddingBlockLG:Tn,paddingBlockSM:xn,motionDurationMid:Bn}=he;return{[`${Ke}-affix-wrapper`]:Object.assign(Object.assign({[`input${Ke}-input`]:{padding:`${(0,Ve.unit)(hn)} 0`}},(0,ue.ik)(he)),{position:"relative",display:"inline-flex",alignItems:"center",width:ci,padding:0,paddingInlineStart:Pn,"&-lg":{borderRadius:yi,paddingInlineStart:ri,[`input${Ke}-input`]:{padding:`${(0,Ve.unit)(Tn)} 0`}},"&-sm":{borderRadius:Ni,paddingInlineStart:yt,[`input${Ke}-input`]:{padding:`${(0,Ve.unit)(xn)} 0`}},[`&:not(${Ke}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Ke}-disabled`]:{background:"transparent"},[`> div${Ke}`]:{width:"100%",border:"none",outline:"none",[`&${Ke}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Ke}-handler-wrap`]:{zIndex:2},[Ke]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:_n},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:Pn,marginInlineStart:_n,transition:`margin ${Bn}`}},[`&:hover ${Ke}-handler-wrap, &-focused ${Ke}-handler-wrap`]:{width:he.handleWidth,opacity:1},[`&:not(${Ke}-affix-wrapper-without-controls):hover ${Ke}-suffix`]:{marginInlineEnd:he.calc(he.handleWidth).add(Pn).equal()}})}};var Hn=(0,te.I$)("InputNumber",he=>{const Ke=(0,le.mergeToken)(he,(0,re.e)(he));return[In(Ke),sn(Ke),(0,tn.c)(Ke)]},Sn,{unitless:{handleOpacity:!0}}),Mn=function(he,Ke){var hn={};for(var Pn in he)Object.prototype.hasOwnProperty.call(he,Pn)&&Ke.indexOf(Pn)<0&&(hn[Pn]=he[Pn]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _n=0,Pn=Object.getOwnPropertySymbols(he);_n<Pn.length;_n++)Ke.indexOf(Pn[_n])<0&&Object.prototype.propertyIsEnumerable.call(he,Pn[_n])&&(hn[Pn[_n]]=he[Pn[_n]]);return hn};const ye=lt.forwardRef((he,Ke)=>{const{getPrefixCls:hn,direction:Pn}=lt.useContext(bt.E_),_n=lt.useRef(null);lt.useImperativeHandle(Ke,()=>_n.current);const{className:ci,rootClassName:yi,size:Ni,disabled:ri,prefixCls:yt,addonBefore:Tn,addonAfter:xn,prefix:Bn,suffix:Zn,bordered:Nn,readOnly:Ln,status:ii,controls:Qn,variant:xi}=he,Xn=Mn(he,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),$n=hn("input-number",yt),Hi=(0,Ct.Z)($n),[Bi,sr,Jn]=Hn($n,Hi),{compactSize:Vn,compactItemClassnames:oi}=(0,Zt.ri)($n,Pn);let Ti=lt.createElement(It.Z,{className:`${$n}-handler-up-inner`}),Ci=lt.createElement(Dt.Z,{className:`${$n}-handler-down-inner`});const Rt=typeof Qn=="boolean"?Qn:void 0;typeof Qn=="object"&&(Ti=typeof Qn.upIcon=="undefined"?Ti:lt.createElement("span",{className:`${$n}-handler-up-inner`},Qn.upIcon),Ci=typeof Qn.downIcon=="undefined"?Ci:lt.createElement("span",{className:`${$n}-handler-down-inner`},Qn.downIcon));const{hasFeedback:Pe,status:qt,isFormItemInput:He,feedbackIcon:ae}=lt.useContext(vt.aM),ze=(0,ln.F)(qt,ii),Jt=(0,Pt.Z)(jn=>{var vi;return(vi=Ni!=null?Ni:Vn)!==null&&vi!==void 0?vi:jn}),nn=lt.useContext(pt.Z),cn=ri!=null?ri:nn,[Ne,Fe]=(0,Et.Z)("inputNumber",xi,Nn),Xe=Pe&<.createElement(lt.Fragment,null,ae),Je=_t()({[`${$n}-lg`]:Jt==="large",[`${$n}-sm`]:Jt==="small",[`${$n}-rtl`]:Pn==="rtl",[`${$n}-in-form-item`]:He},sr),vn=`${$n}-group`,li=lt.createElement(ke,Object.assign({ref:_n,disabled:cn,className:_t()(Jn,Hi,ci,yi,oi),upHandler:Ti,downHandler:Ci,prefixCls:$n,readOnly:Ln,controls:Rt,prefix:Bn,suffix:Xe||Zn,addonBefore:Tn&<.createElement(Dn.Z,{form:!0,space:!0},Tn),addonAfter:xn&<.createElement(Dn.Z,{form:!0,space:!0},xn),classNames:{input:Je,variant:_t()({[`${$n}-${Ne}`]:Fe},(0,ln.Z)($n,ze,Pe)),affixWrapper:_t()({[`${$n}-affix-wrapper-sm`]:Jt==="small",[`${$n}-affix-wrapper-lg`]:Jt==="large",[`${$n}-affix-wrapper-rtl`]:Pn==="rtl",[`${$n}-affix-wrapper-without-controls`]:Qn===!1||cn},sr),wrapper:_t()({[`${vn}-rtl`]:Pn==="rtl"},sr),groupWrapper:_t()({[`${$n}-group-wrapper-sm`]:Jt==="small",[`${$n}-group-wrapper-lg`]:Jt==="large",[`${$n}-group-wrapper-rtl`]:Pn==="rtl",[`${$n}-group-wrapper-${Ne}`]:Fe},(0,ln.Z)(`${$n}-group-wrapper`,ze,Pe),sr)}},Xn));return Bi(li)}),Ze=ye,En=he=>lt.createElement(gt.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},lt.createElement(ye,Object.assign({},he)));Ze._InternalPanelDoNotUseOrYouWillBeFired=En;var An=Ze},49397:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return se}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(36901),_t=dt(8654),Gt=dt(62487),Vt=dt(86013),me=dt(82855),Yt=dt(48755),Nt=dt(2171),Oe=dt(83397),jt=dt(31756),Me=dt(56553),ce=dt(24971),ee=dt(70045),Kt=dt(23826),Ht=dt(53075);function de(Xt){return!!(Xt.prefix||Xt.suffix||Xt.allowClear||Xt.showCount)}var Ae=function(Xt,ve){var Qt={};for(var Se in Xt)Object.prototype.hasOwnProperty.call(Xt,Se)&&ve.indexOf(Se)<0&&(Qt[Se]=Xt[Se]);if(Xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,Se=Object.getOwnPropertySymbols(Xt);be<Se.length;be++)ve.indexOf(Se[be])<0&&Object.prototype.propertyIsEnumerable.call(Xt,Se[be])&&(Qt[Se[be]]=Xt[Se[be]]);return Qt},se=(0,lt.forwardRef)((Xt,ve)=>{const{prefixCls:Qt,bordered:Se=!0,status:be,size:Le,disabled:en,onBlur:ie,onFocus:Re,suffix:De,allowClear:Tt,addonAfter:rn,addonBefore:we,className:Ue,style:On,styles:zt,rootClassName:kt,onChange:Ye,classNames:wn,variant:on}=Xt,$t=Ae(Xt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:Ee,direction:Be,allowClear:Cn,autoComplete:Ie,className:gn,style:ke,classNames:Dn,styles:ln}=(0,Yt.dj)("input"),bt=Ee("input",Qt),gt=(0,lt.useRef)(null),pt=(0,Oe.Z)(bt),[Ct,Pt,vt]=(0,Ht.TI)(bt,kt),[Et]=(0,Ht.ZP)(bt,pt),{compactSize:Zt,compactItemClassnames:Ve}=(0,ee.ri)(bt,Be),ue=(0,jt.Z)(An=>{var he;return(he=Le!=null?Le:Zt)!==null&&he!==void 0?he:An}),re=lt.useContext(Nt.Z),Ce=en!=null?en:re,{status:Te,hasFeedback:tn,feedbackIcon:te}=(0,lt.useContext)(Me.aM),le=(0,me.F)(Te,be),bn=de(Xt)||!!tn,Sn=(0,lt.useRef)(bn),Rn=(0,Kt.Z)(gt,!0),In=An=>{Rn(),ie==null||ie(An)},sn=An=>{Rn(),Re==null||Re(An)},Hn=An=>{Rn(),Ye==null||Ye(An)},Mn=(tn||De)&<.createElement(lt.Fragment,null,De,tn&&te),ye=(0,Vt.Z)(Tt!=null?Tt:Cn),[Ze,En]=(0,ce.Z)("input",on,Se);return Ct(Et(lt.createElement(xe.default,Object.assign({ref:(0,_t.sQ)(ve,gt),prefixCls:bt,autoComplete:Ie},$t,{disabled:Ce,onBlur:In,onFocus:sn,style:Object.assign(Object.assign({},ke),On),styles:Object.assign(Object.assign({},ln),zt),suffix:Mn,allowClear:ye,className:It()(Ue,kt,vt,pt,Ve,gn),onChange:Hn,addonBefore:we&<.createElement(Gt.Z,{form:!0,space:!0},we),addonAfter:rn&<.createElement(Gt.Z,{form:!0,space:!0},rn),classNames:Object.assign(Object.assign(Object.assign({},wn),Dn),{input:It()({[`${bt}-sm`]:ue==="small",[`${bt}-lg`]:ue==="large",[`${bt}-rtl`]:Be==="rtl"},wn==null?void 0:wn.input,Dn.input,Pt),variant:It()({[`${bt}-${Ze}`]:En},(0,me.Z)(bt,le)),affixWrapper:It()({[`${bt}-affix-wrapper-sm`]:ue==="small",[`${bt}-affix-wrapper-lg`]:ue==="large",[`${bt}-affix-wrapper-rtl`]:Be==="rtl"},Pt),wrapper:It()({[`${bt}-group-rtl`]:Be==="rtl"},Pt),groupWrapper:It()({[`${bt}-group-wrapper-sm`]:ue==="small",[`${bt}-group-wrapper-lg`]:ue==="large",[`${bt}-group-wrapper-rtl`]:Be==="rtl",[`${bt}-group-wrapper-${Ze}`]:En},(0,me.Z)(`${bt}-group-wrapper`,le,tn),Pt)})}))))})},79809:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return ve}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(22711),_t=dt(86013),Gt=dt(82855),Vt=dt(48755),me=dt(2171),Yt=dt(83397),Nt=dt(31756),Oe=dt(56553),jt=dt(24971),Me=dt(70045),ce=dt(30292),ee=dt(53075),Kt=dt(16931),Ht=dt(51636),de=dt(64910);const Ae=Qt=>{const{componentCls:Se,paddingLG:be}=Qt,Le=`${Se}-textarea`;return{[`textarea${Se}`]:{maxWidth:"100%",height:"auto",minHeight:Qt.controlHeight,lineHeight:Qt.lineHeight,verticalAlign:"bottom",transition:`all ${Qt.motionDurationSlow}`,resize:"vertical",[`&${Se}-mouse-active`]:{transition:`all ${Qt.motionDurationSlow}, height 0s, width 0s`}},[`${Se}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Le]:{position:"relative","&-show-count":{[`> ${Se}`]:{height:"100%"},[`${Se}-data-count`]:{position:"absolute",bottom:Qt.calc(Qt.fontSize).mul(Qt.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:Qt.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${Se},
|
|
|
&-affix-wrapper${Le}-has-feedback ${Se}
|
|
|
`]:{paddingInlineEnd:be},[`&-affix-wrapper${Se}-affix-wrapper`]:{padding:0,[`> textarea${Se}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:Qt.calc(Qt.controlHeight).sub(Qt.calc(Qt.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${Se}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Se}-clear-icon`]:{position:"absolute",insetInlineEnd:Qt.paddingInline,insetBlockStart:Qt.paddingXS},[`${Le}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Qt.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${Se}-affix-wrapper-sm`]:{[`${Se}-suffix`]:{[`${Se}-clear-icon`]:{insetInlineEnd:Qt.paddingInlineSM}}}}}};var je=(0,Kt.I$)(["Input","TextArea"],Qt=>{const Se=(0,Ht.mergeToken)(Qt,(0,de.e)(Qt));return[Ae(Se)]},de.T,{resetFont:!1}),se=function(Qt,Se){var be={};for(var Le in Qt)Object.prototype.hasOwnProperty.call(Qt,Le)&&Se.indexOf(Le)<0&&(be[Le]=Qt[Le]);if(Qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Le=Object.getOwnPropertySymbols(Qt);en<Le.length;en++)Se.indexOf(Le[en])<0&&Object.prototype.propertyIsEnumerable.call(Qt,Le[en])&&(be[Le[en]]=Qt[Le[en]]);return be},ve=(0,lt.forwardRef)((Qt,Se)=>{var be;const{prefixCls:Le,bordered:en=!0,size:ie,disabled:Re,status:De,allowClear:Tt,classNames:rn,rootClassName:we,className:Ue,style:On,styles:zt,variant:kt,showCount:Ye,onMouseDown:wn,onResize:on}=Qt,$t=se(Qt,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:Ee,direction:Be,allowClear:Cn,autoComplete:Ie,className:gn,style:ke,classNames:Dn,styles:ln}=(0,Vt.dj)("textArea"),bt=lt.useContext(me.Z),gt=Re!=null?Re:bt,{status:pt,hasFeedback:Ct,feedbackIcon:Pt}=lt.useContext(Oe.aM),vt=(0,Gt.F)(pt,De),Et=lt.useRef(null);lt.useImperativeHandle(Se,()=>{var En;return{resizableTextArea:(En=Et.current)===null||En===void 0?void 0:En.resizableTextArea,focus:An=>{var he,Ke;(0,ce.nH)((Ke=(he=Et.current)===null||he===void 0?void 0:he.resizableTextArea)===null||Ke===void 0?void 0:Ke.textArea,An)},blur:()=>{var An;return(An=Et.current)===null||An===void 0?void 0:An.blur()}}});const Zt=Ee("input",Le),Ve=(0,Yt.Z)(Zt),[ue,re,Ce]=(0,ee.TI)(Zt,we),[Te]=je(Zt,Ve),{compactSize:tn,compactItemClassnames:te}=(0,Me.ri)(Zt,Be),le=(0,Nt.Z)(En=>{var An;return(An=ie!=null?ie:tn)!==null&&An!==void 0?An:En}),[bn,Sn]=(0,jt.Z)("textArea",kt,en),Rn=(0,_t.Z)(Tt!=null?Tt:Cn),[In,sn]=lt.useState(!1),[Hn,Mn]=lt.useState(!1),ye=En=>{sn(!0),wn==null||wn(En);const An=()=>{sn(!1),document.removeEventListener("mouseup",An)};document.addEventListener("mouseup",An)},Ze=En=>{var An,he;if(on==null||on(En),In&&typeof getComputedStyle=="function"){const Ke=(he=(An=Et.current)===null||An===void 0?void 0:An.nativeElement)===null||he===void 0?void 0:he.querySelector("textarea");Ke&&getComputedStyle(Ke).resize==="both"&&Mn(!0)}};return ue(Te(lt.createElement(xe.default,Object.assign({autoComplete:Ie},$t,{style:Object.assign(Object.assign({},ke),On),styles:Object.assign(Object.assign({},ln),zt),disabled:gt,allowClear:Rn,className:It()(Ce,Ve,Ue,we,te,gn,Hn&&`${Zt}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},rn),Dn),{textarea:It()({[`${Zt}-sm`]:le==="small",[`${Zt}-lg`]:le==="large"},re,rn==null?void 0:rn.textarea,Dn.textarea,In&&`${Zt}-mouse-active`),variant:It()({[`${Zt}-${bn}`]:Sn},(0,Gt.Z)(Zt,vt)),affixWrapper:It()(`${Zt}-textarea-affix-wrapper`,{[`${Zt}-affix-wrapper-rtl`]:Be==="rtl",[`${Zt}-affix-wrapper-sm`]:le==="small",[`${Zt}-affix-wrapper-lg`]:le==="large",[`${Zt}-textarea-show-count`]:Ye||((be=Qt.count)===null||be===void 0?void 0:be.show)},re)}),prefixCls:Zt,suffix:Ct&<.createElement("span",{className:`${Zt}-textarea-suffix`},Pt),showCount:Ye,ref:Et,onResize:Ze,onMouseDown:ye}))))})},23826:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Dt}});var lt=dt(59301);function Dt(It,xe){const _t=(0,lt.useRef)([]),Gt=()=>{_t.current.push(setTimeout(()=>{var Vt,me,Yt,Nt;!((Vt=It.current)===null||Vt===void 0)&&Vt.input&&((me=It.current)===null||me===void 0?void 0:me.input.getAttribute("type"))==="password"&&(!((Yt=It.current)===null||Yt===void 0)&&Yt.input.hasAttribute("value"))&&((Nt=It.current)===null||Nt===void 0||Nt.input.removeAttribute("value"))}))};return(0,lt.useEffect)(()=>(xe&&Gt(),()=>_t.current.forEach(Vt=>{Vt&&clearTimeout(Vt)})),[]),Gt}},37568:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return Dn}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(48755),_t=dt(56553),Gt=dt(53075),me=ln=>{const{getPrefixCls:bt,direction:gt}=(0,lt.useContext)(xe.E_),{prefixCls:pt,className:Ct}=ln,Pt=bt("input-group",pt),vt=bt("input"),[Et,Zt,Ve]=(0,Gt.ZP)(vt),ue=It()(Pt,Ve,{[`${Pt}-lg`]:ln.size==="large",[`${Pt}-sm`]:ln.size==="small",[`${Pt}-compact`]:ln.compact,[`${Pt}-rtl`]:gt==="rtl"},Zt,Ct),re=(0,lt.useContext)(_t.aM),Ce=(0,lt.useMemo)(()=>Object.assign(Object.assign({},re),{isFormItemInput:!1}),[re]);return Et(lt.createElement("span",{className:ue,style:ln.style,onMouseEnter:ln.onMouseEnter,onMouseLeave:ln.onMouseLeave,onFocus:ln.onFocus,onBlur:ln.onBlur},lt.createElement(_t.aM.Provider,{value:Ce},ln.children)))},Yt=dt(49397),Nt=dt(77654),Oe=dt(6089),jt=dt(26112),Me=dt(82855),ce=dt(31756),ee=dt(16931),Kt=dt(51636),Ht=dt(64910);const de=ln=>{const{componentCls:bt,paddingXS:gt}=ln;return{[bt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:gt,"&-rtl":{direction:"rtl"},[`${bt}-input`]:{textAlign:"center",paddingInline:ln.paddingXXS},[`&${bt}-sm ${bt}-input`]:{paddingInline:ln.calc(ln.paddingXXS).div(2).equal()},[`&${bt}-lg ${bt}-input`]:{paddingInline:ln.paddingXS}}}};var Ae=(0,ee.I$)(["Input","OTP"],ln=>{const bt=(0,Kt.mergeToken)(ln,(0,Ht.e)(ln));return[de(bt)]},Ht.T),je=dt(16089),se=function(ln,bt){var gt={};for(var pt in ln)Object.prototype.hasOwnProperty.call(ln,pt)&&bt.indexOf(pt)<0&&(gt[pt]=ln[pt]);if(ln!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,pt=Object.getOwnPropertySymbols(ln);Ct<pt.length;Ct++)bt.indexOf(pt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(ln,pt[Ct])&&(gt[pt[Ct]]=ln[pt[Ct]]);return gt},ve=lt.forwardRef((ln,bt)=>{const{value:gt,onChange:pt,onActiveChange:Ct,index:Pt,mask:vt}=ln,Et=se(ln,["value","onChange","onActiveChange","index","mask"]),Zt=gt&&typeof vt=="string"?vt:gt,Ve=tn=>{pt(Pt,tn.target.value)},ue=lt.useRef(null);lt.useImperativeHandle(bt,()=>ue.current);const re=()=>{(0,je.Z)(()=>{var tn;const te=(tn=ue.current)===null||tn===void 0?void 0:tn.input;document.activeElement===te&&te&&te.select()})},Ce=tn=>{const{key:te,ctrlKey:le,metaKey:bn}=tn;te==="ArrowLeft"?Ct(Pt-1):te==="ArrowRight"?Ct(Pt+1):te==="z"&&(le||bn)&&tn.preventDefault(),re()},Te=tn=>{tn.key==="Backspace"&&!gt&&Ct(Pt-1),re()};return lt.createElement(Yt.Z,Object.assign({type:vt===!0?"password":"text"},Et,{ref:ue,value:Zt,onInput:Ve,onFocus:re,onKeyDown:Ce,onKeyUp:Te,onMouseDown:re,onMouseUp:re}))}),Qt=function(ln,bt){var gt={};for(var pt in ln)Object.prototype.hasOwnProperty.call(ln,pt)&&bt.indexOf(pt)<0&&(gt[pt]=ln[pt]);if(ln!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,pt=Object.getOwnPropertySymbols(ln);Ct<pt.length;Ct++)bt.indexOf(pt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(ln,pt[Ct])&&(gt[pt[Ct]]=ln[pt[Ct]]);return gt};function Se(ln){return(ln||"").split("")}const be=ln=>{const{index:bt,prefixCls:gt,separator:pt}=ln,Ct=typeof pt=="function"?pt(bt):pt;return Ct?lt.createElement("span",{className:`${gt}-separator`},Ct):null};var en=lt.forwardRef((ln,bt)=>{const{prefixCls:gt,length:pt=6,size:Ct,defaultValue:Pt,value:vt,onChange:Et,formatter:Zt,separator:Ve,variant:ue,disabled:re,status:Ce,autoFocus:Te,mask:tn,type:te,onInput:le,inputMode:bn}=ln,Sn=Qt(ln,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:Rn,direction:In}=lt.useContext(xe.E_),sn=Rn("otp",gt),Hn=(0,jt.Z)(Sn,{aria:!0,data:!0,attr:!0}),[Mn,ye,Ze]=Ae(sn),En=(0,ce.Z)(Bn=>Ct!=null?Ct:Bn),An=lt.useContext(_t.aM),he=(0,Me.F)(An.status,Ce),Ke=lt.useMemo(()=>Object.assign(Object.assign({},An),{status:he,hasFeedback:!1,feedbackIcon:null}),[An,he]),hn=lt.useRef(null),Pn=lt.useRef({});lt.useImperativeHandle(bt,()=>({focus:()=>{var Bn;(Bn=Pn.current[0])===null||Bn===void 0||Bn.focus()},blur:()=>{var Bn;for(let Zn=0;Zn<pt;Zn+=1)(Bn=Pn.current[Zn])===null||Bn===void 0||Bn.blur()},nativeElement:hn.current}));const _n=Bn=>Zt?Zt(Bn):Bn,[ci,yi]=lt.useState(()=>Se(_n(Pt||"")));lt.useEffect(()=>{vt!==void 0&&yi(Se(vt))},[vt]);const Ni=(0,Oe.Z)(Bn=>{yi(Bn),le&&le(Bn),Et&&Bn.length===pt&&Bn.every(Zn=>Zn)&&Bn.some((Zn,Nn)=>ci[Nn]!==Zn)&&Et(Bn.join(""))}),ri=(0,Oe.Z)((Bn,Zn)=>{let Nn=(0,Nt.Z)(ci);for(let ii=0;ii<Bn;ii+=1)Nn[ii]||(Nn[ii]="");Zn.length<=1?Nn[Bn]=Zn:Nn=Nn.slice(0,Bn).concat(Se(Zn)),Nn=Nn.slice(0,pt);for(let ii=Nn.length-1;ii>=0&&!Nn[ii];ii-=1)Nn.pop();const Ln=_n(Nn.map(ii=>ii||" ").join(""));return Nn=Se(Ln).map((ii,Qn)=>ii===" "&&!Nn[Qn]?Nn[Qn]:ii),Nn}),yt=(Bn,Zn)=>{var Nn;const Ln=ri(Bn,Zn),ii=Math.min(Bn+Zn.length,pt-1);ii!==Bn&&Ln[Bn]!==void 0&&((Nn=Pn.current[ii])===null||Nn===void 0||Nn.focus()),Ni(Ln)},Tn=Bn=>{var Zn;(Zn=Pn.current[Bn])===null||Zn===void 0||Zn.focus()},xn={variant:ue,disabled:re,status:he,mask:tn,type:te,inputMode:bn};return Mn(lt.createElement("div",Object.assign({},Hn,{ref:hn,className:It()(sn,{[`${sn}-sm`]:En==="small",[`${sn}-lg`]:En==="large",[`${sn}-rtl`]:In==="rtl"},Ze,ye)}),lt.createElement(_t.aM.Provider,{value:Ke},Array.from({length:pt}).map((Bn,Zn)=>{const Nn=`otp-${Zn}`,Ln=ci[Zn]||"";return lt.createElement(lt.Fragment,{key:Nn},lt.createElement(ve,Object.assign({ref:ii=>{Pn.current[Zn]=ii},index:Zn,size:En,htmlSize:1,className:`${sn}-input`,onChange:yt,value:Ln,onActiveChange:Tn,autoFocus:Zn===0&&Te},xn)),Zn<pt-1&<.createElement(be,{separator:Ve,index:Zn,prefixCls:sn}))}))))}),ie=dt(73331),Re=dt(15277),De=dt(2738),Tt=dt(8654),rn=dt(2171),we=dt(23826),Ue=function(ln,bt){var gt={};for(var pt in ln)Object.prototype.hasOwnProperty.call(ln,pt)&&bt.indexOf(pt)<0&&(gt[pt]=ln[pt]);if(ln!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,pt=Object.getOwnPropertySymbols(ln);Ct<pt.length;Ct++)bt.indexOf(pt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(ln,pt[Ct])&&(gt[pt[Ct]]=ln[pt[Ct]]);return gt};const On=ln=>ln?lt.createElement(Re.Z,null):lt.createElement(ie.Z,null),zt={click:"onClick",hover:"onMouseOver"};var Ye=lt.forwardRef((ln,bt)=>{const{disabled:gt,action:pt="click",visibilityToggle:Ct=!0,iconRender:Pt=On}=ln,vt=lt.useContext(rn.Z),Et=gt!=null?gt:vt,Zt=typeof Ct=="object"&&Ct.visible!==void 0,[Ve,ue]=(0,lt.useState)(()=>Zt?Ct.visible:!1),re=(0,lt.useRef)(null);lt.useEffect(()=>{Zt&&ue(Ct.visible)},[Zt,Ct]);const Ce=(0,we.Z)(re),Te=()=>{var En;if(Et)return;Ve&&Ce();const An=!Ve;ue(An),typeof Ct=="object"&&((En=Ct.onVisibleChange)===null||En===void 0||En.call(Ct,An))},tn=En=>{const An=zt[pt]||"",he=Pt(Ve),Ke={[An]:Te,className:`${En}-icon`,key:"passwordIcon",onMouseDown:hn=>{hn.preventDefault()},onMouseUp:hn=>{hn.preventDefault()}};return lt.cloneElement(lt.isValidElement(he)?he:lt.createElement("span",null,he),Ke)},{className:te,prefixCls:le,inputPrefixCls:bn,size:Sn}=ln,Rn=Ue(ln,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:In}=lt.useContext(xe.E_),sn=In("input",bn),Hn=In("input-password",le),Mn=Ct&&tn(Hn),ye=It()(Hn,te,{[`${Hn}-${Sn}`]:!!Sn}),Ze=Object.assign(Object.assign({},(0,De.Z)(Rn,["suffix","iconRender","visibilityToggle"])),{type:Ve?"text":"password",className:ye,prefixCls:sn,suffix:Mn});return Sn&&(Ze.size=Sn),lt.createElement(Yt.Z,Object.assign({ref:(0,Tt.sQ)(bt,re)},Ze))}),wn=dt(47472),on=dt(22703),$t=dt(7939),Ee=dt(70045),Be=function(ln,bt){var gt={};for(var pt in ln)Object.prototype.hasOwnProperty.call(ln,pt)&&bt.indexOf(pt)<0&&(gt[pt]=ln[pt]);if(ln!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,pt=Object.getOwnPropertySymbols(ln);Ct<pt.length;Ct++)bt.indexOf(pt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(ln,pt[Ct])&&(gt[pt[Ct]]=ln[pt[Ct]]);return gt},Ie=lt.forwardRef((ln,bt)=>{const{prefixCls:gt,inputPrefixCls:pt,className:Ct,size:Pt,suffix:vt,enterButton:Et=!1,addonAfter:Zt,loading:Ve,disabled:ue,onSearch:re,onChange:Ce,onCompositionStart:Te,onCompositionEnd:tn}=ln,te=Be(ln,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:le,direction:bn}=lt.useContext(xe.E_),Sn=lt.useRef(!1),Rn=le("input-search",gt),In=le("input",pt),{compactSize:sn}=(0,Ee.ri)(Rn,bn),Hn=(0,ce.Z)(yt=>{var Tn;return(Tn=Pt!=null?Pt:sn)!==null&&Tn!==void 0?Tn:yt}),Mn=lt.useRef(null),ye=yt=>{yt!=null&&yt.target&&yt.type==="click"&&re&&re(yt.target.value,yt,{source:"clear"}),Ce==null||Ce(yt)},Ze=yt=>{var Tn;document.activeElement===((Tn=Mn.current)===null||Tn===void 0?void 0:Tn.input)&&yt.preventDefault()},En=yt=>{var Tn,xn;re&&re((xn=(Tn=Mn.current)===null||Tn===void 0?void 0:Tn.input)===null||xn===void 0?void 0:xn.value,yt,{source:"input"})},An=yt=>{Sn.current||Ve||En(yt)},he=typeof Et=="boolean"?lt.createElement(wn.Z,null):null,Ke=`${Rn}-button`;let hn;const Pn=Et||{},_n=Pn.type&&Pn.type.__ANT_BUTTON===!0;_n||Pn.type==="button"?hn=(0,on.Tm)(Pn,Object.assign({onMouseDown:Ze,onClick:yt=>{var Tn,xn;(xn=(Tn=Pn==null?void 0:Pn.props)===null||Tn===void 0?void 0:Tn.onClick)===null||xn===void 0||xn.call(Tn,yt),En(yt)},key:"enterButton"},_n?{className:Ke,size:Hn}:{})):hn=lt.createElement($t.ZP,{className:Ke,type:Et?"primary":void 0,size:Hn,disabled:ue,key:"enterButton",onMouseDown:Ze,onClick:En,loading:Ve,icon:he},Et),Zt&&(hn=[hn,(0,on.Tm)(Zt,{key:"addonAfter"})]);const ci=It()(Rn,{[`${Rn}-rtl`]:bn==="rtl",[`${Rn}-${Hn}`]:!!Hn,[`${Rn}-with-button`]:!!Et},Ct),yi=Object.assign(Object.assign({},te),{className:ci,prefixCls:In,type:"search"}),Ni=yt=>{Sn.current=!0,Te==null||Te(yt)},ri=yt=>{Sn.current=!1,tn==null||tn(yt)};return lt.createElement(Yt.Z,Object.assign({ref:(0,Tt.sQ)(Mn,bt),onPressEnter:An},yi,{size:Hn,onCompositionStart:Ni,onCompositionEnd:ri,addonAfter:hn,suffix:vt,onChange:ye,disabled:ue}))}),gn=dt(79809);const ke=Yt.Z;ke.Group=me,ke.Search=Ie,ke.TextArea=gn.Z,ke.Password=Ye,ke.OTP=en;var Dn=ke},24303:function(Yn,qe,dt){"use strict";dt.d(qe,{D:function(){return Qt},Z:function(){return Le}});var lt=dt(59301),Dt=dt(60499),It={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"},xe=It,_t=dt(7657),Gt=function(ie,Re){return lt.createElement(_t.Z,(0,Dt.Z)({},ie,{ref:Re,icon:xe}))},Vt=lt.forwardRef(Gt),me=Vt,Yt=dt(33853),Nt=dt(38819),Oe=dt(92310),jt=dt.n(Oe),Me=dt(2738),ce=dt(48755),ee=dt(6989),Kt=dt(36237),Ht=dt(48923),de=dt(16931);const Ae=en=>{const{componentCls:ie,siderBg:Re,motionDurationMid:De,motionDurationSlow:Tt,antCls:rn,triggerHeight:we,triggerColor:Ue,triggerBg:On,headerHeight:zt,zeroTriggerWidth:kt,zeroTriggerHeight:Ye,borderRadiusLG:wn,lightSiderBg:on,lightTriggerColor:$t,lightTriggerBg:Ee,bodyBg:Be}=en;return{[ie]:{position:"relative",minWidth:0,background:Re,transition:`all ${De}, background 0s`,"&-has-trigger":{paddingBottom:we},"&-right":{order:1},[`${ie}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${rn}-menu${rn}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${ie}-children`]:{overflow:"hidden"},[`${ie}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:we,color:Ue,lineHeight:(0,Kt.unit)(we),textAlign:"center",background:On,cursor:"pointer",transition:`all ${De}`},[`${ie}-zero-width-trigger`]:{position:"absolute",top:zt,insetInlineEnd:en.calc(kt).mul(-1).equal(),zIndex:1,width:kt,height:Ye,color:Ue,fontSize:en.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Re,borderRadius:`0 ${(0,Kt.unit)(wn)} ${(0,Kt.unit)(wn)} 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:en.calc(kt).mul(-1).equal(),borderRadius:`${(0,Kt.unit)(wn)} 0 0 ${(0,Kt.unit)(wn)}`}},"&-light":{background:on,[`${ie}-trigger`]:{color:$t,background:Ee},[`${ie}-zero-width-trigger`]:{color:$t,background:Ee,border:`1px solid ${Be}`,borderInlineStart:0}}}}};var je=(0,de.I$)(["Layout","Sider"],en=>[Ae(en)],Ht.eh,{deprecatedTokens:Ht.jn}),se=function(en,ie){var Re={};for(var De in en)Object.prototype.hasOwnProperty.call(en,De)&&ie.indexOf(De)<0&&(Re[De]=en[De]);if(en!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,De=Object.getOwnPropertySymbols(en);Tt<De.length;Tt++)ie.indexOf(De[Tt])<0&&Object.prototype.propertyIsEnumerable.call(en,De[Tt])&&(Re[De[Tt]]=en[De[Tt]]);return Re};const Xt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=en=>!Number.isNaN(Number.parseFloat(en))&&isFinite(en),Qt=lt.createContext({}),Se=(()=>{let en=0;return function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return en+=1,`${ie}${en}`}})();var Le=lt.forwardRef((en,ie)=>{const{prefixCls:Re,className:De,trigger:Tt,children:rn,defaultCollapsed:we=!1,theme:Ue="dark",style:On={},collapsible:zt=!1,reverseArrow:kt=!1,width:Ye=200,collapsedWidth:wn=80,zeroWidthTriggerStyle:on,breakpoint:$t,onCollapse:Ee,onBreakpoint:Be}=en,Cn=se(en,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ie}=(0,lt.useContext)(ee.V),[gn,ke]=(0,lt.useState)("collapsed"in en?en.collapsed:we),[Dn,ln]=(0,lt.useState)(!1);(0,lt.useEffect)(()=>{"collapsed"in en&&ke(en.collapsed)},[en.collapsed]);const bt=(Hn,Mn)=>{"collapsed"in en||ke(Hn),Ee==null||Ee(Hn,Mn)},{getPrefixCls:gt,direction:pt}=(0,lt.useContext)(ce.E_),Ct=gt("layout-sider",Re),[Pt,vt,Et]=je(Ct),Zt=(0,lt.useRef)(null);Zt.current=Hn=>{ln(Hn.matches),Be==null||Be(Hn.matches),gn!==Hn.matches&&bt(Hn.matches,"responsive")},(0,lt.useEffect)(()=>{function Hn(ye){return Zt.current(ye)}let Mn;if(typeof window!="undefined"){const{matchMedia:ye}=window;if(ye&&$t&&$t in Xt){Mn=ye(`screen and (max-width: ${Xt[$t]})`);try{Mn.addEventListener("change",Hn)}catch(Ze){Mn.addListener(Hn)}Hn(Mn)}}return()=>{try{Mn==null||Mn.removeEventListener("change",Hn)}catch(ye){Mn==null||Mn.removeListener(Hn)}}},[$t]),(0,lt.useEffect)(()=>{const Hn=Se("ant-sider-");return Ie.addSider(Hn),()=>Ie.removeSider(Hn)},[]);const Ve=()=>{bt(!gn,"clickTrigger")},ue=(0,Me.Z)(Cn,["collapsed"]),re=gn?wn:Ye,Ce=ve(re)?`${re}px`:String(re),Te=parseFloat(String(wn||0))===0?lt.createElement("span",{onClick:Ve,className:jt()(`${Ct}-zero-width-trigger`,`${Ct}-zero-width-trigger-${kt?"right":"left"}`),style:on},Tt||lt.createElement(me,null)):null,tn=pt==="rtl"==!kt,bn={expanded:tn?lt.createElement(Nt.Z,null):lt.createElement(Yt.Z,null),collapsed:tn?lt.createElement(Yt.Z,null):lt.createElement(Nt.Z,null)}[gn?"collapsed":"expanded"],Sn=Tt!==null?Te||lt.createElement("div",{className:`${Ct}-trigger`,onClick:Ve,style:{width:Ce}},Tt||bn):null,Rn=Object.assign(Object.assign({},On),{flex:`0 0 ${Ce}`,maxWidth:Ce,minWidth:Ce,width:Ce}),In=jt()(Ct,`${Ct}-${Ue}`,{[`${Ct}-collapsed`]:!!gn,[`${Ct}-has-trigger`]:zt&&Tt!==null&&!Te,[`${Ct}-below`]:!!Dn,[`${Ct}-zero-width`]:parseFloat(Ce)===0},De,vt,Et),sn=lt.useMemo(()=>({siderCollapsed:gn}),[gn]);return Pt(lt.createElement(Qt.Provider,{value:sn},lt.createElement("aside",Object.assign({className:In},ue,{style:Rn,ref:ie}),lt.createElement("div",{className:`${Ct}-children`},rn),zt||Dn&&Te?Sn:null)))})},6989:function(Yn,qe,dt){"use strict";dt.d(qe,{V:function(){return Dt}});var lt=dt(59301);const Dt=lt.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(Yn,qe,dt){"use strict";dt.d(qe,{eh:function(){return xe},jn:function(){return _t}});var lt=dt(36237),Dt=dt(16931);const It=Gt=>{const{antCls:Vt,componentCls:me,colorText:Yt,footerBg:Nt,headerHeight:Oe,headerPadding:jt,headerColor:Me,footerPadding:ce,fontSize:ee,bodyBg:Kt,headerBg:Ht}=Gt;return{[me]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Kt,"&, *":{boxSizing:"border-box"},[`&${me}-has-sider`]:{flexDirection:"row",[`> ${me}, > ${me}-content`]:{width:0}},[`${me}-header, &${me}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${me}-header`]:{height:Oe,padding:jt,color:Me,lineHeight:(0,lt.unit)(Oe),background:Ht,[`${Vt}-menu`]:{lineHeight:"inherit"}},[`${me}-footer`]:{padding:ce,color:Yt,fontSize:ee,background:Nt},[`${me}-content`]:{flex:"auto",color:Yt,minHeight:0}}},xe=Gt=>{const{colorBgLayout:Vt,controlHeight:me,controlHeightLG:Yt,colorText:Nt,controlHeightSM:Oe,marginXXS:jt,colorTextLightSolid:Me,colorBgContainer:ce}=Gt,ee=Yt*1.25;return{colorBgHeader:"#001529",colorBgBody:Vt,colorBgTrigger:"#002140",bodyBg:Vt,headerBg:"#001529",headerHeight:me*2,headerPadding:`0 ${ee}px`,headerColor:Nt,footerPadding:`${Oe}px ${ee}px`,footerBg:Vt,siderBg:"#001529",triggerHeight:Yt+jt*2,triggerBg:"#002140",triggerColor:Me,zeroTriggerWidth:Yt,zeroTriggerHeight:Yt,lightSiderBg:ce,lightTriggerBg:ce,lightTriggerColor:Nt}},_t=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];qe.ZP=(0,Dt.I$)("Layout",Gt=>[It(Gt)],xe,{deprecatedTokens:_t})},26906:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return On}});var lt=dt(77654),Dt=dt(59301),It=dt(92310),xe=dt.n(It),_t=dt(9981),Gt=dt(47999),Vt=dt(48755),me=dt(38406),Yt=dt(31756),Nt=dt(65970),Oe=dt(13783),jt=dt(31709),Me=dt(29787);const ce=Dt.createContext({}),ee=ce.Consumer;var Kt=dt(22703),Ht=dt(5472),de=function(zt,kt){var Ye={};for(var wn in zt)Object.prototype.hasOwnProperty.call(zt,wn)&&kt.indexOf(wn)<0&&(Ye[wn]=zt[wn]);if(zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,wn=Object.getOwnPropertySymbols(zt);on<wn.length;on++)kt.indexOf(wn[on])<0&&Object.prototype.propertyIsEnumerable.call(zt,wn[on])&&(Ye[wn[on]]=zt[wn[on]]);return Ye};const Ae=zt=>{var{prefixCls:kt,className:Ye,avatar:wn,title:on,description:$t}=zt,Ee=de(zt,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:Be}=(0,Dt.useContext)(Vt.E_),Cn=Be("list",kt),Ie=xe()(`${Cn}-item-meta`,Ye),gn=Dt.createElement("div",{className:`${Cn}-item-meta-content`},on&&Dt.createElement("h4",{className:`${Cn}-item-meta-title`},on),$t&&Dt.createElement("div",{className:`${Cn}-item-meta-description`},$t));return Dt.createElement("div",Object.assign({},Ee,{className:Ie}),wn&&Dt.createElement("div",{className:`${Cn}-item-meta-avatar`},wn),(on||$t)&&gn)},se=Dt.forwardRef((zt,kt)=>{const{prefixCls:Ye,children:wn,actions:on,extra:$t,styles:Ee,className:Be,classNames:Cn,colStyle:Ie}=zt,gn=de(zt,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:ke,itemLayout:Dn}=(0,Dt.useContext)(ce),{getPrefixCls:ln,list:bt}=(0,Dt.useContext)(Vt.E_),gt=ue=>{var re,Ce;return xe()((Ce=(re=bt==null?void 0:bt.item)===null||re===void 0?void 0:re.classNames)===null||Ce===void 0?void 0:Ce[ue],Cn==null?void 0:Cn[ue])},pt=ue=>{var re,Ce;return Object.assign(Object.assign({},(Ce=(re=bt==null?void 0:bt.item)===null||re===void 0?void 0:re.styles)===null||Ce===void 0?void 0:Ce[ue]),Ee==null?void 0:Ee[ue])},Ct=()=>{let ue=!1;return Dt.Children.forEach(wn,re=>{typeof re=="string"&&(ue=!0)}),ue&&Dt.Children.count(wn)>1},Pt=()=>Dn==="vertical"?!!$t:!Ct(),vt=ln("list",Ye),Et=on&&on.length>0&&Dt.createElement("ul",{className:xe()(`${vt}-item-action`,gt("actions")),key:"actions",style:pt("actions")},on.map((ue,re)=>Dt.createElement("li",{key:`${vt}-item-action-${re}`},ue,re!==on.length-1&&Dt.createElement("em",{className:`${vt}-item-action-split`})))),Zt=ke?"div":"li",Ve=Dt.createElement(Zt,Object.assign({},gn,ke?{}:{ref:kt},{className:xe()(`${vt}-item`,{[`${vt}-item-no-flex`]:!Pt()},Be)}),Dn==="vertical"&&$t?[Dt.createElement("div",{className:`${vt}-item-main`,key:"content"},wn,Et),Dt.createElement("div",{className:xe()(`${vt}-item-extra`,gt("extra")),key:"extra",style:pt("extra")},$t)]:[wn,Et,(0,Kt.Tm)($t,{key:"extra"})]);return ke?Dt.createElement(Ht.Z,{ref:kt,flex:1,style:Ie},Ve):Ve});se.Meta=Ae;var Xt=se,ve=dt(36237),Qt=dt(63356),Se=dt(16931),be=dt(51636);const Le=zt=>{const{listBorderedCls:kt,componentCls:Ye,paddingLG:wn,margin:on,itemPaddingSM:$t,itemPaddingLG:Ee,marginLG:Be,borderRadiusLG:Cn}=zt;return{[kt]:{border:`${(0,ve.unit)(zt.lineWidth)} ${zt.lineType} ${zt.colorBorder}`,borderRadius:Cn,[`${Ye}-header,${Ye}-footer,${Ye}-item`]:{paddingInline:wn},[`${Ye}-pagination`]:{margin:`${(0,ve.unit)(on)} ${(0,ve.unit)(Be)}`}},[`${kt}${Ye}-sm`]:{[`${Ye}-item,${Ye}-header,${Ye}-footer`]:{padding:$t}},[`${kt}${Ye}-lg`]:{[`${Ye}-item,${Ye}-header,${Ye}-footer`]:{padding:Ee}}}},en=zt=>{const{componentCls:kt,screenSM:Ye,screenMD:wn,marginLG:on,marginSM:$t,margin:Ee}=zt;return{[`@media screen and (max-width:${wn}px)`]:{[kt]:{[`${kt}-item`]:{[`${kt}-item-action`]:{marginInlineStart:on}}},[`${kt}-vertical`]:{[`${kt}-item`]:{[`${kt}-item-extra`]:{marginInlineStart:on}}}},[`@media screen and (max-width: ${Ye}px)`]:{[kt]:{[`${kt}-item`]:{flexWrap:"wrap",[`${kt}-action`]:{marginInlineStart:$t}}},[`${kt}-vertical`]:{[`${kt}-item`]:{flexWrap:"wrap-reverse",[`${kt}-item-main`]:{minWidth:zt.contentWidth},[`${kt}-item-extra`]:{margin:`auto auto ${(0,ve.unit)(Ee)}`}}}}}},ie=zt=>{const{componentCls:kt,antCls:Ye,controlHeight:wn,minHeight:on,paddingSM:$t,marginLG:Ee,padding:Be,itemPadding:Cn,colorPrimary:Ie,itemPaddingSM:gn,itemPaddingLG:ke,paddingXS:Dn,margin:ln,colorText:bt,colorTextDescription:gt,motionDurationSlow:pt,lineWidth:Ct,headerBg:Pt,footerBg:vt,emptyTextPadding:Et,metaMarginBottom:Zt,avatarMarginRight:Ve,titleMarginBottom:ue,descriptionFontSize:re}=zt;return{[kt]:Object.assign(Object.assign({},(0,Qt.Wf)(zt)),{position:"relative","*":{outline:"none"},[`${kt}-header`]:{background:Pt},[`${kt}-footer`]:{background:vt},[`${kt}-header, ${kt}-footer`]:{paddingBlock:$t},[`${kt}-pagination`]:{marginBlockStart:Ee,[`${Ye}-pagination-options`]:{textAlign:"start"}},[`${kt}-spin`]:{minHeight:on,textAlign:"center"},[`${kt}-items`]:{margin:0,padding:0,listStyle:"none"},[`${kt}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:Cn,color:bt,[`${kt}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${kt}-item-meta-avatar`]:{marginInlineEnd:Ve},[`${kt}-item-meta-content`]:{flex:"1 0",width:0,color:bt},[`${kt}-item-meta-title`]:{margin:`0 0 ${(0,ve.unit)(zt.marginXXS)} 0`,color:bt,fontSize:zt.fontSize,lineHeight:zt.lineHeight,"> a":{color:bt,transition:`all ${pt}`,"&:hover":{color:Ie}}},[`${kt}-item-meta-description`]:{color:gt,fontSize:re,lineHeight:zt.lineHeight}},[`${kt}-item-action`]:{flex:"0 0 auto",marginInlineStart:zt.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,ve.unit)(Dn)}`,color:gt,fontSize:zt.fontSize,lineHeight:zt.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${kt}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:Ct,height:zt.calc(zt.fontHeight).sub(zt.calc(zt.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:zt.colorSplit}}},[`${kt}-empty`]:{padding:`${(0,ve.unit)(Be)} 0`,color:gt,fontSize:zt.fontSizeSM,textAlign:"center"},[`${kt}-empty-text`]:{padding:Et,color:zt.colorTextDisabled,fontSize:zt.fontSize,textAlign:"center"},[`${kt}-item-no-flex`]:{display:"block"}}),[`${kt}-grid ${Ye}-col > ${kt}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:ln,paddingBlock:0,borderBlockEnd:"none"},[`${kt}-vertical ${kt}-item`]:{alignItems:"initial",[`${kt}-item-main`]:{display:"block",flex:1},[`${kt}-item-extra`]:{marginInlineStart:Ee},[`${kt}-item-meta`]:{marginBlockEnd:Zt,[`${kt}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:ue,color:bt,fontSize:zt.fontSizeLG,lineHeight:zt.lineHeightLG}},[`${kt}-item-action`]:{marginBlockStart:Be,marginInlineStart:"auto","> li":{padding:`0 ${(0,ve.unit)(Be)}`,"&:first-child":{paddingInlineStart:0}}}},[`${kt}-split ${kt}-item`]:{borderBlockEnd:`${(0,ve.unit)(zt.lineWidth)} ${zt.lineType} ${zt.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${kt}-split ${kt}-header`]:{borderBlockEnd:`${(0,ve.unit)(zt.lineWidth)} ${zt.lineType} ${zt.colorSplit}`},[`${kt}-split${kt}-empty ${kt}-footer`]:{borderTop:`${(0,ve.unit)(zt.lineWidth)} ${zt.lineType} ${zt.colorSplit}`},[`${kt}-loading ${kt}-spin-nested-loading`]:{minHeight:wn},[`${kt}-split${kt}-something-after-last-item ${Ye}-spin-container > ${kt}-items > ${kt}-item:last-child`]:{borderBlockEnd:`${(0,ve.unit)(zt.lineWidth)} ${zt.lineType} ${zt.colorSplit}`},[`${kt}-lg ${kt}-item`]:{padding:ke},[`${kt}-sm ${kt}-item`]:{padding:gn},[`${kt}:not(${kt}-vertical)`]:{[`${kt}-item-no-flex`]:{[`${kt}-item-action`]:{float:"right"}}}}},Re=zt=>({contentWidth:220,itemPadding:`${(0,ve.unit)(zt.paddingContentVertical)} 0`,itemPaddingSM:`${(0,ve.unit)(zt.paddingContentVerticalSM)} ${(0,ve.unit)(zt.paddingContentHorizontal)}`,itemPaddingLG:`${(0,ve.unit)(zt.paddingContentVerticalLG)} ${(0,ve.unit)(zt.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:zt.padding,metaMarginBottom:zt.padding,avatarMarginRight:zt.padding,titleMarginBottom:zt.paddingSM,descriptionFontSize:zt.fontSize});var De=(0,Se.I$)("List",zt=>{const kt=(0,be.mergeToken)(zt,{listBorderedCls:`${zt.componentCls}-bordered`,minHeight:zt.controlHeightLG});return[ie(kt),Le(kt),en(kt)]},Re),Tt=function(zt,kt){var Ye={};for(var wn in zt)Object.prototype.hasOwnProperty.call(zt,wn)&&kt.indexOf(wn)<0&&(Ye[wn]=zt[wn]);if(zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,wn=Object.getOwnPropertySymbols(zt);on<wn.length;on++)kt.indexOf(wn[on])<0&&Object.prototype.propertyIsEnumerable.call(zt,wn[on])&&(Ye[wn[on]]=zt[wn[on]]);return Ye};function rn(zt,kt){var{pagination:Ye=!1,prefixCls:wn,bordered:on=!1,split:$t=!0,className:Ee,rootClassName:Be,style:Cn,children:Ie,itemLayout:gn,loadMore:ke,grid:Dn,dataSource:ln=[],size:bt,header:gt,footer:pt,loading:Ct=!1,rowKey:Pt,renderItem:vt,locale:Et}=zt,Zt=Tt(zt,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]);const Ve=Ye&&typeof Ye=="object"?Ye:{},[ue,re]=Dt.useState(Ve.defaultCurrent||1),[Ce,Te]=Dt.useState(Ve.defaultPageSize||10),{getPrefixCls:tn,direction:te,className:le,style:bn}=(0,Vt.dj)("list"),{renderEmpty:Sn}=Dt.useContext(Vt.E_),Rn={current:1,total:0},In=Qn=>(xi,Xn)=>{var $n;re(xi),Te(Xn),Ye&&(($n=Ye==null?void 0:Ye[Qn])===null||$n===void 0||$n.call(Ye,xi,Xn))},sn=In("onChange"),Hn=In("onShowSizeChange"),Mn=(Qn,xi)=>{if(!vt)return null;let Xn;return typeof Pt=="function"?Xn=Pt(Qn):Pt?Xn=Qn[Pt]:Xn=Qn.key,Xn||(Xn=`list-item-${xi}`),Dt.createElement(Dt.Fragment,{key:Xn},vt(Qn,xi))},ye=()=>!!(ke||Ye||pt),Ze=tn("list",wn),[En,An,he]=De(Ze);let Ke=Ct;typeof Ke=="boolean"&&(Ke={spinning:Ke});const hn=!!(Ke!=null&&Ke.spinning),Pn=(0,Yt.Z)(bt);let _n="";switch(Pn){case"large":_n="lg";break;case"small":_n="sm";break;default:break}const ci=xe()(Ze,{[`${Ze}-vertical`]:gn==="vertical",[`${Ze}-${_n}`]:_n,[`${Ze}-split`]:$t,[`${Ze}-bordered`]:on,[`${Ze}-loading`]:hn,[`${Ze}-grid`]:!!Dn,[`${Ze}-something-after-last-item`]:ye(),[`${Ze}-rtl`]:te==="rtl"},le,Ee,Be,An,he),yi=(0,_t.Z)(Rn,{total:ln.length,current:ue,pageSize:Ce},Ye||{}),Ni=Math.ceil(yi.total/yi.pageSize);yi.current>Ni&&(yi.current=Ni);const ri=Ye&&Dt.createElement("div",{className:xe()(`${Ze}-pagination`)},Dt.createElement(jt.Z,Object.assign({align:"end"},yi,{onChange:sn,onShowSizeChange:Hn})));let yt=(0,lt.Z)(ln);Ye&&ln.length>(yi.current-1)*yi.pageSize&&(yt=(0,lt.Z)(ln).splice((yi.current-1)*yi.pageSize,yi.pageSize));const Tn=Object.keys(Dn||{}).some(Qn=>["xs","sm","md","lg","xl","xxl"].includes(Qn)),xn=(0,Oe.Z)(Tn),Bn=Dt.useMemo(()=>{for(let Qn=0;Qn<Gt.c4.length;Qn+=1){const xi=Gt.c4[Qn];if(xn[xi])return xi}},[xn]),Zn=Dt.useMemo(()=>{if(!Dn)return;const Qn=Bn&&Dn[Bn]?Dn[Bn]:Dn.column;if(Qn)return{width:`${100/Qn}%`,maxWidth:`${100/Qn}%`}},[JSON.stringify(Dn),Bn]);let Nn=hn&&Dt.createElement("div",{style:{minHeight:53}});if(yt.length>0){const Qn=yt.map((xi,Xn)=>Mn(xi,Xn));Nn=Dn?Dt.createElement(Nt.Z,{gutter:Dn.gutter},Dt.Children.map(Qn,xi=>Dt.createElement("div",{key:xi==null?void 0:xi.key,style:Zn},xi))):Dt.createElement("ul",{className:`${Ze}-items`},Qn)}else!Ie&&!hn&&(Nn=Dt.createElement("div",{className:`${Ze}-empty-text`},(Et==null?void 0:Et.emptyText)||(Sn==null?void 0:Sn("List"))||Dt.createElement(me.Z,{componentName:"List"})));const Ln=yi.position||"bottom",ii=Dt.useMemo(()=>({grid:Dn,itemLayout:gn}),[JSON.stringify(Dn),gn]);return En(Dt.createElement(ce.Provider,{value:ii},Dt.createElement("div",Object.assign({ref:kt,style:Object.assign(Object.assign({},bn),Cn),className:ci},Zt),(Ln==="top"||Ln==="both")&&ri,gt&&Dt.createElement("div",{className:`${Ze}-header`},gt),Dt.createElement(Me.Z,Object.assign({},Ke),Nn,Ie),pt&&Dt.createElement("div",{className:`${Ze}-footer`},pt),ke||(Ln==="bottom"||Ln==="both")&&ri)))}const Ue=Dt.forwardRef(rn);Ue.Item=Xt;var On=Ue},78857:function(Yn,qe,dt){"use strict";dt.d(qe,{J:function(){return Gt}});var lt=dt(59301),Dt=dt(8654),It=dt(62487),xe=function(Vt,me){var Yt={};for(var Nt in Vt)Object.prototype.hasOwnProperty.call(Vt,Nt)&&me.indexOf(Nt)<0&&(Yt[Nt]=Vt[Nt]);if(Vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,Nt=Object.getOwnPropertySymbols(Vt);Oe<Nt.length;Oe++)me.indexOf(Nt[Oe])<0&&Object.prototype.propertyIsEnumerable.call(Vt,Nt[Oe])&&(Yt[Nt[Oe]]=Vt[Nt[Oe]]);return Yt};const _t=lt.createContext(null),Gt=lt.forwardRef((Vt,me)=>{const{children:Yt}=Vt,Nt=xe(Vt,["children"]),Oe=lt.useContext(_t),jt=lt.useMemo(()=>Object.assign(Object.assign({},Oe),Nt),[Oe,Nt.prefixCls,Nt.mode,Nt.selectable,Nt.rootClassName]),Me=(0,Dt.t4)(Yt),ce=(0,Dt.x1)(me,Me?(0,Dt.C4)(Yt):null);return lt.createElement(_t.Provider,{value:jt},lt.createElement(It.Z,{space:!0},Me?lt.cloneElement(Yt,{ref:ce}):Yt))});qe.Z=_t},93041:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return Pt}});var lt=dt(59301),Dt=dt(28321),It=dt(24303),xe=dt(18785),_t=dt(92310),Gt=dt.n(_t),Vt=dt(6089),me=dt(2738),Yt=dt(86641),Nt=dt(22703),Oe=dt(48755),jt=dt(83397),ce=(0,lt.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ee=function(vt,Et){var Zt={};for(var Ve in vt)Object.prototype.hasOwnProperty.call(vt,Ve)&&Et.indexOf(Ve)<0&&(Zt[Ve]=vt[Ve]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,Ve=Object.getOwnPropertySymbols(vt);ue<Ve.length;ue++)Et.indexOf(Ve[ue])<0&&Object.prototype.propertyIsEnumerable.call(vt,Ve[ue])&&(Zt[Ve[ue]]=vt[Ve[ue]]);return Zt},Ht=vt=>{const{prefixCls:Et,className:Zt,dashed:Ve}=vt,ue=ee(vt,["prefixCls","className","dashed"]),{getPrefixCls:re}=lt.useContext(Oe.E_),Ce=re("menu",Et),Te=Gt()({[`${Ce}-item-divider-dashed`]:!!Ve},Zt);return lt.createElement(Dt.iz,Object.assign({className:Te},ue))},de=dt(11592),Ae=dt(25399),se=vt=>{var Et;const{className:Zt,children:Ve,icon:ue,title:re,danger:Ce,extra:Te}=vt,{prefixCls:tn,firstLevel:te,direction:le,disableMenuItemTitleTooltip:bn,inlineCollapsed:Sn}=lt.useContext(ce),Rn=Ze=>{const En=Ve==null?void 0:Ve[0],An=lt.createElement("span",{className:Gt()(`${tn}-title-content`,{[`${tn}-title-content-with-extra`]:!!Te||Te===0})},Ve);return(!ue||lt.isValidElement(Ve)&&Ve.type==="span")&&Ve&&Ze&&te&&typeof En=="string"?lt.createElement("div",{className:`${tn}-inline-collapsed-noicon`},En.charAt(0)):An},{siderCollapsed:In}=lt.useContext(It.D);let sn=re;typeof re=="undefined"?sn=te?Ve:"":re===!1&&(sn="");const Hn={title:sn};!In&&!Sn&&(Hn.title=null,Hn.open=!1);const Mn=(0,de.Z)(Ve).length;let ye=lt.createElement(Dt.ck,Object.assign({},(0,me.Z)(vt,["title","icon","danger"]),{className:Gt()({[`${tn}-item-danger`]:Ce,[`${tn}-item-only-child`]:(ue?Mn+1:Mn)===1},Zt),title:typeof re=="string"?re:void 0}),(0,Nt.Tm)(ue,{className:Gt()(lt.isValidElement(ue)?(Et=ue.props)===null||Et===void 0?void 0:Et.className:"",`${tn}-item-icon`)}),Rn(Sn));return bn||(ye=lt.createElement(Ae.Z,Object.assign({},Hn,{placement:le==="rtl"?"left":"right",classNames:{root:`${tn}-inline-collapsed-tooltip`}}),ye)),ye},Xt=dt(78857),ve=dt(36237),Qt=dt(17835),Se=dt(63356),be=dt(34961),Le=dt(46e3),en=dt(34925),ie=dt(16931),Re=dt(51636),Tt=vt=>{const{componentCls:Et,motionDurationSlow:Zt,horizontalLineHeight:Ve,colorSplit:ue,lineWidth:re,lineType:Ce,itemPaddingInline:Te}=vt;return{[`${Et}-horizontal`]:{lineHeight:Ve,border:0,borderBottom:`${(0,ve.unit)(re)} ${Ce} ${ue}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Et}-item, ${Et}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Te},[`> ${Et}-item:hover,
|
|
|
> ${Et}-item-active,
|
|
|
> ${Et}-submenu ${Et}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Et}-item, ${Et}-submenu-title`]:{transition:[`border-color ${Zt}`,`background ${Zt}`].join(",")},[`${Et}-submenu-arrow`]:{display:"none"}}}},we=vt=>{let{componentCls:Et,menuArrowOffset:Zt,calc:Ve}=vt;return{[`${Et}-rtl`]:{direction:"rtl"},[`${Et}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Et}-rtl${Et}-vertical,
|
|
|
${Et}-submenu-rtl ${Et}-vertical`]:{[`${Et}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,ve.unit)(Ve(Zt).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,ve.unit)(Zt)})`}}}}};const Ue=vt=>Object.assign({},(0,Se.oN)(vt));var zt=(vt,Et)=>{const{componentCls:Zt,itemColor:Ve,itemSelectedColor:ue,subMenuItemSelectedColor:re,groupTitleColor:Ce,itemBg:Te,subMenuItemBg:tn,itemSelectedBg:te,activeBarHeight:le,activeBarWidth:bn,activeBarBorderWidth:Sn,motionDurationSlow:Rn,motionEaseInOut:In,motionEaseOut:sn,itemPaddingInline:Hn,motionDurationMid:Mn,itemHoverColor:ye,lineType:Ze,colorSplit:En,itemDisabledColor:An,dangerItemColor:he,dangerItemHoverColor:Ke,dangerItemSelectedColor:hn,dangerItemActiveBg:Pn,dangerItemSelectedBg:_n,popupBg:ci,itemHoverBg:yi,itemActiveBg:Ni,menuSubMenuBg:ri,horizontalItemSelectedColor:yt,horizontalItemSelectedBg:Tn,horizontalItemBorderRadius:xn,horizontalItemHoverBg:Bn}=vt;return{[`${Zt}-${Et}, ${Zt}-${Et} > ${Zt}`]:{color:Ve,background:Te,[`&${Zt}-root:focus-visible`]:Object.assign({},Ue(vt)),[`${Zt}-item`]:{"&-group-title, &-extra":{color:Ce}},[`${Zt}-submenu-selected > ${Zt}-submenu-title`]:{color:re},[`${Zt}-item, ${Zt}-submenu-title`]:{color:Ve,[`&:not(${Zt}-item-disabled):focus-visible`]:Object.assign({},Ue(vt))},[`${Zt}-item-disabled, ${Zt}-submenu-disabled`]:{color:`${An} !important`},[`${Zt}-item:not(${Zt}-item-selected):not(${Zt}-submenu-selected)`]:{[`&:hover, > ${Zt}-submenu-title:hover`]:{color:ye}},[`&:not(${Zt}-horizontal)`]:{[`${Zt}-item:not(${Zt}-item-selected)`]:{"&:hover":{backgroundColor:yi},"&:active":{backgroundColor:Ni}},[`${Zt}-submenu-title`]:{"&:hover":{backgroundColor:yi},"&:active":{backgroundColor:Ni}}},[`${Zt}-item-danger`]:{color:he,[`&${Zt}-item:hover`]:{[`&:not(${Zt}-item-selected):not(${Zt}-submenu-selected)`]:{color:Ke}},[`&${Zt}-item:active`]:{background:Pn}},[`${Zt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Zt}-item-selected`]:{color:ue,[`&${Zt}-item-danger`]:{color:hn},"a, a:hover":{color:"inherit"}},[`& ${Zt}-item-selected`]:{backgroundColor:te,[`&${Zt}-item-danger`]:{backgroundColor:_n}},[`&${Zt}-submenu > ${Zt}`]:{backgroundColor:ri},[`&${Zt}-popup > ${Zt}`]:{backgroundColor:ci},[`&${Zt}-submenu-popup > ${Zt}`]:{backgroundColor:ci},[`&${Zt}-horizontal`]:Object.assign(Object.assign({},Et==="dark"?{borderBottom:0}:{}),{[`> ${Zt}-item, > ${Zt}-submenu`]:{top:Sn,marginTop:vt.calc(Sn).mul(-1).equal(),marginBottom:0,borderRadius:xn,"&::after":{position:"absolute",insetInline:Hn,bottom:0,borderBottom:`${(0,ve.unit)(le)} solid transparent`,transition:`border-color ${Rn} ${In}`,content:'""'},"&:hover, &-active, &-open":{background:Bn,"&::after":{borderBottomWidth:le,borderBottomColor:yt}},"&-selected":{color:yt,backgroundColor:Tn,"&:hover":{backgroundColor:Tn},"&::after":{borderBottomWidth:le,borderBottomColor:yt}}}}),[`&${Zt}-root`]:{[`&${Zt}-inline, &${Zt}-vertical`]:{borderInlineEnd:`${(0,ve.unit)(Sn)} ${Ze} ${En}`}},[`&${Zt}-inline`]:{[`${Zt}-sub${Zt}-inline`]:{background:tn},[`${Zt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,ve.unit)(bn)} solid ${ue}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Mn} ${sn}`,`opacity ${Mn} ${sn}`].join(","),content:'""'},[`&${Zt}-item-danger`]:{"&::after":{borderInlineEndColor:hn}}},[`${Zt}-selected, ${Zt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Mn} ${In}`,`opacity ${Mn} ${In}`].join(",")}}}}}};const kt=vt=>{const{componentCls:Et,itemHeight:Zt,itemMarginInline:Ve,padding:ue,menuArrowSize:re,marginXS:Ce,itemMarginBlock:Te,itemWidth:tn,itemPaddingInline:te}=vt,le=vt.calc(re).add(ue).add(Ce).equal();return{[`${Et}-item`]:{position:"relative",overflow:"hidden"},[`${Et}-item, ${Et}-submenu-title`]:{height:Zt,lineHeight:(0,ve.unit)(Zt),paddingInline:te,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ve,marginBlock:Te,width:tn},[`> ${Et}-item,
|
|
|
> ${Et}-submenu > ${Et}-submenu-title`]:{height:Zt,lineHeight:(0,ve.unit)(Zt)},[`${Et}-item-group-list ${Et}-submenu-title,
|
|
|
${Et}-submenu-title`]:{paddingInlineEnd:le}}};var wn=vt=>{const{componentCls:Et,iconCls:Zt,itemHeight:Ve,colorTextLightSolid:ue,dropdownWidth:re,controlHeightLG:Ce,motionEaseOut:Te,paddingXL:tn,itemMarginInline:te,fontSizeLG:le,motionDurationFast:bn,motionDurationSlow:Sn,paddingXS:Rn,boxShadowSecondary:In,collapsedWidth:sn,collapsedIconSize:Hn}=vt,Mn={height:Ve,lineHeight:(0,ve.unit)(Ve),listStylePosition:"inside",listStyleType:"disc"};return[{[Et]:{"&-inline, &-vertical":Object.assign({[`&${Et}-root`]:{boxShadow:"none"}},kt(vt))},[`${Et}-submenu-popup`]:{[`${Et}-vertical`]:Object.assign(Object.assign({},kt(vt)),{boxShadow:In})}},{[`${Et}-submenu-popup ${Et}-vertical${Et}-sub`]:{minWidth:re,maxHeight:`calc(100vh - ${(0,ve.unit)(vt.calc(Ce).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Et}-inline`]:{width:"100%",[`&${Et}-root`]:{[`${Et}-item, ${Et}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Sn}`,`background ${Sn}`,`padding ${bn} ${Te}`].join(","),[`> ${Et}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Et}-sub${Et}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Et}-submenu > ${Et}-submenu-title`]:Mn,[`& ${Et}-item-group-title`]:{paddingInlineStart:tn}},[`${Et}-item`]:Mn}},{[`${Et}-inline-collapsed`]:{width:sn,[`&${Et}-root`]:{[`${Et}-item, ${Et}-submenu ${Et}-submenu-title`]:{[`> ${Et}-inline-collapsed-noicon`]:{fontSize:le,textAlign:"center"}}},[`> ${Et}-item,
|
|
|
> ${Et}-item-group > ${Et}-item-group-list > ${Et}-item,
|
|
|
> ${Et}-item-group > ${Et}-item-group-list > ${Et}-submenu > ${Et}-submenu-title,
|
|
|
> ${Et}-submenu > ${Et}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,ve.unit)(vt.calc(Hn).div(2).equal())} - ${(0,ve.unit)(te)})`,textOverflow:"clip",[`
|
|
|
${Et}-submenu-arrow,
|
|
|
${Et}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Et}-item-icon, ${Zt}`]:{margin:0,fontSize:Hn,lineHeight:(0,ve.unit)(Ve),"+ span":{display:"inline-block",opacity:0}}},[`${Et}-item-icon, ${Zt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Et}-item-icon, ${Zt}`]:{display:"none"},"a, a:hover":{color:ue}},[`${Et}-item-group-title`]:Object.assign(Object.assign({},Se.vS),{paddingInline:Rn})}}]};const on=vt=>{const{componentCls:Et,motionDurationSlow:Zt,motionDurationMid:Ve,motionEaseInOut:ue,motionEaseOut:re,iconCls:Ce,iconSize:Te,iconMarginInlineEnd:tn}=vt;return{[`${Et}-item, ${Et}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Zt}`,`background ${Zt}`,`padding calc(${Zt} + 0.1s) ${ue}`].join(","),[`${Et}-item-icon, ${Ce}`]:{minWidth:Te,fontSize:Te,transition:[`font-size ${Ve} ${re}`,`margin ${Zt} ${ue}`,`color ${Zt}`].join(","),"+ span":{marginInlineStart:tn,opacity:1,transition:[`opacity ${Zt} ${ue}`,`margin ${Zt}`,`color ${Zt}`].join(",")}},[`${Et}-item-icon`]:Object.assign({},(0,Se.Ro)()),[`&${Et}-item-only-child`]:{[`> ${Ce}, > ${Et}-item-icon`]:{marginInlineEnd:0}}},[`${Et}-item-disabled, ${Et}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Et}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},$t=vt=>{const{componentCls:Et,motionDurationSlow:Zt,motionEaseInOut:Ve,borderRadius:ue,menuArrowSize:re,menuArrowOffset:Ce}=vt;return{[`${Et}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:vt.margin,width:re,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Zt} ${Ve}, opacity ${Zt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:vt.calc(re).mul(.6).equal(),height:vt.calc(re).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:ue,transition:[`background ${Zt} ${Ve}`,`transform ${Zt} ${Ve}`,`top ${Zt} ${Ve}`,`color ${Zt} ${Ve}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,ve.unit)(vt.calc(Ce).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,ve.unit)(Ce)})`}}}}},Ee=vt=>{const{antCls:Et,componentCls:Zt,fontSize:Ve,motionDurationSlow:ue,motionDurationMid:re,motionEaseInOut:Ce,paddingXS:Te,padding:tn,colorSplit:te,lineWidth:le,zIndexPopup:bn,borderRadiusLG:Sn,subMenuItemBorderRadius:Rn,menuArrowSize:In,menuArrowOffset:sn,lineType:Hn,groupTitleLineHeight:Mn,groupTitleFontSize:ye}=vt;return[{"":{[Zt]:Object.assign(Object.assign({},(0,Se.dF)()),{"&-hidden":{display:"none"}})},[`${Zt}-submenu-hidden`]:{display:"none"}},{[Zt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Se.Wf)(vt)),(0,Se.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Ve,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ue} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Zt}-item`]:{flex:"none"}},[`${Zt}-item, ${Zt}-submenu, ${Zt}-submenu-title`]:{borderRadius:vt.itemBorderRadius},[`${Zt}-item-group-title`]:{padding:`${(0,ve.unit)(Te)} ${(0,ve.unit)(tn)}`,fontSize:ye,lineHeight:Mn,transition:`all ${ue}`},[`&-horizontal ${Zt}-submenu`]:{transition:[`border-color ${ue} ${Ce}`,`background ${ue} ${Ce}`].join(",")},[`${Zt}-submenu, ${Zt}-submenu-inline`]:{transition:[`border-color ${ue} ${Ce}`,`background ${ue} ${Ce}`,`padding ${re} ${Ce}`].join(",")},[`${Zt}-submenu ${Zt}-sub`]:{cursor:"initial",transition:[`background ${ue} ${Ce}`,`padding ${ue} ${Ce}`].join(",")},[`${Zt}-title-content`]:{transition:`color ${ue}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Et}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${Zt}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:vt.padding}},[`${Zt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Zt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:te,borderStyle:Hn,borderWidth:0,borderTopWidth:le,marginBlock:le,padding:0,"&-dashed":{borderStyle:"dashed"}}}),on(vt)),{[`${Zt}-item-group`]:{[`${Zt}-item-group-list`]:{margin:0,padding:0,[`${Zt}-item, ${Zt}-submenu-title`]:{paddingInline:`${(0,ve.unit)(vt.calc(Ve).mul(2).equal())} ${(0,ve.unit)(tn)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:bn,borderRadius:Sn,boxShadow:"none",transformOrigin:"0 0",[`&${Zt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${Zt}`]:Object.assign(Object.assign(Object.assign({borderRadius:Sn},on(vt)),$t(vt)),{[`${Zt}-item, ${Zt}-submenu > ${Zt}-submenu-title`]:{borderRadius:Rn},[`${Zt}-submenu-title::after`]:{transition:`transform ${ue} ${Ce}`}})},"\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:vt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:vt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:vt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:vt.paddingXS}}}),$t(vt)),{[`&-inline-collapsed ${Zt}-submenu-arrow,
|
|
|
&-inline ${Zt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,ve.unit)(sn)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,ve.unit)(vt.calc(sn).mul(-1).equal())})`}},[`${Zt}-submenu-open${Zt}-submenu-inline > ${Zt}-submenu-title > ${Zt}-submenu-arrow`]:{transform:`translateY(${(0,ve.unit)(vt.calc(In).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,ve.unit)(vt.calc(sn).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,ve.unit)(sn)})`}}})},{[`${Et}-layout-header`]:{[Zt]:{lineHeight:"inherit"}}}]},Be=vt=>{var Et,Zt,Ve;const{colorPrimary:ue,colorError:re,colorTextDisabled:Ce,colorErrorBg:Te,colorText:tn,colorTextDescription:te,colorBgContainer:le,colorFillAlter:bn,colorFillContent:Sn,lineWidth:Rn,lineWidthBold:In,controlItemBgActive:sn,colorBgTextHover:Hn,controlHeightLG:Mn,lineHeight:ye,colorBgElevated:Ze,marginXXS:En,padding:An,fontSize:he,controlHeightSM:Ke,fontSizeLG:hn,colorTextLightSolid:Pn,colorErrorHover:_n}=vt,ci=(Et=vt.activeBarWidth)!==null&&Et!==void 0?Et:0,yi=(Zt=vt.activeBarBorderWidth)!==null&&Zt!==void 0?Zt:Rn,Ni=(Ve=vt.itemMarginInline)!==null&&Ve!==void 0?Ve:vt.marginXXS,ri=new Qt.FastColor(Pn).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:vt.zIndexPopupBase+50,radiusItem:vt.borderRadiusLG,itemBorderRadius:vt.borderRadiusLG,radiusSubMenuItem:vt.borderRadiusSM,subMenuItemBorderRadius:vt.borderRadiusSM,colorItemText:tn,itemColor:tn,colorItemTextHover:tn,itemHoverColor:tn,colorItemTextHoverHorizontal:ue,horizontalItemHoverColor:ue,colorGroupTitle:te,groupTitleColor:te,colorItemTextSelected:ue,itemSelectedColor:ue,subMenuItemSelectedColor:ue,colorItemTextSelectedHorizontal:ue,horizontalItemSelectedColor:ue,colorItemBg:le,itemBg:le,colorItemBgHover:Hn,itemHoverBg:Hn,colorItemBgActive:Sn,itemActiveBg:sn,colorSubItemBg:bn,subMenuItemBg:bn,colorItemBgSelected:sn,itemSelectedBg:sn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:ci,colorActiveBarHeight:In,activeBarHeight:In,colorActiveBarBorderSize:Rn,activeBarBorderWidth:yi,colorItemTextDisabled:Ce,itemDisabledColor:Ce,colorDangerItemText:re,dangerItemColor:re,colorDangerItemTextHover:re,dangerItemHoverColor:re,colorDangerItemTextSelected:re,dangerItemSelectedColor:re,colorDangerItemBgActive:Te,dangerItemActiveBg:Te,colorDangerItemBgSelected:Te,dangerItemSelectedBg:Te,itemMarginInline:Ni,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Mn,groupTitleLineHeight:ye,collapsedWidth:Mn*2,popupBg:Ze,itemMarginBlock:En,itemPaddingInline:An,horizontalLineHeight:`${Mn*1.15}px`,iconSize:he,iconMarginInlineEnd:Ke-he,collapsedIconSize:hn,groupTitleFontSize:he,darkItemDisabledColor:new Qt.FastColor(Pn).setA(.25).toRgbString(),darkItemColor:ri,darkDangerItemColor:re,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Pn,darkItemSelectedBg:ue,darkDangerItemSelectedBg:re,darkItemHoverBg:"transparent",darkGroupTitleColor:ri,darkItemHoverColor:Pn,darkDangerItemHoverColor:_n,darkDangerItemSelectedColor:Pn,darkDangerItemActiveBg:re,itemWidth:ci?`calc(100% + ${yi}px)`:`calc(100% - ${Ni*2}px)`}};var Cn=function(vt){let Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt,Zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,ie.I$)("Menu",ue=>{const{colorBgElevated:re,controlHeightLG:Ce,fontSize:Te,darkItemColor:tn,darkDangerItemColor:te,darkItemBg:le,darkSubMenuItemBg:bn,darkItemSelectedColor:Sn,darkItemSelectedBg:Rn,darkDangerItemSelectedBg:In,darkItemHoverBg:sn,darkGroupTitleColor:Hn,darkItemHoverColor:Mn,darkItemDisabledColor:ye,darkDangerItemHoverColor:Ze,darkDangerItemSelectedColor:En,darkDangerItemActiveBg:An,popupBg:he,darkPopupBg:Ke}=ue,hn=ue.calc(Te).div(7).mul(5).equal(),Pn=(0,Re.mergeToken)(ue,{menuArrowSize:hn,menuHorizontalHeight:ue.calc(Ce).mul(1.15).equal(),menuArrowOffset:ue.calc(hn).mul(.25).equal(),menuSubMenuBg:re,calc:ue.calc,popupBg:he}),_n=(0,Re.mergeToken)(Pn,{itemColor:tn,itemHoverColor:Mn,groupTitleColor:Hn,itemSelectedColor:Sn,subMenuItemSelectedColor:Sn,itemBg:le,popupBg:Ke,subMenuItemBg:bn,itemActiveBg:"transparent",itemSelectedBg:Rn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:sn,itemDisabledColor:ye,dangerItemColor:te,dangerItemHoverColor:Ze,dangerItemSelectedColor:En,dangerItemActiveBg:An,dangerItemSelectedBg:In,menuSubMenuBg:bn,horizontalItemSelectedColor:Sn,horizontalItemSelectedBg:Rn});return[Ee(Pn),Tt(Pn),wn(Pn),zt(Pn,"light"),zt(_n,"dark"),we(Pn),(0,be.Z)(Pn),(0,Le.oN)(Pn,"slide-up"),(0,Le.oN)(Pn,"slide-down"),(0,en._y)(Pn,"zoom-big")]},Be,{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"]],injectStyle:Zt,unitless:{groupTitleLineHeight:!0}})(vt,Et)},Ie=dt(75030),ke=vt=>{var Et;const{popupClassName:Zt,icon:Ve,title:ue,theme:re}=vt,Ce=lt.useContext(ce),{prefixCls:Te,inlineCollapsed:tn,theme:te}=Ce,le=(0,Dt.Xl)();let bn;if(!Ve)bn=tn&&!le.length&&ue&&typeof ue=="string"?lt.createElement("div",{className:`${Te}-inline-collapsed-noicon`},ue.charAt(0)):lt.createElement("span",{className:`${Te}-title-content`},ue);else{const In=lt.isValidElement(ue)&&ue.type==="span";bn=lt.createElement(lt.Fragment,null,(0,Nt.Tm)(Ve,{className:Gt()(lt.isValidElement(Ve)?(Et=Ve.props)===null||Et===void 0?void 0:Et.className:"",`${Te}-item-icon`)}),In?ue:lt.createElement("span",{className:`${Te}-title-content`},ue))}const Sn=lt.useMemo(()=>Object.assign(Object.assign({},Ce),{firstLevel:!1}),[Ce]),[Rn]=(0,Ie.Cn)("Menu");return lt.createElement(ce.Provider,{value:Sn},lt.createElement(Dt.Wd,Object.assign({},(0,me.Z)(vt,["icon"]),{title:bn,popupClassName:Gt()(Te,Zt,`${Te}-${re||te}`),popupStyle:Object.assign({zIndex:Rn},vt.popupStyle)})))},Dn=function(vt,Et){var Zt={};for(var Ve in vt)Object.prototype.hasOwnProperty.call(vt,Ve)&&Et.indexOf(Ve)<0&&(Zt[Ve]=vt[Ve]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,Ve=Object.getOwnPropertySymbols(vt);ue<Ve.length;ue++)Et.indexOf(Ve[ue])<0&&Object.prototype.propertyIsEnumerable.call(vt,Ve[ue])&&(Zt[Ve[ue]]=vt[Ve[ue]]);return Zt};function ln(vt){return vt===null||vt===!1}const bt={item:se,submenu:ke,divider:Ht};var pt=(0,lt.forwardRef)((vt,Et)=>{var Zt;const Ve=lt.useContext(Xt.Z),ue=Ve||{},{getPrefixCls:re,getPopupContainer:Ce,direction:Te,menu:tn}=lt.useContext(Oe.E_),te=re(),{prefixCls:le,className:bn,style:Sn,theme:Rn="light",expandIcon:In,_internalDisableMenuItemTitleTooltip:sn,inlineCollapsed:Hn,siderCollapsed:Mn,rootClassName:ye,mode:Ze,selectable:En,onClick:An,overflowedIndicatorPopupClassName:he}=vt,Ke=Dn(vt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),hn=(0,me.Z)(Ke,["collapsedWidth"]);(Zt=ue.validator)===null||Zt===void 0||Zt.call(ue,{mode:Ze});const Pn=(0,Vt.Z)(function(){var ii;An==null||An.apply(void 0,arguments),(ii=ue.onClick)===null||ii===void 0||ii.call(ue)}),_n=ue.mode||Ze,ci=En!=null?En:ue.selectable,yi=Hn!=null?Hn:Mn,Ni={horizontal:{motionName:`${te}-slide-up`},inline:(0,Yt.Z)(te),other:{motionName:`${te}-zoom-big`}},ri=re("menu",le||ue.prefixCls),yt=(0,jt.Z)(ri),[Tn,xn,Bn]=Cn(ri,yt,!Ve),Zn=Gt()(`${ri}-${Rn}`,tn==null?void 0:tn.className,bn),Nn=lt.useMemo(()=>{var ii,Qn;if(typeof In=="function"||ln(In))return In||null;if(typeof ue.expandIcon=="function"||ln(ue.expandIcon))return ue.expandIcon||null;if(typeof(tn==null?void 0:tn.expandIcon)=="function"||ln(tn==null?void 0:tn.expandIcon))return(tn==null?void 0:tn.expandIcon)||null;const xi=(ii=In!=null?In:ue==null?void 0:ue.expandIcon)!==null&&ii!==void 0?ii:tn==null?void 0:tn.expandIcon;return(0,Nt.Tm)(xi,{className:Gt()(`${ri}-submenu-expand-icon`,lt.isValidElement(xi)?(Qn=xi.props)===null||Qn===void 0?void 0:Qn.className:void 0)})},[In,ue==null?void 0:ue.expandIcon,tn==null?void 0:tn.expandIcon,ri]),Ln=lt.useMemo(()=>({prefixCls:ri,inlineCollapsed:yi||!1,direction:Te,firstLevel:!0,theme:Rn,mode:_n,disableMenuItemTitleTooltip:sn}),[ri,yi,Te,sn,Rn]);return Tn(lt.createElement(Xt.Z.Provider,{value:null},lt.createElement(ce.Provider,{value:Ln},lt.createElement(Dt.ZP,Object.assign({getPopupContainer:Ce,overflowedIndicator:lt.createElement(xe.Z,null),overflowedIndicatorPopupClassName:Gt()(ri,`${ri}-${Rn}`,he),mode:_n,selectable:ci,onClick:Pn},hn,{inlineCollapsed:yi,style:Object.assign(Object.assign({},tn==null?void 0:tn.style),Sn),className:Zn,prefixCls:ri,direction:Te,defaultMotions:Ni,expandIcon:Nn,ref:Et,rootClassName:Gt()(ye,xn,ue.rootClassName,Bn,yt),_internalComponents:bt})))))});const Ct=(0,lt.forwardRef)((vt,Et)=>{const Zt=(0,lt.useRef)(null),Ve=lt.useContext(It.D);return(0,lt.useImperativeHandle)(Et,()=>({menu:Zt.current,focus:ue=>{var re;(re=Zt.current)===null||re===void 0||re.focus(ue)}})),lt.createElement(pt,Object.assign({ref:Zt},vt,Ve))});Ct.Item=se,Ct.SubMenu=ke,Ct.Divider=Ht,Ct.ItemGroup=Dt.BW;var Pt=Ct},31709:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return tn}});var lt=dt(59301),Dt=dt(60499),It={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"},xe=It,_t=dt(7657),Gt=function(le,bn){return lt.createElement(_t.Z,(0,Dt.Z)({},le,{ref:bn,icon:xe}))},Vt=lt.forwardRef(Gt),me=Vt,Yt=dt(49198),Nt=dt(33853),Oe=dt(38819),jt=dt(92310),Me=dt.n(jt),ce=dt(18642),ee=dt(43749),Kt=dt(85899),Ht=dt(72190),de=dt(18929),Ae=dt(10228),je=dt(26112),se=dt(48736),Xt=dt(17119),ve=[10,20,50,100],Qt=function(le){var bn=le.pageSizeOptions,Sn=bn===void 0?ve:bn,Rn=le.locale,In=le.changeSize,sn=le.pageSize,Hn=le.goButton,Mn=le.quickGo,ye=le.rootPrefixCls,Ze=le.disabled,En=le.buildOptionText,An=le.showSizeChanger,he=le.sizeChangerRender,Ke=lt.useState(""),hn=(0,Ht.Z)(Ke,2),Pn=hn[0],_n=hn[1],ci=function(){return!Pn||Number.isNaN(Pn)?void 0:Number(Pn)},yi=typeof En=="function"?En:function(Ln){return"".concat(Ln," ").concat(Rn.items_per_page)},Ni=function(ii){_n(ii.target.value)},ri=function(ii){Hn||Pn===""||(_n(""),!(ii.relatedTarget&&(ii.relatedTarget.className.indexOf("".concat(ye,"-item-link"))>=0||ii.relatedTarget.className.indexOf("".concat(ye,"-item"))>=0))&&(Mn==null||Mn(ci())))},yt=function(ii){Pn!==""&&(ii.keyCode===Ae.Z.ENTER||ii.type==="click")&&(_n(""),Mn==null||Mn(ci()))},Tn=function(){return Sn.some(function(ii){return ii.toString()===sn.toString()})?Sn:Sn.concat([sn]).sort(function(ii,Qn){var xi=Number.isNaN(Number(ii))?0:Number(ii),Xn=Number.isNaN(Number(Qn))?0:Number(Qn);return xi-Xn})},xn="".concat(ye,"-options");if(!An&&!Mn)return null;var Bn=null,Zn=null,Nn=null;return An&&he&&(Bn=he({disabled:Ze,size:sn,onSizeChange:function(ii){In==null||In(Number(ii))},"aria-label":Rn.page_size,className:"".concat(xn,"-size-changer"),options:Tn().map(function(Ln){return{label:yi(Ln),value:Ln}})})),Mn&&(Hn&&(Nn=typeof Hn=="boolean"?lt.createElement("button",{type:"button",onClick:yt,onKeyUp:yt,disabled:Ze,className:"".concat(xn,"-quick-jumper-button")},Rn.jump_to_confirm):lt.createElement("span",{onClick:yt,onKeyUp:yt},Hn)),Zn=lt.createElement("div",{className:"".concat(xn,"-quick-jumper")},Rn.jump_to,lt.createElement("input",{disabled:Ze,type:"text",value:Pn,onChange:Ni,onKeyUp:yt,onBlur:ri,"aria-label":Rn.page}),Rn.page,Nn)),lt.createElement("li",{className:xn},Bn,Zn)},Se=Qt,be=function(le){var bn=le.rootPrefixCls,Sn=le.page,Rn=le.active,In=le.className,sn=le.showTitle,Hn=le.onClick,Mn=le.onKeyPress,ye=le.itemRender,Ze="".concat(bn,"-item"),En=Me()(Ze,"".concat(Ze,"-").concat(Sn),(0,ce.Z)((0,ce.Z)({},"".concat(Ze,"-active"),Rn),"".concat(Ze,"-disabled"),!Sn),In),An=function(){Hn(Sn)},he=function(Pn){Mn(Pn,Hn,Sn)},Ke=ye(Sn,"page",lt.createElement("a",{rel:"nofollow"},Sn));return Ke?lt.createElement("li",{title:sn?String(Sn):null,className:En,onClick:An,onKeyDown:he,tabIndex:0},Ke):null},Le=be,en=function(le,bn,Sn){return Sn};function ie(){}function Re(te){var le=Number(te);return typeof le=="number"&&!Number.isNaN(le)&&isFinite(le)&&Math.floor(le)===le}function De(te,le,bn){var Sn=typeof te=="undefined"?le:te;return Math.floor((bn-1)/Sn)+1}var Tt=function(le){var bn=le.prefixCls,Sn=bn===void 0?"rc-pagination":bn,Rn=le.selectPrefixCls,In=Rn===void 0?"rc-select":Rn,sn=le.className,Hn=le.current,Mn=le.defaultCurrent,ye=Mn===void 0?1:Mn,Ze=le.total,En=Ze===void 0?0:Ze,An=le.pageSize,he=le.defaultPageSize,Ke=he===void 0?10:he,hn=le.onChange,Pn=hn===void 0?ie:hn,_n=le.hideOnSinglePage,ci=le.align,yi=le.showPrevNextJumpers,Ni=yi===void 0?!0:yi,ri=le.showQuickJumper,yt=le.showLessItems,Tn=le.showTitle,xn=Tn===void 0?!0:Tn,Bn=le.onShowSizeChange,Zn=Bn===void 0?ie:Bn,Nn=le.locale,Ln=Nn===void 0?Xt.Z:Nn,ii=le.style,Qn=le.totalBoundaryShowSizeChanger,xi=Qn===void 0?50:Qn,Xn=le.disabled,$n=le.simple,Hi=le.showTotal,Bi=le.showSizeChanger,sr=Bi===void 0?En>xi:Bi,Jn=le.sizeChangerRender,Vn=le.pageSizeOptions,oi=le.itemRender,Ti=oi===void 0?en:oi,Ci=le.jumpPrevIcon,Rt=le.jumpNextIcon,Pe=le.prevIcon,qt=le.nextIcon,He=lt.useRef(null),ae=(0,de.Z)(10,{value:An,defaultValue:Ke}),ze=(0,Ht.Z)(ae,2),Jt=ze[0],nn=ze[1],cn=(0,de.Z)(1,{value:Hn,defaultValue:ye,postState:function(Cr){return Math.max(1,Math.min(Cr,De(void 0,Jt,En)))}}),Ne=(0,Ht.Z)(cn,2),Fe=Ne[0],Xe=Ne[1],Je=lt.useState(Fe),vn=(0,Ht.Z)(Je,2),li=vn[0],jn=vn[1];(0,lt.useEffect)(function(){jn(Fe)},[Fe]);var vi=Pn!==ie,$i="current"in le,Ji=Math.max(1,Fe-(yt?3:5)),yn=Math.min(De(void 0,Jt,En),Fe+(yt?3:5));function zi(wr,Cr){var bo=wr||lt.createElement("button",{type:"button","aria-label":Cr,className:"".concat(Sn,"-item-link")});return typeof wr=="function"&&(bo=lt.createElement(wr,(0,Kt.Z)({},le))),bo}function Ri(wr){var Cr=wr.target.value,bo=De(void 0,Jt,En),Ar;return Cr===""?Ar=Cr:Number.isNaN(Number(Cr))?Ar=li:Cr>=bo?Ar=bo:Ar=Number(Cr),Ar}function Ii(wr){return Re(wr)&&wr!==Fe&&Re(En)&&En>0}var an=En>Jt?ri:!1;function Qe(wr){(wr.keyCode===Ae.Z.UP||wr.keyCode===Ae.Z.DOWN)&&wr.preventDefault()}function We(wr){var Cr=Ri(wr);switch(Cr!==li&&jn(Cr),wr.keyCode){case Ae.Z.ENTER:Wn(Cr);break;case Ae.Z.UP:Wn(Cr-1);break;case Ae.Z.DOWN:Wn(Cr+1);break;default:break}}function mn(wr){Wn(Ri(wr))}function fn(wr){var Cr=De(wr,Jt,En),bo=Fe>Cr&&Cr!==0?Cr:Fe;nn(wr),jn(bo),Zn==null||Zn(Fe,wr),Xe(bo),Pn==null||Pn(bo,wr)}function Wn(wr){if(Ii(wr)&&!Xn){var Cr=De(void 0,Jt,En),bo=wr;return wr>Cr?bo=Cr:wr<1&&(bo=1),bo!==li&&jn(bo),Xe(bo),Pn==null||Pn(bo,Jt),bo}return Fe}var $e=Fe>1,Si=Fe<De(void 0,Jt,En);function pn(){$e&&Wn(Fe-1)}function wi(){Si&&Wn(Fe+1)}function Wi(){Wn(Ji)}function Ui(){Wn(yn)}function Vi(wr,Cr){if(wr.key==="Enter"||wr.charCode===Ae.Z.ENTER||wr.keyCode===Ae.Z.ENTER){for(var bo=arguments.length,Ar=new Array(bo>2?bo-2:0),Sr=2;Sr<bo;Sr++)Ar[Sr-2]=arguments[Sr];Cr.apply(void 0,Ar)}}function Ki(wr){Vi(wr,pn)}function Oi(wr){Vi(wr,wi)}function qi(wr){Vi(wr,Wi)}function fr(wr){Vi(wr,Ui)}function tr(wr){var Cr=Ti(wr,"prev",zi(Pe,"prev page"));return lt.isValidElement(Cr)?lt.cloneElement(Cr,{disabled:!$e}):Cr}function ai(wr){var Cr=Ti(wr,"next",zi(qt,"next page"));return lt.isValidElement(Cr)?lt.cloneElement(Cr,{disabled:!Si}):Cr}function Lt(wr){(wr.type==="click"||wr.keyCode===Ae.Z.ENTER)&&Wn(li)}var ur=null,Qi=(0,je.Z)(le,{aria:!0,data:!0}),Yi=Hi&<.createElement("li",{className:"".concat(Sn,"-total-text")},Hi(En,[En===0?0:(Fe-1)*Jt+1,Fe*Jt>En?En:Fe*Jt])),nr=null,_i=De(void 0,Jt,En);if(_n&&En<=Jt)return null;var ui=[],Ei={rootPrefixCls:Sn,onClick:Wn,onKeyPress:Vi,showTitle:xn,itemRender:Ti,page:-1},Mi=Fe-1>0?Fe-1:0,Gn=Fe+1<_i?Fe+1:_i,gi=ri&&ri.goButton,Li=(0,ee.Z)($n)==="object"?$n.readOnly:!$n,pi=gi,ni=null;$n&&(gi&&(typeof gi=="boolean"?pi=lt.createElement("button",{type:"button",onClick:Lt,onKeyUp:Lt},Ln.jump_to_confirm):pi=lt.createElement("span",{onClick:Lt,onKeyUp:Lt},gi),pi=lt.createElement("li",{title:xn?"".concat(Ln.jump_to).concat(Fe,"/").concat(_i):null,className:"".concat(Sn,"-simple-pager")},pi)),ni=lt.createElement("li",{title:xn?"".concat(Fe,"/").concat(_i):null,className:"".concat(Sn,"-simple-pager")},Li?li:lt.createElement("input",{type:"text","aria-label":Ln.jump_to,value:li,disabled:Xn,onKeyDown:Qe,onKeyUp:We,onChange:We,onBlur:mn,size:3}),lt.createElement("span",{className:"".concat(Sn,"-slash")},"/"),_i));var kn=yt?1:2;if(_i<=3+kn*2){_i||ui.push(lt.createElement(Le,(0,Dt.Z)({},Ei,{key:"noPager",page:1,className:"".concat(Sn,"-item-disabled")})));for(var ji=1;ji<=_i;ji+=1)ui.push(lt.createElement(Le,(0,Dt.Z)({},Ei,{key:ji,page:ji,active:Fe===ji})))}else{var br=yt?Ln.prev_3:Ln.prev_5,Dr=yt?Ln.next_3:Ln.next_5,Or=Ti(Ji,"jump-prev",zi(Ci,"prev page")),Vr=Ti(yn,"jump-next",zi(Rt,"next page"));Ni&&(ur=Or?lt.createElement("li",{title:xn?br:null,key:"prev",onClick:Wi,tabIndex:0,onKeyDown:qi,className:Me()("".concat(Sn,"-jump-prev"),(0,ce.Z)({},"".concat(Sn,"-jump-prev-custom-icon"),!!Ci))},Or):null,nr=Vr?lt.createElement("li",{title:xn?Dr:null,key:"next",onClick:Ui,tabIndex:0,onKeyDown:fr,className:Me()("".concat(Sn,"-jump-next"),(0,ce.Z)({},"".concat(Sn,"-jump-next-custom-icon"),!!Rt))},Vr):null);var Gr=Math.max(1,Fe-kn),Ur=Math.min(Fe+kn,_i);Fe-1<=kn&&(Ur=1+kn*2),_i-Fe<=kn&&(Gr=_i-kn*2);for(var ro=Gr;ro<=Ur;ro+=1)ui.push(lt.createElement(Le,(0,Dt.Z)({},Ei,{key:ro,page:ro,active:Fe===ro})));if(Fe-1>=kn*2&&Fe!==3&&(ui[0]=lt.cloneElement(ui[0],{className:Me()("".concat(Sn,"-item-after-jump-prev"),ui[0].props.className)}),ui.unshift(ur)),_i-Fe>=kn*2&&Fe!==_i-2){var Kr=ui[ui.length-1];ui[ui.length-1]=lt.cloneElement(Kr,{className:Me()("".concat(Sn,"-item-before-jump-next"),Kr.props.className)}),ui.push(nr)}Gr!==1&&ui.unshift(lt.createElement(Le,(0,Dt.Z)({},Ei,{key:1,page:1}))),Ur!==_i&&ui.push(lt.createElement(Le,(0,Dt.Z)({},Ei,{key:_i,page:_i})))}var uo=tr(Mi);if(uo){var un=!$e||!_i;uo=lt.createElement("li",{title:xn?Ln.prev_page:null,onClick:pn,tabIndex:un?null:0,onKeyDown:Ki,className:Me()("".concat(Sn,"-prev"),(0,ce.Z)({},"".concat(Sn,"-disabled"),un)),"aria-disabled":un},uo)}var So=ai(Gn);if(So){var Io,ho;$n?(Io=!Si,ho=$e?0:null):(Io=!Si||!_i,ho=Io?null:0),So=lt.createElement("li",{title:xn?Ln.next_page:null,onClick:wi,tabIndex:ho,onKeyDown:Oi,className:Me()("".concat(Sn,"-next"),(0,ce.Z)({},"".concat(Sn,"-disabled"),Io)),"aria-disabled":Io},So)}var to=Me()(Sn,sn,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(Sn,"-start"),ci==="start"),"".concat(Sn,"-center"),ci==="center"),"".concat(Sn,"-end"),ci==="end"),"".concat(Sn,"-simple"),$n),"".concat(Sn,"-disabled"),Xn));return lt.createElement("ul",(0,Dt.Z)({className:to,style:ii,ref:He},Qi),Yi,uo,$n?ni:ui,So,lt.createElement(Se,{locale:Ln,rootPrefixCls:Sn,disabled:Xn,selectPrefixCls:In,changeSize:fn,pageSize:Jt,pageSizeOptions:Vn,quickGo:an?Wn:null,goButton:pi,showSizeChanger:sr,sizeChangerRender:Jn}))},rn=Tt,we=dt(61852),Ue=dt(48755),On=dt(31756),zt=dt(13783),kt=dt(9017),Ye=dt(82326),wn=dt(57700),on=dt(36237),$t=dt(53075),Ee=dt(64910),Be=dt(39082),Cn=dt(63356),Ie=dt(51636),gn=dt(16931);const ke=te=>{const{componentCls:le}=te;return{[`${le}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${le}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${le}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed"}}},[`&${le}-disabled`]:{cursor:"not-allowed",[`${le}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:te.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:te.colorBorder,backgroundColor:te.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:te.itemActiveBgDisabled},a:{color:te.itemActiveColorDisabled}}},[`${le}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${le}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${le}-simple-pager`]:{color:te.colorTextDisabled},[`${le}-jump-prev, ${le}-jump-next`]:{[`${le}-item-link-icon`]:{opacity:0},[`${le}-item-ellipsis`]:{opacity:1}}},[`&${le}-simple`]:{[`${le}-prev, ${le}-next`]:{[`&${le}-disabled ${le}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Dn=te=>{const{componentCls:le}=te;return{[`&${le}-mini ${le}-total-text, &${le}-mini ${le}-simple-pager`]:{height:te.itemSizeSM,lineHeight:(0,on.unit)(te.itemSizeSM)},[`&${le}-mini ${le}-item`]:{minWidth:te.itemSizeSM,height:te.itemSizeSM,margin:0,lineHeight:(0,on.unit)(te.calc(te.itemSizeSM).sub(2).equal())},[`&${le}-mini ${le}-prev, &${le}-mini ${le}-next`]:{minWidth:te.itemSizeSM,height:te.itemSizeSM,margin:0,lineHeight:(0,on.unit)(te.itemSizeSM)},[`&${le}-mini:not(${le}-disabled)`]:{[`${le}-prev, ${le}-next`]:{[`&:hover ${le}-item-link`]:{backgroundColor:te.colorBgTextHover},[`&:active ${le}-item-link`]:{backgroundColor:te.colorBgTextActive},[`&${le}-disabled:hover ${le}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${le}-mini ${le}-prev ${le}-item-link,
|
|
|
&${le}-mini ${le}-next ${le}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:te.itemSizeSM,lineHeight:(0,on.unit)(te.itemSizeSM)}},[`&${le}-mini ${le}-jump-prev, &${le}-mini ${le}-jump-next`]:{height:te.itemSizeSM,marginInlineEnd:0,lineHeight:(0,on.unit)(te.itemSizeSM)},[`&${le}-mini ${le}-options`]:{marginInlineStart:te.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:te.miniOptionsSizeChangerTop},"&-quick-jumper":{height:te.itemSizeSM,lineHeight:(0,on.unit)(te.itemSizeSM),input:Object.assign(Object.assign({},(0,$t.x0)(te)),{width:te.paginationMiniQuickJumperInputWidth,height:te.controlHeightSM})}}}},ln=te=>{const{componentCls:le}=te;return{[`
|
|
|
&${le}-simple ${le}-prev,
|
|
|
&${le}-simple ${le}-next
|
|
|
`]:{height:te.itemSizeSM,lineHeight:(0,on.unit)(te.itemSizeSM),verticalAlign:"top",[`${le}-item-link`]:{height:te.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:te.colorBgTextHover},"&:active":{backgroundColor:te.colorBgTextActive},"&::after":{height:te.itemSizeSM,lineHeight:(0,on.unit)(te.itemSizeSM)}}},[`&${le}-simple ${le}-simple-pager`]:{display:"inline-block",height:te.itemSizeSM,marginInlineEnd:te.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${(0,on.unit)(te.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:te.itemInputBg,border:`${(0,on.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`,borderRadius:te.borderRadius,outline:"none",transition:`border-color ${te.motionDurationMid}`,color:"inherit","&:hover":{borderColor:te.colorPrimary},"&:focus":{borderColor:te.colorPrimaryHover,boxShadow:`${(0,on.unit)(te.inputOutlineOffset)} 0 ${(0,on.unit)(te.controlOutlineWidth)} ${te.controlOutline}`},"&[disabled]":{color:te.colorTextDisabled,backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,cursor:"not-allowed"}}}}},bt=te=>{const{componentCls:le}=te;return{[`${le}-jump-prev, ${le}-jump-next`]:{outline:0,[`${le}-item-container`]:{position:"relative",[`${le}-item-link-icon`]:{color:te.colorPrimary,fontSize:te.fontSizeSM,opacity:0,transition:`all ${te.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${le}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:te.colorTextDisabled,letterSpacing:te.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:te.paginationEllipsisTextIndent,opacity:1,transition:`all ${te.motionDurationMid}`}},"&:hover":{[`${le}-item-link-icon`]:{opacity:1},[`${le}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${le}-prev,
|
|
|
${le}-jump-prev,
|
|
|
${le}-jump-next
|
|
|
`]:{marginInlineEnd:te.marginXS},[`
|
|
|
${le}-prev,
|
|
|
${le}-next,
|
|
|
${le}-jump-prev,
|
|
|
${le}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:te.itemSize,height:te.itemSize,color:te.colorText,fontFamily:te.fontFamily,lineHeight:(0,on.unit)(te.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}`},[`${le}-prev, ${le}-next`]:{outline:0,button:{color:te.colorText,cursor:"pointer",userSelect:"none"},[`${le}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:te.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${(0,on.unit)(te.lineWidth)} ${te.lineType} transparent`,borderRadius:te.borderRadius,outline:"none",transition:`all ${te.motionDurationMid}`},[`&:hover ${le}-item-link`]:{backgroundColor:te.colorBgTextHover},[`&:active ${le}-item-link`]:{backgroundColor:te.colorBgTextActive},[`&${le}-disabled:hover`]:{[`${le}-item-link`]:{backgroundColor:"transparent"}}},[`${le}-slash`]:{marginInlineEnd:te.paginationSlashMarginInlineEnd,marginInlineStart:te.paginationSlashMarginInlineStart},[`${le}-options`]:{display:"inline-block",marginInlineStart:te.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:te.controlHeight,marginInlineStart:te.marginXS,lineHeight:(0,on.unit)(te.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,$t.ik)(te)),(0,Be.$U)(te,{borderColor:te.colorBorder,hoverBorderColor:te.colorPrimaryHover,activeBorderColor:te.colorPrimary,activeShadow:te.activeShadow})),{"&[disabled]":Object.assign({},(0,Be.Xy)(te)),width:te.calc(te.controlHeightLG).mul(1.25).equal(),height:te.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:te.marginXS,marginInlineEnd:te.marginXS})}}}},gt=te=>{const{componentCls:le}=te;return{[`${le}-item`]:{display:"inline-block",minWidth:te.itemSize,height:te.itemSize,marginInlineEnd:te.marginXS,fontFamily:te.fontFamily,lineHeight:(0,on.unit)(te.calc(te.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:te.itemBg,border:`${(0,on.unit)(te.lineWidth)} ${te.lineType} transparent`,borderRadius:te.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,on.unit)(te.paginationItemPaddingInline)}`,color:te.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${le}-item-active)`]:{"&:hover":{transition:`all ${te.motionDurationMid}`,backgroundColor:te.colorBgTextHover},"&:active":{backgroundColor:te.colorBgTextActive}},"&-active":{fontWeight:te.fontWeightStrong,backgroundColor:te.itemActiveBg,borderColor:te.colorPrimary,a:{color:te.colorPrimary},"&:hover":{borderColor:te.colorPrimaryHover},"&:hover a":{color:te.colorPrimaryHover}}}}},pt=te=>{const{componentCls:le}=te;return{[le]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Cn.Wf)(te)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${le}-total-text`]:{display:"inline-block",height:te.itemSize,marginInlineEnd:te.marginXS,lineHeight:(0,on.unit)(te.calc(te.itemSize).sub(2).equal()),verticalAlign:"middle"}}),gt(te)),bt(te)),ln(te)),Dn(te)),ke(te)),{[`@media only screen and (max-width: ${te.screenLG}px)`]:{[`${le}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${te.screenSM}px)`]:{[`${le}-options`]:{display:"none"}}}),[`&${te.componentCls}-rtl`]:{direction:"rtl"}}},Ct=te=>{const{componentCls:le}=te;return{[`${le}:not(${le}-disabled)`]:{[`${le}-item`]:Object.assign({},(0,Cn.Qy)(te)),[`${le}-jump-prev, ${le}-jump-next`]:{"&:focus-visible":Object.assign({[`${le}-item-link-icon`]:{opacity:1},[`${le}-item-ellipsis`]:{opacity:0}},(0,Cn.oN)(te))},[`${le}-prev, ${le}-next`]:{[`&:focus-visible ${le}-item-link`]:Object.assign({},(0,Cn.oN)(te))}}}},Pt=te=>Object.assign({itemBg:te.colorBgContainer,itemSize:te.controlHeight,itemSizeSM:te.controlHeightSM,itemActiveBg:te.colorBgContainer,itemLinkBg:te.colorBgContainer,itemActiveColorDisabled:te.colorTextDisabled,itemActiveBgDisabled:te.controlItemBgActiveDisabled,itemInputBg:te.colorBgContainer,miniOptionsSizeChangerTop:0},(0,Ee.T)(te)),vt=te=>(0,Ie.mergeToken)(te,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:te.calc(te.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:te.calc(te.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:te.calc(te.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:te.calc(te.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:te.marginSM,paginationSlashMarginInlineEnd:te.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ee.e)(te));var Et=(0,gn.I$)("Pagination",te=>{const le=vt(te);return[pt(le),Ct(le)]},Pt);const Zt=te=>{const{componentCls:le}=te;return{[`${le}${le}-bordered${le}-disabled:not(${le}-mini)`]:{"&, &:hover":{[`${le}-item-link`]:{borderColor:te.colorBorder}},"&:focus-visible":{[`${le}-item-link`]:{borderColor:te.colorBorder}},[`${le}-item, ${le}-item-link`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,[`&:hover:not(${le}-item-active)`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,a:{color:te.colorTextDisabled}},[`&${le}-item-active`]:{backgroundColor:te.itemActiveBgDisabled}},[`${le}-prev, ${le}-next`]:{"&:hover button":{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,color:te.colorTextDisabled},[`${le}-item-link`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder}}},[`${le}${le}-bordered:not(${le}-mini)`]:{[`${le}-prev, ${le}-next`]:{"&:hover button":{borderColor:te.colorPrimaryHover,backgroundColor:te.itemBg},[`${le}-item-link`]:{backgroundColor:te.itemLinkBg,borderColor:te.colorBorder},[`&:hover ${le}-item-link`]:{borderColor:te.colorPrimary,backgroundColor:te.itemBg,color:te.colorPrimary},[`&${le}-disabled`]:{[`${le}-item-link`]:{borderColor:te.colorBorder,color:te.colorTextDisabled}}},[`${le}-item`]:{backgroundColor:te.itemBg,border:`${(0,on.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`,[`&:hover:not(${le}-item-active)`]:{borderColor:te.colorPrimary,backgroundColor:te.itemBg,a:{color:te.colorPrimary}},"&-active":{borderColor:te.colorPrimary}}}}};var Ve=(0,gn.bk)(["Pagination","bordered"],te=>{const le=vt(te);return[Zt(le)]},Pt);function ue(te){return(0,lt.useMemo)(()=>typeof te=="boolean"?[te,{}]:te&&typeof te=="object"?[!0,te]:[void 0,void 0],[te])}var re=function(te,le){var bn={};for(var Sn in te)Object.prototype.hasOwnProperty.call(te,Sn)&&le.indexOf(Sn)<0&&(bn[Sn]=te[Sn]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Rn=0,Sn=Object.getOwnPropertySymbols(te);Rn<Sn.length;Rn++)le.indexOf(Sn[Rn])<0&&Object.prototype.propertyIsEnumerable.call(te,Sn[Rn])&&(bn[Sn[Rn]]=te[Sn[Rn]]);return bn},Te=te=>{const{align:le,prefixCls:bn,selectPrefixCls:Sn,className:Rn,rootClassName:In,style:sn,size:Hn,locale:Mn,responsive:ye,showSizeChanger:Ze,selectComponentClass:En,pageSizeOptions:An}=te,he=re(te,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:Ke}=(0,zt.Z)(ye),[,hn]=(0,wn.ZP)(),{getPrefixCls:Pn,direction:_n,showSizeChanger:ci,className:yi,style:Ni}=(0,Ue.dj)("pagination"),ri=Pn("pagination",bn),[yt,Tn,xn]=Et(ri),Bn=(0,On.Z)(Hn),Zn=Bn==="small"||!!(Ke&&!Bn&&ye),[Nn]=(0,kt.Z)("Pagination",we.Z),Ln=Object.assign(Object.assign({},Nn),Mn),[ii,Qn]=ue(Ze),[xi,Xn]=ue(ci),$n=ii!=null?ii:xi,Hi=Qn!=null?Qn:Xn,Bi=En||Ye.default,sr=lt.useMemo(()=>An?An.map(Rt=>Number(Rt)):void 0,[An]),Jn=Rt=>{var Pe;const{disabled:qt,size:He,onSizeChange:ae,"aria-label":ze,className:Jt,options:nn}=Rt,{className:cn,onChange:Ne}=Hi||{},Fe=(Pe=nn.find(Xe=>String(Xe.value)===String(He)))===null||Pe===void 0?void 0:Pe.value;return lt.createElement(Bi,Object.assign({disabled:qt,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:Xe=>Xe.parentNode,"aria-label":ze,options:nn},Hi,{value:Fe,onChange:(Xe,Je)=>{ae==null||ae(Xe),Ne==null||Ne(Xe,Je)},size:Zn?"small":"middle",className:Me()(Jt,cn)}))},Vn=lt.useMemo(()=>{const Rt=lt.createElement("span",{className:`${ri}-item-ellipsis`},"\u2022\u2022\u2022"),Pe=lt.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},_n==="rtl"?lt.createElement(Oe.Z,null):lt.createElement(Nt.Z,null)),qt=lt.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},_n==="rtl"?lt.createElement(Nt.Z,null):lt.createElement(Oe.Z,null)),He=lt.createElement("a",{className:`${ri}-item-link`},lt.createElement("div",{className:`${ri}-item-container`},_n==="rtl"?lt.createElement(Yt.Z,{className:`${ri}-item-link-icon`}):lt.createElement(me,{className:`${ri}-item-link-icon`}),Rt)),ae=lt.createElement("a",{className:`${ri}-item-link`},lt.createElement("div",{className:`${ri}-item-container`},_n==="rtl"?lt.createElement(me,{className:`${ri}-item-link-icon`}):lt.createElement(Yt.Z,{className:`${ri}-item-link-icon`}),Rt));return{prevIcon:Pe,nextIcon:qt,jumpPrevIcon:He,jumpNextIcon:ae}},[_n,ri]),oi=Pn("select",Sn),Ti=Me()({[`${ri}-${le}`]:!!le,[`${ri}-mini`]:Zn,[`${ri}-rtl`]:_n==="rtl",[`${ri}-bordered`]:hn.wireframe},yi,Rn,In,Tn,xn),Ci=Object.assign(Object.assign({},Ni),sn);return yt(lt.createElement(lt.Fragment,null,hn.wireframe&<.createElement(Ve,{prefixCls:ri}),lt.createElement(rn,Object.assign({},Vn,he,{style:Ci,prefixCls:ri,selectPrefixCls:oi,className:Ti,locale:Ln,pageSizeOptions:sr,showSizeChanger:$n,sizeChangerRender:Jn}))))},tn=Te},69106:function(Yn,qe,dt){"use strict";dt.d(qe,{aV:function(){return Yt},t5:function(){return Nt}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(29125),_t=dt(54500),Gt=dt(48755),Vt=dt(85074),me=function(jt,Me){var ce={};for(var ee in jt)Object.prototype.hasOwnProperty.call(jt,ee)&&Me.indexOf(ee)<0&&(ce[ee]=jt[ee]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kt=0,ee=Object.getOwnPropertySymbols(jt);Kt<ee.length;Kt++)Me.indexOf(ee[Kt])<0&&Object.prototype.propertyIsEnumerable.call(jt,ee[Kt])&&(ce[ee[Kt]]=jt[ee[Kt]]);return ce};const Yt=jt=>{let{title:Me,content:ce,prefixCls:ee}=jt;return!Me&&!ce?null:lt.createElement(lt.Fragment,null,Me&<.createElement("div",{className:`${ee}-title`},Me),ce&<.createElement("div",{className:`${ee}-inner-content`},ce))},Nt=jt=>{const{hashId:Me,prefixCls:ce,className:ee,style:Kt,placement:Ht="top",title:de,content:Ae,children:je}=jt,se=(0,_t.Z)(de),Xt=(0,_t.Z)(Ae),ve=It()(Me,ce,`${ce}-pure`,`${ce}-placement-${Ht}`,ee);return lt.createElement("div",{className:ve,style:Kt},lt.createElement("div",{className:`${ce}-arrow`}),lt.createElement(xe.G,Object.assign({},jt,{className:Me,prefixCls:ce}),je||lt.createElement(Yt,{prefixCls:ce,title:se,content:Xt})))},Oe=jt=>{const{prefixCls:Me,className:ce}=jt,ee=me(jt,["prefixCls","className"]),{getPrefixCls:Kt}=lt.useContext(Gt.E_),Ht=Kt("popover",Me),[de,Ae,je]=(0,Vt.Z)(Ht);return de(lt.createElement(Nt,Object.assign({},ee,{prefixCls:Ht,hashId:Ae,className:It()(ce,je)})))};qe.ZP=Oe},37639:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(18929),_t=dt(10228),Gt=dt(54500),Vt=dt(86641),me=dt(22703),Yt=dt(25399),Nt=dt(69106),Oe=dt(48755),jt=dt(85074),Me=function(Kt,Ht){var de={};for(var Ae in Kt)Object.prototype.hasOwnProperty.call(Kt,Ae)&&Ht.indexOf(Ae)<0&&(de[Ae]=Kt[Ae]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ae=Object.getOwnPropertySymbols(Kt);je<Ae.length;je++)Ht.indexOf(Ae[je])<0&&Object.prototype.propertyIsEnumerable.call(Kt,Ae[je])&&(de[Ae[je]]=Kt[Ae[je]]);return de};const ee=lt.forwardRef((Kt,Ht)=>{var de,Ae;const{prefixCls:je,title:se,content:Xt,overlayClassName:ve,placement:Qt="top",trigger:Se="hover",children:be,mouseEnterDelay:Le=.1,mouseLeaveDelay:en=.1,onOpenChange:ie,overlayStyle:Re={},styles:De,classNames:Tt}=Kt,rn=Me(Kt,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:we,className:Ue,style:On,classNames:zt,styles:kt}=(0,Oe.dj)("popover"),Ye=we("popover",je),[wn,on,$t]=(0,jt.Z)(Ye),Ee=we(),Be=It()(ve,on,$t,Ue,zt.root,Tt==null?void 0:Tt.root),Cn=It()(zt.body,Tt==null?void 0:Tt.body),[Ie,gn]=(0,xe.Z)(!1,{value:(de=Kt.open)!==null&&de!==void 0?de:Kt.visible,defaultValue:(Ae=Kt.defaultOpen)!==null&&Ae!==void 0?Ae:Kt.defaultVisible}),ke=(pt,Ct)=>{gn(pt,!0),ie==null||ie(pt,Ct)},Dn=pt=>{pt.keyCode===_t.Z.ESC&&ke(!1,pt)},ln=pt=>{ke(pt)},bt=(0,Gt.Z)(se),gt=(0,Gt.Z)(Xt);return wn(lt.createElement(Yt.Z,Object.assign({placement:Qt,trigger:Se,mouseEnterDelay:Le,mouseLeaveDelay:en},rn,{prefixCls:Ye,classNames:{root:Be,body:Cn},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},kt.root),On),Re),De==null?void 0:De.root),body:Object.assign(Object.assign({},kt.body),De==null?void 0:De.body)},ref:Ht,open:Ie,onOpenChange:ln,overlay:bt||gt?lt.createElement(Nt.aV,{prefixCls:Ye,title:bt,content:gt}):null,transitionName:(0,Vt.m)(Ee,"zoom-big",rn.transitionName),"data-popover-inject":!0}),(0,me.Tm)(be,{onKeyDown:pt=>{var Ct,Pt;lt.isValidElement(be)&&((Pt=be==null?void 0:(Ct=be.props).onKeyDown)===null||Pt===void 0||Pt.call(Ct,pt)),Dn(pt)}})))});ee._InternalPanelDoNotUseOrYouWillBeFired=Nt.ZP,qe.Z=ee},85074:function(Yn,qe,dt){"use strict";var lt=dt(63356),Dt=dt(34925),It=dt(37645),xe=dt(36305),_t=dt(34998),Gt=dt(16931),Vt=dt(51636);const me=Oe=>{const{componentCls:jt,popoverColor:Me,titleMinWidth:ce,fontWeightStrong:ee,innerPadding:Kt,boxShadowSecondary:Ht,colorTextHeading:de,borderRadiusLG:Ae,zIndexPopup:je,titleMarginBottom:se,colorBgElevated:Xt,popoverBg:ve,titleBorderBottom:Qt,innerContentPadding:Se,titlePadding:be}=Oe;return[{[jt]:Object.assign(Object.assign({},(0,lt.Wf)(Oe)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:je,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":Xt,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${jt}-content`]:{position:"relative"},[`${jt}-inner`]:{backgroundColor:ve,backgroundClip:"padding-box",borderRadius:Ae,boxShadow:Ht,padding:Kt},[`${jt}-title`]:{minWidth:ce,marginBottom:se,color:de,fontWeight:ee,borderBottom:Qt,padding:be},[`${jt}-inner-content`]:{color:Me,padding:Se}})},(0,It.ZP)(Oe,"var(--antd-arrow-background-color)"),{[`${jt}-pure`]:{position:"relative",maxWidth:"none",margin:Oe.sizePopupArrow,display:"inline-block",[`${jt}-content`]:{display:"inline-block"}}}]},Yt=Oe=>{const{componentCls:jt}=Oe;return{[jt]:_t.i.map(Me=>{const ce=Oe[`${Me}6`];return{[`&${jt}-${Me}`]:{"--antd-arrow-background-color":ce,[`${jt}-inner`]:{backgroundColor:ce},[`${jt}-arrow`]:{background:"transparent"}}}})}},Nt=Oe=>{const{lineWidth:jt,controlHeight:Me,fontHeight:ce,padding:ee,wireframe:Kt,zIndexPopupBase:Ht,borderRadiusLG:de,marginXS:Ae,lineType:je,colorSplit:se,paddingSM:Xt}=Oe,ve=Me-ce,Qt=ve/2,Se=ve/2-jt,be=ee;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:Ht+30},(0,xe.w)(Oe)),(0,It.wZ)({contentRadius:de,limitVerticalRadius:!0})),{innerPadding:Kt?0:12,titleMarginBottom:Kt?0:Ae,titlePadding:Kt?`${Qt}px ${be}px ${Se}px`:0,titleBorderBottom:Kt?`${jt}px ${je} ${se}`:"none",innerContentPadding:Kt?`${Xt}px ${be}px`:0})};qe.Z=(0,Gt.I$)("Popover",Oe=>{const{colorBgElevated:jt,colorText:Me}=Oe,ce=(0,Vt.mergeToken)(Oe,{popoverBg:jt,popoverColor:Me});return[me(ce),Yt(ce),(0,Dt._y)(ce,"zoom-big")]},Nt,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})},89787:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Mn}});var lt=dt(59301),Dt=dt(17835),It=dt(29679),xe=dt(40001),_t=dt(19248),Gt=dt(99267),Vt=dt(92310),me=dt.n(Vt),Yt=dt(2738),Nt=dt(48755),Oe=dt(60499),jt=dt(85899),Me=dt(42244),ce={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ee=function(){var Ze=(0,lt.useRef)([]),En=(0,lt.useRef)(null);return(0,lt.useEffect)(function(){var An=Date.now(),he=!1;Ze.current.forEach(function(Ke){if(Ke){he=!0;var hn=Ke.style;hn.transitionDuration=".3s, .3s, .3s, .06s",En.current&&An-En.current<100&&(hn.transitionDuration="0s, 0s")}}),he&&(En.current=Date.now())}),Ze.current},Kt=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Ht=function(Ze){var En=(0,jt.Z)((0,jt.Z)({},ce),Ze),An=En.className,he=En.percent,Ke=En.prefixCls,hn=En.strokeColor,Pn=En.strokeLinecap,_n=En.strokeWidth,ci=En.style,yi=En.trailColor,Ni=En.trailWidth,ri=En.transition,yt=(0,Me.Z)(En,Kt);delete yt.gapPosition;var Tn=Array.isArray(he)?he:[he],xn=Array.isArray(hn)?hn:[hn],Bn=ee(),Zn=_n/2,Nn=100-_n/2,Ln="M ".concat(Pn==="round"?Zn:0,",").concat(Zn,`
|
|
|
L `).concat(Pn==="round"?Nn:100,",").concat(Zn),ii="0 0 100 ".concat(_n),Qn=0;return lt.createElement("svg",(0,Oe.Z)({className:me()("".concat(Ke,"-line"),An),viewBox:ii,preserveAspectRatio:"none",style:ci},yt),lt.createElement("path",{className:"".concat(Ke,"-line-trail"),d:Ln,strokeLinecap:Pn,stroke:yi,strokeWidth:Ni||_n,fillOpacity:"0"}),Tn.map(function(xi,Xn){var $n=1;switch(Pn){case"round":$n=1-_n/100;break;case"square":$n=1-_n/2/100;break;default:$n=1;break}var Hi={strokeDasharray:"".concat(xi*$n,"px, 100px"),strokeDashoffset:"-".concat(Qn,"px"),transition:ri||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Bi=xn[Xn]||xn[xn.length-1];return Qn+=xi,lt.createElement("path",{key:Xn,className:"".concat(Ke,"-line-path"),d:Ln,strokeLinecap:Pn,stroke:Bi,strokeWidth:_n,fillOpacity:"0",ref:function(Jn){Bn[Xn]=Jn},style:Hi})}))},de=Ht,Ae=dt(43749),je=dt(72190),se=dt(47273),Xt=0,ve=(0,se.Z)();function Qt(){var ye;return ve?(ye=Xt,Xt+=1):ye="TEST_OR_SSR",ye}var Se=function(ye){var Ze=lt.useState(),En=(0,je.Z)(Ze,2),An=En[0],he=En[1];return lt.useEffect(function(){he("rc_progress_".concat(Qt()))},[]),ye||An},be=function(Ze){var En=Ze.bg,An=Ze.children;return lt.createElement("div",{style:{width:"100%",height:"100%",background:En}},An)};function Le(ye,Ze){return Object.keys(ye).map(function(En){var An=parseFloat(En),he="".concat(Math.floor(An*Ze),"%");return"".concat(ye[En]," ").concat(he)})}var en=lt.forwardRef(function(ye,Ze){var En=ye.prefixCls,An=ye.color,he=ye.gradientId,Ke=ye.radius,hn=ye.style,Pn=ye.ptg,_n=ye.strokeLinecap,ci=ye.strokeWidth,yi=ye.size,Ni=ye.gapDegree,ri=An&&(0,Ae.Z)(An)==="object",yt=ri?"#FFF":void 0,Tn=yi/2,xn=lt.createElement("circle",{className:"".concat(En,"-circle-path"),r:Ke,cx:Tn,cy:Tn,stroke:yt,strokeLinecap:_n,strokeWidth:ci,opacity:Pn===0?0:1,style:hn,ref:Ze});if(!ri)return xn;var Bn="".concat(he,"-conic"),Zn=Ni?"".concat(180+Ni/2,"deg"):"0deg",Nn=Le(An,(360-Ni)/360),Ln=Le(An,1),ii="conic-gradient(from ".concat(Zn,", ").concat(Nn.join(", "),")"),Qn="linear-gradient(to ".concat(Ni?"bottom":"top",", ").concat(Ln.join(", "),")");return lt.createElement(lt.Fragment,null,lt.createElement("mask",{id:Bn},xn),lt.createElement("foreignObject",{x:0,y:0,width:yi,height:yi,mask:"url(#".concat(Bn,")")},lt.createElement(be,{bg:Qn},lt.createElement(be,{bg:ii}))))}),ie=en,Re=100,De=function(Ze,En,An,he,Ke,hn,Pn,_n,ci,yi){var Ni=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ri=An/100*360*((360-hn)/360),yt=hn===0?0:{bottom:0,top:180,left:90,right:-90}[Pn],Tn=(100-he)/100*En;ci==="round"&&he!==100&&(Tn+=yi/2,Tn>=En&&(Tn=En-.01));var xn=Re/2;return{stroke:typeof _n=="string"?_n:void 0,strokeDasharray:"".concat(En,"px ").concat(Ze),strokeDashoffset:Tn+Ni,transform:"rotate(".concat(Ke+ri+yt,"deg)"),transformOrigin:"".concat(xn,"px ").concat(xn,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Tt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function rn(ye){var Ze=ye!=null?ye:[];return Array.isArray(Ze)?Ze:[Ze]}var we=function(Ze){var En=(0,jt.Z)((0,jt.Z)({},ce),Ze),An=En.id,he=En.prefixCls,Ke=En.steps,hn=En.strokeWidth,Pn=En.trailWidth,_n=En.gapDegree,ci=_n===void 0?0:_n,yi=En.gapPosition,Ni=En.trailColor,ri=En.strokeLinecap,yt=En.style,Tn=En.className,xn=En.strokeColor,Bn=En.percent,Zn=(0,Me.Z)(En,Tt),Nn=Re/2,Ln=Se(An),ii="".concat(Ln,"-gradient"),Qn=Nn-hn/2,xi=Math.PI*2*Qn,Xn=ci>0?90+ci/2:-90,$n=xi*((360-ci)/360),Hi=(0,Ae.Z)(Ke)==="object"?Ke:{count:Ke,gap:2},Bi=Hi.count,sr=Hi.gap,Jn=rn(Bn),Vn=rn(xn),oi=Vn.find(function(ae){return ae&&(0,Ae.Z)(ae)==="object"}),Ti=oi&&(0,Ae.Z)(oi)==="object",Ci=Ti?"butt":ri,Rt=De(xi,$n,0,100,Xn,ci,yi,Ni,Ci,hn),Pe=ee(),qt=function(){var ze=0;return Jn.map(function(Jt,nn){var cn=Vn[nn]||Vn[Vn.length-1],Ne=De(xi,$n,ze,Jt,Xn,ci,yi,cn,Ci,hn);return ze+=Jt,lt.createElement(ie,{key:nn,color:cn,ptg:Jt,radius:Qn,prefixCls:he,gradientId:ii,style:Ne,strokeLinecap:Ci,strokeWidth:hn,gapDegree:ci,ref:function(Xe){Pe[nn]=Xe},size:Re})}).reverse()},He=function(){var ze=Math.round(Bi*(Jn[0]/100)),Jt=100/Bi,nn=0;return new Array(Bi).fill(null).map(function(cn,Ne){var Fe=Ne<=ze-1?Vn[0]:Ni,Xe=Fe&&(0,Ae.Z)(Fe)==="object"?"url(#".concat(ii,")"):void 0,Je=De(xi,$n,nn,Jt,Xn,ci,yi,Fe,"butt",hn,sr);return nn+=($n-Je.strokeDashoffset+sr)*100/$n,lt.createElement("circle",{key:Ne,className:"".concat(he,"-circle-path"),r:Qn,cx:Nn,cy:Nn,stroke:Xe,strokeWidth:hn,opacity:1,style:Je,ref:function(li){Pe[Ne]=li}})})};return lt.createElement("svg",(0,Oe.Z)({className:me()("".concat(he,"-circle"),Tn),viewBox:"0 0 ".concat(Re," ").concat(Re),style:yt,id:An,role:"presentation"},Zn),!Bi&<.createElement("circle",{className:"".concat(he,"-circle-trail"),r:Qn,cx:Nn,cy:Nn,stroke:Ni,strokeLinecap:Ci,strokeWidth:Pn||hn,style:Rt}),Bi?He():qt())},Ue=we,On={Line:de,Circle:Ue},zt=dt(25399),kt=dt(68361);function Ye(ye){return!ye||ye<0?0:ye>100?100:ye}function wn(ye){let{success:Ze,successPercent:En}=ye,An=En;return Ze&&"progress"in Ze&&(An=Ze.progress),Ze&&"percent"in Ze&&(An=Ze.percent),An}const on=ye=>{let{percent:Ze,success:En,successPercent:An}=ye;const he=Ye(wn({success:En,successPercent:An}));return[he,Ye(Ye(Ze)-he)]},$t=ye=>{let{success:Ze={},strokeColor:En}=ye;const{strokeColor:An}=Ze;return[An||kt.presetPrimaryColors.green,En||null]},Ee=(ye,Ze,En)=>{var An,he,Ke,hn;let Pn=-1,_n=-1;if(Ze==="step"){const ci=En.steps,yi=En.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?(Pn=ye==="small"?2:14,_n=yi!=null?yi:8):typeof ye=="number"?[Pn,_n]=[ye,ye]:[Pn=14,_n=8]=Array.isArray(ye)?ye:[ye.width,ye.height],Pn*=ci}else if(Ze==="line"){const ci=En==null?void 0:En.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?_n=ci||(ye==="small"?6:8):typeof ye=="number"?[Pn,_n]=[ye,ye]:[Pn=-1,_n=8]=Array.isArray(ye)?ye:[ye.width,ye.height]}else(Ze==="circle"||Ze==="dashboard")&&(typeof ye=="string"||typeof ye=="undefined"?[Pn,_n]=ye==="small"?[60,60]:[120,120]:typeof ye=="number"?[Pn,_n]=[ye,ye]:Array.isArray(ye)&&(Pn=(he=(An=ye[0])!==null&&An!==void 0?An:ye[1])!==null&&he!==void 0?he:120,_n=(hn=(Ke=ye[0])!==null&&Ke!==void 0?Ke:ye[1])!==null&&hn!==void 0?hn:120));return[Pn,_n]},Be=3,Cn=ye=>Be/ye*100;var gn=ye=>{const{prefixCls:Ze,trailColor:En=null,strokeLinecap:An="round",gapPosition:he,gapDegree:Ke,width:hn=120,type:Pn,children:_n,success:ci,size:yi=hn,steps:Ni}=ye,[ri,yt]=Ee(yi,"circle");let{strokeWidth:Tn}=ye;Tn===void 0&&(Tn=Math.max(Cn(ri),6));const xn={width:ri,height:yt,fontSize:ri*.15+6},Bn=lt.useMemo(()=>{if(Ke||Ke===0)return Ke;if(Pn==="dashboard")return 75},[Ke,Pn]),Zn=on(ye),Nn=he||Pn==="dashboard"&&"bottom"||void 0,Ln=Object.prototype.toString.call(ye.strokeColor)==="[object Object]",ii=$t({success:ci,strokeColor:ye.strokeColor}),Qn=me()(`${Ze}-inner`,{[`${Ze}-circle-gradient`]:Ln}),xi=lt.createElement(Ue,{steps:Ni,percent:Ni?Zn[1]:Zn,strokeWidth:Tn,trailWidth:Tn,strokeColor:Ni?ii[1]:ii,strokeLinecap:An,trailColor:En,prefixCls:Ze,gapDegree:Bn,gapPosition:Nn}),Xn=ri<=20,$n=lt.createElement("div",{className:Qn,style:xn},xi,!Xn&&_n);return Xn?lt.createElement(zt.Z,{title:_n},$n):$n},ke=dt(36237),Dn=dt(63356),ln=dt(16931),bt=dt(51636);const gt="--progress-line-stroke-color",pt="--progress-percent",Ct=ye=>{const Ze=ye?"100%":"-100%";return new ke.Keyframes(`antProgress${ye?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Ze}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Ze}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Pt=ye=>{const{componentCls:Ze,iconCls:En}=ye;return{[Ze]:Object.assign(Object.assign({},(0,Dn.Wf)(ye)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:ye.fontSize},[`${Ze}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Ze}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:ye.remainingColor,borderRadius:ye.lineBorderRadius},[`${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:ye.defaultColor}},[`${Ze}-success-bg, ${Ze}-bg`]:{position:"relative",background:ye.defaultColor,borderRadius:ye.lineBorderRadius,transition:`all ${ye.motionDurationSlow} ${ye.motionEaseInOutCirc}`},[`${Ze}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Ze}-text`]:{width:"max-content",marginInlineStart:0,marginTop:ye.marginXXS}},[`${Ze}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${gt})`]},height:"100%",width:`calc(1 / var(${pt}) * 100%)`,display:"block"},[`&${Ze}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Ze}-text-inner`]:{color:ye.colorWhite,[`&${Ze}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Ze}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:ye.colorSuccess},[`${Ze}-text`]:{display:"inline-block",marginInlineStart:ye.marginXS,color:ye.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[En]:{fontSize:ye.fontSize},[`&${Ze}-text-outer`]:{width:"max-content"},[`&${Ze}-text-outer${Ze}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:ye.marginXS}},[`${Ze}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,ke.unit)(ye.paddingXXS)}`,[`&${Ze}-text-start`]:{justifyContent:"start"},[`&${Ze}-text-end`]:{justifyContent:"end"}},[`&${Ze}-status-active`]:{[`${Ze}-bg::before`]:{position:"absolute",inset:0,backgroundColor:ye.colorBgContainer,borderRadius:ye.lineBorderRadius,opacity:0,animationName:Ct(),animationDuration:ye.progressActiveMotionDuration,animationTimingFunction:ye.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Ze}-rtl${Ze}-status-active`]:{[`${Ze}-bg::before`]:{animationName:Ct(!0)}},[`&${Ze}-status-exception`]:{[`${Ze}-bg`]:{backgroundColor:ye.colorError},[`${Ze}-text`]:{color:ye.colorError}},[`&${Ze}-status-exception ${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:ye.colorError}},[`&${Ze}-status-success`]:{[`${Ze}-bg`]:{backgroundColor:ye.colorSuccess},[`${Ze}-text`]:{color:ye.colorSuccess}},[`&${Ze}-status-success ${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:ye.colorSuccess}}})}},vt=ye=>{const{componentCls:Ze,iconCls:En}=ye;return{[Ze]:{[`${Ze}-circle-trail`]:{stroke:ye.remainingColor},[`&${Ze}-circle ${Ze}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Ze}-circle ${Ze}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:ye.circleTextColor,fontSize:ye.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[En]:{fontSize:ye.circleIconFontSize}},[`${Ze}-circle&-status-exception`]:{[`${Ze}-text`]:{color:ye.colorError}},[`${Ze}-circle&-status-success`]:{[`${Ze}-text`]:{color:ye.colorSuccess}}},[`${Ze}-inline-circle`]:{lineHeight:1,[`${Ze}-inner`]:{verticalAlign:"bottom"}}}},Et=ye=>{const{componentCls:Ze}=ye;return{[Ze]:{[`${Ze}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:ye.progressStepMinWidth,marginInlineEnd:ye.progressStepMarginInlineEnd,backgroundColor:ye.remainingColor,transition:`all ${ye.motionDurationSlow}`,"&-active":{backgroundColor:ye.defaultColor}}}}}},Zt=ye=>{const{componentCls:Ze,iconCls:En}=ye;return{[Ze]:{[`${Ze}-small&-line, ${Ze}-small&-line ${Ze}-text ${En}`]:{fontSize:ye.fontSizeSM}}}},Ve=ye=>({circleTextColor:ye.colorText,defaultColor:ye.colorInfo,remainingColor:ye.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${ye.fontSize/ye.fontSizeSM}em`});var ue=(0,ln.I$)("Progress",ye=>{const Ze=ye.calc(ye.marginXXS).div(2).equal(),En=(0,bt.mergeToken)(ye,{progressStepMarginInlineEnd:Ze,progressStepMinWidth:Ze,progressActiveMotionDuration:"2.4s"});return[Pt(En),vt(En),Et(En),Zt(En)]},Ve),re=function(ye,Ze){var En={};for(var An in ye)Object.prototype.hasOwnProperty.call(ye,An)&&Ze.indexOf(An)<0&&(En[An]=ye[An]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,An=Object.getOwnPropertySymbols(ye);he<An.length;he++)Ze.indexOf(An[he])<0&&Object.prototype.propertyIsEnumerable.call(ye,An[he])&&(En[An[he]]=ye[An[he]]);return En};const Ce=ye=>{let Ze=[];return Object.keys(ye).forEach(En=>{const An=parseFloat(En.replace(/%/g,""));Number.isNaN(An)||Ze.push({key:An,value:ye[En]})}),Ze=Ze.sort((En,An)=>En.key-An.key),Ze.map(En=>{let{key:An,value:he}=En;return`${he} ${An}%`}).join(", ")},Te=(ye,Ze)=>{const{from:En=kt.presetPrimaryColors.blue,to:An=kt.presetPrimaryColors.blue,direction:he=Ze==="rtl"?"to left":"to right"}=ye,Ke=re(ye,["from","to","direction"]);if(Object.keys(Ke).length!==0){const Pn=Ce(Ke),_n=`linear-gradient(${he}, ${Pn})`;return{background:_n,[gt]:_n}}const hn=`linear-gradient(${he}, ${En}, ${An})`;return{background:hn,[gt]:hn}};var te=ye=>{const{prefixCls:Ze,direction:En,percent:An,size:he,strokeWidth:Ke,strokeColor:hn,strokeLinecap:Pn="round",children:_n,trailColor:ci=null,percentPosition:yi,success:Ni}=ye,{align:ri,type:yt}=yi,Tn=hn&&typeof hn!="string"?Te(hn,En):{[gt]:hn,background:hn},xn=Pn==="square"||Pn==="butt"?0:void 0,Bn=he!=null?he:[-1,Ke||(he==="small"?6:8)],[Zn,Nn]=Ee(Bn,"line",{strokeWidth:Ke}),Ln={backgroundColor:ci||void 0,borderRadius:xn},ii=Object.assign(Object.assign({width:`${Ye(An)}%`,height:Nn,borderRadius:xn},Tn),{[pt]:Ye(An)/100}),Qn=wn(ye),xi={width:`${Ye(Qn)}%`,height:Nn,borderRadius:xn,backgroundColor:Ni==null?void 0:Ni.strokeColor},Xn={width:Zn<0?"100%":Zn},$n=lt.createElement("div",{className:`${Ze}-inner`,style:Ln},lt.createElement("div",{className:me()(`${Ze}-bg`,`${Ze}-bg-${yt}`),style:ii},yt==="inner"&&_n),Qn!==void 0&<.createElement("div",{className:`${Ze}-success-bg`,style:xi})),Hi=yt==="outer"&&ri==="start",Bi=yt==="outer"&&ri==="end";return yt==="outer"&&ri==="center"?lt.createElement("div",{className:`${Ze}-layout-bottom`},$n,_n):lt.createElement("div",{className:`${Ze}-outer`,style:Xn},Hi&&_n,$n,Bi&&_n)},bn=ye=>{const{size:Ze,steps:En,rounding:An=Math.round,percent:he=0,strokeWidth:Ke=8,strokeColor:hn,trailColor:Pn=null,prefixCls:_n,children:ci}=ye,yi=An(En*(he/100)),Ni=Ze==="small"?2:14,ri=Ze!=null?Ze:[Ni,Ke],[yt,Tn]=Ee(ri,"step",{steps:En,strokeWidth:Ke}),xn=yt/En,Bn=Array.from({length:En});for(let Zn=0;Zn<En;Zn++){const Nn=Array.isArray(hn)?hn[Zn]:hn;Bn[Zn]=lt.createElement("div",{key:Zn,className:me()(`${_n}-steps-item`,{[`${_n}-steps-item-active`]:Zn<=yi-1}),style:{backgroundColor:Zn<=yi-1?Nn:Pn,width:xn,height:Tn}})}return lt.createElement("div",{className:`${_n}-steps-outer`},Bn,ci)},Sn=function(ye,Ze){var En={};for(var An in ye)Object.prototype.hasOwnProperty.call(ye,An)&&Ze.indexOf(An)<0&&(En[An]=ye[An]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,An=Object.getOwnPropertySymbols(ye);he<An.length;he++)Ze.indexOf(An[he])<0&&Object.prototype.propertyIsEnumerable.call(ye,An[he])&&(En[An[he]]=ye[An[he]]);return En};const Rn=null,In=["normal","exception","active","success"];var Hn=lt.forwardRef((ye,Ze)=>{const{prefixCls:En,className:An,rootClassName:he,steps:Ke,strokeColor:hn,percent:Pn=0,size:_n="default",showInfo:ci=!0,type:yi="line",status:Ni,format:ri,style:yt,percentPosition:Tn={}}=ye,xn=Sn(ye,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:Bn="end",type:Zn="outer"}=Tn,Nn=Array.isArray(hn)?hn[0]:hn,Ln=typeof hn=="string"||Array.isArray(hn)?hn:void 0,ii=lt.useMemo(()=>{if(Nn){const qt=typeof Nn=="string"?Nn:Object.values(Nn)[0];return new Dt.FastColor(qt).isLight()}return!1},[hn]),Qn=lt.useMemo(()=>{var qt,He;const ae=wn(ye);return parseInt(ae!==void 0?(qt=ae!=null?ae:0)===null||qt===void 0?void 0:qt.toString():(He=Pn!=null?Pn:0)===null||He===void 0?void 0:He.toString(),10)},[Pn,ye.success,ye.successPercent]),xi=lt.useMemo(()=>!In.includes(Ni)&&Qn>=100?"success":Ni||"normal",[Ni,Qn]),{getPrefixCls:Xn,direction:$n,progress:Hi}=lt.useContext(Nt.E_),Bi=Xn("progress",En),[sr,Jn,Vn]=ue(Bi),oi=yi==="line",Ti=oi&&!Ke,Ci=lt.useMemo(()=>{if(!ci)return null;const qt=wn(ye);let He;const ae=ri||(Jt=>`${Jt}%`),ze=oi&&ii&&Zn==="inner";return Zn==="inner"||ri||xi!=="exception"&&xi!=="success"?He=ae(Ye(Pn),Ye(qt)):xi==="exception"?He=oi?lt.createElement(_t.Z,null):lt.createElement(Gt.Z,null):xi==="success"&&(He=oi?lt.createElement(It.Z,null):lt.createElement(xe.Z,null)),lt.createElement("span",{className:me()(`${Bi}-text`,{[`${Bi}-text-bright`]:ze,[`${Bi}-text-${Bn}`]:Ti,[`${Bi}-text-${Zn}`]:Ti}),title:typeof He=="string"?He:void 0},He)},[ci,Pn,Qn,xi,yi,Bi,ri]);let Rt;yi==="line"?Rt=Ke?lt.createElement(bn,Object.assign({},ye,{strokeColor:Ln,prefixCls:Bi,steps:typeof Ke=="object"?Ke.count:Ke}),Ci):lt.createElement(te,Object.assign({},ye,{strokeColor:Nn,prefixCls:Bi,direction:$n,percentPosition:{align:Bn,type:Zn}}),Ci):(yi==="circle"||yi==="dashboard")&&(Rt=lt.createElement(gn,Object.assign({},ye,{strokeColor:Nn,prefixCls:Bi,progressStatus:xi}),Ci));const Pe=me()(Bi,`${Bi}-status-${xi}`,{[`${Bi}-${yi==="dashboard"&&"circle"||yi}`]:yi!=="line",[`${Bi}-inline-circle`]:yi==="circle"&&Ee(_n,"circle")[0]<=20,[`${Bi}-line`]:Ti,[`${Bi}-line-align-${Bn}`]:Ti,[`${Bi}-line-position-${Zn}`]:Ti,[`${Bi}-steps`]:Ke,[`${Bi}-show-info`]:ci,[`${Bi}-${_n}`]:typeof _n=="string",[`${Bi}-rtl`]:$n==="rtl"},Hi==null?void 0:Hi.className,An,he,Jn,Vn);return sr(lt.createElement("div",Object.assign({ref:Ze,style:Object.assign(Object.assign({},Hi==null?void 0:Hi.style),yt),className:Pe,role:"progressbar","aria-valuenow":Qn,"aria-valuemin":0,"aria-valuemax":100},(0,Yt.Z)(xn,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Rt))}),Mn=Hn},63139:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return on}});var lt=dt(59301),Dt=dt(60499),It={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"},xe=It,_t=dt(7657),Gt=function(Ee,Be){return lt.createElement(_t.Z,(0,Dt.Z)({},Ee,{ref:Be,icon:xe}))},Vt=lt.forwardRef(Gt),me=Vt,Yt=dt(92310),Nt=dt.n(Yt),Oe=dt(18642),jt=dt(72190),Me=dt(42244),ce=dt(18929),ee=dt(10228),Kt=dt(26112);function Ht($t,Ee){var Be=$t.disabled,Cn=$t.prefixCls,Ie=$t.character,gn=$t.characterRender,ke=$t.index,Dn=$t.count,ln=$t.value,bt=$t.allowHalf,gt=$t.focused,pt=$t.onHover,Ct=$t.onClick,Pt=function(Te){pt(Te,ke)},vt=function(Te){Ct(Te,ke)},Et=function(Te){Te.keyCode===ee.Z.ENTER&&Ct(Te,ke)},Zt=ke+1,Ve=new Set([Cn]);ln===0&&ke===0&>?Ve.add("".concat(Cn,"-focused")):bt&&ln+.5>=Zt&&ln<Zt?(Ve.add("".concat(Cn,"-half")),Ve.add("".concat(Cn,"-active")),gt&&Ve.add("".concat(Cn,"-focused"))):(Zt<=ln?Ve.add("".concat(Cn,"-full")):Ve.add("".concat(Cn,"-zero")),Zt===ln&>&&Ve.add("".concat(Cn,"-focused")));var ue=typeof Ie=="function"?Ie($t):Ie,re=lt.createElement("li",{className:Nt()(Array.from(Ve)),ref:Ee},lt.createElement("div",{onClick:Be?null:vt,onKeyDown:Be?null:Et,onMouseMove:Be?null:Pt,role:"radio","aria-checked":ln>ke?"true":"false","aria-posinset":ke+1,"aria-setsize":Dn,tabIndex:Be?-1:0},lt.createElement("div",{className:"".concat(Cn,"-first")},ue),lt.createElement("div",{className:"".concat(Cn,"-second")},ue)));return gn&&(re=gn(re,$t)),re}var de=lt.forwardRef(Ht);function Ae(){var $t=lt.useRef({});function Ee(Cn){return $t.current[Cn]}function Be(Cn){return function(Ie){$t.current[Cn]=Ie}}return[Ee,Be]}function je($t){var Ee=$t.pageXOffset,Be="scrollLeft";if(typeof Ee!="number"){var Cn=$t.document;Ee=Cn.documentElement[Be],typeof Ee!="number"&&(Ee=Cn.body[Be])}return Ee}function se($t){var Ee,Be,Cn=$t.ownerDocument,Ie=Cn.body,gn=Cn&&Cn.documentElement,ke=$t.getBoundingClientRect();return Ee=ke.left,Be=ke.top,Ee-=gn.clientLeft||Ie.clientLeft||0,Be-=gn.clientTop||Ie.clientTop||0,{left:Ee,top:Be}}function Xt($t){var Ee=se($t),Be=$t.ownerDocument,Cn=Be.defaultView||Be.parentWindow;return Ee.left+=je(Cn),Ee.left}var ve=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Qt($t,Ee){var Be=$t.prefixCls,Cn=Be===void 0?"rc-rate":Be,Ie=$t.className,gn=$t.defaultValue,ke=$t.value,Dn=$t.count,ln=Dn===void 0?5:Dn,bt=$t.allowHalf,gt=bt===void 0?!1:bt,pt=$t.allowClear,Ct=pt===void 0?!0:pt,Pt=$t.keyboard,vt=Pt===void 0?!0:Pt,Et=$t.character,Zt=Et===void 0?"\u2605":Et,Ve=$t.characterRender,ue=$t.disabled,re=$t.direction,Ce=re===void 0?"ltr":re,Te=$t.tabIndex,tn=Te===void 0?0:Te,te=$t.autoFocus,le=$t.onHoverChange,bn=$t.onChange,Sn=$t.onFocus,Rn=$t.onBlur,In=$t.onKeyDown,sn=$t.onMouseLeave,Hn=(0,Me.Z)($t,ve),Mn=Ae(),ye=(0,jt.Z)(Mn,2),Ze=ye[0],En=ye[1],An=lt.useRef(null),he=function(){if(!ue){var Ci;(Ci=An.current)===null||Ci===void 0||Ci.focus()}};lt.useImperativeHandle(Ee,function(){return{focus:he,blur:function(){if(!ue){var Ci;(Ci=An.current)===null||Ci===void 0||Ci.blur()}}}});var Ke=(0,ce.Z)(gn||0,{value:ke}),hn=(0,jt.Z)(Ke,2),Pn=hn[0],_n=hn[1],ci=(0,ce.Z)(null),yi=(0,jt.Z)(ci,2),Ni=yi[0],ri=yi[1],yt=function(Ci,Rt){var Pe=Ce==="rtl",qt=Ci+1;if(gt){var He=Ze(Ci),ae=Xt(He),ze=He.clientWidth;(Pe&&Rt-ae>ze/2||!Pe&&Rt-ae<ze/2)&&(qt-=.5)}return qt},Tn=function(Ci){_n(Ci),bn==null||bn(Ci)},xn=lt.useState(!1),Bn=(0,jt.Z)(xn,2),Zn=Bn[0],Nn=Bn[1],Ln=function(){Nn(!0),Sn==null||Sn()},ii=function(){Nn(!1),Rn==null||Rn()},Qn=lt.useState(null),xi=(0,jt.Z)(Qn,2),Xn=xi[0],$n=xi[1],Hi=function(Ci,Rt){var Pe=yt(Rt,Ci.pageX);Pe!==Ni&&($n(Pe),ri(null)),le==null||le(Pe)},Bi=function(Ci){ue||($n(null),ri(null),le==null||le(void 0)),Ci&&(sn==null||sn(Ci))},sr=function(Ci,Rt){var Pe=yt(Rt,Ci.pageX),qt=!1;Ct&&(qt=Pe===Pn),Bi(),Tn(qt?0:Pe),ri(qt?Pe:null)},Jn=function(Ci){var Rt=Ci.keyCode,Pe=Ce==="rtl",qt=gt?.5:1;vt&&(Rt===ee.Z.RIGHT&&Pn<ln&&!Pe?(Tn(Pn+qt),Ci.preventDefault()):Rt===ee.Z.LEFT&&Pn>0&&!Pe||Rt===ee.Z.RIGHT&&Pn>0&&Pe?(Tn(Pn-qt),Ci.preventDefault()):Rt===ee.Z.LEFT&&Pn<ln&&Pe&&(Tn(Pn+qt),Ci.preventDefault())),In==null||In(Ci)};lt.useEffect(function(){te&&!ue&&he()},[]);var Vn=new Array(ln).fill(0).map(function(Ti,Ci){return lt.createElement(de,{ref:En(Ci),index:Ci,count:ln,disabled:ue,prefixCls:"".concat(Cn,"-star"),allowHalf:gt,value:Xn===null?Pn:Xn,onClick:sr,onHover:Hi,key:Ti||Ci,character:Zt,characterRender:Ve,focused:Zn})}),oi=Nt()(Cn,Ie,(0,Oe.Z)((0,Oe.Z)({},"".concat(Cn,"-disabled"),ue),"".concat(Cn,"-rtl"),Ce==="rtl"));return lt.createElement("ul",(0,Dt.Z)({className:oi,onMouseLeave:Bi,tabIndex:ue?-1:tn,onFocus:ue?null:Ln,onBlur:ue?null:ii,onKeyDown:ue?null:Jn,ref:An},(0,Kt.Z)(Hn,{aria:!0,data:!0,attr:!0})),Vn)}var Se=lt.forwardRef(Qt),be=Se,Le=dt(48755),en=dt(25399),ie=dt(36237),Re=dt(63356),De=dt(16931),Tt=dt(51636);const rn=$t=>{const{componentCls:Ee}=$t;return{[`${Ee}-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:`${(0,ie.unit)($t.lineWidth)} dashed ${$t.starColor}`,transform:$t.starHoverScale}},"&-first, &-second":{color:$t.starBg,transition:`all ${$t.motionDurationMid}`,userSelect:"none"},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Ee}-star-first, &-half ${Ee}-star-second`]:{opacity:1},[`&-half ${Ee}-star-first, &-full ${Ee}-star-second`]:{color:"inherit"}}}},we=$t=>({[`&-rtl${$t.componentCls}`]:{direction:"rtl"}}),Ue=$t=>{const{componentCls:Ee}=$t;return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Re.Wf)($t)),{display:"inline-block",margin:0,padding:0,color:$t.starColor,fontSize:$t.starSize,lineHeight:1,listStyle:"none",outline:"none",[`&-disabled${Ee} ${Ee}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),rn($t)),we($t))}},On=$t=>({starColor:$t.yellow6,starSize:$t.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:$t.colorFillContent});var zt=(0,De.I$)("Rate",$t=>{const Ee=(0,Tt.mergeToken)($t,{});return[Ue(Ee)]},On),kt=dt(2171),Ye=function($t,Ee){var Be={};for(var Cn in $t)Object.prototype.hasOwnProperty.call($t,Cn)&&Ee.indexOf(Cn)<0&&(Be[Cn]=$t[Cn]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Cn=Object.getOwnPropertySymbols($t);Ie<Cn.length;Ie++)Ee.indexOf(Cn[Ie])<0&&Object.prototype.propertyIsEnumerable.call($t,Cn[Ie])&&(Be[Cn[Ie]]=$t[Cn[Ie]]);return Be},on=lt.forwardRef(($t,Ee)=>{const{prefixCls:Be,className:Cn,rootClassName:Ie,style:gn,tooltips:ke,character:Dn=lt.createElement(me,null),disabled:ln}=$t,bt=Ye($t,["prefixCls","className","rootClassName","style","tooltips","character","disabled"]),gt=(Te,tn)=>{let{index:te}=tn;return ke?lt.createElement(en.Z,{title:ke[te]},Te):Te},{getPrefixCls:pt,direction:Ct,rate:Pt}=lt.useContext(Le.E_),vt=pt("rate",Be),[Et,Zt,Ve]=zt(vt),ue=Object.assign(Object.assign({},Pt==null?void 0:Pt.style),gn),re=lt.useContext(kt.Z),Ce=ln!=null?ln:re;return Et(lt.createElement(be,Object.assign({ref:Ee,character:Dn,characterRender:gt,disabled:Ce},bt,{className:Nt()(Cn,Ie,Zt,Ve,Pt==null?void 0:Pt.className),style:ue,prefixCls:vt,direction:Ct})))})},82326:function(Yn,qe,dt){"use strict";var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(37463),_t=dt(2738),Gt=dt(75030),Vt=dt(86641),me=dt(45915),Yt=dt(82855),Nt=dt(48755),Oe=dt(38406),jt=dt(2171),Me=dt(83397),ce=dt(31756),ee=dt(56553),Kt=dt(24971),Ht=dt(70045),de=dt(57700),Ae=dt(1722),je=dt(90376),se=dt(68525),Xt=dt(90005),ve=function(en,ie){var Re={};for(var De in en)Object.prototype.hasOwnProperty.call(en,De)&&ie.indexOf(De)<0&&(Re[De]=en[De]);if(en!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,De=Object.getOwnPropertySymbols(en);Tt<De.length;Tt++)ie.indexOf(De[Tt])<0&&Object.prototype.propertyIsEnumerable.call(en,De[Tt])&&(Re[De[Tt]]=en[De[Tt]]);return Re};const Qt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Se=(en,ie)=>{var Re;const{prefixCls:De,bordered:Tt,className:rn,rootClassName:we,getPopupContainer:Ue,popupClassName:On,dropdownClassName:zt,listHeight:kt=256,placement:Ye,listItemHeight:wn,size:on,disabled:$t,notFoundContent:Ee,status:Be,builtinPlacements:Cn,dropdownMatchSelectWidth:Ie,popupMatchSelectWidth:gn,direction:ke,style:Dn,allowClear:ln,variant:bt,dropdownStyle:gt,transitionName:pt,tagRender:Ct,maxCount:Pt,prefix:vt}=en,Et=ve(en,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:Zt,getPrefixCls:Ve,renderEmpty:ue,direction:re,virtual:Ce,popupMatchSelectWidth:Te,popupOverflow:tn}=lt.useContext(Nt.E_),te=(0,Nt.dj)("select"),[,le]=(0,de.ZP)(),bn=wn!=null?wn:le==null?void 0:le.controlHeight,Sn=Ve("select",De),Rn=Ve(),In=ke!=null?ke:re,{compactSize:sn,compactItemClassnames:Hn}=(0,Ht.ri)(Sn,In),[Mn,ye]=(0,Kt.Z)("select",bt,Tt),Ze=(0,Me.Z)(Sn),[En,An,he]=(0,je.Z)(Sn,Ze),Ke=lt.useMemo(()=>{const{mode:Jn}=en;if(Jn!=="combobox")return Jn===Qt?"combobox":Jn},[en.mode]),hn=Ke==="multiple"||Ke==="tags",Pn=(0,Xt.Z)(en.suffixIcon,en.showArrow),_n=(Re=gn!=null?gn:Ie)!==null&&Re!==void 0?Re:Te,{status:ci,hasFeedback:yi,isFormItemInput:Ni,feedbackIcon:ri}=lt.useContext(ee.aM),yt=(0,Yt.F)(ci,Be);let Tn;Ee!==void 0?Tn=Ee:Ke==="combobox"?Tn=null:Tn=(ue==null?void 0:ue("Select"))||lt.createElement(Oe.Z,{componentName:"Select"});const{suffixIcon:xn,itemIcon:Bn,removeIcon:Zn,clearIcon:Nn}=(0,se.Z)(Object.assign(Object.assign({},Et),{multiple:hn,hasFeedback:yi,feedbackIcon:ri,showSuffixIcon:Pn,prefixCls:Sn,componentName:"Select"})),Ln=ln===!0?{clearIcon:Nn}:ln,ii=(0,_t.Z)(Et,["suffixIcon","itemIcon"]),Qn=It()(On||zt,{[`${Sn}-dropdown-${In}`]:In==="rtl"},we,he,Ze,An),xi=(0,ce.Z)(Jn=>{var Vn;return(Vn=on!=null?on:sn)!==null&&Vn!==void 0?Vn:Jn}),Xn=lt.useContext(jt.Z),$n=$t!=null?$t:Xn,Hi=It()({[`${Sn}-lg`]:xi==="large",[`${Sn}-sm`]:xi==="small",[`${Sn}-rtl`]:In==="rtl",[`${Sn}-${Mn}`]:ye,[`${Sn}-in-form-item`]:Ni},(0,Yt.Z)(Sn,yt,yi),Hn,te.className,rn,we,he,Ze,An),Bi=lt.useMemo(()=>Ye!==void 0?Ye:In==="rtl"?"bottomRight":"bottomLeft",[Ye,In]),[sr]=(0,Gt.Cn)("SelectLike",gt==null?void 0:gt.zIndex);return En(lt.createElement(xe.ZP,Object.assign({ref:ie,virtual:Ce,showSearch:te.showSearch},ii,{style:Object.assign(Object.assign({},te.style),Dn),dropdownMatchSelectWidth:_n,transitionName:(0,Vt.m)(Rn,"slide-up",pt),builtinPlacements:(0,Ae.Z)(Cn,tn),listHeight:kt,listItemHeight:bn,mode:Ke,prefixCls:Sn,placement:Bi,direction:In,prefix:vt,suffixIcon:xn,menuItemSelectedIcon:Bn,removeIcon:Zn,allowClear:Ln,notFoundContent:Tn,className:Hi,getPopupContainer:Ue||Zt,dropdownClassName:Qn,disabled:$n,dropdownStyle:Object.assign(Object.assign({},gt),{zIndex:sr}),maxCount:hn?Pt:void 0,tagRender:hn?Ct:void 0})))},be=lt.forwardRef(Se),Le=(0,me.Z)(be,"dropdownAlign");be.SECRET_COMBOBOX_MODE_DO_NOT_USE=Qt,be.Option=xe.Wx,be.OptGroup=xe.Xo,be._InternalPanelDoNotUseOrYouWillBeFired=Le,qe.default=be},1722:function(Yn,qe){"use strict";const dt=Dt=>{const xe={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Dt==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},xe),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},xe),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},xe),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},xe),{points:["br","tr"],offset:[0,-4]})}};function lt(Dt,It){return Dt||dt(It)}qe.Z=lt},90376:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return De}});var lt=dt(63356),Dt=dt(56119),It=dt(16931),xe=dt(51636),_t=dt(46e3),Gt=dt(93873);const Vt=Tt=>{const{optionHeight:rn,optionFontSize:we,optionLineHeight:Ue,optionPadding:On}=Tt;return{position:"relative",display:"block",minHeight:rn,padding:On,color:Tt.colorText,fontWeight:"normal",fontSize:we,lineHeight:Ue,boxSizing:"border-box"}};var Yt=Tt=>{const{antCls:rn,componentCls:we}=Tt,Ue=`${we}-item`,On=`&${rn}-slide-up-enter${rn}-slide-up-enter-active`,zt=`&${rn}-slide-up-appear${rn}-slide-up-appear-active`,kt=`&${rn}-slide-up-leave${rn}-slide-up-leave-active`,Ye=`${we}-dropdown-placement-`,wn=`${Ue}-option-selected`;return[{[`${we}-dropdown`]:Object.assign(Object.assign({},(0,lt.Wf)(Tt)),{position:"absolute",top:-9999,zIndex:Tt.zIndexPopup,boxSizing:"border-box",padding:Tt.paddingXXS,overflow:"hidden",fontSize:Tt.fontSize,fontVariant:"initial",backgroundColor:Tt.colorBgElevated,borderRadius:Tt.borderRadiusLG,outline:"none",boxShadow:Tt.boxShadowSecondary,[`
|
|
|
${On}${Ye}bottomLeft,
|
|
|
${zt}${Ye}bottomLeft
|
|
|
`]:{animationName:_t.fJ},[`
|
|
|
${On}${Ye}topLeft,
|
|
|
${zt}${Ye}topLeft,
|
|
|
${On}${Ye}topRight,
|
|
|
${zt}${Ye}topRight
|
|
|
`]:{animationName:_t.Qt},[`${kt}${Ye}bottomLeft`]:{animationName:_t.Uw},[`
|
|
|
${kt}${Ye}topLeft,
|
|
|
${kt}${Ye}topRight
|
|
|
`]:{animationName:_t.ly},"&-hidden":{display:"none"},[Ue]:Object.assign(Object.assign({},Vt(Tt)),{cursor:"pointer",transition:`background ${Tt.motionDurationSlow} ease`,borderRadius:Tt.borderRadiusSM,"&-group":{color:Tt.colorTextDescription,fontSize:Tt.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},lt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ue}-option-disabled)`]:{backgroundColor:Tt.optionActiveBg},[`&-selected:not(${Ue}-option-disabled)`]:{color:Tt.optionSelectedColor,fontWeight:Tt.optionSelectedFontWeight,backgroundColor:Tt.optionSelectedBg,[`${Ue}-option-state`]:{color:Tt.colorPrimary}},"&-disabled":{[`&${Ue}-option-selected`]:{backgroundColor:Tt.colorBgContainerDisabled},color:Tt.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Tt.calc(Tt.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Vt(Tt)),{color:Tt.colorTextDisabled})}),[`${wn}:has(+ ${wn})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${wn}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,_t.oN)(Tt,"slide-up"),(0,_t.oN)(Tt,"slide-down"),(0,Gt.Fm)(Tt,"move-up"),(0,Gt.Fm)(Tt,"move-down")]},Nt=dt(26743),Oe=dt(36237);function jt(Tt,rn){const{componentCls:we,inputPaddingHorizontalBase:Ue,borderRadius:On}=Tt,zt=Tt.calc(Tt.controlHeight).sub(Tt.calc(Tt.lineWidth).mul(2)).equal(),kt=rn?`${we}-${rn}`:"";return{[`${we}-single${kt}`]:{fontSize:Tt.fontSize,height:Tt.controlHeight,[`${we}-selector`]:Object.assign(Object.assign({},(0,lt.Wf)(Tt,!0)),{display:"flex",borderRadius:On,flex:"1 1 auto",[`${we}-selection-wrap:after`]:{lineHeight:(0,Oe.unit)(zt)},[`${we}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
|
${we}-selection-item,
|
|
|
${we}-selection-placeholder
|
|
|
`]:{display:"block",padding:0,lineHeight:(0,Oe.unit)(zt),transition:`all ${Tt.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${we}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${we}-selection-item:empty:after`,`${we}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${we}-show-arrow ${we}-selection-item,
|
|
|
&${we}-show-arrow ${we}-selection-search,
|
|
|
&${we}-show-arrow ${we}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Tt.showArrowPaddingInlineEnd},[`&${we}-open ${we}-selection-item`]:{color:Tt.colorTextPlaceholder},[`&:not(${we}-customize-input)`]:{[`${we}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,Oe.unit)(Ue)}`,[`${we}-selection-search-input`]:{height:zt,fontSize:Tt.fontSize},"&:after":{lineHeight:(0,Oe.unit)(zt)}}},[`&${we}-customize-input`]:{[`${we}-selector`]:{"&:after":{display:"none"},[`${we}-selection-search`]:{position:"static",width:"100%"},[`${we}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,Oe.unit)(Ue)}`,"&:after":{display:"none"}}}}}}}function Me(Tt){const{componentCls:rn}=Tt,we=Tt.calc(Tt.controlPaddingHorizontalSM).sub(Tt.lineWidth).equal();return[jt(Tt),jt((0,xe.mergeToken)(Tt,{controlHeight:Tt.controlHeightSM,borderRadius:Tt.borderRadiusSM}),"sm"),{[`${rn}-single${rn}-sm`]:{[`&:not(${rn}-customize-input)`]:{[`${rn}-selector`]:{padding:`0 ${(0,Oe.unit)(we)}`},[`&${rn}-show-arrow ${rn}-selection-search`]:{insetInlineEnd:Tt.calc(we).add(Tt.calc(Tt.fontSize).mul(1.5)).equal()},[`
|
|
|
&${rn}-show-arrow ${rn}-selection-item,
|
|
|
&${rn}-show-arrow ${rn}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Tt.calc(Tt.fontSize).mul(1.5).equal()}}}},jt((0,xe.mergeToken)(Tt,{controlHeight:Tt.singleItemHeightLG,fontSize:Tt.fontSizeLG,borderRadius:Tt.borderRadiusLG}),"lg")]}const ce=Tt=>{const{fontSize:rn,lineHeight:we,lineWidth:Ue,controlHeight:On,controlHeightSM:zt,controlHeightLG:kt,paddingXXS:Ye,controlPaddingHorizontal:wn,zIndexPopupBase:on,colorText:$t,fontWeightStrong:Ee,controlItemBgActive:Be,controlItemBgHover:Cn,colorBgContainer:Ie,colorFillSecondary:gn,colorBgContainerDisabled:ke,colorTextDisabled:Dn,colorPrimaryHover:ln,colorPrimary:bt,controlOutline:gt}=Tt,pt=Ye*2,Ct=Ue*2,Pt=Math.min(On-pt,On-Ct),vt=Math.min(zt-pt,zt-Ct),Et=Math.min(kt-pt,kt-Ct);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(Ye/2),zIndexPopup:on+50,optionSelectedColor:$t,optionSelectedFontWeight:Ee,optionSelectedBg:Be,optionActiveBg:Cn,optionPadding:`${(On-rn*we)/2}px ${wn}px`,optionFontSize:rn,optionLineHeight:we,optionHeight:On,selectorBg:Ie,clearBg:Ie,singleItemHeightLG:kt,multipleItemBg:gn,multipleItemBorderColor:"transparent",multipleItemHeight:Pt,multipleItemHeightSM:vt,multipleItemHeightLG:Et,multipleSelectorBgDisabled:ke,multipleItemColorDisabled:Dn,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(Tt.fontSize*1.25),hoverBorderColor:ln,activeBorderColor:bt,activeOutlineColor:gt,selectAffixPadding:Ye}},ee=(Tt,rn)=>{const{componentCls:we,antCls:Ue,controlOutlineWidth:On}=Tt;return{[`&:not(${we}-customize-input) ${we}-selector`]:{border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} ${rn.borderColor}`,background:Tt.selectorBg},[`&:not(${we}-disabled):not(${we}-customize-input):not(${Ue}-pagination-size-changer)`]:{[`&:hover ${we}-selector`]:{borderColor:rn.hoverBorderHover},[`${we}-focused& ${we}-selector`]:{borderColor:rn.activeBorderColor,boxShadow:`0 0 0 ${(0,Oe.unit)(On)} ${rn.activeOutlineColor}`,outline:0},[`${we}-prefix`]:{color:rn.color}}}},Kt=(Tt,rn)=>({[`&${Tt.componentCls}-status-${rn.status}`]:Object.assign({},ee(Tt,rn))}),Ht=Tt=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},ee(Tt,{borderColor:Tt.colorBorder,hoverBorderHover:Tt.hoverBorderColor,activeBorderColor:Tt.activeBorderColor,activeOutlineColor:Tt.activeOutlineColor,color:Tt.colorText})),Kt(Tt,{status:"error",borderColor:Tt.colorError,hoverBorderHover:Tt.colorErrorHover,activeBorderColor:Tt.colorError,activeOutlineColor:Tt.colorErrorOutline,color:Tt.colorError})),Kt(Tt,{status:"warning",borderColor:Tt.colorWarning,hoverBorderHover:Tt.colorWarningHover,activeBorderColor:Tt.colorWarning,activeOutlineColor:Tt.colorWarningOutline,color:Tt.colorWarning})),{[`&${Tt.componentCls}-disabled`]:{[`&:not(${Tt.componentCls}-customize-input) ${Tt.componentCls}-selector`]:{background:Tt.colorBgContainerDisabled,color:Tt.colorTextDisabled}},[`&${Tt.componentCls}-multiple ${Tt.componentCls}-selection-item`]:{background:Tt.multipleItemBg,border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} ${Tt.multipleItemBorderColor}`}})}),de=(Tt,rn)=>{const{componentCls:we,antCls:Ue}=Tt;return{[`&:not(${we}-customize-input) ${we}-selector`]:{background:rn.bg,border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} transparent`,color:rn.color},[`&:not(${we}-disabled):not(${we}-customize-input):not(${Ue}-pagination-size-changer)`]:{[`&:hover ${we}-selector`]:{background:rn.hoverBg},[`${we}-focused& ${we}-selector`]:{background:Tt.selectorBg,borderColor:rn.activeBorderColor,outline:0}}}},Ae=(Tt,rn)=>({[`&${Tt.componentCls}-status-${rn.status}`]:Object.assign({},de(Tt,rn))}),je=Tt=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},de(Tt,{bg:Tt.colorFillTertiary,hoverBg:Tt.colorFillSecondary,activeBorderColor:Tt.activeBorderColor,color:Tt.colorText})),Ae(Tt,{status:"error",bg:Tt.colorErrorBg,hoverBg:Tt.colorErrorBgHover,activeBorderColor:Tt.colorError,color:Tt.colorError})),Ae(Tt,{status:"warning",bg:Tt.colorWarningBg,hoverBg:Tt.colorWarningBgHover,activeBorderColor:Tt.colorWarning,color:Tt.colorWarning})),{[`&${Tt.componentCls}-disabled`]:{[`&:not(${Tt.componentCls}-customize-input) ${Tt.componentCls}-selector`]:{borderColor:Tt.colorBorder,background:Tt.colorBgContainerDisabled,color:Tt.colorTextDisabled}},[`&${Tt.componentCls}-multiple ${Tt.componentCls}-selection-item`]:{background:Tt.colorBgContainer,border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} ${Tt.colorSplit}`}})}),se=Tt=>({"&-borderless":{[`${Tt.componentCls}-selector`]:{background:"transparent",border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} transparent`},[`&${Tt.componentCls}-disabled`]:{[`&:not(${Tt.componentCls}-customize-input) ${Tt.componentCls}-selector`]:{color:Tt.colorTextDisabled}},[`&${Tt.componentCls}-multiple ${Tt.componentCls}-selection-item`]:{background:Tt.multipleItemBg,border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} ${Tt.multipleItemBorderColor}`},[`&${Tt.componentCls}-status-error`]:{[`${Tt.componentCls}-prefix, ${Tt.componentCls}-selection-item`]:{color:Tt.colorError}},[`&${Tt.componentCls}-status-warning`]:{[`${Tt.componentCls}-prefix, ${Tt.componentCls}-selection-item`]:{color:Tt.colorWarning}}}}),Xt=(Tt,rn)=>{const{componentCls:we,antCls:Ue}=Tt;return{[`&:not(${we}-customize-input) ${we}-selector`]:{borderWidth:`0 0 ${(0,Oe.unit)(Tt.lineWidth)} 0`,borderStyle:`none none ${Tt.lineType} none`,borderColor:rn.borderColor,background:Tt.selectorBg,borderRadius:0},[`&:not(${we}-disabled):not(${we}-customize-input):not(${Ue}-pagination-size-changer)`]:{[`&:hover ${we}-selector`]:{borderColor:rn.hoverBorderHover},[`${we}-focused& ${we}-selector`]:{borderColor:rn.activeBorderColor,outline:0},[`${we}-prefix`]:{color:rn.color}}}},ve=(Tt,rn)=>({[`&${Tt.componentCls}-status-${rn.status}`]:Object.assign({},Xt(Tt,rn))}),Qt=Tt=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Xt(Tt,{borderColor:Tt.colorBorder,hoverBorderHover:Tt.hoverBorderColor,activeBorderColor:Tt.activeBorderColor,activeOutlineColor:Tt.activeOutlineColor,color:Tt.colorText})),ve(Tt,{status:"error",borderColor:Tt.colorError,hoverBorderHover:Tt.colorErrorHover,activeBorderColor:Tt.colorError,activeOutlineColor:Tt.colorErrorOutline,color:Tt.colorError})),ve(Tt,{status:"warning",borderColor:Tt.colorWarning,hoverBorderHover:Tt.colorWarningHover,activeBorderColor:Tt.colorWarning,activeOutlineColor:Tt.colorWarningOutline,color:Tt.colorWarning})),{[`&${Tt.componentCls}-disabled`]:{[`&:not(${Tt.componentCls}-customize-input) ${Tt.componentCls}-selector`]:{color:Tt.colorTextDisabled}},[`&${Tt.componentCls}-multiple ${Tt.componentCls}-selection-item`]:{background:Tt.multipleItemBg,border:`${(0,Oe.unit)(Tt.lineWidth)} ${Tt.lineType} ${Tt.multipleItemBorderColor}`}})});var be=Tt=>({[Tt.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Ht(Tt)),je(Tt)),se(Tt)),Qt(Tt))});const Le=Tt=>{const{componentCls:rn}=Tt;return{position:"relative",transition:`all ${Tt.motionDurationMid} ${Tt.motionEaseInOut}`,input:{cursor:"pointer"},[`${rn}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${rn}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},en=Tt=>{const{componentCls:rn}=Tt;return{[`${rn}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},ie=Tt=>{const{antCls:rn,componentCls:we,inputPaddingHorizontalBase:Ue,iconCls:On}=Tt;return{[we]:Object.assign(Object.assign({},(0,lt.Wf)(Tt)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${we}-customize-input) ${we}-selector`]:Object.assign(Object.assign({},Le(Tt)),en(Tt)),[`${we}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},lt.vS),{[`> ${rn}-typography`]:{display:"inline"}}),[`${we}-selection-placeholder`]:Object.assign(Object.assign({},lt.vS),{flex:1,color:Tt.colorTextPlaceholder,pointerEvents:"none"}),[`${we}-arrow`]:Object.assign(Object.assign({},(0,lt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,height:Tt.fontSizeIcon,marginTop:Tt.calc(Tt.fontSizeIcon).mul(-1).div(2).equal(),color:Tt.colorTextQuaternary,fontSize:Tt.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${Tt.motionDurationSlow} ease`,[On]:{verticalAlign:"top",transition:`transform ${Tt.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${we}-suffix)`]:{pointerEvents:"auto"}},[`${we}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${we}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${we}-prefix`]:{flex:"none",marginInlineEnd:Tt.selectAffixPadding},[`${we}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,zIndex:1,display:"inline-block",width:Tt.fontSizeIcon,height:Tt.fontSizeIcon,marginTop:Tt.calc(Tt.fontSizeIcon).mul(-1).div(2).equal(),color:Tt.colorTextQuaternary,fontSize:Tt.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${Tt.motionDurationMid} ease, opacity ${Tt.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Tt.colorTextTertiary}},[`&:hover ${we}-clear`]:{opacity:1,background:Tt.colorBgBase,borderRadius:"50%"}}),[`${we}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${we}-has-feedback`]:{[`${we}-clear`]:{insetInlineEnd:Tt.calc(Ue).add(Tt.fontSize).add(Tt.paddingXS).equal()}}}}}},Re=Tt=>{const{componentCls:rn}=Tt;return[{[rn]:{[`&${rn}-in-form-item`]:{width:"100%"}}},ie(Tt),Me(Tt),(0,Nt.ZP)(Tt),Yt(Tt),{[`${rn}-rtl`]:{direction:"rtl"}},(0,Dt.c)(Tt,{borderElCls:`${rn}-selector`,focusElCls:`${rn}-focused`})]};var De=(0,It.I$)("Select",(Tt,rn)=>{let{rootPrefixCls:we}=rn;const Ue=(0,xe.mergeToken)(Tt,{rootPrefixCls:we,inputPaddingHorizontalBase:Tt.calc(Tt.paddingSM).sub(1).equal(),multipleSelectItemHeight:Tt.multipleItemHeight,selectHeight:Tt.controlHeight});return[Re(Ue),be(Ue)]},ce,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(Yn,qe,dt){"use strict";dt.d(qe,{_z:function(){return Gt},gp:function(){return xe}});var lt=dt(36237),Dt=dt(63356),It=dt(51636);const xe=Nt=>{const{multipleSelectItemHeight:Oe,paddingXXS:jt,lineWidth:Me,INTERNAL_FIXED_ITEM_MARGIN:ce}=Nt,ee=Nt.max(Nt.calc(jt).sub(Me).equal(),0),Kt=Nt.max(Nt.calc(ee).sub(ce).equal(),0);return{basePadding:ee,containerPadding:Kt,itemHeight:(0,lt.unit)(Oe),itemLineHeight:(0,lt.unit)(Nt.calc(Oe).sub(Nt.calc(Nt.lineWidth).mul(2)).equal())}},_t=Nt=>{const{multipleSelectItemHeight:Oe,selectHeight:jt,lineWidth:Me}=Nt;return Nt.calc(jt).sub(Oe).div(2).sub(Me).equal()},Gt=Nt=>{const{componentCls:Oe,iconCls:jt,borderRadiusSM:Me,motionDurationSlow:ce,paddingXS:ee,multipleItemColorDisabled:Kt,multipleItemBorderColorDisabled:Ht,colorIcon:de,colorIconHover:Ae,INTERNAL_FIXED_ITEM_MARGIN:je}=Nt;return{[`${Oe}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${Oe}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:je,borderRadius:Me,cursor:"default",transition:`font-size ${ce}, line-height ${ce}, height ${ce}`,marginInlineEnd:Nt.calc(je).mul(2).equal(),paddingInlineStart:ee,paddingInlineEnd:Nt.calc(ee).div(2).equal(),[`${Oe}-disabled&`]:{color:Kt,borderColor:Ht,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Nt.calc(ee).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Dt.Ro)()),{display:"inline-flex",alignItems:"center",color:de,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${jt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ae}})}}}},Vt=(Nt,Oe)=>{const{componentCls:jt,INTERNAL_FIXED_ITEM_MARGIN:Me}=Nt,ce=`${jt}-selection-overflow`,ee=Nt.multipleSelectItemHeight,Kt=_t(Nt),Ht=Oe?`${jt}-${Oe}`:"",de=xe(Nt);return{[`${jt}-multiple${Ht}`]:Object.assign(Object.assign({},Gt(Nt)),{[`${jt}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:de.basePadding,paddingBlock:de.containerPadding,borderRadius:Nt.borderRadius,[`${jt}-disabled&`]:{background:Nt.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,lt.unit)(Me)} 0`,lineHeight:(0,lt.unit)(ee),visibility:"hidden",content:'"\\a0"'}},[`${jt}-selection-item`]:{height:de.itemHeight,lineHeight:(0,lt.unit)(de.itemLineHeight)},[`${jt}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,lt.unit)(ee),marginBlock:Me}},[`${jt}-prefix`]:{marginInlineStart:Nt.calc(Nt.inputPaddingHorizontalBase).sub(de.basePadding).equal()},[`${ce}-item + ${ce}-item,
|
|
|
${jt}-prefix + ${jt}-selection-wrap
|
|
|
`]:{[`${jt}-selection-search`]:{marginInlineStart:0},[`${jt}-selection-placeholder`]:{insetInlineStart:0}},[`${ce}-item-suffix`]:{minHeight:de.itemHeight,marginBlock:Me},[`${jt}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Nt.calc(Nt.inputPaddingHorizontalBase).sub(Kt).equal(),"\n &-input,\n &-mirror\n ":{height:ee,fontFamily:Nt.fontFamily,lineHeight:(0,lt.unit)(ee),transition:`all ${Nt.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${jt}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:Nt.calc(Nt.inputPaddingHorizontalBase).sub(de.basePadding).equal(),insetInlineEnd:Nt.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Nt.motionDurationSlow}`}})}};function me(Nt,Oe){const{componentCls:jt}=Nt,Me=Oe?`${jt}-${Oe}`:"",ce={[`${jt}-multiple${Me}`]:{fontSize:Nt.fontSize,[`${jt}-selector`]:{[`${jt}-show-search&`]:{cursor:"text"}},[`
|
|
|
&${jt}-show-arrow ${jt}-selector,
|
|
|
&${jt}-allow-clear ${jt}-selector
|
|
|
`]:{paddingInlineEnd:Nt.calc(Nt.fontSizeIcon).add(Nt.controlPaddingHorizontal).equal()}}};return[Vt(Nt,Oe),ce]}const Yt=Nt=>{const{componentCls:Oe}=Nt,jt=(0,It.mergeToken)(Nt,{selectHeight:Nt.controlHeightSM,multipleSelectItemHeight:Nt.multipleItemHeightSM,borderRadius:Nt.borderRadiusSM,borderRadiusSM:Nt.borderRadiusXS}),Me=(0,It.mergeToken)(Nt,{fontSize:Nt.fontSizeLG,selectHeight:Nt.controlHeightLG,multipleSelectItemHeight:Nt.multipleItemHeightLG,borderRadius:Nt.borderRadiusLG,borderRadiusSM:Nt.borderRadius});return[me(Nt),me(jt,"sm"),{[`${Oe}-multiple${Oe}-sm`]:{[`${Oe}-selection-placeholder`]:{insetInline:Nt.calc(Nt.controlPaddingHorizontalSM).sub(Nt.lineWidth).equal()},[`${Oe}-selection-search`]:{marginInlineStart:2}}},me(Me,"lg")]};qe.ZP=Yt},68525:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});var lt=dt(59301),Dt=dt(40001),It=dt(19248),xe=dt(99267),_t=dt(84105),Gt=dt(58617),Vt=dt(47472);function me(Yt){let{suffixIcon:Nt,clearIcon:Oe,menuItemSelectedIcon:jt,removeIcon:Me,loading:ce,multiple:ee,hasFeedback:Kt,prefixCls:Ht,showSuffixIcon:de,feedbackIcon:Ae,showArrow:je,componentName:se}=Yt;const Xt=Oe!=null?Oe:lt.createElement(It.Z,null),ve=Le=>Nt===null&&!Kt&&!je?null:lt.createElement(lt.Fragment,null,de!==!1&&Le,Kt&&Ae);let Qt=null;if(Nt!==void 0)Qt=ve(Nt);else if(ce)Qt=ve(lt.createElement(Gt.Z,{spin:!0}));else{const Le=`${Ht}-suffix`;Qt=en=>{let{open:ie,showSearch:Re}=en;return ve(ie&&Re?lt.createElement(Vt.Z,{className:Le}):lt.createElement(_t.Z,{className:Le}))}}let Se=null;jt!==void 0?Se=jt:ee?Se=lt.createElement(Dt.Z,null):Se=null;let be=null;return Me!==void 0?be=Me:be=lt.createElement(xe.Z,null),{clearIcon:Xt,suffixIcon:Qt,itemIcon:Se,removeIcon:be}}},90005:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return lt}});function lt(Dt,It){return It!==void 0?It:Dt!==null}},11938:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return en}});var lt=dt(59301),Dt=dt(40192),It=dt(22703),xe=dt(92310),_t=dt.n(xe),Gt=dt(26112),Vt=dt(48755),me=dt(458),Nt=ie=>{const{value:Re,formatter:De,precision:Tt,decimalSeparator:rn,groupSeparator:we="",prefixCls:Ue}=ie;let On;if(typeof De=="function")On=De(Re);else{const zt=String(Re),kt=zt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!kt||zt==="-")On=zt;else{const Ye=kt[1];let wn=kt[2]||"0",on=kt[4]||"";wn=wn.replace(/\B(?=(\d{3})+(?!\d))/g,we),typeof Tt=="number"&&(on=on.padEnd(Tt,"0").slice(0,Tt>0?Tt:0)),on&&(on=`${rn}${on}`),On=[lt.createElement("span",{key:"int",className:`${Ue}-content-value-int`},Ye,wn),on&<.createElement("span",{key:"decimal",className:`${Ue}-content-value-decimal`},on)]}}return lt.createElement("span",{className:`${Ue}-content-value`},On)},Oe=dt(63356),jt=dt(16931),Me=dt(51636);const ce=ie=>{const{componentCls:Re,marginXXS:De,padding:Tt,colorTextDescription:rn,titleFontSize:we,colorTextHeading:Ue,contentFontSize:On,fontFamily:zt}=ie;return{[Re]:Object.assign(Object.assign({},(0,Oe.Wf)(ie)),{[`${Re}-title`]:{marginBottom:De,color:rn,fontSize:we},[`${Re}-skeleton`]:{paddingTop:Tt},[`${Re}-content`]:{color:Ue,fontSize:On,fontFamily:zt,[`${Re}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Re}-content-prefix, ${Re}-content-suffix`]:{display:"inline-block"},[`${Re}-content-prefix`]:{marginInlineEnd:De},[`${Re}-content-suffix`]:{marginInlineStart:De}}})}},ee=ie=>{const{fontSizeHeading3:Re,fontSize:De}=ie;return{titleFontSize:De,contentFontSize:Re}};var Kt=(0,jt.I$)("Statistic",ie=>{const Re=(0,Me.mergeToken)(ie,{});return[ce(Re)]},ee),Ht=function(ie,Re){var De={};for(var Tt in ie)Object.prototype.hasOwnProperty.call(ie,Tt)&&Re.indexOf(Tt)<0&&(De[Tt]=ie[Tt]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,Tt=Object.getOwnPropertySymbols(ie);rn<Tt.length;rn++)Re.indexOf(Tt[rn])<0&&Object.prototype.propertyIsEnumerable.call(ie,Tt[rn])&&(De[Tt[rn]]=ie[Tt[rn]]);return De},Ae=ie=>{const{prefixCls:Re,className:De,rootClassName:Tt,style:rn,valueStyle:we,value:Ue=0,title:On,valueRender:zt,prefix:kt,suffix:Ye,loading:wn=!1,formatter:on,precision:$t,decimalSeparator:Ee=".",groupSeparator:Be=",",onMouseEnter:Cn,onMouseLeave:Ie}=ie,gn=Ht(ie,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:ke,direction:Dn,className:ln,style:bt}=(0,Vt.dj)("statistic"),gt=ke("statistic",Re),[pt,Ct,Pt]=Kt(gt),vt=lt.createElement(Nt,{decimalSeparator:Ee,groupSeparator:Be,prefixCls:gt,formatter:on,precision:$t,value:Ue}),Et=_t()(gt,{[`${gt}-rtl`]:Dn==="rtl"},ln,De,Tt,Ct,Pt),Zt=(0,Gt.Z)(gn,{aria:!0,data:!0});return pt(lt.createElement("div",Object.assign({},Zt,{className:Et,style:Object.assign(Object.assign({},bt),rn),onMouseEnter:Cn,onMouseLeave:Ie}),On&<.createElement("div",{className:`${gt}-title`},On),lt.createElement(me.Z,{paragraph:!1,loading:wn,className:`${gt}-skeleton`},lt.createElement("div",{style:we,className:`${gt}-content`},kt&<.createElement("span",{className:`${gt}-content-prefix`},kt),zt?zt(vt):vt,Ye&<.createElement("span",{className:`${gt}-content-suffix`},Ye)))))};const je=[["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(ie,Re){let De=ie;const Tt=/\[[^\]]*]/g,rn=(Re.match(Tt)||[]).map(zt=>zt.slice(1,-1)),we=Re.replace(Tt,"[]"),Ue=je.reduce((zt,kt)=>{let[Ye,wn]=kt;if(zt.includes(Ye)){const on=Math.floor(De/wn);return De-=on*wn,zt.replace(new RegExp(`${Ye}+`,"g"),$t=>{const Ee=$t.length;return on.toString().padStart(Ee,"0")})}return zt},we);let On=0;return Ue.replace(Tt,()=>{const zt=rn[On];return On+=1,zt})}function Xt(ie,Re){const{format:De=""}=Re,Tt=new Date(ie).getTime(),rn=Date.now(),we=Math.max(Tt-rn,0);return se(we,De)}var ve=function(ie,Re){var De={};for(var Tt in ie)Object.prototype.hasOwnProperty.call(ie,Tt)&&Re.indexOf(Tt)<0&&(De[Tt]=ie[Tt]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,Tt=Object.getOwnPropertySymbols(ie);rn<Tt.length;rn++)Re.indexOf(Tt[rn])<0&&Object.prototype.propertyIsEnumerable.call(ie,Tt[rn])&&(De[Tt[rn]]=ie[Tt[rn]]);return De};const Qt=1e3/30;function Se(ie){return new Date(ie).getTime()}const be=ie=>{const{value:Re,format:De="HH:mm:ss",onChange:Tt,onFinish:rn}=ie,we=ve(ie,["value","format","onChange","onFinish"]),Ue=(0,Dt.Z)(),On=lt.useRef(null),zt=()=>{rn==null||rn(),On.current&&(clearInterval(On.current),On.current=null)},kt=()=>{const on=Se(Re);on>=Date.now()&&(On.current=setInterval(()=>{Ue(),Tt==null||Tt(on-Date.now()),on<Date.now()&&zt()},Qt))};lt.useEffect(()=>(kt(),()=>{On.current&&(clearInterval(On.current),On.current=null)}),[Re]);const Ye=(on,$t)=>Xt(on,Object.assign(Object.assign({},$t),{format:De})),wn=on=>(0,It.Tm)(on,{title:void 0});return lt.createElement(Ae,Object.assign({},we,{value:Re,valueRender:wn,formatter:Ye}))};var Le=lt.memo(be);Ae.Countdown=Le;var en=Ae},58755:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return rn}});var lt=dt(59301),Dt=dt(58617),It=dt(92310),xe=dt.n(It),_t=dt(60499),Gt=dt(18642),Vt=dt(72190),me=dt(42244),Yt=dt(18929),Nt=dt(10228),Oe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],jt=lt.forwardRef(function(we,Ue){var On,zt=we.prefixCls,kt=zt===void 0?"rc-switch":zt,Ye=we.className,wn=we.checked,on=we.defaultChecked,$t=we.disabled,Ee=we.loadingIcon,Be=we.checkedChildren,Cn=we.unCheckedChildren,Ie=we.onClick,gn=we.onChange,ke=we.onKeyDown,Dn=(0,me.Z)(we,Oe),ln=(0,Yt.Z)(!1,{value:wn,defaultValue:on}),bt=(0,Vt.Z)(ln,2),gt=bt[0],pt=bt[1];function Ct(Zt,Ve){var ue=gt;return $t||(ue=Zt,pt(ue),gn==null||gn(ue,Ve)),ue}function Pt(Zt){Zt.which===Nt.Z.LEFT?Ct(!1,Zt):Zt.which===Nt.Z.RIGHT&&Ct(!0,Zt),ke==null||ke(Zt)}function vt(Zt){var Ve=Ct(!gt,Zt);Ie==null||Ie(Ve,Zt)}var Et=xe()(kt,Ye,(On={},(0,Gt.Z)(On,"".concat(kt,"-checked"),gt),(0,Gt.Z)(On,"".concat(kt,"-disabled"),$t),On));return lt.createElement("button",(0,_t.Z)({},Dn,{type:"button",role:"switch","aria-checked":gt,disabled:$t,className:Et,ref:Ue,onKeyDown:Pt,onClick:vt}),Ee,lt.createElement("span",{className:"".concat(kt,"-inner")},lt.createElement("span",{className:"".concat(kt,"-inner-checked")},Be),lt.createElement("span",{className:"".concat(kt,"-inner-unchecked")},Cn)))});jt.displayName="Switch";var Me=jt,ce=dt(12919),ee=dt(48755),Kt=dt(2171),Ht=dt(31756),de=dt(36237),Ae=dt(17835),je=dt(63356),se=dt(16931),Xt=dt(51636);const ve=we=>{const{componentCls:Ue,trackHeightSM:On,trackPadding:zt,trackMinWidthSM:kt,innerMinMarginSM:Ye,innerMaxMarginSM:wn,handleSizeSM:on,calc:$t}=we,Ee=`${Ue}-inner`,Be=(0,de.unit)($t(on).add($t(zt).mul(2)).equal()),Cn=(0,de.unit)($t(wn).mul(2).equal());return{[Ue]:{[`&${Ue}-small`]:{minWidth:kt,height:On,lineHeight:(0,de.unit)(On),[`${Ue}-inner`]:{paddingInlineStart:wn,paddingInlineEnd:Ye,[`${Ee}-checked, ${Ee}-unchecked`]:{minHeight:On},[`${Ee}-checked`]:{marginInlineStart:`calc(-100% + ${Be} - ${Cn})`,marginInlineEnd:`calc(100% - ${Be} + ${Cn})`},[`${Ee}-unchecked`]:{marginTop:$t(On).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${Ue}-handle`]:{width:on,height:on},[`${Ue}-loading-icon`]:{top:$t($t(on).sub(we.switchLoadingIconSize)).div(2).equal(),fontSize:we.switchLoadingIconSize},[`&${Ue}-checked`]:{[`${Ue}-inner`]:{paddingInlineStart:Ye,paddingInlineEnd:wn,[`${Ee}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ee}-unchecked`]:{marginInlineStart:`calc(100% - ${Be} + ${Cn})`,marginInlineEnd:`calc(-100% + ${Be} - ${Cn})`}},[`${Ue}-handle`]:{insetInlineStart:`calc(100% - ${(0,de.unit)($t(on).add(zt).equal())})`}},[`&:not(${Ue}-disabled):active`]:{[`&:not(${Ue}-checked) ${Ee}`]:{[`${Ee}-unchecked`]:{marginInlineStart:$t(we.marginXXS).div(2).equal(),marginInlineEnd:$t(we.marginXXS).mul(-1).div(2).equal()}},[`&${Ue}-checked ${Ee}`]:{[`${Ee}-checked`]:{marginInlineStart:$t(we.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:$t(we.marginXXS).div(2).equal()}}}}}}},Qt=we=>{const{componentCls:Ue,handleSize:On,calc:zt}=we;return{[Ue]:{[`${Ue}-loading-icon${we.iconCls}`]:{position:"relative",top:zt(zt(On).sub(we.fontSize)).div(2).equal(),color:we.switchLoadingIconColor,verticalAlign:"top"},[`&${Ue}-checked ${Ue}-loading-icon`]:{color:we.switchColor}}}},Se=we=>{const{componentCls:Ue,trackPadding:On,handleBg:zt,handleShadow:kt,handleSize:Ye,calc:wn}=we,on=`${Ue}-handle`;return{[Ue]:{[on]:{position:"absolute",top:On,insetInlineStart:On,width:Ye,height:Ye,transition:`all ${we.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:zt,borderRadius:wn(Ye).div(2).equal(),boxShadow:kt,transition:`all ${we.switchDuration} ease-in-out`,content:'""'}},[`&${Ue}-checked ${on}`]:{insetInlineStart:`calc(100% - ${(0,de.unit)(wn(Ye).add(On).equal())})`},[`&:not(${Ue}-disabled):active`]:{[`${on}::before`]:{insetInlineEnd:we.switchHandleActiveInset,insetInlineStart:0},[`&${Ue}-checked ${on}::before`]:{insetInlineEnd:0,insetInlineStart:we.switchHandleActiveInset}}}}},be=we=>{const{componentCls:Ue,trackHeight:On,trackPadding:zt,innerMinMargin:kt,innerMaxMargin:Ye,handleSize:wn,calc:on}=we,$t=`${Ue}-inner`,Ee=(0,de.unit)(on(wn).add(on(zt).mul(2)).equal()),Be=(0,de.unit)(on(Ye).mul(2).equal());return{[Ue]:{[$t]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ye,paddingInlineEnd:kt,transition:`padding-inline-start ${we.switchDuration} ease-in-out, padding-inline-end ${we.switchDuration} ease-in-out`,[`${$t}-checked, ${$t}-unchecked`]:{display:"block",color:we.colorTextLightSolid,fontSize:we.fontSizeSM,transition:`margin-inline-start ${we.switchDuration} ease-in-out, margin-inline-end ${we.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:On},[`${$t}-checked`]:{marginInlineStart:`calc(-100% + ${Ee} - ${Be})`,marginInlineEnd:`calc(100% - ${Ee} + ${Be})`},[`${$t}-unchecked`]:{marginTop:on(On).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${Ue}-checked ${$t}`]:{paddingInlineStart:kt,paddingInlineEnd:Ye,[`${$t}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${$t}-unchecked`]:{marginInlineStart:`calc(100% - ${Ee} + ${Be})`,marginInlineEnd:`calc(-100% + ${Ee} - ${Be})`}},[`&:not(${Ue}-disabled):active`]:{[`&:not(${Ue}-checked) ${$t}`]:{[`${$t}-unchecked`]:{marginInlineStart:on(zt).mul(2).equal(),marginInlineEnd:on(zt).mul(-1).mul(2).equal()}},[`&${Ue}-checked ${$t}`]:{[`${$t}-checked`]:{marginInlineStart:on(zt).mul(-1).mul(2).equal(),marginInlineEnd:on(zt).mul(2).equal()}}}}}},Le=we=>{const{componentCls:Ue,trackHeight:On,trackMinWidth:zt}=we;return{[Ue]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,je.Wf)(we)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:zt,height:On,lineHeight:(0,de.unit)(On),verticalAlign:"middle",background:we.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${we.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ue}-disabled)`]:{background:we.colorTextTertiary}}),(0,je.Qy)(we)),{[`&${Ue}-checked`]:{background:we.switchColor,[`&:hover:not(${Ue}-disabled)`]:{background:we.colorPrimaryHover}},[`&${Ue}-loading, &${Ue}-disabled`]:{cursor:"not-allowed",opacity:we.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ue}-rtl`]:{direction:"rtl"}})}},en=we=>{const{fontSize:Ue,lineHeight:On,controlHeight:zt,colorWhite:kt}=we,Ye=Ue*On,wn=zt/2,on=2,$t=Ye-on*2,Ee=wn-on*2;return{trackHeight:Ye,trackHeightSM:wn,trackMinWidth:$t*2+on*4,trackMinWidthSM:Ee*2+on*2,trackPadding:on,handleBg:kt,handleSize:$t,handleSizeSM:Ee,handleShadow:`0 2px 4px 0 ${new Ae.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:$t/2,innerMaxMargin:$t+on+on*2,innerMinMarginSM:Ee/2,innerMaxMarginSM:Ee+on+on*2}};var ie=(0,se.I$)("Switch",we=>{const Ue=(0,Xt.mergeToken)(we,{switchDuration:we.motionDurationMid,switchColor:we.colorPrimary,switchDisabledOpacity:we.opacityLoading,switchLoadingIconSize:we.calc(we.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${we.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Le(Ue),be(Ue),Se(Ue),Qt(Ue),ve(Ue)]},en),Re=function(we,Ue){var On={};for(var zt in we)Object.prototype.hasOwnProperty.call(we,zt)&&Ue.indexOf(zt)<0&&(On[zt]=we[zt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kt=0,zt=Object.getOwnPropertySymbols(we);kt<zt.length;kt++)Ue.indexOf(zt[kt])<0&&Object.prototype.propertyIsEnumerable.call(we,zt[kt])&&(On[zt[kt]]=we[zt[kt]]);return On};const Tt=lt.forwardRef((we,Ue)=>{const{prefixCls:On,size:zt,disabled:kt,loading:Ye,className:wn,rootClassName:on,style:$t,checked:Ee,value:Be,defaultChecked:Cn,defaultValue:Ie,onChange:gn}=we,ke=Re(we,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[Dn,ln]=(0,Yt.Z)(!1,{value:Ee!=null?Ee:Be,defaultValue:Cn!=null?Cn:Ie}),{getPrefixCls:bt,direction:gt,switch:pt}=lt.useContext(ee.E_),Ct=lt.useContext(Kt.Z),Pt=(kt!=null?kt:Ct)||Ye,vt=bt("switch",On),Et=lt.createElement("div",{className:`${vt}-handle`},Ye&<.createElement(Dt.Z,{className:`${vt}-loading-icon`})),[Zt,Ve,ue]=ie(vt),re=(0,Ht.Z)(zt),Ce=xe()(pt==null?void 0:pt.className,{[`${vt}-small`]:re==="small",[`${vt}-loading`]:Ye,[`${vt}-rtl`]:gt==="rtl"},wn,on,Ve,ue),Te=Object.assign(Object.assign({},pt==null?void 0:pt.style),$t),tn=function(){ln(arguments.length<=0?void 0:arguments[0]),gn==null||gn.apply(void 0,arguments)};return Zt(lt.createElement(ce.Z,{component:"Switch"},lt.createElement(Me,Object.assign({},ke,{checked:Dn,onChange:tn,prefixCls:vt,className:Ce,style:Te,disabled:Pt,ref:Ue,loadingIcon:Et}))))});Tt.__ANT_SWITCH=!0;var rn=Tt},96599:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return De}});var lt=dt(59301),Dt=dt(92310),It=dt.n(Dt),xe=dt(2738),_t=dt(29509),Gt=dt(78776),Vt=dt(22703),me=dt(12919),Yt=dt(48755),Nt=dt(36237),Oe=dt(17835),jt=dt(63356),Me=dt(51636),ce=dt(16931);const ee=Tt=>{const{paddingXXS:rn,lineWidth:we,tagPaddingHorizontal:Ue,componentCls:On,calc:zt}=Tt,kt=zt(Ue).sub(we).equal(),Ye=zt(rn).sub(we).equal();return{[On]:Object.assign(Object.assign({},(0,jt.Wf)(Tt)),{display:"inline-block",height:"auto",marginInlineEnd:Tt.marginXS,paddingInline:kt,fontSize:Tt.tagFontSize,lineHeight:Tt.tagLineHeight,whiteSpace:"nowrap",background:Tt.defaultBg,border:`${(0,Nt.unit)(Tt.lineWidth)} ${Tt.lineType} ${Tt.colorBorder}`,borderRadius:Tt.borderRadiusSM,opacity:1,transition:`all ${Tt.motionDurationMid}`,textAlign:"start",position:"relative",[`&${On}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Tt.defaultColor},[`${On}-close-icon`]:{marginInlineStart:Ye,fontSize:Tt.tagIconSize,color:Tt.colorTextDescription,cursor:"pointer",transition:`all ${Tt.motionDurationMid}`,"&:hover":{color:Tt.colorTextHeading}},[`&${On}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Tt.iconCls}-close, ${Tt.iconCls}-close:hover`]:{color:Tt.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${On}-checkable-checked):hover`]:{color:Tt.colorPrimary,backgroundColor:Tt.colorFillSecondary},"&:active, &-checked":{color:Tt.colorTextLightSolid},"&-checked":{backgroundColor:Tt.colorPrimary,"&:hover":{backgroundColor:Tt.colorPrimaryHover}},"&:active":{backgroundColor:Tt.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Tt.iconCls} + span, > span + ${Tt.iconCls}`]:{marginInlineStart:kt}}),[`${On}-borderless`]:{borderColor:"transparent",background:Tt.tagBorderlessBg}}},Kt=Tt=>{const{lineWidth:rn,fontSizeIcon:we,calc:Ue}=Tt,On=Tt.fontSizeSM;return(0,Me.mergeToken)(Tt,{tagFontSize:On,tagLineHeight:(0,Nt.unit)(Ue(Tt.lineHeightSM).mul(On).equal()),tagIconSize:Ue(we).sub(Ue(rn).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:Tt.defaultBg})},Ht=Tt=>({defaultBg:new Oe.FastColor(Tt.colorFillQuaternary).onBackground(Tt.colorBgContainer).toHexString(),defaultColor:Tt.colorText});var de=(0,ce.I$)("Tag",Tt=>{const rn=Kt(Tt);return ee(rn)},Ht),Ae=function(Tt,rn){var we={};for(var Ue in Tt)Object.prototype.hasOwnProperty.call(Tt,Ue)&&rn.indexOf(Ue)<0&&(we[Ue]=Tt[Ue]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,Ue=Object.getOwnPropertySymbols(Tt);On<Ue.length;On++)rn.indexOf(Ue[On])<0&&Object.prototype.propertyIsEnumerable.call(Tt,Ue[On])&&(we[Ue[On]]=Tt[Ue[On]]);return we},se=lt.forwardRef((Tt,rn)=>{const{prefixCls:we,style:Ue,className:On,checked:zt,onChange:kt,onClick:Ye}=Tt,wn=Ae(Tt,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:on,tag:$t}=lt.useContext(Yt.E_),Ee=Dn=>{kt==null||kt(!zt),Ye==null||Ye(Dn)},Be=on("tag",we),[Cn,Ie,gn]=de(Be),ke=It()(Be,`${Be}-checkable`,{[`${Be}-checkable-checked`]:zt},$t==null?void 0:$t.className,On,Ie,gn);return Cn(lt.createElement("span",Object.assign({},wn,{ref:rn,style:Object.assign(Object.assign({},Ue),$t==null?void 0:$t.style),className:ke,onClick:Ee})))}),Xt=dt(93427);const ve=Tt=>(0,Xt.Z)(Tt,(rn,we)=>{let{textColor:Ue,lightBorderColor:On,lightColor:zt,darkColor:kt}=we;return{[`${Tt.componentCls}${Tt.componentCls}-${rn}`]:{color:Ue,background:zt,borderColor:On,"&-inverse":{color:Tt.colorTextLightSolid,background:kt,borderColor:kt},[`&${Tt.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Qt=(0,ce.bk)(["Tag","preset"],Tt=>{const rn=Kt(Tt);return ve(rn)},Ht);function Se(Tt){return typeof Tt!="string"?Tt:Tt.charAt(0).toUpperCase()+Tt.slice(1)}const be=(Tt,rn,we)=>{const Ue=Se(we);return{[`${Tt.componentCls}${Tt.componentCls}-${rn}`]:{color:Tt[`color${we}`],background:Tt[`color${Ue}Bg`],borderColor:Tt[`color${Ue}Border`],[`&${Tt.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Le=(0,ce.bk)(["Tag","status"],Tt=>{const rn=Kt(Tt);return[be(rn,"success","Success"),be(rn,"processing","Info"),be(rn,"error","Error"),be(rn,"warning","Warning")]},Ht),en=function(Tt,rn){var we={};for(var Ue in Tt)Object.prototype.hasOwnProperty.call(Tt,Ue)&&rn.indexOf(Ue)<0&&(we[Ue]=Tt[Ue]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,Ue=Object.getOwnPropertySymbols(Tt);On<Ue.length;On++)rn.indexOf(Ue[On])<0&&Object.prototype.propertyIsEnumerable.call(Tt,Ue[On])&&(we[Ue[On]]=Tt[Ue[On]]);return we};const Re=lt.forwardRef((Tt,rn)=>{const{prefixCls:we,className:Ue,rootClassName:On,style:zt,children:kt,icon:Ye,color:wn,onClose:on,bordered:$t=!0,visible:Ee}=Tt,Be=en(Tt,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:Cn,direction:Ie,tag:gn}=lt.useContext(Yt.E_),[ke,Dn]=lt.useState(!0),ln=(0,xe.Z)(Be,["closeIcon","closable"]);lt.useEffect(()=>{Ee!==void 0&&Dn(Ee)},[Ee]);const bt=(0,_t.o2)(wn),gt=(0,_t.yT)(wn),pt=bt||gt,Ct=Object.assign(Object.assign({backgroundColor:wn&&!pt?wn:void 0},gn==null?void 0:gn.style),zt),Pt=Cn("tag",we),[vt,Et,Zt]=de(Pt),Ve=It()(Pt,gn==null?void 0:gn.className,{[`${Pt}-${wn}`]:pt,[`${Pt}-has-color`]:wn&&!pt,[`${Pt}-hidden`]:!ke,[`${Pt}-rtl`]:Ie==="rtl",[`${Pt}-borderless`]:!$t},Ue,On,Et,Zt),ue=le=>{le.stopPropagation(),on==null||on(le),!le.defaultPrevented&&Dn(!1)},[,re]=(0,Gt.Z)((0,Gt.w)(Tt),(0,Gt.w)(gn),{closable:!1,closeIconRender:le=>{const bn=lt.createElement("span",{className:`${Pt}-close-icon`,onClick:ue},le);return(0,Vt.wm)(le,bn,Sn=>({onClick:Rn=>{var In;(In=Sn==null?void 0:Sn.onClick)===null||In===void 0||In.call(Sn,Rn),ue(Rn)},className:It()(Sn==null?void 0:Sn.className,`${Pt}-close-icon`)}))}}),Ce=typeof Be.onClick=="function"||kt&&kt.type==="a",Te=Ye||null,tn=Te?lt.createElement(lt.Fragment,null,Te,kt&<.createElement("span",null,kt)):kt,te=lt.createElement("span",Object.assign({},ln,{ref:rn,className:Ve,style:Ct}),tn,re,bt&<.createElement(Qt,{key:"preset",prefixCls:Pt}),gt&<.createElement(Le,{key:"status",prefixCls:Pt}));return vt(Ce?lt.createElement(me.Z,{component:"Tag"},te):te)});Re.CheckableTag=se;var De=Re},18287:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return on}});var lt=dt(87632),Dt=dt(77654),It=dt(59301),xe=dt(52671),_t=dt(8657),Gt=dt(60499),Vt={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"},me=Vt,Yt=dt(7657),Nt=function(Ee,Be){return It.createElement(Yt.Z,(0,Gt.Z)({},Ee,{ref:Be,icon:me}))},Oe=It.forwardRef(Nt),jt=Oe,Me=dt(92310),ce=dt.n(Me),ee=dt(82661),Kt=dt(34061),Ht=dt(48755),de=dt(56082),Ae=dt(86641),je=dt(57700),se=dt(12425);const Xt=4;function ve($t){const{dropPosition:Ee,dropLevelOffset:Be,prefixCls:Cn,indent:Ie,direction:gn="ltr"}=$t,ke=gn==="ltr"?"left":"right",Dn=gn==="ltr"?"right":"left",ln={[ke]:-Be*Ie+Xt,[Dn]:0};switch(Ee){case-1:ln.top=-3;break;case 1:ln.bottom=-3;break;default:ln.bottom=-3,ln[ke]=Ie+Xt;break}return It.createElement("div",{style:ln,className:`${Cn}-drop-indicator`})}var Qt=ve,Se=dt(85278),Le=It.forwardRef(($t,Ee)=>{var Be;const{getPrefixCls:Cn,direction:Ie,virtual:gn,tree:ke}=It.useContext(Ht.E_),{prefixCls:Dn,className:ln,showIcon:bt=!1,showLine:gt,switcherIcon:pt,switcherLoadingIcon:Ct,blockNode:Pt=!1,children:vt,checkable:Et=!1,selectable:Zt=!0,draggable:Ve,motion:ue,style:re}=$t,Ce=Cn("tree",Dn),Te=Cn(),tn=ue!=null?ue:Object.assign(Object.assign({},(0,Ae.Z)(Te)),{motionAppear:!1}),te=Object.assign(Object.assign({},$t),{checkable:Et,selectable:Zt,showIcon:bt,motion:tn,blockNode:Pt,showLine:!!gt,dropIndicatorRender:Qt}),[le,bn,Sn]=(0,se.ZP)(Ce),[,Rn]=(0,je.ZP)(),In=Rn.paddingXS/2+(((Be=Rn.Tree)===null||Be===void 0?void 0:Be.titleHeight)||Rn.controlHeightSM),sn=It.useMemo(()=>{if(!Ve)return!1;let Mn={};switch(typeof Ve){case"function":Mn.nodeDraggable=Ve;break;case"object":Mn=Object.assign({},Ve);break;default:break}return Mn.icon!==!1&&(Mn.icon=Mn.icon||It.createElement(de.Z,null)),Mn},[Ve]),Hn=Mn=>It.createElement(Se.Z,{prefixCls:Ce,switcherIcon:pt,switcherLoadingIcon:Ct,treeNodeProps:Mn,showLine:gt});return le(It.createElement(lt.ZP,Object.assign({itemHeight:In,ref:Ee,virtual:gn},te,{style:Object.assign(Object.assign({},ke==null?void 0:ke.style),re),prefixCls:Ce,className:ce()({[`${Ce}-icon-hide`]:!bt,[`${Ce}-block-node`]:Pt,[`${Ce}-unselectable`]:!Zt,[`${Ce}-rtl`]:Ie==="rtl"},ke==null?void 0:ke.className,ln,bn,Sn),direction:Ie,checkable:Et&&It.createElement("span",{className:`${Ce}-checkbox-inner`}),selectable:Zt,switcherIcon:Hn,draggable:sn}),vt))});const en=0,ie=1,Re=2;function De($t,Ee,Be){const{key:Cn,children:Ie}=Be;function gn(ke){const Dn=ke[Cn],ln=ke[Ie];Ee(Dn,ke)!==!1&&De(ln||[],Ee,Be)}$t.forEach(gn)}function Tt($t){let{treeData:Ee,expandedKeys:Be,startKey:Cn,endKey:Ie,fieldNames:gn}=$t;const ke=[];let Dn=en;if(Cn&&Cn===Ie)return[Cn];if(!Cn||!Ie)return[];function ln(bt){return bt===Cn||bt===Ie}return De(Ee,bt=>{if(Dn===Re)return!1;if(ln(bt)){if(ke.push(bt),Dn===en)Dn=ie;else if(Dn===ie)return Dn=Re,!1}else Dn===ie&&ke.push(bt);return Be.includes(bt)},(0,Kt.w$)(gn)),ke}function rn($t,Ee,Be){const Cn=(0,Dt.Z)(Ee),Ie=[];return De($t,(gn,ke)=>{const Dn=Cn.indexOf(gn);return Dn!==-1&&(Ie.push(ke),Cn.splice(Dn,1)),!!Cn.length},(0,Kt.w$)(Be)),Ie}var we=function($t,Ee){var Be={};for(var Cn in $t)Object.prototype.hasOwnProperty.call($t,Cn)&&Ee.indexOf(Cn)<0&&(Be[Cn]=$t[Cn]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Cn=Object.getOwnPropertySymbols($t);Ie<Cn.length;Ie++)Ee.indexOf(Cn[Ie])<0&&Object.prototype.propertyIsEnumerable.call($t,Cn[Ie])&&(Be[Cn[Ie]]=$t[Cn[Ie]]);return Be};function Ue($t){const{isLeaf:Ee,expanded:Be}=$t;return Ee?It.createElement(xe.Z,null):Be?It.createElement(_t.Z,null):It.createElement(jt,null)}function On($t){let{treeData:Ee,children:Be}=$t;return Ee||(0,Kt.zn)(Be)}const zt=($t,Ee)=>{var{defaultExpandAll:Be,defaultExpandParent:Cn,defaultExpandedKeys:Ie}=$t,gn=we($t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const ke=It.useRef(null),Dn=It.useRef(null),ln=()=>{const{keyEntities:le}=(0,Kt.I8)(On(gn));let bn;return Be?bn=Object.keys(le):Cn?bn=(0,ee.r7)(gn.expandedKeys||Ie||[],le):bn=gn.expandedKeys||Ie||[],bn},[bt,gt]=It.useState(gn.selectedKeys||gn.defaultSelectedKeys||[]),[pt,Ct]=It.useState(()=>ln());It.useEffect(()=>{"selectedKeys"in gn&>(gn.selectedKeys)},[gn.selectedKeys]),It.useEffect(()=>{"expandedKeys"in gn&&Ct(gn.expandedKeys)},[gn.expandedKeys]);const Pt=(le,bn)=>{var Sn;return"expandedKeys"in gn||Ct(le),(Sn=gn.onExpand)===null||Sn===void 0?void 0:Sn.call(gn,le,bn)},vt=(le,bn)=>{var Sn;const{multiple:Rn,fieldNames:In}=gn,{node:sn,nativeEvent:Hn}=bn,{key:Mn=""}=sn,ye=On(gn),Ze=Object.assign(Object.assign({},bn),{selected:!0}),En=(Hn==null?void 0:Hn.ctrlKey)||(Hn==null?void 0:Hn.metaKey),An=Hn==null?void 0:Hn.shiftKey;let he;Rn&&En?(he=le,ke.current=Mn,Dn.current=he,Ze.selectedNodes=rn(ye,he,In)):Rn&&An?(he=Array.from(new Set([].concat((0,Dt.Z)(Dn.current||[]),(0,Dt.Z)(Tt({treeData:ye,expandedKeys:pt,startKey:Mn,endKey:ke.current,fieldNames:In}))))),Ze.selectedNodes=rn(ye,he,In)):(he=[Mn],ke.current=Mn,Dn.current=he,Ze.selectedNodes=rn(ye,he,In)),(Sn=gn.onSelect)===null||Sn===void 0||Sn.call(gn,he,Ze),"selectedKeys"in gn||gt(he)},{getPrefixCls:Et,direction:Zt}=It.useContext(Ht.E_),{prefixCls:Ve,className:ue,showIcon:re=!0,expandAction:Ce="click"}=gn,Te=we(gn,["prefixCls","className","showIcon","expandAction"]),tn=Et("tree",Ve),te=ce()(`${tn}-directory`,{[`${tn}-directory-rtl`]:Zt==="rtl"},ue);return It.createElement(Le,Object.assign({icon:Ue,ref:Ee,blockNode:!0},Te,{showIcon:re,expandAction:Ce,prefixCls:tn,className:te,expandedKeys:pt,selectedKeys:bt,onSelect:vt,onExpand:Pt}))};var Ye=It.forwardRef(zt);const wn=Le;wn.DirectoryTree=Ye,wn.TreeNode=lt.OF;var on=wn},12425:function(Yn,qe,dt){"use strict";dt.d(qe,{ZP:function(){return ee},Yk:function(){return jt},TM:function(){return Me}});var lt=dt(36237),Dt=dt(36170),It=dt(63356),xe=dt(34961),_t=dt(51636),Gt=dt(16931);const Vt=Kt=>{let{treeCls:Ht,treeNodeCls:de,directoryNodeSelectedBg:Ae,directoryNodeSelectedColor:je,motionDurationMid:se,borderRadius:Xt,controlItemBgHover:ve}=Kt;return{[`${Ht}${Ht}-directory ${de}`]:{[`${Ht}-node-content-wrapper`]:{position:"static",[`> *:not(${Ht}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${se}`,content:'""',borderRadius:Xt},"&:hover:before":{background:ve}},[`${Ht}-switcher, ${Ht}-checkbox, ${Ht}-draggable-icon`]:{zIndex:1},"&-selected":{[`${Ht}-switcher, ${Ht}-draggable-icon`]:{color:je},[`${Ht}-node-content-wrapper`]:{color:je,background:"transparent","&:before, &:hover:before":{background:Ae}}}}}},me=new lt.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Yt=(Kt,Ht)=>({[`.${Kt}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${Ht.motionDurationSlow}`}}}),Nt=(Kt,Ht)=>({[`.${Kt}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:Ht.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${(0,lt.unit)(Ht.lineWidthBold)} solid ${Ht.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Oe=(Kt,Ht)=>{const{treeCls:de,treeNodeCls:Ae,treeNodePadding:je,titleHeight:se,indentSize:Xt,nodeSelectedBg:ve,nodeHoverBg:Qt,colorTextQuaternary:Se,controlItemBgActiveDisabled:be}=Ht;return{[de]:Object.assign(Object.assign({},(0,It.Wf)(Ht)),{background:Ht.colorBgContainer,borderRadius:Ht.borderRadius,transition:`background-color ${Ht.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${de}-rtl ${de}-switcher_close ${de}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${de}-active-focused)`]:Object.assign({},(0,It.oN)(Ht)),[`${de}-list-holder-inner`]:{alignItems:"flex-start"},[`&${de}-block-node`]:{[`${de}-list-holder-inner`]:{alignItems:"stretch",[`${de}-node-content-wrapper`]:{flex:"auto"},[`${Ae}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${Ht.colorPrimary}`,opacity:0,animationName:me,animationDuration:Ht.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:Ht.borderRadius}}},[Ae]:{display:"flex",alignItems:"flex-start",marginBottom:je,lineHeight:(0,lt.unit)(se),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:je},[`&-disabled ${de}-node-content-wrapper`]:{color:Ht.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${de}-checkbox-disabled + ${de}-node-selected,&${Ae}-disabled${Ae}-selected ${de}-node-content-wrapper`]:{backgroundColor:be},[`${de}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${Ae}-disabled)`]:{[`${de}-node-content-wrapper`]:{"&:hover":{color:Ht.nodeHoverColor}}},[`&-active ${de}-node-content-wrapper`]:{background:Ht.controlItemBgHover},[`&:not(${Ae}-disabled).filter-node ${de}-title`]:{color:Ht.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${de}-draggable-icon`]:{flexShrink:0,width:se,textAlign:"center",visibility:"visible",color:Se},[`&${Ae}-disabled ${de}-draggable-icon`]:{visibility:"hidden"}}},[`${de}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:Xt}},[`${de}-draggable-icon`]:{visibility:"hidden"},[`${de}-switcher, ${de}-checkbox`]:{marginInlineEnd:Ht.calc(Ht.calc(se).sub(Ht.controlInteractiveSize)).div(2).equal()},[`${de}-switcher`]:Object.assign(Object.assign({},Yt(Kt,Ht)),{position:"relative",flex:"none",alignSelf:"stretch",width:se,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${Ht.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:se,height:se,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:Ht.borderRadius,transition:`all ${Ht.motionDurationSlow}`},[`&:not(${de}-switcher-noop):hover:before`]:{backgroundColor:Ht.colorBgTextHover},[`&_close ${de}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:Ht.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Ht.calc(se).div(2).equal(),bottom:Ht.calc(je).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${Ht.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:Ht.calc(Ht.calc(se).div(2).equal()).mul(.8).equal(),height:Ht.calc(se).div(2).equal(),borderBottom:`1px solid ${Ht.colorBorder}`,content:'""'}}}),[`${de}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:se,paddingBlock:0,paddingInline:Ht.paddingXS,background:"transparent",borderRadius:Ht.borderRadius,cursor:"pointer",transition:`all ${Ht.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Nt(Kt,Ht)),{"&:hover":{backgroundColor:Qt},[`&${de}-node-selected`]:{color:Ht.nodeSelectedColor,backgroundColor:ve},[`${de}-iconEle`]:{display:"inline-block",width:se,height:se,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${de}-unselectable ${de}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${Ae}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${Ht.colorPrimary}`},"&-show-line":{[`${de}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Ht.calc(se).div(2).equal(),bottom:Ht.calc(je).mul(-1).equal(),borderInlineEnd:`1px solid ${Ht.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${de}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${Ae}-leaf-last ${de}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${(0,lt.unit)(Ht.calc(se).div(2).equal())} !important`}})}},jt=function(Kt,Ht){let de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const Ae=`.${Kt}`,je=`${Ae}-treenode`,se=Ht.calc(Ht.paddingXS).div(2).equal(),Xt=(0,_t.mergeToken)(Ht,{treeCls:Ae,treeNodeCls:je,treeNodePadding:se});return[Oe(Kt,Xt),de&&Vt(Xt)].filter(Boolean)},Me=Kt=>{const{controlHeightSM:Ht,controlItemBgHover:de,controlItemBgActive:Ae}=Kt,je=Ht;return{titleHeight:je,indentSize:je,nodeHoverBg:de,nodeHoverColor:Kt.colorText,nodeSelectedBg:Ae,nodeSelectedColor:Kt.colorText}},ce=Kt=>{const{colorTextLightSolid:Ht,colorPrimary:de}=Kt;return Object.assign(Object.assign({},Me(Kt)),{directoryNodeSelectedColor:Ht,directoryNodeSelectedBg:de})};var ee=(0,Gt.I$)("Tree",(Kt,Ht)=>{let{prefixCls:de}=Ht;return[{[Kt.componentCls]:(0,Dt.C2)(`${de}-checkbox`,Kt)},jt(de,Kt),(0,xe.Z)(Kt)]},ce)},85278:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return Ht}});var lt=dt(59301),Dt=dt(60499),It={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"},xe=It,_t=dt(7657),Gt=function(Ae,je){return lt.createElement(_t.Z,(0,Dt.Z)({},Ae,{ref:je,icon:xe}))},Vt=lt.forwardRef(Gt),me=Vt,Yt=dt(52671),Nt=dt(58617),Oe=dt(15075),jt=dt(43531),Me=dt(92310),ce=dt.n(Me),ee=dt(22703),Ht=de=>{const{prefixCls:Ae,switcherIcon:je,treeNodeProps:se,showLine:Xt,switcherLoadingIcon:ve}=de,{isLeaf:Qt,expanded:Se,loading:be}=se;if(be)return lt.isValidElement(ve)?ve:lt.createElement(Nt.Z,{className:`${Ae}-switcher-loading-icon`});let Le;if(Xt&&typeof Xt=="object"&&(Le=Xt.showLeafIcon),Qt){if(!Xt)return null;if(typeof Le!="boolean"&&Le){const Re=typeof Le=="function"?Le(se):Le,De=`${Ae}-switcher-line-custom-icon`;return lt.isValidElement(Re)?(0,ee.Tm)(Re,{className:ce()(Re.props.className||"",De)}):Re}return Le?lt.createElement(Yt.Z,{className:`${Ae}-switcher-line-icon`}):lt.createElement("span",{className:`${Ae}-switcher-leaf-line`})}const en=`${Ae}-switcher-icon`,ie=typeof je=="function"?je(se):je;return lt.isValidElement(ie)?(0,ee.Tm)(ie,{className:ce()(ie.props.className||"",en)}):ie!==void 0?ie:Xt?Se?lt.createElement(Oe.Z,{className:`${Ae}-switcher-line-icon`}):lt.createElement(jt.Z,{className:`${Ae}-switcher-line-icon`}):lt.createElement(me,{className:en})}},94968:function(Yn,qe,dt){"use strict";dt.d(qe,{default:function(){return ze}});var lt=dt(59301),Dt=dt(77654),It=dt(4676),xe=dt(92310),_t=dt.n(xe),Gt=dt(60499),Vt=dt(38705),me=dt(17212),Yt=dt(15793),Nt=dt(39153),Oe=dt(55401),jt=dt(18642),Me=dt(85899),ce=dt(42244),ee=dt(43749),Kt=dt(73001),Ht=dt(11576),de=dt(26112),Ae=dt(48736),je=function(Jt,nn){if(Jt&&nn){var cn=Array.isArray(nn)?nn:nn.split(","),Ne=Jt.name||"",Fe=Jt.type||"",Xe=Fe.replace(/\/.*$/,"");return cn.some(function(Je){var vn=Je.trim();if(/^\*(\/\*)?$/.test(Je))return!0;if(vn.charAt(0)==="."){var li=Ne.toLowerCase(),jn=vn.toLowerCase(),vi=[jn];return(jn===".jpg"||jn===".jpeg")&&(vi=[".jpg",".jpeg"]),vi.some(function($i){return li.endsWith($i)})}return/\/\*$/.test(vn)?Xe===vn.replace(/\/.*$/,""):Fe===vn?!0:/^\w+$/.test(vn)?((0,Ae.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(vn,"'.Skip for check.")),!0):!1})}return!0};function se(Jt,nn){var cn="cannot ".concat(Jt.method," ").concat(Jt.action," ").concat(nn.status,"'"),Ne=new Error(cn);return Ne.status=nn.status,Ne.method=Jt.method,Ne.url=Jt.action,Ne}function Xt(Jt){var nn=Jt.responseText||Jt.response;if(!nn)return nn;try{return JSON.parse(nn)}catch(cn){return nn}}function ve(Jt){var nn=new XMLHttpRequest;Jt.onProgress&&nn.upload&&(nn.upload.onprogress=function(Xe){Xe.total>0&&(Xe.percent=Xe.loaded/Xe.total*100),Jt.onProgress(Xe)});var cn=new FormData;Jt.data&&Object.keys(Jt.data).forEach(function(Fe){var Xe=Jt.data[Fe];if(Array.isArray(Xe)){Xe.forEach(function(Je){cn.append("".concat(Fe,"[]"),Je)});return}cn.append(Fe,Xe)}),Jt.file instanceof Blob?cn.append(Jt.filename,Jt.file,Jt.file.name):cn.append(Jt.filename,Jt.file),nn.onerror=function(Xe){Jt.onError(Xe)},nn.onload=function(){return nn.status<200||nn.status>=300?Jt.onError(se(Jt,nn),Xt(nn)):Jt.onSuccess(Xt(nn),nn)},nn.open(Jt.method,Jt.action,!0),Jt.withCredentials&&"withCredentials"in nn&&(nn.withCredentials=!0);var Ne=Jt.headers||{};return Ne["X-Requested-With"]!==null&&nn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Ne).forEach(function(Fe){Ne[Fe]!==null&&nn.setRequestHeader(Fe,Ne[Fe])}),nn.send(cn),{abort:function(){nn.abort()}}}var Qt=function(){var Jt=(0,Ht.Z)((0,Kt.Z)().mark(function nn(cn,Ne){var Fe,Xe,Je,vn,li,jn,vi,$i;return(0,Kt.Z)().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:jn=function(){return jn=(0,Ht.Z)((0,Kt.Z)().mark(function Ri(Ii){return(0,Kt.Z)().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.abrupt("return",new Promise(function(We){Ii.file(function(mn){Ne(mn)?(Ii.fullPath&&!mn.webkitRelativePath&&(Object.defineProperties(mn,{webkitRelativePath:{writable:!0}}),mn.webkitRelativePath=Ii.fullPath.replace(/^\//,""),Object.defineProperties(mn,{webkitRelativePath:{writable:!1}})),We(mn)):We(null)})}));case 1:case"end":return Qe.stop()}},Ri)})),jn.apply(this,arguments)},li=function(Ri){return jn.apply(this,arguments)},vn=function(){return vn=(0,Ht.Z)((0,Kt.Z)().mark(function Ri(Ii){var an,Qe,We,mn,fn;return(0,Kt.Z)().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:an=Ii.createReader(),Qe=[];case 2:return $e.next=5,new Promise(function(Si){an.readEntries(Si,function(){return Si([])})});case 5:if(We=$e.sent,mn=We.length,mn){$e.next=9;break}return $e.abrupt("break",12);case 9:for(fn=0;fn<mn;fn++)Qe.push(We[fn]);$e.next=2;break;case 12:return $e.abrupt("return",Qe);case 13:case"end":return $e.stop()}},Ri)})),vn.apply(this,arguments)},Je=function(Ri){return vn.apply(this,arguments)},Fe=[],Xe=[],cn.forEach(function(zi){return Xe.push(zi.webkitGetAsEntry())}),vi=function(){var zi=(0,Ht.Z)((0,Kt.Z)().mark(function Ri(Ii,an){var Qe,We;return(0,Kt.Z)().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(Ii){fn.next=2;break}return fn.abrupt("return");case 2:if(Ii.path=an||"",!Ii.isFile){fn.next=10;break}return fn.next=6,li(Ii);case 6:Qe=fn.sent,Qe&&Fe.push(Qe),fn.next=15;break;case 10:if(!Ii.isDirectory){fn.next=15;break}return fn.next=13,Je(Ii);case 13:We=fn.sent,Xe.push.apply(Xe,(0,Dt.Z)(We));case 15:case"end":return fn.stop()}},Ri)}));return function(Ii,an){return zi.apply(this,arguments)}}(),$i=0;case 9:if(!($i<Xe.length)){yn.next=15;break}return yn.next=12,vi(Xe[$i]);case 12:$i++,yn.next=9;break;case 15:return yn.abrupt("return",Fe);case 16:case"end":return yn.stop()}},nn)}));return function(cn,Ne){return Jt.apply(this,arguments)}}(),Se=Qt,be=+new Date,Le=0;function en(){return"rc-upload-".concat(be,"-").concat(++Le)}var ie=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Re=function(Jt){(0,Nt.Z)(cn,Jt);var nn=(0,Oe.Z)(cn);function cn(){var Ne;(0,Vt.Z)(this,cn);for(var Fe=arguments.length,Xe=new Array(Fe),Je=0;Je<Fe;Je++)Xe[Je]=arguments[Je];return Ne=nn.call.apply(nn,[this].concat(Xe)),(0,jt.Z)((0,Yt.Z)(Ne),"state",{uid:en()}),(0,jt.Z)((0,Yt.Z)(Ne),"reqs",{}),(0,jt.Z)((0,Yt.Z)(Ne),"fileInput",void 0),(0,jt.Z)((0,Yt.Z)(Ne),"_isMounted",void 0),(0,jt.Z)((0,Yt.Z)(Ne),"onChange",function(vn){var li=Ne.props,jn=li.accept,vi=li.directory,$i=vn.target.files,Ji=(0,Dt.Z)($i).filter(function(yn){return!vi||je(yn,jn)});Ne.uploadFiles(Ji),Ne.reset()}),(0,jt.Z)((0,Yt.Z)(Ne),"onClick",function(vn){var li=Ne.fileInput;if(li){var jn=vn.target,vi=Ne.props.onClick;if(jn&&jn.tagName==="BUTTON"){var $i=li.parentNode;$i.focus(),jn.blur()}li.click(),vi&&vi(vn)}}),(0,jt.Z)((0,Yt.Z)(Ne),"onKeyDown",function(vn){vn.key==="Enter"&&Ne.onClick(vn)}),(0,jt.Z)((0,Yt.Z)(Ne),"onFileDrop",function(){var vn=(0,Ht.Z)((0,Kt.Z)().mark(function li(jn){var vi,$i,Ji;return(0,Kt.Z)().wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:if(vi=Ne.props.multiple,jn.preventDefault(),jn.type!=="dragover"){zi.next=4;break}return zi.abrupt("return");case 4:if(!Ne.props.directory){zi.next=11;break}return zi.next=7,Se(Array.prototype.slice.call(jn.dataTransfer.items),function(Ri){return je(Ri,Ne.props.accept)});case 7:$i=zi.sent,Ne.uploadFiles($i),zi.next=14;break;case 11:Ji=(0,Dt.Z)(jn.dataTransfer.files).filter(function(Ri){return je(Ri,Ne.props.accept)}),vi===!1&&(Ji=Ji.slice(0,1)),Ne.uploadFiles(Ji);case 14:case"end":return zi.stop()}},li)}));return function(li){return vn.apply(this,arguments)}}()),(0,jt.Z)((0,Yt.Z)(Ne),"uploadFiles",function(vn){var li=(0,Dt.Z)(vn),jn=li.map(function(vi){return vi.uid=en(),Ne.processFile(vi,li)});Promise.all(jn).then(function(vi){var $i=Ne.props.onBatchStart;$i==null||$i(vi.map(function(Ji){var yn=Ji.origin,zi=Ji.parsedFile;return{file:yn,parsedFile:zi}})),vi.filter(function(Ji){return Ji.parsedFile!==null}).forEach(function(Ji){Ne.post(Ji)})})}),(0,jt.Z)((0,Yt.Z)(Ne),"processFile",function(){var vn=(0,Ht.Z)((0,Kt.Z)().mark(function li(jn,vi){var $i,Ji,yn,zi,Ri,Ii,an,Qe,We;return(0,Kt.Z)().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if($i=Ne.props.beforeUpload,Ji=jn,!$i){fn.next=14;break}return fn.prev=3,fn.next=6,$i(jn,vi);case 6:Ji=fn.sent,fn.next=12;break;case 9:fn.prev=9,fn.t0=fn.catch(3),Ji=!1;case 12:if(Ji!==!1){fn.next=14;break}return fn.abrupt("return",{origin:jn,parsedFile:null,action:null,data:null});case 14:if(yn=Ne.props.action,typeof yn!="function"){fn.next=21;break}return fn.next=18,yn(jn);case 18:zi=fn.sent,fn.next=22;break;case 21:zi=yn;case 22:if(Ri=Ne.props.data,typeof Ri!="function"){fn.next=29;break}return fn.next=26,Ri(jn);case 26:Ii=fn.sent,fn.next=30;break;case 29:Ii=Ri;case 30:return an=((0,ee.Z)(Ji)==="object"||typeof Ji=="string")&&Ji?Ji:jn,an instanceof File?Qe=an:Qe=new File([an],jn.name,{type:jn.type}),We=Qe,We.uid=jn.uid,fn.abrupt("return",{origin:jn,data:Ii,parsedFile:We,action:zi});case 35:case"end":return fn.stop()}},li,null,[[3,9]])}));return function(li,jn){return vn.apply(this,arguments)}}()),(0,jt.Z)((0,Yt.Z)(Ne),"saveFileInput",function(vn){Ne.fileInput=vn}),Ne}return(0,me.Z)(cn,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Fe){var Xe=this,Je=Fe.data,vn=Fe.origin,li=Fe.action,jn=Fe.parsedFile;if(this._isMounted){var vi=this.props,$i=vi.onStart,Ji=vi.customRequest,yn=vi.name,zi=vi.headers,Ri=vi.withCredentials,Ii=vi.method,an=vn.uid,Qe=Ji||ve,We={action:li,filename:yn,data:Je,file:jn,headers:zi,withCredentials:Ri,method:Ii||"post",onProgress:function(fn){var Wn=Xe.props.onProgress;Wn==null||Wn(fn,jn)},onSuccess:function(fn,Wn){var $e=Xe.props.onSuccess;$e==null||$e(fn,jn,Wn),delete Xe.reqs[an]},onError:function(fn,Wn){var $e=Xe.props.onError;$e==null||$e(fn,Wn,jn),delete Xe.reqs[an]}};$i(vn),this.reqs[an]=Qe(We)}}},{key:"reset",value:function(){this.setState({uid:en()})}},{key:"abort",value:function(Fe){var Xe=this.reqs;if(Fe){var Je=Fe.uid?Fe.uid:Fe;Xe[Je]&&Xe[Je].abort&&Xe[Je].abort(),delete Xe[Je]}else Object.keys(Xe).forEach(function(vn){Xe[vn]&&Xe[vn].abort&&Xe[vn].abort(),delete Xe[vn]})}},{key:"render",value:function(){var Fe=this.props,Xe=Fe.component,Je=Fe.prefixCls,vn=Fe.className,li=Fe.classNames,jn=li===void 0?{}:li,vi=Fe.disabled,$i=Fe.id,Ji=Fe.name,yn=Fe.style,zi=Fe.styles,Ri=zi===void 0?{}:zi,Ii=Fe.multiple,an=Fe.accept,Qe=Fe.capture,We=Fe.children,mn=Fe.directory,fn=Fe.openFileDialogOnClick,Wn=Fe.onMouseEnter,$e=Fe.onMouseLeave,Si=Fe.hasControlInside,pn=(0,ce.Z)(Fe,ie),wi=_t()((0,jt.Z)((0,jt.Z)((0,jt.Z)({},Je,!0),"".concat(Je,"-disabled"),vi),vn,vn)),Wi=mn?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Ui=vi?{}:{onClick:fn?this.onClick:function(){},onKeyDown:fn?this.onKeyDown:function(){},onMouseEnter:Wn,onMouseLeave:$e,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Si?void 0:"0"};return lt.createElement(Xe,(0,Gt.Z)({},Ui,{className:wi,role:Si?void 0:"button",style:yn}),lt.createElement("input",(0,Gt.Z)({},(0,de.Z)(pn,{aria:!0,data:!0}),{id:$i,name:Ji,disabled:vi,type:"file",ref:this.saveFileInput,onClick:function(Ki){return Ki.stopPropagation()},key:this.state.uid,style:(0,Me.Z)({display:"none"},Ri.input),className:jn.input,accept:an},Wi,{multiple:Ii,onChange:this.onChange},Qe!=null?{capture:Qe}:{})),We)}}]),cn}(lt.Component),De=Re;function Tt(){}var rn=function(Jt){(0,Nt.Z)(cn,Jt);var nn=(0,Oe.Z)(cn);function cn(){var Ne;(0,Vt.Z)(this,cn);for(var Fe=arguments.length,Xe=new Array(Fe),Je=0;Je<Fe;Je++)Xe[Je]=arguments[Je];return Ne=nn.call.apply(nn,[this].concat(Xe)),(0,jt.Z)((0,Yt.Z)(Ne),"uploader",void 0),(0,jt.Z)((0,Yt.Z)(Ne),"saveUploader",function(vn){Ne.uploader=vn}),Ne}return(0,me.Z)(cn,[{key:"abort",value:function(Fe){this.uploader.abort(Fe)}},{key:"render",value:function(){return lt.createElement(De,(0,Gt.Z)({},this.props,{ref:this.saveUploader}))}}]),cn}(lt.Component);(0,jt.Z)(rn,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Tt,onError:Tt,onSuccess:Tt,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var we=rn,Ue=we,On=dt(18929),zt=dt(48755),kt=dt(2171),Ye=dt(9017),wn=dt(85981),on=dt(63356),$t=dt(34961),Ee=dt(16931),Be=dt(51636),Cn=dt(36237),gn=Jt=>{const{componentCls:nn,iconCls:cn}=Jt;return{[`${nn}-wrapper`]:{[`${nn}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:Jt.colorFillAlter,border:`${(0,Cn.unit)(Jt.lineWidth)} dashed ${Jt.colorBorder}`,borderRadius:Jt.borderRadiusLG,cursor:"pointer",transition:`border-color ${Jt.motionDurationSlow}`,[nn]:{padding:Jt.padding},[`${nn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:Jt.borderRadiusLG,"&:focus-visible":{outline:`${(0,Cn.unit)(Jt.lineWidthFocus)} solid ${Jt.colorPrimaryBorder}`}},[`${nn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
|
&:not(${nn}-disabled):hover,
|
|
|
&-hover:not(${nn}-disabled)
|
|
|
`]:{borderColor:Jt.colorPrimaryHover},[`p${nn}-drag-icon`]:{marginBottom:Jt.margin,[cn]:{color:Jt.colorPrimary,fontSize:Jt.uploadThumbnailSize}},[`p${nn}-text`]:{margin:`0 0 ${(0,Cn.unit)(Jt.marginXXS)}`,color:Jt.colorTextHeading,fontSize:Jt.fontSizeLG},[`p${nn}-hint`]:{color:Jt.colorTextDescription,fontSize:Jt.fontSize},[`&${nn}-disabled`]:{[`p${nn}-drag-icon ${cn},
|
|
|
p${nn}-text,
|
|
|
p${nn}-hint
|
|
|
`]:{color:Jt.colorTextDisabled}}}}}},Dn=Jt=>{const{componentCls:nn,iconCls:cn,fontSize:Ne,lineHeight:Fe,calc:Xe}=Jt,Je=`${nn}-list-item`,vn=`${Je}-actions`,li=`${Je}-action`;return{[`${nn}-wrapper`]:{[`${nn}-list`]:Object.assign(Object.assign({},(0,on.dF)()),{lineHeight:Jt.lineHeight,[Je]:{position:"relative",height:Xe(Jt.lineHeight).mul(Ne).equal(),marginTop:Jt.marginXS,fontSize:Ne,display:"flex",alignItems:"center",transition:`background-color ${Jt.motionDurationSlow}`,borderRadius:Jt.borderRadiusSM,"&:hover":{backgroundColor:Jt.controlItemBgHover},[`${Je}-name`]:Object.assign(Object.assign({},on.vS),{padding:`0 ${(0,Cn.unit)(Jt.paddingXS)}`,lineHeight:Fe,flex:"auto",transition:`all ${Jt.motionDurationSlow}`}),[vn]:{whiteSpace:"nowrap",[li]:{opacity:0},[cn]:{color:Jt.actionsColor,transition:`all ${Jt.motionDurationSlow}`},[`
|
|
|
${li}:focus-visible,
|
|
|
&.picture ${li}
|
|
|
`]:{opacity:1}},[`${nn}-icon ${cn}`]:{color:Jt.colorTextDescription,fontSize:Ne},[`${Je}-progress`]:{position:"absolute",bottom:Jt.calc(Jt.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:Xe(Ne).add(Jt.paddingXS).equal(),fontSize:Ne,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Je}:hover ${li}`]:{opacity:1},[`${Je}-error`]:{color:Jt.colorError,[`${Je}-name, ${nn}-icon ${cn}`]:{color:Jt.colorError},[vn]:{[`${cn}, ${cn}:hover`]:{color:Jt.colorError},[li]:{opacity:1}}},[`${nn}-list-item-container`]:{transition:`opacity ${Jt.motionDurationSlow}, height ${Jt.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},ln=dt(99495),gt=Jt=>{const{componentCls:nn}=Jt,cn=new Cn.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:Jt.calc(Jt.marginXS).div(-2).equal()}}),Ne=new Cn.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:Jt.calc(Jt.marginXS).div(-2).equal()}}),Fe=`${nn}-animate-inline`;return[{[`${nn}-wrapper`]:{[`${Fe}-appear, ${Fe}-enter, ${Fe}-leave`]:{animationDuration:Jt.motionDurationSlow,animationTimingFunction:Jt.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Fe}-appear, ${Fe}-enter`]:{animationName:cn},[`${Fe}-leave`]:{animationName:Ne}}},{[`${nn}-wrapper`]:(0,ln.J$)(Jt)},cn,Ne]},pt=dt(68361);const Ct=Jt=>{const{componentCls:nn,iconCls:cn,uploadThumbnailSize:Ne,uploadProgressOffset:Fe,calc:Xe}=Jt,Je=`${nn}-list`,vn=`${Je}-item`;return{[`${nn}-wrapper`]:{[`
|
|
|
${Je}${Je}-picture,
|
|
|
${Je}${Je}-picture-card,
|
|
|
${Je}${Je}-picture-circle
|
|
|
`]:{[vn]:{position:"relative",height:Xe(Ne).add(Xe(Jt.lineWidth).mul(2)).add(Xe(Jt.paddingXS).mul(2)).equal(),padding:Jt.paddingXS,border:`${(0,Cn.unit)(Jt.lineWidth)} ${Jt.lineType} ${Jt.colorBorder}`,borderRadius:Jt.borderRadiusLG,"&:hover":{background:"transparent"},[`${vn}-thumbnail`]:Object.assign(Object.assign({},on.vS),{width:Ne,height:Ne,lineHeight:(0,Cn.unit)(Xe(Ne).add(Jt.paddingSM).equal()),textAlign:"center",flex:"none",[cn]:{fontSize:Jt.fontSizeHeading2,color:Jt.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${vn}-progress`]:{bottom:Fe,width:`calc(100% - ${(0,Cn.unit)(Xe(Jt.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:Xe(Ne).add(Jt.paddingXS).equal()}},[`${vn}-error`]:{borderColor:Jt.colorError,[`${vn}-thumbnail ${cn}`]:{[`svg path[fill='${pt.blue[0]}']`]:{fill:Jt.colorErrorBg},[`svg path[fill='${pt.blue.primary}']`]:{fill:Jt.colorError}}},[`${vn}-uploading`]:{borderStyle:"dashed",[`${vn}-name`]:{marginBottom:Fe}}},[`${Je}${Je}-picture-circle ${vn}`]:{[`&, &::before, ${vn}-thumbnail`]:{borderRadius:"50%"}}}}},Pt=Jt=>{const{componentCls:nn,iconCls:cn,fontSizeLG:Ne,colorTextLightSolid:Fe,calc:Xe}=Jt,Je=`${nn}-list`,vn=`${Je}-item`,li=Jt.uploadPicCardSize;return{[`
|
|
|
${nn}-wrapper${nn}-picture-card-wrapper,
|
|
|
${nn}-wrapper${nn}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,on.dF)()),{display:"block",[`${nn}${nn}-select`]:{width:li,height:li,textAlign:"center",verticalAlign:"top",backgroundColor:Jt.colorFillAlter,border:`${(0,Cn.unit)(Jt.lineWidth)} dashed ${Jt.colorBorder}`,borderRadius:Jt.borderRadiusLG,cursor:"pointer",transition:`border-color ${Jt.motionDurationSlow}`,[`> ${nn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${nn}-disabled):hover`]:{borderColor:Jt.colorPrimary}},[`${Je}${Je}-picture-card, ${Je}${Je}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:Jt.marginXS,marginInlineEnd:Jt.marginXS}},"@supports (gap: 1px)":{gap:Jt.marginXS},[`${Je}-item-container`]:{display:"inline-block",width:li,height:li,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[vn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,Cn.unit)(Xe(Jt.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,Cn.unit)(Xe(Jt.paddingXS).mul(2).equal())})`,backgroundColor:Jt.colorBgMask,opacity:0,transition:`all ${Jt.motionDurationSlow}`,content:'" "'}},[`${vn}:hover`]:{[`&::before, ${vn}-actions`]:{opacity:1}},[`${vn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${Jt.motionDurationSlow}`,[`
|
|
|
${cn}-eye,
|
|
|
${cn}-download,
|
|
|
${cn}-delete
|
|
|
`]:{zIndex:10,width:Ne,margin:`0 ${(0,Cn.unit)(Jt.marginXXS)}`,fontSize:Ne,cursor:"pointer",transition:`all ${Jt.motionDurationSlow}`,color:Fe,"&:hover":{color:Fe},svg:{verticalAlign:"baseline"}}},[`${vn}-thumbnail, ${vn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${vn}-name`]:{display:"none",textAlign:"center"},[`${vn}-file + ${vn}-name`]:{position:"absolute",bottom:Jt.margin,display:"block",width:`calc(100% - ${(0,Cn.unit)(Xe(Jt.paddingXS).mul(2).equal())})`},[`${vn}-uploading`]:{[`&${vn}`]:{backgroundColor:Jt.colorFillAlter},[`&::before, ${cn}-eye, ${cn}-download, ${cn}-delete`]:{display:"none"}},[`${vn}-progress`]:{bottom:Jt.marginXL,width:`calc(100% - ${(0,Cn.unit)(Xe(Jt.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${nn}-wrapper${nn}-picture-circle-wrapper`]:{[`${nn}${nn}-select`]:{borderRadius:"50%"}}}};var Et=Jt=>{const{componentCls:nn}=Jt;return{[`${nn}-rtl`]:{direction:"rtl"}}};const Zt=Jt=>{const{componentCls:nn,colorTextDisabled:cn}=Jt;return{[`${nn}-wrapper`]:Object.assign(Object.assign({},(0,on.Wf)(Jt)),{[nn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${nn}-select`]:{display:"inline-block"},[`${nn}-hidden`]:{display:"none"},[`${nn}-disabled`]:{color:cn,cursor:"not-allowed"}})}},Ve=Jt=>({actionsColor:Jt.colorTextDescription});var ue=(0,Ee.I$)("Upload",Jt=>{const{fontSizeHeading3:nn,fontHeight:cn,lineWidth:Ne,controlHeightLG:Fe,calc:Xe}=Jt,Je=(0,Be.mergeToken)(Jt,{uploadThumbnailSize:Xe(nn).mul(2).equal(),uploadProgressOffset:Xe(Xe(cn).div(2)).add(Ne).equal(),uploadPicCardSize:Xe(Fe).mul(2.55).equal()});return[Zt(Je),gn(Je),Ct(Je),Pt(Je),Dn(Je),gt(Je),Et(Je),(0,$t.Z)(Je)]},Ve),re={icon:function(nn,cn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:cn}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:nn}}]}},name:"file",theme:"twotone"},Ce=re,Te=dt(7657),tn=function(nn,cn){return lt.createElement(Te.Z,(0,Gt.Z)({},nn,{ref:cn,icon:Ce}))},te=lt.forwardRef(tn),le=te,bn=dt(58617),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Rn=Sn,In=function(nn,cn){return lt.createElement(Te.Z,(0,Gt.Z)({},nn,{ref:cn,icon:Rn}))},sn=lt.forwardRef(In),Hn=sn,Mn={icon:function(nn,cn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:nn}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:cn}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:cn}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:cn}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:nn}}]}},name:"picture",theme:"twotone"},ye=Mn,Ze=function(nn,cn){return lt.createElement(Te.Z,(0,Gt.Z)({},nn,{ref:cn,icon:ye}))},En=lt.forwardRef(Ze),An=En,he=dt(77900),Ke=dt(2738),hn=dt(40192),Pn=dt(86641),_n=dt(22703),ci=dt(7939);function yi(Jt){return Object.assign(Object.assign({},Jt),{lastModified:Jt.lastModified,lastModifiedDate:Jt.lastModifiedDate,name:Jt.name,size:Jt.size,type:Jt.type,uid:Jt.uid,percent:0,originFileObj:Jt})}function Ni(Jt,nn){const cn=(0,Dt.Z)(nn),Ne=cn.findIndex(Fe=>{let{uid:Xe}=Fe;return Xe===Jt.uid});return Ne===-1?cn.push(Jt):cn[Ne]=Jt,cn}function ri(Jt,nn){const cn=Jt.uid!==void 0?"uid":"name";return nn.filter(Ne=>Ne[cn]===Jt[cn])[0]}function yt(Jt,nn){const cn=Jt.uid!==void 0?"uid":"name",Ne=nn.filter(Fe=>Fe[cn]!==Jt[cn]);return Ne.length===nn.length?null:Ne}const Tn=function(){const nn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Ne=nn[nn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Ne)||[""])[0]},xn=Jt=>Jt.indexOf("image/")===0,Bn=Jt=>{if(Jt.type&&!Jt.thumbUrl)return xn(Jt.type);const nn=Jt.thumbUrl||Jt.url||"",cn=Tn(nn);return/^data:image\//.test(nn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(cn)?!0:!(/^data:/.test(nn)||cn)},Zn=200;function Nn(Jt){return new Promise(nn=>{if(!Jt.type||!xn(Jt.type)){nn("");return}const cn=document.createElement("canvas");cn.width=Zn,cn.height=Zn,cn.style.cssText=`position: fixed; left: 0; top: 0; width: ${Zn}px; height: ${Zn}px; z-index: 9999; display: none;`,document.body.appendChild(cn);const Ne=cn.getContext("2d"),Fe=new Image;if(Fe.onload=()=>{const{width:Xe,height:Je}=Fe;let vn=Zn,li=Zn,jn=0,vi=0;Xe>Je?(li=Je*(Zn/Xe),vi=-(li-vn)/2):(vn=Xe*(Zn/Je),jn=-(vn-li)/2),Ne.drawImage(Fe,jn,vi,vn,li);const $i=cn.toDataURL();document.body.removeChild(cn),window.URL.revokeObjectURL(Fe.src),nn($i)},Fe.crossOrigin="anonymous",Jt.type.startsWith("image/svg+xml")){const Xe=new FileReader;Xe.onload=()=>{Xe.result&&typeof Xe.result=="string"&&(Fe.src=Xe.result)},Xe.readAsDataURL(Jt)}else if(Jt.type.startsWith("image/gif")){const Xe=new FileReader;Xe.onload=()=>{Xe.result&&nn(Xe.result)},Xe.readAsDataURL(Jt)}else Fe.src=window.URL.createObjectURL(Jt)})}var Ln=dt(26227),ii=dt(41464),Qn=dt(15277),xi=dt(89787),Xn=dt(25399),Hi=lt.forwardRef((Jt,nn)=>{let{prefixCls:cn,className:Ne,style:Fe,locale:Xe,listType:Je,file:vn,items:li,progress:jn,iconRender:vi,actionIconRender:$i,itemRender:Ji,isImgUrl:yn,showPreviewIcon:zi,showRemoveIcon:Ri,showDownloadIcon:Ii,previewIcon:an,removeIcon:Qe,downloadIcon:We,extra:mn,onPreview:fn,onDownload:Wn,onClose:$e}=Jt;var Si,pn;const{status:wi}=vn,[Wi,Ui]=lt.useState(wi);lt.useEffect(()=>{wi!=="removed"&&Ui(wi)},[wi]);const[Vi,Ki]=lt.useState(!1);lt.useEffect(()=>{const ni=setTimeout(()=>{Ki(!0)},300);return()=>{clearTimeout(ni)}},[]);const Oi=vi(vn);let qi=lt.createElement("div",{className:`${cn}-icon`},Oi);if(Je==="picture"||Je==="picture-card"||Je==="picture-circle")if(Wi==="uploading"||!vn.thumbUrl&&!vn.url){const ni=_t()(`${cn}-list-item-thumbnail`,{[`${cn}-list-item-file`]:Wi!=="uploading"});qi=lt.createElement("div",{className:ni},Oi)}else{const ni=yn!=null&&yn(vn)?lt.createElement("img",{src:vn.thumbUrl||vn.url,alt:vn.name,className:`${cn}-list-item-image`,crossOrigin:vn.crossOrigin}):Oi,kn=_t()(`${cn}-list-item-thumbnail`,{[`${cn}-list-item-file`]:yn&&!yn(vn)});qi=lt.createElement("a",{className:kn,onClick:ji=>fn(vn,ji),href:vn.url||vn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ni)}const fr=_t()(`${cn}-list-item`,`${cn}-list-item-${Wi}`),tr=typeof vn.linkProps=="string"?JSON.parse(vn.linkProps):vn.linkProps,ai=(typeof Ri=="function"?Ri(vn):Ri)?$i((typeof Qe=="function"?Qe(vn):Qe)||lt.createElement(Ln.Z,null),()=>$e(vn),cn,Xe.removeFile,!0):null,Lt=(typeof Ii=="function"?Ii(vn):Ii)&&Wi==="done"?$i((typeof We=="function"?We(vn):We)||lt.createElement(ii.Z,null),()=>Wn(vn),cn,Xe.downloadFile):null,ur=Je!=="picture-card"&&Je!=="picture-circle"&<.createElement("span",{key:"download-delete",className:_t()(`${cn}-list-item-actions`,{picture:Je==="picture"})},Lt,ai),Qi=typeof mn=="function"?mn(vn):mn,Yi=Qi&<.createElement("span",{className:`${cn}-list-item-extra`},Qi),nr=_t()(`${cn}-list-item-name`),_i=vn.url?lt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:nr,title:vn.name},tr,{href:vn.url,onClick:ni=>fn(vn,ni)}),vn.name,Yi):lt.createElement("span",{key:"view",className:nr,onClick:ni=>fn(vn,ni),title:vn.name},vn.name,Yi),ui=(typeof zi=="function"?zi(vn):zi)&&(vn.url||vn.thumbUrl)?lt.createElement("a",{href:vn.url||vn.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:ni=>fn(vn,ni),title:Xe.previewFile},typeof an=="function"?an(vn):an||lt.createElement(Qn.Z,null)):null,Ei=(Je==="picture-card"||Je==="picture-circle")&&Wi!=="uploading"&<.createElement("span",{className:`${cn}-list-item-actions`},ui,Wi==="done"&&Lt,ai),{getPrefixCls:Mi}=lt.useContext(zt.E_),Gn=Mi(),gi=lt.createElement("div",{className:fr},qi,_i,ur,Ei,Vi&<.createElement(he.default,{motionName:`${Gn}-fade`,visible:Wi==="uploading",motionDeadline:2e3},ni=>{let{className:kn}=ni;const ji="percent"in vn?lt.createElement(xi.Z,Object.assign({},jn,{type:"line",percent:vn.percent,"aria-label":vn["aria-label"],"aria-labelledby":vn["aria-labelledby"]})):null;return lt.createElement("div",{className:_t()(`${cn}-list-item-progress`,kn)},ji)})),Li=vn.response&&typeof vn.response=="string"?vn.response:((Si=vn.error)===null||Si===void 0?void 0:Si.statusText)||((pn=vn.error)===null||pn===void 0?void 0:pn.message)||Xe.uploadError,pi=Wi==="error"?lt.createElement(Xn.Z,{title:Li,getPopupContainer:ni=>ni.parentNode},gi):gi;return lt.createElement("div",{className:_t()(`${cn}-list-item-container`,Ne),style:Fe,ref:nn},Ji?Ji(pi,vn,li,{download:Wn.bind(null,vn),preview:fn.bind(null,vn),remove:$e.bind(null,vn)}):pi)});const Bi=(Jt,nn)=>{const{listType:cn="text",previewFile:Ne=Nn,onPreview:Fe,onDownload:Xe,onRemove:Je,locale:vn,iconRender:li,isImageUrl:jn=Bn,prefixCls:vi,items:$i=[],showPreviewIcon:Ji=!0,showRemoveIcon:yn=!0,showDownloadIcon:zi=!1,removeIcon:Ri,previewIcon:Ii,downloadIcon:an,extra:Qe,progress:We={size:[-1,2],showInfo:!1},appendAction:mn,appendActionVisible:fn=!0,itemRender:Wn,disabled:$e}=Jt,Si=(0,hn.Z)(),[pn,wi]=lt.useState(!1),Wi=["picture-card","picture-circle"].includes(cn);lt.useEffect(()=>{cn.startsWith("picture")&&($i||[]).forEach(Yi=>{!(Yi.originFileObj instanceof File||Yi.originFileObj instanceof Blob)||Yi.thumbUrl!==void 0||(Yi.thumbUrl="",Ne==null||Ne(Yi.originFileObj).then(nr=>{Yi.thumbUrl=nr||"",Si()}))})},[cn,$i,Ne]),lt.useEffect(()=>{wi(!0)},[]);const Ui=(Yi,nr)=>{if(Fe)return nr==null||nr.preventDefault(),Fe(Yi)},Vi=Yi=>{typeof Xe=="function"?Xe(Yi):Yi.url&&window.open(Yi.url)},Ki=Yi=>{Je==null||Je(Yi)},Oi=Yi=>{if(li)return li(Yi,cn);const nr=Yi.status==="uploading";if(cn.startsWith("picture")){const _i=cn==="picture"?lt.createElement(bn.Z,null):vn.uploading,ui=jn!=null&&jn(Yi)?lt.createElement(An,null):lt.createElement(le,null);return nr?_i:ui}return nr?lt.createElement(bn.Z,null):lt.createElement(Hn,null)},qi=(Yi,nr,_i,ui,Ei)=>{const Mi={type:"text",size:"small",title:ui,onClick:Gn=>{var gi,Li;nr(),lt.isValidElement(Yi)&&((Li=(gi=Yi.props).onClick)===null||Li===void 0||Li.call(gi,Gn))},className:`${_i}-list-item-action`};return Ei&&(Mi.disabled=$e),lt.isValidElement(Yi)?lt.createElement(ci.ZP,Object.assign({},Mi,{icon:(0,_n.Tm)(Yi,Object.assign(Object.assign({},Yi.props),{onClick:()=>{}}))})):lt.createElement(ci.ZP,Object.assign({},Mi),lt.createElement("span",null,Yi))};lt.useImperativeHandle(nn,()=>({handlePreview:Ui,handleDownload:Vi}));const{getPrefixCls:fr}=lt.useContext(zt.E_),tr=fr("upload",vi),ai=fr(),Lt=_t()(`${tr}-list`,`${tr}-list-${cn}`),ur=lt.useMemo(()=>(0,Ke.Z)((0,Pn.Z)(ai),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[ai]),Qi=Object.assign(Object.assign({},Wi?{}:ur),{motionDeadline:2e3,motionName:`${tr}-${Wi?"animate-inline":"animate"}`,keys:(0,Dt.Z)($i.map(Yi=>({key:Yi.uid,file:Yi}))),motionAppear:pn});return lt.createElement("div",{className:Lt},lt.createElement(he.CSSMotionList,Object.assign({},Qi,{component:!1}),Yi=>{let{key:nr,file:_i,className:ui,style:Ei}=Yi;return lt.createElement(Hi,{key:nr,locale:vn,prefixCls:tr,className:ui,style:Ei,file:_i,items:$i,progress:We,listType:cn,isImgUrl:jn,showPreviewIcon:Ji,showRemoveIcon:yn,showDownloadIcon:zi,removeIcon:Ri,previewIcon:Ii,downloadIcon:an,extra:Qe,iconRender:Oi,actionIconRender:qi,itemRender:Wn,onPreview:Ui,onDownload:Vi,onClose:Ki})}),mn&<.createElement(he.default,Object.assign({},Qi,{visible:fn,forceRender:!0}),Yi=>{let{className:nr,style:_i}=Yi;return(0,_n.Tm)(mn,ui=>({className:_t()(ui.className,nr),style:Object.assign(Object.assign(Object.assign({},_i),{pointerEvents:nr?"none":void 0}),ui.style)}))}))};var Jn=lt.forwardRef(Bi),Vn=function(Jt,nn,cn,Ne){function Fe(Xe){return Xe instanceof cn?Xe:new cn(function(Je){Je(Xe)})}return new(cn||(cn=Promise))(function(Xe,Je){function vn(vi){try{jn(Ne.next(vi))}catch($i){Je($i)}}function li(vi){try{jn(Ne.throw(vi))}catch($i){Je($i)}}function jn(vi){vi.done?Xe(vi.value):Fe(vi.value).then(vn,li)}jn((Ne=Ne.apply(Jt,nn||[])).next())})};const oi=`__LIST_IGNORE_${Date.now()}__`,Ti=(Jt,nn)=>{const{fileList:cn,defaultFileList:Ne,onRemove:Fe,showUploadList:Xe=!0,listType:Je="text",onPreview:vn,onDownload:li,onChange:jn,onDrop:vi,previewFile:$i,disabled:Ji,locale:yn,iconRender:zi,isImageUrl:Ri,progress:Ii,prefixCls:an,className:Qe,type:We="select",children:mn,style:fn,itemRender:Wn,maxCount:$e,data:Si={},multiple:pn=!1,hasControlInside:wi=!0,action:Wi="",accept:Ui="",supportServerRender:Vi=!0,rootClassName:Ki}=Jt,Oi=lt.useContext(kt.Z),qi=Ji!=null?Ji:Oi,[fr,tr]=(0,On.Z)(Ne||[],{value:cn,postState:Sr=>Sr!=null?Sr:[]}),[ai,Lt]=lt.useState("drop"),ur=lt.useRef(null),Qi=lt.useRef(null);lt.useMemo(()=>{const Sr=Date.now();(cn||[]).forEach((lo,$r)=>{!lo.uid&&!Object.isFrozen(lo)&&(lo.uid=`__AUTO__${Sr}_${$r}__`)})},[cn]);const Yi=(Sr,lo,$r)=>{let Er=(0,Dt.Z)(lo),oo=!1;$e===1?Er=Er.slice(-1):$e&&(oo=Er.length>$e,Er=Er.slice(0,$e)),(0,It.flushSync)(()=>{tr(Er)});const Xi={file:Sr,fileList:Er};$r&&(Xi.event=$r),(!oo||Sr.status==="removed"||Er.some(vs=>vs.uid===Sr.uid))&&(0,It.flushSync)(()=>{jn==null||jn(Xi)})},nr=(Sr,lo)=>Vn(void 0,void 0,void 0,function*(){const{beforeUpload:$r,transformFile:Er}=Jt;let oo=Sr;if($r){const Xi=yield $r(Sr,lo);if(Xi===!1)return!1;if(delete Sr[oi],Xi===oi)return Object.defineProperty(Sr,oi,{value:!0,configurable:!0}),!1;typeof Xi=="object"&&Xi&&(oo=Xi)}return Er&&(oo=yield Er(oo)),oo}),_i=Sr=>{const lo=Sr.filter(oo=>!oo.file[oi]);if(!lo.length)return;const $r=lo.map(oo=>yi(oo.file));let Er=(0,Dt.Z)(fr);$r.forEach(oo=>{Er=Ni(oo,Er)}),$r.forEach((oo,Xi)=>{let vs=oo;if(lo[Xi].parsedFile)oo.status="uploading";else{const{originFileObj:ws}=oo;let Qo;try{Qo=new File([ws],ws.name,{type:ws.type})}catch(qo){Qo=new Blob([ws],{type:ws.type}),Qo.name=ws.name,Qo.lastModifiedDate=new Date,Qo.lastModified=new Date().getTime()}Qo.uid=oo.uid,vs=Qo}Yi(vs,Er)})},ui=(Sr,lo,$r)=>{try{typeof Sr=="string"&&(Sr=JSON.parse(Sr))}catch(Xi){}if(!ri(lo,fr))return;const Er=yi(lo);Er.status="done",Er.percent=100,Er.response=Sr,Er.xhr=$r;const oo=Ni(Er,fr);Yi(Er,oo)},Ei=(Sr,lo)=>{if(!ri(lo,fr))return;const $r=yi(lo);$r.status="uploading",$r.percent=Sr.percent;const Er=Ni($r,fr);Yi($r,Er,Sr)},Mi=(Sr,lo,$r)=>{if(!ri($r,fr))return;const Er=yi($r);Er.error=Sr,Er.response=lo,Er.status="error";const oo=Ni(Er,fr);Yi(Er,oo)},Gn=Sr=>{let lo;Promise.resolve(typeof Fe=="function"?Fe(Sr):Fe).then($r=>{var Er;if($r===!1)return;const oo=yt(Sr,fr);oo&&(lo=Object.assign(Object.assign({},Sr),{status:"removed"}),fr==null||fr.forEach(Xi=>{const vs=lo.uid!==void 0?"uid":"name";Xi[vs]===lo[vs]&&!Object.isFrozen(Xi)&&(Xi.status="removed")}),(Er=ur.current)===null||Er===void 0||Er.abort(lo),Yi(lo,oo))})},gi=Sr=>{Lt(Sr.type),Sr.type==="drop"&&(vi==null||vi(Sr))};lt.useImperativeHandle(nn,()=>({onBatchStart:_i,onSuccess:ui,onProgress:Ei,onError:Mi,fileList:fr,upload:ur.current,nativeElement:Qi.current}));const{getPrefixCls:Li,direction:pi,upload:ni}=lt.useContext(zt.E_),kn=Li("upload",an),ji=Object.assign(Object.assign({onBatchStart:_i,onError:Mi,onProgress:Ei,onSuccess:ui},Jt),{data:Si,multiple:pn,action:Wi,accept:Ui,supportServerRender:Vi,prefixCls:kn,disabled:qi,beforeUpload:nr,onChange:void 0,hasControlInside:wi});delete ji.className,delete ji.style,(!mn||qi)&&delete ji.id;const br=`${kn}-wrapper`,[Dr,Or,Vr]=ue(kn,br),[Gr]=(0,Ye.Z)("Upload",wn.Z.Upload),{showRemoveIcon:Ur,showPreviewIcon:ro,showDownloadIcon:Kr,removeIcon:uo,previewIcon:un,downloadIcon:So,extra:Io}=typeof Xe=="boolean"?{}:Xe,ho=typeof Ur=="undefined"?!qi:Ur,to=(Sr,lo)=>Xe?lt.createElement(Jn,{prefixCls:kn,listType:Je,items:fr,previewFile:$i,onPreview:vn,onDownload:li,onRemove:Gn,showRemoveIcon:ho,showPreviewIcon:ro,showDownloadIcon:Kr,removeIcon:uo,previewIcon:un,downloadIcon:So,iconRender:zi,extra:Io,locale:Object.assign(Object.assign({},Gr),yn),isImageUrl:Ri,progress:Ii,appendAction:Sr,appendActionVisible:lo,itemRender:Wn,disabled:qi}):Sr,wr=_t()(br,Qe,Ki,Or,Vr,ni==null?void 0:ni.className,{[`${kn}-rtl`]:pi==="rtl",[`${kn}-picture-card-wrapper`]:Je==="picture-card",[`${kn}-picture-circle-wrapper`]:Je==="picture-circle"}),Cr=Object.assign(Object.assign({},ni==null?void 0:ni.style),fn);if(We==="drag"){const Sr=_t()(Or,kn,`${kn}-drag`,{[`${kn}-drag-uploading`]:fr.some(lo=>lo.status==="uploading"),[`${kn}-drag-hover`]:ai==="dragover",[`${kn}-disabled`]:qi,[`${kn}-rtl`]:pi==="rtl"});return Dr(lt.createElement("span",{className:wr,ref:Qi},lt.createElement("div",{className:Sr,style:Cr,onDrop:gi,onDragOver:gi,onDragLeave:gi},lt.createElement(Ue,Object.assign({},ji,{ref:ur,className:`${kn}-btn`}),lt.createElement("div",{className:`${kn}-drag-container`},mn))),to()))}const bo=_t()(kn,`${kn}-select`,{[`${kn}-disabled`]:qi,[`${kn}-hidden`]:!mn}),Ar=lt.createElement("div",{className:bo},lt.createElement(Ue,Object.assign({},ji,{ref:ur})));return Dr(Je==="picture-card"||Je==="picture-circle"?lt.createElement("span",{className:wr,ref:Qi},to(Ar,!!mn)):lt.createElement("span",{className:wr,ref:Qi},Ar,to()))};var Rt=lt.forwardRef(Ti),Pe=function(Jt,nn){var cn={};for(var Ne in Jt)Object.prototype.hasOwnProperty.call(Jt,Ne)&&nn.indexOf(Ne)<0&&(cn[Ne]=Jt[Ne]);if(Jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Ne=Object.getOwnPropertySymbols(Jt);Fe<Ne.length;Fe++)nn.indexOf(Ne[Fe])<0&&Object.prototype.propertyIsEnumerable.call(Jt,Ne[Fe])&&(cn[Ne[Fe]]=Jt[Ne[Fe]]);return cn},He=lt.forwardRef((Jt,nn)=>{var{style:cn,height:Ne,hasControlInside:Fe=!1}=Jt,Xe=Pe(Jt,["style","height","hasControlInside"]);return lt.createElement(Rt,Object.assign({ref:nn,hasControlInside:Fe},Xe,{type:"drag",style:Object.assign(Object.assign({},cn),{height:Ne})}))});const ae=Rt;ae.Dragger=He,ae.LIST_IGNORE=oi;var ze=ae},14625:function(Yn){function qe(lt){var Dt,It,xe="";if(typeof lt=="string"||typeof lt=="number")xe+=lt;else if(typeof lt=="object")if(Array.isArray(lt)){var _t=lt.length;for(Dt=0;Dt<_t;Dt++)lt[Dt]&&(It=qe(lt[Dt]))&&(xe&&(xe+=" "),xe+=It)}else for(It in lt)lt[It]&&(xe&&(xe+=" "),xe+=It);return xe}function dt(){for(var lt,Dt,It=0,xe="",_t=arguments.length;It<_t;It++)(lt=arguments[It])&&(Dt=qe(lt))&&(xe&&(xe+=" "),xe+=Dt);return xe}Yn.exports=dt,Yn.exports.clsx=dt},99498:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){lt.defineOption("placeholder","",function(me,Yt,Nt){var Oe=Nt&&Nt!=lt.Init;if(Yt&&!Oe)me.on("blur",_t),me.on("change",Gt),me.on("swapDoc",Gt),lt.on(me.getInputField(),"compositionupdate",me.state.placeholderCompose=function(){xe(me)}),Gt(me);else if(!Yt&&Oe){me.off("blur",_t),me.off("change",Gt),me.off("swapDoc",Gt),lt.off(me.getInputField(),"compositionupdate",me.state.placeholderCompose),Dt(me);var jt=me.getWrapperElement();jt.className=jt.className.replace(" CodeMirror-empty","")}Yt&&!me.hasFocus()&&_t(me)});function Dt(me){me.state.placeholder&&(me.state.placeholder.parentNode.removeChild(me.state.placeholder),me.state.placeholder=null)}function It(me){Dt(me);var Yt=me.state.placeholder=document.createElement("pre");Yt.style.cssText="height: 0; overflow: visible",Yt.style.direction=me.getOption("direction"),Yt.className="CodeMirror-placeholder CodeMirror-line-like";var Nt=me.getOption("placeholder");typeof Nt=="string"&&(Nt=document.createTextNode(Nt)),Yt.appendChild(Nt),me.display.lineSpace.insertBefore(Yt,me.display.lineSpace.firstChild)}function xe(me){setTimeout(function(){var Yt=!1,Nt=me.getInputField();Nt.nodeName=="TEXTAREA"?Yt=!Nt.value:me.lineCount()==1&&(Yt=!/[^\u200b]/.test(Nt.querySelector(".CodeMirror-line").textContent)),Yt?It(me):Dt(me)},20)}function _t(me){Vt(me)&&It(me)}function Gt(me){var Yt=me.getWrapperElement(),Nt=Vt(me);Yt.className=Yt.className.replace(" CodeMirror-empty","")+(Nt?" CodeMirror-empty":""),Nt?It(me):Dt(me)}function Vt(me){return me.lineCount()===1&&me.getLine(0)===""}})},25717:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){var Dt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},It=lt.Pos;lt.defineOption("autoCloseBrackets",!1,function(ee,Kt,Ht){Ht&&Ht!=lt.Init&&(ee.removeKeyMap(_t),ee.state.closeBrackets=null),Kt&&(Gt(xe(Kt,"pairs")),ee.state.closeBrackets=Kt,ee.addKeyMap(_t))});function xe(ee,Kt){return Kt=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[Kt]!=null?ee[Kt]:Dt[Kt]}var _t={Backspace:Yt,Enter:Nt};function Gt(ee){for(var Kt=0;Kt<ee.length;Kt++){var Ht=ee.charAt(Kt),de="'"+Ht+"'";_t[de]||(_t[de]=Vt(Ht))}}Gt(Dt.pairs+"`");function Vt(ee){return function(Kt){return jt(Kt,ee)}}function me(ee){var Kt=ee.state.closeBrackets;if(!Kt||Kt.override)return Kt;var Ht=ee.getModeAt(ee.getCursor());return Ht.closeBrackets||Kt}function Yt(ee){var Kt=me(ee);if(!Kt||ee.getOption("disableInput"))return lt.Pass;for(var Ht=xe(Kt,"pairs"),de=ee.listSelections(),Ae=0;Ae<de.length;Ae++){if(!de[Ae].empty())return lt.Pass;var je=Me(ee,de[Ae].head);if(!je||Ht.indexOf(je)%2!=0)return lt.Pass}for(var Ae=de.length-1;Ae>=0;Ae--){var se=de[Ae].head;ee.replaceRange("",It(se.line,se.ch-1),It(se.line,se.ch+1),"+delete")}}function Nt(ee){var Kt=me(ee),Ht=Kt&&xe(Kt,"explode");if(!Ht||ee.getOption("disableInput"))return lt.Pass;for(var de=ee.listSelections(),Ae=0;Ae<de.length;Ae++){if(!de[Ae].empty())return lt.Pass;var je=Me(ee,de[Ae].head);if(!je||Ht.indexOf(je)%2!=0)return lt.Pass}ee.operation(function(){var se=ee.lineSeparator()||`
|
|
|
`;ee.replaceSelection(se+se,null),ee.execCommand("goCharLeft"),de=ee.listSelections();for(var Xt=0;Xt<de.length;Xt++){var ve=de[Xt].head.line;ee.indentLine(ve,null,!0),ee.indentLine(ve+1,null,!0)}})}function Oe(ee){var Kt=lt.cmpPos(ee.anchor,ee.head)>0;return{anchor:new It(ee.anchor.line,ee.anchor.ch+(Kt?-1:1)),head:new It(ee.head.line,ee.head.ch+(Kt?1:-1))}}function jt(ee,Kt){var Ht=me(ee);if(!Ht||ee.getOption("disableInput"))return lt.Pass;var de=xe(Ht,"pairs"),Ae=de.indexOf(Kt);if(Ae==-1)return lt.Pass;for(var je=xe(Ht,"closeBefore"),se=xe(Ht,"triples"),Xt=de.charAt(Ae+1)==Kt,ve=ee.listSelections(),Qt=Ae%2==0,Se,be=0;be<ve.length;be++){var Le=ve[be],en=Le.head,ie,Re=ee.getRange(en,It(en.line,en.ch+1));if(Qt&&!Le.empty())ie="surround";else if((Xt||!Qt)&&Re==Kt)Xt&&ce(ee,en)?ie="both":se.indexOf(Kt)>=0&&ee.getRange(en,It(en.line,en.ch+3))==Kt+Kt+Kt?ie="skipThree":ie="skip";else if(Xt&&en.ch>1&&se.indexOf(Kt)>=0&&ee.getRange(It(en.line,en.ch-2),en)==Kt+Kt){if(en.ch>2&&/\bstring/.test(ee.getTokenTypeAt(It(en.line,en.ch-2))))return lt.Pass;ie="addFour"}else if(Xt){var De=en.ch==0?" ":ee.getRange(It(en.line,en.ch-1),en);if(!lt.isWordChar(Re)&&De!=Kt&&!lt.isWordChar(De))ie="both";else return lt.Pass}else if(Qt&&(Re.length===0||/\s/.test(Re)||je.indexOf(Re)>-1))ie="both";else return lt.Pass;if(!Se)Se=ie;else if(Se!=ie)return lt.Pass}var Tt=Ae%2?de.charAt(Ae-1):Kt,rn=Ae%2?Kt:de.charAt(Ae+1);ee.operation(function(){if(Se=="skip")ee.execCommand("goCharRight");else if(Se=="skipThree")for(var we=0;we<3;we++)ee.execCommand("goCharRight");else if(Se=="surround"){for(var Ue=ee.getSelections(),we=0;we<Ue.length;we++)Ue[we]=Tt+Ue[we]+rn;ee.replaceSelections(Ue,"around"),Ue=ee.listSelections().slice();for(var we=0;we<Ue.length;we++)Ue[we]=Oe(Ue[we]);ee.setSelections(Ue)}else Se=="both"?(ee.replaceSelection(Tt+rn,null),ee.triggerElectric(Tt+rn),ee.execCommand("goCharLeft")):Se=="addFour"&&(ee.replaceSelection(Tt+Tt+Tt+Tt,"before"),ee.execCommand("goCharRight"))})}function Me(ee,Kt){var Ht=ee.getRange(It(Kt.line,Kt.ch-1),It(Kt.line,Kt.ch+1));return Ht.length==2?Ht:null}function ce(ee,Kt){var Ht=ee.getTokenAt(It(Kt.line,Kt.ch+1));return/\bstring/.test(Ht.type)&&Ht.start==Kt.ch&&(Kt.ch==0||!/\bstring/.test(ee.getTokenTypeAt(Kt)))}})},6313:function(Yn,qe,dt){(function(lt){lt(dt(89780),dt(32855))})(function(lt){lt.defineOption("autoCloseTags",!1,function(Yt,Nt,Oe){if(Oe!=lt.Init&&Oe&&Yt.removeKeyMap("autoCloseTags"),!!Nt){var jt={name:"autoCloseTags"};(typeof Nt!="object"||Nt.whenClosing!==!1)&&(jt["'/'"]=function(Me){return Gt(Me)}),(typeof Nt!="object"||Nt.whenOpening!==!1)&&(jt["'>'"]=function(Me){return xe(Me)}),Yt.addKeyMap(jt)}});var Dt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],It=["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 xe(Yt){if(Yt.getOption("disableInput"))return lt.Pass;for(var Nt=Yt.listSelections(),Oe=[],jt=Yt.getOption("autoCloseTags"),Me=0;Me<Nt.length;Me++){if(!Nt[Me].empty())return lt.Pass;var ce=Nt[Me].head,ee=Yt.getTokenAt(ce),Kt=lt.innerMode(Yt.getMode(),ee.state),Ht=Kt.state,de=Kt.mode.xmlCurrentTag&&Kt.mode.xmlCurrentTag(Ht),Ae=de&&de.name;if(!Ae)return lt.Pass;var je=Kt.mode.configuration=="html",se=typeof jt=="object"&&jt.dontCloseTags||je&&Dt,Xt=typeof jt=="object"&&jt.indentTags||je&&It;ee.end>ce.ch&&(Ae=Ae.slice(0,Ae.length-ee.end+ce.ch));var ve=Ae.toLowerCase();if(!Ae||ee.type=="string"&&(ee.end!=ce.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&de.close||ee.string.indexOf("/")==ce.ch-ee.start-1||se&&Vt(se,ve)>-1||me(Yt,Kt.mode.xmlCurrentContext&&Kt.mode.xmlCurrentContext(Ht)||[],Ae,ce,!0))return lt.Pass;var Qt=typeof jt=="object"&&jt.emptyTags;if(Qt&&Vt(Qt,Ae)>-1){Oe[Me]={text:"/>",newPos:lt.Pos(ce.line,ce.ch+2)};continue}var Se=Xt&&Vt(Xt,ve)>-1;Oe[Me]={indent:Se,text:">"+(Se?`
|
|
|
|
|
|
`:"")+"</"+Ae+">",newPos:Se?lt.Pos(ce.line+1,0):lt.Pos(ce.line,ce.ch+1)}}for(var be=typeof jt=="object"&&jt.dontIndentOnAutoClose,Me=Nt.length-1;Me>=0;Me--){var Le=Oe[Me];Yt.replaceRange(Le.text,Nt[Me].head,Nt[Me].anchor,"+insert");var en=Yt.listSelections().slice(0);en[Me]={head:Le.newPos,anchor:Le.newPos},Yt.setSelections(en),!be&&Le.indent&&(Yt.indentLine(Le.newPos.line,null,!0),Yt.indentLine(Le.newPos.line+1,null,!0))}}function _t(Yt,Nt){for(var Oe=Yt.listSelections(),jt=[],Me=Nt?"/":"</",ce=Yt.getOption("autoCloseTags"),ee=typeof ce=="object"&&ce.dontIndentOnSlash,Kt=0;Kt<Oe.length;Kt++){if(!Oe[Kt].empty())return lt.Pass;var Ht=Oe[Kt].head,de=Yt.getTokenAt(Ht),Ae=lt.innerMode(Yt.getMode(),de.state),je=Ae.state;if(Nt&&(de.type=="string"||de.string.charAt(0)!="<"||de.start!=Ht.ch-1))return lt.Pass;var se,Xt=Ae.mode.name!="xml"&&Yt.getMode().name=="htmlmixed";if(Xt&&Ae.mode.name=="javascript")se=Me+"script";else if(Xt&&Ae.mode.name=="css")se=Me+"style";else{var ve=Ae.mode.xmlCurrentContext&&Ae.mode.xmlCurrentContext(je);if(!ve||ve.length&&me(Yt,ve,ve[ve.length-1],Ht))return lt.Pass;se=Me+ve[ve.length-1]}Yt.getLine(Ht.line).charAt(de.end)!=">"&&(se+=">"),jt[Kt]=se}if(Yt.replaceSelections(jt),Oe=Yt.listSelections(),!ee)for(var Kt=0;Kt<Oe.length;Kt++)(Kt==Oe.length-1||Oe[Kt].head.line<Oe[Kt+1].head.line)&&Yt.indentLine(Oe[Kt].head.line)}function Gt(Yt){return Yt.getOption("disableInput")?lt.Pass:_t(Yt,!0)}lt.commands.closeTag=function(Yt){return _t(Yt)};function Vt(Yt,Nt){if(Yt.indexOf)return Yt.indexOf(Nt);for(var Oe=0,jt=Yt.length;Oe<jt;++Oe)if(Yt[Oe]==Nt)return Oe;return-1}function me(Yt,Nt,Oe,jt,Me){if(!lt.scanForClosingTag)return!1;var ce=Math.min(Yt.lastLine()+1,jt.line+500),ee=lt.scanForClosingTag(Yt,jt,null,ce);if(!ee||ee.tag!=Oe)return!1;for(var Kt=Me?1:0,Ht=Nt.length-1;Ht>=0&&Nt[Ht]==Oe;Ht--)++Kt;jt=ee.to;for(var Ht=1;Ht<Kt;Ht++){var de=lt.scanForClosingTag(Yt,jt,null,ce);if(!de||de.tag!=Oe)return!1;jt=de.to}return!0}})},32855:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){"use strict";var Dt=lt.Pos;function It(Ht,de){return Ht.line-de.line||Ht.ch-de.ch}var xe="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",_t=xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Gt=new RegExp("<(/?)(["+xe+"]["+_t+"]*)","g");function Vt(Ht,de,Ae,je){this.line=de,this.ch=Ae,this.cm=Ht,this.text=Ht.getLine(de),this.min=je?Math.max(je.from,Ht.firstLine()):Ht.firstLine(),this.max=je?Math.min(je.to-1,Ht.lastLine()):Ht.lastLine()}function me(Ht,de){var Ae=Ht.cm.getTokenTypeAt(Dt(Ht.line,de));return Ae&&/\btag\b/.test(Ae)}function Yt(Ht){if(!(Ht.line>=Ht.max))return Ht.ch=0,Ht.text=Ht.cm.getLine(++Ht.line),!0}function Nt(Ht){if(!(Ht.line<=Ht.min))return Ht.text=Ht.cm.getLine(--Ht.line),Ht.ch=Ht.text.length,!0}function Oe(Ht){for(;;){var de=Ht.text.indexOf(">",Ht.ch);if(de==-1){if(Yt(Ht))continue;return}if(!me(Ht,de+1)){Ht.ch=de+1;continue}var Ae=Ht.text.lastIndexOf("/",de),je=Ae>-1&&!/\S/.test(Ht.text.slice(Ae+1,de));return Ht.ch=de+1,je?"selfClose":"regular"}}function jt(Ht){for(;;){var de=Ht.ch?Ht.text.lastIndexOf("<",Ht.ch-1):-1;if(de==-1){if(Nt(Ht))continue;return}if(!me(Ht,de+1)){Ht.ch=de;continue}Gt.lastIndex=de,Ht.ch=de;var Ae=Gt.exec(Ht.text);if(Ae&&Ae.index==de)return Ae}}function Me(Ht){for(;;){Gt.lastIndex=Ht.ch;var de=Gt.exec(Ht.text);if(!de){if(Yt(Ht))continue;return}if(!me(Ht,de.index+1)){Ht.ch=de.index+1;continue}return Ht.ch=de.index+de[0].length,de}}function ce(Ht){for(;;){var de=Ht.ch?Ht.text.lastIndexOf(">",Ht.ch-1):-1;if(de==-1){if(Nt(Ht))continue;return}if(!me(Ht,de+1)){Ht.ch=de;continue}var Ae=Ht.text.lastIndexOf("/",de),je=Ae>-1&&!/\S/.test(Ht.text.slice(Ae+1,de));return Ht.ch=de+1,je?"selfClose":"regular"}}function ee(Ht,de){for(var Ae=[];;){var je=Me(Ht),se,Xt=Ht.line,ve=Ht.ch-(je?je[0].length:0);if(!je||!(se=Oe(Ht)))return;if(se!="selfClose")if(je[1]){for(var Qt=Ae.length-1;Qt>=0;--Qt)if(Ae[Qt]==je[2]){Ae.length=Qt;break}if(Qt<0&&(!de||de==je[2]))return{tag:je[2],from:Dt(Xt,ve),to:Dt(Ht.line,Ht.ch)}}else Ae.push(je[2])}}function Kt(Ht,de){for(var Ae=[];;){var je=ce(Ht);if(!je)return;if(je=="selfClose"){jt(Ht);continue}var se=Ht.line,Xt=Ht.ch,ve=jt(Ht);if(!ve)return;if(ve[1])Ae.push(ve[2]);else{for(var Qt=Ae.length-1;Qt>=0;--Qt)if(Ae[Qt]==ve[2]){Ae.length=Qt;break}if(Qt<0&&(!de||de==ve[2]))return{tag:ve[2],from:Dt(Ht.line,Ht.ch),to:Dt(se,Xt)}}}}lt.registerHelper("fold","xml",function(Ht,de){for(var Ae=new Vt(Ht,de.line,0);;){var je=Me(Ae);if(!je||Ae.line!=de.line)return;var se=Oe(Ae);if(!se)return;if(!je[1]&&se!="selfClose"){var Xt=Dt(Ae.line,Ae.ch),ve=ee(Ae,je[2]);return ve&&It(ve.from,Xt)>0?{from:Xt,to:ve.from}:null}}}),lt.findMatchingTag=function(Ht,de,Ae){var je=new Vt(Ht,de.line,de.ch,Ae);if(!(je.text.indexOf(">")==-1&&je.text.indexOf("<")==-1)){var se=Oe(je),Xt=se&&Dt(je.line,je.ch),ve=se&&jt(je);if(!(!se||!ve||It(je,de)>0)){var Qt={from:Dt(je.line,je.ch),to:Xt,tag:ve[2]};return se=="selfClose"?{open:Qt,close:null,at:"open"}:ve[1]?{open:Kt(je,ve[2]),close:Qt,at:"close"}:(je=new Vt(Ht,Xt.line,Xt.ch,Ae),{open:Qt,close:ee(je,ve[2]),at:"open"})}}},lt.findEnclosingTag=function(Ht,de,Ae,je){for(var se=new Vt(Ht,de.line,de.ch,Ae);;){var Xt=Kt(se,je);if(!Xt)break;var ve=new Vt(Ht,de.line,de.ch,Ae),Qt=ee(ve,Xt.tag);if(Qt)return{open:Xt,close:Qt}}},lt.scanForClosingTag=function(Ht,de,Ae,je){var se=new Vt(Ht,de.line,de.ch,je?{from:0,to:je}:null);return ee(se,Ae)}})},89780:function(Yn){(function(qe,dt){Yn.exports=dt()})(this,function(){"use strict";var qe=navigator.userAgent,dt=navigator.platform,lt=/gecko\/\d/i.test(qe),Dt=/MSIE \d/.test(qe),It=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qe),xe=/Edge\/(\d+)/.exec(qe),_t=Dt||It||xe,Gt=_t&&(Dt?document.documentMode||6:+(xe||It)[1]),Vt=!xe&&/WebKit\//.test(qe),me=Vt&&/Qt\/\d+\.\d+/.test(qe),Yt=!xe&&/Chrome\//.test(qe),Nt=/Opera\//.test(qe),Oe=/Apple Computer/.test(navigator.vendor),jt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qe),Me=/PhantomJS/.test(qe),ce=!xe&&/AppleWebKit/.test(qe)&&/Mobile\/\w+/.test(qe),ee=/Android/.test(qe),Kt=ce||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qe),Ht=ce||/Mac/.test(dt),de=/\bCrOS\b/.test(qe),Ae=/win/i.test(dt),je=Nt&&qe.match(/Version\/(\d*\.\d*)/);je&&(je=Number(je[1])),je&&je>=15&&(Nt=!1,Vt=!0);var se=Ht&&(me||Nt&&(je==null||je<12.11)),Xt=lt||_t&&Gt>=9;function ve(et){return new RegExp("(^|\\s)"+et+"(?:$|\\s)\\s*")}var Qt=function(et,rt){var ut=et.className,at=ve(rt).exec(ut);if(at){var ct=ut.slice(at.index+at[0].length);et.className=ut.slice(0,at.index)+(ct?at[1]+ct:"")}};function Se(et){for(var rt=et.childNodes.length;rt>0;--rt)et.removeChild(et.firstChild);return et}function be(et,rt){return Se(et).appendChild(rt)}function Le(et,rt,ut,at){var ct=document.createElement(et);if(ut&&(ct.className=ut),at&&(ct.style.cssText=at),typeof rt=="string")ct.appendChild(document.createTextNode(rt));else if(rt)for(var wt=0;wt<rt.length;++wt)ct.appendChild(rt[wt]);return ct}function en(et,rt,ut,at){var ct=Le(et,rt,ut,at);return ct.setAttribute("role","presentation"),ct}var ie;document.createRange?ie=function(et,rt,ut,at){var ct=document.createRange();return ct.setEnd(at||et,ut),ct.setStart(et,rt),ct}:ie=function(et,rt,ut){var at=document.body.createTextRange();try{at.moveToElementText(et.parentNode)}catch(ct){return at}return at.collapse(!0),at.moveEnd("character",ut),at.moveStart("character",rt),at};function Re(et,rt){if(rt.nodeType==3&&(rt=rt.parentNode),et.contains)return et.contains(rt);do if(rt.nodeType==11&&(rt=rt.host),rt==et)return!0;while(rt=rt.parentNode)}function De(){var et;try{et=document.activeElement}catch(rt){et=document.body||null}for(;et&&et.shadowRoot&&et.shadowRoot.activeElement;)et=et.shadowRoot.activeElement;return et}function Tt(et,rt){var ut=et.className;ve(rt).test(ut)||(et.className+=(ut?" ":"")+rt)}function rn(et,rt){for(var ut=et.split(" "),at=0;at<ut.length;at++)ut[at]&&!ve(ut[at]).test(rt)&&(rt+=" "+ut[at]);return rt}var we=function(et){et.select()};ce?we=function(et){et.selectionStart=0,et.selectionEnd=et.value.length}:_t&&(we=function(et){try{et.select()}catch(rt){}});function Ue(et){var rt=Array.prototype.slice.call(arguments,1);return function(){return et.apply(null,rt)}}function On(et,rt,ut){rt||(rt={});for(var at in et)et.hasOwnProperty(at)&&(ut!==!1||!rt.hasOwnProperty(at))&&(rt[at]=et[at]);return rt}function zt(et,rt,ut,at,ct){rt==null&&(rt=et.search(/[^\s\u00a0]/),rt==-1&&(rt=et.length));for(var wt=at||0,Mt=ct||0;;){var Bt=et.indexOf(" ",wt);if(Bt<0||Bt>=rt)return Mt+(rt-wt);Mt+=Bt-wt,Mt+=ut-Mt%ut,wt=Bt+1}}var kt=function(){this.id=null,this.f=null,this.time=0,this.handler=Ue(this.onTimeout,this)};kt.prototype.onTimeout=function(et){et.id=0,et.time<=+new Date?et.f():setTimeout(et.handler,et.time-+new Date)},kt.prototype.set=function(et,rt){this.f=rt;var ut=+new Date+et;(!this.id||ut<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,et),this.time=ut)};function Ye(et,rt){for(var ut=0;ut<et.length;++ut)if(et[ut]==rt)return ut;return-1}var wn=50,on={toString:function(){return"CodeMirror.Pass"}},$t={scroll:!1},Ee={origin:"*mouse"},Be={origin:"+move"};function Cn(et,rt,ut){for(var at=0,ct=0;;){var wt=et.indexOf(" ",at);wt==-1&&(wt=et.length);var Mt=wt-at;if(wt==et.length||ct+Mt>=rt)return at+Math.min(Mt,rt-ct);if(ct+=wt-at,ct+=ut-ct%ut,at=wt+1,ct>=rt)return at}}var Ie=[""];function gn(et){for(;Ie.length<=et;)Ie.push(ke(Ie)+" ");return Ie[et]}function ke(et){return et[et.length-1]}function Dn(et,rt){for(var ut=[],at=0;at<et.length;at++)ut[at]=rt(et[at],at);return ut}function ln(et,rt,ut){for(var at=0,ct=ut(rt);at<et.length&&ut(et[at])<=ct;)at++;et.splice(at,0,rt)}function bt(){}function gt(et,rt){var ut;return Object.create?ut=Object.create(et):(bt.prototype=et,ut=new bt),rt&&On(rt,ut),ut}var pt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ct(et){return/\w/.test(et)||et>"\x80"&&(et.toUpperCase()!=et.toLowerCase()||pt.test(et))}function Pt(et,rt){return rt?rt.source.indexOf("\\w")>-1&&Ct(et)?!0:rt.test(et):Ct(et)}function vt(et){for(var rt in et)if(et.hasOwnProperty(rt)&&et[rt])return!1;return!0}var Et=/[\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 Zt(et){return et.charCodeAt(0)>=768&&Et.test(et)}function Ve(et,rt,ut){for(;(ut<0?rt>0:rt<et.length)&&Zt(et.charAt(rt));)rt+=ut;return rt}function ue(et,rt,ut){for(var at=rt>ut?-1:1;;){if(rt==ut)return rt;var ct=(rt+ut)/2,wt=at<0?Math.ceil(ct):Math.floor(ct);if(wt==rt)return et(wt)?rt:ut;et(wt)?ut=wt:rt=wt+at}}function re(et,rt,ut,at){if(!et)return at(rt,ut,"ltr",0);for(var ct=!1,wt=0;wt<et.length;++wt){var Mt=et[wt];(Mt.from<ut&&Mt.to>rt||rt==ut&&Mt.to==rt)&&(at(Math.max(Mt.from,rt),Math.min(Mt.to,ut),Mt.level==1?"rtl":"ltr",wt),ct=!0)}ct||at(rt,ut,"ltr")}var Ce=null;function Te(et,rt,ut){var at;Ce=null;for(var ct=0;ct<et.length;++ct){var wt=et[ct];if(wt.from<rt&&wt.to>rt)return ct;wt.to==rt&&(wt.from!=wt.to&&ut=="before"?at=ct:Ce=ct),wt.from==rt&&(wt.from!=wt.to&&ut!="before"?at=ct:Ce=ct)}return at!=null?at:Ce}var tn=function(){var et="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",rt="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ut(oe){return oe<=247?et.charAt(oe):1424<=oe&&oe<=1524?"R":1536<=oe&&oe<=1785?rt.charAt(oe-1536):1774<=oe&&oe<=2220?"r":8192<=oe&&oe<=8203?"w":oe==8204?"b":"L"}var at=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ct=/[stwN]/,wt=/[LRr]/,Mt=/[Lb1n]/,Bt=/[1n]/;function At(oe,dn,pe){this.level=oe,this.from=dn,this.to=pe}return function(oe,dn){var pe=dn=="ltr"?"L":"R";if(oe.length==0||dn=="ltr"&&!at.test(oe))return!1;for(var Kn=oe.length,zn=[],Pi=0;Pi<Kn;++Pi)zn.push(ut(oe.charCodeAt(Pi)));for(var Di=0,Zi=pe;Di<Kn;++Di){var or=zn[Di];or=="m"?zn[Di]=Zi:Zi=or}for(var vr=0,dr=pe;vr<Kn;++vr){var xr=zn[vr];xr=="1"&&dr=="r"?zn[vr]="n":wt.test(xr)&&(dr=xr,xr=="r"&&(zn[vr]="R"))}for(var jr=1,hr=zn[0];jr<Kn-1;++jr){var qr=zn[jr];qr=="+"&&hr=="1"&&zn[jr+1]=="1"?zn[jr]="1":qr==","&&hr==zn[jr+1]&&(hr=="1"||hr=="n")&&(zn[jr]=hr),hr=qr}for(var _o=0;_o<Kn;++_o){var ks=zn[_o];if(ks==",")zn[_o]="N";else if(ks=="%"){var ns=void 0;for(ns=_o+1;ns<Kn&&zn[ns]=="%";++ns);for(var Dl=_o&&zn[_o-1]=="!"||ns<Kn&&zn[ns]=="1"?"1":"N",al=_o;al<ns;++al)zn[al]=Dl;_o=ns-1}}for(var bs=0,Wl=pe;bs<Kn;++bs){var qs=zn[bs];Wl=="L"&&qs=="1"?zn[bs]="L":wt.test(qs)&&(Wl=qs)}for(var Es=0;Es<Kn;++Es)if(ct.test(zn[Es])){var xo=void 0;for(xo=Es+1;xo<Kn&&ct.test(zn[xo]);++xo);for(var ls=(Es?zn[Es-1]:pe)=="L",$s=(xo<Kn?zn[xo]:pe)=="L",tl=ls==$s?ls?"L":"R":pe,Oa=Es;Oa<xo;++Oa)zn[Oa]=tl;Es=xo-1}for(var is=[],xa,cs=0;cs<Kn;)if(Mt.test(zn[cs])){var xd=cs;for(++cs;cs<Kn&&Mt.test(zn[cs]);++cs);is.push(new At(0,xd,cs))}else{var ra=cs,Vl=is.length,Il=dn=="rtl"?1:0;for(++cs;cs<Kn&&zn[cs]!="L";++cs);for(var Bo=ra;Bo<cs;)if(Bt.test(zn[Bo])){ra<Bo&&(is.splice(Vl,0,new At(1,ra,Bo)),Vl+=Il);var Hs=Bo;for(++Bo;Bo<cs&&Bt.test(zn[Bo]);++Bo);is.splice(Vl,0,new At(2,Hs,Bo)),Vl+=Il,ra=Bo}else++Bo;ra<cs&&is.splice(Vl,0,new At(1,ra,cs))}return dn=="ltr"&&(is[0].level==1&&(xa=oe.match(/^\s+/))&&(is[0].from=xa[0].length,is.unshift(new At(0,0,xa[0].length))),ke(is).level==1&&(xa=oe.match(/\s+$/))&&(ke(is).to-=xa[0].length,is.push(new At(0,Kn-xa[0].length,Kn)))),dn=="rtl"?is.reverse():is}}();function te(et,rt){var ut=et.order;return ut==null&&(ut=et.order=tn(et.text,rt)),ut}var le=[],bn=function(et,rt,ut){if(et.addEventListener)et.addEventListener(rt,ut,!1);else if(et.attachEvent)et.attachEvent("on"+rt,ut);else{var at=et._handlers||(et._handlers={});at[rt]=(at[rt]||le).concat(ut)}};function Sn(et,rt){return et._handlers&&et._handlers[rt]||le}function Rn(et,rt,ut){if(et.removeEventListener)et.removeEventListener(rt,ut,!1);else if(et.detachEvent)et.detachEvent("on"+rt,ut);else{var at=et._handlers,ct=at&&at[rt];if(ct){var wt=Ye(ct,ut);wt>-1&&(at[rt]=ct.slice(0,wt).concat(ct.slice(wt+1)))}}}function In(et,rt){var ut=Sn(et,rt);if(ut.length)for(var at=Array.prototype.slice.call(arguments,2),ct=0;ct<ut.length;++ct)ut[ct].apply(null,at)}function sn(et,rt,ut){return typeof rt=="string"&&(rt={type:rt,preventDefault:function(){this.defaultPrevented=!0}}),In(et,ut||rt.type,et,rt),An(rt)||rt.codemirrorIgnore}function Hn(et){var rt=et._handlers&&et._handlers.cursorActivity;if(rt)for(var ut=et.curOp.cursorActivityHandlers||(et.curOp.cursorActivityHandlers=[]),at=0;at<rt.length;++at)Ye(ut,rt[at])==-1&&ut.push(rt[at])}function Mn(et,rt){return Sn(et,rt).length>0}function ye(et){et.prototype.on=function(rt,ut){bn(this,rt,ut)},et.prototype.off=function(rt,ut){Rn(this,rt,ut)}}function Ze(et){et.preventDefault?et.preventDefault():et.returnValue=!1}function En(et){et.stopPropagation?et.stopPropagation():et.cancelBubble=!0}function An(et){return et.defaultPrevented!=null?et.defaultPrevented:et.returnValue==!1}function he(et){Ze(et),En(et)}function Ke(et){return et.target||et.srcElement}function hn(et){var rt=et.which;return rt==null&&(et.button&1?rt=1:et.button&2?rt=3:et.button&4&&(rt=2)),Ht&&et.ctrlKey&&rt==1&&(rt=3),rt}var Pn=function(){if(_t&&Gt<9)return!1;var et=Le("div");return"draggable"in et||"dragDrop"in et}(),_n;function ci(et){if(_n==null){var rt=Le("span","\u200B");be(et,Le("span",[rt,document.createTextNode("x")])),et.firstChild.offsetHeight!=0&&(_n=rt.offsetWidth<=1&&rt.offsetHeight>2&&!(_t&&Gt<8))}var ut=_n?Le("span","\u200B"):Le("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ut.setAttribute("cm-text",""),ut}var yi;function Ni(et){if(yi!=null)return yi;var rt=be(et,document.createTextNode("A\u062EA")),ut=ie(rt,0,1).getBoundingClientRect(),at=ie(rt,1,2).getBoundingClientRect();return Se(et),!ut||ut.left==ut.right?!1:yi=at.right-ut.right<3}var ri=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(et){for(var rt=0,ut=[],at=et.length;rt<=at;){var ct=et.indexOf(`
|
|
|
`,rt);ct==-1&&(ct=et.length);var wt=et.slice(rt,et.charAt(ct-1)=="\r"?ct-1:ct),Mt=wt.indexOf("\r");Mt!=-1?(ut.push(wt.slice(0,Mt)),rt+=Mt+1):(ut.push(wt),rt=ct+1)}return ut}:function(et){return et.split(/\r\n?|\n/)},yt=window.getSelection?function(et){try{return et.selectionStart!=et.selectionEnd}catch(rt){return!1}}:function(et){var rt;try{rt=et.ownerDocument.selection.createRange()}catch(ut){}return!rt||rt.parentElement()!=et?!1:rt.compareEndPoints("StartToEnd",rt)!=0},Tn=function(){var et=Le("div");return"oncopy"in et?!0:(et.setAttribute("oncopy","return;"),typeof et.oncopy=="function")}(),xn=null;function Bn(et){if(xn!=null)return xn;var rt=be(et,Le("span","x")),ut=rt.getBoundingClientRect(),at=ie(rt,0,1).getBoundingClientRect();return xn=Math.abs(ut.left-at.left)>1}var Zn={},Nn={};function Ln(et,rt){arguments.length>2&&(rt.dependencies=Array.prototype.slice.call(arguments,2)),Zn[et]=rt}function ii(et,rt){Nn[et]=rt}function Qn(et){if(typeof et=="string"&&Nn.hasOwnProperty(et))et=Nn[et];else if(et&&typeof et.name=="string"&&Nn.hasOwnProperty(et.name)){var rt=Nn[et.name];typeof rt=="string"&&(rt={name:rt}),et=gt(rt,et),et.name=rt.name}else{if(typeof et=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(et))return Qn("application/xml");if(typeof et=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(et))return Qn("application/json")}return typeof et=="string"?{name:et}:et||{name:"null"}}function xi(et,rt){rt=Qn(rt);var ut=Zn[rt.name];if(!ut)return xi(et,"text/plain");var at=ut(et,rt);if(Xn.hasOwnProperty(rt.name)){var ct=Xn[rt.name];for(var wt in ct)ct.hasOwnProperty(wt)&&(at.hasOwnProperty(wt)&&(at["_"+wt]=at[wt]),at[wt]=ct[wt])}if(at.name=rt.name,rt.helperType&&(at.helperType=rt.helperType),rt.modeProps)for(var Mt in rt.modeProps)at[Mt]=rt.modeProps[Mt];return at}var Xn={};function $n(et,rt){var ut=Xn.hasOwnProperty(et)?Xn[et]:Xn[et]={};On(rt,ut)}function Hi(et,rt){if(rt===!0)return rt;if(et.copyState)return et.copyState(rt);var ut={};for(var at in rt){var ct=rt[at];ct instanceof Array&&(ct=ct.concat([])),ut[at]=ct}return ut}function Bi(et,rt){for(var ut;et.innerMode&&(ut=et.innerMode(rt),!(!ut||ut.mode==et));)rt=ut.state,et=ut.mode;return ut||{mode:et,state:rt}}function sr(et,rt,ut){return et.startState?et.startState(rt,ut):!0}var Jn=function(et,rt,ut){this.pos=this.start=0,this.string=et,this.tabSize=rt||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ut};Jn.prototype.eol=function(){return this.pos>=this.string.length},Jn.prototype.sol=function(){return this.pos==this.lineStart},Jn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jn.prototype.eat=function(et){var rt=this.string.charAt(this.pos),ut;if(typeof et=="string"?ut=rt==et:ut=rt&&(et.test?et.test(rt):et(rt)),ut)return++this.pos,rt},Jn.prototype.eatWhile=function(et){for(var rt=this.pos;this.eat(et););return this.pos>rt},Jn.prototype.eatSpace=function(){for(var et=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>et},Jn.prototype.skipToEnd=function(){this.pos=this.string.length},Jn.prototype.skipTo=function(et){var rt=this.string.indexOf(et,this.pos);if(rt>-1)return this.pos=rt,!0},Jn.prototype.backUp=function(et){this.pos-=et},Jn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=zt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?zt(this.string,this.lineStart,this.tabSize):0)},Jn.prototype.indentation=function(){return zt(this.string,null,this.tabSize)-(this.lineStart?zt(this.string,this.lineStart,this.tabSize):0)},Jn.prototype.match=function(et,rt,ut){if(typeof et=="string"){var at=function(Mt){return ut?Mt.toLowerCase():Mt},ct=this.string.substr(this.pos,et.length);if(at(ct)==at(et))return rt!==!1&&(this.pos+=et.length),!0}else{var wt=this.string.slice(this.pos).match(et);return wt&&wt.index>0?null:(wt&&rt!==!1&&(this.pos+=wt[0].length),wt)}},Jn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jn.prototype.hideFirstChars=function(et,rt){this.lineStart+=et;try{return rt()}finally{this.lineStart-=et}},Jn.prototype.lookAhead=function(et){var rt=this.lineOracle;return rt&&rt.lookAhead(et)},Jn.prototype.baseToken=function(){var et=this.lineOracle;return et&&et.baseToken(this.pos)};function Vn(et,rt){if(rt-=et.first,rt<0||rt>=et.size)throw new Error("There is no line "+(rt+et.first)+" in the document.");for(var ut=et;!ut.lines;)for(var at=0;;++at){var ct=ut.children[at],wt=ct.chunkSize();if(rt<wt){ut=ct;break}rt-=wt}return ut.lines[rt]}function oi(et,rt,ut){var at=[],ct=rt.line;return et.iter(rt.line,ut.line+1,function(wt){var Mt=wt.text;ct==ut.line&&(Mt=Mt.slice(0,ut.ch)),ct==rt.line&&(Mt=Mt.slice(rt.ch)),at.push(Mt),++ct}),at}function Ti(et,rt,ut){var at=[];return et.iter(rt,ut,function(ct){at.push(ct.text)}),at}function Ci(et,rt){var ut=rt-et.height;if(ut)for(var at=et;at;at=at.parent)at.height+=ut}function Rt(et){if(et.parent==null)return null;for(var rt=et.parent,ut=Ye(rt.lines,et),at=rt.parent;at;rt=at,at=at.parent)for(var ct=0;at.children[ct]!=rt;++ct)ut+=at.children[ct].chunkSize();return ut+rt.first}function Pe(et,rt){var ut=et.first;t:do{for(var at=0;at<et.children.length;++at){var ct=et.children[at],wt=ct.height;if(rt<wt){et=ct;continue t}rt-=wt,ut+=ct.chunkSize()}return ut}while(!et.lines);for(var Mt=0;Mt<et.lines.length;++Mt){var Bt=et.lines[Mt],At=Bt.height;if(rt<At)break;rt-=At}return ut+Mt}function qt(et,rt){return rt>=et.first&&rt<et.first+et.size}function He(et,rt){return String(et.lineNumberFormatter(rt+et.firstLineNumber))}function ae(et,rt,ut){if(ut===void 0&&(ut=null),!(this instanceof ae))return new ae(et,rt,ut);this.line=et,this.ch=rt,this.sticky=ut}function ze(et,rt){return et.line-rt.line||et.ch-rt.ch}function Jt(et,rt){return et.sticky==rt.sticky&&ze(et,rt)==0}function nn(et){return ae(et.line,et.ch)}function cn(et,rt){return ze(et,rt)<0?rt:et}function Ne(et,rt){return ze(et,rt)<0?et:rt}function Fe(et,rt){return Math.max(et.first,Math.min(rt,et.first+et.size-1))}function Xe(et,rt){if(rt.line<et.first)return ae(et.first,0);var ut=et.first+et.size-1;return rt.line>ut?ae(ut,Vn(et,ut).text.length):Je(rt,Vn(et,rt.line).text.length)}function Je(et,rt){var ut=et.ch;return ut==null||ut>rt?ae(et.line,rt):ut<0?ae(et.line,0):et}function vn(et,rt){for(var ut=[],at=0;at<rt.length;at++)ut[at]=Xe(et,rt[at]);return ut}var li=function(et,rt){this.state=et,this.lookAhead=rt},jn=function(et,rt,ut,at){this.state=rt,this.doc=et,this.line=ut,this.maxLookAhead=at||0,this.baseTokens=null,this.baseTokenPos=1};jn.prototype.lookAhead=function(et){var rt=this.doc.getLine(this.line+et);return rt!=null&&et>this.maxLookAhead&&(this.maxLookAhead=et),rt},jn.prototype.baseToken=function(et){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=et;)this.baseTokenPos+=2;var rt=this.baseTokens[this.baseTokenPos+1];return{type:rt&&rt.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-et}},jn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},jn.fromSaved=function(et,rt,ut){return rt instanceof li?new jn(et,Hi(et.mode,rt.state),ut,rt.lookAhead):new jn(et,Hi(et.mode,rt),ut)},jn.prototype.save=function(et){var rt=et!==!1?Hi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new li(rt,this.maxLookAhead):rt};function vi(et,rt,ut,at){var ct=[et.state.modeGen],wt={};We(et,rt.text,et.doc.mode,ut,function(oe,dn){return ct.push(oe,dn)},wt,at);for(var Mt=ut.state,Bt=function(oe){ut.baseTokens=ct;var dn=et.state.overlays[oe],pe=1,Kn=0;ut.state=!0,We(et,rt.text,dn.mode,ut,function(zn,Pi){for(var Di=pe;Kn<zn;){var Zi=ct[pe];Zi>zn&&ct.splice(pe,1,zn,ct[pe+1],Zi),pe+=2,Kn=Math.min(zn,Zi)}if(Pi)if(dn.opaque)ct.splice(Di,pe-Di,zn,"overlay "+Pi),pe=Di+2;else for(;Di<pe;Di+=2){var or=ct[Di+1];ct[Di+1]=(or?or+" ":"")+"overlay "+Pi}},wt),ut.state=Mt,ut.baseTokens=null,ut.baseTokenPos=1},At=0;At<et.state.overlays.length;++At)Bt(At);return{styles:ct,classes:wt.bgClass||wt.textClass?wt:null}}function $i(et,rt,ut){if(!rt.styles||rt.styles[0]!=et.state.modeGen){var at=Ji(et,Rt(rt)),ct=rt.text.length>et.options.maxHighlightLength&&Hi(et.doc.mode,at.state),wt=vi(et,rt,at);ct&&(at.state=ct),rt.stateAfter=at.save(!ct),rt.styles=wt.styles,wt.classes?rt.styleClasses=wt.classes:rt.styleClasses&&(rt.styleClasses=null),ut===et.doc.highlightFrontier&&(et.doc.modeFrontier=Math.max(et.doc.modeFrontier,++et.doc.highlightFrontier))}return rt.styles}function Ji(et,rt,ut){var at=et.doc,ct=et.display;if(!at.mode.startState)return new jn(at,!0,rt);var wt=mn(et,rt,ut),Mt=wt>at.first&&Vn(at,wt-1).stateAfter,Bt=Mt?jn.fromSaved(at,Mt,wt):new jn(at,sr(at.mode),wt);return at.iter(wt,rt,function(At){yn(et,At.text,Bt);var oe=Bt.line;At.stateAfter=oe==rt-1||oe%5==0||oe>=ct.viewFrom&&oe<ct.viewTo?Bt.save():null,Bt.nextLine()}),ut&&(at.modeFrontier=Bt.line),Bt}function yn(et,rt,ut,at){var ct=et.doc.mode,wt=new Jn(rt,et.options.tabSize,ut);for(wt.start=wt.pos=at||0,rt==""&&zi(ct,ut.state);!wt.eol();)Ri(ct,wt,ut.state),wt.start=wt.pos}function zi(et,rt){if(et.blankLine)return et.blankLine(rt);if(et.innerMode){var ut=Bi(et,rt);if(ut.mode.blankLine)return ut.mode.blankLine(ut.state)}}function Ri(et,rt,ut,at){for(var ct=0;ct<10;ct++){at&&(at[0]=Bi(et,ut).mode);var wt=et.token(rt,ut);if(rt.pos>rt.start)return wt}throw new Error("Mode "+et.name+" failed to advance stream.")}var Ii=function(et,rt,ut){this.start=et.start,this.end=et.pos,this.string=et.current(),this.type=rt||null,this.state=ut};function an(et,rt,ut,at){var ct=et.doc,wt=ct.mode,Mt;rt=Xe(ct,rt);var Bt=Vn(ct,rt.line),At=Ji(et,rt.line,ut),oe=new Jn(Bt.text,et.options.tabSize,At),dn;for(at&&(dn=[]);(at||oe.pos<rt.ch)&&!oe.eol();)oe.start=oe.pos,Mt=Ri(wt,oe,At.state),at&&dn.push(new Ii(oe,Mt,Hi(ct.mode,At.state)));return at?dn:new Ii(oe,Mt,At.state)}function Qe(et,rt){if(et)for(;;){var ut=et.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ut)break;et=et.slice(0,ut.index)+et.slice(ut.index+ut[0].length);var at=ut[1]?"bgClass":"textClass";rt[at]==null?rt[at]=ut[2]:new RegExp("(?:^|\\s)"+ut[2]+"(?:$|\\s)").test(rt[at])||(rt[at]+=" "+ut[2])}return et}function We(et,rt,ut,at,ct,wt,Mt){var Bt=ut.flattenSpans;Bt==null&&(Bt=et.options.flattenSpans);var At=0,oe=null,dn=new Jn(rt,et.options.tabSize,at),pe,Kn=et.options.addModeClass&&[null];for(rt==""&&Qe(zi(ut,at.state),wt);!dn.eol();){if(dn.pos>et.options.maxHighlightLength?(Bt=!1,Mt&&yn(et,rt,at,dn.pos),dn.pos=rt.length,pe=null):pe=Qe(Ri(ut,dn,at.state,Kn),wt),Kn){var zn=Kn[0].name;zn&&(pe="m-"+(pe?zn+" "+pe:zn))}if(!Bt||oe!=pe){for(;At<dn.start;)At=Math.min(dn.start,At+5e3),ct(At,oe);oe=pe}dn.start=dn.pos}for(;At<dn.pos;){var Pi=Math.min(dn.pos,At+5e3);ct(Pi,oe),At=Pi}}function mn(et,rt,ut){for(var at,ct,wt=et.doc,Mt=ut?-1:rt-(et.doc.mode.innerMode?1e3:100),Bt=rt;Bt>Mt;--Bt){if(Bt<=wt.first)return wt.first;var At=Vn(wt,Bt-1),oe=At.stateAfter;if(oe&&(!ut||Bt+(oe instanceof li?oe.lookAhead:0)<=wt.modeFrontier))return Bt;var dn=zt(At.text,null,et.options.tabSize);(ct==null||at>dn)&&(ct=Bt-1,at=dn)}return ct}function fn(et,rt){if(et.modeFrontier=Math.min(et.modeFrontier,rt),!(et.highlightFrontier<rt-10)){for(var ut=et.first,at=rt-1;at>ut;at--){var ct=Vn(et,at).stateAfter;if(ct&&(!(ct instanceof li)||at+ct.lookAhead<rt)){ut=at+1;break}}et.highlightFrontier=Math.min(et.highlightFrontier,ut)}}var Wn=!1,$e=!1;function Si(){Wn=!0}function pn(){$e=!0}function wi(et,rt,ut){this.marker=et,this.from=rt,this.to=ut}function Wi(et,rt){if(et)for(var ut=0;ut<et.length;++ut){var at=et[ut];if(at.marker==rt)return at}}function Ui(et,rt){for(var ut,at=0;at<et.length;++at)et[at]!=rt&&(ut||(ut=[])).push(et[at]);return ut}function Vi(et,rt){et.markedSpans=et.markedSpans?et.markedSpans.concat([rt]):[rt],rt.marker.attachLine(et)}function Ki(et,rt,ut){var at;if(et)for(var ct=0;ct<et.length;++ct){var wt=et[ct],Mt=wt.marker,Bt=wt.from==null||(Mt.inclusiveLeft?wt.from<=rt:wt.from<rt);if(Bt||wt.from==rt&&Mt.type=="bookmark"&&(!ut||!wt.marker.insertLeft)){var At=wt.to==null||(Mt.inclusiveRight?wt.to>=rt:wt.to>rt);(at||(at=[])).push(new wi(Mt,wt.from,At?null:wt.to))}}return at}function Oi(et,rt,ut){var at;if(et)for(var ct=0;ct<et.length;++ct){var wt=et[ct],Mt=wt.marker,Bt=wt.to==null||(Mt.inclusiveRight?wt.to>=rt:wt.to>rt);if(Bt||wt.from==rt&&Mt.type=="bookmark"&&(!ut||wt.marker.insertLeft)){var At=wt.from==null||(Mt.inclusiveLeft?wt.from<=rt:wt.from<rt);(at||(at=[])).push(new wi(Mt,At?null:wt.from-rt,wt.to==null?null:wt.to-rt))}}return at}function qi(et,rt){if(rt.full)return null;var ut=qt(et,rt.from.line)&&Vn(et,rt.from.line).markedSpans,at=qt(et,rt.to.line)&&Vn(et,rt.to.line).markedSpans;if(!ut&&!at)return null;var ct=rt.from.ch,wt=rt.to.ch,Mt=ze(rt.from,rt.to)==0,Bt=Ki(ut,ct,Mt),At=Oi(at,wt,Mt),oe=rt.text.length==1,dn=ke(rt.text).length+(oe?ct:0);if(Bt)for(var pe=0;pe<Bt.length;++pe){var Kn=Bt[pe];if(Kn.to==null){var zn=Wi(At,Kn.marker);zn?oe&&(Kn.to=zn.to==null?null:zn.to+dn):Kn.to=ct}}if(At)for(var Pi=0;Pi<At.length;++Pi){var Di=At[Pi];if(Di.to!=null&&(Di.to+=dn),Di.from==null){var Zi=Wi(Bt,Di.marker);Zi||(Di.from=dn,oe&&(Bt||(Bt=[])).push(Di))}else Di.from+=dn,oe&&(Bt||(Bt=[])).push(Di)}Bt&&(Bt=fr(Bt)),At&&At!=Bt&&(At=fr(At));var or=[Bt];if(!oe){var vr=rt.text.length-2,dr;if(vr>0&&Bt)for(var xr=0;xr<Bt.length;++xr)Bt[xr].to==null&&(dr||(dr=[])).push(new wi(Bt[xr].marker,null,null));for(var jr=0;jr<vr;++jr)or.push(dr);or.push(At)}return or}function fr(et){for(var rt=0;rt<et.length;++rt){var ut=et[rt];ut.from!=null&&ut.from==ut.to&&ut.marker.clearWhenEmpty!==!1&&et.splice(rt--,1)}return et.length?et:null}function tr(et,rt,ut){var at=null;if(et.iter(rt.line,ut.line+1,function(zn){if(zn.markedSpans)for(var Pi=0;Pi<zn.markedSpans.length;++Pi){var Di=zn.markedSpans[Pi].marker;Di.readOnly&&(!at||Ye(at,Di)==-1)&&(at||(at=[])).push(Di)}}),!at)return null;for(var ct=[{from:rt,to:ut}],wt=0;wt<at.length;++wt)for(var Mt=at[wt],Bt=Mt.find(0),At=0;At<ct.length;++At){var oe=ct[At];if(!(ze(oe.to,Bt.from)<0||ze(oe.from,Bt.to)>0)){var dn=[At,1],pe=ze(oe.from,Bt.from),Kn=ze(oe.to,Bt.to);(pe<0||!Mt.inclusiveLeft&&!pe)&&dn.push({from:oe.from,to:Bt.from}),(Kn>0||!Mt.inclusiveRight&&!Kn)&&dn.push({from:Bt.to,to:oe.to}),ct.splice.apply(ct,dn),At+=dn.length-3}}return ct}function ai(et){var rt=et.markedSpans;if(rt){for(var ut=0;ut<rt.length;++ut)rt[ut].marker.detachLine(et);et.markedSpans=null}}function Lt(et,rt){if(rt){for(var ut=0;ut<rt.length;++ut)rt[ut].marker.attachLine(et);et.markedSpans=rt}}function ur(et){return et.inclusiveLeft?-1:0}function Qi(et){return et.inclusiveRight?1:0}function Yi(et,rt){var ut=et.lines.length-rt.lines.length;if(ut!=0)return ut;var at=et.find(),ct=rt.find(),wt=ze(at.from,ct.from)||ur(et)-ur(rt);if(wt)return-wt;var Mt=ze(at.to,ct.to)||Qi(et)-Qi(rt);return Mt||rt.id-et.id}function nr(et,rt){var ut=$e&&et.markedSpans,at;if(ut)for(var ct=void 0,wt=0;wt<ut.length;++wt)ct=ut[wt],ct.marker.collapsed&&(rt?ct.from:ct.to)==null&&(!at||Yi(at,ct.marker)<0)&&(at=ct.marker);return at}function _i(et){return nr(et,!0)}function ui(et){return nr(et,!1)}function Ei(et,rt){var ut=$e&&et.markedSpans,at;if(ut)for(var ct=0;ct<ut.length;++ct){var wt=ut[ct];wt.marker.collapsed&&(wt.from==null||wt.from<rt)&&(wt.to==null||wt.to>rt)&&(!at||Yi(at,wt.marker)<0)&&(at=wt.marker)}return at}function Mi(et,rt,ut,at,ct){var wt=Vn(et,rt),Mt=$e&&wt.markedSpans;if(Mt)for(var Bt=0;Bt<Mt.length;++Bt){var At=Mt[Bt];if(At.marker.collapsed){var oe=At.marker.find(0),dn=ze(oe.from,ut)||ur(At.marker)-ur(ct),pe=ze(oe.to,at)||Qi(At.marker)-Qi(ct);if(!(dn>=0&&pe<=0||dn<=0&&pe>=0)&&(dn<=0&&(At.marker.inclusiveRight&&ct.inclusiveLeft?ze(oe.to,ut)>=0:ze(oe.to,ut)>0)||dn>=0&&(At.marker.inclusiveRight&&ct.inclusiveLeft?ze(oe.from,at)<=0:ze(oe.from,at)<0)))return!0}}}function Gn(et){for(var rt;rt=_i(et);)et=rt.find(-1,!0).line;return et}function gi(et){for(var rt;rt=ui(et);)et=rt.find(1,!0).line;return et}function Li(et){for(var rt,ut;rt=ui(et);)et=rt.find(1,!0).line,(ut||(ut=[])).push(et);return ut}function pi(et,rt){var ut=Vn(et,rt),at=Gn(ut);return ut==at?rt:Rt(at)}function ni(et,rt){if(rt>et.lastLine())return rt;var ut=Vn(et,rt),at;if(!kn(et,ut))return rt;for(;at=ui(ut);)ut=at.find(1,!0).line;return Rt(ut)+1}function kn(et,rt){var ut=$e&&rt.markedSpans;if(ut){for(var at=void 0,ct=0;ct<ut.length;++ct)if(at=ut[ct],!!at.marker.collapsed){if(at.from==null)return!0;if(!at.marker.widgetNode&&at.from==0&&at.marker.inclusiveLeft&&ji(et,rt,at))return!0}}}function ji(et,rt,ut){if(ut.to==null){var at=ut.marker.find(1,!0);return ji(et,at.line,Wi(at.line.markedSpans,ut.marker))}if(ut.marker.inclusiveRight&&ut.to==rt.text.length)return!0;for(var ct=void 0,wt=0;wt<rt.markedSpans.length;++wt)if(ct=rt.markedSpans[wt],ct.marker.collapsed&&!ct.marker.widgetNode&&ct.from==ut.to&&(ct.to==null||ct.to!=ut.from)&&(ct.marker.inclusiveLeft||ut.marker.inclusiveRight)&&ji(et,rt,ct))return!0}function br(et){et=Gn(et);for(var rt=0,ut=et.parent,at=0;at<ut.lines.length;++at){var ct=ut.lines[at];if(ct==et)break;rt+=ct.height}for(var wt=ut.parent;wt;ut=wt,wt=ut.parent)for(var Mt=0;Mt<wt.children.length;++Mt){var Bt=wt.children[Mt];if(Bt==ut)break;rt+=Bt.height}return rt}function Dr(et){if(et.height==0)return 0;for(var rt=et.text.length,ut,at=et;ut=_i(at);){var ct=ut.find(0,!0);at=ct.from.line,rt+=ct.from.ch-ct.to.ch}for(at=et;ut=ui(at);){var wt=ut.find(0,!0);rt-=at.text.length-wt.from.ch,at=wt.to.line,rt+=at.text.length-wt.to.ch}return rt}function Or(et){var rt=et.display,ut=et.doc;rt.maxLine=Vn(ut,ut.first),rt.maxLineLength=Dr(rt.maxLine),rt.maxLineChanged=!0,ut.iter(function(at){var ct=Dr(at);ct>rt.maxLineLength&&(rt.maxLineLength=ct,rt.maxLine=at)})}var Vr=function(et,rt,ut){this.text=et,Lt(this,rt),this.height=ut?ut(this):1};Vr.prototype.lineNo=function(){return Rt(this)},ye(Vr);function Gr(et,rt,ut,at){et.text=rt,et.stateAfter&&(et.stateAfter=null),et.styles&&(et.styles=null),et.order!=null&&(et.order=null),ai(et),Lt(et,ut);var ct=at?at(et):1;ct!=et.height&&Ci(et,ct)}function Ur(et){et.parent=null,ai(et)}var ro={},Kr={};function uo(et,rt){if(!et||/^\s*$/.test(et))return null;var ut=rt.addModeClass?Kr:ro;return ut[et]||(ut[et]=et.replace(/\S+/g,"cm-$&"))}function un(et,rt){var ut=en("span",null,null,Vt?"padding-right: .1px":null),at={pre:en("pre",[ut],"CodeMirror-line"),content:ut,col:0,pos:0,cm:et,trailingSpace:!1,splitSpaces:et.getOption("lineWrapping")};rt.measure={};for(var ct=0;ct<=(rt.rest?rt.rest.length:0);ct++){var wt=ct?rt.rest[ct-1]:rt.line,Mt=void 0;at.pos=0,at.addToken=Io,Ni(et.display.measure)&&(Mt=te(wt,et.doc.direction))&&(at.addToken=to(at.addToken,Mt)),at.map=[];var Bt=rt!=et.display.externalMeasured&&Rt(wt);Cr(wt,at,$i(et,wt,Bt)),wt.styleClasses&&(wt.styleClasses.bgClass&&(at.bgClass=rn(wt.styleClasses.bgClass,at.bgClass||"")),wt.styleClasses.textClass&&(at.textClass=rn(wt.styleClasses.textClass,at.textClass||""))),at.map.length==0&&at.map.push(0,0,at.content.appendChild(ci(et.display.measure))),ct==0?(rt.measure.map=at.map,rt.measure.cache={}):((rt.measure.maps||(rt.measure.maps=[])).push(at.map),(rt.measure.caches||(rt.measure.caches=[])).push({}))}if(Vt){var At=at.content.lastChild;(/\bcm-tab\b/.test(At.className)||At.querySelector&&At.querySelector(".cm-tab"))&&(at.content.className="cm-tab-wrap-hack")}return In(et,"renderLine",et,rt.line,at.pre),at.pre.className&&(at.textClass=rn(at.pre.className,at.textClass||"")),at}function So(et){var rt=Le("span","\u2022","cm-invalidchar");return rt.title="\\u"+et.charCodeAt(0).toString(16),rt.setAttribute("aria-label",rt.title),rt}function Io(et,rt,ut,at,ct,wt,Mt){if(rt){var Bt=et.splitSpaces?ho(rt,et.trailingSpace):rt,At=et.cm.state.specialChars,oe=!1,dn;if(!At.test(rt))et.col+=rt.length,dn=document.createTextNode(Bt),et.map.push(et.pos,et.pos+rt.length,dn),_t&&Gt<9&&(oe=!0),et.pos+=rt.length;else{dn=document.createDocumentFragment();for(var pe=0;;){At.lastIndex=pe;var Kn=At.exec(rt),zn=Kn?Kn.index-pe:rt.length-pe;if(zn){var Pi=document.createTextNode(Bt.slice(pe,pe+zn));_t&&Gt<9?dn.appendChild(Le("span",[Pi])):dn.appendChild(Pi),et.map.push(et.pos,et.pos+zn,Pi),et.col+=zn,et.pos+=zn}if(!Kn)break;pe+=zn+1;var Di=void 0;if(Kn[0]==" "){var Zi=et.cm.options.tabSize,or=Zi-et.col%Zi;Di=dn.appendChild(Le("span",gn(or),"cm-tab")),Di.setAttribute("role","presentation"),Di.setAttribute("cm-text"," "),et.col+=or}else Kn[0]=="\r"||Kn[0]==`
|
|
|
`?(Di=dn.appendChild(Le("span",Kn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Di.setAttribute("cm-text",Kn[0]),et.col+=1):(Di=et.cm.options.specialCharPlaceholder(Kn[0]),Di.setAttribute("cm-text",Kn[0]),_t&&Gt<9?dn.appendChild(Le("span",[Di])):dn.appendChild(Di),et.col+=1);et.map.push(et.pos,et.pos+1,Di),et.pos++}}if(et.trailingSpace=Bt.charCodeAt(rt.length-1)==32,ut||at||ct||oe||wt||Mt){var vr=ut||"";at&&(vr+=at),ct&&(vr+=ct);var dr=Le("span",[dn],vr,wt);if(Mt)for(var xr in Mt)Mt.hasOwnProperty(xr)&&xr!="style"&&xr!="class"&&dr.setAttribute(xr,Mt[xr]);return et.content.appendChild(dr)}et.content.appendChild(dn)}}function ho(et,rt){if(et.length>1&&!/ /.test(et))return et;for(var ut=rt,at="",ct=0;ct<et.length;ct++){var wt=et.charAt(ct);wt==" "&&ut&&(ct==et.length-1||et.charCodeAt(ct+1)==32)&&(wt="\xA0"),at+=wt,ut=wt==" "}return at}function to(et,rt){return function(ut,at,ct,wt,Mt,Bt,At){ct=ct?ct+" cm-force-border":"cm-force-border";for(var oe=ut.pos,dn=oe+at.length;;){for(var pe=void 0,Kn=0;Kn<rt.length&&(pe=rt[Kn],!(pe.to>oe&&pe.from<=oe));Kn++);if(pe.to>=dn)return et(ut,at,ct,wt,Mt,Bt,At);et(ut,at.slice(0,pe.to-oe),ct,wt,null,Bt,At),wt=null,at=at.slice(pe.to-oe),oe=pe.to}}}function wr(et,rt,ut,at){var ct=!at&&ut.widgetNode;ct&&et.map.push(et.pos,et.pos+rt,ct),!at&&et.cm.display.input.needsContentAttribute&&(ct||(ct=et.content.appendChild(document.createElement("span"))),ct.setAttribute("cm-marker",ut.id)),ct&&(et.cm.display.input.setUneditable(ct),et.content.appendChild(ct)),et.pos+=rt,et.trailingSpace=!1}function Cr(et,rt,ut){var at=et.markedSpans,ct=et.text,wt=0;if(!at){for(var Mt=1;Mt<ut.length;Mt+=2)rt.addToken(rt,ct.slice(wt,wt=ut[Mt]),uo(ut[Mt+1],rt.cm.options));return}for(var Bt=ct.length,At=0,oe=1,dn="",pe,Kn,zn=0,Pi,Di,Zi,or,vr;;){if(zn==At){Pi=Di=Zi=Kn="",vr=null,or=null,zn=1/0;for(var dr=[],xr=void 0,jr=0;jr<at.length;++jr){var hr=at[jr],qr=hr.marker;if(qr.type=="bookmark"&&hr.from==At&&qr.widgetNode)dr.push(qr);else if(hr.from<=At&&(hr.to==null||hr.to>At||qr.collapsed&&hr.to==At&&hr.from==At)){if(hr.to!=null&&hr.to!=At&&zn>hr.to&&(zn=hr.to,Di=""),qr.className&&(Pi+=" "+qr.className),qr.css&&(Kn=(Kn?Kn+";":"")+qr.css),qr.startStyle&&hr.from==At&&(Zi+=" "+qr.startStyle),qr.endStyle&&hr.to==zn&&(xr||(xr=[])).push(qr.endStyle,hr.to),qr.title&&((vr||(vr={})).title=qr.title),qr.attributes)for(var _o in qr.attributes)(vr||(vr={}))[_o]=qr.attributes[_o];qr.collapsed&&(!or||Yi(or.marker,qr)<0)&&(or=hr)}else hr.from>At&&zn>hr.from&&(zn=hr.from)}if(xr)for(var ks=0;ks<xr.length;ks+=2)xr[ks+1]==zn&&(Di+=" "+xr[ks]);if(!or||or.from==At)for(var ns=0;ns<dr.length;++ns)wr(rt,0,dr[ns]);if(or&&(or.from||0)==At){if(wr(rt,(or.to==null?Bt+1:or.to)-At,or.marker,or.from==null),or.to==null)return;or.to==At&&(or=!1)}}if(At>=Bt)break;for(var Dl=Math.min(Bt,zn);;){if(dn){var al=At+dn.length;if(!or){var bs=al>Dl?dn.slice(0,Dl-At):dn;rt.addToken(rt,bs,pe?pe+Pi:Pi,Zi,At+bs.length==zn?Di:"",Kn,vr)}if(al>=Dl){dn=dn.slice(Dl-At),At=Dl;break}At=al,Zi=""}dn=ct.slice(wt,wt=ut[oe++]),pe=uo(ut[oe++],rt.cm.options)}}}function bo(et,rt,ut){this.line=rt,this.rest=Li(rt),this.size=this.rest?Rt(ke(this.rest))-ut+1:1,this.node=this.text=null,this.hidden=kn(et,rt)}function Ar(et,rt,ut){for(var at=[],ct,wt=rt;wt<ut;wt=ct){var Mt=new bo(et.doc,Vn(et.doc,wt),wt);ct=wt+Mt.size,at.push(Mt)}return at}var Sr=null;function lo(et){Sr?Sr.ops.push(et):et.ownsGroup=Sr={ops:[et],delayedCallbacks:[]}}function $r(et){var rt=et.delayedCallbacks,ut=0;do{for(;ut<rt.length;ut++)rt[ut].call(null);for(var at=0;at<et.ops.length;at++){var ct=et.ops[at];if(ct.cursorActivityHandlers)for(;ct.cursorActivityCalled<ct.cursorActivityHandlers.length;)ct.cursorActivityHandlers[ct.cursorActivityCalled++].call(null,ct.cm)}}while(ut<rt.length)}function Er(et,rt){var ut=et.ownsGroup;if(ut)try{$r(ut)}finally{Sr=null,rt(ut)}}var oo=null;function Xi(et,rt){var ut=Sn(et,rt);if(ut.length){var at=Array.prototype.slice.call(arguments,2),ct;Sr?ct=Sr.delayedCallbacks:oo?ct=oo:(ct=oo=[],setTimeout(vs,0));for(var wt=function(Bt){ct.push(function(){return ut[Bt].apply(null,at)})},Mt=0;Mt<ut.length;++Mt)wt(Mt)}}function vs(){var et=oo;oo=null;for(var rt=0;rt<et.length;++rt)et[rt]()}function ws(et,rt,ut,at){for(var ct=0;ct<rt.changes.length;ct++){var wt=rt.changes[ct];wt=="text"?Fi(et,rt):wt=="gutter"?gr(et,rt,ut,at):wt=="class"?mr(et,rt):wt=="widget"&&Lr(et,rt,at)}rt.changes=null}function Qo(et){return et.node==et.text&&(et.node=Le("div",null,null,"position: relative"),et.text.parentNode&&et.text.parentNode.replaceChild(et.node,et.text),et.node.appendChild(et.text),_t&&Gt<8&&(et.node.style.zIndex=2)),et.node}function qo(et,rt){var ut=rt.bgClass?rt.bgClass+" "+(rt.line.bgClass||""):rt.line.bgClass;if(ut&&(ut+=" CodeMirror-linebackground"),rt.background)ut?rt.background.className=ut:(rt.background.parentNode.removeChild(rt.background),rt.background=null);else if(ut){var at=Qo(rt);rt.background=at.insertBefore(Le("div",null,ut),at.firstChild),et.display.input.setUneditable(rt.background)}}function Js(et,rt){var ut=et.display.externalMeasured;return ut&&ut.line==rt.line?(et.display.externalMeasured=null,rt.measure=ut.measure,ut.built):un(et,rt)}function Fi(et,rt){var ut=rt.text.className,at=Js(et,rt);rt.text==rt.node&&(rt.node=at.pre),rt.text.parentNode.replaceChild(at.pre,rt.text),rt.text=at.pre,at.bgClass!=rt.bgClass||at.textClass!=rt.textClass?(rt.bgClass=at.bgClass,rt.textClass=at.textClass,mr(et,rt)):ut&&(rt.text.className=ut)}function mr(et,rt){qo(et,rt),rt.line.wrapClass?Qo(rt).className=rt.line.wrapClass:rt.node!=rt.text&&(rt.node.className="");var ut=rt.textClass?rt.textClass+" "+(rt.line.textClass||""):rt.line.textClass;rt.text.className=ut||""}function gr(et,rt,ut,at){if(rt.gutter&&(rt.node.removeChild(rt.gutter),rt.gutter=null),rt.gutterBackground&&(rt.node.removeChild(rt.gutterBackground),rt.gutterBackground=null),rt.line.gutterClass){var ct=Qo(rt);rt.gutterBackground=Le("div",null,"CodeMirror-gutter-background "+rt.line.gutterClass,"left: "+(et.options.fixedGutter?at.fixedPos:-at.gutterTotalWidth)+"px; width: "+at.gutterTotalWidth+"px"),et.display.input.setUneditable(rt.gutterBackground),ct.insertBefore(rt.gutterBackground,rt.text)}var wt=rt.line.gutterMarkers;if(et.options.lineNumbers||wt){var Mt=Qo(rt),Bt=rt.gutter=Le("div",null,"CodeMirror-gutter-wrapper","left: "+(et.options.fixedGutter?at.fixedPos:-at.gutterTotalWidth)+"px");if(et.display.input.setUneditable(Bt),Mt.insertBefore(Bt,rt.text),rt.line.gutterClass&&(Bt.className+=" "+rt.line.gutterClass),et.options.lineNumbers&&(!wt||!wt["CodeMirror-linenumbers"])&&(rt.lineNumber=Bt.appendChild(Le("div",He(et.options,ut),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+at.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+et.display.lineNumInnerWidth+"px"))),wt)for(var At=0;At<et.display.gutterSpecs.length;++At){var oe=et.display.gutterSpecs[At].className,dn=wt.hasOwnProperty(oe)&&wt[oe];dn&&Bt.appendChild(Le("div",[dn],"CodeMirror-gutter-elt","left: "+at.gutterLeft[oe]+"px; width: "+at.gutterWidth[oe]+"px"))}}}function Lr(et,rt,ut){rt.alignable&&(rt.alignable=null);for(var at=ve("CodeMirror-linewidget"),ct=rt.node.firstChild,wt=void 0;ct;ct=wt)wt=ct.nextSibling,at.test(ct.className)&&rt.node.removeChild(ct);go(et,rt,ut)}function zr(et,rt,ut,at){var ct=Js(et,rt);return rt.text=rt.node=ct.pre,ct.bgClass&&(rt.bgClass=ct.bgClass),ct.textClass&&(rt.textClass=ct.textClass),mr(et,rt),gr(et,rt,ut,at),go(et,rt,at),rt.node}function go(et,rt,ut){if(cr(et,rt.line,rt,ut,!0),rt.rest)for(var at=0;at<rt.rest.length;at++)cr(et,rt.rest[at],rt,ut,!1)}function cr(et,rt,ut,at,ct){if(rt.widgets)for(var wt=Qo(ut),Mt=0,Bt=rt.widgets;Mt<Bt.length;++Mt){var At=Bt[Mt],oe=Le("div",[At.node],"CodeMirror-linewidget"+(At.className?" "+At.className:""));At.handleMouseEvents||oe.setAttribute("cm-ignore-events","true"),ol(At,oe,ut,at),et.display.input.setUneditable(oe),ct&&At.above?wt.insertBefore(oe,ut.gutter||ut.text):wt.appendChild(oe),Xi(At,"redraw")}}function ol(et,rt,ut,at){if(et.noHScroll){(ut.alignable||(ut.alignable=[])).push(rt);var ct=at.wrapperWidth;rt.style.left=at.fixedPos+"px",et.coverGutter||(ct-=at.gutterTotalWidth,rt.style.paddingLeft=at.gutterTotalWidth+"px"),rt.style.width=ct+"px"}et.coverGutter&&(rt.style.zIndex=5,rt.style.position="relative",et.noHScroll||(rt.style.marginLeft=-at.gutterTotalWidth+"px"))}function hs(et){if(et.height!=null)return et.height;var rt=et.doc.cm;if(!rt)return 0;if(!Re(document.body,et.node)){var ut="position: relative;";et.coverGutter&&(ut+="margin-left: -"+rt.display.gutters.offsetWidth+"px;"),et.noHScroll&&(ut+="width: "+rt.display.wrapper.clientWidth+"px;"),be(rt.display.measure,Le("div",[et.node],null,ut))}return et.height=et.node.parentNode.offsetHeight}function rs(et,rt){for(var ut=Ke(rt);ut!=et.wrapper;ut=ut.parentNode)if(!ut||ut.nodeType==1&&ut.getAttribute("cm-ignore-events")=="true"||ut.parentNode==et.sizer&&ut!=et.mover)return!0}function Eo(et){return et.lineSpace.offsetTop}function Is(et){return et.mover.offsetHeight-et.lineSpace.offsetHeight}function pl(et){if(et.cachedPaddingH)return et.cachedPaddingH;var rt=be(et.measure,Le("pre","x","CodeMirror-line-like")),ut=window.getComputedStyle?window.getComputedStyle(rt):rt.currentStyle,at={left:parseInt(ut.paddingLeft),right:parseInt(ut.paddingRight)};return!isNaN(at.left)&&!isNaN(at.right)&&(et.cachedPaddingH=at),at}function As(et){return wn-et.display.nativeBarWidth}function sl(et){return et.display.scroller.clientWidth-As(et)-et.display.barWidth}function da(et){return et.display.scroller.clientHeight-As(et)-et.display.barHeight}function jl(et,rt,ut){var at=et.options.lineWrapping,ct=at&&sl(et);if(!rt.measure.heights||at&&rt.measure.width!=ct){var wt=rt.measure.heights=[];if(at){rt.measure.width=ct;for(var Mt=rt.text.firstChild.getClientRects(),Bt=0;Bt<Mt.length-1;Bt++){var At=Mt[Bt],oe=Mt[Bt+1];Math.abs(At.bottom-oe.bottom)>2&&wt.push((At.bottom+oe.top)/2-ut.top)}}wt.push(ut.bottom-ut.top)}}function $a(et,rt,ut){if(et.line==rt)return{map:et.measure.map,cache:et.measure.cache};for(var at=0;at<et.rest.length;at++)if(et.rest[at]==rt)return{map:et.measure.maps[at],cache:et.measure.caches[at]};for(var ct=0;ct<et.rest.length;ct++)if(Rt(et.rest[ct])>ut)return{map:et.measure.maps[ct],cache:et.measure.caches[ct],before:!0}}function Ph(et,rt){rt=Gn(rt);var ut=Rt(rt),at=et.display.externalMeasured=new bo(et.doc,rt,ut);at.lineN=ut;var ct=at.built=un(et,at);return at.text=ct.pre,be(et.display.lineMeasure,ct.pre),at}function Cs(et,rt,ut,at){return Pl(et,fa(et,rt),ut,at)}function Ql(et,rt){if(rt>=et.display.viewFrom&&rt<et.display.viewTo)return et.display.view[ta(et,rt)];var ut=et.display.externalMeasured;if(ut&&rt>=ut.lineN&&rt<ut.lineN+ut.size)return ut}function fa(et,rt){var ut=Rt(rt),at=Ql(et,ut);at&&!at.text?at=null:at&&at.changes&&(ws(et,at,ut,Cu(et)),et.curOp.forceUpdate=!0),at||(at=Ph(et,rt));var ct=$a(at,rt,ut);return{line:rt,view:at,rect:null,map:ct.map,cache:ct.cache,before:ct.before,hasHeights:!1}}function Pl(et,rt,ut,at,ct){rt.before&&(ut=-1);var wt=ut+(at||""),Mt;return rt.cache.hasOwnProperty(wt)?Mt=rt.cache[wt]:(rt.rect||(rt.rect=rt.view.text.getBoundingClientRect()),rt.hasHeights||(jl(et,rt.view,rt.rect),rt.hasHeights=!0),Mt=di(et,rt,ut,at),Mt.bogus||(rt.cache[wt]=Mt)),{left:Mt.left,right:Mt.right,top:ct?Mt.rtop:Mt.top,bottom:ct?Mt.rbottom:Mt.bottom}}var qa={left:0,right:0,top:0,bottom:0};function tu(et,rt,ut){for(var at,ct,wt,Mt,Bt,At,oe=0;oe<et.length;oe+=3)if(Bt=et[oe],At=et[oe+1],rt<Bt?(ct=0,wt=1,Mt="left"):rt<At?(ct=rt-Bt,wt=ct+1):(oe==et.length-3||rt==At&&et[oe+3]>rt)&&(wt=At-Bt,ct=wt-1,rt>=At&&(Mt="right")),ct!=null){if(at=et[oe+2],Bt==At&&ut==(at.insertLeft?"left":"right")&&(Mt=ut),ut=="left"&&ct==0)for(;oe&&et[oe-2]==et[oe-3]&&et[oe-1].insertLeft;)at=et[(oe-=3)+2],Mt="left";if(ut=="right"&&ct==At-Bt)for(;oe<et.length-3&&et[oe+3]==et[oe+4]&&!et[oe+5].insertLeft;)at=et[(oe+=3)+2],Mt="right";break}return{node:at,start:ct,end:wt,collapse:Mt,coverStart:Bt,coverEnd:At}}function fi(et,rt){var ut=qa;if(rt=="left")for(var at=0;at<et.length&&(ut=et[at]).left==ut.right;at++);else for(var ct=et.length-1;ct>=0&&(ut=et[ct]).left==ut.right;ct--);return ut}function di(et,rt,ut,at){var ct=tu(rt.map,ut,at),wt=ct.node,Mt=ct.start,Bt=ct.end,At=ct.collapse,oe;if(wt.nodeType==3){for(var dn=0;dn<4;dn++){for(;Mt&&Zt(rt.line.text.charAt(ct.coverStart+Mt));)--Mt;for(;ct.coverStart+Bt<ct.coverEnd&&Zt(rt.line.text.charAt(ct.coverStart+Bt));)++Bt;if(_t&&Gt<9&&Mt==0&&Bt==ct.coverEnd-ct.coverStart?oe=wt.parentNode.getBoundingClientRect():oe=fi(ie(wt,Mt,Bt).getClientRects(),at),oe.left||oe.right||Mt==0)break;Bt=Mt,Mt=Mt-1,At="right"}_t&&Gt<11&&(oe=lr(et.display.measure,oe))}else{Mt>0&&(At=at="right");var pe;et.options.lineWrapping&&(pe=wt.getClientRects()).length>1?oe=pe[at=="right"?pe.length-1:0]:oe=wt.getBoundingClientRect()}if(_t&&Gt<9&&!Mt&&(!oe||!oe.left&&!oe.right)){var Kn=wt.parentNode.getClientRects()[0];Kn?oe={left:Kn.left,right:Kn.left+Ta(et.display),top:Kn.top,bottom:Kn.bottom}:oe=qa}for(var zn=oe.top-rt.rect.top,Pi=oe.bottom-rt.rect.top,Di=(zn+Pi)/2,Zi=rt.view.measure.heights,or=0;or<Zi.length-1&&!(Di<Zi[or]);or++);var vr=or?Zi[or-1]:0,dr=Zi[or],xr={left:(At=="right"?oe.right:oe.left)-rt.rect.left,right:(At=="left"?oe.left:oe.right)-rt.rect.left,top:vr,bottom:dr};return!oe.left&&!oe.right&&(xr.bogus=!0),et.options.singleCursorHeightPerLine||(xr.rtop=zn,xr.rbottom=Pi),xr}function lr(et,rt){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Bn(et))return rt;var ut=screen.logicalXDPI/screen.deviceXDPI,at=screen.logicalYDPI/screen.deviceYDPI;return{left:rt.left*ut,right:rt.right*ut,top:rt.top*at,bottom:rt.bottom*at}}function Nr(et){if(et.measure&&(et.measure.cache={},et.measure.heights=null,et.rest))for(var rt=0;rt<et.rest.length;rt++)et.measure.caches[rt]={}}function Ir(et){et.display.externalMeasure=null,Se(et.display.lineMeasure);for(var rt=0;rt<et.display.view.length;rt++)Nr(et.display.view[rt])}function Jr(et){Ir(et),et.display.cachedCharWidth=et.display.cachedTextHeight=et.display.cachedPaddingH=null,et.options.lineWrapping||(et.display.maxLineChanged=!0),et.display.lineNumChars=null}function vo(){return Yt&&ee?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Zo(){return Yt&&ee?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wo(et){var rt=0;if(et.widgets)for(var ut=0;ut<et.widgets.length;++ut)et.widgets[ut].above&&(rt+=hs(et.widgets[ut]));return rt}function ts(et,rt,ut,at,ct){if(!ct){var wt=Wo(rt);ut.top+=wt,ut.bottom+=wt}if(at=="line")return ut;at||(at="local");var Mt=br(rt);if(at=="local"?Mt+=Eo(et.display):Mt-=et.display.viewOffset,at=="page"||at=="window"){var Bt=et.display.lineSpace.getBoundingClientRect();Mt+=Bt.top+(at=="window"?0:Zo());var At=Bt.left+(at=="window"?0:vo());ut.left+=At,ut.right+=At}return ut.top+=Mt,ut.bottom+=Mt,ut}function ql(et,rt,ut){if(ut=="div")return rt;var at=rt.left,ct=rt.top;if(ut=="page")at-=vo(),ct-=Zo();else if(ut=="local"||!ut){var wt=et.display.sizer.getBoundingClientRect();at+=wt.left,ct+=wt.top}var Mt=et.display.lineSpace.getBoundingClientRect();return{left:at-Mt.left,top:ct-Mt.top}}function Nl(et,rt,ut,at,ct){return at||(at=Vn(et.doc,rt.line)),ts(et,at,Cs(et,at,rt.ch,ct),ut)}function Po(et,rt,ut,at,ct,wt){at=at||Vn(et.doc,rt.line),ct||(ct=fa(et,at));function Mt(Pi,Di){var Zi=Pl(et,ct,Pi,Di?"right":"left",wt);return Di?Zi.left=Zi.right:Zi.right=Zi.left,ts(et,at,Zi,ut)}var Bt=te(at,et.doc.direction),At=rt.ch,oe=rt.sticky;if(At>=at.text.length?(At=at.text.length,oe="before"):At<=0&&(At=0,oe="after"),!Bt)return Mt(oe=="before"?At-1:At,oe=="before");function dn(Pi,Di,Zi){var or=Bt[Di],vr=or.level==1;return Mt(Zi?Pi-1:Pi,vr!=Zi)}var pe=Te(Bt,At,oe),Kn=Ce,zn=dn(At,pe,oe=="before");return Kn!=null&&(zn.other=dn(At,Kn,oe!="before")),zn}function co(et,rt){var ut=0;rt=Xe(et.doc,rt),et.options.lineWrapping||(ut=Ta(et.display)*rt.ch);var at=Vn(et.doc,rt.line),ct=br(at)+Eo(et.display);return{left:ut,right:ut,top:ct,bottom:ct+at.height}}function Yr(et,rt,ut,at,ct){var wt=ae(et,rt,ut);return wt.xRel=ct,at&&(wt.outside=at),wt}function ys(et,rt,ut){var at=et.doc;if(ut+=et.display.viewOffset,ut<0)return Yr(at.first,0,null,-1,-1);var ct=Pe(at,ut),wt=at.first+at.size-1;if(ct>wt)return Yr(at.first+at.size-1,Vn(at,wt).text.length,null,1,1);rt<0&&(rt=0);for(var Mt=Vn(at,ct);;){var Bt=ti(et,Mt,ct,rt,ut),At=Ei(Mt,Bt.ch+(Bt.xRel>0||Bt.outside>0?1:0));if(!At)return Bt;var oe=At.find(1);if(oe.line==ct)return oe;Mt=Vn(at,ct=oe.line)}}function er(et,rt,ut,at){at-=Wo(rt);var ct=rt.text.length,wt=ue(function(Mt){return Pl(et,ut,Mt-1).bottom<=at},ct,0);return ct=ue(function(Mt){return Pl(et,ut,Mt).top>at},wt,ct),{begin:wt,end:ct}}function os(et,rt,ut,at){ut||(ut=fa(et,rt));var ct=ts(et,rt,Pl(et,ut,at),"line").top;return er(et,rt,ut,ct)}function ge(et,rt,ut,at){return et.bottom<=ut?!1:et.top>ut?!0:(at?et.left:et.right)>rt}function ti(et,rt,ut,at,ct){ct-=br(rt);var wt=fa(et,rt),Mt=Wo(rt),Bt=0,At=rt.text.length,oe=!0,dn=te(rt,et.doc.direction);if(dn){var pe=(et.options.lineWrapping?eu:pa)(et,rt,ut,wt,dn,at,ct);oe=pe.level!=1,Bt=oe?pe.from:pe.to-1,At=oe?pe.to:pe.from-1}var Kn=null,zn=null,Pi=ue(function(jr){var hr=Pl(et,wt,jr);return hr.top+=Mt,hr.bottom+=Mt,ge(hr,at,ct,!1)?(hr.top<=ct&&hr.left<=at&&(Kn=jr,zn=hr),!0):!1},Bt,At),Di,Zi,or=!1;if(zn){var vr=at-zn.left<zn.right-at,dr=vr==oe;Pi=Kn+(dr?0:1),Zi=dr?"after":"before",Di=vr?zn.left:zn.right}else{!oe&&(Pi==At||Pi==Bt)&&Pi++,Zi=Pi==0?"after":Pi==rt.text.length?"before":Pl(et,wt,Pi-(oe?1:0)).bottom+Mt<=ct==oe?"after":"before";var xr=Po(et,ae(ut,Pi,Zi),"line",rt,wt);Di=xr.left,or=ct<xr.top?-1:ct>=xr.bottom?1:0}return Pi=Ve(rt.text,Pi,1),Yr(ut,Pi,Zi,or,at-Di)}function pa(et,rt,ut,at,ct,wt,Mt){var Bt=ue(function(pe){var Kn=ct[pe],zn=Kn.level!=1;return ge(Po(et,ae(ut,zn?Kn.to:Kn.from,zn?"before":"after"),"line",rt,at),wt,Mt,!0)},0,ct.length-1),At=ct[Bt];if(Bt>0){var oe=At.level!=1,dn=Po(et,ae(ut,oe?At.from:At.to,oe?"after":"before"),"line",rt,at);ge(dn,wt,Mt,!0)&&dn.top>Mt&&(At=ct[Bt-1])}return At}function eu(et,rt,ut,at,ct,wt,Mt){var Bt=er(et,rt,at,Mt),At=Bt.begin,oe=Bt.end;/\s/.test(rt.text.charAt(oe-1))&&oe--;for(var dn=null,pe=null,Kn=0;Kn<ct.length;Kn++){var zn=ct[Kn];if(!(zn.from>=oe||zn.to<=At)){var Pi=zn.level!=1,Di=Pl(et,at,Pi?Math.min(oe,zn.to)-1:Math.max(At,zn.from)).right,Zi=Di<wt?wt-Di+1e9:Di-wt;(!dn||pe>Zi)&&(dn=zn,pe=Zi)}}return dn||(dn=ct[ct.length-1]),dn.from<At&&(dn={from:At,to:dn.to,level:dn.level}),dn.to>oe&&(dn={from:dn.from,to:oe,level:dn.level}),dn}var Tl;function ml(et){if(et.cachedTextHeight!=null)return et.cachedTextHeight;if(Tl==null){Tl=Le("pre",null,"CodeMirror-line-like");for(var rt=0;rt<49;++rt)Tl.appendChild(document.createTextNode("x")),Tl.appendChild(Le("br"));Tl.appendChild(document.createTextNode("x"))}be(et.measure,Tl);var ut=Tl.offsetHeight/50;return ut>3&&(et.cachedTextHeight=ut),Se(et.measure),ut||1}function Ta(et){if(et.cachedCharWidth!=null)return et.cachedCharWidth;var rt=Le("span","xxxxxxxxxx"),ut=Le("pre",[rt],"CodeMirror-line-like");be(et.measure,ut);var at=rt.getBoundingClientRect(),ct=(at.right-at.left)/10;return ct>2&&(et.cachedCharWidth=ct),ct||10}function Cu(et){for(var rt=et.display,ut={},at={},ct=rt.gutters.clientLeft,wt=rt.gutters.firstChild,Mt=0;wt;wt=wt.nextSibling,++Mt){var Bt=et.display.gutterSpecs[Mt].className;ut[Bt]=wt.offsetLeft+wt.clientLeft+ct,at[Bt]=wt.clientWidth}return{fixedPos:Xc(rt),gutterTotalWidth:rt.gutters.offsetWidth,gutterLeft:ut,gutterWidth:at,wrapperWidth:rt.wrapper.clientWidth}}function Xc(et){return et.scroller.getBoundingClientRect().left-et.sizer.getBoundingClientRect().left}function Vo(et){var rt=ml(et.display),ut=et.options.lineWrapping,at=ut&&Math.max(5,et.display.scroller.clientWidth/Ta(et.display)-3);return function(ct){if(kn(et.doc,ct))return 0;var wt=0;if(ct.widgets)for(var Mt=0;Mt<ct.widgets.length;Mt++)ct.widgets[Mt].height&&(wt+=ct.widgets[Mt].height);return ut?wt+(Math.ceil(ct.text.length/at)||1)*rt:wt+rt}}function Tr(et){var rt=et.doc,ut=Vo(et);rt.iter(function(at){var ct=ut(at);ct!=at.height&&Ci(at,ct)})}function gl(et,rt,ut,at){var ct=et.display;if(!ut&&Ke(rt).getAttribute("cm-not-content")=="true")return null;var wt,Mt,Bt=ct.lineSpace.getBoundingClientRect();try{wt=rt.clientX-Bt.left,Mt=rt.clientY-Bt.top}catch(pe){return null}var At=ys(et,wt,Mt),oe;if(at&&At.xRel>0&&(oe=Vn(et.doc,At.line).text).length==At.ch){var dn=zt(oe,oe.length,et.options.tabSize)-oe.length;At=ae(At.line,Math.max(0,Math.round((wt-pl(et.display).left)/Ta(et.display))-dn))}return At}function ta(et,rt){if(rt>=et.display.viewTo||(rt-=et.display.viewFrom,rt<0))return null;for(var ut=et.display.view,at=0;at<ut.length;at++)if(rt-=ut[at].size,rt<0)return at}function Ko(et,rt,ut,at){rt==null&&(rt=et.doc.first),ut==null&&(ut=et.doc.first+et.doc.size),at||(at=0);var ct=et.display;if(at&&ut<ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>rt)&&(ct.updateLineNumbers=rt),et.curOp.viewChanged=!0,rt>=ct.viewTo)$e&&pi(et.doc,rt)<ct.viewTo&&ds(et);else if(ut<=ct.viewFrom)$e&&ni(et.doc,ut+at)>ct.viewFrom?ds(et):(ct.viewFrom+=at,ct.viewTo+=at);else if(rt<=ct.viewFrom&&ut>=ct.viewTo)ds(et);else if(rt<=ct.viewFrom){var wt=kl(et,ut,ut+at,1);wt?(ct.view=ct.view.slice(wt.index),ct.viewFrom=wt.lineN,ct.viewTo+=at):ds(et)}else if(ut>=ct.viewTo){var Mt=kl(et,rt,rt,-1);Mt?(ct.view=ct.view.slice(0,Mt.index),ct.viewTo=Mt.lineN):ds(et)}else{var Bt=kl(et,rt,rt,-1),At=kl(et,ut,ut+at,1);Bt&&At?(ct.view=ct.view.slice(0,Bt.index).concat(Ar(et,Bt.lineN,At.lineN)).concat(ct.view.slice(At.index)),ct.viewTo+=at):ds(et)}var oe=ct.externalMeasured;oe&&(ut<oe.lineN?oe.lineN+=at:rt<oe.lineN+oe.size&&(ct.externalMeasured=null))}function Xr(et,rt,ut){et.curOp.viewChanged=!0;var at=et.display,ct=et.display.externalMeasured;if(ct&&rt>=ct.lineN&&rt<ct.lineN+ct.size&&(at.externalMeasured=null),!(rt<at.viewFrom||rt>=at.viewTo)){var wt=at.view[ta(et,rt)];if(wt.node!=null){var Mt=wt.changes||(wt.changes=[]);Ye(Mt,ut)==-1&&Mt.push(ut)}}}function ds(et){et.display.viewFrom=et.display.viewTo=et.doc.first,et.display.view=[],et.display.viewOffset=0}function kl(et,rt,ut,at){var ct=ta(et,rt),wt,Mt=et.display.view;if(!$e||ut==et.doc.first+et.doc.size)return{index:ct,lineN:ut};for(var Bt=et.display.viewFrom,At=0;At<ct;At++)Bt+=Mt[At].size;if(Bt!=rt){if(at>0){if(ct==Mt.length-1)return null;wt=Bt+Mt[ct].size-rt,ct++}else wt=Bt-rt;rt+=wt,ut+=wt}for(;pi(et.doc,ut)!=ut;){if(ct==(at<0?0:Mt.length-1))return null;ut+=at*Mt[ct-(at<0?1:0)].size,ct+=at}return{index:ct,lineN:ut}}function Ao(et,rt,ut){var at=et.display,ct=at.view;ct.length==0||rt>=at.viewTo||ut<=at.viewFrom?(at.view=Ar(et,rt,ut),at.viewFrom=rt):(at.viewFrom>rt?at.view=Ar(et,rt,at.viewFrom).concat(at.view):at.viewFrom<rt&&(at.view=at.view.slice(ta(et,rt))),at.viewFrom=rt,at.viewTo<ut?at.view=at.view.concat(Ar(et,at.viewTo,ut)):at.viewTo>ut&&(at.view=at.view.slice(0,ta(et,ut)))),at.viewTo=ut}function zl(et){for(var rt=et.display.view,ut=0,at=0;at<rt.length;at++){var ct=rt[at];!ct.hidden&&(!ct.node||ct.changes)&&++ut}return ut}function Ps(et){et.display.input.showSelection(et.display.input.prepareSelection())}function Hu(et,rt){rt===void 0&&(rt=!0);for(var ut=et.doc,at={},ct=at.cursors=document.createDocumentFragment(),wt=at.selection=document.createDocumentFragment(),Mt=0;Mt<ut.sel.ranges.length;Mt++)if(!(!rt&&Mt==ut.sel.primIndex)){var Bt=ut.sel.ranges[Mt];if(!(Bt.from().line>=et.display.viewTo||Bt.to().line<et.display.viewFrom)){var At=Bt.empty();(At||et.options.showCursorWhenSelecting)&&ao(et,Bt.head,ct),At||so(et,Bt,wt)}}return at}function ao(et,rt,ut){var at=Po(et,rt,"div",null,null,!et.options.singleCursorHeightPerLine),ct=ut.appendChild(Le("div","\xA0","CodeMirror-cursor"));if(ct.style.left=at.left+"px",ct.style.top=at.top+"px",ct.style.height=Math.max(0,at.bottom-at.top)*et.options.cursorHeight+"px",at.other){var wt=ut.appendChild(Le("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));wt.style.display="",wt.style.left=at.other.left+"px",wt.style.top=at.other.top+"px",wt.style.height=(at.other.bottom-at.other.top)*.85+"px"}}function vl(et,rt){return et.top-rt.top||et.left-rt.left}function so(et,rt,ut){var at=et.display,ct=et.doc,wt=document.createDocumentFragment(),Mt=pl(et.display),Bt=Mt.left,At=Math.max(at.sizerWidth,sl(et)-at.sizer.offsetLeft)-Mt.right,oe=ct.direction=="ltr";function dn(dr,xr,jr,hr){xr<0&&(xr=0),xr=Math.round(xr),hr=Math.round(hr),wt.appendChild(Le("div",null,"CodeMirror-selected","position: absolute; left: "+dr+`px;
|
|
|
top: `+xr+"px; width: "+(jr==null?At-dr:jr)+`px;
|
|
|
height: `+(hr-xr)+"px"))}function pe(dr,xr,jr){var hr=Vn(ct,dr),qr=hr.text.length,_o,ks;function ns(bs,Wl){return Nl(et,ae(dr,bs),"div",hr,Wl)}function Dl(bs,Wl,qs){var Es=os(et,hr,null,bs),xo=Wl=="ltr"==(qs=="after")?"left":"right",ls=qs=="after"?Es.begin:Es.end-(/\s/.test(hr.text.charAt(Es.end-1))?2:1);return ns(ls,xo)[xo]}var al=te(hr,ct.direction);return re(al,xr||0,jr==null?qr:jr,function(bs,Wl,qs,Es){var xo=qs=="ltr",ls=ns(bs,xo?"left":"right"),$s=ns(Wl-1,xo?"right":"left"),tl=xr==null&&bs==0,Oa=jr==null&&Wl==qr,is=Es==0,xa=!al||Es==al.length-1;if($s.top-ls.top<=3){var cs=(oe?tl:Oa)&&is,xd=(oe?Oa:tl)&&xa,ra=cs?Bt:(xo?ls:$s).left,Vl=xd?At:(xo?$s:ls).right;dn(ra,ls.top,Vl-ra,ls.bottom)}else{var Il,Bo,Hs,lu;xo?(Il=oe&&tl&&is?Bt:ls.left,Bo=oe?At:Dl(bs,qs,"before"),Hs=oe?Bt:Dl(Wl,qs,"after"),lu=oe&&Oa&&xa?At:$s.right):(Il=oe?Dl(bs,qs,"before"):Bt,Bo=!oe&&tl&&is?At:ls.right,Hs=!oe&&Oa&&xa?Bt:$s.left,lu=oe?Dl(Wl,qs,"after"):At),dn(Il,ls.top,Bo-Il,ls.bottom),ls.bottom<$s.top&&dn(Bt,ls.bottom,null,$s.top),dn(Hs,$s.top,lu-Hs,$s.bottom)}(!_o||vl(ls,_o)<0)&&(_o=ls),vl($s,_o)<0&&(_o=$s),(!ks||vl(ls,ks)<0)&&(ks=ls),vl($s,ks)<0&&(ks=$s)}),{start:_o,end:ks}}var Kn=rt.from(),zn=rt.to();if(Kn.line==zn.line)pe(Kn.line,Kn.ch,zn.ch);else{var Pi=Vn(ct,Kn.line),Di=Vn(ct,zn.line),Zi=Gn(Pi)==Gn(Di),or=pe(Kn.line,Kn.ch,Zi?Pi.text.length+1:null).end,vr=pe(zn.line,Zi?0:null,zn.ch).start;Zi&&(or.top<vr.top-2?(dn(or.right,or.top,null,or.bottom),dn(Bt,vr.top,vr.left,vr.bottom)):dn(or.right,or.top,vr.left-or.right,or.bottom)),or.bottom<vr.top&&dn(Bt,or.bottom,null,vr.top)}ut.appendChild(wt)}function No(et){if(et.state.focused){var rt=et.display;clearInterval(rt.blinker);var ut=!0;rt.cursorDiv.style.visibility="",et.options.cursorBlinkRate>0?rt.blinker=setInterval(function(){et.hasFocus()||Nh(et),rt.cursorDiv.style.visibility=(ut=!ut)?"":"hidden"},et.options.cursorBlinkRate):et.options.cursorBlinkRate<0&&(rt.cursorDiv.style.visibility="hidden")}}function zo(et){et.state.focused||(et.display.input.focus(),fo(et))}function Yo(et){et.state.delayingBlurEvent=!0,setTimeout(function(){et.state.delayingBlurEvent&&(et.state.delayingBlurEvent=!1,Nh(et))},100)}function fo(et,rt){et.state.delayingBlurEvent&&(et.state.delayingBlurEvent=!1),et.options.readOnly!="nocursor"&&(et.state.focused||(In(et,"focus",et,rt),et.state.focused=!0,Tt(et.display.wrapper,"CodeMirror-focused"),!et.curOp&&et.display.selForContextMenu!=et.doc.sel&&(et.display.input.reset(),Vt&&setTimeout(function(){return et.display.input.reset(!0)},20)),et.display.input.receivedFocus()),No(et))}function Nh(et,rt){et.state.delayingBlurEvent||(et.state.focused&&(In(et,"blur",et,rt),et.state.focused=!1,Qt(et.display.wrapper,"CodeMirror-focused")),clearInterval(et.display.blinker),setTimeout(function(){et.state.focused||(et.display.shift=!1)},150))}function Mr(et){for(var rt=et.display,ut=rt.lineDiv.offsetTop,at=0;at<rt.view.length;at++){var ct=rt.view[at],wt=et.options.lineWrapping,Mt=void 0,Bt=0;if(!ct.hidden){if(_t&&Gt<8){var At=ct.node.offsetTop+ct.node.offsetHeight;Mt=At-ut,ut=At}else{var oe=ct.node.getBoundingClientRect();Mt=oe.bottom-oe.top,!wt&&ct.text.firstChild&&(Bt=ct.text.firstChild.getBoundingClientRect().right-oe.left-1)}var dn=ct.line.height-Mt;if((dn>.005||dn<-.005)&&(Ci(ct.line,Mt),Am(ct.line),ct.rest))for(var pe=0;pe<ct.rest.length;pe++)Am(ct.rest[pe]);if(Bt>et.display.sizerWidth){var Kn=Math.ceil(Bt/Ta(et.display));Kn>et.display.maxLineLength&&(et.display.maxLineLength=Kn,et.display.maxLine=ct.line,et.display.maxLineChanged=!0)}}}}function Am(et){if(et.widgets)for(var rt=0;rt<et.widgets.length;++rt){var ut=et.widgets[rt],at=ut.node.parentNode;at&&(ut.height=at.offsetHeight)}}function io(et,rt,ut){var at=ut&&ut.top!=null?Math.max(0,ut.top):et.scroller.scrollTop;at=Math.floor(at-Eo(et));var ct=ut&&ut.bottom!=null?ut.bottom:at+et.wrapper.clientHeight,wt=Pe(rt,at),Mt=Pe(rt,ct);if(ut&&ut.ensure){var Bt=ut.ensure.from.line,At=ut.ensure.to.line;Bt<wt?(wt=Bt,Mt=Pe(rt,br(Vn(rt,Bt))+et.wrapper.clientHeight)):Math.min(At,rt.lastLine())>=Mt&&(wt=Pe(rt,br(Vn(rt,At))-et.wrapper.clientHeight),Mt=At)}return{from:wt,to:Math.max(Mt,wt+1)}}function Fm(et,rt){if(!sn(et,"scrollCursorIntoView")){var ut=et.display,at=ut.sizer.getBoundingClientRect(),ct=null;if(rt.top+at.top<0?ct=!0:rt.bottom+at.top>(window.innerHeight||document.documentElement.clientHeight)&&(ct=!1),ct!=null&&!Me){var wt=Le("div","\u200B",null,`position: absolute;
|
|
|
top: `+(rt.top-ut.viewOffset-Eo(et.display))+`px;
|
|
|
height: `+(rt.bottom-rt.top+As(et)+ut.barHeight)+`px;
|
|
|
left: `+rt.left+"px; width: "+Math.max(2,rt.right-rt.left)+"px;");et.display.lineSpace.appendChild(wt),wt.scrollIntoView(ct),et.display.lineSpace.removeChild(wt)}}}function pc(et,rt,ut,at){at==null&&(at=0);var ct;!et.options.lineWrapping&&rt==ut&&(rt=rt.ch?ae(rt.line,rt.sticky=="before"?rt.ch-1:rt.ch,"after"):rt,ut=rt.sticky=="before"?ae(rt.line,rt.ch+1,"before"):rt);for(var wt=0;wt<5;wt++){var Mt=!1,Bt=Po(et,rt),At=!ut||ut==rt?Bt:Po(et,ut);ct={left:Math.min(Bt.left,At.left),top:Math.min(Bt.top,At.top)-at,right:Math.max(Bt.left,At.left),bottom:Math.max(Bt.bottom,At.bottom)+at};var oe=tp(et,ct),dn=et.doc.scrollTop,pe=et.doc.scrollLeft;if(oe.scrollTop!=null&&(kh(et,oe.scrollTop),Math.abs(et.doc.scrollTop-dn)>1&&(Mt=!0)),oe.scrollLeft!=null&&(bu(et,oe.scrollLeft),Math.abs(et.doc.scrollLeft-pe)>1&&(Mt=!0)),!Mt)break}return ct}function Jc(et,rt){var ut=tp(et,rt);ut.scrollTop!=null&&kh(et,ut.scrollTop),ut.scrollLeft!=null&&bu(et,ut.scrollLeft)}function tp(et,rt){var ut=et.display,at=ml(et.display);rt.top<0&&(rt.top=0);var ct=et.curOp&&et.curOp.scrollTop!=null?et.curOp.scrollTop:ut.scroller.scrollTop,wt=da(et),Mt={};rt.bottom-rt.top>wt&&(rt.bottom=rt.top+wt);var Bt=et.doc.height+Is(ut),At=rt.top<at,oe=rt.bottom>Bt-at;if(rt.top<ct)Mt.scrollTop=At?0:rt.top;else if(rt.bottom>ct+wt){var dn=Math.min(rt.top,(oe?Bt:rt.bottom)-wt);dn!=ct&&(Mt.scrollTop=dn)}var pe=et.options.fixedGutter?0:ut.gutters.offsetWidth,Kn=et.curOp&&et.curOp.scrollLeft!=null?et.curOp.scrollLeft:ut.scroller.scrollLeft-pe,zn=sl(et)-ut.gutters.offsetWidth,Pi=rt.right-rt.left>zn;return Pi&&(rt.right=rt.left+zn),rt.left<10?Mt.scrollLeft=0:rt.left<Kn?Mt.scrollLeft=Math.max(0,rt.left+pe-(Pi?0:10)):rt.right>zn+Kn-3&&(Mt.scrollLeft=rt.right+(Pi?0:10)-zn),Mt}function Zd(et,rt){rt!=null&&(nu(et),et.curOp.scrollTop=(et.curOp.scrollTop==null?et.doc.scrollTop:et.curOp.scrollTop)+rt)}function Su(et){nu(et);var rt=et.getCursor();et.curOp.scrollToPos={from:rt,to:rt,margin:et.options.cursorScrollMargin}}function Th(et,rt,ut){(rt!=null||ut!=null)&&nu(et),rt!=null&&(et.curOp.scrollLeft=rt),ut!=null&&(et.curOp.scrollTop=ut)}function po(et,rt){nu(et),et.curOp.scrollToPos=rt}function nu(et){var rt=et.curOp.scrollToPos;if(rt){et.curOp.scrollToPos=null;var ut=co(et,rt.from),at=co(et,rt.to);Wd(et,ut,at,rt.margin)}}function Wd(et,rt,ut,at){var ct=tp(et,{left:Math.min(rt.left,ut.left),top:Math.min(rt.top,ut.top)-at,right:Math.max(rt.right,ut.right),bottom:Math.max(rt.bottom,ut.bottom)+at});Th(et,ct.scrollLeft,ct.scrollTop)}function kh(et,rt){Math.abs(et.doc.scrollTop-rt)<2||(lt||Gu(et,{top:rt}),ep(et,rt,!0),lt&&Gu(et),mc(et,100))}function ep(et,rt,ut){rt=Math.max(0,Math.min(et.display.scroller.scrollHeight-et.display.scroller.clientHeight,rt)),!(et.display.scroller.scrollTop==rt&&!ut)&&(et.doc.scrollTop=rt,et.display.scrollbars.setScrollTop(rt),et.display.scroller.scrollTop!=rt&&(et.display.scroller.scrollTop=rt))}function bu(et,rt,ut,at){rt=Math.max(0,Math.min(rt,et.display.scroller.scrollWidth-et.display.scroller.clientWidth)),!((ut?rt==et.doc.scrollLeft:Math.abs(et.doc.scrollLeft-rt)<2)&&!at)&&(et.doc.scrollLeft=rt,_d(et),et.display.scroller.scrollLeft!=rt&&(et.display.scroller.scrollLeft=rt),et.display.scrollbars.setScrollLeft(rt))}function ma(et){var rt=et.display,ut=rt.gutters.offsetWidth,at=Math.round(et.doc.height+Is(et.display));return{clientHeight:rt.scroller.clientHeight,viewHeight:rt.wrapper.clientHeight,scrollWidth:rt.scroller.scrollWidth,clientWidth:rt.scroller.clientWidth,viewWidth:rt.wrapper.clientWidth,barLeft:et.options.fixedGutter?ut:0,docHeight:at,scrollHeight:at+As(et)+rt.barHeight,nativeBarWidth:rt.nativeBarWidth,gutterWidth:ut}}var Zu=function(et,rt,ut){this.cm=ut;var at=this.vert=Le("div",[Le("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ct=this.horiz=Le("div",[Le("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");at.tabIndex=ct.tabIndex=-1,et(at),et(ct),bn(at,"scroll",function(){at.clientHeight&&rt(at.scrollTop,"vertical")}),bn(ct,"scroll",function(){ct.clientWidth&&rt(ct.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_t&&Gt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Zu.prototype.update=function(et){var rt=et.scrollWidth>et.clientWidth+1,ut=et.scrollHeight>et.clientHeight+1,at=et.nativeBarWidth;if(ut){this.vert.style.display="block",this.vert.style.bottom=rt?at+"px":"0";var ct=et.viewHeight-(rt?at:0);this.vert.firstChild.style.height=Math.max(0,et.scrollHeight-et.clientHeight+ct)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(rt){this.horiz.style.display="block",this.horiz.style.right=ut?at+"px":"0",this.horiz.style.left=et.barLeft+"px";var wt=et.viewWidth-et.barLeft-(ut?at:0);this.horiz.firstChild.style.width=Math.max(0,et.scrollWidth-et.clientWidth+wt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&et.clientHeight>0&&(at==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ut?at:0,bottom:rt?at:0}},Zu.prototype.setScrollLeft=function(et){this.horiz.scrollLeft!=et&&(this.horiz.scrollLeft=et),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Zu.prototype.setScrollTop=function(et){this.vert.scrollTop!=et&&(this.vert.scrollTop=et),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Zu.prototype.zeroWidthHack=function(){var et=Ht&&!jt?"12px":"18px";this.horiz.style.height=this.vert.style.width=et,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new kt,this.disableVert=new kt},Zu.prototype.enableZeroWidthBar=function(et,rt,ut){et.style.pointerEvents="auto";function at(){var ct=et.getBoundingClientRect(),wt=ut=="vert"?document.elementFromPoint(ct.right-1,(ct.top+ct.bottom)/2):document.elementFromPoint((ct.right+ct.left)/2,ct.bottom-1);wt!=et?et.style.pointerEvents="none":rt.set(1e3,at)}rt.set(1e3,at)},Zu.prototype.clear=function(){var et=this.horiz.parentNode;et.removeChild(this.horiz),et.removeChild(this.vert)};var Ha=function(){};Ha.prototype.update=function(){return{bottom:0,right:0}},Ha.prototype.setScrollLeft=function(){},Ha.prototype.setScrollTop=function(){},Ha.prototype.clear=function(){};function Wu(et,rt){rt||(rt=ma(et));var ut=et.display.barWidth,at=et.display.barHeight;Vd(et,rt);for(var ct=0;ct<4&&ut!=et.display.barWidth||at!=et.display.barHeight;ct++)ut!=et.display.barWidth&&et.options.lineWrapping&&Mr(et),Vd(et,ma(et)),ut=et.display.barWidth,at=et.display.barHeight}function Vd(et,rt){var ut=et.display,at=ut.scrollbars.update(rt);ut.sizer.style.paddingRight=(ut.barWidth=at.right)+"px",ut.sizer.style.paddingBottom=(ut.barHeight=at.bottom)+"px",ut.heightForcer.style.borderBottom=at.bottom+"px solid transparent",at.right&&at.bottom?(ut.scrollbarFiller.style.display="block",ut.scrollbarFiller.style.height=at.bottom+"px",ut.scrollbarFiller.style.width=at.right+"px"):ut.scrollbarFiller.style.display="",at.bottom&&et.options.coverGutterNextToScrollbar&&et.options.fixedGutter?(ut.gutterFiller.style.display="block",ut.gutterFiller.style.height=at.bottom+"px",ut.gutterFiller.style.width=rt.gutterWidth+"px"):ut.gutterFiller.style.display=""}var np={native:Zu,null:Ha};function ip(et){et.display.scrollbars&&(et.display.scrollbars.clear(),et.display.scrollbars.addClass&&Qt(et.display.wrapper,et.display.scrollbars.addClass)),et.display.scrollbars=new np[et.options.scrollbarStyle](function(rt){et.display.wrapper.insertBefore(rt,et.display.scrollbarFiller),bn(rt,"mousedown",function(){et.state.focused&&setTimeout(function(){return et.display.input.focus()},0)}),rt.setAttribute("cm-not-content","true")},function(rt,ut){ut=="horizontal"?bu(et,rt):kh(et,rt)},et),et.display.scrollbars.addClass&&Tt(et.display.wrapper,et.display.scrollbars.addClass)}var Bm=0;function Vu(et){et.curOp={cm:et,viewChanged:!1,startHeight:et.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:++Bm},lo(et.curOp)}function Ku(et){var rt=et.curOp;rt&&Er(rt,function(ut){for(var at=0;at<ut.ops.length;at++)ut.ops[at].cm.curOp=null;Jv(ut)})}function Jv(et){for(var rt=et.ops,ut=0;ut<rt.length;ut++)Qv(rt[ut]);for(var at=0;at<rt.length;at++)qv(rt[at]);for(var ct=0;ct<rt.length;ct++)Rm(rt[ct]);for(var wt=0;wt<rt.length;wt++)ss(rt[wt]);for(var Mt=0;Mt<rt.length;Mt++)_u(rt[Mt])}function Qv(et){var rt=et.cm,ut=rt.display;jm(rt),et.updateMaxLine&&Or(rt),et.mustUpdate=et.viewChanged||et.forceUpdate||et.scrollTop!=null||et.scrollToPos&&(et.scrollToPos.from.line<ut.viewFrom||et.scrollToPos.to.line>=ut.viewTo)||ut.maxLineChanged&&rt.options.lineWrapping,et.update=et.mustUpdate&&new Oh(rt,et.mustUpdate&&{top:et.scrollTop,ensure:et.scrollToPos},et.forceUpdate)}function qv(et){et.updatedDisplay=et.mustUpdate&&Kd(et.cm,et.update)}function Rm(et){var rt=et.cm,ut=rt.display;et.updatedDisplay&&Mr(rt),et.barMeasure=ma(rt),ut.maxLineChanged&&!rt.options.lineWrapping&&(et.adjustWidthTo=Cs(rt,ut.maxLine,ut.maxLine.text.length).left+3,rt.display.sizerWidth=et.adjustWidthTo,et.barMeasure.scrollWidth=Math.max(ut.scroller.clientWidth,ut.sizer.offsetLeft+et.adjustWidthTo+As(rt)+rt.display.barWidth),et.maxScrollLeft=Math.max(0,ut.sizer.offsetLeft+et.adjustWidthTo-sl(rt))),(et.updatedDisplay||et.selectionChanged)&&(et.preparedSelection=ut.input.prepareSelection())}function ss(et){var rt=et.cm;et.adjustWidthTo!=null&&(rt.display.sizer.style.minWidth=et.adjustWidthTo+"px",et.maxScrollLeft<rt.doc.scrollLeft&&bu(rt,Math.min(rt.display.scroller.scrollLeft,et.maxScrollLeft),!0),rt.display.maxLineChanged=!1);var ut=et.focus&&et.focus==De();et.preparedSelection&&rt.display.input.showSelection(et.preparedSelection,ut),(et.updatedDisplay||et.startHeight!=rt.doc.height)&&Wu(rt,et.barMeasure),et.updatedDisplay&&Yu(rt,et.barMeasure),et.selectionChanged&&No(rt),rt.state.focused&&et.updateInput&&rt.display.input.reset(et.typing),ut&&zo(et.cm)}function _u(et){var rt=et.cm,ut=rt.display,at=rt.doc;if(et.updatedDisplay&&To(rt,et.update),ut.wheelStartX!=null&&(et.scrollTop!=null||et.scrollLeft!=null||et.scrollToPos)&&(ut.wheelStartX=ut.wheelStartY=null),et.scrollTop!=null&&ep(rt,et.scrollTop,et.forceScroll),et.scrollLeft!=null&&bu(rt,et.scrollLeft,!0,!0),et.scrollToPos){var ct=pc(rt,Xe(at,et.scrollToPos.from),Xe(at,et.scrollToPos.to),et.scrollToPos.margin);Fm(rt,ct)}var wt=et.maybeHiddenMarkers,Mt=et.maybeUnhiddenMarkers;if(wt)for(var Bt=0;Bt<wt.length;++Bt)wt[Bt].lines.length||In(wt[Bt],"hide");if(Mt)for(var At=0;At<Mt.length;++At)Mt[At].lines.length&&In(Mt[At],"unhide");ut.wrapper.offsetHeight&&(at.scrollTop=rt.display.scroller.scrollTop),et.changeObjs&&In(rt,"changes",rt,et.changeObjs),et.update&&et.update.finish()}function wo(et,rt){if(et.curOp)return rt();Vu(et);try{return rt()}finally{Ku(et)}}function Ns(et,rt){return function(){if(et.curOp)return rt.apply(et,arguments);Vu(et);try{return rt.apply(et,arguments)}finally{Ku(et)}}}function Fs(et){return function(){if(this.curOp)return et.apply(this,arguments);Vu(this);try{return et.apply(this,arguments)}finally{Ku(this)}}}function Bs(et){return function(){var rt=this.cm;if(!rt||rt.curOp)return et.apply(this,arguments);Vu(rt);try{return et.apply(this,arguments)}finally{Ku(rt)}}}function mc(et,rt){et.doc.highlightFrontier<et.display.viewTo&&et.state.highlight.set(rt,Ue(Rs,et))}function Rs(et){var rt=et.doc;if(!(rt.highlightFrontier>=et.display.viewTo)){var ut=+new Date+et.options.workTime,at=Ji(et,rt.highlightFrontier),ct=[];rt.iter(at.line,Math.min(rt.first+rt.size,et.display.viewTo+500),function(wt){if(at.line>=et.display.viewFrom){var Mt=wt.styles,Bt=wt.text.length>et.options.maxHighlightLength?Hi(rt.mode,at.state):null,At=vi(et,wt,at,!0);Bt&&(at.state=Bt),wt.styles=At.styles;var oe=wt.styleClasses,dn=At.classes;dn?wt.styleClasses=dn:oe&&(wt.styleClasses=null);for(var pe=!Mt||Mt.length!=wt.styles.length||oe!=dn&&(!oe||!dn||oe.bgClass!=dn.bgClass||oe.textClass!=dn.textClass),Kn=0;!pe&&Kn<Mt.length;++Kn)pe=Mt[Kn]!=wt.styles[Kn];pe&&ct.push(at.line),wt.stateAfter=at.save(),at.nextLine()}else wt.text.length<=et.options.maxHighlightLength&&yn(et,wt.text,at),wt.stateAfter=at.line%5==0?at.save():null,at.nextLine();if(+new Date>ut)return mc(et,et.options.workDelay),!0}),rt.highlightFrontier=at.line,rt.modeFrontier=Math.max(rt.modeFrontier,at.line),ct.length&&wo(et,function(){for(var wt=0;wt<ct.length;wt++)Xr(et,ct[wt],"text")})}}var Oh=function(et,rt,ut){var at=et.display;this.viewport=rt,this.visible=io(at,et.doc,rt),this.editorIsHidden=!at.wrapper.offsetWidth,this.wrapperHeight=at.wrapper.clientHeight,this.wrapperWidth=at.wrapper.clientWidth,this.oldDisplayWidth=sl(et),this.force=ut,this.dims=Cu(et),this.events=[]};Oh.prototype.signal=function(et,rt){Mn(et,rt)&&this.events.push(arguments)},Oh.prototype.finish=function(){for(var et=0;et<this.events.length;et++)In.apply(null,this.events[et])};function jm(et){var rt=et.display;!rt.scrollbarsClipped&&rt.scroller.offsetWidth&&(rt.nativeBarWidth=rt.scroller.offsetWidth-rt.scroller.clientWidth,rt.heightForcer.style.height=As(et)+"px",rt.sizer.style.marginBottom=-rt.nativeBarWidth+"px",rt.sizer.style.borderRightWidth=As(et)+"px",rt.scrollbarsClipped=!0)}function zm(et){if(et.hasFocus())return null;var rt=De();if(!rt||!Re(et.display.lineDiv,rt))return null;var ut={activeElt:rt};if(window.getSelection){var at=window.getSelection();at.anchorNode&&at.extend&&Re(et.display.lineDiv,at.anchorNode)&&(ut.anchorNode=at.anchorNode,ut.anchorOffset=at.anchorOffset,ut.focusNode=at.focusNode,ut.focusOffset=at.focusOffset)}return ut}function Ol(et){if(!(!et||!et.activeElt||et.activeElt==De())&&(et.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(et.activeElt.nodeName)&&et.anchorNode&&Re(document.body,et.anchorNode)&&Re(document.body,et.focusNode))){var rt=window.getSelection(),ut=document.createRange();ut.setEnd(et.anchorNode,et.anchorOffset),ut.collapse(!1),rt.removeAllRanges(),rt.addRange(ut),rt.extend(et.focusNode,et.focusOffset)}}function Kd(et,rt){var ut=et.display,at=et.doc;if(rt.editorIsHidden)return ds(et),!1;if(!rt.force&&rt.visible.from>=ut.viewFrom&&rt.visible.to<=ut.viewTo&&(ut.updateLineNumbers==null||ut.updateLineNumbers>=ut.viewTo)&&ut.renderedView==ut.view&&zl(et)==0)return!1;xs(et)&&(ds(et),rt.dims=Cu(et));var ct=at.first+at.size,wt=Math.max(rt.visible.from-et.options.viewportMargin,at.first),Mt=Math.min(ct,rt.visible.to+et.options.viewportMargin);ut.viewFrom<wt&&wt-ut.viewFrom<20&&(wt=Math.max(at.first,ut.viewFrom)),ut.viewTo>Mt&&ut.viewTo-Mt<20&&(Mt=Math.min(ct,ut.viewTo)),$e&&(wt=pi(et.doc,wt),Mt=ni(et.doc,Mt));var Bt=wt!=ut.viewFrom||Mt!=ut.viewTo||ut.lastWrapHeight!=rt.wrapperHeight||ut.lastWrapWidth!=rt.wrapperWidth;Ao(et,wt,Mt),ut.viewOffset=br(Vn(et.doc,ut.viewFrom)),et.display.mover.style.top=ut.viewOffset+"px";var At=zl(et);if(!Bt&&At==0&&!rt.force&&ut.renderedView==ut.view&&(ut.updateLineNumbers==null||ut.updateLineNumbers>=ut.viewTo))return!1;var oe=zm(et);return At>4&&(ut.lineDiv.style.display="none"),rp(et,ut.updateLineNumbers,rt.dims),At>4&&(ut.lineDiv.style.display=""),ut.renderedView=ut.view,Ol(oe),Se(ut.cursorDiv),Se(ut.selectionDiv),ut.gutters.style.height=ut.sizer.style.minHeight=0,Bt&&(ut.lastWrapHeight=rt.wrapperHeight,ut.lastWrapWidth=rt.wrapperWidth,mc(et,400)),ut.updateLineNumbers=null,!0}function To(et,rt){for(var ut=rt.viewport,at=!0;;at=!1){if(!at||!et.options.lineWrapping||rt.oldDisplayWidth==sl(et)){if(ut&&ut.top!=null&&(ut={top:Math.min(et.doc.height+Is(et.display)-da(et),ut.top)}),rt.visible=io(et.display,et.doc,ut),rt.visible.from>=et.display.viewFrom&&rt.visible.to<=et.display.viewTo)break}else at&&(rt.visible=io(et.display,et.doc,ut));if(!Kd(et,rt))break;Mr(et);var ct=ma(et);Ps(et),Wu(et,ct),Yu(et,ct),rt.force=!1}rt.signal(et,"update",et),(et.display.viewFrom!=et.display.reportedViewFrom||et.display.viewTo!=et.display.reportedViewTo)&&(rt.signal(et,"viewportChange",et,et.display.viewFrom,et.display.viewTo),et.display.reportedViewFrom=et.display.viewFrom,et.display.reportedViewTo=et.display.viewTo)}function Gu(et,rt){var ut=new Oh(et,rt);if(Kd(et,ut)){Mr(et),To(et,ut);var at=ma(et);Ps(et),Wu(et,at),Yu(et,at),ut.finish()}}function rp(et,rt,ut){var at=et.display,ct=et.options.lineNumbers,wt=at.lineDiv,Mt=wt.firstChild;function Bt(Pi){var Di=Pi.nextSibling;return Vt&&Ht&&et.display.currentWheelTarget==Pi?Pi.style.display="none":Pi.parentNode.removeChild(Pi),Di}for(var At=at.view,oe=at.viewFrom,dn=0;dn<At.length;dn++){var pe=At[dn];if(!pe.hidden)if(!pe.node||pe.node.parentNode!=wt){var Kn=zr(et,pe,oe,ut);wt.insertBefore(Kn,Mt)}else{for(;Mt!=pe.node;)Mt=Bt(Mt);var zn=ct&&rt!=null&&rt<=oe&&pe.lineNumber;pe.changes&&(Ye(pe.changes,"gutter")>-1&&(zn=!1),ws(et,pe,oe,ut)),zn&&(Se(pe.lineNumber),pe.lineNumber.appendChild(document.createTextNode(He(et.options,oe)))),Mt=pe.node.nextSibling}oe+=pe.size}for(;Mt;)Mt=Bt(Mt)}function Uu(et){var rt=et.gutters.offsetWidth;et.sizer.style.marginLeft=rt+"px"}function Yu(et,rt){et.display.sizer.style.minHeight=rt.docHeight+"px",et.display.heightForcer.style.top=rt.docHeight+"px",et.display.gutters.style.height=rt.docHeight+et.display.barHeight+As(et)+"px"}function _d(et){var rt=et.display,ut=rt.view;if(!(!rt.alignWidgets&&(!rt.gutters.firstChild||!et.options.fixedGutter))){for(var at=Xc(rt)-rt.scroller.scrollLeft+et.doc.scrollLeft,ct=rt.gutters.offsetWidth,wt=at+"px",Mt=0;Mt<ut.length;Mt++)if(!ut[Mt].hidden){et.options.fixedGutter&&(ut[Mt].gutter&&(ut[Mt].gutter.style.left=wt),ut[Mt].gutterBackground&&(ut[Mt].gutterBackground.style.left=wt));var Bt=ut[Mt].alignable;if(Bt)for(var At=0;At<Bt.length;At++)Bt[At].style.left=wt}et.options.fixedGutter&&(rt.gutters.style.left=at+ct+"px")}}function xs(et){if(!et.options.lineNumbers)return!1;var rt=et.doc,ut=He(et.options,rt.first+rt.size-1),at=et.display;if(ut.length!=at.lineNumChars){var ct=at.measure.appendChild(Le("div",[Le("div",ut)],"CodeMirror-linenumber CodeMirror-gutter-elt")),wt=ct.firstChild.offsetWidth,Mt=ct.offsetWidth-wt;return at.lineGutter.style.width="",at.lineNumInnerWidth=Math.max(wt,at.lineGutter.offsetWidth-Mt)+1,at.lineNumWidth=at.lineNumInnerWidth+Mt,at.lineNumChars=at.lineNumInnerWidth?ut.length:-1,at.lineGutter.style.width=at.lineNumWidth+"px",Uu(et.display),!0}return!1}function js(et,rt){for(var ut=[],at=!1,ct=0;ct<et.length;ct++){var wt=et[ct],Mt=null;if(typeof wt!="string"&&(Mt=wt.style,wt=wt.className),wt=="CodeMirror-linenumbers")if(rt)at=!0;else continue;ut.push({className:wt,style:Mt})}return rt&&!at&&ut.push({className:"CodeMirror-linenumbers",style:null}),ut}function Lh(et){var rt=et.gutters,ut=et.gutterSpecs;Se(rt),et.lineGutter=null;for(var at=0;at<ut.length;++at){var ct=ut[at],wt=ct.className,Mt=ct.style,Bt=rt.appendChild(Le("div",null,"CodeMirror-gutter "+wt));Mt&&(Bt.style.cssText=Mt),wt=="CodeMirror-linenumbers"&&(et.lineGutter=Bt,Bt.style.width=(et.lineNumWidth||1)+"px")}rt.style.display=ut.length?"":"none",Uu(et)}function ea(et){Lh(et.display),Ko(et),_d(et)}function Xu(et,rt,ut,at){var ct=this;this.input=ut,ct.scrollbarFiller=Le("div",null,"CodeMirror-scrollbar-filler"),ct.scrollbarFiller.setAttribute("cm-not-content","true"),ct.gutterFiller=Le("div",null,"CodeMirror-gutter-filler"),ct.gutterFiller.setAttribute("cm-not-content","true"),ct.lineDiv=en("div",null,"CodeMirror-code"),ct.selectionDiv=Le("div",null,null,"position: relative; z-index: 1"),ct.cursorDiv=Le("div",null,"CodeMirror-cursors"),ct.measure=Le("div",null,"CodeMirror-measure"),ct.lineMeasure=Le("div",null,"CodeMirror-measure"),ct.lineSpace=en("div",[ct.measure,ct.lineMeasure,ct.selectionDiv,ct.cursorDiv,ct.lineDiv],null,"position: relative; outline: none");var wt=en("div",[ct.lineSpace],"CodeMirror-lines");ct.mover=Le("div",[wt],null,"position: relative"),ct.sizer=Le("div",[ct.mover],"CodeMirror-sizer"),ct.sizerWidth=null,ct.heightForcer=Le("div",null,null,"position: absolute; height: "+wn+"px; width: 1px;"),ct.gutters=Le("div",null,"CodeMirror-gutters"),ct.lineGutter=null,ct.scroller=Le("div",[ct.sizer,ct.heightForcer,ct.gutters],"CodeMirror-scroll"),ct.scroller.setAttribute("tabIndex","-1"),ct.wrapper=Le("div",[ct.scrollbarFiller,ct.gutterFiller,ct.scroller],"CodeMirror"),_t&&Gt<8&&(ct.gutters.style.zIndex=-1,ct.scroller.style.paddingRight=0),!Vt&&!(lt&&Kt)&&(ct.scroller.draggable=!0),et&&(et.appendChild?et.appendChild(ct.wrapper):et(ct.wrapper)),ct.viewFrom=ct.viewTo=rt.first,ct.reportedViewFrom=ct.reportedViewTo=rt.first,ct.view=[],ct.renderedView=null,ct.externalMeasured=null,ct.viewOffset=0,ct.lastWrapHeight=ct.lastWrapWidth=0,ct.updateLineNumbers=null,ct.nativeBarWidth=ct.barHeight=ct.barWidth=0,ct.scrollbarsClipped=!1,ct.lineNumWidth=ct.lineNumInnerWidth=ct.lineNumChars=null,ct.alignWidgets=!1,ct.cachedCharWidth=ct.cachedTextHeight=ct.cachedPaddingH=null,ct.maxLine=null,ct.maxLineLength=0,ct.maxLineChanged=!1,ct.wheelDX=ct.wheelDY=ct.wheelStartX=ct.wheelStartY=null,ct.shift=!1,ct.selForContextMenu=null,ct.activeTouch=null,ct.gutterSpecs=js(at.gutters,at.lineNumbers),Lh(ct),ut.init(ct)}var $l=0,fs=null;_t?fs=-.53:lt?fs=15:Yt?fs=-.7:Oe&&(fs=-1/3);function Za(et){var rt=et.wheelDeltaX,ut=et.wheelDeltaY;return rt==null&&et.detail&&et.axis==et.HORIZONTAL_AXIS&&(rt=et.detail),ut==null&&et.detail&&et.axis==et.VERTICAL_AXIS?ut=et.detail:ut==null&&(ut=et.wheelDelta),{x:rt,y:ut}}function na(et){var rt=Za(et);return rt.x*=fs,rt.y*=fs,rt}function zs(et,rt){var ut=Za(rt),at=ut.x,ct=ut.y,wt=et.display,Mt=wt.scroller,Bt=Mt.scrollWidth>Mt.clientWidth,At=Mt.scrollHeight>Mt.clientHeight;if(at&&Bt||ct&&At){if(ct&&Ht&&Vt){t:for(var oe=rt.target,dn=wt.view;oe!=Mt;oe=oe.parentNode)for(var pe=0;pe<dn.length;pe++)if(dn[pe].node==oe){et.display.currentWheelTarget=oe;break t}}if(at&&!lt&&!Nt&&fs!=null){ct&&At&&kh(et,Math.max(0,Mt.scrollTop+ct*fs)),bu(et,Math.max(0,Mt.scrollLeft+at*fs)),(!ct||ct&&At)&&Ze(rt),wt.wheelStartX=null;return}if(ct&&fs!=null){var Kn=ct*fs,zn=et.doc.scrollTop,Pi=zn+wt.wrapper.clientHeight;Kn<0?zn=Math.max(0,zn+Kn-50):Pi=Math.min(et.doc.height,Pi+Kn+50),Gu(et,{top:zn,bottom:Pi})}$l<20&&(wt.wheelStartX==null?(wt.wheelStartX=Mt.scrollLeft,wt.wheelStartY=Mt.scrollTop,wt.wheelDX=at,wt.wheelDY=ct,setTimeout(function(){if(wt.wheelStartX!=null){var Di=Mt.scrollLeft-wt.wheelStartX,Zi=Mt.scrollTop-wt.wheelStartY,or=Zi&&wt.wheelDY&&Zi/wt.wheelDY||Di&&wt.wheelDX&&Di/wt.wheelDX;wt.wheelStartX=wt.wheelStartY=null,or&&(fs=(fs*$l+or)/($l+1),++$l)}},200)):(wt.wheelDX+=at,wt.wheelDY+=ct))}}var ga=function(et,rt){this.ranges=et,this.primIndex=rt};ga.prototype.primary=function(){return this.ranges[this.primIndex]},ga.prototype.equals=function(et){if(et==this)return!0;if(et.primIndex!=this.primIndex||et.ranges.length!=this.ranges.length)return!1;for(var rt=0;rt<this.ranges.length;rt++){var ut=this.ranges[rt],at=et.ranges[rt];if(!Jt(ut.anchor,at.anchor)||!Jt(ut.head,at.head))return!1}return!0},ga.prototype.deepCopy=function(){for(var et=[],rt=0;rt<this.ranges.length;rt++)et[rt]=new ko(nn(this.ranges[rt].anchor),nn(this.ranges[rt].head));return new ga(et,this.primIndex)},ga.prototype.somethingSelected=function(){for(var et=0;et<this.ranges.length;et++)if(!this.ranges[et].empty())return!0;return!1},ga.prototype.contains=function(et,rt){rt||(rt=et);for(var ut=0;ut<this.ranges.length;ut++){var at=this.ranges[ut];if(ze(rt,at.from())>=0&&ze(et,at.to())<=0)return ut}return-1};var ko=function(et,rt){this.anchor=et,this.head=rt};ko.prototype.from=function(){return Ne(this.anchor,this.head)},ko.prototype.to=function(){return cn(this.anchor,this.head)},ko.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ka(et,rt,ut){var at=et&&et.options.selectionsMayTouch,ct=rt[ut];rt.sort(function(Kn,zn){return ze(Kn.from(),zn.from())}),ut=Ye(rt,ct);for(var wt=1;wt<rt.length;wt++){var Mt=rt[wt],Bt=rt[wt-1],At=ze(Bt.to(),Mt.from());if(at&&!Mt.empty()?At>0:At>=0){var oe=Ne(Bt.from(),Mt.from()),dn=cn(Bt.to(),Mt.to()),pe=Bt.empty()?Mt.from()==Mt.head:Bt.from()==Bt.head;wt<=ut&&--ut,rt.splice(--wt,2,new ko(pe?dn:oe,pe?oe:dn))}}return new ga(rt,ut)}function Eu(et,rt){return new ga([new ko(et,rt||et)],0)}function Ju(et){return et.text?ae(et.from.line+et.text.length-1,ke(et.text).length+(et.text.length==1?et.from.ch:0)):et.to}function Dh(et,rt){if(ze(et,rt.from)<0)return et;if(ze(et,rt.to)<=0)return Ju(rt);var ut=et.line+rt.text.length-(rt.to.line-rt.from.line)-1,at=et.ch;return et.line==rt.to.line&&(at+=Ju(rt).ch-rt.to.ch),ae(ut,at)}function Qc(et,rt){for(var ut=[],at=0;at<et.sel.ranges.length;at++){var ct=et.sel.ranges[at];ut.push(new ko(Dh(ct.anchor,rt),Dh(ct.head,rt)))}return ka(et.cm,ut,et.sel.primIndex)}function gc(et,rt,ut){return et.line==rt.line?ae(ut.line,et.ch-rt.ch+ut.ch):ae(ut.line+(et.line-rt.line),et.ch)}function qc(et,rt,ut){for(var at=[],ct=ae(et.first,0),wt=ct,Mt=0;Mt<rt.length;Mt++){var Bt=rt[Mt],At=gc(Bt.from,ct,wt),oe=gc(Ju(Bt),ct,wt);if(ct=Bt.to,wt=oe,ut=="around"){var dn=et.sel.ranges[Mt],pe=ze(dn.head,dn.anchor)<0;at[Mt]=new ko(pe?oe:At,pe?At:oe)}else at[Mt]=new ko(At,At)}return new ga(at,et.sel.primIndex)}function Qr(et){et.doc.mode=xi(et.options,et.doc.modeOption),td(et)}function td(et){et.doc.iter(function(rt){rt.stateAfter&&(rt.stateAfter=null),rt.styles&&(rt.styles=null)}),et.doc.modeFrontier=et.doc.highlightFrontier=et.doc.first,mc(et,100),et.state.modeGen++,et.curOp&&Ko(et)}function op(et,rt){return rt.from.ch==0&&rt.to.ch==0&&ke(rt.text)==""&&(!et.cm||et.cm.options.wholeLineUpdateBefore)}function Gd(et,rt,ut,at){function ct(vr){return ut?ut[vr]:null}function wt(vr,dr,xr){Gr(vr,dr,xr,at),Xi(vr,"change",vr,rt)}function Mt(vr,dr){for(var xr=[],jr=vr;jr<dr;++jr)xr.push(new Vr(oe[jr],ct(jr),at));return xr}var Bt=rt.from,At=rt.to,oe=rt.text,dn=Vn(et,Bt.line),pe=Vn(et,At.line),Kn=ke(oe),zn=ct(oe.length-1),Pi=At.line-Bt.line;if(rt.full)et.insert(0,Mt(0,oe.length)),et.remove(oe.length,et.size-oe.length);else if(op(et,rt)){var Di=Mt(0,oe.length-1);wt(pe,pe.text,zn),Pi&&et.remove(Bt.line,Pi),Di.length&&et.insert(Bt.line,Di)}else if(dn==pe)if(oe.length==1)wt(dn,dn.text.slice(0,Bt.ch)+Kn+dn.text.slice(At.ch),zn);else{var Zi=Mt(1,oe.length-1);Zi.push(new Vr(Kn+dn.text.slice(At.ch),zn,at)),wt(dn,dn.text.slice(0,Bt.ch)+oe[0],ct(0)),et.insert(Bt.line+1,Zi)}else if(oe.length==1)wt(dn,dn.text.slice(0,Bt.ch)+oe[0]+pe.text.slice(At.ch),ct(0)),et.remove(Bt.line+1,Pi);else{wt(dn,dn.text.slice(0,Bt.ch)+oe[0],ct(0)),wt(pe,Kn+pe.text.slice(At.ch),zn);var or=Mt(1,oe.length-1);Pi>1&&et.remove(Bt.line+1,Pi-1),et.insert(Bt.line+1,or)}Xi(et,"change",et,rt)}function Wa(et,rt,ut){function at(ct,wt,Mt){if(ct.linked)for(var Bt=0;Bt<ct.linked.length;++Bt){var At=ct.linked[Bt];if(At.doc!=wt){var oe=Mt&&At.sharedHist;ut&&!oe||(rt(At.doc,oe),at(At.doc,ct,oe))}}}at(et,null,!0)}function Ud(et,rt){if(rt.cm)throw new Error("This document is already in use.");et.doc=rt,rt.cm=et,Tr(et),Qr(et),ed(et),et.options.lineWrapping||Or(et),et.options.mode=rt.modeOption,Ko(et)}function ed(et){(et.doc.direction=="rtl"?Tt:Qt)(et.display.lineDiv,"CodeMirror-rtl")}function t0(et){wo(et,function(){ed(et),Ko(et)})}function vc(et){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=et||1}function Yd(et,rt){var ut={from:nn(rt.from),to:Ju(rt),text:oi(et,rt.from,rt.to)};return Qu(et,ut,rt.from.line,rt.to.line+1),Wa(et,function(at){return Qu(at,ut,rt.from.line,rt.to.line+1)},!0),ut}function yc(et){for(;et.length;){var rt=ke(et);if(rt.ranges)et.pop();else break}}function nd(et,rt){if(rt)return yc(et.done),ke(et.done);if(et.done.length&&!ke(et.done).ranges)return ke(et.done);if(et.done.length>1&&!et.done[et.done.length-2].ranges)return et.done.pop(),ke(et.done)}function id(et,rt,ut,at){var ct=et.history;ct.undone.length=0;var wt=+new Date,Mt,Bt;if((ct.lastOp==at||ct.lastOrigin==rt.origin&&rt.origin&&(rt.origin.charAt(0)=="+"&&ct.lastModTime>wt-(et.cm?et.cm.options.historyEventDelay:500)||rt.origin.charAt(0)=="*"))&&(Mt=nd(ct,ct.lastOp==at)))Bt=ke(Mt.changes),ze(rt.from,rt.to)==0&&ze(rt.from,Bt.to)==0?Bt.to=Ju(rt):Mt.changes.push(Yd(et,rt));else{var At=ke(ct.done);for((!At||!At.ranges)&&xc(et.sel,ct.done),Mt={changes:[Yd(et,rt)],generation:ct.generation},ct.done.push(Mt);ct.done.length>ct.undoDepth;)ct.done.shift(),ct.done[0].ranges||ct.done.shift()}ct.done.push(ut),ct.generation=++ct.maxGeneration,ct.lastModTime=ct.lastSelTime=wt,ct.lastOp=ct.lastSelOp=at,ct.lastOrigin=ct.lastSelOrigin=rt.origin,Bt||In(et,"historyAdded")}function sp(et,rt,ut,at){var ct=rt.charAt(0);return ct=="*"||ct=="+"&&ut.ranges.length==at.ranges.length&&ut.somethingSelected()==at.somethingSelected()&&new Date-et.history.lastSelTime<=(et.cm?et.cm.options.historyEventDelay:500)}function rd(et,rt,ut,at){var ct=et.history,wt=at&&at.origin;ut==ct.lastSelOp||wt&&ct.lastSelOrigin==wt&&(ct.lastModTime==ct.lastSelTime&&ct.lastOrigin==wt||sp(et,wt,ke(ct.done),rt))?ct.done[ct.done.length-1]=rt:xc(rt,ct.done),ct.lastSelTime=+new Date,ct.lastSelOrigin=wt,ct.lastSelOp=ut,at&&at.clearRedo!==!1&&yc(ct.undone)}function xc(et,rt){var ut=ke(rt);ut&&ut.ranges&&ut.equals(et)||rt.push(et)}function Qu(et,rt,ut,at){var ct=rt["spans_"+et.id],wt=0;et.iter(Math.max(et.first,ut),Math.min(et.first+et.size,at),function(Mt){Mt.markedSpans&&((ct||(ct=rt["spans_"+et.id]={}))[wt]=Mt.markedSpans),++wt})}function yl(et){if(!et)return null;for(var rt,ut=0;ut<et.length;++ut)et[ut].marker.explicitlyCleared?rt||(rt=et.slice(0,ut)):rt&&rt.push(et[ut]);return rt?rt.length?rt:null:et}function iu(et,rt){var ut=rt["spans_"+et.id];if(!ut)return null;for(var at=[],ct=0;ct<rt.text.length;++ct)at.push(yl(ut[ct]));return at}function Xd(et,rt){var ut=iu(et,rt),at=qi(et,rt);if(!ut)return at;if(!at)return ut;for(var ct=0;ct<ut.length;++ct){var wt=ut[ct],Mt=at[ct];if(wt&&Mt)t:for(var Bt=0;Bt<Mt.length;++Bt){for(var At=Mt[Bt],oe=0;oe<wt.length;++oe)if(wt[oe].marker==At.marker)continue t;wt.push(At)}else Mt&&(ut[ct]=Mt)}return ut}function Mu(et,rt,ut){for(var at=[],ct=0;ct<et.length;++ct){var wt=et[ct];if(wt.ranges){at.push(ut?ga.prototype.deepCopy.call(wt):wt);continue}var Mt=wt.changes,Bt=[];at.push({changes:Bt});for(var At=0;At<Mt.length;++At){var oe=Mt[At],dn=void 0;if(Bt.push({from:oe.from,to:oe.to,text:oe.text}),rt)for(var pe in oe)(dn=pe.match(/^spans_(\d+)$/))&&Ye(rt,Number(dn[1]))>-1&&(ke(Bt)[pe]=oe[pe],delete oe[pe])}}return at}function Jd(et,rt,ut,at){if(at){var ct=et.anchor;if(ut){var wt=ze(rt,ct)<0;wt!=ze(ut,ct)<0?(ct=rt,rt=ut):wt!=ze(rt,ut)<0&&(rt=ut)}return new ko(ct,rt)}else return new ko(ut||rt,rt)}function Qd(et,rt,ut,at,ct){ct==null&&(ct=et.cm&&(et.cm.display.shift||et.extend)),ll(et,new ga([Jd(et.sel.primary(),rt,ut,ct)],0),at)}function $m(et,rt,ut){for(var at=[],ct=et.cm&&(et.cm.display.shift||et.extend),wt=0;wt<et.sel.ranges.length;wt++)at[wt]=Jd(et.sel.ranges[wt],rt[wt],null,ct);var Mt=ka(et.cm,at,et.sel.primIndex);ll(et,Mt,ut)}function qu(et,rt,ut,at){var ct=et.sel.ranges.slice(0);ct[rt]=ut,ll(et,ka(et.cm,ct,et.sel.primIndex),at)}function Ih(et,rt,ut,at){ll(et,Eu(rt,ut),at)}function Hm(et,rt,ut){var at={ranges:rt.ranges,update:function(ct){this.ranges=[];for(var wt=0;wt<ct.length;wt++)this.ranges[wt]=new ko(Xe(et,ct[wt].anchor),Xe(et,ct[wt].head))},origin:ut&&ut.origin};return In(et,"beforeSelectionChange",et,at),et.cm&&In(et.cm,"beforeSelectionChange",et.cm,at),at.ranges!=rt.ranges?ka(et.cm,at.ranges,at.ranges.length-1):rt}function qd(et,rt,ut){var at=et.history.done,ct=ke(at);ct&&ct.ranges?(at[at.length-1]=rt,Ah(et,rt,ut)):ll(et,rt,ut)}function ll(et,rt,ut){Ah(et,rt,ut),rd(et,et.sel,et.cm?et.cm.curOp.id:NaN,ut)}function Ah(et,rt,ut){(Mn(et,"beforeSelectionChange")||et.cm&&Mn(et.cm,"beforeSelectionChange"))&&(rt=Hm(et,rt,ut));var at=ut&&ut.bias||(ze(rt.primary().head,et.sel.primary().head)<0?-1:1);lp(et,sd(et,rt,at,!0)),!(ut&&ut.scroll===!1)&&et.cm&&Su(et.cm)}function lp(et,rt){rt.equals(et.sel)||(et.sel=rt,et.cm&&(et.cm.curOp.updateInput=1,et.cm.curOp.selectionChanged=!0,Hn(et.cm)),Xi(et,"cursorActivity",et))}function od(et){lp(et,sd(et,et.sel,null,!1))}function sd(et,rt,ut,at){for(var ct,wt=0;wt<rt.ranges.length;wt++){var Mt=rt.ranges[wt],Bt=rt.ranges.length==et.sel.ranges.length&&et.sel.ranges[wt],At=ld(et,Mt.anchor,Bt&&Bt.anchor,ut,at),oe=ld(et,Mt.head,Bt&&Bt.head,ut,at);(ct||At!=Mt.anchor||oe!=Mt.head)&&(ct||(ct=rt.ranges.slice(0,wt)),ct[wt]=new ko(At,oe))}return ct?ka(et.cm,ct,rt.primIndex):rt}function Pu(et,rt,ut,at,ct){var wt=Vn(et,rt.line);if(wt.markedSpans)for(var Mt=0;Mt<wt.markedSpans.length;++Mt){var Bt=wt.markedSpans[Mt],At=Bt.marker,oe="selectLeft"in At?!At.selectLeft:At.inclusiveLeft,dn="selectRight"in At?!At.selectRight:At.inclusiveRight;if((Bt.from==null||(oe?Bt.from<=rt.ch:Bt.from<rt.ch))&&(Bt.to==null||(dn?Bt.to>=rt.ch:Bt.to>rt.ch))){if(ct&&(In(At,"beforeCursorEnter"),At.explicitlyCleared))if(wt.markedSpans){--Mt;continue}else break;if(!At.atomic)continue;if(ut){var pe=At.find(at<0?1:-1),Kn=void 0;if((at<0?dn:oe)&&(pe=ap(et,pe,-at,pe&&pe.line==rt.line?wt:null)),pe&&pe.line==rt.line&&(Kn=ze(pe,ut))&&(at<0?Kn<0:Kn>0))return Pu(et,pe,rt,at,ct)}var zn=At.find(at<0?-1:1);return(at<0?oe:dn)&&(zn=ap(et,zn,at,zn.line==rt.line?wt:null)),zn?Pu(et,zn,rt,at,ct):null}}return rt}function ld(et,rt,ut,at,ct){var wt=at||1,Mt=Pu(et,rt,ut,wt,ct)||!ct&&Pu(et,rt,ut,wt,!0)||Pu(et,rt,ut,-wt,ct)||!ct&&Pu(et,rt,ut,-wt,!0);return Mt||(et.cantEdit=!0,ae(et.first,0))}function ap(et,rt,ut,at){return ut<0&&rt.ch==0?rt.line>et.first?Xe(et,ae(rt.line-1)):null:ut>0&&rt.ch==(at||Vn(et,rt.line)).text.length?rt.line<et.first+et.size-1?ae(rt.line+1,0):null:new ae(rt.line,rt.ch+ut)}function ps(et){et.setSelection(ae(et.firstLine(),0),ae(et.lastLine()),$t)}function ad(et,rt,ut){var at={canceled:!1,from:rt.from,to:rt.to,text:rt.text,origin:rt.origin,cancel:function(){return at.canceled=!0}};return ut&&(at.update=function(ct,wt,Mt,Bt){ct&&(at.from=Xe(et,ct)),wt&&(at.to=Xe(et,wt)),Mt&&(at.text=Mt),Bt!==void 0&&(at.origin=Bt)}),In(et,"beforeChange",et,at),et.cm&&In(et.cm,"beforeChange",et.cm,at),at.canceled?(et.cm&&(et.cm.curOp.updateInput=2),null):{from:at.from,to:at.to,text:at.text,origin:at.origin}}function th(et,rt,ut){if(et.cm){if(!et.cm.curOp)return Ns(et.cm,th)(et,rt,ut);if(et.cm.state.suppressEdits)return}if(!((Mn(et,"beforeChange")||et.cm&&Mn(et.cm,"beforeChange"))&&(rt=ad(et,rt,!0),!rt))){var at=Wn&&!ut&&tr(et,rt.from,rt.to);if(at)for(var ct=at.length-1;ct>=0;--ct)Fh(et,{from:at[ct].from,to:at[ct].to,text:ct?[""]:rt.text,origin:rt.origin});else Fh(et,rt)}}function Fh(et,rt){if(!(rt.text.length==1&&rt.text[0]==""&&ze(rt.from,rt.to)==0)){var ut=Qc(et,rt);id(et,rt,ut,et.cm?et.cm.curOp.id:NaN),wc(et,rt,ut,qi(et,rt));var at=[];Wa(et,function(ct,wt){!wt&&Ye(at,ct.history)==-1&&(hp(ct.history,rt),at.push(ct.history)),wc(ct,rt,null,qi(ct,rt))})}}function ud(et,rt,ut){var at=et.cm&&et.cm.state.suppressEdits;if(!(at&&!ut)){for(var ct=et.history,wt,Mt=et.sel,Bt=rt=="undo"?ct.done:ct.undone,At=rt=="undo"?ct.undone:ct.done,oe=0;oe<Bt.length&&(wt=Bt[oe],!(ut?wt.ranges&&!wt.equals(et.sel):!wt.ranges));oe++);if(oe!=Bt.length){for(ct.lastOrigin=ct.lastSelOrigin=null;;)if(wt=Bt.pop(),wt.ranges){if(xc(wt,At),ut&&!wt.equals(et.sel)){ll(et,wt,{clearRedo:!1});return}Mt=wt}else if(at){Bt.push(wt);return}else break;var dn=[];xc(Mt,At),At.push({changes:dn,generation:ct.generation}),ct.generation=wt.generation||++ct.maxGeneration;for(var pe=Mn(et,"beforeChange")||et.cm&&Mn(et.cm,"beforeChange"),Kn=function(Di){var Zi=wt.changes[Di];if(Zi.origin=rt,pe&&!ad(et,Zi,!1))return Bt.length=0,{};dn.push(Yd(et,Zi));var or=Di?Qc(et,Zi):ke(Bt);wc(et,Zi,or,Xd(et,Zi)),!Di&&et.cm&&et.cm.scrollIntoView({from:Zi.from,to:Ju(Zi)});var vr=[];Wa(et,function(dr,xr){!xr&&Ye(vr,dr.history)==-1&&(hp(dr.history,Zi),vr.push(dr.history)),wc(dr,Zi,null,Xd(dr,Zi))})},zn=wt.changes.length-1;zn>=0;--zn){var Pi=Kn(zn);if(Pi)return Pi.v}}}}function up(et,rt){if(rt!=0&&(et.first+=rt,et.sel=new ga(Dn(et.sel.ranges,function(ct){return new ko(ae(ct.anchor.line+rt,ct.anchor.ch),ae(ct.head.line+rt,ct.head.ch))}),et.sel.primIndex),et.cm)){Ko(et.cm,et.first,et.first-rt,rt);for(var ut=et.cm.display,at=ut.viewFrom;at<ut.viewTo;at++)Xr(et.cm,at,"gutter")}}function wc(et,rt,ut,at){if(et.cm&&!et.cm.curOp)return Ns(et.cm,wc)(et,rt,ut,at);if(rt.to.line<et.first){up(et,rt.text.length-1-(rt.to.line-rt.from.line));return}if(!(rt.from.line>et.lastLine())){if(rt.from.line<et.first){var ct=rt.text.length-1-(et.first-rt.from.line);up(et,ct),rt={from:ae(et.first,0),to:ae(rt.to.line+ct,rt.to.ch),text:[ke(rt.text)],origin:rt.origin}}var wt=et.lastLine();rt.to.line>wt&&(rt={from:rt.from,to:ae(wt,Vn(et,wt).text.length),text:[rt.text[0]],origin:rt.origin}),rt.removed=oi(et,rt.from,rt.to),ut||(ut=Qc(et,rt)),et.cm?Zm(et.cm,rt,at):Gd(et,rt,at),Ah(et,ut,$t),et.cantEdit&&ld(et,ae(et.firstLine(),0))&&(et.cantEdit=!1)}}function Zm(et,rt,ut){var at=et.doc,ct=et.display,wt=rt.from,Mt=rt.to,Bt=!1,At=wt.line;et.options.lineWrapping||(At=Rt(Gn(Vn(at,wt.line))),at.iter(At,Mt.line+1,function(zn){if(zn==ct.maxLine)return Bt=!0,!0})),at.sel.contains(rt.from,rt.to)>-1&&Hn(et),Gd(at,rt,ut,Vo(et)),et.options.lineWrapping||(at.iter(At,wt.line+rt.text.length,function(zn){var Pi=Dr(zn);Pi>ct.maxLineLength&&(ct.maxLine=zn,ct.maxLineLength=Pi,ct.maxLineChanged=!0,Bt=!1)}),Bt&&(et.curOp.updateMaxLine=!0)),fn(at,wt.line),mc(et,400);var oe=rt.text.length-(Mt.line-wt.line)-1;rt.full?Ko(et):wt.line==Mt.line&&rt.text.length==1&&!op(et.doc,rt)?Xr(et,wt.line,"text"):Ko(et,wt.line,Mt.line+1,oe);var dn=Mn(et,"changes"),pe=Mn(et,"change");if(pe||dn){var Kn={from:wt,to:Mt,text:rt.text,removed:rt.removed,origin:rt.origin};pe&&Xi(et,"change",et,Kn),dn&&(et.curOp.changeObjs||(et.curOp.changeObjs=[])).push(Kn)}et.display.selForContextMenu=null}function Bh(et,rt,ut,at,ct){var wt;at||(at=ut),ze(at,ut)<0&&(wt=[at,ut],ut=wt[0],at=wt[1]),typeof rt=="string"&&(rt=et.splitLines(rt)),th(et,{from:ut,to:at,text:rt,origin:ct})}function va(et,rt,ut,at){ut<et.line?et.line+=at:rt<et.line&&(et.line=rt,et.ch=0)}function Wm(et,rt,ut,at){for(var ct=0;ct<et.length;++ct){var wt=et[ct],Mt=!0;if(wt.ranges){wt.copied||(wt=et[ct]=wt.deepCopy(),wt.copied=!0);for(var Bt=0;Bt<wt.ranges.length;Bt++)va(wt.ranges[Bt].anchor,rt,ut,at),va(wt.ranges[Bt].head,rt,ut,at);continue}for(var At=0;At<wt.changes.length;++At){var oe=wt.changes[At];if(ut<oe.from.line)oe.from=ae(oe.from.line+at,oe.from.ch),oe.to=ae(oe.to.line+at,oe.to.ch);else if(rt<=oe.to.line){Mt=!1;break}}Mt||(et.splice(0,ct+1),ct=0)}}function hp(et,rt){var ut=rt.from.line,at=rt.to.line,ct=rt.text.length-(at-ut)-1;Wm(et.done,ut,at,ct),Wm(et.undone,ut,at,ct)}function Rh(et,rt,ut,at){var ct=rt,wt=rt;return typeof rt=="number"?wt=Vn(et,Fe(et,rt)):ct=Rt(rt),ct==null?null:(at(wt,ct)&&et.cm&&Xr(et.cm,ct,ut),wt)}function Cc(et){this.lines=et,this.parent=null;for(var rt=0,ut=0;ut<et.length;++ut)et[ut].parent=this,rt+=et[ut].height;this.height=rt}Cc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(et,rt){for(var ut=et,at=et+rt;ut<at;++ut){var ct=this.lines[ut];this.height-=ct.height,Ur(ct),Xi(ct,"delete")}this.lines.splice(et,rt)},collapse:function(et){et.push.apply(et,this.lines)},insertInner:function(et,rt,ut){this.height+=ut,this.lines=this.lines.slice(0,et).concat(rt).concat(this.lines.slice(et));for(var at=0;at<rt.length;++at)rt[at].parent=this},iterN:function(et,rt,ut){for(var at=et+rt;et<at;++et)if(ut(this.lines[et]))return!0}};function es(et){this.children=et;for(var rt=0,ut=0,at=0;at<et.length;++at){var ct=et[at];rt+=ct.chunkSize(),ut+=ct.height,ct.parent=this}this.size=rt,this.height=ut,this.parent=null}es.prototype={chunkSize:function(){return this.size},removeInner:function(et,rt){this.size-=rt;for(var ut=0;ut<this.children.length;++ut){var at=this.children[ut],ct=at.chunkSize();if(et<ct){var wt=Math.min(rt,ct-et),Mt=at.height;if(at.removeInner(et,wt),this.height-=Mt-at.height,ct==wt&&(this.children.splice(ut--,1),at.parent=null),(rt-=wt)==0)break;et=0}else et-=ct}if(this.size-rt<25&&(this.children.length>1||!(this.children[0]instanceof Cc))){var Bt=[];this.collapse(Bt),this.children=[new Cc(Bt)],this.children[0].parent=this}},collapse:function(et){for(var rt=0;rt<this.children.length;++rt)this.children[rt].collapse(et)},insertInner:function(et,rt,ut){this.size+=rt.length,this.height+=ut;for(var at=0;at<this.children.length;++at){var ct=this.children[at],wt=ct.chunkSize();if(et<=wt){if(ct.insertInner(et,rt,ut),ct.lines&&ct.lines.length>50){for(var Mt=ct.lines.length%25+25,Bt=Mt;Bt<ct.lines.length;){var At=new Cc(ct.lines.slice(Bt,Bt+=25));ct.height-=At.height,this.children.splice(++at,0,At),At.parent=this}ct.lines=ct.lines.slice(0,Mt),this.maybeSpill()}break}et-=wt}},maybeSpill:function(){if(!(this.children.length<=10)){var et=this;do{var rt=et.children.splice(et.children.length-5,5),ut=new es(rt);if(et.parent){et.size-=ut.size,et.height-=ut.height;var ct=Ye(et.parent.children,et);et.parent.children.splice(ct+1,0,ut)}else{var at=new es(et.children);at.parent=et,et.children=[at,ut],et=at}ut.parent=et.parent}while(et.children.length>10);et.parent.maybeSpill()}},iterN:function(et,rt,ut){for(var at=0;at<this.children.length;++at){var ct=this.children[at],wt=ct.chunkSize();if(et<wt){var Mt=Math.min(rt,wt-et);if(ct.iterN(et,Mt,ut))return!0;if((rt-=Mt)==0)break;et=0}else et-=wt}}};var Nu=function(et,rt,ut){if(ut)for(var at in ut)ut.hasOwnProperty(at)&&(this[at]=ut[at]);this.doc=et,this.node=rt};Nu.prototype.clear=function(){var et=this.doc.cm,rt=this.line.widgets,ut=this.line,at=Rt(ut);if(!(at==null||!rt)){for(var ct=0;ct<rt.length;++ct)rt[ct]==this&&rt.splice(ct--,1);rt.length||(ut.widgets=null);var wt=hs(this);Ci(ut,Math.max(0,ut.height-wt)),et&&(wo(et,function(){Vm(et,ut,-wt),Xr(et,at,"widget")}),Xi(et,"lineWidgetCleared",et,this,at))}},Nu.prototype.changed=function(){var et=this,rt=this.height,ut=this.doc.cm,at=this.line;this.height=null;var ct=hs(this)-rt;ct&&(kn(this.doc,at)||Ci(at,at.height+ct),ut&&wo(ut,function(){ut.curOp.forceUpdate=!0,Vm(ut,at,ct),Xi(ut,"lineWidgetChanged",ut,et,Rt(at))}))},ye(Nu);function Vm(et,rt,ut){br(rt)<(et.curOp&&et.curOp.scrollTop||et.doc.scrollTop)&&Zd(et,ut)}function tf(et,rt,ut,at){var ct=new Nu(et,ut,at),wt=et.cm;return wt&&ct.noHScroll&&(wt.display.alignWidgets=!0),Rh(et,rt,"widget",function(Mt){var Bt=Mt.widgets||(Mt.widgets=[]);if(ct.insertAt==null?Bt.push(ct):Bt.splice(Math.min(Bt.length-1,Math.max(0,ct.insertAt)),0,ct),ct.line=Mt,wt&&!kn(et,Mt)){var At=br(Mt)<et.scrollTop;Ci(Mt,Mt.height+hs(ct)),At&&Zd(wt,ct.height),wt.curOp.forceUpdate=!0}return!0}),wt&&Xi(wt,"lineWidgetAdded",wt,ct,typeof rt=="number"?rt:Rt(rt)),ct}var Km=0,Ge=function(et,rt){this.lines=[],this.type=rt,this.doc=et,this.id=++Km};Ge.prototype.clear=function(){if(!this.explicitlyCleared){var et=this.doc.cm,rt=et&&!et.curOp;if(rt&&Vu(et),Mn(this,"clear")){var ut=this.find();ut&&Xi(this,"clear",ut.from,ut.to)}for(var at=null,ct=null,wt=0;wt<this.lines.length;++wt){var Mt=this.lines[wt],Bt=Wi(Mt.markedSpans,this);et&&!this.collapsed?Xr(et,Rt(Mt),"text"):et&&(Bt.to!=null&&(ct=Rt(Mt)),Bt.from!=null&&(at=Rt(Mt))),Mt.markedSpans=Ui(Mt.markedSpans,Bt),Bt.from==null&&this.collapsed&&!kn(this.doc,Mt)&&et&&Ci(Mt,ml(et.display))}if(et&&this.collapsed&&!et.options.lineWrapping)for(var At=0;At<this.lines.length;++At){var oe=Gn(this.lines[At]),dn=Dr(oe);dn>et.display.maxLineLength&&(et.display.maxLine=oe,et.display.maxLineLength=dn,et.display.maxLineChanged=!0)}at!=null&&et&&this.collapsed&&Ko(et,at,ct+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,et&&od(et.doc)),et&&Xi(et,"markerCleared",et,this,at,ct),rt&&Ku(et),this.parent&&this.parent.clear()}},Ge.prototype.find=function(et,rt){et==null&&this.type=="bookmark"&&(et=1);for(var ut,at,ct=0;ct<this.lines.length;++ct){var wt=this.lines[ct],Mt=Wi(wt.markedSpans,this);if(Mt.from!=null&&(ut=ae(rt?wt:Rt(wt),Mt.from),et==-1))return ut;if(Mt.to!=null&&(at=ae(rt?wt:Rt(wt),Mt.to),et==1))return at}return ut&&{from:ut,to:at}},Ge.prototype.changed=function(){var et=this,rt=this.find(-1,!0),ut=this,at=this.doc.cm;!rt||!at||wo(at,function(){var ct=rt.line,wt=Rt(rt.line),Mt=Ql(at,wt);if(Mt&&(Nr(Mt),at.curOp.selectionChanged=at.curOp.forceUpdate=!0),at.curOp.updateMaxLine=!0,!kn(ut.doc,ct)&&ut.height!=null){var Bt=ut.height;ut.height=null;var At=hs(ut)-Bt;At&&Ci(ct,ct.height+At)}Xi(at,"markerChanged",at,et)})},Ge.prototype.attachLine=function(et){if(!this.lines.length&&this.doc.cm){var rt=this.doc.cm.curOp;(!rt.maybeHiddenMarkers||Ye(rt.maybeHiddenMarkers,this)==-1)&&(rt.maybeUnhiddenMarkers||(rt.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(et)},Ge.prototype.detachLine=function(et){if(this.lines.splice(Ye(this.lines,et),1),!this.lines.length&&this.doc.cm){var rt=this.doc.cm.curOp;(rt.maybeHiddenMarkers||(rt.maybeHiddenMarkers=[])).push(this)}},ye(Ge);function jh(et,rt,ut,at,ct){if(at&&at.shared)return _m(et,rt,ut,at,ct);if(et.cm&&!et.cm.curOp)return Ns(et.cm,jh)(et,rt,ut,at,ct);var wt=new Ge(et,ct),Mt=ze(rt,ut);if(at&&On(at,wt,!1),Mt>0||Mt==0&&wt.clearWhenEmpty!==!1)return wt;if(wt.replacedWith&&(wt.collapsed=!0,wt.widgetNode=en("span",[wt.replacedWith],"CodeMirror-widget"),at.handleMouseEvents||wt.widgetNode.setAttribute("cm-ignore-events","true"),at.insertLeft&&(wt.widgetNode.insertLeft=!0)),wt.collapsed){if(Mi(et,rt.line,rt,ut,wt)||rt.line!=ut.line&&Mi(et,ut.line,rt,ut,wt))throw new Error("Inserting collapsed marker partially overlapping an existing one");pn()}wt.addToHistory&&id(et,{from:rt,to:ut,origin:"markText"},et.sel,NaN);var Bt=rt.line,At=et.cm,oe;if(et.iter(Bt,ut.line+1,function(pe){At&&wt.collapsed&&!At.options.lineWrapping&&Gn(pe)==At.display.maxLine&&(oe=!0),wt.collapsed&&Bt!=rt.line&&Ci(pe,0),Vi(pe,new wi(wt,Bt==rt.line?rt.ch:null,Bt==ut.line?ut.ch:null)),++Bt}),wt.collapsed&&et.iter(rt.line,ut.line+1,function(pe){kn(et,pe)&&Ci(pe,0)}),wt.clearOnEnter&&bn(wt,"beforeCursorEnter",function(){return wt.clear()}),wt.readOnly&&(Si(),(et.history.done.length||et.history.undone.length)&&et.clearHistory()),wt.collapsed&&(wt.id=++Km,wt.atomic=!0),At){if(oe&&(At.curOp.updateMaxLine=!0),wt.collapsed)Ko(At,rt.line,ut.line+1);else if(wt.className||wt.startStyle||wt.endStyle||wt.css||wt.attributes||wt.title)for(var dn=rt.line;dn<=ut.line;dn++)Xr(At,dn,"text");wt.atomic&&od(At.doc),Xi(At,"markerAdded",At,wt)}return wt}var ru=function(et,rt){this.markers=et,this.primary=rt;for(var ut=0;ut<et.length;++ut)et[ut].parent=this};ru.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var et=0;et<this.markers.length;++et)this.markers[et].clear();Xi(this,"clear")}},ru.prototype.find=function(et,rt){return this.primary.find(et,rt)},ye(ru);function _m(et,rt,ut,at,ct){at=On(at),at.shared=!1;var wt=[jh(et,rt,ut,at,ct)],Mt=wt[0],Bt=at.widgetNode;return Wa(et,function(At){Bt&&(at.widgetNode=Bt.cloneNode(!0)),wt.push(jh(At,Xe(At,rt),Xe(At,ut),at,ct));for(var oe=0;oe<At.linked.length;++oe)if(At.linked[oe].isParent)return;Mt=ke(wt)}),new ru(wt,Mt)}function cp(et){return et.findMarks(ae(et.first,0),et.clipPos(ae(et.lastLine())),function(rt){return rt.parent})}function Gm(et,rt){for(var ut=0;ut<rt.length;ut++){var at=rt[ut],ct=at.find(),wt=et.clipPos(ct.from),Mt=et.clipPos(ct.to);if(ze(wt,Mt)){var Bt=jh(et,wt,Mt,at.primary,at.primary.type);at.markers.push(Bt),Bt.parent=at}}}function dp(et){for(var rt=function(at){var ct=et[at],wt=[ct.primary.doc];Wa(ct.primary.doc,function(At){return wt.push(At)});for(var Mt=0;Mt<ct.markers.length;Mt++){var Bt=ct.markers[Mt];Ye(wt,Bt.doc)==-1&&(Bt.parent=null,ct.markers.splice(Mt--,1))}},ut=0;ut<et.length;ut++)rt(ut)}var e0=0,Qs=function(et,rt,ut,at,ct){if(!(this instanceof Qs))return new Qs(et,rt,ut,at,ct);ut==null&&(ut=0),es.call(this,[new Cc([new Vr("",null)])]),this.first=ut,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ut;var wt=ae(ut,0);this.sel=Eu(wt),this.history=new vc(null),this.id=++e0,this.modeOption=rt,this.lineSep=at,this.direction=ct=="rtl"?"rtl":"ltr",this.extend=!1,typeof et=="string"&&(et=this.splitLines(et)),Gd(this,{from:wt,to:wt,text:et}),ll(this,Eu(wt),$t)};Qs.prototype=gt(es.prototype,{constructor:Qs,iter:function(et,rt,ut){ut?this.iterN(et-this.first,rt-et,ut):this.iterN(this.first,this.first+this.size,et)},insert:function(et,rt){for(var ut=0,at=0;at<rt.length;++at)ut+=rt[at].height;this.insertInner(et-this.first,rt,ut)},remove:function(et,rt){this.removeInner(et-this.first,rt)},getValue:function(et){var rt=Ti(this,this.first,this.first+this.size);return et===!1?rt:rt.join(et||this.lineSeparator())},setValue:Bs(function(et){var rt=ae(this.first,0),ut=this.first+this.size-1;th(this,{from:rt,to:ae(ut,Vn(this,ut).text.length),text:this.splitLines(et),origin:"setValue",full:!0},!0),this.cm&&Th(this.cm,0,0),ll(this,Eu(rt),$t)}),replaceRange:function(et,rt,ut,at){rt=Xe(this,rt),ut=ut?Xe(this,ut):rt,Bh(this,et,rt,ut,at)},getRange:function(et,rt,ut){var at=oi(this,Xe(this,et),Xe(this,rt));return ut===!1?at:at.join(ut||this.lineSeparator())},getLine:function(et){var rt=this.getLineHandle(et);return rt&&rt.text},getLineHandle:function(et){if(qt(this,et))return Vn(this,et)},getLineNumber:function(et){return Rt(et)},getLineHandleVisualStart:function(et){return typeof et=="number"&&(et=Vn(this,et)),Gn(et)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(et){return Xe(this,et)},getCursor:function(et){var rt=this.sel.primary(),ut;return et==null||et=="head"?ut=rt.head:et=="anchor"?ut=rt.anchor:et=="end"||et=="to"||et===!1?ut=rt.to():ut=rt.from(),ut},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Bs(function(et,rt,ut){Ih(this,Xe(this,typeof et=="number"?ae(et,rt||0):et),null,ut)}),setSelection:Bs(function(et,rt,ut){Ih(this,Xe(this,et),Xe(this,rt||et),ut)}),extendSelection:Bs(function(et,rt,ut){Qd(this,Xe(this,et),rt&&Xe(this,rt),ut)}),extendSelections:Bs(function(et,rt){$m(this,vn(this,et),rt)}),extendSelectionsBy:Bs(function(et,rt){var ut=Dn(this.sel.ranges,et);$m(this,vn(this,ut),rt)}),setSelections:Bs(function(et,rt,ut){if(et.length){for(var at=[],ct=0;ct<et.length;ct++)at[ct]=new ko(Xe(this,et[ct].anchor),Xe(this,et[ct].head));rt==null&&(rt=Math.min(et.length-1,this.sel.primIndex)),ll(this,ka(this.cm,at,rt),ut)}}),addSelection:Bs(function(et,rt,ut){var at=this.sel.ranges.slice(0);at.push(new ko(Xe(this,et),Xe(this,rt||et))),ll(this,ka(this.cm,at,at.length-1),ut)}),getSelection:function(et){for(var rt=this.sel.ranges,ut,at=0;at<rt.length;at++){var ct=oi(this,rt[at].from(),rt[at].to());ut=ut?ut.concat(ct):ct}return et===!1?ut:ut.join(et||this.lineSeparator())},getSelections:function(et){for(var rt=[],ut=this.sel.ranges,at=0;at<ut.length;at++){var ct=oi(this,ut[at].from(),ut[at].to());et!==!1&&(ct=ct.join(et||this.lineSeparator())),rt[at]=ct}return rt},replaceSelection:function(et,rt,ut){for(var at=[],ct=0;ct<this.sel.ranges.length;ct++)at[ct]=et;this.replaceSelections(at,rt,ut||"+input")},replaceSelections:Bs(function(et,rt,ut){for(var at=[],ct=this.sel,wt=0;wt<ct.ranges.length;wt++){var Mt=ct.ranges[wt];at[wt]={from:Mt.from(),to:Mt.to(),text:this.splitLines(et[wt]),origin:ut}}for(var Bt=rt&&rt!="end"&&qc(this,at,rt),At=at.length-1;At>=0;At--)th(this,at[At]);Bt?qd(this,Bt):this.cm&&Su(this.cm)}),undo:Bs(function(){ud(this,"undo")}),redo:Bs(function(){ud(this,"redo")}),undoSelection:Bs(function(){ud(this,"undo",!0)}),redoSelection:Bs(function(){ud(this,"redo",!0)}),setExtending:function(et){this.extend=et},getExtending:function(){return this.extend},historySize:function(){for(var et=this.history,rt=0,ut=0,at=0;at<et.done.length;at++)et.done[at].ranges||++rt;for(var ct=0;ct<et.undone.length;ct++)et.undone[ct].ranges||++ut;return{undo:rt,redo:ut}},clearHistory:function(){var et=this;this.history=new vc(this.history.maxGeneration),Wa(this,function(rt){return rt.history=et.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(et){return et&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(et){return this.history.generation==(et||this.cleanGeneration)},getHistory:function(){return{done:Mu(this.history.done),undone:Mu(this.history.undone)}},setHistory:function(et){var rt=this.history=new vc(this.history.maxGeneration);rt.done=Mu(et.done.slice(0),null,!0),rt.undone=Mu(et.undone.slice(0),null,!0)},setGutterMarker:Bs(function(et,rt,ut){return Rh(this,et,"gutter",function(at){var ct=at.gutterMarkers||(at.gutterMarkers={});return ct[rt]=ut,!ut&&vt(ct)&&(at.gutterMarkers=null),!0})}),clearGutter:Bs(function(et){var rt=this;this.iter(function(ut){ut.gutterMarkers&&ut.gutterMarkers[et]&&Rh(rt,ut,"gutter",function(){return ut.gutterMarkers[et]=null,vt(ut.gutterMarkers)&&(ut.gutterMarkers=null),!0})})}),lineInfo:function(et){var rt;if(typeof et=="number"){if(!qt(this,et)||(rt=et,et=Vn(this,et),!et))return null}else if(rt=Rt(et),rt==null)return null;return{line:rt,handle:et,text:et.text,gutterMarkers:et.gutterMarkers,textClass:et.textClass,bgClass:et.bgClass,wrapClass:et.wrapClass,widgets:et.widgets}},addLineClass:Bs(function(et,rt,ut){return Rh(this,et,rt=="gutter"?"gutter":"class",function(at){var ct=rt=="text"?"textClass":rt=="background"?"bgClass":rt=="gutter"?"gutterClass":"wrapClass";if(!at[ct])at[ct]=ut;else{if(ve(ut).test(at[ct]))return!1;at[ct]+=" "+ut}return!0})}),removeLineClass:Bs(function(et,rt,ut){return Rh(this,et,rt=="gutter"?"gutter":"class",function(at){var ct=rt=="text"?"textClass":rt=="background"?"bgClass":rt=="gutter"?"gutterClass":"wrapClass",wt=at[ct];if(wt)if(ut==null)at[ct]=null;else{var Mt=wt.match(ve(ut));if(!Mt)return!1;var Bt=Mt.index+Mt[0].length;at[ct]=wt.slice(0,Mt.index)+(!Mt.index||Bt==wt.length?"":" ")+wt.slice(Bt)||null}else return!1;return!0})}),addLineWidget:Bs(function(et,rt,ut){return tf(this,et,rt,ut)}),removeLineWidget:function(et){et.clear()},markText:function(et,rt,ut){return jh(this,Xe(this,et),Xe(this,rt),ut,ut&&ut.type||"range")},setBookmark:function(et,rt){var ut={replacedWith:rt&&(rt.nodeType==null?rt.widget:rt),insertLeft:rt&&rt.insertLeft,clearWhenEmpty:!1,shared:rt&&rt.shared,handleMouseEvents:rt&&rt.handleMouseEvents};return et=Xe(this,et),jh(this,et,et,ut,"bookmark")},findMarksAt:function(et){et=Xe(this,et);var rt=[],ut=Vn(this,et.line).markedSpans;if(ut)for(var at=0;at<ut.length;++at){var ct=ut[at];(ct.from==null||ct.from<=et.ch)&&(ct.to==null||ct.to>=et.ch)&&rt.push(ct.marker.parent||ct.marker)}return rt},findMarks:function(et,rt,ut){et=Xe(this,et),rt=Xe(this,rt);var at=[],ct=et.line;return this.iter(et.line,rt.line+1,function(wt){var Mt=wt.markedSpans;if(Mt)for(var Bt=0;Bt<Mt.length;Bt++){var At=Mt[Bt];!(At.to!=null&&ct==et.line&&et.ch>=At.to||At.from==null&&ct!=et.line||At.from!=null&&ct==rt.line&&At.from>=rt.ch)&&(!ut||ut(At.marker))&&at.push(At.marker.parent||At.marker)}++ct}),at},getAllMarks:function(){var et=[];return this.iter(function(rt){var ut=rt.markedSpans;if(ut)for(var at=0;at<ut.length;++at)ut[at].from!=null&&et.push(ut[at].marker)}),et},posFromIndex:function(et){var rt,ut=this.first,at=this.lineSeparator().length;return this.iter(function(ct){var wt=ct.text.length+at;if(wt>et)return rt=et,!0;et-=wt,++ut}),Xe(this,ae(ut,rt))},indexFromPos:function(et){et=Xe(this,et);var rt=et.ch;if(et.line<this.first||et.ch<0)return 0;var ut=this.lineSeparator().length;return this.iter(this.first,et.line,function(at){rt+=at.text.length+ut}),rt},copy:function(et){var rt=new Qs(Ti(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return rt.scrollTop=this.scrollTop,rt.scrollLeft=this.scrollLeft,rt.sel=this.sel,rt.extend=!1,et&&(rt.history.undoDepth=this.history.undoDepth,rt.setHistory(this.getHistory())),rt},linkedDoc:function(et){et||(et={});var rt=this.first,ut=this.first+this.size;et.from!=null&&et.from>rt&&(rt=et.from),et.to!=null&&et.to<ut&&(ut=et.to);var at=new Qs(Ti(this,rt,ut),et.mode||this.modeOption,rt,this.lineSep,this.direction);return et.sharedHist&&(at.history=this.history),(this.linked||(this.linked=[])).push({doc:at,sharedHist:et.sharedHist}),at.linked=[{doc:this,isParent:!0,sharedHist:et.sharedHist}],Gm(at,cp(this)),at},unlinkDoc:function(et){if(et instanceof yo&&(et=et.doc),this.linked)for(var rt=0;rt<this.linked.length;++rt){var ut=this.linked[rt];if(ut.doc==et){this.linked.splice(rt,1),et.unlinkDoc(this),dp(cp(this));break}}if(et.history==this.history){var at=[et.id];Wa(et,function(ct){return at.push(ct.id)},!0),et.history=new vc(null),et.history.done=Mu(this.history.done,at),et.history.undone=Mu(this.history.undone,at)}},iterLinkedDocs:function(et){Wa(this,et)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(et){return this.lineSep?et.split(this.lineSep):ri(et)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Bs(function(et){et!="rtl"&&(et="ltr"),et!=this.direction&&(this.direction=et,this.iter(function(rt){return rt.order=null}),this.cm&&t0(this.cm))})}),Qs.prototype.eachLine=Qs.prototype.iter;var hd=0;function fp(et){var rt=this;if(Xm(rt),!(sn(rt,et)||rs(rt.display,et))){Ze(et),_t&&(hd=+new Date);var ut=gl(rt,et,!0),at=et.dataTransfer.files;if(!(!ut||rt.isReadOnly()))if(at&&at.length&&window.FileReader&&window.File)for(var ct=at.length,wt=Array(ct),Mt=0,Bt=function(){++Mt==ct&&Ns(rt,function(){ut=Xe(rt.doc,ut);var zn={from:ut,to:ut,text:rt.doc.splitLines(wt.filter(function(Pi){return Pi!=null}).join(rt.doc.lineSeparator())),origin:"paste"};th(rt.doc,zn),qd(rt.doc,Eu(Xe(rt.doc,ut),Xe(rt.doc,Ju(zn))))})()},At=function(zn,Pi){if(rt.options.allowDropFileTypes&&Ye(rt.options.allowDropFileTypes,zn.type)==-1){Bt();return}var Di=new FileReader;Di.onerror=function(){return Bt()},Di.onload=function(){var Zi=Di.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Zi)){Bt();return}wt[Pi]=Zi,Bt()},Di.readAsText(zn)},oe=0;oe<at.length;oe++)At(at[oe],oe);else{if(rt.state.draggingText&&rt.doc.sel.contains(ut)>-1){rt.state.draggingText(et),setTimeout(function(){return rt.display.input.focus()},20);return}try{var dn=et.dataTransfer.getData("Text");if(dn){var pe;if(rt.state.draggingText&&!rt.state.draggingText.copy&&(pe=rt.listSelections()),Ah(rt.doc,Eu(ut,ut)),pe)for(var Kn=0;Kn<pe.length;++Kn)Bh(rt.doc,"",pe[Kn].anchor,pe[Kn].head,"drag");rt.replaceSelection(dn,"around","paste"),rt.display.input.focus()}}catch(zn){}}}}function Um(et,rt){if(_t&&(!et.state.draggingText||+new Date-hd<100)){he(rt);return}if(!(sn(et,rt)||rs(et.display,rt))&&(rt.dataTransfer.setData("Text",et.getSelection()),rt.dataTransfer.effectAllowed="copyMove",rt.dataTransfer.setDragImage&&!Oe)){var ut=Le("img",null,null,"position: fixed; left: 0; top: 0;");ut.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Nt&&(ut.width=ut.height=1,et.display.wrapper.appendChild(ut),ut._top=ut.offsetTop),rt.dataTransfer.setDragImage(ut,0,0),Nt&&ut.parentNode.removeChild(ut)}}function Ym(et,rt){var ut=gl(et,rt);if(ut){var at=document.createDocumentFragment();ao(et,ut,at),et.display.dragCursor||(et.display.dragCursor=Le("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),et.display.lineSpace.insertBefore(et.display.dragCursor,et.display.cursorDiv)),be(et.display.dragCursor,at)}}function Xm(et){et.display.dragCursor&&(et.display.lineSpace.removeChild(et.display.dragCursor),et.display.dragCursor=null)}function Jm(et){if(document.getElementsByClassName){for(var rt=document.getElementsByClassName("CodeMirror"),ut=[],at=0;at<rt.length;at++){var ct=rt[at].CodeMirror;ct&&ut.push(ct)}ut.length&&ut[0].operation(function(){for(var wt=0;wt<ut.length;wt++)et(ut[wt])})}}var pp=!1;function ia(){pp||(Sc(),pp=!0)}function Sc(){var et;bn(window,"resize",function(){et==null&&(et=setTimeout(function(){et=null,Jm(mp)},100))}),bn(window,"blur",function(){return Jm(Nh)})}function mp(et){var rt=et.display;rt.cachedCharWidth=rt.cachedTextHeight=rt.cachedPaddingH=null,rt.scrollbarsClipped=!1,et.setSize()}for(var ou={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"},cd=0;cd<10;cd++)ou[cd+48]=ou[cd+96]=String(cd);for(var ef=65;ef<=90;ef++)ou[ef]=String.fromCharCode(ef);for(var dd=1;dd<=12;dd++)ou[dd+111]=ou[dd+63235]="F"+dd;var Hl={};Hl.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"},Hl.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"},Hl.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"},Hl.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"]},Hl.default=Ht?Hl.macDefault:Hl.pcDefault;function gp(et){var rt=et.split(/-(?!$)/);et=rt[rt.length-1];for(var ut,at,ct,wt,Mt=0;Mt<rt.length-1;Mt++){var Bt=rt[Mt];if(/^(cmd|meta|m)$/i.test(Bt))wt=!0;else if(/^a(lt)?$/i.test(Bt))ut=!0;else if(/^(c|ctrl|control)$/i.test(Bt))at=!0;else if(/^s(hift)?$/i.test(Bt))ct=!0;else throw new Error("Unrecognized modifier name: "+Bt)}return ut&&(et="Alt-"+et),at&&(et="Ctrl-"+et),wt&&(et="Cmd-"+et),ct&&(et="Shift-"+et),et}function vp(et){var rt={};for(var ut in et)if(et.hasOwnProperty(ut)){var at=et[ut];if(/^(name|fallthrough|(de|at)tach)$/.test(ut))continue;if(at=="..."){delete et[ut];continue}for(var ct=Dn(ut.split(" "),gp),wt=0;wt<ct.length;wt++){var Mt=void 0,Bt=void 0;wt==ct.length-1?(Bt=ct.join(" "),Mt=at):(Bt=ct.slice(0,wt+1).join(" "),Mt="...");var At=rt[Bt];if(!At)rt[Bt]=Mt;else if(At!=Mt)throw new Error("Inconsistent bindings for "+Bt)}delete et[ut]}for(var oe in rt)et[oe]=rt[oe];return et}function ya(et,rt,ut,at){rt=zh(rt);var ct=rt.call?rt.call(et,at):rt[et];if(ct===!1)return"nothing";if(ct==="...")return"multi";if(ct!=null&&ut(ct))return"handled";if(rt.fallthrough){if(Object.prototype.toString.call(rt.fallthrough)!="[object Array]")return ya(et,rt.fallthrough,ut,at);for(var wt=0;wt<rt.fallthrough.length;wt++){var Mt=ya(et,rt.fallthrough[wt],ut,at);if(Mt)return Mt}}}function bc(et){var rt=typeof et=="string"?et:ou[et.keyCode];return rt=="Ctrl"||rt=="Alt"||rt=="Shift"||rt=="Mod"}function yp(et,rt,ut){var at=et;return rt.altKey&&at!="Alt"&&(et="Alt-"+et),(se?rt.metaKey:rt.ctrlKey)&&at!="Ctrl"&&(et="Ctrl-"+et),(se?rt.ctrlKey:rt.metaKey)&&at!="Mod"&&(et="Cmd-"+et),!ut&&rt.shiftKey&&at!="Shift"&&(et="Shift-"+et),et}function Qm(et,rt){if(Nt&&et.keyCode==34&&et.char)return!1;var ut=ou[et.keyCode];return ut==null||et.altGraphKey?!1:(et.keyCode==3&&et.code&&(ut=et.code),yp(ut,et,rt))}function zh(et){return typeof et=="string"?Hl[et]:et}function Zl(et,rt){for(var ut=et.doc.sel.ranges,at=[],ct=0;ct<ut.length;ct++){for(var wt=rt(ut[ct]);at.length&&ze(wt.from,ke(at).to)<=0;){var Mt=at.pop();if(ze(Mt.from,wt.from)<0){wt.from=Mt.from;break}}at.push(wt)}wo(et,function(){for(var Bt=at.length-1;Bt>=0;Bt--)Bh(et.doc,"",at[Bt].from,at[Bt].to,"+delete");Su(et)})}function xp(et,rt,ut){var at=Ve(et.text,rt+ut,ut);return at<0||at>et.text.length?null:at}function ms(et,rt,ut){var at=xp(et,rt.ch,ut);return at==null?null:new ae(rt.line,at,ut<0?"after":"before")}function fd(et,rt,ut,at,ct){if(et){rt.doc.direction=="rtl"&&(ct=-ct);var wt=te(ut,rt.doc.direction);if(wt){var Mt=ct<0?ke(wt):wt[0],Bt=ct<0==(Mt.level==1),At=Bt?"after":"before",oe;if(Mt.level>0||rt.doc.direction=="rtl"){var dn=fa(rt,ut);oe=ct<0?ut.text.length-1:0;var pe=Pl(rt,dn,oe).top;oe=ue(function(Kn){return Pl(rt,dn,Kn).top==pe},ct<0==(Mt.level==1)?Mt.from:Mt.to-1,oe),At=="before"&&(oe=xp(ut,oe,1))}else oe=ct<0?Mt.to:Mt.from;return new ae(at,oe,At)}}return new ae(at,ct<0?ut.text.length:0,ct<0?"before":"after")}function nf(et,rt,ut,at){var ct=te(rt,et.doc.direction);if(!ct)return ms(rt,ut,at);ut.ch>=rt.text.length?(ut.ch=rt.text.length,ut.sticky="before"):ut.ch<=0&&(ut.ch=0,ut.sticky="after");var wt=Te(ct,ut.ch,ut.sticky),Mt=ct[wt];if(et.doc.direction=="ltr"&&Mt.level%2==0&&(at>0?Mt.to>ut.ch:Mt.from<ut.ch))return ms(rt,ut,at);var Bt=function(or,vr){return xp(rt,or instanceof ae?or.ch:or,vr)},At,oe=function(or){return et.options.lineWrapping?(At=At||fa(et,rt),os(et,rt,At,or)):{begin:0,end:rt.text.length}},dn=oe(ut.sticky=="before"?Bt(ut,-1):ut.ch);if(et.doc.direction=="rtl"||Mt.level==1){var pe=Mt.level==1==at<0,Kn=Bt(ut,pe?1:-1);if(Kn!=null&&(pe?Kn<=Mt.to&&Kn<=dn.end:Kn>=Mt.from&&Kn>=dn.begin)){var zn=pe?"before":"after";return new ae(ut.line,Kn,zn)}}var Pi=function(or,vr,dr){for(var xr=function(_o,ks){return ks?new ae(ut.line,Bt(_o,1),"before"):new ae(ut.line,_o,"after")};or>=0&&or<ct.length;or+=vr){var jr=ct[or],hr=vr>0==(jr.level!=1),qr=hr?dr.begin:Bt(dr.end,-1);if(jr.from<=qr&&qr<jr.to||(qr=hr?jr.from:Bt(jr.to,-1),dr.begin<=qr&&qr<dr.end))return xr(qr,hr)}},Di=Pi(wt+at,at,dn);if(Di)return Di;var Zi=at>0?dn.end:Bt(dn.begin,-1);return Zi!=null&&!(at>0&&Zi==rt.text.length)&&(Di=Pi(at>0?0:ct.length-1,at,oe(Zi)),Di)?Di:null}var eh={selectAll:ps,singleSelection:function(et){return et.setSelection(et.getCursor("anchor"),et.getCursor("head"),$t)},killLine:function(et){return Zl(et,function(rt){if(rt.empty()){var ut=Vn(et.doc,rt.head.line).text.length;return rt.head.ch==ut&&rt.head.line<et.lastLine()?{from:rt.head,to:ae(rt.head.line+1,0)}:{from:rt.head,to:ae(rt.head.line,ut)}}else return{from:rt.from(),to:rt.to()}})},deleteLine:function(et){return Zl(et,function(rt){return{from:ae(rt.from().line,0),to:Xe(et.doc,ae(rt.to().line+1,0))}})},delLineLeft:function(et){return Zl(et,function(rt){return{from:ae(rt.from().line,0),to:rt.from()}})},delWrappedLineLeft:function(et){return Zl(et,function(rt){var ut=et.charCoords(rt.head,"div").top+5,at=et.coordsChar({left:0,top:ut},"div");return{from:at,to:rt.from()}})},delWrappedLineRight:function(et){return Zl(et,function(rt){var ut=et.charCoords(rt.head,"div").top+5,at=et.coordsChar({left:et.display.lineDiv.offsetWidth+100,top:ut},"div");return{from:rt.from(),to:at}})},undo:function(et){return et.undo()},redo:function(et){return et.redo()},undoSelection:function(et){return et.undoSelection()},redoSelection:function(et){return et.redoSelection()},goDocStart:function(et){return et.extendSelection(ae(et.firstLine(),0))},goDocEnd:function(et){return et.extendSelection(ae(et.lastLine()))},goLineStart:function(et){return et.extendSelectionsBy(function(rt){return Ec(et,rt.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(et){return et.extendSelectionsBy(function(rt){return wp(et,rt.head)},{origin:"+move",bias:1})},goLineEnd:function(et){return et.extendSelectionsBy(function(rt){return Mc(et,rt.head.line)},{origin:"+move",bias:-1})},goLineRight:function(et){return et.extendSelectionsBy(function(rt){var ut=et.cursorCoords(rt.head,"div").top+5;return et.coordsChar({left:et.display.lineDiv.offsetWidth+100,top:ut},"div")},Be)},goLineLeft:function(et){return et.extendSelectionsBy(function(rt){var ut=et.cursorCoords(rt.head,"div").top+5;return et.coordsChar({left:0,top:ut},"div")},Be)},goLineLeftSmart:function(et){return et.extendSelectionsBy(function(rt){var ut=et.cursorCoords(rt.head,"div").top+5,at=et.coordsChar({left:0,top:ut},"div");return at.ch<et.getLine(at.line).search(/\S/)?wp(et,rt.head):at},Be)},goLineUp:function(et){return et.moveV(-1,"line")},goLineDown:function(et){return et.moveV(1,"line")},goPageUp:function(et){return et.moveV(-1,"page")},goPageDown:function(et){return et.moveV(1,"page")},goCharLeft:function(et){return et.moveH(-1,"char")},goCharRight:function(et){return et.moveH(1,"char")},goColumnLeft:function(et){return et.moveH(-1,"column")},goColumnRight:function(et){return et.moveH(1,"column")},goWordLeft:function(et){return et.moveH(-1,"word")},goGroupRight:function(et){return et.moveH(1,"group")},goGroupLeft:function(et){return et.moveH(-1,"group")},goWordRight:function(et){return et.moveH(1,"word")},delCharBefore:function(et){return et.deleteH(-1,"codepoint")},delCharAfter:function(et){return et.deleteH(1,"char")},delWordBefore:function(et){return et.deleteH(-1,"word")},delWordAfter:function(et){return et.deleteH(1,"word")},delGroupBefore:function(et){return et.deleteH(-1,"group")},delGroupAfter:function(et){return et.deleteH(1,"group")},indentAuto:function(et){return et.indentSelection("smart")},indentMore:function(et){return et.indentSelection("add")},indentLess:function(et){return et.indentSelection("subtract")},insertTab:function(et){return et.replaceSelection(" ")},insertSoftTab:function(et){for(var rt=[],ut=et.listSelections(),at=et.options.tabSize,ct=0;ct<ut.length;ct++){var wt=ut[ct].from(),Mt=zt(et.getLine(wt.line),wt.ch,at);rt.push(gn(at-Mt%at))}et.replaceSelections(rt)},defaultTab:function(et){et.somethingSelected()?et.indentSelection("add"):et.execCommand("insertTab")},transposeChars:function(et){return wo(et,function(){for(var rt=et.listSelections(),ut=[],at=0;at<rt.length;at++)if(rt[at].empty()){var ct=rt[at].head,wt=Vn(et.doc,ct.line).text;if(wt){if(ct.ch==wt.length&&(ct=new ae(ct.line,ct.ch-1)),ct.ch>0)ct=new ae(ct.line,ct.ch+1),et.replaceRange(wt.charAt(ct.ch-1)+wt.charAt(ct.ch-2),ae(ct.line,ct.ch-2),ct,"+transpose");else if(ct.line>et.doc.first){var Mt=Vn(et.doc,ct.line-1).text;Mt&&(ct=new ae(ct.line,1),et.replaceRange(wt.charAt(0)+et.doc.lineSeparator()+Mt.charAt(Mt.length-1),ae(ct.line-1,Mt.length-1),ct,"+transpose"))}}ut.push(new ko(ct,ct))}et.setSelections(ut)})},newlineAndIndent:function(et){return wo(et,function(){for(var rt=et.listSelections(),ut=rt.length-1;ut>=0;ut--)et.replaceRange(et.doc.lineSeparator(),rt[ut].anchor,rt[ut].head,"+input");rt=et.listSelections();for(var at=0;at<rt.length;at++)et.indentLine(rt[at].from().line,null,!0);Su(et)})},openLine:function(et){return et.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(et){return et.toggleOverwrite()}};function Ec(et,rt){var ut=Vn(et.doc,rt),at=Gn(ut);return at!=ut&&(rt=Rt(at)),fd(!0,et,at,rt,1)}function Mc(et,rt){var ut=Vn(et.doc,rt),at=gi(ut);return at!=ut&&(rt=Rt(at)),fd(!0,et,ut,rt,-1)}function wp(et,rt){var ut=Ec(et,rt.line),at=Vn(et.doc,ut.line),ct=te(at,et.doc.direction);if(!ct||ct[0].level==0){var wt=Math.max(ut.ch,at.text.search(/\S/)),Mt=rt.line==ut.line&&rt.ch<=wt&&rt.ch;return ae(ut.line,Mt?0:wt,ut.sticky)}return ut}function Pc(et,rt,ut){if(typeof rt=="string"&&(rt=eh[rt],!rt))return!1;et.display.input.ensurePolled();var at=et.display.shift,ct=!1;try{et.isReadOnly()&&(et.state.suppressEdits=!0),ut&&(et.display.shift=!1),ct=rt(et)!=on}finally{et.display.shift=at,et.state.suppressEdits=!1}return ct}function Cp(et,rt,ut){for(var at=0;at<et.state.keyMaps.length;at++){var ct=ya(rt,et.state.keyMaps[at],ut,et);if(ct)return ct}return et.options.extraKeys&&ya(rt,et.options.extraKeys,ut,et)||ya(rt,et.options.keyMap,ut,et)}var su=new kt;function $h(et,rt,ut,at){var ct=et.state.keySeq;if(ct){if(bc(rt))return"handled";if(/\'$/.test(rt)?et.state.keySeq=null:su.set(50,function(){et.state.keySeq==ct&&(et.state.keySeq=null,et.display.input.reset())}),rf(et,ct+" "+rt,ut,at))return!0}return rf(et,rt,ut,at)}function rf(et,rt,ut,at){var ct=Cp(et,rt,at);return ct=="multi"&&(et.state.keySeq=rt),ct=="handled"&&Xi(et,"keyHandled",et,rt,ut),(ct=="handled"||ct=="multi")&&(Ze(ut),No(et)),!!ct}function of(et,rt){var ut=Qm(rt,!0);return ut?rt.shiftKey&&!et.state.keySeq?$h(et,"Shift-"+ut,rt,function(at){return Pc(et,at,!0)})||$h(et,ut,rt,function(at){if(typeof at=="string"?/^go[A-Z]/.test(at):at.motion)return Pc(et,at)}):$h(et,ut,rt,function(at){return Pc(et,at)}):!1}function sf(et,rt,ut){return $h(et,"'"+ut+"'",rt,function(at){return Pc(et,at,!0)})}var Hh=null;function Sp(et){var rt=this;if(!(et.target&&et.target!=rt.display.input.getField())&&(rt.curOp.focus=De(),!sn(rt,et))){_t&&Gt<11&&et.keyCode==27&&(et.returnValue=!1);var ut=et.keyCode;rt.display.shift=ut==16||et.shiftKey;var at=of(rt,et);Nt&&(Hh=at?ut:null,!at&&ut==88&&!Tn&&(Ht?et.metaKey:et.ctrlKey)&&rt.replaceSelection("",null,"cut")),lt&&!Ht&&!at&&ut==46&&et.shiftKey&&!et.ctrlKey&&document.execCommand&&document.execCommand("cut"),ut==18&&!/\bCodeMirror-crosshair\b/.test(rt.display.lineDiv.className)&&bp(rt)}}function bp(et){var rt=et.display.lineDiv;Tt(rt,"CodeMirror-crosshair");function ut(at){(at.keyCode==18||!at.altKey)&&(Qt(rt,"CodeMirror-crosshair"),Rn(document,"keyup",ut),Rn(document,"mouseover",ut))}bn(document,"keyup",ut),bn(document,"mouseover",ut)}function Ep(et){et.keyCode==16&&(this.doc.sel.shift=!1),sn(this,et)}function Va(et){var rt=this;if(!(et.target&&et.target!=rt.display.input.getField())&&!(rs(rt.display,et)||sn(rt,et)||et.ctrlKey&&!et.altKey||Ht&&et.metaKey)){var ut=et.keyCode,at=et.charCode;if(Nt&&ut==Hh){Hh=null,Ze(et);return}if(!(Nt&&(!et.which||et.which<10)&&of(rt,et))){var ct=String.fromCharCode(at==null?ut:at);ct!="\b"&&(sf(rt,et,ct)||rt.display.input.onKeyPress(et))}}}var qm=400,Mp=function(et,rt,ut){this.time=et,this.pos=rt,this.button=ut};Mp.prototype.compare=function(et,rt,ut){return this.time+qm>et&&ze(rt,this.pos)==0&&ut==this.button};var Nc,Zh;function Pp(et,rt){var ut=+new Date;return Zh&&Zh.compare(ut,et,rt)?(Nc=Zh=null,"triple"):Nc&&Nc.compare(ut,et,rt)?(Zh=new Mp(ut,et,rt),Nc=null,"double"):(Nc=new Mp(ut,et,rt),Zh=null,"single")}function Ka(et){var rt=this,ut=rt.display;if(!(sn(rt,et)||ut.activeTouch&&ut.input.supportsTouch())){if(ut.input.ensurePolled(),ut.shift=et.shiftKey,rs(ut,et)){Vt||(ut.scroller.draggable=!1,setTimeout(function(){return ut.scroller.draggable=!0},100));return}if(!uf(rt,et)){var at=gl(rt,et),ct=hn(et),wt=at?Pp(at,ct):"single";window.focus(),ct==1&&rt.state.selectingText&&rt.state.selectingText(et),!(at&&Np(rt,ct,at,wt,et))&&(ct==1?at?tg(rt,at,wt,et):Ke(et)==ut.scroller&&Ze(et):ct==2?(at&&Qd(rt.doc,at),setTimeout(function(){return ut.input.focus()},20)):ct==3&&(Xt?rt.display.input.onContextMenu(et):Yo(rt)))}}}function Np(et,rt,ut,at,ct){var wt="Click";return at=="double"?wt="Double"+wt:at=="triple"&&(wt="Triple"+wt),wt=(rt==1?"Left":rt==2?"Middle":"Right")+wt,$h(et,yp(wt,ct),ct,function(Mt){if(typeof Mt=="string"&&(Mt=eh[Mt]),!Mt)return!1;var Bt=!1;try{et.isReadOnly()&&(et.state.suppressEdits=!0),Bt=Mt(et,ut)!=on}finally{et.state.suppressEdits=!1}return Bt})}function lf(et,rt,ut){var at=et.getOption("configureMouse"),ct=at?at(et,rt,ut):{};if(ct.unit==null){var wt=de?ut.shiftKey&&ut.metaKey:ut.altKey;ct.unit=wt?"rectangle":rt=="single"?"char":rt=="double"?"word":"line"}return(ct.extend==null||et.doc.extend)&&(ct.extend=et.doc.extend||ut.shiftKey),ct.addNew==null&&(ct.addNew=Ht?ut.metaKey:ut.ctrlKey),ct.moveOnDrag==null&&(ct.moveOnDrag=!(Ht?ut.altKey:ut.ctrlKey)),ct}function tg(et,rt,ut,at){_t?setTimeout(Ue(zo,et),0):et.curOp.focus=De();var ct=lf(et,ut,at),wt=et.doc.sel,Mt;et.options.dragDrop&&Pn&&!et.isReadOnly()&&ut=="single"&&(Mt=wt.contains(rt))>-1&&(ze((Mt=wt.ranges[Mt]).from(),rt)<0||rt.xRel>0)&&(ze(Mt.to(),rt)>0||rt.xRel<0)?Tp(et,at,rt,ct):n0(et,at,rt,ct)}function Tp(et,rt,ut,at){var ct=et.display,wt=!1,Mt=Ns(et,function(oe){Vt&&(ct.scroller.draggable=!1),et.state.draggingText=!1,Rn(ct.wrapper.ownerDocument,"mouseup",Mt),Rn(ct.wrapper.ownerDocument,"mousemove",Bt),Rn(ct.scroller,"dragstart",At),Rn(ct.scroller,"drop",Mt),wt||(Ze(oe),at.addNew||Qd(et.doc,ut,null,null,at.extend),Vt&&!Oe||_t&&Gt==9?setTimeout(function(){ct.wrapper.ownerDocument.body.focus({preventScroll:!0}),ct.input.focus()},20):ct.input.focus())}),Bt=function(oe){wt=wt||Math.abs(rt.clientX-oe.clientX)+Math.abs(rt.clientY-oe.clientY)>=10},At=function(){return wt=!0};Vt&&(ct.scroller.draggable=!0),et.state.draggingText=Mt,Mt.copy=!at.moveOnDrag,ct.scroller.dragDrop&&ct.scroller.dragDrop(),bn(ct.wrapper.ownerDocument,"mouseup",Mt),bn(ct.wrapper.ownerDocument,"mousemove",Bt),bn(ct.scroller,"dragstart",At),bn(ct.scroller,"drop",Mt),Yo(et),setTimeout(function(){return ct.input.focus()},20)}function kp(et,rt,ut){if(ut=="char")return new ko(rt,rt);if(ut=="word")return et.findWordAt(rt);if(ut=="line")return new ko(ae(rt.line,0),Xe(et.doc,ae(rt.line+1,0)));var at=ut(et,rt);return new ko(at.from,at.to)}function n0(et,rt,ut,at){var ct=et.display,wt=et.doc;Ze(rt);var Mt,Bt,At=wt.sel,oe=At.ranges;if(at.addNew&&!at.extend?(Bt=wt.sel.contains(ut),Bt>-1?Mt=oe[Bt]:Mt=new ko(ut,ut)):(Mt=wt.sel.primary(),Bt=wt.sel.primIndex),at.unit=="rectangle")at.addNew||(Mt=new ko(ut,ut)),ut=gl(et,rt,!0,!0),Bt=-1;else{var dn=kp(et,ut,at.unit);at.extend?Mt=Jd(Mt,dn.anchor,dn.head,at.extend):Mt=dn}at.addNew?Bt==-1?(Bt=oe.length,ll(wt,ka(et,oe.concat([Mt]),Bt),{scroll:!1,origin:"*mouse"})):oe.length>1&&oe[Bt].empty()&&at.unit=="char"&&!at.extend?(ll(wt,ka(et,oe.slice(0,Bt).concat(oe.slice(Bt+1)),0),{scroll:!1,origin:"*mouse"}),At=wt.sel):qu(wt,Bt,Mt,Ee):(Bt=0,ll(wt,new ga([Mt],0),Ee),At=wt.sel);var pe=ut;function Kn(dr){if(ze(pe,dr)!=0)if(pe=dr,at.unit=="rectangle"){for(var xr=[],jr=et.options.tabSize,hr=zt(Vn(wt,ut.line).text,ut.ch,jr),qr=zt(Vn(wt,dr.line).text,dr.ch,jr),_o=Math.min(hr,qr),ks=Math.max(hr,qr),ns=Math.min(ut.line,dr.line),Dl=Math.min(et.lastLine(),Math.max(ut.line,dr.line));ns<=Dl;ns++){var al=Vn(wt,ns).text,bs=Cn(al,_o,jr);_o==ks?xr.push(new ko(ae(ns,bs),ae(ns,bs))):al.length>bs&&xr.push(new ko(ae(ns,bs),ae(ns,Cn(al,ks,jr))))}xr.length||xr.push(new ko(ut,ut)),ll(wt,ka(et,At.ranges.slice(0,Bt).concat(xr),Bt),{origin:"*mouse",scroll:!1}),et.scrollIntoView(dr)}else{var Wl=Mt,qs=kp(et,dr,at.unit),Es=Wl.anchor,xo;ze(qs.anchor,Es)>0?(xo=qs.head,Es=Ne(Wl.from(),qs.anchor)):(xo=qs.anchor,Es=cn(Wl.to(),qs.head));var ls=At.ranges.slice(0);ls[Bt]=eg(et,new ko(Xe(wt,Es),xo)),ll(wt,ka(et,ls,Bt),Ee)}}var zn=ct.wrapper.getBoundingClientRect(),Pi=0;function Di(dr){var xr=++Pi,jr=gl(et,dr,!0,at.unit=="rectangle");if(jr)if(ze(jr,pe)!=0){et.curOp.focus=De(),Kn(jr);var hr=io(ct,wt);(jr.line>=hr.to||jr.line<hr.from)&&setTimeout(Ns(et,function(){Pi==xr&&Di(dr)}),150)}else{var qr=dr.clientY<zn.top?-20:dr.clientY>zn.bottom?20:0;qr&&setTimeout(Ns(et,function(){Pi==xr&&(ct.scroller.scrollTop+=qr,Di(dr))}),50)}}function Zi(dr){et.state.selectingText=!1,Pi=1/0,dr&&(Ze(dr),ct.input.focus()),Rn(ct.wrapper.ownerDocument,"mousemove",or),Rn(ct.wrapper.ownerDocument,"mouseup",vr),wt.history.lastSelOrigin=null}var or=Ns(et,function(dr){dr.buttons===0||!hn(dr)?Zi(dr):Di(dr)}),vr=Ns(et,Zi);et.state.selectingText=vr,bn(ct.wrapper.ownerDocument,"mousemove",or),bn(ct.wrapper.ownerDocument,"mouseup",vr)}function eg(et,rt){var ut=rt.anchor,at=rt.head,ct=Vn(et.doc,ut.line);if(ze(ut,at)==0&&ut.sticky==at.sticky)return rt;var wt=te(ct);if(!wt)return rt;var Mt=Te(wt,ut.ch,ut.sticky),Bt=wt[Mt];if(Bt.from!=ut.ch&&Bt.to!=ut.ch)return rt;var At=Mt+(Bt.from==ut.ch==(Bt.level!=1)?0:1);if(At==0||At==wt.length)return rt;var oe;if(at.line!=ut.line)oe=(at.line-ut.line)*(et.doc.direction=="ltr"?1:-1)>0;else{var dn=Te(wt,at.ch,at.sticky),pe=dn-Mt||(at.ch-ut.ch)*(Bt.level==1?-1:1);dn==At-1||dn==At?oe=pe<0:oe=pe>0}var Kn=wt[At+(oe?-1:0)],zn=oe==(Kn.level==1),Pi=zn?Kn.from:Kn.to,Di=zn?"after":"before";return ut.ch==Pi&&ut.sticky==Di?rt:new ko(new ae(ut.line,Pi,Di),at)}function af(et,rt,ut,at){var ct,wt;if(rt.touches)ct=rt.touches[0].clientX,wt=rt.touches[0].clientY;else try{ct=rt.clientX,wt=rt.clientY}catch(Kn){return!1}if(ct>=Math.floor(et.display.gutters.getBoundingClientRect().right))return!1;at&&Ze(rt);var Mt=et.display,Bt=Mt.lineDiv.getBoundingClientRect();if(wt>Bt.bottom||!Mn(et,ut))return An(rt);wt-=Bt.top-Mt.viewOffset;for(var At=0;At<et.display.gutterSpecs.length;++At){var oe=Mt.gutters.childNodes[At];if(oe&&oe.getBoundingClientRect().right>=ct){var dn=Pe(et.doc,wt),pe=et.display.gutterSpecs[At];return In(et,ut,et,dn,pe.className,rt),An(rt)}}}function uf(et,rt){return af(et,rt,"gutterClick",!0)}function hf(et,rt){rs(et.display,rt)||ng(et,rt)||sn(et,rt,"contextmenu")||Xt||et.display.input.onContextMenu(rt)}function ng(et,rt){return Mn(et,"gutterContextMenu")?af(et,rt,"gutterContextMenu",!1):!1}function cf(et){et.display.wrapper.className=et.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+et.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Jr(et)}var nh={toString:function(){return"CodeMirror.Init"}},Op={},pd={};function ig(et){var rt=et.optionHandlers;function ut(at,ct,wt,Mt){et.defaults[at]=ct,wt&&(rt[at]=Mt?function(Bt,At,oe){oe!=nh&&wt(Bt,At,oe)}:wt)}et.defineOption=ut,et.Init=nh,ut("value","",function(at,ct){return at.setValue(ct)},!0),ut("mode",null,function(at,ct){at.doc.modeOption=ct,Qr(at)},!0),ut("indentUnit",2,Qr,!0),ut("indentWithTabs",!1),ut("smartIndent",!0),ut("tabSize",4,function(at){td(at),Jr(at),Ko(at)},!0),ut("lineSeparator",null,function(at,ct){if(at.doc.lineSep=ct,!!ct){var wt=[],Mt=at.doc.first;at.doc.iter(function(At){for(var oe=0;;){var dn=At.text.indexOf(ct,oe);if(dn==-1)break;oe=dn+ct.length,wt.push(ae(Mt,dn))}Mt++});for(var Bt=wt.length-1;Bt>=0;Bt--)Bh(at.doc,ct,wt[Bt],ae(wt[Bt].line,wt[Bt].ch+ct.length))}}),ut("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(at,ct,wt){at.state.specialChars=new RegExp(ct.source+(ct.test(" ")?"":"| "),"g"),wt!=nh&&at.refresh()}),ut("specialCharPlaceholder",So,function(at){return at.refresh()},!0),ut("electricChars",!0),ut("inputStyle",Kt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ut("spellcheck",!1,function(at,ct){return at.getInputField().spellcheck=ct},!0),ut("autocorrect",!1,function(at,ct){return at.getInputField().autocorrect=ct},!0),ut("autocapitalize",!1,function(at,ct){return at.getInputField().autocapitalize=ct},!0),ut("rtlMoveVisually",!Ae),ut("wholeLineUpdateBefore",!0),ut("theme","default",function(at){cf(at),ea(at)},!0),ut("keyMap","default",function(at,ct,wt){var Mt=zh(ct),Bt=wt!=nh&&zh(wt);Bt&&Bt.detach&&Bt.detach(at,Mt),Mt.attach&&Mt.attach(at,Bt||null)}),ut("extraKeys",null),ut("configureMouse",null),ut("lineWrapping",!1,rg,!0),ut("gutters",[],function(at,ct){at.display.gutterSpecs=js(ct,at.options.lineNumbers),ea(at)},!0),ut("fixedGutter",!0,function(at,ct){at.display.gutters.style.left=ct?Xc(at.display)+"px":"0",at.refresh()},!0),ut("coverGutterNextToScrollbar",!1,function(at){return Wu(at)},!0),ut("scrollbarStyle","native",function(at){ip(at),Wu(at),at.display.scrollbars.setScrollTop(at.doc.scrollTop),at.display.scrollbars.setScrollLeft(at.doc.scrollLeft)},!0),ut("lineNumbers",!1,function(at,ct){at.display.gutterSpecs=js(at.options.gutters,ct),ea(at)},!0),ut("firstLineNumber",1,ea,!0),ut("lineNumberFormatter",function(at){return at},ea,!0),ut("showCursorWhenSelecting",!1,Ps,!0),ut("resetSelectionOnContextMenu",!0),ut("lineWiseCopyCut",!0),ut("pasteLinesPerSelection",!0),ut("selectionsMayTouch",!1),ut("readOnly",!1,function(at,ct){ct=="nocursor"&&(Nh(at),at.display.input.blur()),at.display.input.readOnlyChanged(ct)}),ut("screenReaderLabel",null,function(at,ct){ct=ct===""?null:ct,at.display.input.screenReaderLabelChanged(ct)}),ut("disableInput",!1,function(at,ct){ct||at.display.input.reset()},!0),ut("dragDrop",!0,df),ut("allowDropFileTypes",null),ut("cursorBlinkRate",530),ut("cursorScrollMargin",0),ut("cursorHeight",1,Ps,!0),ut("singleCursorHeightPerLine",!0,Ps,!0),ut("workTime",100),ut("workDelay",100),ut("flattenSpans",!0,td,!0),ut("addModeClass",!1,td,!0),ut("pollInterval",100),ut("undoDepth",200,function(at,ct){return at.doc.history.undoDepth=ct}),ut("historyEventDelay",1250),ut("viewportMargin",10,function(at){return at.refresh()},!0),ut("maxHighlightLength",1e4,td,!0),ut("moveInputWithCursor",!0,function(at,ct){ct||at.display.input.resetPosition()}),ut("tabindex",null,function(at,ct){return at.display.input.getField().tabIndex=ct||""}),ut("autofocus",null),ut("direction","ltr",function(at,ct){return at.doc.setDirection(ct)},!0),ut("phrases",null)}function df(et,rt,ut){var at=ut&&ut!=nh;if(!rt!=!at){var ct=et.display.dragFunctions,wt=rt?bn:Rn;wt(et.display.scroller,"dragstart",ct.start),wt(et.display.scroller,"dragenter",ct.enter),wt(et.display.scroller,"dragover",ct.over),wt(et.display.scroller,"dragleave",ct.leave),wt(et.display.scroller,"drop",ct.drop)}}function rg(et){et.options.lineWrapping?(Tt(et.display.wrapper,"CodeMirror-wrap"),et.display.sizer.style.minWidth="",et.display.sizerWidth=null):(Qt(et.display.wrapper,"CodeMirror-wrap"),Or(et)),Tr(et),Ko(et),Jr(et),setTimeout(function(){return Wu(et)},100)}function yo(et,rt){var ut=this;if(!(this instanceof yo))return new yo(et,rt);this.options=rt=rt?On(rt):{},On(Op,rt,!1);var at=rt.value;typeof at=="string"?at=new Qs(at,rt.mode,null,rt.lineSeparator,rt.direction):rt.mode&&(at.modeOption=rt.mode),this.doc=at;var ct=new yo.inputStyles[rt.inputStyle](this),wt=this.display=new Xu(et,at,ct,rt);wt.wrapper.CodeMirror=this,cf(this),rt.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ip(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 kt,keySeq:null,specialChars:null},rt.autofocus&&!Kt&&wt.input.focus(),_t&&Gt<11&&setTimeout(function(){return ut.display.input.reset(!0)},20),Tc(this),ia(),Vu(this),this.curOp.forceUpdate=!0,Ud(this,at),rt.autofocus&&!Kt||this.hasFocus()?setTimeout(function(){ut.hasFocus()&&!ut.state.focused&&fo(ut)},20):Nh(this);for(var Mt in pd)pd.hasOwnProperty(Mt)&&pd[Mt](this,rt[Mt],nh);xs(this),rt.finishInit&&rt.finishInit(this);for(var Bt=0;Bt<Wh.length;++Bt)Wh[Bt](this);Ku(this),Vt&&rt.lineWrapping&&getComputedStyle(wt.lineDiv).textRendering=="optimizelegibility"&&(wt.lineDiv.style.textRendering="auto")}yo.defaults=Op,yo.optionHandlers=pd;function Tc(et){var rt=et.display;bn(rt.scroller,"mousedown",Ns(et,Ka)),_t&&Gt<11?bn(rt.scroller,"dblclick",Ns(et,function(At){if(!sn(et,At)){var oe=gl(et,At);if(!(!oe||uf(et,At)||rs(et.display,At))){Ze(At);var dn=et.findWordAt(oe);Qd(et.doc,dn.anchor,dn.head)}}})):bn(rt.scroller,"dblclick",function(At){return sn(et,At)||Ze(At)}),bn(rt.scroller,"contextmenu",function(At){return hf(et,At)}),bn(rt.input.getField(),"contextmenu",function(At){rt.scroller.contains(At.target)||hf(et,At)});var ut,at={end:0};function ct(){rt.activeTouch&&(ut=setTimeout(function(){return rt.activeTouch=null},1e3),at=rt.activeTouch,at.end=+new Date)}function wt(At){if(At.touches.length!=1)return!1;var oe=At.touches[0];return oe.radiusX<=1&&oe.radiusY<=1}function Mt(At,oe){if(oe.left==null)return!0;var dn=oe.left-At.left,pe=oe.top-At.top;return dn*dn+pe*pe>20*20}bn(rt.scroller,"touchstart",function(At){if(!sn(et,At)&&!wt(At)&&!uf(et,At)){rt.input.ensurePolled(),clearTimeout(ut);var oe=+new Date;rt.activeTouch={start:oe,moved:!1,prev:oe-at.end<=300?at:null},At.touches.length==1&&(rt.activeTouch.left=At.touches[0].pageX,rt.activeTouch.top=At.touches[0].pageY)}}),bn(rt.scroller,"touchmove",function(){rt.activeTouch&&(rt.activeTouch.moved=!0)}),bn(rt.scroller,"touchend",function(At){var oe=rt.activeTouch;if(oe&&!rs(rt,At)&&oe.left!=null&&!oe.moved&&new Date-oe.start<300){var dn=et.coordsChar(rt.activeTouch,"page"),pe;!oe.prev||Mt(oe,oe.prev)?pe=new ko(dn,dn):!oe.prev.prev||Mt(oe,oe.prev.prev)?pe=et.findWordAt(dn):pe=new ko(ae(dn.line,0),Xe(et.doc,ae(dn.line+1,0))),et.setSelection(pe.anchor,pe.head),et.focus(),Ze(At)}ct()}),bn(rt.scroller,"touchcancel",ct),bn(rt.scroller,"scroll",function(){rt.scroller.clientHeight&&(kh(et,rt.scroller.scrollTop),bu(et,rt.scroller.scrollLeft,!0),In(et,"scroll",et))}),bn(rt.scroller,"mousewheel",function(At){return zs(et,At)}),bn(rt.scroller,"DOMMouseScroll",function(At){return zs(et,At)}),bn(rt.wrapper,"scroll",function(){return rt.wrapper.scrollTop=rt.wrapper.scrollLeft=0}),rt.dragFunctions={enter:function(At){sn(et,At)||he(At)},over:function(At){sn(et,At)||(Ym(et,At),he(At))},start:function(At){return Um(et,At)},drop:Ns(et,fp),leave:function(At){sn(et,At)||Xm(et)}};var Bt=rt.input.getField();bn(Bt,"keyup",function(At){return Ep.call(et,At)}),bn(Bt,"keydown",Ns(et,Sp)),bn(Bt,"keypress",Ns(et,Va)),bn(Bt,"focus",function(At){return fo(et,At)}),bn(Bt,"blur",function(At){return Nh(et,At)})}var Wh=[];yo.defineInitHook=function(et){return Wh.push(et)};function Ts(et,rt,ut,at){var ct=et.doc,wt;ut==null&&(ut="add"),ut=="smart"&&(ct.mode.indent?wt=Ji(et,rt).state:ut="prev");var Mt=et.options.tabSize,Bt=Vn(ct,rt),At=zt(Bt.text,null,Mt);Bt.stateAfter&&(Bt.stateAfter=null);var oe=Bt.text.match(/^\s*/)[0],dn;if(!at&&!/\S/.test(Bt.text))dn=0,ut="not";else if(ut=="smart"&&(dn=ct.mode.indent(wt,Bt.text.slice(oe.length),Bt.text),dn==on||dn>150)){if(!at)return;ut="prev"}ut=="prev"?rt>ct.first?dn=zt(Vn(ct,rt-1).text,null,Mt):dn=0:ut=="add"?dn=At+et.options.indentUnit:ut=="subtract"?dn=At-et.options.indentUnit:typeof ut=="number"&&(dn=At+ut),dn=Math.max(0,dn);var pe="",Kn=0;if(et.options.indentWithTabs)for(var zn=Math.floor(dn/Mt);zn;--zn)Kn+=Mt,pe+=" ";if(Kn<dn&&(pe+=gn(dn-Kn)),pe!=oe)return Bh(ct,pe,ae(rt,0),ae(rt,oe.length),"+input"),Bt.stateAfter=null,!0;for(var Pi=0;Pi<ct.sel.ranges.length;Pi++){var Di=ct.sel.ranges[Pi];if(Di.head.line==rt&&Di.head.ch<oe.length){var Zi=ae(rt,oe.length);qu(ct,Pi,new ko(Zi,Zi));break}}}var Ll=null;function Vh(et){Ll=et}function md(et,rt,ut,at,ct){var wt=et.doc;et.display.shift=!1,at||(at=wt.sel);var Mt=+new Date-200,Bt=ct=="paste"||et.state.pasteIncoming>Mt,At=ri(rt),oe=null;if(Bt&&at.ranges.length>1)if(Ll&&Ll.text.join(`
|
|
|
`)==rt){if(at.ranges.length%Ll.text.length==0){oe=[];for(var dn=0;dn<Ll.text.length;dn++)oe.push(wt.splitLines(Ll.text[dn]))}}else At.length==at.ranges.length&&et.options.pasteLinesPerSelection&&(oe=Dn(At,function(or){return[or]}));for(var pe=et.curOp.updateInput,Kn=at.ranges.length-1;Kn>=0;Kn--){var zn=at.ranges[Kn],Pi=zn.from(),Di=zn.to();zn.empty()&&(ut&&ut>0?Pi=ae(Pi.line,Pi.ch-ut):et.state.overwrite&&!Bt?Di=ae(Di.line,Math.min(Vn(wt,Di.line).text.length,Di.ch+ke(At).length)):Bt&&Ll&&Ll.lineWise&&Ll.text.join(`
|
|
|
`)==At.join(`
|
|
|
`)&&(Pi=Di=ae(Pi.line,0)));var Zi={from:Pi,to:Di,text:oe?oe[Kn%oe.length]:At,origin:ct||(Bt?"paste":et.state.cutIncoming>Mt?"cut":"+input")};th(et.doc,Zi),Xi(et,"inputRead",et,Zi)}rt&&!Bt&&Dp(et,rt),Su(et),et.curOp.updateInput<2&&(et.curOp.updateInput=pe),et.curOp.typing=!0,et.state.pasteIncoming=et.state.cutIncoming=-1}function Lp(et,rt){var ut=et.clipboardData&&et.clipboardData.getData("Text");if(ut)return et.preventDefault(),!rt.isReadOnly()&&!rt.options.disableInput&&wo(rt,function(){return md(rt,ut,0,null,"paste")}),!0}function Dp(et,rt){if(!(!et.options.electricChars||!et.options.smartIndent))for(var ut=et.doc.sel,at=ut.ranges.length-1;at>=0;at--){var ct=ut.ranges[at];if(!(ct.head.ch>100||at&&ut.ranges[at-1].head.line==ct.head.line)){var wt=et.getModeAt(ct.head),Mt=!1;if(wt.electricChars){for(var Bt=0;Bt<wt.electricChars.length;Bt++)if(rt.indexOf(wt.electricChars.charAt(Bt))>-1){Mt=Ts(et,ct.head.line,"smart");break}}else wt.electricInput&&wt.electricInput.test(Vn(et.doc,ct.head.line).text.slice(0,ct.head.ch))&&(Mt=Ts(et,ct.head.line,"smart"));Mt&&Xi(et,"electricInput",et,ct.head.line)}}}function Ip(et){for(var rt=[],ut=[],at=0;at<et.doc.sel.ranges.length;at++){var ct=et.doc.sel.ranges[at].head.line,wt={anchor:ae(ct,0),head:ae(ct+1,0)};ut.push(wt),rt.push(et.getRange(wt.anchor,wt.head))}return{text:rt,ranges:ut}}function Ap(et,rt,ut,at){et.setAttribute("autocorrect",ut?"":"off"),et.setAttribute("autocapitalize",at?"":"off"),et.setAttribute("spellcheck",!!rt)}function Fp(){var et=Le("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),rt=Le("div",[et],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Vt?et.style.width="1000px":et.setAttribute("wrap","off"),ce&&(et.style.border="1px solid black"),Ap(et),rt}function ih(et){var rt=et.optionHandlers,ut=et.helpers={};et.prototype={constructor:et,focus:function(){window.focus(),this.display.input.focus()},setOption:function(at,ct){var wt=this.options,Mt=wt[at];wt[at]==ct&&at!="mode"||(wt[at]=ct,rt.hasOwnProperty(at)&&Ns(this,rt[at])(this,ct,Mt),In(this,"optionChange",this,at))},getOption:function(at){return this.options[at]},getDoc:function(){return this.doc},addKeyMap:function(at,ct){this.state.keyMaps[ct?"push":"unshift"](zh(at))},removeKeyMap:function(at){for(var ct=this.state.keyMaps,wt=0;wt<ct.length;++wt)if(ct[wt]==at||ct[wt].name==at)return ct.splice(wt,1),!0},addOverlay:Fs(function(at,ct){var wt=at.token?at:et.getMode(this.options,at);if(wt.startState)throw new Error("Overlays may not be stateful.");ln(this.state.overlays,{mode:wt,modeSpec:at,opaque:ct&&ct.opaque,priority:ct&&ct.priority||0},function(Mt){return Mt.priority}),this.state.modeGen++,Ko(this)}),removeOverlay:Fs(function(at){for(var ct=this.state.overlays,wt=0;wt<ct.length;++wt){var Mt=ct[wt].modeSpec;if(Mt==at||typeof at=="string"&&Mt.name==at){ct.splice(wt,1),this.state.modeGen++,Ko(this);return}}}),indentLine:Fs(function(at,ct,wt){typeof ct!="string"&&typeof ct!="number"&&(ct==null?ct=this.options.smartIndent?"smart":"prev":ct=ct?"add":"subtract"),qt(this.doc,at)&&Ts(this,at,ct,wt)}),indentSelection:Fs(function(at){for(var ct=this.doc.sel.ranges,wt=-1,Mt=0;Mt<ct.length;Mt++){var Bt=ct[Mt];if(Bt.empty())Bt.head.line>wt&&(Ts(this,Bt.head.line,at,!0),wt=Bt.head.line,Mt==this.doc.sel.primIndex&&Su(this));else{var At=Bt.from(),oe=Bt.to(),dn=Math.max(wt,At.line);wt=Math.min(this.lastLine(),oe.line-(oe.ch?0:1))+1;for(var pe=dn;pe<wt;++pe)Ts(this,pe,at);var Kn=this.doc.sel.ranges;At.ch==0&&ct.length==Kn.length&&Kn[Mt].from().ch>0&&qu(this.doc,Mt,new ko(At,Kn[Mt].to()),$t)}}}),getTokenAt:function(at,ct){return an(this,at,ct)},getLineTokens:function(at,ct){return an(this,ae(at),ct,!0)},getTokenTypeAt:function(at){at=Xe(this.doc,at);var ct=$i(this,Vn(this.doc,at.line)),wt=0,Mt=(ct.length-1)/2,Bt=at.ch,At;if(Bt==0)At=ct[2];else for(;;){var oe=wt+Mt>>1;if((oe?ct[oe*2-1]:0)>=Bt)Mt=oe;else if(ct[oe*2+1]<Bt)wt=oe+1;else{At=ct[oe*2+2];break}}var dn=At?At.indexOf("overlay "):-1;return dn<0?At:dn==0?null:At.slice(0,dn-1)},getModeAt:function(at){var ct=this.doc.mode;return ct.innerMode?et.innerMode(ct,this.getTokenAt(at).state).mode:ct},getHelper:function(at,ct){return this.getHelpers(at,ct)[0]},getHelpers:function(at,ct){var wt=[];if(!ut.hasOwnProperty(ct))return wt;var Mt=ut[ct],Bt=this.getModeAt(at);if(typeof Bt[ct]=="string")Mt[Bt[ct]]&&wt.push(Mt[Bt[ct]]);else if(Bt[ct])for(var At=0;At<Bt[ct].length;At++){var oe=Mt[Bt[ct][At]];oe&&wt.push(oe)}else Bt.helperType&&Mt[Bt.helperType]?wt.push(Mt[Bt.helperType]):Mt[Bt.name]&&wt.push(Mt[Bt.name]);for(var dn=0;dn<Mt._global.length;dn++){var pe=Mt._global[dn];pe.pred(Bt,this)&&Ye(wt,pe.val)==-1&&wt.push(pe.val)}return wt},getStateAfter:function(at,ct){var wt=this.doc;return at=Fe(wt,at==null?wt.first+wt.size-1:at),Ji(this,at+1,ct).state},cursorCoords:function(at,ct){var wt,Mt=this.doc.sel.primary();return at==null?wt=Mt.head:typeof at=="object"?wt=Xe(this.doc,at):wt=at?Mt.from():Mt.to(),Po(this,wt,ct||"page")},charCoords:function(at,ct){return Nl(this,Xe(this.doc,at),ct||"page")},coordsChar:function(at,ct){return at=ql(this,at,ct||"page"),ys(this,at.left,at.top)},lineAtHeight:function(at,ct){return at=ql(this,{top:at,left:0},ct||"page").top,Pe(this.doc,at+this.display.viewOffset)},heightAtLine:function(at,ct,wt){var Mt=!1,Bt;if(typeof at=="number"){var At=this.doc.first+this.doc.size-1;at<this.doc.first?at=this.doc.first:at>At&&(at=At,Mt=!0),Bt=Vn(this.doc,at)}else Bt=at;return ts(this,Bt,{top:0,left:0},ct||"page",wt||Mt).top+(Mt?this.doc.height-br(Bt):0)},defaultTextHeight:function(){return ml(this.display)},defaultCharWidth:function(){return Ta(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(at,ct,wt,Mt,Bt){var At=this.display;at=Po(this,Xe(this.doc,at));var oe=at.bottom,dn=at.left;if(ct.style.position="absolute",ct.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ct),At.sizer.appendChild(ct),Mt=="over")oe=at.top;else if(Mt=="above"||Mt=="near"){var pe=Math.max(At.wrapper.clientHeight,this.doc.height),Kn=Math.max(At.sizer.clientWidth,At.lineSpace.clientWidth);(Mt=="above"||at.bottom+ct.offsetHeight>pe)&&at.top>ct.offsetHeight?oe=at.top-ct.offsetHeight:at.bottom+ct.offsetHeight<=pe&&(oe=at.bottom),dn+ct.offsetWidth>Kn&&(dn=Kn-ct.offsetWidth)}ct.style.top=oe+"px",ct.style.left=ct.style.right="",Bt=="right"?(dn=At.sizer.clientWidth-ct.offsetWidth,ct.style.right="0px"):(Bt=="left"?dn=0:Bt=="middle"&&(dn=(At.sizer.clientWidth-ct.offsetWidth)/2),ct.style.left=dn+"px"),wt&&Jc(this,{left:dn,top:oe,right:dn+ct.offsetWidth,bottom:oe+ct.offsetHeight})},triggerOnKeyDown:Fs(Sp),triggerOnKeyPress:Fs(Va),triggerOnKeyUp:Ep,triggerOnMouseDown:Fs(Ka),execCommand:function(at){if(eh.hasOwnProperty(at))return eh[at].call(null,this)},triggerElectric:Fs(function(at){Dp(this,at)}),findPosH:function(at,ct,wt,Mt){var Bt=1;ct<0&&(Bt=-1,ct=-ct);for(var At=Xe(this.doc,at),oe=0;oe<ct&&(At=gd(this.doc,At,Bt,wt,Mt),!At.hitSide);++oe);return At},moveH:Fs(function(at,ct){var wt=this;this.extendSelectionsBy(function(Mt){return wt.display.shift||wt.doc.extend||Mt.empty()?gd(wt.doc,Mt.head,at,ct,wt.options.rtlMoveVisually):at<0?Mt.from():Mt.to()},Be)}),deleteH:Fs(function(at,ct){var wt=this.doc.sel,Mt=this.doc;wt.somethingSelected()?Mt.replaceSelection("",null,"+delete"):Zl(this,function(Bt){var At=gd(Mt,Bt.head,at,ct,!1);return at<0?{from:At,to:Bt.head}:{from:Bt.head,to:At}})}),findPosV:function(at,ct,wt,Mt){var Bt=1,At=Mt;ct<0&&(Bt=-1,ct=-ct);for(var oe=Xe(this.doc,at),dn=0;dn<ct;++dn){var pe=Po(this,oe,"div");if(At==null?At=pe.left:pe.left=At,oe=rh(this,pe,Bt,wt),oe.hitSide)break}return oe},moveV:Fs(function(at,ct){var wt=this,Mt=this.doc,Bt=[],At=!this.display.shift&&!Mt.extend&&Mt.sel.somethingSelected();if(Mt.extendSelectionsBy(function(dn){if(At)return at<0?dn.from():dn.to();var pe=Po(wt,dn.head,"div");dn.goalColumn!=null&&(pe.left=dn.goalColumn),Bt.push(pe.left);var Kn=rh(wt,pe,at,ct);return ct=="page"&&dn==Mt.sel.primary()&&Zd(wt,Nl(wt,Kn,"div").top-pe.top),Kn},Be),Bt.length)for(var oe=0;oe<Mt.sel.ranges.length;oe++)Mt.sel.ranges[oe].goalColumn=Bt[oe]}),findWordAt:function(at){var ct=this.doc,wt=Vn(ct,at.line).text,Mt=at.ch,Bt=at.ch;if(wt){var At=this.getHelper(at,"wordChars");(at.sticky=="before"||Bt==wt.length)&&Mt?--Mt:++Bt;for(var oe=wt.charAt(Mt),dn=Pt(oe,At)?function(pe){return Pt(pe,At)}:/\s/.test(oe)?function(pe){return/\s/.test(pe)}:function(pe){return!/\s/.test(pe)&&!Pt(pe)};Mt>0&&dn(wt.charAt(Mt-1));)--Mt;for(;Bt<wt.length&&dn(wt.charAt(Bt));)++Bt}return new ko(ae(at.line,Mt),ae(at.line,Bt))},toggleOverwrite:function(at){at!=null&&at==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Tt(this.display.cursorDiv,"CodeMirror-overwrite"):Qt(this.display.cursorDiv,"CodeMirror-overwrite"),In(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==De()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Fs(function(at,ct){Th(this,at,ct)}),getScrollInfo:function(){var at=this.display.scroller;return{left:at.scrollLeft,top:at.scrollTop,height:at.scrollHeight-As(this)-this.display.barHeight,width:at.scrollWidth-As(this)-this.display.barWidth,clientHeight:da(this),clientWidth:sl(this)}},scrollIntoView:Fs(function(at,ct){at==null?(at={from:this.doc.sel.primary().head,to:null},ct==null&&(ct=this.options.cursorScrollMargin)):typeof at=="number"?at={from:ae(at,0),to:null}:at.from==null&&(at={from:at,to:null}),at.to||(at.to=at.from),at.margin=ct||0,at.from.line!=null?po(this,at):Wd(this,at.from,at.to,at.margin)}),setSize:Fs(function(at,ct){var wt=this,Mt=function(At){return typeof At=="number"||/^\d+$/.test(String(At))?At+"px":At};at!=null&&(this.display.wrapper.style.width=Mt(at)),ct!=null&&(this.display.wrapper.style.height=Mt(ct)),this.options.lineWrapping&&Ir(this);var Bt=this.display.viewFrom;this.doc.iter(Bt,this.display.viewTo,function(At){if(At.widgets){for(var oe=0;oe<At.widgets.length;oe++)if(At.widgets[oe].noHScroll){Xr(wt,Bt,"widget");break}}++Bt}),this.curOp.forceUpdate=!0,In(this,"refresh",this)}),operation:function(at){return wo(this,at)},startOperation:function(){return Vu(this)},endOperation:function(){return Ku(this)},refresh:Fs(function(){var at=this.display.cachedTextHeight;Ko(this),this.curOp.forceUpdate=!0,Jr(this),Th(this,this.doc.scrollLeft,this.doc.scrollTop),Uu(this.display),(at==null||Math.abs(at-ml(this.display))>.5||this.options.lineWrapping)&&Tr(this),In(this,"refresh",this)}),swapDoc:Fs(function(at){var ct=this.doc;return ct.cm=null,this.state.selectingText&&this.state.selectingText(),Ud(this,at),Jr(this),this.display.input.reset(),Th(this,at.scrollLeft,at.scrollTop),this.curOp.forceScroll=!0,Xi(this,"swapDoc",this,ct),ct}),phrase:function(at){var ct=this.options.phrases;return ct&&Object.prototype.hasOwnProperty.call(ct,at)?ct[at]:at},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}},ye(et),et.registerHelper=function(at,ct,wt){ut.hasOwnProperty(at)||(ut[at]=et[at]={_global:[]}),ut[at][ct]=wt},et.registerGlobalHelper=function(at,ct,wt,Mt){et.registerHelper(at,ct,Mt),ut[at]._global.push({pred:wt,val:Mt})}}function gd(et,rt,ut,at,ct){var wt=rt,Mt=ut,Bt=Vn(et,rt.line),At=ct&&et.direction=="rtl"?-ut:ut;function oe(){var vr=rt.line+At;return vr<et.first||vr>=et.first+et.size?!1:(rt=new ae(vr,rt.ch,rt.sticky),Bt=Vn(et,vr))}function dn(vr){var dr;if(at=="codepoint"){var xr=Bt.text.charCodeAt(rt.ch+(at>0?0:-1));isNaN(xr)?dr=null:dr=new ae(rt.line,Math.max(0,Math.min(Bt.text.length,rt.ch+ut*(xr>=55296&&xr<56320?2:1))),-ut)}else ct?dr=nf(et.cm,Bt,rt,ut):dr=ms(Bt,rt,ut);if(dr==null)if(!vr&&oe())rt=fd(ct,et.cm,Bt,rt.line,At);else return!1;else rt=dr;return!0}if(at=="char"||at=="codepoint")dn();else if(at=="column")dn(!0);else if(at=="word"||at=="group")for(var pe=null,Kn=at=="group",zn=et.cm&&et.cm.getHelper(rt,"wordChars"),Pi=!0;!(ut<0&&!dn(!Pi));Pi=!1){var Di=Bt.text.charAt(rt.ch)||`
|
|
|
`,Zi=Pt(Di,zn)?"w":Kn&&Di==`
|
|
|
`?"n":!Kn||/\s/.test(Di)?null:"p";if(Kn&&!Pi&&!Zi&&(Zi="s"),pe&&pe!=Zi){ut<0&&(ut=1,dn(),rt.sticky="after");break}if(Zi&&(pe=Zi),ut>0&&!dn(!Pi))break}var or=ld(et,rt,wt,Mt,!0);return Jt(wt,or)&&(or.hitSide=!0),or}function rh(et,rt,ut,at){var ct=et.doc,wt=rt.left,Mt;if(at=="page"){var Bt=Math.min(et.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),At=Math.max(Bt-.5*ml(et.display),3);Mt=(ut>0?rt.bottom:rt.top)+ut*At}else at=="line"&&(Mt=ut>0?rt.bottom+3:rt.top-3);for(var oe;oe=ys(et,wt,Mt),!!oe.outside;){if(ut<0?Mt<=0:Mt>=ct.height){oe.hitSide=!0;break}Mt+=ut*5}return oe}var Fo=function(et){this.cm=et,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new kt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fo.prototype.init=function(et){var rt=this,ut=this,at=ut.cm,ct=ut.div=et.lineDiv;Ap(ct,at.options.spellcheck,at.options.autocorrect,at.options.autocapitalize);function wt(Bt){for(var At=Bt.target;At;At=At.parentNode){if(At==ct)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(At.className))break}return!1}bn(ct,"paste",function(Bt){!wt(Bt)||sn(at,Bt)||Lp(Bt,at)||Gt<=11&&setTimeout(Ns(at,function(){return rt.updateFromDOM()}),20)}),bn(ct,"compositionstart",function(Bt){rt.composing={data:Bt.data,done:!1}}),bn(ct,"compositionupdate",function(Bt){rt.composing||(rt.composing={data:Bt.data,done:!1})}),bn(ct,"compositionend",function(Bt){rt.composing&&(Bt.data!=rt.composing.data&&rt.readFromDOMSoon(),rt.composing.done=!0)}),bn(ct,"touchstart",function(){return ut.forceCompositionEnd()}),bn(ct,"input",function(){rt.composing||rt.readFromDOMSoon()});function Mt(Bt){if(!(!wt(Bt)||sn(at,Bt))){if(at.somethingSelected())Vh({lineWise:!1,text:at.getSelections()}),Bt.type=="cut"&&at.replaceSelection("",null,"cut");else if(at.options.lineWiseCopyCut){var At=Ip(at);Vh({lineWise:!0,text:At.text}),Bt.type=="cut"&&at.operation(function(){at.setSelections(At.ranges,0,$t),at.replaceSelection("",null,"cut")})}else return;if(Bt.clipboardData){Bt.clipboardData.clearData();var oe=Ll.text.join(`
|
|
|
`);if(Bt.clipboardData.setData("Text",oe),Bt.clipboardData.getData("Text")==oe){Bt.preventDefault();return}}var dn=Fp(),pe=dn.firstChild;at.display.lineSpace.insertBefore(dn,at.display.lineSpace.firstChild),pe.value=Ll.text.join(`
|
|
|
`);var Kn=document.activeElement;we(pe),setTimeout(function(){at.display.lineSpace.removeChild(dn),Kn.focus(),Kn==ct&&ut.showPrimarySelection()},50)}}bn(ct,"copy",Mt),bn(ct,"cut",Mt)},Fo.prototype.screenReaderLabelChanged=function(et){et?this.div.setAttribute("aria-label",et):this.div.removeAttribute("aria-label")},Fo.prototype.prepareSelection=function(){var et=Hu(this.cm,!1);return et.focus=document.activeElement==this.div,et},Fo.prototype.showSelection=function(et,rt){!et||!this.cm.display.view.length||((et.focus||rt)&&this.showPrimarySelection(),this.showMultipleSelections(et))},Fo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fo.prototype.showPrimarySelection=function(){var et=this.getSelection(),rt=this.cm,ut=rt.doc.sel.primary(),at=ut.from(),ct=ut.to();if(rt.display.viewTo==rt.display.viewFrom||at.line>=rt.display.viewTo||ct.line<rt.display.viewFrom){et.removeAllRanges();return}var wt=vd(rt,et.anchorNode,et.anchorOffset),Mt=vd(rt,et.focusNode,et.focusOffset);if(!(wt&&!wt.bad&&Mt&&!Mt.bad&&ze(Ne(wt,Mt),at)==0&&ze(cn(wt,Mt),ct)==0)){var Bt=rt.display.view,At=at.line>=rt.display.viewFrom&&ff(rt,at)||{node:Bt[0].measure.map[2],offset:0},oe=ct.line<rt.display.viewTo&&ff(rt,ct);if(!oe){var dn=Bt[Bt.length-1].measure,pe=dn.maps?dn.maps[dn.maps.length-1]:dn.map;oe={node:pe[pe.length-1],offset:pe[pe.length-2]-pe[pe.length-3]}}if(!At||!oe){et.removeAllRanges();return}var Kn=et.rangeCount&&et.getRangeAt(0),zn;try{zn=ie(At.node,At.offset,oe.offset,oe.node)}catch(Pi){}zn&&(!lt&&rt.state.focused?(et.collapse(At.node,At.offset),zn.collapsed||(et.removeAllRanges(),et.addRange(zn))):(et.removeAllRanges(),et.addRange(zn)),Kn&&et.anchorNode==null?et.addRange(Kn):lt&&this.startGracePeriod()),this.rememberSelection()}},Fo.prototype.startGracePeriod=function(){var et=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){et.gracePeriod=!1,et.selectionChanged()&&et.cm.operation(function(){return et.cm.curOp.selectionChanged=!0})},20)},Fo.prototype.showMultipleSelections=function(et){be(this.cm.display.cursorDiv,et.cursors),be(this.cm.display.selectionDiv,et.selection)},Fo.prototype.rememberSelection=function(){var et=this.getSelection();this.lastAnchorNode=et.anchorNode,this.lastAnchorOffset=et.anchorOffset,this.lastFocusNode=et.focusNode,this.lastFocusOffset=et.focusOffset},Fo.prototype.selectionInEditor=function(){var et=this.getSelection();if(!et.rangeCount)return!1;var rt=et.getRangeAt(0).commonAncestorContainer;return Re(this.div,rt)},Fo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fo.prototype.blur=function(){this.div.blur()},Fo.prototype.getField=function(){return this.div},Fo.prototype.supportsTouch=function(){return!0},Fo.prototype.receivedFocus=function(){var et=this;this.selectionInEditor()?this.pollSelection():wo(this.cm,function(){return et.cm.curOp.selectionChanged=!0});function rt(){et.cm.state.focused&&(et.pollSelection(),et.polling.set(et.cm.options.pollInterval,rt))}this.polling.set(this.cm.options.pollInterval,rt)},Fo.prototype.selectionChanged=function(){var et=this.getSelection();return et.anchorNode!=this.lastAnchorNode||et.anchorOffset!=this.lastAnchorOffset||et.focusNode!=this.lastFocusNode||et.focusOffset!=this.lastFocusOffset},Fo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var et=this.getSelection(),rt=this.cm;if(ee&&Yt&&this.cm.display.gutterSpecs.length&&Bp(et.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ut=vd(rt,et.anchorNode,et.anchorOffset),at=vd(rt,et.focusNode,et.focusOffset);ut&&at&&wo(rt,function(){ll(rt.doc,Eu(ut,at),$t),(ut.bad||at.bad)&&(rt.curOp.selectionChanged=!0)})}}},Fo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var et=this.cm,rt=et.display,ut=et.doc.sel.primary(),at=ut.from(),ct=ut.to();if(at.ch==0&&at.line>et.firstLine()&&(at=ae(at.line-1,Vn(et.doc,at.line-1).length)),ct.ch==Vn(et.doc,ct.line).text.length&&ct.line<et.lastLine()&&(ct=ae(ct.line+1,0)),at.line<rt.viewFrom||ct.line>rt.viewTo-1)return!1;var wt,Mt,Bt;at.line==rt.viewFrom||(wt=ta(et,at.line))==0?(Mt=Rt(rt.view[0].line),Bt=rt.view[0].node):(Mt=Rt(rt.view[wt].line),Bt=rt.view[wt-1].node.nextSibling);var At=ta(et,ct.line),oe,dn;if(At==rt.view.length-1?(oe=rt.viewTo-1,dn=rt.lineDiv.lastChild):(oe=Rt(rt.view[At+1].line)-1,dn=rt.view[At+1].node.previousSibling),!Bt)return!1;for(var pe=et.doc.splitLines(Oc(et,Bt,dn,Mt,oe)),Kn=oi(et.doc,ae(Mt,0),ae(oe,Vn(et.doc,oe).text.length));pe.length>1&&Kn.length>1;)if(ke(pe)==ke(Kn))pe.pop(),Kn.pop(),oe--;else if(pe[0]==Kn[0])pe.shift(),Kn.shift(),Mt++;else break;for(var zn=0,Pi=0,Di=pe[0],Zi=Kn[0],or=Math.min(Di.length,Zi.length);zn<or&&Di.charCodeAt(zn)==Zi.charCodeAt(zn);)++zn;for(var vr=ke(pe),dr=ke(Kn),xr=Math.min(vr.length-(pe.length==1?zn:0),dr.length-(Kn.length==1?zn:0));Pi<xr&&vr.charCodeAt(vr.length-Pi-1)==dr.charCodeAt(dr.length-Pi-1);)++Pi;if(pe.length==1&&Kn.length==1&&Mt==at.line)for(;zn&&zn>at.ch&&vr.charCodeAt(vr.length-Pi-1)==dr.charCodeAt(dr.length-Pi-1);)zn--,Pi++;pe[pe.length-1]=vr.slice(0,vr.length-Pi).replace(/^\u200b+/,""),pe[0]=pe[0].slice(zn).replace(/\u200b+$/,"");var jr=ae(Mt,zn),hr=ae(oe,Kn.length?ke(Kn).length-Pi:0);if(pe.length>1||pe[0]||ze(jr,hr))return Bh(et.doc,pe,jr,hr,"+input"),!0},Fo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fo.prototype.reset=function(){this.forceCompositionEnd()},Fo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fo.prototype.readFromDOMSoon=function(){var et=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(et.readDOMTimeout=null,et.composing)if(et.composing.done)et.composing=null;else return;et.updateFromDOM()},80))},Fo.prototype.updateFromDOM=function(){var et=this;(this.cm.isReadOnly()||!this.pollContent())&&wo(this.cm,function(){return Ko(et.cm)})},Fo.prototype.setUneditable=function(et){et.contentEditable="false"},Fo.prototype.onKeyPress=function(et){et.charCode==0||this.composing||(et.preventDefault(),this.cm.isReadOnly()||Ns(this.cm,md)(this.cm,String.fromCharCode(et.charCode==null?et.keyCode:et.charCode),0))},Fo.prototype.readOnlyChanged=function(et){this.div.contentEditable=String(et!="nocursor")},Fo.prototype.onContextMenu=function(){},Fo.prototype.resetPosition=function(){},Fo.prototype.needsContentAttribute=!0;function ff(et,rt){var ut=Ql(et,rt.line);if(!ut||ut.hidden)return null;var at=Vn(et.doc,rt.line),ct=$a(ut,at,rt.line),wt=te(at,et.doc.direction),Mt="left";if(wt){var Bt=Te(wt,rt.ch);Mt=Bt%2?"right":"left"}var At=tu(ct.map,rt.ch,Mt);return At.offset=At.collapse=="right"?At.end:At.start,At}function Bp(et){for(var rt=et;rt;rt=rt.parentNode)if(/CodeMirror-gutter-wrapper/.test(rt.className))return!0;return!1}function kc(et,rt){return rt&&(et.bad=!0),et}function Oc(et,rt,ut,at,ct){var wt="",Mt=!1,Bt=et.doc.lineSeparator(),At=!1;function oe(zn){return function(Pi){return Pi.id==zn}}function dn(){Mt&&(wt+=Bt,At&&(wt+=Bt),Mt=At=!1)}function pe(zn){zn&&(dn(),wt+=zn)}function Kn(zn){if(zn.nodeType==1){var Pi=zn.getAttribute("cm-text");if(Pi){pe(Pi);return}var Di=zn.getAttribute("cm-marker"),Zi;if(Di){var or=et.findMarks(ae(at,0),ae(ct+1,0),oe(+Di));or.length&&(Zi=or[0].find(0))&&pe(oi(et.doc,Zi.from,Zi.to).join(Bt));return}if(zn.getAttribute("contenteditable")=="false")return;var vr=/^(pre|div|p|li|table|br)$/i.test(zn.nodeName);if(!/^br$/i.test(zn.nodeName)&&zn.textContent.length==0)return;vr&&dn();for(var dr=0;dr<zn.childNodes.length;dr++)Kn(zn.childNodes[dr]);/^(pre|p)$/i.test(zn.nodeName)&&(At=!0),vr&&(Mt=!0)}else zn.nodeType==3&&pe(zn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Kn(rt),rt!=ut;)rt=rt.nextSibling,At=!1;return wt}function vd(et,rt,ut){var at;if(rt==et.display.lineDiv){if(at=et.display.lineDiv.childNodes[ut],!at)return kc(et.clipPos(ae(et.display.viewTo-1)),!0);rt=null,ut=0}else for(at=rt;;at=at.parentNode){if(!at||at==et.display.lineDiv)return null;if(at.parentNode&&at.parentNode==et.display.lineDiv)break}for(var ct=0;ct<et.display.view.length;ct++){var wt=et.display.view[ct];if(wt.node==at)return og(wt,rt,ut)}}function og(et,rt,ut){var at=et.text.firstChild,ct=!1;if(!rt||!Re(at,rt))return kc(ae(Rt(et.line),0),!0);if(rt==at&&(ct=!0,rt=at.childNodes[ut],ut=0,!rt)){var wt=et.rest?ke(et.rest):et.line;return kc(ae(Rt(wt),wt.text.length),ct)}var Mt=rt.nodeType==3?rt:null,Bt=rt;for(!Mt&&rt.childNodes.length==1&&rt.firstChild.nodeType==3&&(Mt=rt.firstChild,ut&&(ut=Mt.nodeValue.length));Bt.parentNode!=at;)Bt=Bt.parentNode;var At=et.measure,oe=At.maps;function dn(Zi,or,vr){for(var dr=-1;dr<(oe?oe.length:0);dr++)for(var xr=dr<0?At.map:oe[dr],jr=0;jr<xr.length;jr+=3){var hr=xr[jr+2];if(hr==Zi||hr==or){var qr=Rt(dr<0?et.line:et.rest[dr]),_o=xr[jr]+vr;return(vr<0||hr!=Zi)&&(_o=xr[jr+(vr?1:0)]),ae(qr,_o)}}}var pe=dn(Mt,Bt,ut);if(pe)return kc(pe,ct);for(var Kn=Bt.nextSibling,zn=Mt?Mt.nodeValue.length-ut:0;Kn;Kn=Kn.nextSibling){if(pe=dn(Kn,Kn.firstChild,0),pe)return kc(ae(pe.line,pe.ch-zn),ct);zn+=Kn.textContent.length}for(var Pi=Bt.previousSibling,Di=ut;Pi;Pi=Pi.previousSibling){if(pe=dn(Pi,Pi.firstChild,-1),pe)return kc(ae(pe.line,pe.ch+Di),ct);Di+=Pi.textContent.length}}var Ss=function(et){this.cm=et,this.prevInput="",this.pollingFast=!1,this.polling=new kt,this.hasSelection=!1,this.composing=null};Ss.prototype.init=function(et){var rt=this,ut=this,at=this.cm;this.createField(et);var ct=this.textarea;et.wrapper.insertBefore(this.wrapper,et.wrapper.firstChild),ce&&(ct.style.width="0px"),bn(ct,"input",function(){_t&&Gt>=9&&rt.hasSelection&&(rt.hasSelection=null),ut.poll()}),bn(ct,"paste",function(Mt){sn(at,Mt)||Lp(Mt,at)||(at.state.pasteIncoming=+new Date,ut.fastPoll())});function wt(Mt){if(!sn(at,Mt)){if(at.somethingSelected())Vh({lineWise:!1,text:at.getSelections()});else if(at.options.lineWiseCopyCut){var Bt=Ip(at);Vh({lineWise:!0,text:Bt.text}),Mt.type=="cut"?at.setSelections(Bt.ranges,null,$t):(ut.prevInput="",ct.value=Bt.text.join(`
|
|
|
`),we(ct))}else return;Mt.type=="cut"&&(at.state.cutIncoming=+new Date)}}bn(ct,"cut",wt),bn(ct,"copy",wt),bn(et.scroller,"paste",function(Mt){if(!(rs(et,Mt)||sn(at,Mt))){if(!ct.dispatchEvent){at.state.pasteIncoming=+new Date,ut.focus();return}var Bt=new Event("paste");Bt.clipboardData=Mt.clipboardData,ct.dispatchEvent(Bt)}}),bn(et.lineSpace,"selectstart",function(Mt){rs(et,Mt)||Ze(Mt)}),bn(ct,"compositionstart",function(){var Mt=at.getCursor("from");ut.composing&&ut.composing.range.clear(),ut.composing={start:Mt,range:at.markText(Mt,at.getCursor("to"),{className:"CodeMirror-composing"})}}),bn(ct,"compositionend",function(){ut.composing&&(ut.poll(),ut.composing.range.clear(),ut.composing=null)})},Ss.prototype.createField=function(et){this.wrapper=Fp(),this.textarea=this.wrapper.firstChild},Ss.prototype.screenReaderLabelChanged=function(et){et?this.textarea.setAttribute("aria-label",et):this.textarea.removeAttribute("aria-label")},Ss.prototype.prepareSelection=function(){var et=this.cm,rt=et.display,ut=et.doc,at=Hu(et);if(et.options.moveInputWithCursor){var ct=Po(et,ut.sel.primary().head,"div"),wt=rt.wrapper.getBoundingClientRect(),Mt=rt.lineDiv.getBoundingClientRect();at.teTop=Math.max(0,Math.min(rt.wrapper.clientHeight-10,ct.top+Mt.top-wt.top)),at.teLeft=Math.max(0,Math.min(rt.wrapper.clientWidth-10,ct.left+Mt.left-wt.left))}return at},Ss.prototype.showSelection=function(et){var rt=this.cm,ut=rt.display;be(ut.cursorDiv,et.cursors),be(ut.selectionDiv,et.selection),et.teTop!=null&&(this.wrapper.style.top=et.teTop+"px",this.wrapper.style.left=et.teLeft+"px")},Ss.prototype.reset=function(et){if(!(this.contextMenuPending||this.composing)){var rt=this.cm;if(rt.somethingSelected()){this.prevInput="";var ut=rt.getSelection();this.textarea.value=ut,rt.state.focused&&we(this.textarea),_t&&Gt>=9&&(this.hasSelection=ut)}else et||(this.prevInput=this.textarea.value="",_t&&Gt>=9&&(this.hasSelection=null))}},Ss.prototype.getField=function(){return this.textarea},Ss.prototype.supportsTouch=function(){return!1},Ss.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Kt||De()!=this.textarea))try{this.textarea.focus()}catch(et){}},Ss.prototype.blur=function(){this.textarea.blur()},Ss.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ss.prototype.receivedFocus=function(){this.slowPoll()},Ss.prototype.slowPoll=function(){var et=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){et.poll(),et.cm.state.focused&&et.slowPoll()})},Ss.prototype.fastPoll=function(){var et=!1,rt=this;rt.pollingFast=!0;function ut(){var at=rt.poll();!at&&!et?(et=!0,rt.polling.set(60,ut)):(rt.pollingFast=!1,rt.slowPoll())}rt.polling.set(20,ut)},Ss.prototype.poll=function(){var et=this,rt=this.cm,ut=this.textarea,at=this.prevInput;if(this.contextMenuPending||!rt.state.focused||yt(ut)&&!at&&!this.composing||rt.isReadOnly()||rt.options.disableInput||rt.state.keySeq)return!1;var ct=ut.value;if(ct==at&&!rt.somethingSelected())return!1;if(_t&&Gt>=9&&this.hasSelection===ct||Ht&&/[\uf700-\uf7ff]/.test(ct))return rt.display.input.reset(),!1;if(rt.doc.sel==rt.display.selForContextMenu){var wt=ct.charCodeAt(0);if(wt==8203&&!at&&(at="\u200B"),wt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Mt=0,Bt=Math.min(at.length,ct.length);Mt<Bt&&at.charCodeAt(Mt)==ct.charCodeAt(Mt);)++Mt;return wo(rt,function(){md(rt,ct.slice(Mt),at.length-Mt,null,et.composing?"*compose":null),ct.length>1e3||ct.indexOf(`
|
|
|
`)>-1?ut.value=et.prevInput="":et.prevInput=ct,et.composing&&(et.composing.range.clear(),et.composing.range=rt.markText(et.composing.start,rt.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ss.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ss.prototype.onKeyPress=function(){_t&&Gt>=9&&(this.hasSelection=null),this.fastPoll()},Ss.prototype.onContextMenu=function(et){var rt=this,ut=rt.cm,at=ut.display,ct=rt.textarea;rt.contextMenuPending&&rt.contextMenuPending();var wt=gl(ut,et),Mt=at.scroller.scrollTop;if(!wt||Nt)return;var Bt=ut.options.resetSelectionOnContextMenu;Bt&&ut.doc.sel.contains(wt)==-1&&Ns(ut,ll)(ut.doc,Eu(wt),$t);var At=ct.style.cssText,oe=rt.wrapper.style.cssText,dn=rt.wrapper.offsetParent.getBoundingClientRect();rt.wrapper.style.cssText="position: static",ct.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(et.clientY-dn.top-5)+"px; left: "+(et.clientX-dn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(_t?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var pe;Vt&&(pe=window.scrollY),at.input.focus(),Vt&&window.scrollTo(null,pe),at.input.reset(),ut.somethingSelected()||(ct.value=rt.prevInput=" "),rt.contextMenuPending=zn,at.selForContextMenu=ut.doc.sel,clearTimeout(at.detectingSelectAll);function Kn(){if(ct.selectionStart!=null){var Di=ut.somethingSelected(),Zi="\u200B"+(Di?ct.value:"");ct.value="\u21DA",ct.value=Zi,rt.prevInput=Di?"":"\u200B",ct.selectionStart=1,ct.selectionEnd=Zi.length,at.selForContextMenu=ut.doc.sel}}function zn(){if(rt.contextMenuPending==zn&&(rt.contextMenuPending=!1,rt.wrapper.style.cssText=oe,ct.style.cssText=At,_t&&Gt<9&&at.scrollbars.setScrollTop(at.scroller.scrollTop=Mt),ct.selectionStart!=null)){(!_t||_t&&Gt<9)&&Kn();var Di=0,Zi=function(){at.selForContextMenu==ut.doc.sel&&ct.selectionStart==0&&ct.selectionEnd>0&&rt.prevInput=="\u200B"?Ns(ut,ps)(ut):Di++<10?at.detectingSelectAll=setTimeout(Zi,500):(at.selForContextMenu=null,at.input.reset())};at.detectingSelectAll=setTimeout(Zi,200)}}if(_t&&Gt>=9&&Kn(),Xt){he(et);var Pi=function(){Rn(window,"mouseup",Pi),setTimeout(zn,20)};bn(window,"mouseup",Pi)}else setTimeout(zn,50)},Ss.prototype.readOnlyChanged=function(et){et||this.reset(),this.textarea.disabled=et=="nocursor",this.textarea.readOnly=!!et},Ss.prototype.setUneditable=function(){},Ss.prototype.needsContentAttribute=!1;function sg(et,rt){if(rt=rt?On(rt):{},rt.value=et.value,!rt.tabindex&&et.tabIndex&&(rt.tabindex=et.tabIndex),!rt.placeholder&&et.placeholder&&(rt.placeholder=et.placeholder),rt.autofocus==null){var ut=De();rt.autofocus=ut==et||et.getAttribute("autofocus")!=null&&ut==document.body}function at(){et.value=Bt.getValue()}var ct;if(et.form&&(bn(et.form,"submit",at),!rt.leaveSubmitMethodAlone)){var wt=et.form;ct=wt.submit;try{var Mt=wt.submit=function(){at(),wt.submit=ct,wt.submit(),wt.submit=Mt}}catch(At){}}rt.finishInit=function(At){At.save=at,At.getTextArea=function(){return et},At.toTextArea=function(){At.toTextArea=isNaN,at(),et.parentNode.removeChild(At.getWrapperElement()),et.style.display="",et.form&&(Rn(et.form,"submit",at),!rt.leaveSubmitMethodAlone&&typeof et.form.submit=="function"&&(et.form.submit=ct))}},et.style.display="none";var Bt=yo(function(At){return et.parentNode.insertBefore(At,et.nextSibling)},rt);return Bt}function Lc(et){et.off=Rn,et.on=bn,et.wheelEventPixels=na,et.Doc=Qs,et.splitLines=ri,et.countColumn=zt,et.findColumn=Cn,et.isWordChar=Ct,et.Pass=on,et.signal=In,et.Line=Vr,et.changeEnd=Ju,et.scrollbarModel=np,et.Pos=ae,et.cmpPos=ze,et.modes=Zn,et.mimeModes=Nn,et.resolveMode=Qn,et.getMode=xi,et.modeExtensions=Xn,et.extendMode=$n,et.copyState=Hi,et.startState=sr,et.innerMode=Bi,et.commands=eh,et.keyMap=Hl,et.keyName=Qm,et.isModifierKey=bc,et.lookupKey=ya,et.normalizeKeyMap=vp,et.StringStream=Jn,et.SharedTextMarker=ru,et.TextMarker=Ge,et.LineWidget=Nu,et.e_preventDefault=Ze,et.e_stopPropagation=En,et.e_stop=he,et.addClass=Tt,et.contains=Re,et.rmClass=Qt,et.keyNames=ou}ig(yo),ih(yo);var Tu="iter insert remove copy getEditor constructor".split(" ");for(var yd in Qs.prototype)Qs.prototype.hasOwnProperty(yd)&&Ye(Tu,yd)<0&&(yo.prototype[yd]=function(et){return function(){return et.apply(this.doc,arguments)}}(Qs.prototype[yd]));return ye(Qs),yo.inputStyles={textarea:Ss,contenteditable:Fo},yo.defineMode=function(et){!yo.defaults.mode&&et!="null"&&(yo.defaults.mode=et),Ln.apply(this,arguments)},yo.defineMIME=ii,yo.defineMode("null",function(){return{token:function(et){return et.skipToEnd()}}}),yo.defineMIME("text/plain","null"),yo.defineExtension=function(et,rt){yo.prototype[et]=rt},yo.defineDocExtension=function(et,rt){Qs.prototype[et]=rt},yo.fromTextArea=sg,Lc(yo),yo.version="5.58.2",yo})},25419:function(Yn,qe,dt){(function(lt){lt(dt(89780),dt(15525),dt(98101))})(function(lt){"use strict";lt.defineMode("markdown",function(Dt,It){var xe=lt.getMode(Dt,"text/html"),_t=xe.name=="null";function Gt(zt){if(lt.findModeByName){var kt=lt.findModeByName(zt);kt&&(zt=kt.mime||kt.mimes[0])}var Ye=lt.getMode(Dt,zt);return Ye.name=="null"?null:Ye}It.highlightFormatting===void 0&&(It.highlightFormatting=!1),It.maxBlockquoteDepth===void 0&&(It.maxBlockquoteDepth=0),It.taskLists===void 0&&(It.taskLists=!1),It.strikethrough===void 0&&(It.strikethrough=!1),It.emoji===void 0&&(It.emoji=!1),It.fencedCodeBlockHighlighting===void 0&&(It.fencedCodeBlockHighlighting=!0),It.fencedCodeBlockDefaultMode===void 0&&(It.fencedCodeBlockDefaultMode="text/plain"),It.xml===void 0&&(It.xml=!0),It.tokenTypeOverrides===void 0&&(It.tokenTypeOverrides={});var Vt={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 me in Vt)Vt.hasOwnProperty(me)&&It.tokenTypeOverrides[me]&&(Vt[me]=It.tokenTypeOverrides[me]);var Yt=/^([*\-_])(?:\s*\1){2,}\s*$/,Nt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Oe=/^\[(x| )\](?=\s)/i,jt=It.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Me=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ce=/^[^#!\[\]*_\\<>` "'(~:]+/,ee=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Kt=/^\s*\[[^\]]+?\]:.*$/,Ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,de=" ";function Ae(zt,kt,Ye){return kt.f=kt.inline=Ye,Ye(zt,kt)}function je(zt,kt,Ye){return kt.f=kt.block=Ye,Ye(zt,kt)}function se(zt){return!zt||!/\S/.test(zt.string)}function Xt(zt){if(zt.linkTitle=!1,zt.linkHref=!1,zt.linkText=!1,zt.em=!1,zt.strong=!1,zt.strikethrough=!1,zt.quote=0,zt.indentedCode=!1,zt.f==Qt){var kt=_t;if(!kt){var Ye=lt.innerMode(xe,zt.htmlState);kt=Ye.mode.name=="xml"&&Ye.state.tagStart===null&&!Ye.state.context&&Ye.state.tokenize.isInText}kt&&(zt.f=en,zt.block=ve,zt.htmlState=null)}return zt.trailingSpace=0,zt.trailingSpaceNewLine=!1,zt.prevLine=zt.thisLine,zt.thisLine={stream:null},null}function ve(zt,kt){var Ye=zt.column()===kt.indentation,wn=se(kt.prevLine.stream),on=kt.indentedCode,$t=kt.prevLine.hr,Ee=kt.list!==!1,Be=(kt.listStack[kt.listStack.length-1]||0)+3;kt.indentedCode=!1;var Cn=kt.indentation;if(kt.indentationDiff===null&&(kt.indentationDiff=kt.indentation,Ee)){for(kt.list=null;Cn<kt.listStack[kt.listStack.length-1];)kt.listStack.pop(),kt.listStack.length?kt.indentation=kt.listStack[kt.listStack.length-1]:kt.list=!1;kt.list!==!1&&(kt.indentationDiff=Cn-kt.listStack[kt.listStack.length-1])}var Ie=!wn&&!$t&&!kt.prevLine.header&&(!Ee||!on)&&!kt.prevLine.fencedCodeEnd,gn=(kt.list===!1||$t||wn)&&kt.indentation<=Be&&zt.match(Yt),ke=null;if(kt.indentationDiff>=4&&(on||kt.prevLine.fencedCodeEnd||kt.prevLine.header||wn))return zt.skipToEnd(),kt.indentedCode=!0,Vt.code;if(zt.eatSpace())return null;if(Ye&&kt.indentation<=Be&&(ke=zt.match(jt))&&ke[1].length<=6)return kt.quote=0,kt.header=ke[1].length,kt.thisLine.header=!0,It.highlightFormatting&&(kt.formatting="header"),kt.f=kt.inline,be(kt);if(kt.indentation<=Be&&zt.eat(">"))return kt.quote=Ye?1:kt.quote+1,It.highlightFormatting&&(kt.formatting="quote"),zt.eatSpace(),be(kt);if(!gn&&!kt.setext&&Ye&&kt.indentation<=Be&&(ke=zt.match(Nt))){var Dn=ke[1]?"ol":"ul";return kt.indentation=Cn+zt.current().length,kt.list=!0,kt.quote=0,kt.listStack.push(kt.indentation),kt.em=!1,kt.strong=!1,kt.code=!1,kt.strikethrough=!1,It.taskLists&&zt.match(Oe,!1)&&(kt.taskList=!0),kt.f=kt.inline,It.highlightFormatting&&(kt.formatting=["list","list-"+Dn]),be(kt)}else{if(Ye&&kt.indentation<=Be&&(ke=zt.match(ee,!0)))return kt.quote=0,kt.fencedEndRE=new RegExp(ke[1]+"+ *$"),kt.localMode=It.fencedCodeBlockHighlighting&&Gt(ke[2]||It.fencedCodeBlockDefaultMode),kt.localMode&&(kt.localState=lt.startState(kt.localMode)),kt.f=kt.block=Se,It.highlightFormatting&&(kt.formatting="code-block"),kt.code=-1,be(kt);if(kt.setext||(!Ie||!Ee)&&!kt.quote&&kt.list===!1&&!kt.code&&!gn&&!Kt.test(zt.string)&&(ke=zt.lookAhead(1))&&(ke=ke.match(Me)))return kt.setext?(kt.header=kt.setext,kt.setext=0,zt.skipToEnd(),It.highlightFormatting&&(kt.formatting="header")):(kt.header=ke[0].charAt(0)=="="?1:2,kt.setext=kt.header),kt.thisLine.header=!0,kt.f=kt.inline,be(kt);if(gn)return zt.skipToEnd(),kt.hr=!0,kt.thisLine.hr=!0,Vt.hr;if(zt.peek()==="[")return Ae(zt,kt,rn)}return Ae(zt,kt,kt.inline)}function Qt(zt,kt){var Ye=xe.token(zt,kt.htmlState);if(!_t){var wn=lt.innerMode(xe,kt.htmlState);(wn.mode.name=="xml"&&wn.state.tagStart===null&&!wn.state.context&&wn.state.tokenize.isInText||kt.md_inside&&zt.current().indexOf(">")>-1)&&(kt.f=en,kt.block=ve,kt.htmlState=null)}return Ye}function Se(zt,kt){var Ye=kt.listStack[kt.listStack.length-1]||0,wn=kt.indentation<Ye,on=Ye+3;if(kt.fencedEndRE&&kt.indentation<=on&&(wn||zt.match(kt.fencedEndRE))){It.highlightFormatting&&(kt.formatting="code-block");var $t;return wn||($t=be(kt)),kt.localMode=kt.localState=null,kt.block=ve,kt.f=en,kt.fencedEndRE=null,kt.code=0,kt.thisLine.fencedCodeEnd=!0,wn?je(zt,kt,kt.block):$t}else return kt.localMode?kt.localMode.token(zt,kt.localState):(zt.skipToEnd(),Vt.code)}function be(zt){var kt=[];if(zt.formatting){kt.push(Vt.formatting),typeof zt.formatting=="string"&&(zt.formatting=[zt.formatting]);for(var Ye=0;Ye<zt.formatting.length;Ye++)kt.push(Vt.formatting+"-"+zt.formatting[Ye]),zt.formatting[Ye]==="header"&&kt.push(Vt.formatting+"-"+zt.formatting[Ye]+"-"+zt.header),zt.formatting[Ye]==="quote"&&(!It.maxBlockquoteDepth||It.maxBlockquoteDepth>=zt.quote?kt.push(Vt.formatting+"-"+zt.formatting[Ye]+"-"+zt.quote):kt.push("error"))}if(zt.taskOpen)return kt.push("meta"),kt.length?kt.join(" "):null;if(zt.taskClosed)return kt.push("property"),kt.length?kt.join(" "):null;if(zt.linkHref?kt.push(Vt.linkHref,"url"):(zt.strong&&kt.push(Vt.strong),zt.em&&kt.push(Vt.em),zt.strikethrough&&kt.push(Vt.strikethrough),zt.emoji&&kt.push(Vt.emoji),zt.linkText&&kt.push(Vt.linkText),zt.code&&kt.push(Vt.code),zt.image&&kt.push(Vt.image),zt.imageAltText&&kt.push(Vt.imageAltText,"link"),zt.imageMarker&&kt.push(Vt.imageMarker)),zt.header&&kt.push(Vt.header,Vt.header+"-"+zt.header),zt.quote&&(kt.push(Vt.quote),!It.maxBlockquoteDepth||It.maxBlockquoteDepth>=zt.quote?kt.push(Vt.quote+"-"+zt.quote):kt.push(Vt.quote+"-"+It.maxBlockquoteDepth)),zt.list!==!1){var wn=(zt.listStack.length-1)%3;wn?wn===1?kt.push(Vt.list2):kt.push(Vt.list3):kt.push(Vt.list1)}return zt.trailingSpaceNewLine?kt.push("trailing-space-new-line"):zt.trailingSpace&&kt.push("trailing-space-"+(zt.trailingSpace%2?"a":"b")),kt.length?kt.join(" "):null}function Le(zt,kt){if(zt.match(ce,!0))return be(kt)}function en(zt,kt){var Ye=kt.text(zt,kt);if(typeof Ye!="undefined")return Ye;if(kt.list)return kt.list=null,be(kt);if(kt.taskList){var wn=zt.match(Oe,!0)[1]===" ";return wn?kt.taskOpen=!0:kt.taskClosed=!0,It.highlightFormatting&&(kt.formatting="task"),kt.taskList=!1,be(kt)}if(kt.taskOpen=!1,kt.taskClosed=!1,kt.header&&zt.match(/^#+$/,!0))return It.highlightFormatting&&(kt.formatting="header"),be(kt);var on=zt.next();if(kt.linkTitle){kt.linkTitle=!1;var $t=on;on==="("&&($t=")"),$t=($t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ee="^\\s*(?:[^"+$t+"\\\\]+|\\\\\\\\|\\\\.)"+$t;if(zt.match(new RegExp(Ee),!0))return Vt.linkHref}if(on==="`"){var Be=kt.formatting;It.highlightFormatting&&(kt.formatting="code"),zt.eatWhile("`");var Cn=zt.current().length;if(kt.code==0&&(!kt.quote||Cn==1))return kt.code=Cn,be(kt);if(Cn==kt.code){var Ie=be(kt);return kt.code=0,Ie}else return kt.formatting=Be,be(kt)}else if(kt.code)return be(kt);if(on==="\\"&&(zt.next(),It.highlightFormatting)){var gn=be(kt),ke=Vt.formatting+"-escape";return gn?gn+" "+ke:ke}if(on==="!"&&zt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return kt.imageMarker=!0,kt.image=!0,It.highlightFormatting&&(kt.formatting="image"),be(kt);if(on==="["&&kt.imageMarker&&zt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return kt.imageMarker=!1,kt.imageAltText=!0,It.highlightFormatting&&(kt.formatting="image"),be(kt);if(on==="]"&&kt.imageAltText){It.highlightFormatting&&(kt.formatting="image");var gn=be(kt);return kt.imageAltText=!1,kt.image=!1,kt.inline=kt.f=Re,gn}if(on==="["&&!kt.image)return kt.linkText&&zt.match(/^.*?\]/)||(kt.linkText=!0,It.highlightFormatting&&(kt.formatting="link")),be(kt);if(on==="]"&&kt.linkText){It.highlightFormatting&&(kt.formatting="link");var gn=be(kt);return kt.linkText=!1,kt.inline=kt.f=zt.match(/\(.*?\)| ?\[.*?\]/,!1)?Re:en,gn}if(on==="<"&&zt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){kt.f=kt.inline=ie,It.highlightFormatting&&(kt.formatting="link");var gn=be(kt);return gn?gn+=" ":gn="",gn+Vt.linkInline}if(on==="<"&&zt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){kt.f=kt.inline=ie,It.highlightFormatting&&(kt.formatting="link");var gn=be(kt);return gn?gn+=" ":gn="",gn+Vt.linkEmail}if(It.xml&&on==="<"&&zt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Dn=zt.string.indexOf(">",zt.pos);if(Dn!=-1){var ln=zt.string.substring(zt.start,Dn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ln)&&(kt.md_inside=!0)}return zt.backUp(1),kt.htmlState=lt.startState(xe),je(zt,kt,Qt)}if(It.xml&&on==="<"&&zt.match(/^\/\w*?>/))return kt.md_inside=!1,"tag";if(on==="*"||on==="_"){for(var bt=1,gt=zt.pos==1?" ":zt.string.charAt(zt.pos-2);bt<3&&zt.eat(on);)bt++;var pt=zt.peek()||" ",Ct=!/\s/.test(pt)&&(!Ht.test(pt)||/\s/.test(gt)||Ht.test(gt)),Pt=!/\s/.test(gt)&&(!Ht.test(gt)||/\s/.test(pt)||Ht.test(pt)),vt=null,Et=null;if(bt%2&&(!kt.em&&Ct&&(on==="*"||!Pt||Ht.test(gt))?vt=!0:kt.em==on&&Pt&&(on==="*"||!Ct||Ht.test(pt))&&(vt=!1)),bt>1&&(!kt.strong&&Ct&&(on==="*"||!Pt||Ht.test(gt))?Et=!0:kt.strong==on&&Pt&&(on==="*"||!Ct||Ht.test(pt))&&(Et=!1)),Et!=null||vt!=null){It.highlightFormatting&&(kt.formatting=vt==null?"strong":Et==null?"em":"strong em"),vt===!0&&(kt.em=on),Et===!0&&(kt.strong=on);var Ie=be(kt);return vt===!1&&(kt.em=!1),Et===!1&&(kt.strong=!1),Ie}}else if(on===" "&&(zt.eat("*")||zt.eat("_"))){if(zt.peek()===" ")return be(kt);zt.backUp(1)}if(It.strikethrough){if(on==="~"&&zt.eatWhile(on)){if(kt.strikethrough){It.highlightFormatting&&(kt.formatting="strikethrough");var Ie=be(kt);return kt.strikethrough=!1,Ie}else if(zt.match(/^[^\s]/,!1))return kt.strikethrough=!0,It.highlightFormatting&&(kt.formatting="strikethrough"),be(kt)}else if(on===" "&&zt.match(/^~~/,!0)){if(zt.peek()===" ")return be(kt);zt.backUp(2)}}if(It.emoji&&on===":"&&zt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){kt.emoji=!0,It.highlightFormatting&&(kt.formatting="emoji");var Zt=be(kt);return kt.emoji=!1,Zt}return on===" "&&(zt.match(/^ +$/,!1)?kt.trailingSpace++:kt.trailingSpace&&(kt.trailingSpaceNewLine=!0)),be(kt)}function ie(zt,kt){var Ye=zt.next();if(Ye===">"){kt.f=kt.inline=en,It.highlightFormatting&&(kt.formatting="link");var wn=be(kt);return wn?wn+=" ":wn="",wn+Vt.linkInline}return zt.match(/^[^>]+/,!0),Vt.linkInline}function Re(zt,kt){if(zt.eatSpace())return null;var Ye=zt.next();return Ye==="("||Ye==="["?(kt.f=kt.inline=Tt(Ye==="("?")":"]"),It.highlightFormatting&&(kt.formatting="link-string"),kt.linkHref=!0,be(kt)):"error"}var De={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Tt(zt){return function(kt,Ye){var wn=kt.next();if(wn===zt){Ye.f=Ye.inline=en,It.highlightFormatting&&(Ye.formatting="link-string");var on=be(Ye);return Ye.linkHref=!1,on}return kt.match(De[zt]),Ye.linkHref=!0,be(Ye)}}function rn(zt,kt){return zt.match(/^([^\]\\]|\\.)*\]:/,!1)?(kt.f=we,zt.next(),It.highlightFormatting&&(kt.formatting="link"),kt.linkText=!0,be(kt)):Ae(zt,kt,en)}function we(zt,kt){if(zt.match(/^\]:/,!0)){kt.f=kt.inline=Ue,It.highlightFormatting&&(kt.formatting="link");var Ye=be(kt);return kt.linkText=!1,Ye}return zt.match(/^([^\]\\]|\\.)+/,!0),Vt.linkText}function Ue(zt,kt){return zt.eatSpace()?null:(zt.match(/^[^\s]+/,!0),zt.peek()===void 0?kt.linkTitle=!0:zt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),kt.f=kt.inline=en,Vt.linkHref+" url")}var On={startState:function(){return{f:ve,prevLine:{stream:null},thisLine:{stream:null},block:ve,htmlState:null,indentation:0,inline:en,text:Le,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(zt){return{f:zt.f,prevLine:zt.prevLine,thisLine:zt.thisLine,block:zt.block,htmlState:zt.htmlState&<.copyState(xe,zt.htmlState),indentation:zt.indentation,localMode:zt.localMode,localState:zt.localMode?lt.copyState(zt.localMode,zt.localState):null,inline:zt.inline,text:zt.text,formatting:!1,linkText:zt.linkText,linkTitle:zt.linkTitle,linkHref:zt.linkHref,code:zt.code,em:zt.em,strong:zt.strong,strikethrough:zt.strikethrough,emoji:zt.emoji,header:zt.header,setext:zt.setext,hr:zt.hr,taskList:zt.taskList,list:zt.list,listStack:zt.listStack.slice(0),quote:zt.quote,indentedCode:zt.indentedCode,trailingSpace:zt.trailingSpace,trailingSpaceNewLine:zt.trailingSpaceNewLine,md_inside:zt.md_inside,fencedEndRE:zt.fencedEndRE}},token:function(zt,kt){if(kt.formatting=!1,zt!=kt.thisLine.stream){if(kt.header=0,kt.hr=!1,zt.match(/^\s*$/,!0))return Xt(kt),null;if(kt.prevLine=kt.thisLine,kt.thisLine={stream:zt},kt.taskList=!1,kt.trailingSpace=0,kt.trailingSpaceNewLine=!1,!kt.localState&&(kt.f=kt.block,kt.f!=Qt)){var Ye=zt.match(/^\s*/,!0)[0].replace(/\t/g,de).length;if(kt.indentation=Ye,kt.indentationDiff=null,Ye>0)return null}}return kt.f(zt,kt)},innerMode:function(zt){return zt.block==Qt?{state:zt.htmlState,mode:xe}:zt.localState?{state:zt.localState,mode:zt.localMode}:{state:zt,mode:On}},indent:function(zt,kt,Ye){return zt.block==Qt&&xe.indent?xe.indent(zt.htmlState,kt,Ye):zt.localState&&zt.localMode.indent?zt.localMode.indent(zt.localState,kt,Ye):lt.Pass},blankLine:Xt,getType:be,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return On},"xml"),lt.defineMIME("text/markdown","markdown"),lt.defineMIME("text/x-markdown","markdown")})},98101:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){"use strict";lt.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 Dt=0;Dt<lt.modeInfo.length;Dt++){var It=lt.modeInfo[Dt];It.mimes&&(It.mime=It.mimes[0])}lt.findModeByMIME=function(xe){xe=xe.toLowerCase();for(var _t=0;_t<lt.modeInfo.length;_t++){var Gt=lt.modeInfo[_t];if(Gt.mime==xe)return Gt;if(Gt.mimes){for(var Vt=0;Vt<Gt.mimes.length;Vt++)if(Gt.mimes[Vt]==xe)return Gt}}if(/\+xml$/.test(xe))return lt.findModeByMIME("application/xml");if(/\+json$/.test(xe))return lt.findModeByMIME("application/json")},lt.findModeByExtension=function(xe){xe=xe.toLowerCase();for(var _t=0;_t<lt.modeInfo.length;_t++){var Gt=lt.modeInfo[_t];if(Gt.ext){for(var Vt=0;Vt<Gt.ext.length;Vt++)if(Gt.ext[Vt]==xe)return Gt}}},lt.findModeByFileName=function(xe){for(var _t=0;_t<lt.modeInfo.length;_t++){var Gt=lt.modeInfo[_t];if(Gt.file&&Gt.file.test(xe))return Gt}var Vt=xe.lastIndexOf("."),me=Vt>-1&&xe.substring(Vt+1,xe.length);if(me)return lt.findModeByExtension(me)},lt.findModeByName=function(xe){xe=xe.toLowerCase();for(var _t=0;_t<lt.modeInfo.length;_t++){var Gt=lt.modeInfo[_t];if(Gt.name.toLowerCase()==xe)return Gt;if(Gt.alias){for(var Vt=0;Vt<Gt.alias.length;Vt++)if(Gt.alias[Vt].toLowerCase()==xe)return Gt}}}})},67549:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){"use strict";lt.defineMode("stex",function(Dt,It){"use strict";function xe(ce,ee){ce.cmdState.push(ee)}function _t(ce){return ce.cmdState.length>0?ce.cmdState[ce.cmdState.length-1]:null}function Gt(ce){var ee=ce.cmdState.pop();ee&&ee.closeBracket()}function Vt(ce){for(var ee=ce.cmdState,Kt=ee.length-1;Kt>=0;Kt--){var Ht=ee[Kt];if(Ht.name!="DEFAULT")return Ht}return{styleIdentifier:function(){return null}}}function me(ce,ee,Kt){return function(){this.name=ce,this.bracketNo=0,this.style=ee,this.styles=Kt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Yt={};Yt.importmodule=me("importmodule","tag",["string","builtin"]),Yt.documentclass=me("documentclass","tag",["","atom"]),Yt.usepackage=me("usepackage","tag",["atom"]),Yt.begin=me("begin","tag",["atom"]),Yt.end=me("end","tag",["atom"]),Yt.label=me("label","tag",["atom"]),Yt.ref=me("ref","tag",["atom"]),Yt.eqref=me("eqref","tag",["atom"]),Yt.cite=me("cite","tag",["atom"]),Yt.bibitem=me("bibitem","tag",["atom"]),Yt.Bibitem=me("Bibitem","tag",["atom"]),Yt.RBibitem=me("RBibitem","tag",["atom"]),Yt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Nt(ce,ee){ce.f=ee}function Oe(ce,ee){var Kt;if(ce.match(/^\\[a-zA-Z@]+/)){var Ht=ce.current().slice(1);return Kt=Yt.hasOwnProperty(Ht)?Yt[Ht]:Yt.DEFAULT,Kt=new Kt,xe(ee,Kt),Nt(ee,Me),Kt.style}if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/\\]/))return"tag";if(ce.match("\\["))return Nt(ee,function(Ae,je){return jt(Ae,je,"\\]")}),"keyword";if(ce.match("\\("))return Nt(ee,function(Ae,je){return jt(Ae,je,"\\)")}),"keyword";if(ce.match("$$"))return Nt(ee,function(Ae,je){return jt(Ae,je,"$$")}),"keyword";if(ce.match("$"))return Nt(ee,function(Ae,je){return jt(Ae,je,"$")}),"keyword";var de=ce.next();if(de=="%")return ce.skipToEnd(),"comment";if(de=="}"||de=="]"){if(Kt=_t(ee),Kt)Kt.closeBracket(de),Nt(ee,Me);else return"error";return"bracket"}else return de=="{"||de=="["?(Kt=Yt.DEFAULT,Kt=new Kt,xe(ee,Kt),"bracket"):/\d/.test(de)?(ce.eatWhile(/[\w.%]/),"atom"):(ce.eatWhile(/[\w\-_]/),Kt=Vt(ee),Kt.name=="begin"&&(Kt.argument=ce.current()),Kt.styleIdentifier())}function jt(ce,ee,Kt){if(ce.eatSpace())return null;if(Kt&&ce.match(Kt))return Nt(ee,Oe),"keyword";if(ce.match(/^\\[a-zA-Z@]+/))return"tag";if(ce.match(/^[a-zA-Z]+/))return"variable-2";if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/]/)||ce.match(/^[\^_&]/))return"tag";if(ce.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ce.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ht=ce.next();return Ht=="{"||Ht=="}"||Ht=="["||Ht=="]"||Ht=="("||Ht==")"?"bracket":Ht=="%"?(ce.skipToEnd(),"comment"):"error"}function Me(ce,ee){var Kt=ce.peek(),Ht;return Kt=="{"||Kt=="["?(Ht=_t(ee),Ht.openBracket(Kt),ce.eat(Kt),Nt(ee,Oe),"bracket"):/[ \t\r]/.test(Kt)?(ce.eat(Kt),null):(Nt(ee,Oe),Gt(ee),Oe(ce,ee))}return{startState:function(){var ce=It.inMathMode?function(ee,Kt){return jt(ee,Kt)}:Oe;return{cmdState:[],f:ce}},copyState:function(ce){return{cmdState:ce.cmdState.slice(),f:ce.f}},token:function(ce,ee){return ee.f(ce,ee)},blankLine:function(ce){ce.f=Oe,ce.cmdState.length=0},lineComment:"%"}}),lt.defineMIME("text/x-stex","stex"),lt.defineMIME("text/x-latex","stex")})},15525:function(Yn,qe,dt){(function(lt){lt(dt(89780))})(function(lt){"use strict";var Dt={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},It={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};lt.defineMode("xml",function(xe,_t){var Gt=xe.indentUnit,Vt={},me=_t.htmlMode?Dt:It;for(var Yt in me)Vt[Yt]=me[Yt];for(var Yt in _t)Vt[Yt]=_t[Yt];var Nt,Oe;function jt(ie,Re){function De(we){return Re.tokenize=we,we(ie,Re)}var Tt=ie.next();if(Tt=="<")return ie.eat("!")?ie.eat("[")?ie.match("CDATA[")?De(ee("atom","]]>")):null:ie.match("--")?De(ee("comment","-->")):ie.match("DOCTYPE",!0,!0)?(ie.eatWhile(/[\w\._\-]/),De(Kt(1))):null:ie.eat("?")?(ie.eatWhile(/[\w\._\-]/),Re.tokenize=ee("meta","?>"),"meta"):(Nt=ie.eat("/")?"closeTag":"openTag",Re.tokenize=Me,"tag bracket");if(Tt=="&"){var rn;return ie.eat("#")?ie.eat("x")?rn=ie.eatWhile(/[a-fA-F\d]/)&&ie.eat(";"):rn=ie.eatWhile(/[\d]/)&&ie.eat(";"):rn=ie.eatWhile(/[\w\.\-:]/)&&ie.eat(";"),rn?"atom":"error"}else return ie.eatWhile(/[^&<]/),null}jt.isInText=!0;function Me(ie,Re){var De=ie.next();if(De==">"||De=="/"&&ie.eat(">"))return Re.tokenize=jt,Nt=De==">"?"endTag":"selfcloseTag","tag bracket";if(De=="=")return Nt="equals",null;if(De=="<"){Re.tokenize=jt,Re.state=je,Re.tagName=Re.tagStart=null;var Tt=Re.tokenize(ie,Re);return Tt?Tt+" tag error":"tag error"}else return/[\'\"]/.test(De)?(Re.tokenize=ce(De),Re.stringStartCol=ie.column(),Re.tokenize(ie,Re)):(ie.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ce(ie){var Re=function(De,Tt){for(;!De.eol();)if(De.next()==ie){Tt.tokenize=Me;break}return"string"};return Re.isInAttribute=!0,Re}function ee(ie,Re){return function(De,Tt){for(;!De.eol();){if(De.match(Re)){Tt.tokenize=jt;break}De.next()}return ie}}function Kt(ie){return function(Re,De){for(var Tt;(Tt=Re.next())!=null;){if(Tt=="<")return De.tokenize=Kt(ie+1),De.tokenize(Re,De);if(Tt==">")if(ie==1){De.tokenize=jt;break}else return De.tokenize=Kt(ie-1),De.tokenize(Re,De)}return"meta"}}function Ht(ie,Re,De){this.prev=ie.context,this.tagName=Re,this.indent=ie.indented,this.startOfLine=De,(Vt.doNotIndent.hasOwnProperty(Re)||ie.context&&ie.context.noIndent)&&(this.noIndent=!0)}function de(ie){ie.context&&(ie.context=ie.context.prev)}function Ae(ie,Re){for(var De;;){if(!ie.context||(De=ie.context.tagName,!Vt.contextGrabbers.hasOwnProperty(De)||!Vt.contextGrabbers[De].hasOwnProperty(Re)))return;de(ie)}}function je(ie,Re,De){return ie=="openTag"?(De.tagStart=Re.column(),se):ie=="closeTag"?Xt:je}function se(ie,Re,De){return ie=="word"?(De.tagName=Re.current(),Oe="tag",Se):Vt.allowMissingTagName&&ie=="endTag"?(Oe="tag bracket",Se(ie,Re,De)):(Oe="error",se)}function Xt(ie,Re,De){if(ie=="word"){var Tt=Re.current();return De.context&&De.context.tagName!=Tt&&Vt.implicitlyClosed.hasOwnProperty(De.context.tagName)&&de(De),De.context&&De.context.tagName==Tt||Vt.matchClosing===!1?(Oe="tag",ve):(Oe="tag error",Qt)}else return Vt.allowMissingTagName&&ie=="endTag"?(Oe="tag bracket",ve(ie,Re,De)):(Oe="error",Qt)}function ve(ie,Re,De){return ie!="endTag"?(Oe="error",ve):(de(De),je)}function Qt(ie,Re,De){return Oe="error",ve(ie,Re,De)}function Se(ie,Re,De){if(ie=="word")return Oe="attribute",be;if(ie=="endTag"||ie=="selfcloseTag"){var Tt=De.tagName,rn=De.tagStart;return De.tagName=De.tagStart=null,ie=="selfcloseTag"||Vt.autoSelfClosers.hasOwnProperty(Tt)?Ae(De,Tt):(Ae(De,Tt),De.context=new Ht(De,Tt,rn==De.indented)),je}return Oe="error",Se}function be(ie,Re,De){return ie=="equals"?Le:(Vt.allowMissing||(Oe="error"),Se(ie,Re,De))}function Le(ie,Re,De){return ie=="string"?en:ie=="word"&&Vt.allowUnquoted?(Oe="string",Se):(Oe="error",Se(ie,Re,De))}function en(ie,Re,De){return ie=="string"?en:Se(ie,Re,De)}return{startState:function(ie){var Re={tokenize:jt,state:je,indented:ie||0,tagName:null,tagStart:null,context:null};return ie!=null&&(Re.baseIndent=ie),Re},token:function(ie,Re){if(!Re.tagName&&ie.sol()&&(Re.indented=ie.indentation()),ie.eatSpace())return null;Nt=null;var De=Re.tokenize(ie,Re);return(De||Nt)&&De!="comment"&&(Oe=null,Re.state=Re.state(Nt||De,ie,Re),Oe&&(De=Oe=="error"?De+" error":Oe)),De},indent:function(ie,Re,De){var Tt=ie.context;if(ie.tokenize.isInAttribute)return ie.tagStart==ie.indented?ie.stringStartCol+1:ie.indented+Gt;if(Tt&&Tt.noIndent)return lt.Pass;if(ie.tokenize!=Me&&ie.tokenize!=jt)return De?De.match(/^(\s*)/)[0].length:0;if(ie.tagName)return Vt.multilineTagIndentPastTag!==!1?ie.tagStart+ie.tagName.length+2:ie.tagStart+Gt*(Vt.multilineTagIndentFactor||1);if(Vt.alignCDATA&&/<!\[CDATA\[/.test(Re))return 0;var rn=Re&&/^<(\/)?([\w_:\.-]*)/.exec(Re);if(rn&&rn[1])for(;Tt;)if(Tt.tagName==rn[2]){Tt=Tt.prev;break}else if(Vt.implicitlyClosed.hasOwnProperty(Tt.tagName))Tt=Tt.prev;else break;else if(rn)for(;Tt;){var we=Vt.contextGrabbers[Tt.tagName];if(we&&we.hasOwnProperty(rn[2]))Tt=Tt.prev;else break}for(;Tt&&Tt.prev&&!Tt.startOfLine;)Tt=Tt.prev;return Tt?Tt.indent+Gt:ie.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Vt.htmlMode?"html":"xml",helperType:Vt.htmlMode?"html":"xml",skipAttribute:function(ie){ie.state==Le&&(ie.state=Se)},xmlCurrentTag:function(ie){return ie.tagName?{name:ie.tagName,close:ie.type=="closeTag"}:null},xmlCurrentContext:function(ie){for(var Re=[],De=ie.context;De;De=De.prev)De.tagName&&Re.push(De.tagName);return Re.reverse()}}}),lt.defineMIME("text/xml","xml"),lt.defineMIME("application/xml","xml"),lt.mimeModes.hasOwnProperty("text/html")||lt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Yn,qe,dt){"use strict";dt.d(qe,{$u:function(){return Yt},BD:function(){return bt},E9:function(){return me},FF:function(){return _n},FJ:function(){return je},Hn:function(){return Ae},KX:function(){return Xt},NB:function(){return re},S0:function(){return ke},UL:function(){return Nt},Vk:function(){return de},al:function(){return vt},bn:function(){return Pt},bx:function(){return gt},g2:function(){return ln},h1:function(){return Le},hD:function(){return ye},l4:function(){return Gt},rU:function(){return Ce},s_:function(){return pt},z6:function(){return jt}}),Yn=dt.hmd(Yn),function(){var yt;function Tn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function xn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Tn(a)}}function Bn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Zn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Nn;if(typeof Object.setPrototypeOf=="function")Nn=Object.setPrototypeOf;else{var Ln;t:{var ii={a:!0},Qn={};try{Qn.__proto__=ii,Ln=Qn.a;break t}catch(a){}Ln=!1}Nn=Ln?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var xi=Nn;function Xn(a,y){if(a.prototype=Zn(y.prototype),a.prototype.constructor=a,xi)xi(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var $n=typeof dt.g!="undefined"&&dt.g!=null?dt.g:self,Hi=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Bi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function sr(a,y){if(y){var x=$n;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Bi(x,a,{writable:!0,value:y})}}sr("Object.assign",function(a){return a||Hi}),sr("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var Jn=typeof globalThis=="object"&&globalThis||typeof dt.g=="object"&&dt.g.global===dt.g&&dt.g||typeof self=="object"&&self.self===self&&self||{};Jn.requestAnimationFrame===void 0&&(Jn.setImmediate===void 0?Jn.requestAnimationFrame=function(a){Jn.setTimeout(a,0)}:Jn.requestAnimationFrame=Jn.setImmediate);function Vn(){}function oi(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Jn.clearTimeout(x),x=Ti(function(){x=-1,a.apply(b,E)},y)}}function Ti(a,y){return Jn.setTimeout(a,y)}function Ci(a){return Jn.document.createElement(a)}function Rt(a){throw Error(a)}function Pe(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Rt(a)}function qt(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Rt(x+" is not in the range "+y+": "+a)}function He(a){Jn.console&&Jn.console.log(a)}function ae(a){return typeof a=="object"&&a!==null}function ze(a){return Array.isArray(a)||Jn.NodeList&&a instanceof Jn.NodeList||Jn.HTMLCollection&&a instanceof Jn.HTMLCollection}function Jt(a){return Array.prototype.slice.call(a)}function nn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Rt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function cn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Rt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ne(){var a=Ji.pop();return a===void 0?[]:a}function Fe(a){a.length=0,Ji.push(a)}function Xe(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(ae(a)&&a.constructor)return Xe(a.constructor);return typeof a}function Je(a){var y=a;return ae(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 vn(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 li(a,y,x){Object.defineProperty(io.prototype,a,{get:y,set:x})}function jn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[b])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var vi=Jn.navigator!==void 0&&0<Jn.navigator.userAgent.indexOf("Trident/7"),$i=Jn.navigator!==void 0&&Jn.navigator.platform!==void 0&&Jn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ji=[];Object.freeze([]),Vn.className="Util",Vn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Vn.adym="gojs.net",Vn.vfo="28e645fdb266",Vn.className="Util";function yn(a,y,x){wi(this),this.j=a,this.xa=y,this.o=x}yn.prototype.toString=function(){return"EnumValue."+this.xa};function zi(a,y){return y==null||y===""?null:a[y]}$n.Object.defineProperties(yn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),yn.className="EnumValue";function Ri(){this.ew=[]}Ri.prototype.toString=function(){return this.ew.join("")},Ri.prototype.add=function(a){a!==""&&this.ew.push(a)},Ri.className="StringBuilder";function Ii(){}Ii.className="PropertyCollection";var an={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Jn.console&&Jn.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var z=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(tt,nt){return function(){throw Error("Property "+tt.Zl[nt.Tj]+" of "+tt.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Qe(){}Qe.prototype.reset=function(){},Qe.prototype.next=function(){return!1},Qe.prototype.Ad=function(){return!1},Qe.prototype.first=function(){return null},Qe.prototype.any=function(){return!1},Qe.prototype.all=function(){return!0},Qe.prototype.each=function(){return this},Qe.prototype.map=function(){return this},Qe.prototype.filter=function(){return this},Qe.prototype.de=function(){},Qe.prototype.toString=function(){return"EmptyIterator"},$n.Object.defineProperties(Qe.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Qe.prototype.first=Qe.prototype.first,Qe.prototype.hasNext=Qe.prototype.Ad,Qe.prototype.next=Qe.prototype.next,Qe.prototype.reset=Qe.prototype.reset;var We=null;Qe.className="EmptyIterator",We=new Qe;function mn(a){this.key=-1,this.value=a}mn.prototype.reset=function(){this.key=-1},mn.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},mn.prototype.Ad=function(){return this.next()},mn.prototype.first=function(){return this.key=0,this.value},mn.prototype.any=function(a){return this.key=-1,a(this.value)},mn.prototype.all=function(a){return this.key=-1,a(this.value)},mn.prototype.each=function(a){return this.key=-1,a(this.value),this},mn.prototype.map=function(a){return new mn(a(this.value))},mn.prototype.filter=function(a){return a(this.value)?new mn(this.value):We},mn.prototype.de=function(){this.value=null},mn.prototype.toString=function(){return"SingletonIterator("+this.value+")"},$n.Object.defineProperties(mn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),mn.prototype.first=mn.prototype.first,mn.prototype.hasNext=mn.prototype.Ad,mn.prototype.next=mn.prototype.next,mn.prototype.reset=mn.prototype.reset,mn.className="SingletonIterator";function fn(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}fn.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},fn.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},fn.prototype.Ad=function(){return this.next()},fn.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},fn.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&a(z))return!0}return!1},fn.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&!a(z))return!1}return!0},fn.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];(b===null||b(z))&&a(z)}return this},fn.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&x.push(a(tt))}return a=new $e,a.s=x,a.xb(),a.iterator},fn.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&a(tt)&&x.push(tt)}return a=new $e,a.s=x,a.xb(),a.iterator},fn.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},fn.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},$n.Object.defineProperties(fn.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),fn.prototype.first=fn.prototype.first,fn.prototype.hasNext=fn.prototype.Ad,fn.prototype.next=fn.prototype.next,fn.prototype.reset=fn.prototype.reset,fn.className="ListIterator";function Wn(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Wn.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Wn.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)},Wn.prototype.Ad=function(){return this.next()},Wn.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},Wn.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},Wn.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},Wn.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},Wn.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new $e,a.s=x,a.xb(),a.iterator},Wn.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new $e,a.s=x,a.xb(),a.iterator},Wn.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Wn.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},$n.Object.defineProperties(Wn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Wn.prototype.first=Wn.prototype.first,Wn.prototype.hasNext=Wn.prototype.Ad,Wn.prototype.next=Wn.prototype.next,Wn.prototype.reset=Wn.prototype.reset,Wn.className="ListIteratorBackwards";function $e(a){wi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}yt=$e.prototype,yt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return this._isFrozen=!1,this},yt.toString=function(){return"List()#"+Ui(this)},yt.add=function(a){return a===null?this:(this._isFrozen&&Pe(this,a),this.s.push(a),this.xb(),this)},yt.push=function(a){this.add(a)},yt.addAll=function(a){if(a===null)return this;this._isFrozen&&Pe(this);var y=this.s;if(ze(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},yt.clear=function(){this._isFrozen&&Pe(this),this.s.length=0,this.xb()},yt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},yt.has=function(a){return this.contains(a)},yt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},yt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&qt(a,"0 <= i < length",$e,"elt:i"),y[a]},yt.get=function(a){return this.M(a)},yt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&qt(a,"0 <= i < length",$e,"setElt:i"),this._isFrozen&&Pe(this,a),x[a]=y},yt.set=function(a,y){this.cd(a,y)},yt.first=function(){var a=this.s;return a.length===0?null:a[0]},yt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},yt.pop=function(){this._isFrozen&&Pe(this);var a=this.s;return 0<a.length?a.pop():null},$e.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},$e.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},$e.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},$e.prototype.map=function(a){for(var y=new $e,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},$e.prototype.filter=function(a){for(var y=new $e,x=[],b=this.s,E=b.length,z=0;z<E;z++){var tt=b[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},yt=$e.prototype,yt.Gb=function(a,y){0>a&&qt(a,">= 0",$e,"insertAt:i"),this._isFrozen&&Pe(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},yt.remove=function(a){if(a===null)return!1;this._isFrozen&&Pe(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)},yt.delete=function(a){return this.remove(a)},yt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&qt(a,"0 <= i < length",$e,"removeAt:i"),this._isFrozen&&Pe(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},yt.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&Pe(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},$e.prototype.copy=function(){var a=new $e,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},yt=$e.prototype,yt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},yt.Iv=function(){for(var a=new pn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},yt.sort=function(a){return this._isFrozen&&Pe(this),this.s.sort(a),this.xb(),this},yt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Pe(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&qt(y,"0 <= from < length",$e,"sortRange:from"),z===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},yt.reverse=function(){return this._isFrozen&&Pe(this),this.s.reverse(),this.xb(),this},$n.Object.defineProperties($e.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 We;var a=this.Sa;return a!==null?(a.reset(),a):new fn(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return We;var a=this.Hg;return a!==null?(a.reset(),a):new Wn(this)}}}),$e.prototype.reverse=$e.prototype.reverse,$e.prototype.sortRange=$e.prototype.zi,$e.prototype.sort=$e.prototype.sort,$e.prototype.toSet=$e.prototype.Iv,$e.prototype.toArray=$e.prototype.Fa,$e.prototype.removeRange=$e.prototype.removeRange,$e.prototype.removeAt=$e.prototype.mb,$e.prototype.delete=$e.prototype.delete,$e.prototype.remove=$e.prototype.remove,$e.prototype.insertAt=$e.prototype.Gb,$e.prototype.pop=$e.prototype.pop,$e.prototype.last=$e.prototype.jc,$e.prototype.first=$e.prototype.first,$e.prototype.set=$e.prototype.set,$e.prototype.setElt=$e.prototype.cd,$e.prototype.get=$e.prototype.get,$e.prototype.elt=$e.prototype.M,$e.prototype.indexOf=$e.prototype.indexOf,$e.prototype.has=$e.prototype.has,$e.prototype.contains=$e.prototype.contains,$e.prototype.clear=$e.prototype.clear,$e.prototype.addAll=$e.prototype.addAll,$e.prototype.push=$e.prototype.push,$e.prototype.add=$e.prototype.add,$e.prototype.thaw=$e.prototype.ka,$e.prototype.freeze=$e.prototype.freeze,$e.className="List";function Si(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Si.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Si.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)},Si.prototype.Ad=function(){return this.next()},Si.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},Si.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},Si.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},Si.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},Si.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new $e;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Si.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new $e;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Si.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Si.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},$n.Object.defineProperties(Si.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Si.prototype.first=Si.prototype.first,Si.prototype.hasNext=Si.prototype.Ad,Si.prototype.next=Si.prototype.next,Si.prototype.reset=Si.prototype.reset,Si.className="SetIterator";function pn(a){wi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}yt=pn.prototype,yt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return this._isFrozen=!1,this},yt.toString=function(){return"Set()#"+Ui(this)},yt.add=function(a){if(a===null)return this;this._isFrozen&&Pe(this,a);var y=a;return ae(a)&&(y=Wi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new fr(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},yt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Pe(this),ze(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},yt.contains=function(a){if(a===null)return!1;var y=a;return ae(a)&&(y=Ui(a),y===void 0)?!1:this.Tb[y]!==void 0},yt.has=function(a){return this.contains(a)},yt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},yt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},yt.first=function(){var a=this.ea;return a===null?null:a.value},pn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},pn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},pn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},pn.prototype.map=function(a){for(var y=new pn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},pn.prototype.filter=function(a){for(var y=new pn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},yt=pn.prototype,yt.remove=function(a){if(a===null)return!1;this._isFrozen&&Pe(this,a);var y=a;if(ae(a)&&(y=Ui(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},yt.delete=function(a){return this.remove(a)},yt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Pe(this),ze(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},yt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Pe(this);var y=new pn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},yt.clear=function(){this._isFrozen&&Pe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},pn.prototype.copy=function(){var a=new pn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},pn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},pn.prototype.Hv=function(){var a=new $e,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function wi(a){a.__gohashid=Vi++}function Wi(a){var y=a.__gohashid;return y===void 0&&(y=Vi++,a.__gohashid=y),y}function Ui(a){return a.__gohashid}$n.Object.defineProperties(pn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return We;var a=this.Sa;return a!==null?(a.reset(),a):new Si(this)}}}),pn.prototype.toList=pn.prototype.Hv,pn.prototype.toArray=pn.prototype.Fa,pn.prototype.clear=pn.prototype.clear,pn.prototype.retainAll=pn.prototype.pA,pn.prototype.removeAll=pn.prototype.hp,pn.prototype.delete=pn.prototype.delete,pn.prototype.remove=pn.prototype.remove,pn.prototype.first=pn.prototype.first,pn.prototype.containsAny=pn.prototype.Ty,pn.prototype.containsAll=pn.prototype.Sy,pn.prototype.has=pn.prototype.has,pn.prototype.contains=pn.prototype.contains,pn.prototype.addAll=pn.prototype.addAll,pn.prototype.add=pn.prototype.add,pn.prototype.thaw=pn.prototype.ka,pn.prototype.freeze=pn.prototype.freeze;var Vi=1;pn.className="Set",pn.uniqueHash=wi,pn.hashIdUnique=Wi,pn.hashId=Ui;function Ki(a){this.ma=a,this.qa=a.Ja,this.sa=null}Ki.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Ki.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)},Ki.prototype.Ad=function(){return this.next()},Ki.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},Ki.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},Ki.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},Ki.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},Ki.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new $e;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Ki.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new $e;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Ki.prototype.de=function(){this.value=this.key=null,this.qa=-1},Ki.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},$n.Object.defineProperties(Ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ki.prototype.first=Ki.prototype.first,Ki.prototype.hasNext=Ki.prototype.Ad,Ki.prototype.next=Ki.prototype.next,Ki.prototype.reset=Ki.prototype.reset,Ki.className="MapKeySetIterator";function Oi(a){pn.call(this),wi(this),this._isFrozen=!0,this.ma=a}Xn(Oi,pn),yt=Oi.prototype,yt.freeze=function(){return this},yt.ka=function(){return this},yt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},yt.add=function(){Rt("This Set is read-only: "+this.toString())},yt.contains=function(a){return this.ma.contains(a)},yt.has=function(a){return this.contains(a)},yt.remove=function(){Rt("This Set is read-only: "+this.toString())},yt.delete=function(a){return this.remove(a)},yt.clear=function(){Rt("This Set is read-only: "+this.toString())},yt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Oi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Oi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Oi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Oi.prototype.map=function(a){for(var y=new pn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Oi.prototype.filter=function(a){for(var y=new pn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Oi.prototype.copy=function(){return new Oi(this.ma)},Oi.prototype.Iv=function(){var a=new pn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Oi.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Oi.prototype.Hv=function(){var a=new $e,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},$n.Object.defineProperties(Oi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?We:new Ki(this.ma)}}}),Oi.prototype.toList=Oi.prototype.Hv,Oi.prototype.toArray=Oi.prototype.Fa,Oi.prototype.toSet=Oi.prototype.Iv,Oi.prototype.first=Oi.prototype.first,Oi.prototype.clear=Oi.prototype.clear,Oi.prototype.delete=Oi.prototype.delete,Oi.prototype.remove=Oi.prototype.remove,Oi.prototype.has=Oi.prototype.has,Oi.prototype.contains=Oi.prototype.contains,Oi.prototype.add=Oi.prototype.add,Oi.prototype.thaw=Oi.prototype.ka,Oi.prototype.freeze=Oi.prototype.freeze,Oi.className="MapKeySet";function qi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}qi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},qi.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)},qi.prototype.Ad=function(){return this.next()},qi.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},qi.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},qi.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},qi.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},qi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $e;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},qi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $e;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},qi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},qi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},$n.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset,qi.className="MapValueSetIterator";function fr(a,y){this.key=a,this.value=y,this.ll=this.va=null}fr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},fr.className="KeyValuePair";function tr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}tr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},tr.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)},tr.prototype.Ad=function(){return this.next()},tr.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},tr.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},tr.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},tr.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},tr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $e;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},tr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $e;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},tr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},tr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},$n.Object.defineProperties(tr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),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="MapIterator";function ai(a){wi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}yt=ai.prototype,yt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return this._isFrozen=!1,this},yt.toString=function(){return"Map()#"+Ui(this)},yt.add=function(a,y){this._isFrozen&&Pe(this,a);var x=a;ae(a)&&(x=Wi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new fr(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},yt.set=function(a,y){return this.add(a,y)},yt.addAll=function(a){if(a===null)return this;if(ze(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof ai)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},yt.first=function(){return this.ea},ai.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ai.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ai.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ai.prototype.map=function(a){for(var y=new ai,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ai.prototype.filter=function(a){for(var y=new ai,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},yt=ai.prototype,yt.contains=function(a){var y=a;return ae(a)&&(y=Ui(a),y===void 0)?!1:this.Tb[y]!==void 0},yt.has=function(a){return this.contains(a)},yt.I=function(a){var y=a;return ae(a)&&(y=Ui(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},yt.get=function(a){return this.I(a)},yt.remove=function(a){if(a===null)return!1;this._isFrozen&&Pe(this,a);var y=a;if(ae(a)&&(y=Ui(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},yt.delete=function(a){return this.remove(a)},yt.clear=function(){this._isFrozen&&Pe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},ai.prototype.copy=function(){var a=new ai,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},ai.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new fr(E.key,E.value),x++}return y},ai.prototype.Lf=function(){return new Oi(this)},$n.Object.defineProperties(ai.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return We;var a=this.Sa;return a!==null?(a.reset(),a):new tr(this)}},iteratorKeys:{get:function(){return 0>=this.count?We:new Ki(this)}},iteratorValues:{get:function(){if(0>=this.count)return We;var a=this.jf;return a!==null?(a.reset(),a):new qi(this)}}}),ai.prototype.toKeySet=ai.prototype.Lf,ai.prototype.toArray=ai.prototype.Fa,ai.prototype.clear=ai.prototype.clear,ai.prototype.delete=ai.prototype.delete,ai.prototype.remove=ai.prototype.remove,ai.prototype.get=ai.prototype.get,ai.prototype.getValue=ai.prototype.I,ai.prototype.has=ai.prototype.has,ai.prototype.contains=ai.prototype.contains,ai.prototype.first=ai.prototype.first,ai.prototype.addAll=ai.prototype.addAll,ai.prototype.set=ai.prototype.set,ai.prototype.add=ai.prototype.add,ai.prototype.thaw=ai.prototype.ka,ai.prototype.freeze=ai.prototype.freeze,ai.className="Map";function Lt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Rt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var ur,Qi,Yi,nr,_i;Lt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Lt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Lt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Lt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Lt.prototype.copy=function(){var a=new Lt;return a.x=this.x,a.y=this.y,a},yt=Lt.prototype,yt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},yt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ui(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Lt(x,E)}return new Lt}function Ei(a){return a.x.toString()+" "+a.y.toString()}yt.toString=function(){return"Point("+this.x+","+this.y+")"},yt.D=function(a){return a instanceof Lt?this.x===a.x&&this.y===a.y:!1},yt.hi=function(a,y){return this.x===a&&this.y===y},yt.Xa=function(a){return ge.B(this.x,a.x)&&ge.B(this.y,a.y)},yt.add=function(a){return this.x+=a.x,this.y+=a.y,this},yt.re=function(a){return this.x-=a.x,this.y-=a.y,this},yt.offset=function(a,y){return this.x+=a,this.y+=y,this},Lt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},yt=Lt.prototype,yt.scale=function(a,y){return this.x*=a,this.y*=y,this},yt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},yt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},yt.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},yt.ab=function(a){return Mi(a.x-this.x,a.y-this.y)},yt.direction=function(a,y){return Mi(a-this.x,y-this.y)};function Mi(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}yt.Ry=function(a,y){return ge.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},yt.fA=function(a,y,x,b){return ge.qh(a,y,x,b,this.x,this.y,this),this},yt.gA=function(a,y){return ge.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},yt.uA=function(a,y,x,b){return ge.No(this.x,this.y,a,y,x,b,this),this},yt.vA=function(a,y){return ge.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},yt.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},yt.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},yt.transform=function(a){return a.Ga(this),this};function Gn(a,y){return y.Cd(a),a}function gi(a,y,x,b,E,z){var tt=E-x,nt=z-b,it=tt*tt+nt*nt;x-=a,b-=y;var ot=-x*tt-b*nt;return 0>=ot||ot>=it?(tt=E-a,nt=z-y,Math.min(x*x+b*b,tt*tt+nt*nt)):(a=tt*b-nt*x,a*a/it)}function Li(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function pi(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}yt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Lt.alloc=function(){var a=ni.pop();return a===void 0?new Lt:a},Lt.allocAt=function(a,y){var x=ni.pop();return x===void 0?new Lt(a,y):(x.x=a,x.y=y,x)},Lt.free=function(a){ni.push(a)},Lt.prototype.isReal=Lt.prototype.w,Lt.prototype.setSpot=Lt.prototype.yi,Lt.prototype.setRectSpot=Lt.prototype.xi,Lt.prototype.snapToGridPoint=Lt.prototype.vA,Lt.prototype.snapToGrid=Lt.prototype.uA,Lt.prototype.projectOntoLineSegmentPoint=Lt.prototype.gA,Lt.prototype.projectOntoLineSegment=Lt.prototype.fA,Lt.intersectingLineSegments=function(a,y,x,b,E,z,tt,nt){return ge.Rl(a,y,x,b,E,z,tt,nt)},Lt.prototype.compareWithLineSegmentPoint=Lt.prototype.Ry,Lt.compareWithLineSegment=function(a,y,x,b,E,z){return ge.Fl(a,y,x,b,E,z)},Lt.prototype.direction=Lt.prototype.direction,Lt.prototype.directionPoint=Lt.prototype.ab,Lt.prototype.normalize=Lt.prototype.normalize,Lt.prototype.distanceSquared=Lt.prototype.zd,Lt.prototype.distanceSquaredPoint=Lt.prototype.Bf,Lt.prototype.scale=Lt.prototype.scale,Lt.prototype.rotate=Lt.prototype.rotate,Lt.prototype.offset=Lt.prototype.offset,Lt.prototype.subtract=Lt.prototype.re,Lt.prototype.add=Lt.prototype.add,Lt.prototype.equalsApprox=Lt.prototype.Xa,Lt.prototype.equalTo=Lt.prototype.hi,Lt.prototype.equals=Lt.prototype.D,Lt.prototype.set=Lt.prototype.set,Lt.prototype.setTo=Lt.prototype.sg;var ni=[];Lt.className="Point",Lt.parse=ui,Lt.stringify=Ei,Lt.distanceLineSegmentSquared=gi,Lt.distanceSquared=Li,Lt.direction=pi,Lt.Origin=ur=new Lt(0,0).ja(),Lt.InfiniteTopLeft=Qi=new Lt(-1/0,-1/0).ja(),Lt.InfiniteBottomRight=Yi=new Lt(1/0,1/0).ja(),Lt.SixPoint=nr=new Lt(6,6).ja(),Lt.NoPoint=_i=new Lt(NaN,NaN).ja(),Lt.parse=ui,Lt.stringify=Ei,Lt.distanceLineSegmentSquared=gi,Lt.distanceSquared=Li,Lt.direction=pi;function kn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Rt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ji,br,Dr,Or,Vr,Gr,Ur;kn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.h=function(a,y){return this.width=a,this.height=y,this},kn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},kn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.copy=function(){var a=new kn;return a.width=this.width,a.height=this.height,a},yt=kn.prototype,yt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},yt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ro(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new kn(x,E)}return new kn}function Kr(a){return a.width.toString()+" "+a.height.toString()}yt.toString=function(){return"Size("+this.width+","+this.height+")"},yt.D=function(a){return a instanceof kn?this.width===a.width&&this.height===a.height:!1},yt.hi=function(a,y){return this.width===a&&this.height===y},yt.Xa=function(a){return ge.B(this.width,a.width)&&ge.B(this.height,a.height)},yt.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},yt.w=function(){return isFinite(this.width)&&isFinite(this.height)},kn.alloc=function(){var a=uo.pop();return a===void 0?new kn:a},kn.free=function(a){uo.push(a)},kn.prototype.isReal=kn.prototype.w,kn.prototype.inflate=kn.prototype.Bc,kn.prototype.equalsApprox=kn.prototype.Xa,kn.prototype.equalTo=kn.prototype.hi,kn.prototype.equals=kn.prototype.D,kn.prototype.set=kn.prototype.set,kn.prototype.setTo=kn.prototype.sg;var uo=[];kn.className="Size",kn.parse=ro,kn.stringify=Kr,kn.ZeroSize=ji=new kn(0,0).ja(),kn.OneSize=br=new kn(1,1).ja(),kn.SixSize=Dr=new kn(6,6).ja(),kn.EightSize=Or=new kn(8,8).ja(),kn.TenSize=Vr=new kn(10,10).ja(),kn.InfiniteSize=Gr=new kn(1/0,1/0).ja(),kn.NoSize=Ur=new kn(NaN,NaN).ja(),kn.parse=ro,kn.stringify=Kr;function un(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof Lt?(x=a.x,a=a.y,y instanceof Lt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof kn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Rt("Incorrect second argument supplied to Rect constructor "+y)):Rt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}yt=un.prototype,yt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},yt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function So(a,y,x){a.width=y,a.height=x}yt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},yt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},yt.dd=function(a){return this.x=a.x,this.y=a.y,this},yt.tA=function(a){return this.width=a.width,this.height=a.height,this},un.prototype.copy=function(){var a=new un;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},yt=un.prototype,yt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},yt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Io(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),new un(x,E,z,tt)}return new un}function ho(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}yt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},yt.D=function(a){return a instanceof un?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},yt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},yt.Xa=function(a){return ge.B(this.x,a.x)&&ge.B(this.y,a.y)&&ge.B(this.width,a.width)&&ge.B(this.height,a.height)};function to(a,y){return ge.$(a.x,y.x)&&ge.$(a.y,y.y)&&ge.$(a.width,y.width)&&ge.$(a.height,y.height)}yt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},yt.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},yt.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},yt.offset=function(a,y){return this.x+=a,this.y+=y,this},yt.Bc=function(a,y){return wr(this,y,a,y,a)},yt.Co=function(a){return wr(this,a.top,a.right,a.bottom,a.left)},yt.Fv=function(a){return wr(this,-a.top,-a.right,-a.bottom,-a.left)},yt.Hz=function(a,y,x,b){return wr(this,a,y,x,b)};function wr(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}yt.Ex=function(a){return Cr(this,a.x,a.y,a.width,a.height)},yt.Uu=function(a,y,x,b){return Cr(this,a,y,x,b)};function Cr(a,y,x,b,E){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}yt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},yt.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function bo(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}yt.Ye=function(a){return Ar(this,a.x,a.y,0,0)},yt.ed=function(a){return Ar(this,a.x,a.y,a.width,a.height)},yt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ar(this,a,y,x,b)};function Ar(a,y,x,b,E){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}yt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Sr(a,y,x,b,E,z,tt,nt){return tt===void 0&&(tt=0),nt===void 0&&(nt=0),a<=E&&E+tt<=a+x&&y<=z&&z+nt<=y+b}function lo(a,y,x,b,E,z,tt,nt){return a>tt+E||E>x+a?!1:!(y>nt+z||z>b+y)}yt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},yt.Mz=function(){return this.width===0&&this.height===0},un.alloc=function(){var a=oo.pop();return a===void 0?new un:a},un.allocAt=function(a,y,x,b){var E=oo.pop();return E===void 0?new un(a,y,x,b):E.h(a,y,x,b)},un.free=function(a){oo.push(a)},$n.Object.defineProperties(un.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 Lt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new kn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Lt(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}}}),un.prototype.isEmpty=un.prototype.Mz,un.prototype.isReal=un.prototype.w,un.intersectsLineSegment=function(a,y,x,b,E,z,tt,nt){return ge.Fx(a,y,x,b,E,z,tt,nt)},un.prototype.setSpot=un.prototype.yi,un.prototype.union=un.prototype.Kv,un.prototype.unionRect=un.prototype.ed,un.prototype.unionPoint=un.prototype.Ye,un.prototype.intersects=un.prototype.Vu,un.prototype.intersectsRect=un.prototype.Yc,un.prototype.intersect=un.prototype.Uu,un.prototype.intersectRect=un.prototype.Ex,un.prototype.grow=un.prototype.Hz,un.prototype.subtractMargin=un.prototype.Fv,un.prototype.addMargin=un.prototype.Co,un.prototype.inflate=un.prototype.Bc,un.prototype.offset=un.prototype.offset,un.prototype.contains=un.prototype.contains,un.prototype.containsRect=un.prototype.Re,un.prototype.containsPoint=un.prototype.ca,un.prototype.equalsApprox=un.prototype.Xa,un.prototype.equalTo=un.prototype.hi,un.prototype.equals=un.prototype.D,un.prototype.setSize=un.prototype.tA,un.prototype.setPoint=un.prototype.dd,un.prototype.set=un.prototype.set,un.prototype.setTo=un.prototype.sg;var $r=null,Er=null,oo=[];un.className="Rect",un.parse=Io,un.stringify=ho,un.contains=Sr,un.intersects=lo,un.ZeroRect=$r=new un(0,0,0,0).ja(),un.NoRect=Er=new un(NaN,NaN,NaN,NaN).ja(),un.parse=Io,un.stringify=ho,un.contains=Sr,un.intersects=lo;function Xi(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Rt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Xi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Xi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.copy=function(){var a=new Xi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},yt=Xi.prototype,yt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},yt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function vs(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Xi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Xi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new Xi(x,E);for(var tt=NaN;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),isNaN(tt)?new Xi(x,E):new Xi(x,E,z,tt)}return new Xi}function ws(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}yt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},yt.D=function(a){return a instanceof Xi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},yt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},yt.Xa=function(a){return ge.B(this.top,a.top)&&ge.B(this.right,a.right)&&ge.B(this.bottom,a.bottom)&&ge.B(this.left,a.left)},yt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Xi.alloc=function(){var a=Js.pop();return a===void 0?new Xi:a},Xi.free=function(a){Js.push(a)},Xi.prototype.isReal=Xi.prototype.w,Xi.prototype.equalsApprox=Xi.prototype.Xa,Xi.prototype.equalTo=Xi.prototype.hi,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.set=Xi.prototype.set,Xi.prototype.setTo=Xi.prototype.sg;var Qo=null,qo=null,Js=[];Xi.className="Margin",Xi.parse=vs,Xi.stringify=ws,Xi.ZeroMargin=Qo=new Xi(0,0,0,0).ja(),Xi.TwoMargin=qo=new Xi(2,2,2,2).ja(),Xi.parse=vs,Xi.stringify=ws;function Fi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var mr,gr,Lr,zr,go,cr,ol,hs,rs,Eo,Is,pl,As,sl,da,jl,$a,Ph,Cs,Ql,fa,Pl,qa,tu,fi,di,lr,Nr,Ir,Jr,vo,Zo,Wo,ts,ql,Nl;Fi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Fi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Fi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Fi.prototype.copy=function(){var a=new Fi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},yt=Fi.prototype,yt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},yt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Po(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function co(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return mr;if(a==="TopLeft")return gr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Lr;if(a==="TopRight")return zr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return go;if(a==="Center")return cr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ol;if(a==="BottomLeft")return hs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return rs;if(a==="BottomRight")return Eo;if(a==="TopSide")return Is;if(a==="LeftSide")return pl;if(a==="RightSide")return As;if(a==="BottomSide")return sl;if(a==="TopBottomSides")return da;if(a==="LeftRightSides")return jl;if(a==="TopLeftSides")return $a;if(a==="TopRightSides")return Ph;if(a==="BottomLeftSides")return Cs;if(a==="BottomRightSides")return Ql;if(a==="NotTopSide")return fa;if(a==="NotLeftSide")return Pl;if(a==="NotRightSide")return qa;if(a==="NotBottomSide")return tu;if(a==="AllSides")return fi;if(a==="Default")return di;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(tt=parseFloat(b)),new Fi(x,E,z,tt)}return new Fi}function Yr(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}yt.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(mr)?"None":this.D(gr)?"TopLeft":this.D(Lr)?"Top":this.D(zr)?"TopRight":this.D(go)?"Left":this.D(cr)?"Center":this.D(ol)?"Right":this.D(hs)?"BottomLeft":this.D(rs)?"Bottom":this.D(Eo)?"BottomRight":this.D(Is)?"TopSide":this.D(pl)?"LeftSide":this.D(As)?"RightSide":this.D(sl)?"BottomSide":this.D(da)?"TopBottomSides":this.D(jl)?"LeftRightSides":this.D($a)?"TopLeftSides":this.D(Ph)?"TopRightSides":this.D(Cs)?"BottomLeftSides":this.D(Ql)?"BottomRightSides":this.D(fa)?"NotTopSide":this.D(Pl)?"NotLeftSide":this.D(qa)?"NotRightSide":this.D(tu)?"NotBottomSide":this.D(fi)?"AllSides":this.D(di)?"Default":"None"},yt.D=function(a){return a instanceof Fi?(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},yt.gv=function(){return new Fi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},yt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(lr))a=pl;else if(a.D(Nr))a=As;else if(a.D(Ir))a=Is;else if(a.D(Jr))a=sl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},yt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},yt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},yt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},yt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},yt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Fi.alloc=function(){var a=ys.pop();return a===void 0?new Fi:a},Fi.free=function(a){ys.push(a)},Fi.prototype.isDefault=Fi.prototype.Xb,Fi.prototype.isNone=Fi.prototype.ys,Fi.prototype.isSide=Fi.prototype.$c,Fi.prototype.isNoSpot=Fi.prototype.Mc,Fi.prototype.isSpot=Fi.prototype.sb,Fi.prototype.includesSide=Fi.prototype.Hf,Fi.prototype.opposite=Fi.prototype.gv,Fi.prototype.equals=Fi.prototype.D,Fi.prototype.set=Fi.prototype.set,Fi.prototype.setTo=Fi.prototype.sg;var ys=[];Fi.className="Spot",Fi.parse=co,Fi.stringify=Yr,Fi.None=mr=Po(new Fi(0,0,0,0),0).ja(),Fi.Default=di=Po(new Fi(0,0,-1,0),-1).ja(),Fi.TopLeft=gr=new Fi(0,0,0,0).ja(),Fi.TopCenter=Lr=new Fi(.5,0,0,0).ja(),Fi.TopRight=zr=new Fi(1,0,0,0).ja(),Fi.LeftCenter=go=new Fi(0,.5,0,0).ja(),Fi.Center=cr=new Fi(.5,.5,0,0).ja(),Fi.RightCenter=ol=new Fi(1,.5,0,0).ja(),Fi.BottomLeft=hs=new Fi(0,1,0,0).ja(),Fi.BottomCenter=rs=new Fi(.5,1,0,0).ja(),Fi.BottomRight=Eo=new Fi(1,1,0,0).ja(),Fi.MiddleTop=vo=Lr,Fi.MiddleLeft=Zo=go,Fi.MiddleRight=Wo=ol,Fi.MiddleBottom=ts=rs,Fi.Top=Ir=Lr,Fi.Left=lr=go,Fi.Right=Nr=ol,Fi.Bottom=Jr=rs,Fi.TopSide=Is=Po(new Fi(0,0,1,1),1).ja(),Fi.LeftSide=pl=Po(new Fi(0,0,1,2),1).ja(),Fi.RightSide=As=Po(new Fi(0,0,1,4),1).ja(),Fi.BottomSide=sl=Po(new Fi(0,0,1,8),1).ja(),Fi.TopBottomSides=da=Po(new Fi(0,0,1,9),1).ja(),Fi.LeftRightSides=jl=Po(new Fi(0,0,1,6),1).ja(),Fi.TopLeftSides=$a=Po(new Fi(0,0,1,3),1).ja(),Fi.TopRightSides=Ph=Po(new Fi(0,0,1,5),1).ja(),Fi.BottomLeftSides=Cs=Po(new Fi(0,0,1,10),1).ja(),Fi.BottomRightSides=Ql=Po(new Fi(0,0,1,12),1).ja(),Fi.NotTopSide=fa=Po(new Fi(0,0,1,14),1).ja(),Fi.NotLeftSide=Pl=Po(new Fi(0,0,1,13),1).ja(),Fi.NotRightSide=qa=Po(new Fi(0,0,1,11),1).ja(),Fi.NotBottomSide=tu=Po(new Fi(0,0,1,7),1).ja(),Fi.AllSides=fi=Po(new Fi(0,0,1,15),1).ja(),ql=new Fi(.156,.156).ja(),Nl=new Fi(.844,.844).ja(),Fi.parse=co,Fi.stringify=Yr;function er(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}er.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},er.prototype.setTransform=function(a,y,x,b,E,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},er.prototype.copy=function(){var a=new er;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},er.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},er.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},er.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},er.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},er.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},er.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*z,E=this.m12*E+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},er.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},er.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,z=this.m11*-b+this.m21*a,tt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=tt,this.translate(-y,-x),this},yt=er.prototype,yt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},yt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},yt.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)},yt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},yt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},yt.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,tt=this.m12,nt=this.m21,it=this.m22,ot=this.dx,st=this.dy,ht=y*z+x*nt+ot,ft=y*tt+x*it+st,mt=b*z+x*nt+ot,xt=b*tt+x*it+st;return x=y*z+E*nt+ot,y=y*tt+E*it+st,z=b*z+E*nt+ot,b=b*tt+E*it+st,E=Math.min(ht,mt),ht=Math.max(ht,mt),mt=Math.min(ft,xt),ft=Math.max(ft,xt),E=Math.min(E,x),ht=Math.max(ht,x),mt=Math.min(mt,y),ft=Math.max(ft,y),E=Math.min(E,z),ht=Math.max(ht,z),mt=Math.min(mt,b),ft=Math.max(ft,b),a.h(E,mt,ht-E,ft-mt),a},er.alloc=function(){var a=os.pop();return a===void 0?new er:a},er.free=function(a){os.push(a)},er.prototype.transformRect=er.prototype.pp,er.prototype.transformPoint=er.prototype.Ga,er.prototype.scale=er.prototype.scale,er.prototype.translate=er.prototype.translate,er.prototype.rotate=er.prototype.rotate,er.prototype.invert=er.prototype.Vj,er.prototype.multiplyInverted=er.prototype.bv,er.prototype.multiply=er.prototype.multiply,er.prototype.reset=er.prototype.reset,er.prototype.isIdentity=er.prototype.ws,er.prototype.equals=er.prototype.D,er.prototype.setTransform=er.prototype.setTransform,er.prototype.set=er.prototype.set;var os=[];er.className="Transform",er.xF="54a702f3e53909c447824c6706603faf4c";var ge={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=ge.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);ge.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,z,tt){if(0>=E&&(E=1e-6),a<x)var nt=a,it=x;else nt=x,it=a;if(y<b)var ot=y,st=b;else ot=b,st=y;if(a===x)return ot<=tt&&tt<=st&&a-E<=z&&z<=a+E;if(y===b)return nt<=z&&z<=it&&y-E<=tt&&tt<=y+E;if(it+=E,nt-=E,nt<=z&&z<=it&&(st+=E,ot-=E,ot<=tt&&tt<=st))if(it-nt>st-ot)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=tt&&tt<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(tt=(x-a)/(b-y)*(tt-y)+a,tt-E<=z&&z<=tt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,tt,nt,it,ot,st,ht){if(ge.Yb(a,y,tt,nt,ht,x,b)&&ge.Yb(a,y,tt,nt,ht,E,z))return ge.Yb(a,y,tt,nt,ht,ot,st);var ft=(a+x)/2,mt=(y+b)/2,xt=(x+E)/2,St=(b+z)/2;E=(E+tt)/2,z=(z+nt)/2,b=(ft+xt)/2,x=(mt+St)/2,xt=(xt+E)/2,St=(St+z)/2;var Ft=(b+xt)/2,Ot=(x+St)/2;return ge.cs(a,y,ft,mt,b,x,Ft,Ot,it,ot,st,ht)||ge.cs(Ft,Ot,xt,St,E,z,tt,nt,it,ot,st,ht)},ax:function(a,y,x,b,E,z,tt,nt,it){var ot=(x+E)/2,st=(b+z)/2;return it.h((((a+x)/2+ot)/2+(ot+(E+tt)/2)/2)/2,(((y+b)/2+st)/2+(st+(z+nt)/2)/2)/2),it},My:function(a,y,x,b,E,z,tt,nt){var it=(x+E)/2,ot=(b+z)/2;return pi(((a+x)/2+it)/2,((y+b)/2+ot)/2,(it+(E+tt)/2)/2,(ot+(z+nt)/2)/2)},Dl:function(a,y,x,b,E,z,tt,nt,it,ot){if(ge.Yb(a,y,tt,nt,it,x,b)&&ge.Yb(a,y,tt,nt,it,E,z))Ar(ot,a,y,0,0),Ar(ot,tt,nt,0,0);else{var st=(a+x)/2,ht=(y+b)/2,ft=(x+E)/2,mt=(b+z)/2;E=(E+tt)/2,z=(z+nt)/2,b=(st+ft)/2,x=(ht+mt)/2,ft=(ft+E)/2,mt=(mt+z)/2;var xt=(b+ft)/2,St=(x+mt)/2;ge.Dl(a,y,st,ht,b,x,xt,St,it,ot),ge.Dl(xt,St,ft,mt,E,z,tt,nt,it,ot)}return ot},Qe:function(a,y,x,b,E,z,tt,nt,it,ot){if(ge.Yb(a,y,tt,nt,it,x,b)&&ge.Yb(a,y,tt,nt,it,E,z))ot.length===0&&(ot.push(a),ot.push(y)),ot.push(tt),ot.push(nt);else{var st=(a+x)/2,ht=(y+b)/2,ft=(x+E)/2,mt=(b+z)/2;E=(E+tt)/2,z=(z+nt)/2,b=(st+ft)/2,x=(ht+mt)/2,ft=(ft+E)/2,mt=(mt+z)/2;var xt=(b+ft)/2,St=(x+mt)/2;ge.Qe(a,y,st,ht,b,x,xt,St,it,ot),ge.Qe(xt,St,ft,mt,E,z,tt,nt,it,ot)}return ot},jv:function(a,y,x,b,E,z,tt,nt,it,ot){if(ge.Yb(a,y,E,z,ot,x,b))return ge.Yb(a,y,E,z,ot,nt,it);var st=(a+x)/2,ht=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ft=(st+x)/2,mt=(ht+b)/2;return ge.jv(a,y,st,ht,ft,mt,tt,nt,it,ot)||ge.jv(ft,mt,x,b,E,z,tt,nt,it,ot)},OA:function(a,y,x,b,E,z,tt){return tt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),tt},iv:function(a,y,x,b,E,z,tt,nt){if(ge.Yb(a,y,E,z,tt,x,b))Ar(nt,a,y,0,0),Ar(nt,E,z,0,0);else{var it=(a+x)/2,ot=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var st=(it+x)/2,ht=(ot+b)/2;ge.iv(a,y,it,ot,st,ht,tt,nt),ge.iv(st,ht,x,b,E,z,tt,nt)}return nt},ep:function(a,y,x,b,E,z,tt,nt){if(ge.Yb(a,y,E,z,tt,x,b))nt.length===0&&(nt.push(a),nt.push(y)),nt.push(E),nt.push(z);else{var it=(a+x)/2,ot=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var st=(it+x)/2,ht=(ot+b)/2;ge.ep(a,y,it,ot,st,ht,tt,nt),ge.ep(st,ht,x,b,E,z,tt,nt)}return nt},Eo:function(a,y,x,b,E,z,tt,nt,it,ot,st,ht,ft,mt){if(ge.Yb(a,y,tt,nt,ft,x,b)&&ge.Yb(a,y,tt,nt,ft,E,z))return!ge.Rl(a,y,tt,nt,it,ot,st,ht)||(ft=(a-tt)*(ot-ht)-(y-nt)*(it-st),ft===0)?!1:(mt.h(((a*nt-y*tt)*(it-st)-(a-tt)*(it*ht-ot*st))/ft,((a*nt-y*tt)*(ot-ht)-(y-nt)*(it*ht-ot*st))/ft),!0);var xt=(a+x)/2,St=(y+b)/2,Ft=(x+E)/2,Ot=(b+z)/2;E=(E+tt)/2,z=(z+nt)/2,b=(xt+Ft)/2,x=(St+Ot)/2,Ft=(Ft+E)/2,Ot=(Ot+z)/2;var Wt=(b+Ft)/2,Ut=(x+Ot)/2,ne=1/0,fe=!1,_e=0,si=0;return ge.Eo(a,y,xt,St,b,x,Wt,Ut,it,ot,st,ht,ft,mt)&&(a=(mt.x-it)*(mt.x-it)+(mt.y-ot)*(mt.y-ot),a<ne&&(ne=a,fe=!0,_e=mt.x,si=mt.y)),ge.Eo(Wt,Ut,Ft,Ot,E,z,tt,nt,it,ot,st,ht,ft,mt)&&(mt.x-it)*(mt.x-it)+(mt.y-ot)*(mt.y-ot)<ne&&(fe=!0,_e=mt.x,si=mt.y),fe&&(mt.x=_e,mt.y=si),fe},Fo:function(a,y,x,b,E,z,tt,nt,it,ot,st,ht,ft){var mt=0;if(ge.Yb(a,y,tt,nt,ft,x,b)&&ge.Yb(a,y,tt,nt,ft,E,z)){if(ft=(a-tt)*(ot-ht)-(y-nt)*(it-st),ft===0)return mt;var xt=((a*nt-y*tt)*(it-st)-(a-tt)*(it*ht-ot*st))/ft,St=((a*nt-y*tt)*(ot-ht)-(y-nt)*(it*ht-ot*st))/ft;if(xt>=st)return mt;if((it>st?it-st:st-it)<(ot>ht?ot-ht:ht-ot)){if(y<nt?(it=y,a=nt):(it=nt,a=y),St<it||St>a)return mt}else if(a<tt?(it=a,a=tt):it=tt,xt<it||xt>a)return mt;0<ft?mt++:0>ft&&mt--}else{xt=(a+x)/2,St=(y+b)/2;var Ft=(x+E)/2,Ot=(b+z)/2;E=(E+tt)/2,z=(z+nt)/2,b=(xt+Ft)/2,x=(St+Ot)/2,Ft=(Ft+E)/2,Ot=(Ot+z)/2;var Wt=(b+Ft)/2,Ut=(x+Ot)/2;mt+=ge.Fo(a,y,xt,St,b,x,Wt,Ut,it,ot,st,ht,ft),mt+=ge.Fo(Wt,Ut,Ft,Ot,E,z,tt,nt,it,ot,st,ht,ft)}return mt},qh:function(a,y,x,b,E,z,tt){return ge.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):ge.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(tt.h(b,y),!1):E>a?(tt.h(a,y),!1):(tt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(tt.h(a,y),!1):1.000005<E?(tt.h(x,b),!1):(tt.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,z,tt,nt,it){return ge.B(a,x)&&ge.B(y,b)?(it.h(a,y),!1):ge.$(E,tt)?ge.$(a,x)?(ge.qh(a,y,x,b,E,z,it),!1):ge.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,it):(nt=(nt-z)/(tt-E),ge.$(a,x)?(x=nt*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(it.h(a,E),!1):x>y?(it.h(a,y),!1):(it.h(a,x),!0)):(tt=(b-y)/(x-a),ge.$(nt,tt)?(ge.qh(a,y,x,b,E,z,it),!1):(E=(tt*a-nt*E+z-y)/(tt-nt),ge.$(tt,0)?(a<x?(b=a,a=x):b=x,E<b?(it.h(b,y),!1):E>a?(it.h(a,y),!1):(it.h(E,y),!0)):ge.qh(a,y,x,b,E,tt*(E-a)+y,it))))},MA:function(a,y,x,b,E){return ge.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,z,tt,nt,it,ot){function st(Ft,Ot){var Wt=(Ft-a)*(Ft-a)+(Ot-y)*(Ot-y);Wt<ht&&(ht=Wt,it.h(Ft,Ot))}var ht=1/0;st(it.x,it.y);var ft=0,mt=0,xt=0,St=0;if(E<tt?(ft=E,mt=tt):(ft=tt,mt=E),z<nt?(xt=E,St=tt):(xt=tt,St=E),ft=(mt-ft)/2+ot,ot=(St-xt)/2+ot,E=(E+tt)/2,z=(z+nt)/2,ft===0||ot===0)return it;if(.5>(x>a?x-a:a-x)){if(ft=1-(x-E)*(x-E)/(ft*ft),0>ft)return it;ft=Math.sqrt(ft),b=-ot*ft+z,st(x,ot*ft+z),st(x,b)}else{if(x=(b-y)/(x-a),b=1/(ft*ft)+x*x/(ot*ot),nt=2*x*(y-x*a)/(ot*ot)-2*x*z/(ot*ot)-2*E/(ft*ft),ft=nt*nt-4*b*(2*x*a*z/(ot*ot)-2*y*z/(ot*ot)+z*z/(ot*ot)+E*E/(ft*ft)-1+(y-x*a)*(y-x*a)/(ot*ot)),0>ft)return it;ft=Math.sqrt(ft),ot=(-nt+ft)/(2*b),st(ot,x*ot-x*a+y),ft=(-nt-ft)/(2*b),st(ft,x*ft-x*a+y)}return it},Ff:function(a,y,x,b,E,z,tt,nt,it){var ot=1e21,st=a,ht=y;if(ge.Ve(a,y,a,b,E,z,tt,nt,it)){var ft=(it.x-E)*(it.x-E)+(it.y-z)*(it.y-z);ft<ot&&(ot=ft,st=it.x,ht=it.y)}return ge.Ve(x,y,x,b,E,z,tt,nt,it)&&(ft=(it.x-E)*(it.x-E)+(it.y-z)*(it.y-z),ft<ot&&(ot=ft,st=it.x,ht=it.y)),ge.Ve(a,y,x,y,E,z,tt,nt,it)&&(y=(it.x-E)*(it.x-E)+(it.y-z)*(it.y-z),y<ot&&(ot=y,st=it.x,ht=it.y)),ge.Ve(a,b,x,b,E,z,tt,nt,it)&&(a=(it.x-E)*(it.x-E)+(it.y-z)*(it.y-z),a<ot&&(ot=a,st=it.x,ht=it.y)),it.h(st,ht),1e21>ot},us:function(a,y,x){return ge.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,tt,nt){var it=a+x,ot=y+b;return E===tt?(z<nt?(tt=z,z=nt):tt=nt,a<=E&&E<=it&&tt<=ot&&z>=y):z===nt?(E<tt?(nt=E,E=tt):nt=tt,y<=z&&z<=ot&&nt<=it&&E>=a):!!(Sr(a,y,x,b,E,z)||Sr(a,y,x,b,tt,nt)||ge.Rl(a,y,it,y,E,z,tt,nt)||ge.Rl(it,y,it,ot,E,z,tt,nt)||ge.Rl(it,ot,a,ot,E,z,tt,nt)||ge.Rl(a,ot,a,y,E,z,tt,nt))},Rl:function(a,y,x,b,E,z,tt,nt){return a===x&&y===b&&E===tt&&z===nt?a===E&&y===z:0>=ge.Fl(a,y,x,b,E,z)*ge.Fl(a,y,x,b,tt,nt)&&0>=ge.Fl(E,z,tt,nt,a,y)*ge.Fl(E,z,tt,nt,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0<z&&(z=(a-x)*x+(y-b)*b,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var tt=Math.PI;z||(b*=tt/180,E*=tt/180);var nt=b>E?-1:1;z=[];var it=tt/2,ot=b;if(b=Math.min(2*tt,Math.abs(E-b)),1e-5>b)return it=ot+nt*Math.min(b,it),nt=a+x*Math.cos(ot),ot=y+x*Math.sin(ot),a+=x*Math.cos(it),y+=x*Math.sin(it),x=(nt+a)/2,it=(ot+y)/2,z.push([nt,ot,x,it,x,it,a,y]),z;for(;1e-5<b;)E=ot+nt*Math.min(b,it),z.push(ge.Vy(x,ot,E,a,y)),b-=Math.abs(E-ot),ot=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,tt=a*Math.cos(z),nt=a*Math.sin(z),it=-nt,ot=tt*tt+it*it,st=ot+tt*tt+it*nt;return ot=4/3*(Math.sqrt(2*ot*st)-st)/(tt*nt-it*tt),nt=tt-ot*it,tt=it+ot*tt,it=-tt,ot=z+y,z=Math.cos(ot),ot=Math.sin(ot),[b+a*Math.cos(y),E+a*Math.sin(y),b+nt*z-tt*ot,E+nt*ot+tt*z,b+nt*z-it*ot,E+nt*ot+it*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,tt){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var nt=x;return x+E-a<E/2&&(nt=x+E),a=b,b+z-y<z/2&&(a=b+z),tt.h(nt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,z=0>b;if(a<y)var tt=1,nt=0;else tt=0,nt=1;var it=tt===0?a:y,ot=tt===0?x:b;return(tt===0?E:z)&&(ot=-ot),tt=nt,x=tt===0?x:b,(tt===0?E:z)&&(x=-x),ge.az(it,tt===0?a:y,ot,x,0,0)},az:function(a,y,x,b,E,z){if(0<b)if(0<x){E=a*a,z=y*y,a*=x;var tt=y*b,nt=-z+tt,it=-z+Math.sqrt(a*a+tt*tt);y=nt;for(var ot=0;9999999999>ot&&(y=.5*(nt+it),!(y===nt||y===it));++ot){var st=a/(y+E),ht=tt/(y+z);if(st=st*st+ht*ht-1,0<st)nt=y;else if(0>st)it=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,z<b?(b=z/b,z=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Ii,um:new Ii,Mf:new Ii,Nf:0,vm:100};ge.za=ge.AA;function ti(a){wi(this),this.l=2,a===void 0&&(a=ti.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===ti.o?this.ee=new $e:(ti.V===null&&(ti.V=new $e().freeze()),this.ee=ti.V),this.aq=this.ee.Ja,this.Ip=new un().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=gr,this.gg=Eo,this.Rk=this.Sk=NaN,this.Uf=Kn}ti.prototype.copy=function(){var a=new ti;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===ti.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},ti.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},ti.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==ti.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},ti.prototype.ka=function(){if(Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==ti.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},ti.prototype.Xa=function(a){if(!(a instanceof ti))return!1;if(this.type!==a.type)return this.type===ti.j&&a.type===ti.o?pa(this,a):a.type===ti.j&&this.type===ti.o?pa(a,this):!1;if(this.type===ti.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return ge.B(this.startX,a.startX)&&ge.B(this.startY,a.startY)&&ge.B(this.endX,a.endX)&&ge.B(this.endY,a.endY)};function pa(a,y){return a.type!==ti.j||y.type!==ti.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&ge.B(a.startX,y.startX)&&ge.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Xr&&ge.B(a.endX,y.endX)&&ge.B(a.endY,y.endY))))}ti.ia=function(a){return a.toString()},ti.prototype.qb=function(a){a.classType===ti&&(this.type=a)},ti.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ti.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 ti.u:var y=new un(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 ti.F:if(y=new un(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 ti.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var z=x[E];0<E&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},ti.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},ti.parse=function(a,y){function x(){return St>=ne-1?!0:ot[St+1].match(fe)!==null}function b(){return St++,ot[St]}function E(ir){var Gi=parseFloat(b()),kr=parseFloat(b());Ft===Ft.toLowerCase()&&(Gi=Ut.x+Gi,kr=Ut.y+kr),ir.h(Gi,kr)}function z(){return E(Ut),Ut}function tt(){return E(Wt),Wt}function nt(){var ir=Ot.toLowerCase();return ir!=="c"&&ir!=="s"&&ir!=="q"&&ir!=="t"?Ut:new Lt(2*Ut.x-Wt.x,2*Ut.y-Wt.y)}y===void 0&&(y=!1);var it=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(it,"$1 $2"),a=a.replace(it,"$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 ot=a.split(" ");for(a=0;a<ot.length;a++){var st=ot[a];if(st.match(/(\.[0-9]*)(\.)/gm)!==null){it=Ne();for(var ht="",ft=!1,mt=0;mt<st.length;mt++){var xt=st[mt];xt!=="."||ft?xt==="."?(it.push(ht),ht="."):ht+=xt:(ft=!0,ht+=xt)}for(it.push(ht),ot.splice(a,1),st=0;st<it.length;st++)ot.splice(a+st,0,it[st]);a+=it.length-1,Fe(it)}}var St=-1,Ft="",Ot="";it=new Lt(0,0);var Wt=new Lt(0,0),Ut=new Lt(0,0),ne=ot.length;a=Dx(null),ft=ht=st=!1,mt=!0,xt=null;for(var fe=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(St>=ne-1);)if(Ot=Ft,Ft=b(),Ft!=="")switch(Ft.toUpperCase()){case"X":mt=!0,ht=st=!1;break;case"M":for(xt=z(),a.mc===null||mt===!0?(Nf(a,xt.x,xt.y,st,!ht,ft),mt=!1):a.moveTo(xt.x,xt.y),it.assign(Ut);!x();)xt=z(),a.lineTo(xt.x,xt.y);break;case"L":for(;!x();)xt=z(),a.lineTo(xt.x,xt.y);break;case"H":for(;!x();)Ut=new Lt((Ft===Ft.toLowerCase()?Ut.x:0)+parseFloat(b()),Ut.y),a.lineTo(Ut.x,Ut.y);break;case"V":for(;!x();)Ut=new Lt(Ut.x,(Ft===Ft.toLowerCase()?Ut.y:0)+parseFloat(b())),a.lineTo(Ut.x,Ut.y);break;case"C":for(;!x();){xt=new Lt,E(xt);var _e=tt(),si=z();ah(a,xt.x,xt.y,_e.x,_e.y,si.x,si.y)}break;case"S":for(;!x();)xt=nt(),_e=tt(),si=z(),ah(a,xt.x,xt.y,_e.x,_e.y,si.x,si.y);break;case"Q":for(;!x();)xt=tt(),_e=z(),Bg(a,xt.x,xt.y,_e.x,_e.y);break;case"T":for(;!x();)Wt=xt=nt(),_e=z(),Bg(a,xt.x,xt.y,_e.x,_e.y);break;case"B":for(;!x();){xt=parseFloat(b()),_e=parseFloat(b()),si=parseFloat(b());var bi=parseFloat(b()),mi=parseFloat(b()),qn=mi,Fn=!1;x()||(qn=parseFloat(b()),x()||(Fn=parseFloat(b())!==0)),Ft===Ft.toLowerCase()&&(si+=Ut.x,bi+=Ut.y),a.arcTo(xt,_e,si,bi,mi,qn,Fn)}break;case"A":for(;!x();)xt=Math.abs(parseFloat(b())),_e=Math.abs(parseFloat(b())),si=parseFloat(b()),mi=bi=!1,Fn=qn=0,qn=b(),qn.length===1?(bi=!!parseFloat(qn),mi=!!parseFloat(b()),qn=parseFloat(b())):qn.length===2?(bi=!!parseFloat(qn[0]),mi=!!parseFloat(qn[1]),qn=parseFloat(b())):(bi=!!parseFloat(qn[0]),mi=!!parseFloat(qn[1]),qn=parseFloat(qn.slice(2))),Fn=parseFloat(b()),Ft===Ft.toLowerCase()&&(qn=Ut.x+qn,Fn=Ut.y+Fn),Ut.h(qn,Fn),Tw(a,xt,_e,si,bi,mi,qn,Fn);break;case"Z":Nw(a),Ut.assign(it);break;case"F":for(xt="",_e=1;ot[St+_e];)if(ot[St+_e]==="0")ft=!0,_e++;else if(ot[St+_e].match(/[Uu]/)!==null)_e++;else if(ot[St+_e].match(fe)===null)_e++;else{xt=ot[St+_e];break}xt.match(/[Mm]/)?st=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(xt="",_e=1;ot[St+_e];)if(ot[St+_e].match(/[Ff]/)!==null)_e++;else if(ot[St+_e].match(fe)===null)_e++;else{xt=ot[St+_e];break}xt.match(/[Mm]/)?ht=!0:a.mc.isShadowed=!1}if(it=a.os,Rg=a,y)for(y=it.figures.iterator;y.next();)y.value.isFilled=!0;return it},ti.Ha=function(a,y){for(var x=a.length,b=Lt.alloc(),E=0;E<x;E++){var z=a[E];b.x=z[0],b.y=z[1],y.Ga(b),z[0]=b.x,z[1]=b.y,b.x=z[2],b.y=z[3],y.Ga(b),z[2]=b.x,z[3]=b.y,b.x=z[4],b.y=z[5],y.Ga(b),z[4]=b.x,z[5]=b.y,b.x=z[6],b.y=z[7],y.Ga(b),z[6]=b.x,z[7]=b.y}Lt.free(b)},ti.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===ti.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},ti.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===ti.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var z=0;z<E;z++){var tt=b[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),eu(this,a,!1),Ar(a,0,0,0,0),a.freeze()},ti.prototype.ix=function(){var a=new un;return eu(this,a,!0),a};function eu(a,y,x){switch(a.type){case ti.j:case ti.u:case ti.F:x?y.h(a.od,a.pd,0,0):Ar(y,a.od,a.pd,0,0),Ar(y,a.Dc,a.Ec,0,0);break;case ti.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var z=a[E];x&&E===0?y.h(z.startX,z.startY,0,0):Ar(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,nt=tt.length,it=z.startX,ot=z.startY,st=0;st<nt;st++){var ht=tt[st];switch(ht.type){case Xr:case Ko:it=ht.endX,ot=ht.endY,Ar(y,it,ot,0,0);break;case ds:ge.Dl(it,ot,ht.point1X,ht.point1Y,ht.point2X,ht.point2Y,ht.endX,ht.endY,.5,y),it=ht.endX,ot=ht.endY;break;case kl:ge.iv(it,ot,ht.point1X,ht.point1Y,ht.endX,ht.endY,.5,y),it=ht.endX,ot=ht.endY;break;case Ao:case zl:var ft=ht.type===Ao?gl(ht,z):ta(ht,z,it,ot),mt=ft.length;if(mt===0){it=ht.type===Ao?ht.centerX:ht.endX,ot=ht.type===Ao?ht.centerY:ht.endY,Ar(y,it,ot,0,0);break}ht=null;for(var xt=0;xt<mt;xt++)ht=ft[xt],ge.Dl(ht[0],ht[1],ht[2],ht[3],ht[4],ht[5],ht[6],ht[7],.5,y);ht!==null&&(it=ht[6],ot=ht[7]);break;default:Rt("Unknown Segment type: "+ht.type)}}}break;default:Rt("Unknown Geometry type: "+a.type)}}ti.prototype.normalize=function(){this._isFrozen&&Pe(this);var a=this.ix();return this.offset(-a.x,-a.y),new Lt(-a.x,-a.y)},ti.prototype.offset=function(a,y){return this._isFrozen&&Pe(this),this.transform(1,0,0,1,a,y),this},ti.prototype.scale=function(a,y){return this._isFrozen&&Pe(this),this.transform(a,0,0,y,0,0),this},ti.prototype.rotate=function(a,y,x){this._isFrozen&&Pe(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=er.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),er.free(b),this},yt=ti.prototype,yt.transform=function(a,y,x,b,E,z){switch(this.type){case ti.j:case ti.u:case ti.F:var tt=this.od,nt=this.pd;this.od=tt*a+nt*x+E,this.pd=tt*y+nt*b+z,tt=this.Dc,nt=this.Ec,this.Dc=tt*a+nt*x+E,this.Ec=tt*y+nt*b+z;break;case ti.o:for(var it=this.figures.s,ot=it.length,st=0;st<ot;st++){var ht=it[st];tt=ht.startX,nt=ht.startY,ht.startX=tt*a+nt*x+E,ht.startY=tt*y+nt*b+z,ht=ht.segments.s;for(var ft=ht.length,mt=0;mt<ft;mt++){var xt=ht[mt];switch(xt.type){case Xr:case Ko:tt=xt.endX,nt=xt.endY,xt.endX=tt*a+nt*x+E,xt.endY=tt*y+nt*b+z;break;case ds:tt=xt.point1X,nt=xt.point1Y,xt.point1X=tt*a+nt*x+E,xt.point1Y=tt*y+nt*b+z,tt=xt.point2X,nt=xt.point2Y,xt.point2X=tt*a+nt*x+E,xt.point2Y=tt*y+nt*b+z,tt=xt.endX,nt=xt.endY,xt.endX=tt*a+nt*x+E,xt.endY=tt*y+nt*b+z;break;case kl:tt=xt.point1X,nt=xt.point1Y,xt.point1X=tt*a+nt*x+E,xt.point1Y=tt*y+nt*b+z,tt=xt.endX,nt=xt.endY,xt.endX=tt*a+nt*x+E,xt.endY=tt*y+nt*b+z;break;case Ao:tt=xt.centerX,nt=xt.centerY,xt.centerX=tt*a+nt*x+E,xt.centerY=tt*y+nt*b+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),xt.startAngle+=tt),0>a&&(xt.startAngle=180-xt.startAngle,xt.sweepAngle=-xt.sweepAngle),0>b&&(xt.startAngle=-xt.startAngle,xt.sweepAngle=-xt.sweepAngle),xt.radiusX*=Math.sqrt(a*a+x*x),xt.radiusY!==void 0&&(xt.radiusY*=Math.sqrt(y*y+b*b));break;case zl:if(tt=xt.endX,nt=xt.endY,xt.endX=tt*a+nt*x+E,xt.endY=tt*y+nt*b+z,xt.radiusX===0||xt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),xt.xAxisRotation+=tt),0>a&&(xt.xAxisRotation=180-xt.xAxisRotation,xt.isClockwiseArc=!xt.isClockwiseArc),0>b&&(xt.xAxisRotation=-xt.xAxisRotation,xt.isClockwiseArc=!xt.isClockwiseArc),xt.radiusX*=Math.sqrt(a*a+x*x),xt.radiusY*=Math.sqrt(y*y+b*b);break;default:Rt("Unknown Segment type: "+xt.type)}}}}return this._isInvalidBounds=!0,this},yt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case ti.j:return ge.Yb(x,b,E,z,y,a.x,a.y);case ti.u:var tt=un.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=tt.ca(a),un.free(tt),a;case ti.F:tt=Math.min(x,E)-y;var nt=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),nt=a.y-(nt+y),1>=tt*tt/(x*x)+nt*nt/(y*y));case ti.o:return Tl(this,a,y,!0,!1);default:return!1}};function Tl(a,y,x,b,E){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,nt=0,it,ot,st,ht,ft=a.figures.s,mt=ft.length,xt=0;xt<mt;xt++){var St=ft[xt],Ft=!St.isEvenOdd;if(St.isFilled){if(b&&St.ca(z,y,x))return!0;var Ot=St.segments;it=St.startX,ot=St.startY;for(var Wt=it,Ut=ot,ne=Ot.s,fe=0;fe<=Ot.length;fe++){var _e=void 0;if(fe!==Ot.length){_e=ne[fe];var si=_e.type;a=_e.endX,ht=_e.endY}else si=Xr,a=Wt,ht=Ut;switch(si){case Ko:if(Wt=ml(z,y,tt,y,it,ot,Wt,Ut),isNaN(Wt))return!0;nt+=Wt,Wt=a,Ut=ht;break;case Xr:if(it=ml(z,y,tt,y,it,ot,a,ht),isNaN(it))return!0;nt+=it;break;case ds:st=ge.Fo(it,ot,_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,a,ht,tt,y,z,y,.5),nt+=st;break;case kl:st=ge.Fo(it,ot,(it+2*_e.point1X)/3,(ot+2*_e.point1Y)/3,(2*_e.point1X+a)/3,(2*_e.point1Y+ht)/3,a,ht,tt,y,z,y,.5),nt+=st;break;case Ao:case zl:si=_e.type===Ao?gl(_e,St):ta(_e,St,it,ot);var bi=si.length;if(bi===0){if(it=ml(z,y,tt,y,it,ot,_e.type===Ao?_e.centerX:_e.endX,_e.type===Ao?_e.centerY:_e.endY),isNaN(it))return!0;nt+=it;break}_e=null;for(var mi=0;mi<bi;mi++){if(_e=si[mi],mi===0){if(st=ml(z,y,tt,y,it,ot,_e[0],_e[1]),isNaN(st))return!0;nt+=st}st=ge.Fo(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5],_e[6],_e[7],tt,y,z,y,.5),nt+=st}_e!==null&&(a=_e[6],ht=_e[7]);break;default:Rt("Unknown Segment type: "+_e.type)}it=a,ot=ht}if(Ft){if(nt!==0)return!0}else if(nt%2!==0)return!0;nt=0}else if(St.ca(z,y,E?x:x+2))return!0}return!1}function ml(a,y,x,b,E,z,tt,nt){if(ge.Yb(E,z,tt,nt,.05,a,y))return NaN;var it=(a-x)*(z-nt);if(it===0)return 0;var ot=((a*b-y*x)*(E-tt)-(a-x)*(E*nt-z*tt))/it;if(y=(a*b-y*x)*(z-nt)/it,ot>=a)return 0;if((E>tt?E-tt:tt-E)<(z>nt?z-nt:nt-z)){if(z<nt){if(y<z||y>nt)return 0}else if(y<nt||y>z)return 0}else if(E<tt){if(ot<E||ot>tt)return 0}else if(ot<tt||ot>E)return 0;return 0<it?1:-1}function Ta(a,y,x,b){a=a.figures.s;for(var E=a.length,z=0;z<E;z++)if(a[z].ca(y,x,b))return!0;return!1}yt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Lt),this.type===ti.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,z=this.flattenedTotalLength*a,tt=0,nt=0;nt<E;nt++){var it=b[nt],ot=it.length;for(a=0;a<ot;a++){var st=it[a];if(tt+st>=z)return b=z-tt,b=st===0?0:b/st,x=x[nt],nt=x[2*a],E=x[2*a+1],y.h(nt+(x[2*a+2]-nt)*b,E+(x[2*a+3]-E)*b),y;tt+=st}}return y},yt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===ti.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,z=0,tt=0;tt<b;tt++){var nt=x[tt],it=nt.length;for(a=0;a<it;a++){var ot=nt[a];if(z+ot>=E)return E=y[tt],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;z+=ot}}return NaN},yt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===ti.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,z=this.flattenedTotalLength*a,tt=0,nt=0;nt<E;nt++){var it=b[nt],ot=it.length;for(a=0;a<ot;a++){var st=it[a];if(tt+st>=z)return b=z-tt,b=st===0?0:b/st,st=x[nt],x=st[2*a],nt=st[2*a+1],E=st[2*a+2],a=st[2*a+3],y[0]=x+(E-x)*b,y[1]=nt+(a-nt)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-nt)?0:1>Math.abs(E-x)?0<=a-nt?90:270:1>Math.abs(a-nt)?0<=E-x?0:180:180*Math.atan2(a-nt,E-x)/Math.PI,y;tt+=st}}return y},yt.xx=function(a){if(this.type===ti.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x<E){var tt=x;b=E}else tt=E,b=x;return a<=tt?tt===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-tt)}if(x===E)return y<b?tt=y:(tt=b,b=y),z<=tt?tt===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-tt);tt=(b-y)*(b-y)+(E-x)*(E-x);var nt=Lt.alloc();return ge.qh(y,x,b,E,z,a,nt),a=nt.x,z=nt.y,Lt.free(nt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===ti.u){tt=this.startX,nt=this.startY;var it=this.endX;if(E=this.endY,tt!==it||nt!==E){y=it-tt,x=E-nt,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,tt),it),a=Math.min(Math.max(a,nt),E),tt=Math.abs(b-tt),it=Math.abs(b-it),nt=Math.abs(a-nt),E=Math.abs(a-E);var ot=Math.min(tt,it,nt,E);if(ot===nt)return b/z;if(ot===it)return(y+a)/z;if(ot===E)return(2*y+x-b)/z;if(ot===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=Lt.alloc(),E=1/0,nt=tt=0,it=y.length;for(var st=ot=0,ht=0;ht<it;ht++)for(var ft=y[ht],mt=x[ht],xt=ft.length,St=0;St<xt;St+=2){var Ft=ft[St],Ot=ft[St+1];if(St!==0){ge.qh(ot,st,Ft,Ot,a.x,a.y,b);var Wt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Wt<E&&(E=Wt,tt=nt,tt+=Math.sqrt((b.x-ot)*(b.x-ot)+(b.y-st)*(b.y-st))),nt+=mt[(St-2)/2]}ot=Ft,st=Ot}return Lt.free(b),a=tt/z,0>a?0:1<a?1:a}return 0};function Cu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===ti.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===ti.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===ti.F){var z=new Vo;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Tr(Ao);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=gl(tt,z),E=a.length,E===0)b.push(tt.centerX),b.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var nt=0;nt<E;nt++){var it=a[nt];ge.Qe(tt,z,it[2],it[3],it[4],it[5],it[6],it[7],.5,b),tt=it[6],z=it[7]}}y.push(b),x.push(Xc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),tt=E.startX,z=E.startY,nt=tt,it=z;for(var ot=E.segments.s,st=ot.length,ht=0;ht<st;ht++){var ft=ot[ht];switch(ft.type){case Ko:4<=b.length&&(y.push(b),x.push(Xc(b))),b=[],b.push(ft.endX),b.push(ft.endY),tt=ft.endX,z=ft.endY,nt=tt,it=z;break;case Xr:b.push(ft.endX),b.push(ft.endY),tt=ft.endX,z=ft.endY;break;case ds:ge.Qe(tt,z,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,b),tt=ft.endX,z=ft.endY;break;case kl:ge.ep(tt,z,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,b),tt=ft.endX,z=ft.endY;break;case Ao:var mt=gl(ft,E),xt=mt.length;if(xt===0){b.push(ft.centerX),b.push(ft.centerY),tt=ft.centerX,z=ft.centerY;break}for(var St=0;St<xt;St++){var Ft=mt[St];ge.Qe(tt,z,Ft[2],Ft[3],Ft[4],Ft[5],Ft[6],Ft[7],.5,b),tt=Ft[6],z=Ft[7]}break;case zl:if(mt=ta(ft,E,tt,z),xt=mt.length,St=ft.endX,Ft=ft.endY,xt===0){b.push(St),b.push(Ft),tt=St,z=Ft;break}for(St=0;St<xt;St++)Ft=mt[St],ge.Qe(tt,z,Ft[2],Ft[3],Ft[4],Ft[5],Ft[6],Ft[7],.5,b),tt=Ft[6],z=Ft[7];break;default:Rt("Segment not of valid type: "+ft.type)}ft.isClosed&&(b.push(nt),b.push(it))}4<=b.length&&(y.push(b),x.push(Xc(b)))}}}function Xc(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var tt=a[z],nt=a[z+1];z!==0&&y.push(Math.sqrt(Li(x,b,tt,nt))),x=tt,b=nt}return y}yt.add=function(a){return this.ee.add(a),this},yt.pm=function(a,y,x,b,E,z,tt,nt){return this._isFrozen&&Pe(this),this.fg=new Fi(a,y,E,z).freeze(),this.gg=new Fi(x,b,tt,nt).freeze(),this},$n.Object.defineProperties(ti.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 Cu(this),this.tk}},flattenedLengths:{get:function(){return Cu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===ti.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===ti.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],z=E.length,tt=0;tt<z;tt++)a+=E[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Pe(this,a),this.na=a,a===ti.o?this.ee=new $e:(ti.V===null&&(ti.V=new $e().freeze()),this.ee=ti.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Pe(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Pe(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Pe(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Pe(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Pe(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Pe(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Pe(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Pe(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),ti.prototype.setSpots=ti.prototype.pm,ti.prototype.add=ti.prototype.add,ti.prototype.getFractionForPoint=ti.prototype.xx,ti.prototype.getPointAndAngleAlongPath=ti.prototype.Qu,ti.prototype.getAngleAlongPath=ti.prototype.wx,ti.prototype.getPointAlongPath=ti.prototype.Pu,ti.prototype.containsPoint=ti.prototype.ca,ti.prototype.transform=ti.prototype.transform,ti.prototype.rotate=ti.prototype.rotate,ti.prototype.scale=ti.prototype.scale,ti.prototype.offset=ti.prototype.offset,ti.prototype.normalize=ti.prototype.normalize,ti.prototype.computeBoundsWithoutOrigin=ti.prototype.ix,ti.prototype.equalsApprox=ti.prototype.Xa,ti.className="Geometry",ti.j=new yn(ti,"Line",0),ti.u=new yn(ti,"Rectangle",1),ti.F=new yn(ti,"Ellipse",2),ti.o=new yn(ti,"Path",3),ti.V=null,ti.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",ti.className="Geometry",ti.stringify=ti.ia,ti.fillPath=ti.nb,ti.parse=ti.parse,ti.Line=ti.j,ti.Rectangle=ti.u,ti.Ellipse=ti.F,ti.Path=ti.o;function Vo(a,y,x,b,E){wi(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new $e,this.sr=this.pl.Ja,this.fw=null}Vo.prototype.copy=function(){var a=new Vo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var z=y[E].copy();b.add(z)}return a.sr=this.sr,a.fw=this.fw,a},yt=Vo.prototype,yt.Xa=function(a){if(!(a instanceof Vo&&ge.B(this.startX,a.startX)&&ge.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},yt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},yt.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},yt.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},yt.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},yt.add=function(a){return this.pl.add(a),this},yt.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,tt=E,nt=this.segments.s,it=nt.length,ot=0;ot<it;ot++){var st=nt[ot];switch(st.type){case Ko:z=st.endX,tt=st.endY,b=st.endX,E=st.endY;break;case Xr:if(ge.Yb(b,E,st.endX,st.endY,x,a,y))return!0;b=st.endX,E=st.endY;break;case ds:if(ge.cs(b,E,st.point1X,st.point1Y,st.point2X,st.point2Y,st.endX,st.endY,.5,a,y,x))return!0;b=st.endX,E=st.endY;break;case kl:if(ge.jv(b,E,st.point1X,st.point1Y,st.endX,st.endY,.5,a,y,x))return!0;b=st.endX,E=st.endY;break;case Ao:case zl:var ht=st.type===Ao?gl(st,this):ta(st,this,b,E),ft=ht.length,mt=st.type===Ao?st.centerX:st.endX,xt=st.type===Ao?st.centerY:st.endY;if(ft===0){if(ge.Yb(b,E,mt,xt,x,a,y))return!0;b=mt,E=xt;break}for(mt=null,xt=0;xt<ft;xt++)if(mt=ht[xt],xt===0&&ge.Yb(b,E,mt[0],mt[1],x,a,y)||ge.cs(mt[0],mt[1],mt[2],mt[3],mt[4],mt[5],mt[6],mt[7],.5,a,y,x))return!0;mt!==null&&(b=mt[6],E=mt[7]);break;default:Rt("Unknown Segment type: "+st.type)}if(st.isClosed&&(b!==z||E!==tt)&&ge.Yb(b,E,z,tt,x,a,y))return!0}return!1},$n.Object.defineProperties(Vo.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&&Pe(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Pe(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Pe(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Pe(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Pe(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Pe(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Vo.prototype.add=Vo.prototype.add,Vo.prototype.equalsApprox=Vo.prototype.Xa,Vo.className="PathFigure";function Tr(a,y,x,b,E,z,tt,nt){wi(this),a===void 0&&(a=Xr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===zl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),nt&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Ao&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Ao&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Tr.prototype.copy=function(){var a=new Tr;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},yt=Tr.prototype,yt.Xa=function(a){if(!(a instanceof Tr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ko:case Xr:return ge.B(this.endX,a.endX)&&ge.B(this.endY,a.endY);case ds:return ge.B(this.endX,a.endX)&&ge.B(this.endY,a.endY)&&ge.B(this.point1X,a.point1X)&&ge.B(this.point1Y,a.point1Y)&&ge.B(this.point2X,a.point2X)&&ge.B(this.point2Y,a.point2Y);case kl:return ge.B(this.endX,a.endX)&&ge.B(this.endY,a.endY)&&ge.B(this.point1X,a.point1X)&&ge.B(this.point1Y,a.point1Y);case Ao:return ge.B(this.startAngle,a.startAngle)&&ge.B(this.sweepAngle,a.sweepAngle)&&ge.B(this.centerX,a.centerX)&&ge.B(this.centerY,a.centerY)&&ge.B(this.radiusX,a.radiusX)&&ge.B(this.radiusY,a.radiusY);case zl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&ge.B(this.xAxisRotation,a.xAxisRotation)&&ge.B(this.endX,a.endX)&&ge.B(this.endY,a.endY)&&ge.B(this.radiusX,a.radiusX)&&ge.B(this.radiusY,a.radiusY);default:return!1}},yt.qb=function(a){a.classType===Tr&&(this.type=a)},yt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ko:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ds: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 kl: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 Ao: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 zl: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":"")},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return this._isFrozen=!1,this},yt.close=function(){return this.isClosed=!0,this};function gl(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,z=ge.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var tt=er.alloc();tt.reset(),x<b?tt.scale(1,b/x):tt.scale(x/b,1),ti.Ha(z,tt),er.free(tt)}for(x=z.length,b=0;b<x;b++)tt=z[b],tt[0]+=y,tt[1]+=E,tt[2]+=y,tt[3]+=E,tt[4]+=y,tt[5]+=E,tt[6]+=y,tt[7]+=E;return a.ae=z,a.ae}function ta(a,y,x,b){function E(St,Ft,Ot,Wt){return(St*Wt<Ft*Ot?-1:1)*Math.acos((St*Ot+Ft*Wt)/(Math.sqrt(St*St+Ft*Ft)*Math.sqrt(Ot*Ot+Wt*Wt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,nt=a.isLargeArc,it=a.isClockwiseArc,ot=a.Dc,st=a.Ec,ht=Math.cos(tt),ft=Math.sin(tt),mt=ht*(x-ot)/2+ft*(b-st)/2;tt=-ft*(x-ot)/2+ht*(b-st)/2;var xt=mt*mt/(y*y)+tt*tt/(z*z);return 1<xt&&(y*=Math.sqrt(xt),z*=Math.sqrt(xt)),xt=(nt===it?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*mt*mt)/(y*y*tt*tt+z*z*mt*mt)),isNaN(xt)&&(xt=0),nt=xt*y*tt/z,xt=xt*-z*mt/y,isNaN(nt)&&(nt=0),isNaN(xt)&&(xt=0),x=(x+ot)/2+ht*nt-ft*xt,b=(b+st)/2+ft*nt+ht*xt,st=E(1,0,(mt-nt)/y,(tt-xt)/z),ht=(mt-nt)/y,ot=(tt-xt)/z,mt=(-mt-nt)/y,nt=(-tt-xt)/z,tt=E(ht,ot,mt,nt),mt=(ht*mt+ot*nt)/(Math.sqrt(ht*ht+ot*ot)*Math.sqrt(mt*mt+nt*nt)),-1>=mt?tt=Math.PI:1<=mt&&(tt=0),!it&&0<tt&&(tt-=2*Math.PI),it&&0>tt&&(tt+=2*Math.PI),it=y>z?1:y/z,mt=y>z?z/y:1,y=ge.jx(0,0,y>z?y:z,st,st+tt,!0),z=er.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(it,mt),ti.Ha(y,z),er.free(z),a.ae=y,a.ae}$n.Object.defineProperties(Tr.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&&Pe(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Pe(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Pe(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Pe(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Pe(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Pe(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Pe(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Pe(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Pe(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&qt(a,">= zero",Tr,"radiusX"),this._isFrozen&&Pe(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&qt(a,">= zero",Tr,"radiusY"),this._isFrozen&&Pe(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Pe(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&&Pe(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&&Pe(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&&Pe(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&&Pe(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Tr.prototype.equalsApprox=Tr.prototype.Xa;var Ko=new yn(Tr,"Move",0),Xr=new yn(Tr,"Line",1),ds=new yn(Tr,"Bezier",2),kl=new yn(Tr,"QuadraticBezier",3),Ao=new yn(Tr,"Arc",4),zl=new yn(Tr,"SvgArc",4);Tr.className="PathSegment",Tr.Move=Ko,Tr.Line=Xr,Tr.Bezier=ds,Tr.QuadraticBezier=kl,Tr.Arc=Ao,Tr.SvgArc=zl;function Ps(){this.H=null,this.xu=new Lt(0,0).freeze(),this.mt=new Lt(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}Ps.prototype.copy=function(){var a=new Ps;return this.clone(a)},Ps.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},Ps.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},Ps.prototype.So=function(a,y){var x=this.diagram;return x===null||yp(x,a,y),y},Ps.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(yp(x,a,y),y.assign(x.Ps(y))),y},$n.Object.defineProperties(Ps.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}}}),Ps.prototype.getMultiTouchDocumentPoint=Ps.prototype.Bz,Ps.prototype.getMultiTouchViewPoint=Ps.prototype.So,Ps.className="InputEvent";function Hu(){this.H=null,this.xa="",this.ar=this.Lr=null}Hu.prototype.copy=function(){var a=new Hu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Hu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},$n.Object.defineProperties(Hu.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}}}),Hu.className="DiagramEvent";function ao(){this.Fm=so,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ao.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ao.prototype.copy=function(){var a=new ao;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=ae(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=ae(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=ae(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=ae(y)&&typeof y.J=="function"?y.J():y,a},ao.prototype.qb=function(a){a.classType===ao&&(this.change=a)},ao.prototype.toString=function(){var a="";return a=this.change===vl?a+"* ":this.change===so?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===vl?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Je(this.object)),this.oldValue!==null&&(a+=" old: "+Je(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Je(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},ao.prototype.I=function(a){return a?this.oldValue:this.newValue},ao.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ao.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ao.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ao.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ao.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},$n.Object.defineProperties(ao.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===vl&&(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}}}),ao.prototype.redo=ao.prototype.redo,ao.prototype.canRedo=ao.prototype.canRedo,ao.prototype.undo=ao.prototype.undo,ao.prototype.canUndo=ao.prototype.canUndo,ao.prototype.getParam=ao.prototype.Dz,ao.prototype.getValue=ao.prototype.I,ao.prototype.clear=ao.prototype.clear;var vl=new yn(ao,"Transaction",-1),so=new yn(ao,"Property",0),No=new yn(ao,"Insert",1),zo=new yn(ao,"Remove",2);ao.className="ChangedEvent",ao.Transaction=vl,ao.Property=so,ao.Insert=No,ao.Remove=zo;function Yo(){this.o=new $e().freeze(),this.xa="",this.j=!1}Yo.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Yo.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()},Yo.prototype.canUndo=function(){return this.isComplete},Yo.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()}},Yo.prototype.canRedo=function(){return this.isComplete},Yo.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()}},Yo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ai,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===so&&b.object){var E=y.get(b.object);E||(E=new ai,y.set(b.object,E));var z=E.get(b.propertyName);z===null?E.set(b.propertyName,-1):(0<z&&a.cd(z,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},$n.Object.defineProperties(Yo.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}}}),Yo.prototype.optimize=Yo.prototype.ak,Yo.prototype.redo=Yo.prototype.redo,Yo.prototype.canRedo=Yo.prototype.canRedo,Yo.prototype.undo=Yo.prototype.undo,Yo.prototype.canUndo=Yo.prototype.canUndo,Yo.prototype.clear=Yo.prototype.clear,Yo.className="Transaction";function fo(){this.Pt=new pn,this.Jd=!1,this.u=new $e().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new $e().freeze(),this.hl=new $e,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}fo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},fo.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},fo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},yt=fo.prototype,yt.Xw=function(a){this.Pt.add(a)},yt.Rx=function(a){this.Pt.remove(a)},yt.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},yt.eb=function(a){return a===void 0&&(a=""),Nh(this,!0,a)},yt.Kf=function(){return Nh(this,!1,"")};function Nh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&He("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=z,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}yt.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()}},fo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},fo.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){He("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},fo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},fo.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){He("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},fo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new ao;for(b.change=vl,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},fo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Yo);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||He("Change not within a transaction: "+x.toString()))}},fo.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},$n.Object.defineProperties(fo.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}}}),fo.prototype.handleChanged=fo.prototype.Tu,fo.prototype.redo=fo.prototype.redo,fo.prototype.undo=fo.prototype.undo,fo.prototype.canUndo=fo.prototype.canUndo,fo.prototype.discardHistoryAfterIndex=fo.prototype.lx,fo.prototype.rollbackTransaction=fo.prototype.Kf,fo.prototype.commitTransaction=fo.prototype.eb,fo.prototype.startTransaction=fo.prototype.Ea,fo.prototype.removeModel=fo.prototype.Rx,fo.prototype.addModel=fo.prototype.Xw,fo.prototype.clear=fo.prototype.clear,fo.className="UndoManager";function Mr(){wi(this),this.H=ru,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ps,this.Zr=-1}Mr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Xe(this.constructor)},Mr.prototype.updateAdornments=function(){},Mr.prototype.canStart=function(){return this.isEnabled},Mr.prototype.doStart=function(){},Mr.prototype.doActivate=function(){this.isActive=!0},Mr.prototype.doDeactivate=function(){this.isActive=!1},Mr.prototype.doStop=function(){},Mr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Mr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Mr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Mr.prototype.doMouseMove=function(){},Mr.prototype.doMouseUp=function(){this.stopTool()},Mr.prototype.doMouseWheel=function(){},Mr.prototype.canStartMultiTouch=function(){return!0},Mr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Lt.allocAt(NaN,NaN)),b=y.So(1,Lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,z=b.y-x.y;a.Jw=Math.sqrt(E*E+z*z),y.bubbles=!1}Lt.free(x),Lt.free(b)},Mr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Lt.allocAt(NaN,NaN)),b=y.So(1,Lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,z=b.y-x.y;z=Math.sqrt(E*E+z*z)/a.Jw,E=new Lt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var nt=a.zoomPoint;a.zoomPoint=E,tt.resetZoom(z),a.zoomPoint=nt}y.bubbles=!1}Lt.free(x),Lt.free(b)},Mr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Mr.prototype.doKeyUp=function(){},Mr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Mr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Mr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if($i?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||($i?y.meta:y.control)||y.shift||a.clearSelection()}},Mr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,Am(a,b,x),b.handled};function Am(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Mr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var nt=z.mouseLeave;if(nt!==null&&(b===z||b!==null&&b.rg(z)||(nt(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;b!==null&&(tt=b.mouseEnter,!(tt!==null&&(z===b||z!==null&&z.rg(b)||(tt(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=b;z!==null&&(b=z.mouseOver,!(b!==null&&(b(y,z),E=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Mr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Mr.prototype.doCurrentObjectChanged=function(){},Mr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===Jc&&!y.shift||E===pc&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===Jc&&y.shift||E===pc&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var nt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(nt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(nt,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:nt="pixel";break;case 1:nt="line";break;case 2:nt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(nt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(nt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},Mr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Mr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Ti(function(){x.doWaitAfter(b)},a)},Mr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Jn.clearTimeout(this.Zr),this.Zr=-1},Mr.prototype.doWaitAfter=function(){},Mr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Pr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Mr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},$n.Object.defineProperties(Mr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Ge&&(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}}}),Mr.prototype.startTransaction=Mr.prototype.Ea,Mr.className="Tool";function io(){Mr.call(this),this.name="ToolManager",this.hb=new $e,this.ob=new $e,this.Hb=new $e,this.F=this.V=850,this.o=new kn(2,2).ja(),this.Ha=5e3,this.ia=pc,this.u=Zd,this.Mp=this.j=null,this.zj=-1}Xn(io,Mr),io.prototype.initializeStandardTools=function(){},io.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Pr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},io.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Su&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Th){y.bubbles=!0;return}if(this.gestureBehavior===Su)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===pc?this.mouseWheelBehavior=Jc:this.mouseWheelBehavior===Jc&&(this.mouseWheelBehavior=pc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},io.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Th){y.bubbles=!0;return}if(this.gestureBehavior===Su)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Fm(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Fm(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}io.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Pr&&(y===a||y.rg(a))||this.hideToolTip()},io.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()))},io.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)},io.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 Pr)||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()},io.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Pr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Za&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Jn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Ti(function(){E.hideToolTip()},a)}},io.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},io.prototype.hideToolTip=function(){this.zj!==-1&&(Jn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Pr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Za&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},io.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},io.prototype.doMouseWheel=function(){this.standardMouseWheel()},io.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},io.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},io.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},io.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},io.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)},$n.Object.defineProperties(io.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 Pr?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}}}),io.prototype.replaceStandardTool=io.prototype.gb;var pc=new yn(io,"WheelScroll",0),Jc=new yn(io,"WheelZoom",1),tp=new yn(io,"WheelNone",2),Zd=new yn(io,"GestureZoom",3),Su=new yn(io,"GestureCancel",4),Th=new yn(io,"GestureNone",5);io.className="ToolManager",io.WheelScroll=pc,io.WheelZoom=Jc,io.WheelNone=tp,io.GestureZoom=Zd,io.GestureCancel=Su,io.GestureNone=Th;function po(){Mr.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 Lt(NaN,NaN),this.Fr=new Lt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new pn().freeze(),this.ia=new rt,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var nu;Xn(po,Mr),po.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},po.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},po.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,($i?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},po.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),ss=null,this.isActive=!0,this.tl.set(a.position),Wd(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&&Qs(a),sf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ss=this,_u=this.diagram,this.doSimulatedDragOut()))};function Wd(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof ei?(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 Ol,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}po.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},po.prototype.Pd=function(a){return a===void 0?new Tu(ur):this.isGridSnapEnabled?new Tu(new Lt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Tu(a.copy())},po.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),kh(this),Hh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<nu.count){for(var y=nu,x=y.length,b=0;b<x;b++){var E=y.M(b);Zu(E),ma(E),kh(E),E.diagram.ug()}y.clear()}Zu(this),this.tl.h(NaN,NaN),_u!==null&&(_u.currentCursor=""),ss=_u=null,ma(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),hd(a,!0)},po.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function kh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,np(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function ep(){var a=ss;ma(a),Wu(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}po.prototype.doCancel=function(){ma(this),Wu(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},po.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},po.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function bu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Wu(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new ai,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var z=y.I(E);z!==null&&(z.location=E.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof ei&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Wd(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ma(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 ei&&(x.value.point=new Lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Zu(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 Ha(a,y,x){var b=a.diagram,E=a.startPoint,z=Lt.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),Lt.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Qs(b),b.hk())}po.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&$h(b,a,y,this.dragOptions,x)};function Wu(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof ei&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),ch(b,-E.x,-E.y)}y.bd()}}function Vd(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Vu(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=np(a,E,b),!a.isActive&&ss===null)return;var nt=b!==null?b.part:null;if(nt===null||x.handlesDragDropForTopLevelParts&&nt.isTopLevel&&!(nt instanceof rr)){var it=x.mouseDragOver;it!==null&&(it(E),tt=!0)}if(!a.isActive&&ss===null||(a.doDragOver(y,b),!a.isActive&&ss===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}po.prototype.findDragOverObject=function(a){var y=this;return ou(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Pr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},po.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 np(a,y,x){var b=!1,E=a.Cg.length,z=0<E?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<E;tt++){var nt=a.Cg[tt],it=nt.mouseDragLeave;if(it!==null&&(it(y,nt,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ss===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=ip(E);for(E=a.Cg.length,x=0;x<E&&(tt=a.Cg[x],nt=tt.mouseDragEnter,nt===null||(nt(y,tt,z),b=!0,!y.handled));x++);return b}function ip(a){var y=a.panel;return y!==null?y:a instanceof Ai&&!(a instanceof rr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Bm(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ot){return b.findValidLinkablePort(ot,x)});a=Lt.alloc();var z=1/0,tt=null;for(E=E.iterator;E.next();){var nt=E.value;if(nt.part!==null){var it=nt.ga(cr,a);it=y.Bf(it),it<z&&(tt=nt,z=it)}}return Lt.free(a),tt}function Vu(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var z=null,tt=null;x.fromNode===null&&(z=Bm(a,x.i(0),!1),z!==null&&(tt=z.part));var nt=null,it=null;x.toNode===null&&(nt=Bm(a,x.i(x.pointsCount-1),!0),nt!==null&&(it=nt.part)),E.isValidLink(tt,z,it,nt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=it,nt!==null&&(x.toPortId=nt.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Kd(E,tt,z,it,nt):Kd(E,null,null,null,null)}}}}po.prototype.doDragOver=function(){};function Ku(a,y){var x=a.diagram;a.dragsLink&&Vu(a,!0),kh(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(E,z),E.handled))break;Jv(a,E,z),z=ip(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||ss!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof hi&&z.linksConnected.each(function(nt){nt.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ss!==null){for(a=un.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof hi&&Qv(x,b,a);un.free(a)}}}function Jv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof rr||(x=a.mouseDrop,x!==null&&x(y))}function Qv(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof ei},!0,function(E){return E instanceof ei},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}po.prototype.doDropOnto=function(){},po.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()?(bu(this,!1),sf(a,this.copiedParts),Ha(this,this.copiedParts,!1),Hh(a,this.copiedParts)):this.mayMove()?(ma(this),Ha(this,this.draggedParts,!0)):this.mayDragOut()?(bu(this,!1),Ha(this,this.copiedParts,!1)):ma(this),Vd(this,a.lastInput.documentPoint))}},po.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?(ma(this),bu(this,!0),sf(a,this.copiedParts),Ha(this,this.copiedParts,!1),Hh(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,ma(this),this.mayMove()&&(Ha(this,this.draggedParts,!0),Vd(this,a.lastInput.documentPoint))),this.Ym=!0,Ku(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qv(this),a.Ya(),Hh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},po.prototype.simulatedMouseMove=function(a,y,x){if(ss===null)return!1;var b=ss.diagram;x instanceof Ge||(x=null);var E=_u;return x!==E&&(E!==null&&E!==b&&(E.ug(),ss.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),_u=x,x!==null&&x!==b&&(ep(),E=x.toolManager.findTool("Dragging"),E!==null&&(nu.contains(E)||nu.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},po.prototype.simulatedMouseUp=function(a,y,x){if(ss===null)return!1;var b=_u,E=ss.diagram;if(x===null)return ss.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),ss.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;_u=x,b=x.toolManager.findTool("Dragging"),b!==null&&(ep(),nu.contains(b)||nu.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Lt),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=ss,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function qv(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof hi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}po.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||($i?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},po.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())},po.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())},po.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},po.prototype.Az=function(){return ss},po.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ss;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},po.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Zl(a),a.animationManager.Cc(),a=ss,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},po.prototype.doSimulatedDragLeave=function(){var a=ss;a!==null&&a.doSimulatedDragOut(),this.doCancel()},po.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ss;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rm(this,y.draggedParts.Lf(),!1,a.firstInput),Ha(this,this.copiedParts,!1),Vd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},po.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ss;if(y!==null){var x=y.diagram;if(y.Ym=!0,ma(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rm(this,y.draggedParts.Lf(),!0,a.lastInput),Ha(this,this.copiedParts,!1);var b=new pn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Ku(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rm(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var z=un.alloc();E=b=1/0;for(var tt=-1/0,nt=-1/0,it=y.iterator;it.next();){var ot=it.value;if(ot.isVisible()){var st=ot.location;ot=st.x,st=st.y,isNaN(ot)||isNaN(st)||(ot<b&&(b=ot),st<E&&(E=st),ot>tt&&(tt=ot),st>nt&&(nt=st))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,tt-b,nt-E),b=z.x+z.width/2,E=z.y+z.height/2,un.free(z),z=a.Fr,tt=new ai,nt=Lt.alloc(),it=y.iterator;it.next();)ot=it.value,ot instanceof ei&&ot.canCopy()&&(st=x.I(ot),st!==null&&(st.points=ot.points,ch(st,z.x-b,z.y-E),st.suspendsRouting=!0,tt.add(st,a.Pd())));for(y=y.iterator;y.next();)ot=y.value,ot.Zc()&&ot.canCopy()&&(it=x.I(ot),it!==null&&(ot=ot.location,nt.h(z.x-(b-ot.x),z.y-(E-ot.y)),it.location=nt,it.Va(),tt.add(it,a.Pd(nt))));Lt.free(nt),a.copiedParts=tt,Wd(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}po.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},po.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Lt},$n.Object.defineProperties(po.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}}}),po.prototype.getDraggingSource=po.prototype.Az;var ss=null,_u=null;po.className="DraggingTool",nu=new $e,li("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),io.prototype.doCancel=function(){ss!==null&&ss.doCancel(),Mr.prototype.doCancel.call(this)};function wo(){Mr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new ei,y=new ar;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new ar,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new hi,y=new ar,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=br,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new hi,y=new ar,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=br,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new ai,this.Of=this.gj=this.Pf=null}Xn(wo,Mr),wo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},wo.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),tt=kn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,b.desiredSize=tt,kn.free(tt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=cr,z=Lt.alloc(),x.location=y.ga(cr,z),Lt.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},wo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=br,y.fromSpot=mr,y.toSpot=mr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},wo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},wo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof hi){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)}},wo.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof hi))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof hi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},wo.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(ht){return E.findValidLinkablePort(ht,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,nt=tt.part;if(nt instanceof hi){var it=tt.ga(cr,Lt.alloc()),ot=x.x-it.x,st=x.y-it.y;Lt.free(it),it=ot*ot+st*st,it<b&&(ot=this.validPortsCache.I(tt),ot!==null?ot&&(y=tt,b=it):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,nt,tt)||!a&&this.isValidLink(nt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,b=it):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof hi&&(x.layer===null||x.layer.allowLink))?y:null},wo.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},wo.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},wo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},wo.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof hi))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof hi))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},wo.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},wo.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new pn;return b.add(a),Ns(this,x,y,b)};function Ns(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Ns(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Ns(a,y.labeledLink,x,b))))}wo.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==md){if(b===Ap){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Fs(this,a,y,x,!0)}if(b===Fp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Fs(this,a,y,x,!0)}if(b===Lp)return a===y?a=!0:(b=new pn,b.add(y),a=Bs(this,b,a,y,x)),!a;if(b===Dp)return!Fs(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new pn,b.add(y),a=mc(this,b,a,y,x)),!a}return!0};function Fs(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==b&&(!E||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Fs(a,tt,x,b,E)))return!0}return!1}function Bs(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Bs(a,y,tt,b,E)))return!0}return!1}function mc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E){var nt=tt.fromNode;if(tt=tt.toNode,nt=nt===x?tt:nt,nt!==x&&mc(a,y,nt,b,E))return!0}}return!1}$n.Object.defineProperties(wo.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}}}),wo.className="LinkingBaseTool";function Rs(){wo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Oh,this.Xd=null}Xn(Rs,wo),Rs.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},Rs.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 hi)))return null;var x=this.direction;if(x===Oh||x===jm){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Oh||x===zm)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Rs.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 hi&&(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 hi&&(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)},Rs.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()},Rs.prototype.doStop=function(){wo.prototype.doStop.call(this),this.startObject=null},Rs.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var nt=tt.part;nt instanceof hi&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=nt,E=tt):(y=nt,x=tt,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(z=this.insertLink(y,x,b,E),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Rs.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof ei)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)},Rs.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Rs.prototype.doNoLink=function(){},$n.Object.defineProperties(Rs.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 Oh=new yn(Rs,"Either",0),jm=new yn(Rs,"ForwardsOnly",0),zm=new yn(Rs,"BackwardsOnly",0);Rs.className="LinkingTool",Rs.Either=Oh,Rs.ForwardsOnly=jm,Rs.BackwardsOnly=zm;function Ol(){wo.call(this),this.name="Relinking";var a=new ar;a.figure="Diamond",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new ar,a.figure="Diamond",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new un}Xn(Ol,wo),Ol.prototype.updateAdornments=function(a){if(a!==null&&a instanceof ei){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Ol.prototype.makeAdornment=function(a,y){var x=new Pr;return x.type=Un.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Ol.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},Ol.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 Pr&&x.adornedPart instanceof ei))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=ji),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ji),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Ol.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Of||x===dh)&&(x=Vs),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}},Ol.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()},Ol.prototype.doStop=function(){wo.prototype.doStop.call(this),this.handle=null},Ol.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof hi&&(this.isForwards?(b=tt,E=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Ol.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Ol.prototype.doNoRelink=function(){};function Kd(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}$n.Object.defineProperties(Ol.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 Pr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Ol.className="RelinkingTool",li("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),li("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function To(){Mr.call(this),this.name="LinkReshaping";var a=new ar;a.figure="Rectangle",a.desiredSize=Dr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new ar,a.figure="Diamond",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Lt,this.Yq=new $e}Xn(To,Mr),To.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:rp},To.prototype.om=function(a,y){a.reshapingBehavior=y},To.prototype.updateAdornments=function(a){if(a!==null&&a instanceof ei){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)}},To.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Pr,E.type=Un.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=b?1:0;if(y.resegmentable&&y.computeCurve()!==Fl)for(var nt=x+tt;nt<z-tt;nt++){var it=this.makeResegmentHandle(a,nt);it!==null&&(it.segmentIndex=nt,it.segmentFraction=.5,it.fromMaxLinks=999,E.add(it))}for(tt=x+1;tt<z;tt++)if(nt=this.makeHandle(a,tt),nt!==null){if(nt.segmentIndex=tt,tt!==x)if(tt===x+1&&b){it=y.i(x);var ot=y.i(x+1);ge.B(it.x,ot.x)&&ge.B(it.y,ot.y)&&(ot=y.i(x-1)),ge.B(it.x,ot.x)?(this.om(nt,Yu),nt.cursor="n-resize"):ge.B(it.y,ot.y)&&(this.om(nt,Uu),nt.cursor="w-resize")}else tt===z-1&&b?(it=y.i(z-1),ot=y.i(z),ge.B(it.x,ot.x)&&ge.B(it.y,ot.y)&&(it=y.i(z+1)),ge.B(it.x,ot.x)?(this.om(nt,Yu),nt.cursor="n-resize"):ge.B(it.y,ot.y)&&(this.om(nt,Uu),nt.cursor="w-resize")):tt!==z&&(this.om(nt,_d),nt.cursor="move");E.add(nt)}E.adornedObject=a}return E},To.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},To.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},To.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},To.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 ei){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},To.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},To.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},To.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},To.prototype.getResegmentingPoint=function(){return this.handle.ga(cr)},To.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},To.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Gu(this,tt,b,E,z,!0)||Gu(this,tt,b,E,z,!1))){var nt=y.points.copy();Gu(this,tt,b,E,z,!0)?(nt.cd(x-2,new Lt(tt.x,(z.y+tt.y)/2)),nt.cd(x+1,new Lt(z.x,(z.y+tt.y)/2))):(nt.cd(x-2,new Lt((z.x+tt.x)/2,tt.y)),nt.cd(x+1,new Lt((z.x+tt.x)/2,z.y))),nt.mb(x),nt.mb(x-1),y.points=nt,y.Wb()}else tt=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(Gu(this,b,E,z,tt,!0)||Gu(this,b,E,z,tt,!1))&&(nt=y.points.copy(),Gu(this,b,E,z,tt,!0)?(nt.cd(x-1,new Lt(b.x,(b.y+tt.y)/2)),nt.cd(x+2,new Lt(tt.x,(b.y+tt.y)/2))):(nt.cd(x-1,new Lt((b.x+tt.x)/2,b.y)),nt.cd(x+2,new Lt((b.x+tt.x)/2,tt.y))),nt.mb(x+1),nt.mb(x),y.points=nt,y.Wb())}}else tt=Lt.alloc(),ge.qh(b.x,b.y,z.x,z.y,E.x,E.y,tt)&&tt.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Lt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Gu(a,y,x,b,E,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}To.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Yu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Uu&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Yu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Uu&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),z=y.i(b-1),tt=y.i(b+1);ge.B(z.x,E.x)&&ge.B(E.y,tt.y)?(ge.B(z.x,y.i(b-2).x)&&!ge.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),ge.B(tt.y,y.i(b+2).y)&&!ge.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.x,a.y)):ge.B(z.y,E.y)&&ge.B(E.x,tt.x)?(ge.B(z.y,y.i(b-2).y)&&!ge.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),ge.B(tt.x,y.i(b+2).x)&&!ge.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):ge.B(z.x,E.x)&&ge.B(E.x,tt.x)?(ge.B(z.x,y.i(b-2).x)&&!ge.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),ge.B(tt.x,y.i(b+2).x)&&!ge.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):ge.B(z.y,E.y)&&ge.B(E.y,tt.y)&&(ge.B(z.y,y.i(b-2).y)&&!ge.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),ge.B(tt.y,y.i(b+2).y)&&!ge.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(z=E.ga(cr,Lt.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,Lt.alloc()),y.L(0,b.x,b.y),Lt.free(z),Lt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(cr,Lt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Lt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Lt.free(x),Lt.free(a));y.zf()},To.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case _d:return a;case Yu:return new Lt(y.i(x).x,a.y);case Uu:return new Lt(a.x,y.i(x).y);default:case rp:return y.i(x)}},$n.Object.defineProperties(To.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 Pr))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}}}),To.prototype.setReshapingBehavior=To.prototype.om,To.prototype.getReshapingBehavior=To.prototype.Ru;var rp=new yn(To,"None",0),Uu=new yn(To,"Horizontal",1),Yu=new yn(To,"Vertical",2),_d=new yn(To,"All",3);To.className="LinkReshapingTool",To.None=rp,To.Horizontal=Uu,To.Vertical=Yu,To.All=_d,li("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function xs(){Mr.call(this),this.name="Resizing",this.o=new kn(1,1).freeze(),this.j=new kn(9999,9999).freeze(),this.yg=new kn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new ar;a.alignmentFocus=cr,a.figure="Rectangle",a.desiredSize=Dr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Lt,this.Dw=new kn,this.Tn=new Lt,this.rt=new kn(0,0),this.qt=new kn(1/0,1/0),this.pt=new kn(1,1)}Xn(xs,Mr),xs.prototype.updateAdornments=function(a){if(!(a===null||a instanceof ei)){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(),Gh(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},xs.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Pr,y.type=Un.Spot,y.locationSpot=cr;var x=new Ws;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,gr)),y.add(this.makeHandle(a,zr)),y.add(this.makeHandle(a,Eo)),y.add(this.makeHandle(a,hs)),y.add(this.makeHandle(a,vo)),y.add(this.makeHandle(a,Wo)),y.add(this.makeHandle(a,ts)),y.add(this.makeHandle(a,Zo))}else if(sa(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},xs.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},xs.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=cr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Un)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},xs.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},xs.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))},xs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},xs.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},xs.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},xs.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Lt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),Lt.free(E)}},xs.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Lt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),Lt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},xs.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 rr){var b=new $e;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new rt;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},xs.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=cr);var tt=this.adornedObject.naturalBounds,nt=tt.x,it=tt.y,ot=tt.x+tt.width,st=tt.y+tt.height,ht=1;if(!z){ht=tt.width;var ft=tt.height;0>=ht&&(ht=1),0>=ft&&(ft=1),ht=ft/ht}return ft=Lt.alloc(),ge.No(a.x,a.y,nt,it,E.width,E.height,ft),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(ft.x,ot-b.width),a.x=Math.min(a.x,ot-x.width),a.width=Math.max(ot-a.x,x.width),a.y=Math.max(ft.y,st-b.height),a.y=Math.min(a.y,st-x.height),a.height=Math.max(st-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht):(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width),a.x=ot-a.width,a.y=st-a.height)):1<=y.y?(a.x=Math.max(ft.x,ot-b.width),a.x=Math.min(a.x,ot-x.width),a.width=Math.max(ot-a.x,x.width),a.height=Math.max(Math.min(ft.y-it,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht):(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width),a.x=ot-a.width)):(a.x=Math.max(ft.x,ot-b.width),a.x=Math.min(a.x,ot-x.width),a.width=ot-a.x,z||(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht,a.y=it+.5*(st-it-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ft.x-nt,b.width),x.width),a.y=Math.max(ft.y,st-b.height),a.y=Math.min(a.y,st-x.height),a.height=Math.max(st-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht):(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width),a.y=st-a.height)):1<=y.y?(a.width=Math.max(Math.min(ft.x-nt,b.width),x.width),a.height=Math.max(Math.min(ft.y-it,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht):(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width))):(a.width=Math.max(Math.min(ft.x-nt,b.width),x.width),z||(a.height=Math.max(Math.min(ht*a.width,b.height),x.height),a.width=a.height/ht,a.y=it+.5*(st-it-a.height))):0>=y.y?(a.y=Math.max(ft.y,st-b.height),a.y=Math.min(a.y,st-x.height),a.height=st-a.y,z||(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width,a.x=nt+.5*(ot-nt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ft.y-it,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/ht,b.width),x.width),a.height=ht*a.width,a.x=nt+.5*(ot-nt-a.width))),Lt.free(ft),a},xs.prototype.computeReshape=function(){var a=zn;return this.adornedObject instanceof ar&&(a=M0(this.adornedObject)),!(a===Pi||this.diagram.lastInput.shift)},xs.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},xs.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},xs.prototype.computeCellSize=function(){var a=new kn(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},$n.Object.defineProperties(xs.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 Pr))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 Pr)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}}}),xs.className="ResizingTool",li("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function js(){Mr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Lt,this.ue=null;var a=new ar;a.figure="Ellipse",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Lt(NaN,NaN),this.u=0,this.F=50}Xn(js,Mr),js.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)}},js.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Pr,y.type=Un.Position,y.locationSpot=cr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(sa(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},js.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},js.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)},js.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(cr)},js.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},js.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Lt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},js.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},js.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},js.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},js.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()},js.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},js.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},$n.Object.defineProperties(js.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 Pr))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 Pr)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}}}),js.className="RotatingTool",li("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Lh(){Mr.call(this),this.name="ClickSelecting"}Xn(Lh,Mr),Lh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Lh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Lh.className="ClickSelectingTool";function ea(){Mr.call(this),this.name="Action",this.pk=null}Xn(ea,Mr),ea.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ea.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()},ea.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))}},ea.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()},ea.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())},ea.prototype.doStop=function(){this.pk=null},ea.className="ActionTool";function Xu(){Mr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Lt(0,0)}Xn(Xu,Mr),Xu.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)},Xu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Xu.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Ai)x.Zc()&&(sa(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);ae(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=Lt.allocAt(a.x,a.y);this.isGridSnapEnabled&&of(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Lt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},$n.Object.defineProperties(Xu.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}}}),Xu.className="ClickCreatingTool";function $l(){Mr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ai;a.layerName="Tool",a.selectable=!1;var y=new ar;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Xn($l,Mr),$l.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))},$l.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},$l.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},$l.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=kn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),kn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},$l.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()},$l.prototype.computeBoxBounds=function(){var a=this.diagram;return new un(a.firstInput.documentPoint,a.lastInput.documentPoint)},$l.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),$i?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new $e,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},$n.Object.defineProperties($l.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}}}),$l.className="DragSelectingTool";function fs(){Mr.call(this),this.name="Panning",this.Xt=new Lt,this.xy=new Lt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Jn.document,"scroll",a.Kw,!1),a.stopTool()}}Xn(fs,Mr),fs.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())},fs.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Jn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},fs.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},fs.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},fs.prototype.doMouseMove=function(){this.move()},fs.prototype.doMouseUp=function(){this.move(),this.stopTool()},fs.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},$n.Object.defineProperties(fs.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),fs.className="PanningTool",li("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),li("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),li("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),li("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),li("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Za(){this.F=this.u=this.j=this.o=null}$n.Object.defineProperties(Za.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}}}),Za.className="HTMLInfo";function na(a,y,x){this.text=a,this.hx=y,this.visible=x}na.className="ContextMenuButtonInfo";function zs(){Mr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Lt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Xn(zs,Mr);function ga(a){var y=new Za;y.show=function(E,z,tt){tt.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},Dh=y,a.tu=function(){a.stopTool()},y=Ci("div");var x=Ci("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Ci("style");Jn.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",ko,!1),b.addEventListener(y,"selectstart",ko,!1),b.addEventListener(x,"contextmenu",ko,!1)),y.className="goCXforeground",x.className="goCXbackground",Jn.document.body&&(Jn.document.body.appendChild(y),Jn.document.body.appendChild(x)),qc=y,gc=x,Qc=!0}function ko(a){return a.preventDefault(),!1}zs.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)},zs.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},zs.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},zs.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Ge||(a instanceof pe?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},zs.prototype.doActivate=function(){},zs.prototype.doMouseDown=function(){if(Mr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Pr){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)},zs.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Pr){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 b=null;x instanceof Za||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Eu(a,!0),a.isActive||a.stopTool())}zs.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Eu(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=Dh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof pe?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Pr&&!a.currentContextMenu.visible&&a.stopTool()}}zs.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},zs.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Pr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Za&&a.show(y,x,this);this.currentContextMenu=a},zs.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},zs.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Pr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Za&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ju(a){var y=new $e;return y.add(new na("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new na("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new na("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new na("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new na("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new na("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new na("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new na("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new na("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new na("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new na("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new na("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new na("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}zs.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ju(this)),qc.innerHTML="",gc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Ci("ul");x.className="goCXul",qc.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,z=E.visible;if(typeof E.hx=="function"&&(typeof z!="function"||z(a))){z=Ci("li"),z.className="goCXli";var tt=Ci("a");tt.className="goCXa",tt.href="#",tt.ky=E.hx,tt.addEventListener("pointerdown",function(nt){return this.ky(a),y.stopTool(),nt.preventDefault(),!1},!1),tt.textContent=E.text,z.appendChild(tt),x.appendChild(z)}}qc.style.display="block",gc.style.display="block"},zs.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Dh){qc.style.display="none",gc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(gc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},$n.Object.defineProperties(zs.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Pr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&Dh===null&&yo&&ga(this),Dh},set:function(a){a===null&&(Qc=!0),Dh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Dh=null,Qc=!1,gc=null,qc=null;zs.className="ContextMenuTool",li("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Qr(){Mr.call(this),this.name="TextEditing",this.Zh=new Zr,this.ia=null,this.V=vc,this.vj=null,this.qa=yc,this.u=1,this.F=!0,this.o=null,this.j=new Za,this.kt=null,td(this,this.j)}Xn(Qr,Mr);function td(a,y){if(yo){var x=Ci("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(ed)):E==="Tab"?(a.acceptText(Ud),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==yc){var b=a.kt;a.qa===nd&&(a.qa=id),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==yc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,z){if(b instanceof Zr&&z instanceof Qr)if(z.state===rd)x.style.border="3px solid red",x.focus();else{var tt=b.ga(cr),nt=E.position,it=E.scale,ot=b.Df()*it;ot<z.minimumEditorScale&&(ot=z.minimumEditorScale);var st=b.naturalBounds.width*ot+6,ht=b.naturalBounds.height*ot+2,ft=(tt.x-nt.x)*it;tt=(tt.y-nt.y)*it,nt=b.verticalAlignment,it=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ot,ht=nt.y*ht-nt.y*it+nt.offsetY-(.5*ht-.5*it)-it/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ot+"%",x.style.lineHeight="normal",x.style.width=st+"px",x.style.left=(ft-st/2|0)-1+"px",x.style.top=(tt+ht|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=ot,x.className="goTXarea",E.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Qr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Qu&&Qu!==this&&(Qu.acceptText(Wa),Qu&&Qu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Zr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===vc&&!y.isSelected||this.starting===Yd&&2>a.lastInput.clickCount)):!1},Qr.prototype.doStart=function(){Qu=this,this.textBlock!==null&&this.doActivate()},Qr.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 Zr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=nd;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new un(this.textBlock.ga(gr),this.textBlock.ga(Eo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Qr.prototype.doCancel=function(){this.stopTool()},Qr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Qr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Wa)},Qr.prototype.acceptText=function(a){switch(a){case Wa:this.qa===xc?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===nd||this.qa===rd||this.qa===id)&&(this.qa=sp,op(this));break;case Gd:case ed:case Ud:(ed!==a||this.textBlock.isMultiline!==!0)&&(this.qa===nd||this.qa===rd||this.qa===id)&&(this.qa=sp,op(this))}};function op(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=xc,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=rd,a.doError(E,z))}}Qr.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)},Qr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Qr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=yc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Qr.prototype.doStop=function(){Qu=null},Qr.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Qr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},$n.Object.defineProperties(Qr.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)}}}),Qr.prototype.measureTemporaryTextBlock=Qr.prototype.Lx;var Gd=new yn(Qr,"LostFocus",0),Wa=new yn(Qr,"MouseDown",1),Ud=new yn(Qr,"Tab",2),ed=new yn(Qr,"Enter",3),t0=new yn(Qr,"SingleClick",0),vc=new yn(Qr,"SingleClickSelected",1),Yd=new yn(Qr,"DoubleClick",2),yc=new yn(Qr,"StateNone",0),nd=new yn(Qr,"StateActive",1),id=new yn(Qr,"StateEditing",2),sp=new yn(Qr,"StateValidating",3),rd=new yn(Qr,"StateInvalid",4),xc=new yn(Qr,"StateValidated",5),Qu=null;Qr.className="TextEditingTool",Qr.LostFocus=Gd,Qr.MouseDown=Wa,Qr.Tab=Ud,Qr.Enter=ed,Qr.SingleClick=t0,Qr.SingleClickSelected=vc,Qr.DoubleClick=Yd,Qr.StateNone=yc,Qr.StateActive=nd,Qr.StateEditing=id,Qr.StateValidating=sp,Qr.StateInvalid=rd,Qr.StateValidated=xc,li("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function yl(a){sd||(lp(),sd=!0),this.H=ru,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Pu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new pn,this.ce=new ps,this.ce.Yd=this,this.Ei=new pn,this.pu=new pn,this.Sr=new pn,this.pr=new pn,a&&Object.assign(this,a)}yl.prototype.Xe=function(a){this.H=a},yl.prototype.canStart=function(){return!0};function iu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ms(a.H),a.zb=!0)}function Xd(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===Pu?(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===ap&&y.vc.clear(),a.Qw=!!(a.Pk===ld&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),ad(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ts&&b!==null&&(delete b.start.scale,delete b.end.scale),Jn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Qs(x),fp(x),a.zb=!1,y.start(),y.bc&&(qu(a),x.Ya(),up(y,0),Zl(x,!0),Ih(a),x.R("AnimationStarting",a)))}))}}function Mu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Jd(a,y,x,b){a.isTicking||Mu(a)||y instanceof ei&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}yt=yl.prototype,yt.fv=function(a){return this.ce.fv(a)},yt.Xu=function(a){return this.ce.Xu(a)};function Qd(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var z=E.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var nt=!0;else{for(nt=tt.vc.iterator;nt.next();){var it=nt.key;if(it instanceof pe&&it.diagram!==null||it instanceof Ge){nt=!0;break t}}nt=!1}nt?ud(tt,!1):tt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(qu(E),Zl(E.H),Ih(E)),Jn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Jn.requestAnimationFrame(function(){x()}))}function $m(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function qu(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 Ih(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}yt.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(),ad(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),ad(y,this.H)},yt.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))},yt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ll(this,a))},yt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),th(this.ce,y,"position",y.position,y.position),ll(this,a))};function Hm(a,y,x){!a.zb||y.D(x)||Mu(a)||(a.H.pi||(y=x.copy()),th(a.ce,a.H,"position",y,x))}function qd(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ll(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Ah(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],nt=a[2];a=a[3];var it=y[0],ot=y[1],st=y[2];return y=y[3],nt===0||nt===100?(z=it,tt=ot):(st===0||st===100)&&(it=z,ot=tt),180<Math.abs(it-z)&&(it>z?z+=360:it+=360),z=E(x,z,it-z,b)%360,tt=E(x,tt,ot-tt,b),nt=E(x,nt,st-nt,b),x=E(x,a,y-a,b),"hsla("+z+", "+tt+"%, "+nt+"%, "+x+")"}function lp(){function a(x,b,E,z,tt,nt){x.position=new Lt(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt))}var y=new ai;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,tt,nt){tt<nt?x.mm(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt),!1):x.position=new Lt(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt))}),y.add("location",function(x,b,E,z,tt,nt){tt<nt?x.mm(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt),!0):x.location=new Lt(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt))}),y.add("position:placeholder",function(x,b,E,z,tt,nt){tt<nt?x.mm(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt),!1):x.position=new Lt(z(tt,b.x,E.x-b.x,nt),z(tt,b.y,E.y-b.y,nt))}),y.add("position:nodeCollapse",function(x,b,E,z,tt,nt){var it=x.actualBounds,ot=E.actualBounds;E=ot.x+ot.width/2-it.width/2,it=ot.y+ot.height/2-it.height/2,tt<nt?x.mm(z(tt,b.x,E-b.x,nt),z(tt,b.y,it-b.y,nt),!1):x.position=new Lt(z(tt,b.x,E-b.x,nt),z(tt,b.y,it-b.y,nt))}),y.add("desiredSize",function(x,b,E,z,tt,nt){x.desiredSize=new un(z(tt,b.width,E.width-b.width,nt),z(tt,b.height,E.height-b.height,nt))}),y.add("width",function(x,b,E,z,tt,nt){x.width=z(tt,b,E-b,nt)}),y.add("height",function(x,b,E,z,tt,nt){x.height=z(tt,b,E-b,nt)}),y.add("fill",function(x,b,E,z,tt,nt){x.fill=Ah(b,E,tt,nt,z)}),y.add("stroke",function(x,b,E,z,tt,nt){x.stroke=Ah(b,E,tt,nt,z)}),y.add("strokeWidth",function(x,b,E,z,tt,nt){x.strokeWidth=z(tt,b,E-b,nt)}),y.add("strokeDashOffset",function(x,b,E,z,tt,nt){x.strokeDashOffset=z(tt,b,E-b,nt)}),y.add("background",function(x,b,E,z,tt,nt){x.background=Ah(b,E,tt,nt,z)}),y.add("areaBackground",function(x,b,E,z,tt,nt){x.areaBackground=Ah(b,E,tt,nt,z)}),y.add("opacity",function(x,b,E,z,tt,nt){x.opacity=z(tt,b,E-b,nt)}),y.add("scale",function(x,b,E,z,tt,nt){x.scale=z(tt,b,E-b,nt)}),y.add("angle",function(x,b,E,z,tt,nt){x.angle=z(tt,b,E-b,nt)}),od=y}$n.Object.defineProperties(yl.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&&qt(a,">= 1",yl,"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}}}),yl.prototype.stopAnimation=yl.prototype.Cc;var od=null,sd=!1,Pu=new yn(yl,"Default",1),ld=new yn(yl,"AnimateLocations",2),ap=new yn(yl,"None",3);yl.className="AnimationManager",yl.defineAnimationEffect=function(a,y){sd||(lp(),sd=!0),od.add(a,y)},yl.Default=Pu,yl.AnimateLocations=ld,yl.None=ap;function ps(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=wc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=ur,this.vc=new ai,this.Tt=new ai,this.yl=new pn,this.Ut=new pn,this.dw=ih,a&&Object.assign(this,a)}ps.prototype.suspend=function(){this.Xk=!0},ps.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,ud(this,!0),qu(this.Yd),Zl(this.H),Ih(this.Yd),this.H.redraw()};function ad(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}yt=ps.prototype,yt.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 Ge?a=x:x instanceof pe&&(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===Pu&&this===y.defaultAnimation&&(this.Lp=Zm,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=gd),qu(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ih(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qd(y,this),this)},yt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},yt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Ge?this.H=a:a instanceof pe&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ai){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return th(this,a,y,x,b,E),this};function th(a,y,x,b,E,z){var tt=a.vc;if(y instanceof Ge&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Ou(b),l0(),b=[Al.j,Al.u,Al.o,Al.F],Ou(E),l0(),E=[Al.j,Al.u,Al.o,Al.F]),tt.contains(y)){var nt=tt.I(y),it=nt.start,ot=nt.end;it[x]===void 0&&(it[x]=Fh(b)),ot[x]=Fh(E)}else it={},ot={},it[x]=Fh(b),ot[x]=Fh(E),nt=it.position,y instanceof pe&&nt instanceof Lt&&!nt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&nt.assign(ot.position),nt=new Bh(it,ot,z),tt.add(y,nt);tt=it[x],tt instanceof Lt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Ai?nt.Ku.location=Fh(y.location):z&&(nt.Ku[x]=Fh(b))}function Fh(a){return a instanceof Lt||a instanceof kn?a.copy():a}yt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},yt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function ud(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),qu(x),up(a,E),Zl(a.H,!0),Ih(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function up(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof pe&&z.diagram===null)){var tt=b.value,nt=E?tt.end:tt.start;tt=E?tt.start:tt.end;var it=od,ot;for(ot in tt)ot==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||it.get(ot)===null||it.get(ot)(z,nt[ot],tt[ot],a.Lp,y,x,a)}}}yt.stop=function(){return this.bc?(this.Ml(!0),this):this},yt.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,qu(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var z=od;b.next();){var tt=b.key,nt=b.value,it=E?nt.end:nt.start,ot=E?nt.start:nt.end,st=nt.Ku,ht;for(ht in ot)if(z.get(ht)!==null){var ft=ht;!nt.Hu||ft!=="position:nodeCollapse"&&ft!=="position:placeholder"||(ft="position"),z.get(ft)(tt,it[ht],st[ht]!==void 0?st[ht]:nt.Hu?it[ht]:ot[ht],this.Lp,this.Gd,this.Gd,this)}nt.Hu&&st.location!==void 0&&tt instanceof Ai&&(tt.location=st.location),nt.nv&&tt instanceof Ai&&tt.Zb(!1)}if(y.As.clear(),hd(y,!1),y.Ya(),y.N(),Zl(y,!0),x.defaultAnimation===this){for(ht=x.pr.iterator;ht.next();)E=ht.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Zl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ih(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ad(this,null),x.Ml(this),y.$b())}},yt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof rr&&(b=y.placeholder),b!==null?(x=b.ga(gr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Lt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof rr)for(a=a.memberParts;a.next();)b=a.value,b instanceof hi&&this.Cj(b,y)},yt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof rr&&(x=y.placeholder),x!==null){var b=x.ga(gr);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof rr)for(a=a.memberParts;a.next();)b=a.value,b instanceof hi&&this.Aj(b,y)}},yt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},$n.Object.defineProperties(ps.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&qt(a,">= 1",ps,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:Rt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),ps.prototype.getTemporaryState=ps.prototype.Ez,ps.prototype.stop=ps.prototype.stop,ps.prototype.add=ps.prototype.add,ps.prototype.addTemporaryPart=ps.prototype.Iy;function wc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Zm(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}ps.className="Animation",ps.EaseLinear=function(a,y,x,b){return x*a/b+y},ps.EaseInOutQuad=wc,ps.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ps.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ps.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ps.EaseOutExpo=Zm;function Bh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Bh.className="AnimationState";function va(a,y,x){this.xd=null,this.rf=a,this.so=x||hp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Rh))}va.prototype.copy=function(){var a=new va(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 Wm(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))}$n.Object.defineProperties(va.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 hp=new yn(va,"Default",1),Rh=new yn(va,"Immediate",2),Cc=new yn(va,"Bundled",3);va.className="AnimationTrigger",va.Default=hp,va.Immediate=Rh,va.Bundled=Cc;function es(a){wi(this),this.H=null,this.Pa=new $e,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)}yt=es.prototype,yt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Es(x)}a.clear(),this.Zq.length=0},yt.Xe=function(a){this.H=a},yt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,z=0,tt=0,nt=this.Pa.iterator;nt.next();){var it=nt.value;it instanceof rr?E++:it instanceof hi?b++:it instanceof ei?z++:it instanceof Pr?tt++:x++}if(nt="",0<x&&(nt+=x+" Parts "),0<b&&(nt+=b+" Nodes "),0<E&&(nt+=E+" Groups "),0<z&&(nt+=z+" Links "),0<tt&&(nt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,nt+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&Ui(b)&&(nt+=" #"+Ui(b)),x instanceof hi?nt+=" "+Je(b):x instanceof ei&&(nt+=" "+Je(x.fromNode)+" "+Je(x.toNode));return y+" "+this.Pa.count+": "+nt},yt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=Lt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var nt=z[tt];if((b!==!0||Gh(nt)!==!1)&&nt.isVisible()&&(E.assign(a),Gn(E,nt.oe),nt=nt.ic(E,y,x),nt!==null&&(y!==null&&(nt=y(nt)),nt!==null&&(x===null||x(nt)))))return Lt.free(E),nt}return Lt.free(E),null},yt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof $e||b instanceof pn||(b=new pn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=Lt.alloc(),tt=this.Pa.s,nt=tt.length;nt--;){var it=tt[nt];if((E!==!0||Gh(it)!==!1)&&it.isVisible()){z.assign(a),Gn(z,it.oe);var ot=it;it.ji(z,y,x,b)&&(y!==null&&(ot=y(ot)),ot===null||x!==null&&!x(ot)||b.add(ot))}}return Lt.free(z),b},yt.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof $e||E instanceof pn||(E=new pn),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,nt=tt.length;nt--;){var it=tt[nt];if((z!==!0||Gh(it)!==!1)&&it.isVisible()){var ot=it;it.Cf(a,y,x,b,E)&&(y!==null&&(ot=y(ot)),ot===null||x!==null&&!x(ot)||E.add(ot))}}return E},yt.Nu=function(a,y,x,b,E,z,tt){if(this.Uh===!1)return E;for(var nt=this.Pa.s,it=nt.length;it--;){var ot=nt[it];if((tt!==!0||Gh(ot)!==!1)&&z(ot)&&ot.isVisible()){var st=ot;ot.Cf(a,y,x,b,E)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||E.add(st))}}return E},yt.og=function(a,y,x,b,E,z){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof $e||E instanceof pn)&&(z=E),E=!0),z instanceof $e||z instanceof pn||(z=new pn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var nt=Lt.alloc(),it=Lt.alloc(),ot=this.Pa.s,st=ot.length;st--;){var ht=ot[st];if((tt!==!0||Gh(ht)!==!1)&&ht.isVisible()){nt.assign(a),Gn(nt,ht.oe),it.h(a.x+y,a.y),Gn(it,ht.oe);var ft=ht;ht.og(nt,it,x,b,E,z)&&(x!==null&&(ft=x(ft)),ft===null||b!==null&&!b(ft)||z.add(ft))}}return Lt.free(nt),Lt.free(it),z},yt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Ne();for(var E=Ne(),z=0;z<b;z++){var tt=x[z];if(tt.vw=z,tt instanceof ei){if(tt.fd===!1)continue}else if(tt instanceof Pr&&tt.adornedPart!==null)continue;var nt=tt.actualBounds;tt.isVisible()&&bo(nt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&E.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],B0(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)B0(E[y]);Fe(a),Fe(E)}}};function Nu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}yt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Nu(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,nt=un.alloc(),it=0;it<b;it++)this.Oj(a,x[it],y,z,tt,nt,!0);if(un.free(nt),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Vm(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var z=E.length;if(z!==0){var tt=Nu(a,y),nt=a.Zq;nt.length=0;for(var it=x.scale,ot=un.alloc(),st=0;st<z;st++){var ht=E[st];b.contains(ht)&&a.Oj(y,ht,x,nt,it,ot,!1)}un.free(ot),y.globalAlpha=tt}}}yt.Oj=function(a,y,x,b,E,z,tt){if(tt&&!Gh(y))a.Hs(y);else{if(b!==null&&y instanceof ei&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,b=y.containingGroup;b!==null;)tt?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(tt=!0,z.assign(b.tb)),b=b.containingGroup;var nt=y.actualBounds;if(b=!1,tt&&y.isVisible()){if(!z.Yc(nt)){a.Hs(y);return}b=!z.Re(nt)}b&&(a.save(),a instanceof xl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),nt.width*E>x.Oq||nt.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(xo(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(xo(y,a,"rgba(0,0,0,0.3)",!0,!1,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),xo(y,a,y.background,!0,!1,z,E),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},yt.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(so,a,this,y,x,b,E)},yt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Es(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),tf(this,a,y),a},yt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Es(y),a};function tf(a,y,x){if(y=Km(a,y,x),x instanceof rr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,tt=0;tt<z;tt++){var nt=E[tt];if(nt===x&&(y=tt,0<=b)||0>b&&nt.containingGroup===x&&(b=tt,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&tf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Km(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var nt=y+1,it=NaN;nt<E&&(it=a.M(nt).zOrder,!!isNaN(it));)nt++;if(!isNaN(tt)&&tt>b)for(;;){if(z===-1||tt<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(it)&&it<b)for(;;){if(nt===E||it>=b){if(nt--,nt===y)break;return a.mb(y),a.Gb(nt,x),nt}for(it=NaN;++nt<E&&(it=a.M(nt).zOrder,isNaN(it)););}return y}$n.Object.defineProperties(es.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Rt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Rt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&qt(a,"0 <= value <= 1",es,"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))}}}),es.prototype.findObjectsNear=es.prototype.og,es.prototype.findObjectsIn=es.prototype.Cf,es.prototype.findObjectsAt=es.prototype.ji,es.prototype.findObjectAt=es.prototype.ic,es.className="Layer";function Ge(a,y){if(og||(Ss(),og=!0),wi(this),ru=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,yo){var x=this,b=function(){x.removeEventListener(Jn.document,"DOMContentLoaded",b,!1),x.setRTL()};Jn.document.body!==null?this.setRTL():x.addEventListener(Jn.document,"DOMContentLoaded",b,!1)}this.ol=null,df.add("Model",Br);var E=this;return this.Hb=function(z){var tt=E.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var nt=z.change;z.modelChange===""&&nt===so&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,_m(this),this.model=cy(),this.Wg=!0,Um(this),this.layout=new no,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 sg,a!==void 0&&(typeof a=="string"||Jn.Element&&a instanceof Element?dp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var jh,ru;function _m(a){a.Yd=new yl,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new $e,a.pj=new ai,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Lt(NaN,NaN).freeze(),a.du=new Lt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Lt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new er,a.zu=new Lt(NaN,NaN).freeze(),a.ut=new un(NaN,NaN,NaN,NaN).freeze(),a.rj=new Xi(0,0,0,0).freeze(),a.sj=ih,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ts,a.zk=di,a.Fg=Ts,a.pq=di,a.yt=gr,a.Bt=gr,a.Fc=!0,a.pn=!1,a.De=new pn,a.Eh=new ai,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Xi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ps,a.bq.diagram=a,a.Qg=new Ps,a.Qg.diagram=a,a.cj=new Ps,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new pn,a.Ht=!0,a.uu=rh,a.pw=!1,a.wu=md,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new ai,a.Xn=new $e,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 Xi(5).freeze(),a.Hw=new pn().freeze(),a.Nt=999999999,a.nw=new pn().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 pn,a.ow=new pn,a.Xh=null,a.aw=new kn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Lt,bounds:new un,Py:new kn,bA:new kn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new un(NaN,NaN,NaN,NaN).freeze(),a.wo=new kn(NaN,NaN).freeze(),a.Sp=new un(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ai;var y=new hi,x=new Zr;x.bind(new Oo("text","",Je)),y.add(x),a.ny=y,a.Lg.add("",y),y=new hi,x=new Zr,x.stroke="brown",x.bind(new Oo("text","",Je)),y.add(x),a.Lg.add("Comment",y),y=new hi,y.selectable=!1,y.avoidable=!1,x=new ar,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new kn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ai,y=new rr,y.selectionObjectName="GROUPPANEL",y.type=Un.Vertical,x=new Zr,x.font="bold 12pt sans-serif",x.bind(new Oo("text","",Je)),y.add(x),x=new Un(Un.Auto),x.name="GROUPPANEL";var b=new ar;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ws,b.padding=new Xi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ai,y=new ei,x=new ar,x.isPanelMain=!0,y.add(x),x=new ar,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new ei,x=new ar,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Pr,y.type=Un.Auto,x=new ar,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ws,x.margin=new Xi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Pr,y.type=Un.Link,x=new ar,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 Br,a.toolManager=new io,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new rt,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Gm(),a.eq=null,a.fq=_i,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 Lt,a.zy=500,a.wp=new Lt,a.wq=!1}Ge.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Tc=null,Wh="",cp(this,!1),this.Xn.clear(),Mf(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function cp(a,y){a.animationManager.Cc(!0),a.Hw=new pn().freeze(),a.nw=new pn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var nt=a.Wa.s[y].parts;nt.next();){var it=nt.value;it!==E&&it.data===null&&z.push(it)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Mf(),a.Og.clear(),Ji=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Gm(){return null}Ge.prototype.reset=function(){this.clear(),this.vb=!0,_m(this),Ka(this),this.Wg=!0,Um(this),this.layout=new no,this.Wg=!1,this.model=cy(),this.model.undoManager=new fo,this.vb=this.rn=!1,this.N()},Ge.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Jn.document.body);var y=Ci("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},Ge.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Jn.document.body);var y=0;if(yo){var x=rg;y=jh,x===null&&(x=rg=Ci("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=jh=Ci("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||$i||(y=11)}this.Db=y,this.Gw=!0},Ge.prototype.qb=function(a){a.classType===Ge&&(this.autoScale=a)},Ge.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 dp(a,y){if(yo){if(y!=null||Rt("Diagram setup requires an argument DIV."),a.Ka!==null&&Rt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Jn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Rt("No DIV or DIV id supplied: "+y),a.Ka===null&&Rt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Rt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Jn.ResizeObserver){var x=oi(function(){a.$b()},250);a.ol=new Jn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Jn.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Jn.go;var E=new oa(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Jn.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),wp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new oa(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,yo){E=Ci("div");var z=Ci("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=Xm,E.addEventListener("pointerdown",Jm),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=oi(function(){a.Yh=null,a.N()},300),a.Ov=oi(function(){fp(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var nt=Hl(a,tt,!0);nt.bubbles=!0;var it=0,ot=0;nt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(it=0<tt.deltaX?1:-1),tt.deltaY!==0&&(ot=0<tt.deltaY?1:-1),nt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-it:-ot):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(it=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(ot=0<tt.wheelDeltaY?-1:1),nt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-it:-ot):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(nt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),ya(nt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Hl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var nt=a.Yt;nt[tt.pointerId]===void 0&&(nt[tt.pointerId]=tt),nt=a.oj;var it=!1;if(nt[0]===null||nt[0].pointerId!==tt.pointerId&&nt[0].pointerType===tt.pointerType)if(nt[1]!==null&&nt[1].pointerId===tt.pointerId)nt[1]=tt,it=!0;else if(nt[0]===null)nt[0]=tt;else if(nt[1]===null)nt[1]=tt,it=!0;else{tt.preventDefault();return}else nt[0]=tt;(nt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ot=it;it=vp(a,tt,!0,!1,!0,ot),bc(a,tt,it),it.targetDiagram=gp(tt,tt.target),it.targetObject=null,ot||it.clone(a.bq),ot=a.uw,nt=nt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(ot.x-tt.screenX)>nt||Math.abs(ot.y-tt.screenY)>nt)?a.yq++:a.yq=1,it.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():ya(it,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var nt=a.oj;if(nt[0]===null||nt[0].pointerId!==tt.pointerId&&nt[0].pointerType===tt.pointerType){if(nt[1]!==null&&nt[1].pointerId===tt.pointerId){nt[1]=tt;return}if(nt[0]===null)nt[0]=tt;else return}else nt[0]=tt;if(nt[0].pointerId===tt.pointerId){nt=vp(a,tt,!1,!1,!1,nt[1]!==null);var it=Jn.document.elementFromPoint(tt.clientX,tt.clientY)||null;it!==null&&it.shadowRoot!==void 0&&it.shadowRoot!==null&&(it=it.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var ot=a,st=tt;it&&it.H&&(st=tt,ot=it.H),nt.targetDiagram=ot,bc(a,st,nt),nt.targetObject=null,a.doMouseMove(),ya(nt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var nt=tt.pointerType==="touch"||tt.pointerType==="pen",it=a.Yt;if(nt&&a.qu)delete it[tt.pointerId],tt.preventDefault();else if(it=a.oj,it[0]===null||it[0].pointerId!==tt.pointerId&&it[0].pointerType===tt.pointerType)it[1]!==null&&it[1].pointerId===tt.pointerId&&(it[1]=null);else{it[0]=null,it=vp(a,tt,!1,!0,!0,!1);var ot=Jn.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),ot!==null&&ot.H instanceof Ge&&ot.H!==a&&bc(ot.H,tt,it),ot===null&&(ot=tt.target),bc(a,tt,it),it.clickCount=a.yq,it.targetDiagram=gp(tt,ot),it.targetObject=null,a.doMouseUp(),ya(it,tt),nt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var nt=a.Yt;nt[tt.pointerId]&&delete nt[tt.pointerId],nt=a.oj,nt[0]!==null&&nt[0].pointerId===tt.pointerId&&(nt[0]=null),nt[1]!==null&&nt[1].pointerId===tt.pointerId&&(nt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var nt=a.oj;nt[0]!==null&&nt[0].pointerId===tt.pointerId?(nt[0]=null,a.wq=!1):nt[1]!==null&&nt[1].pointerId===tt.pointerId&&(nt[1]=null)},a.Vp=b.Z["d"+yd[1]+yd[2]+"wI"+Oc.slice(1,5)]["b"+jw.slice(1,y)](b.Z,vd,y,y),b.Vc(!0),e0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Ge.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Ge.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function e0(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(Jn,"resize",a.Ov,!1)}function Qs(a){30<a.Sq&&(a.Yh=1)}function hd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),an&&an.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Ge.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Jn.devicePixelRatio||1},Ge.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ge.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ge.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ge.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ge.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ge.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ge.prototype.doFocus=function(){this.focus()},Ge.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Jn.scrollX||Jn.pageXOffset,y=Jn.scrollY||Jn.pageYOffset;this.ta.focus(),Jn.scrollTo(a,y)}},Ge.prototype.Oy=function(){this.H.R("GainedFocus")},Ge.prototype.Ny=function(){this.H.R("LostFocus")};function fp(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ts&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Um(a){var y=new es;y.name="Background",a.Al(y),y=new es,y.name="",a.Al(y),y=new es,y.name="Foreground",a.Al(y),y=new es,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new es,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new es,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Ym(a){var y=new Un(Un.Grid);y.name="GRID";var x=new ar;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ar,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ar,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ar,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ar,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ar,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ai,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 Xm(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Pc(this.H)}function Jm(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Pc(this.H)}Ge.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,z=this.rj,tt=b.x-z.left,nt=b.y-z.top,it=b.width+z.left+z.right,ot=b.height+z.top+z.bottom,st=b.right+z.right;z=b.bottom+z.bottom;var ht=E.x;b=E.y;var ft=E.width,mt=E.height,xt=E.right,St=E.bottom;E=this.scale;var Ft=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ft=Ft+a.scrollWidth-a.clientWidth;break;case"reverse":Ft=a.scrollWidth-Ft-a.clientWidth}var Ot=Ft;ft<it||mt<ot?(Ft=Lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ot&&(Ft.x=Ot/E+tt,this.ju=Ot),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ft.y=a.scrollTop/E+nt,this.lu=a.scrollTop),this.position=Ft,Lt.free(Ft),this.Ee=this.qr=!1):(Ft=Lt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ht&&(this.position=Ft.h(Ot+tt,this.position.y)),st>xt&&(this.position=Ft.h(-(y.scrollWidth-this.Aa)+Ot-this.Aa/E+st,this.position.y))),a.vy&&this.allowVerticalScroll&&(nt<b&&(this.position=Ft.h(this.position.x,a.scrollTop+nt)),z>St&&(this.position=Ft.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),Lt.free(Ft),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,st=b.right,xt=E.right,z=b.bottom,St=E.bottom,tt=b.x,ht=E.x,nt=b.y,b=E.y,ft>=it&&tt>=ht&&st<=xt&&(x.style.width="1px"),mt>=ot&&nt>=b&&z<=St&&(x.style.height="1px"))}},Ge.prototype.computeBounds=function(a){return a===void 0&&(a=new un),ms(this),pp(this,a)};function pp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,z=0;z<E;z++){var tt=b[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var nt=tt.length,it=0;it<nt;it++){var ot=tt[it];ot.isInDocumentBounds&&ot.isVisible()&&(ot=ot.actualBounds,ot.w()&&(x?(x=!1,y.assign(ot)):y.ed(ot)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Ge.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(ze(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof ei||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof ei||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new un(NaN,NaN,0,0):x};function ia(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=Lt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=un.allocAt(0,0,b.width,b.height);var E=Lt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,un.free(b),Lt.free(E),Lt.free(x)}x=a.yh,y&&a.Fg!==Ts&&(x=a.Fg);var z=x!==Ts?Sc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var tt=a.ya/z,nt=a.zk,it=a.pq;y&&!nt.sb()&&(it.sb()||it.Xb())&&(nt=it.Xb()?cr:it),mp(a,a.documentBounds,E,tt,nt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,ge.B(z.x,x)&&ge.B(z.y,b)&&ge.B(z.width,E)&&ge.B(z.height,tt)||a.onViewportBoundsChanged(new un(x,b,E,tt),z,y,!1)}}function Sc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),nt=z/E,it=tt/b;return y===Ll?(y=Math.min(it,nt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Vh?(y=it>nt?(tt-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Ge.prototype.zoomToFit=function(){var a=this.sj;this.sj=ih,this.scale=Sc(this,Ll),a!==ih&&(ia(this,!1),mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},yt=Ge.prototype,yt.BA=function(a,y){y===void 0&&(y=Ll);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Ll||y===Vh)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var z=this.ya;E=y===Vh?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new Lt(a.x,a.y)}},yt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Lt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},yt.zz=function(a){if(a instanceof pe){this.eq=a;var y=Lt.alloc();this.fq=this.op(a.ga(gr,y)),Lt.free(y)}else this.eq=null,this.fq=_i};function mp(a,y,x,b,E,z){var tt=Lt.allocAt(a.pa.x,a.pa.y),nt=tt.x,it=tt.y;if(a.eq!==null){var ot=Lt.alloc();ot=a.eq.ga(gr,ot),nt=ot.x-a.fq.x/a.scale,it=ot.y-a.fq.y/a.scale,E=mr,Lt.free(ot)}(z||a.scrollMode===ih)&&(E.sb()&&(x>y.width&&(nt=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(it=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,x<y.width+E.left+E.right?(nt=Math.min(nt+x/2,y.right+Math.max(z,E.right)-x/2),nt=Math.max(nt,y.left-Math.max(z,E.left)+x/2),nt-=x/2):nt>y.left?nt=y.left:nt<y.right-x&&(nt=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(it=Math.min(it+b/2,y.bottom+Math.max(x,E.bottom)-b/2),it=Math.max(it,y.top-Math.max(x,E.top)+b/2),it-=b/2):it>y.top?it=y.top:it<y.bottom-b&&(it=y.bottom-b)),tt.x=isFinite(nt)?nt:-a.yb.left,tt.y=isFinite(it)?it:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Hm(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Ka(a),Lt.free(tt)}yt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=ou(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ai)return a}else if(a=ou(this,a,function(x){return x.part}),a instanceof Ai)return a;return null},yt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ms(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function ou(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ms(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}yt.lz=function(a,y,x){return y===void 0&&(y=!0),cd(this,a,function(b){return b.part},y?function(b){return b instanceof Ai&&b.canSelect()}:null,x)};function cd(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof $e||E instanceof pn||(E=new pn),ms(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}yt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof $e||b instanceof pn||(b=new pn),ms(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},yt.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),ef(this,a,function(E){return E instanceof Ai&&(!x||E.canSelect())},y,b)},yt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof $e||E instanceof pn||(E=new pn),ms(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,b,E)}return E},yt.Nu=function(a,y,x,b,E,z){var tt=new pn;ms(this);for(var nt=this.Wa.iteratorBackwards;nt.next();){var it=nt.value;it.visible&&it.Nu(a,y,x,b,tt,E,z)}return tt};function ef(a,y,x,b,E){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof $e||E instanceof pn||(E=new pn),ms(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,b,E)}return E}yt.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),dd(this,a,y,function(z){return z instanceof Ai&&(!b||z.canSelect())},x,E)},yt.og=function(a,y,x,b,E,z){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof $e||E instanceof pn)&&(z=E),E=!0),z instanceof $e||z instanceof pn||(z=new pn),ms(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var nt=tt.value;nt.visible&&nt.og(a,y,x,b,E,z)}return z};function dd(a,y,x,b,E,z){var tt=null;for(tt===void 0&&(tt=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof $e||E instanceof pn)&&(z=E),E=!0),z instanceof $e||z instanceof pn||(z=new pn),ms(a),a=a.Wa.iteratorBackwards;a.next();){var nt=a.value;nt.visible&&!nt.isTemporary&&nt.og(y,x,tt,b,E,z)}return z}Ge.prototype.acceptEvent=function(a){return Hl(this,a,a instanceof MouseEvent)};function Hl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?bc(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),$i&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=gp(y,y.target),b.targetObject=null,b}function gp(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 vp(a,y,x,b,E,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,$i&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=b,tt.handled=!1,tt.bubbles=E,tt.isMultiTouch=z,tt}function ya(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Ge.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Hl(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(),ya(x,a)},Ge.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hl(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(),ya(x,a)},Ge.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),ya(x,a)},Ge.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),ya(x,a)},Ge.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Lt(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?Gn(new Lt(y,a),this.Ab):new Lt(y,a)};function bc(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,tt=0,nt=0;b!==null&&(b=b.getBoundingClientRect(),tt=y.clientX-E/b.width*b.left,nt=y.clientY-z/b.height*b.top),x.viewPoint.h(tt,nt),a.Ab!==null?(y=Lt.allocAt(tt,nt),a.Ab.Cd(y),x.documentPoint.assign(y),Lt.free(y)):x.documentPoint.h(tt,nt)}function yp(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Ge.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Qm(a){a.ld||ms(a),a.Va()}Ge.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},yt=Ge.prototype,yt.Pz=function(){return this.kg},yt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Zl(this),this.hf=!1,this.du=new Lt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Ti(function(){b.ld=!1,iu(y,"Model"),a(b)},1)},yt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Jn.requestAnimationFrame(function(){y.kg&&y.bd()})}},yt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Zl(this))};function zh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Pc(a)||(y&&ms(a),x&&ia(a,!1))}function Zl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,z=E.length,tt=0;tt<z;tt++){var nt=E[tt];Bo(nt,!1),nt.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(it){it.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||fp(a),zh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Va(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ms(a),z=!1,(!a.hf||a.xh)&&(a.hf?Tp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Tp(a,!1)),z=!0),a.Jk=!1,ms(a),a.ou||Qm(a),zh(a,!0,!1),tt=!1,z?(x=un.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,xp(a)),a.R("LayoutCompleted"),zh(a,!0,!1),un.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ts?a.scale=Sc(a,a.Fg):a.yh!==Ts?a.scale=Sc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ia(a,!0)),z&&tt&&a.eb("Initial Layout"),ms(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function xp(a){if(a.Fg!==Ts)a.scale=Sc(a,a.Fg);else if(a.yh!==Ts)a.scale=Sc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ia(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Va(a)}function ms(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 pn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof rr&&b.U&65536&&(b.U=b.U^65536)})}}yt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof rr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof rr&&x.isVisible()&&fd(this,x);for(a.reset();a.next();)x=a.value,x instanceof ei&&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 Pr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function fd(a,y){for(var x=Ne(),b=Ne(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof rr?(Il(z)||Hs(z)||_h(z))&&fd(a,z):z instanceof ei?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;E<a;E++)z=x[E],z.measure(1/0,1/0),z.arrange();for(Fe(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();Fe(b)}yt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},yt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Rt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Mc(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,z=Math.round(y.x*E)/E,tt=Math.round(y.y*E)/E,nt=this.Ab;for(nt.reset(),E!==1&&nt.scale(E),y.x===0&&y.y===0||nt.translate(-z,-tt),a.ti=null,Xy(a,nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy),this.pb!==1&&(a.globalAlpha=this.pb),eh(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Lc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(er.prototype.Cd=er.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Mc(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,nt=this.pa;var it=this.Ca,ot=Math.round(nt.x*it)/it,st=Math.round(nt.y*it)/it;for(it!==1&&z.scale(it),nt.x===0&&nt.y===0||z.translate(-ot,-st),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),eh(this,a),nt=0;nt<E;nt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[nt].gc(a,this);if(y=!1,this.Yf?Lc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(er.prototype.Cd=er.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=an&&an.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function nf(a,y,x,b,E,z,tt,nt,it,ot){if(a.Ka!==null){a.ta===null&&Rt("No canvas specified"),tt===void 0&&(tt=null),nt===void 0&&(nt=null),it===void 0&&(it=!1),ot===void 0&&(ot=!1),Mc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var st=a.Ca;a.Ca=E;var ht=a.Wa.s,ft=ht.length;try{var mt=new un(z.x,z.y,b.width/E,b.height/E),xt=mt.copy();xt.Co(x),Va(a,xt),ms(a),a.Fd(ht,ft,a,mt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),nt!==null&&nt!==""&&(y.fillStyle=nt,y.ox(0,0,b.width,b.height));var St=a.Mb;y.scale(St,St);var Ft=er.alloc();Ft.reset(),Ft.translate(x.left,x.top),Ft.scale(E),z.x===0&&z.y===0||Ft.translate(-z.x,-z.y),y.setTransform(Ft.m11,Ft.m12,Ft.m21,Ft.m22,Ft.dx,Ft.dy),y.yc(),y instanceof xl&&Xy(y,Ft.m11,Ft.m12,Ft.m21,Ft.m22,Ft.dx,Ft.dy),er.free(Ft),eh(a,y),y.globalAlpha=a.pb;var Ot=a.Qj("Grid");if(tt){var Wt=new pn,Ut=tt.iterator;for(Ut.reset();Ut.next();){var ne=Ut.value;ne instanceof Ai&&(ot||ne.layer!==Ot)&&(ne.Gj(),Wt.add(ne))}for(ot=0;ot<ft;ot++)Vm(ht[ot],y,a,Wt,it);Wt.each(function(_e){return _e.Gj()})}else for(Wt=0;Wt<ft;Wt++){var fe=ht[Wt];fe===Ot?ot&&fe.gc(y,a,!0):fe.gc(y,a,it)}a.$i=!1,a.Yf&&Lc(a.Yf,a)&&a.Vp()}finally{a.Ca=st,a.ib.Vc(!0),a.vd=!0,a.Fd(ht,ft,a,a.viewportBounds),Va(a),a.ib instanceof xl&&(a.ib.Nj.PA(),a.redraw())}}}yt.Gf=function(a){return this.Rg[a]},yt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},yt.Tx=function(){this.Rg=new Ii,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!($i||vi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function eh(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}yt.Ql=function(a){return this.on[a]},yt.sA=function(a,y){this.on[a]=y},yt.Sx=function(){this.on=new Ii,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},yt.set=function(a){return Object.assign(this,a),this},yt.Du=function(a){return this.nm(a)},yt.nm=function(a){return Ec(this,a),this};function Ec(a,y){var x=a instanceof Un,b=a instanceof Ge,E;for(E in y){E===""&&Rt("Setting properties requires non-empty property names");var z=a,tt=E;if(x||b){var nt=E.indexOf(".");if(0<nt){var it=E.substring(0,nt);x?z=a.fb(it):(z=a[it],z==null&&(z=a.toolManager[it])),ae(z)?tt=E.substr(nt+1):Rt("Unable to find object named: "+it+" in "+a.toString()+" when trying to set property: "+E)}}if(tt[0]!=="_"&&!vn(z,tt))if(b&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(b&&tt==="Changed"){a.Pe(y[tt]);continue}else if(b&&vn(a.toolManager,tt))z=a.toolManager;else if(b&&eg(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof ki&&tt==="Changed"){a.Pe(y[tt]);continue}else Rt('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[E],tt[0]==="_"&&z instanceof pe&&z.Vw(tt)}}yt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ai,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},yt.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")},Ge.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!==gd&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,z-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=un.alloc(),Np(this,this.computeBounds(b)),un.free(b)),b=this.ta,b===null||b instanceof _a)))){var tt=this.Mb;E=this.Aa*tt;var nt=this.ya*tt,it=this.scale*tt;z=Math.round(Math.round(y.x*it)-Math.round(a.x*it)),y=Math.round(Math.round(y.y*it)-Math.round(a.y*it)),it=this.jw,a=this.oy,it.width!==E&&(it.width=E),it.height!==nt&&(it.height=nt),a.clearRect(0,0,E,nt),it=190*tt;var ot=70*tt,st=Math.max(z,0),ht=Math.max(y,0),ft=Math.floor(E-st),mt=Math.floor(nt-ht);a.drawImage(b.Oa,st,ht,ft,mt,0,0,ft,mt),Lc(this.Yf,this)&&a.clearRect(0,0,it,ot),b=Ne(),a=Ne(),mt=Math.abs(z),ft=Math.abs(y);var xt=st===0?0:E-mt;st=Lt.allocAt(xt,0),mt=Lt.allocAt(mt+xt,nt),a.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y)));var St=this.Ab;if(St.reset(),St.scale(tt,tt),this.Ca!==1&&St.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&St.translate(-tt.x,-tt.y),Gn(st,St),Gn(mt,St),b.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y))),xt=ht===0?0:nt-ft,st.h(0,xt),mt.h(E,ft+xt),a.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y))),Gn(st,St),Gn(mt,St),b.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y))),Lc(this.Yf,this)&&(E=0<z?0:-z,nt=0<y?0:-y,st.h(E,nt),mt.h(it+E,ot+nt),a.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y))),Gn(st,St),Gn(mt,St),b.push(new un(Math.min(st.x,mt.x),Math.min(st.y,mt.y),Math.abs(st.x-mt.x),Math.abs(st.y-mt.y)))),Lt.free(st),Lt.free(mt),zh(this,!1,!0),this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Mc(this),nt=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*nt,this.ya*nt),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,it=Math.round(z.x*tt)/tt,ot=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-it,-ot),E.save(),E.beginPath(),z=a.length,tt=0;tt<z;tt++)it=a[tt],it.width!==0&&it.height!==0&&E.rect(Math.floor(it.x),Math.floor(it.y),Math.ceil(it.width),Math.ceil(it.height));for(E.clip(),E.setTransform(nt,0,0,nt,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),eh(this,E),E.globalAlpha=this.pb,nt=0;nt<z;nt++)if(tt=y[nt],it=b,tt.visible&&tt.pb!==0){ot=Nu(tt,E),ht=tt.Zq,ht.length=0,st=this.scale,ft=un.alloc(),mt=tt.Pa.s,St=mt.length,xt=it.length;for(var Ft=0;Ft<St;Ft++){var Ot=mt[Ft],Wt=jc(Ot,Ot.actualBounds);t:{for(var Ut=2/st,ne=4/st,fe=0;fe<xt;fe++){var _e=it[fe];if(_e.width!==0&&_e.height!==0&&Wt.Vu(_e.x-Ut,_e.y-Ut,_e.width+ne,_e.height+ne)){Wt=!0;break t}}Wt=!1}Wt&&tt.Oj(E,Ot,this,ht,st,ft,!0)}un.free(ft),E.globalAlpha=ot}E.restore(),E.Vc(!0),this.Yf&&Lc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Fe(b),Fe(a),this.ld=!1}}else this.bd();x&&(Qs(this),this.bd(),hd(this,!0))}else x?(Qs(this),this.bd(),hd(this,!0)):this.bd()}};function Mc(a){a.pn!==!1&&(a.pn=!1,wp(a,a.Aa,a.ya))}function wp(a,y,x){Ka(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Pc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,z=!1,tt=a.gf?a.Db:0,nt=a.Be?a.Db:0,it=E.clientWidth||x+tt,ot=E.clientHeight||b+nt,st=a.viewportBounds;E=st.x;var ht=st.y,ft=st.width,mt=st.height;if((it!==x+tt||ot!==b+nt)&&(a.gf=!1,a.Be=!1,nt=tt=0,a.Aa=it,a.ya=ot,z=a.pn=!0,Ka(a)),!a.hf||!a.viewportBounds.w())return!0;var xt=a.ku,St=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Ft=a.documentBounds,Ot=0,Wt=0,Ut=0,ne=0,fe=st.width,_e=st.height,si=a.rj;a.contentAlignment.sb()?(Ft.width>fe&&(Ot=si.left,Wt=si.right),Ft.height>_e&&(Ut=si.top,ne=si.bottom)):(Ot=si.left,Wt=si.right,Ut=si.top,ne=si.bottom);var bi=Ft.width+Ot+Wt,mi=Ft.height+Ut+ne;si=a.scale;var qn=bi>it/si,Fn=mi>ot/si;if(!(z||a.gf||a.Be||qn||Fn))return!0;Ot=Ft.x-Ot,it=st.x,Wt=Ft.right+Wt,ot=st.right+tt,Ut=Ft.y-Ut;var ir=st.y;Ft=Ft.bottom+ne,st=st.bottom+nt;var Gi="1px";if(ne="1px",a.scrollMode===ih&&(qn||Fn)&&(qn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(qn=1,Ot+1<it&&(qn=Math.max((it-Ot)*si+a.Aa,qn)),Wt>ot+1&&(qn=Math.max((Wt-ot)*si+a.Aa,qn)),fe+tt+1<bi&&(qn=Math.max((bi-fe)*si+a.Aa,qn)),Gi=qn.toString()+"px"),Fn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(qn=1,Ut+1<ir&&(qn=Math.max((ir-Ut)*si+a.ya,qn)),Ft>st+1&&(qn=Math.max((Ft-st)*si+a.ya,qn)),_e+nt+1<mi&&(qn=Math.max((mi-_e)*si+a.ya,qn)),ne=qn.toString()+"px")),qn=Gi!=="1px",Fn=ne!=="1px",qn&&Fn||!qn&&!Fn||(Fn&&(ot-=a.Db),qn&&(st-=a.Db),bi<fe+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Ot+1<it&&(tt=Math.max((it-Ot)*si+a.Aa,tt)),Wt>ot+1&&(tt=Math.max((Wt-ot)*si+a.Aa,tt)),fe+1<bi&&(tt=Math.max((bi-fe)*si+a.Aa,tt)),Gi=tt.toString()+"px"),qn=Gi!=="1px",tt=a.ya,qn!==a.Be&&(tt=qn?a.ya-a.Db:a.ya+a.Db),mi<_e+nt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(nt=1,Ut+1<ir&&(nt=Math.max((ir-Ut)*si+tt,nt)),Ft>st+1&&(nt=Math.max((Ft-st)*si+tt,nt)),_e+1<mi&&(nt=Math.max((mi-_e)*si+tt,nt)),ne=nt.toString()+"px"),Fn=ne!=="1px"),a.qr&&qn===a.Be&&Fn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(qn!==a.Be&&(Gi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=qn,St.style.width=Gi,Fn!==a.gf&&(ne==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(nt=Lt.alloc(),Fn?(y.style.left=a.Db+"px",a.position=nt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=nt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Lt.free(nt))),z&&Ka(a),a.gf=Fn,St.style.height=ne,a.gu=!0,z&&(a.pn=!0),y=xt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(fe+1<bi?y=(a.position.x-Ot)*si:Ot+1<it?y=xt.scrollWidth-xt.clientWidth:Wt>ot+1&&(y=a.position.x*si)),a.tn)switch(a.bu){case"negative":y=-(xt.scrollWidth-y-xt.clientWidth);break;case"reverse":y=xt.scrollWidth-y-xt.clientWidth}return xt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(_e+1<mi?xt.scrollTop=(a.position.y-Ut)*si:Ut+1<ir?xt.scrollTop=xt.scrollHeight-xt.clientHeight:Ft>st+1&&(xt.scrollTop=a.position.y*si)),it=a.Aa,ot=a.ya,xt.style.width=it+(a.gf?a.Db:0)+"px",xt.style.height=ot+(a.Be?a.Db:0)+"px",x!==it||b!==ot||a.animationManager.zb?(x=un.allocAt(E,ht,ft,mt),a.onViewportBoundsChanged(x,a.viewportBounds,si,z),un.free(x),!1):!0}yt=Ge.prototype,yt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Rt("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&Rt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(No,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},yt.oi=function(a){this.partManager.oi(a);var y=this;Fc(a,function(x){Nc(y,x)}),(a instanceof Pr||a instanceof rr&&a.placeholder!==null)&&a.v(),a.data!==null&&Fc(a,function(x){ay(y.partManager,x)}),Hs(a)!==!0&&_h(a)!==!0||this.De.add(a),zx(a,!0,this),Hx(a)?(a.actualBounds.w()&&this.N(jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(jc(a,a.actualBounds)),this.$b()},yt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Fc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),Hx(a)?(a.actualBounds.w()&&this.N(jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(jc(a,a.actualBounds)),this.$b()},yt.remove=function(a){Cp(this,a,!0)};function Cp(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(zo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}yt.Is=function(a,y){if(y===void 0&&(y=!1),ze(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new pn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},yt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Ge.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=rf(this)),this.toolManager!==null){var E=new ai;if(a!==null)if(ze(a))for(var z=0;z<a.length;z++)su(this,E,a[z],x,b);else for(a=a.iterator;a.next();)su(this,E,a.value,x,b);else{for(a=this.parts;a.next();)su(this,E,a.value,x,b);for(a=this.nodes;a.next();)su(this,E,a.value,x,b);for(a=this.links;a.next();)su(this,E,a.value,x,b)}$h(this,E,y,b,x)}};function su(a,y,x,b,E,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!b||z||x.canMove()||x.canCopy()))if(E===void 0&&(E=rf(a)),x instanceof hi){if(y.add(x,a.Pd(E,x,x.location)),x instanceof rr&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)su(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var nt=tt.fromNode,it=tt.toNode;nt!==null&&y.contains(nt)&&it!==null&&y.contains(it)&&su(a,y,tt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)su(a,y,x.value,b,E)}else if(x instanceof ei)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)su(a,y,x.value,b,E);else x instanceof Pr||y.add(x,a.Pd(E,x,x.location))}function $h(a,y,x,b,E){if(y!==null&&y.count!==0){var z=Lt.alloc(),tt=Lt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||sf(a,y);for(var nt=Ne(),it=Ne(),ot=y.iterator,st=Lt.alloc();ot.next();){var ht=ot.key,ft=ot.value;if(ht.Zc()){var mt=Sp(a,ht,y);mt!==null?nt.push(new et(ht,ft,mt)):(!E||ht.canMove())&&(mt=ft.point,z.assign(mt),a.computeMove(ht,z.add(tt),b,st),ht.location=st,ft.shifted===void 0&&(ft.shifted=new Lt),ft.shifted.assign(st.re(mt)))}else ot.key instanceof ei&&it.push(ot.sa)}for(Lt.free(st),E=nt.length,ot=0;ot<E;ot++)ht=nt[ot],z.assign(ht.info.point),ht.Su.shifted===void 0&&(ht.Su.shifted=new Lt),ht.node.location=z.add(ht.Su.shifted);for(E=Lt.alloc(),ot=Lt.alloc(),ht=it.length,ft=0;ft<ht;ft++){var xt=it[ft];if(mt=xt.key,mt instanceof ei)if(mt.suspendsRouting){mt.Tg=null,st=mt.fromNode;var St=mt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(St=xt.value.point,mt.dragComputation===null)y.add(mt,a.Pd(b,mt,tt)),ch(mt,tt.x-St.x,tt.y-St.y);else{xt=Lt.allocAt(0,0),(st=mt.i(0))&&st.w()&&xt.assign(st);var Ft=st=Lt.alloc().assign(xt).add(tt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ft=Lt.alloc(),of(a,mt,st,Ft,b)),st.assign(mt.dragComputation(mt,st,Ft)).re(xt),y.add(mt,a.Pd(b,mt,st)),ch(mt,st.x-St.x,st.y-St.y),Lt.free(xt),Lt.free(st),Ft!==st&&Lt.free(Ft)}else st!==null&&(E.assign(st.location),Ft=y.I(st),Ft!==null&&E.re(Ft.point)),St!==null&&(ot.assign(St.location),Ft=y.I(St),Ft!==null&&ot.re(Ft.point)),st!==null&&St!==null?E.Xa(ot)?(st=xt.value.point,St=z,St.assign(E),St.re(st),y.add(mt,a.Pd(b,mt,E)),ch(mt,St.x,St.y)):(mt.suspendsRouting=!1,mt.bb()):(xt=xt.value.point,st=st!==null?E:St!==null?ot:tt,y.add(mt,a.Pd(b,mt,st)),ch(mt,st.x-xt.x,st.y-xt.y))}else(mt.fromNode===null||mt.toNode===null)&&(st=xt.value.point,y.add(mt,a.Pd(b,mt,tt)),ch(mt,tt.x-st.x,tt.y-st.y))}Lt.free(z),Lt.free(tt),Lt.free(E),Lt.free(ot),Fe(nt),Fe(it),x||(ms(a),Hh(a,y))}}Ge.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Lt),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Lt.alloc(),of(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var tt=a.minLocation,nt=tt.x;isNaN(nt)&&(nt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var it=a.maxLocation,ot=it.x;return isNaN(ot)&&(ot=z?Math.round(1e3*a.location.x)/1e3:a.location.x),it=it.y,isNaN(it)&&(it=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(nt,Math.min(x.x,ot)),Math.max(tt,Math.min(x.y,it))),E!==y&&Lt.free(E),b};function rf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function of(a,y,x,b,E){if(E===void 0&&(E=rf(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var tt=E.gridSnapOrigin,nt=tt.x;if(tt=tt.y,E=E.gridSnapCellSpot,z!==null){var it=z.gridCellSize;isNaN(a)&&(a=it.width),isNaN(y)&&(y=it.height),z=z.gridOrigin,isNaN(nt)&&(nt=z.x),isNaN(tt)&&(tt=z.y)}z=Lt.allocAt(0,0),z.yi(0,0,a,y,E),ge.No(x.x,x.y,nt+z.x,tt+z.y,a,y,b),Lt.free(z)}}function sf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof ei&&(y.suspendsRouting=!0)}function Hh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof ei&&(x.suspendsRouting=!1,U0(x)&&x.bb())}a.Mr=!1}}function Sp(a,y,x){return y=y.containingGroup,y!==null&&(a=Sp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}yt=Ge.prototype,yt.Pd=function(a,y,x){if(x===void 0)return new Tu(ur);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Tu(new Lt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Tu(x.copy())};function bp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Rt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Rt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Rt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Rt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Rt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}yt.Al=function(a){bp(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(No,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},yt.Ww=function(a,y){bp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(zo,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(No,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},yt.Cy=function(a,y){bp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(zo,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(No,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},yt.kA=function(a){if(a.diagram!==this&&Rt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(zo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},yt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},yt.Yw=function(a){return this.pf===null&&(this.pf=new $e),this.pf.add(a),this.model.Pe(a),this},yt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},yt.Pe=function(a){return this.zg===null&&(this.zg=new $e),this.zg.add(a),this},yt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},yt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==vl&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},yt.cb=function(a,y,x,b,E,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var nt=new ao;nt.diagram=this,nt.change=a,nt.propertyName=y,nt.object=x,nt.oldValue=b,nt.oldParam=z,nt.newValue=E,nt.newParam=tt,this.ds(nt)},yt.g=function(a,y,x,b,E){this.cb(so,a,this,y,x,b,E)},Ge.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===so){var E=a.object;if(eo(E,a.propertyName,a.I(y)),E instanceof pe){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===No){var tt=a.object,nt=a.newParam,it=a.newValue;if(tt instanceof Un)if(typeof nt=="number"&&it instanceof pe){y?tt.pc(nt):tt.Gb(nt,it);var ot=tt.part;ot!==null&&ot.Wb()}else typeof nt=="number"&&it instanceof Ro&&(it.isRow?dx(tt,nt,y?void 0:it):fx(tt,nt,y?void 0:it));else if(tt instanceof es){var st=a.oldParam===!0;typeof nt=="number"&&it instanceof Ai&&(y?(it.isSelected=!1,it.isHighlighted=!1,it.Wb(),tt.pc(st?nt:-1,it,st)):tt.oi(nt,it,st))}else tt instanceof Ge?typeof nt=="number"&&it instanceof es&&(y?this.Wa.mb(nt):(it.Xe(this),this.Wa.Gb(nt,it))):Rt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===zo){var ht=a.object,ft=a.oldParam,mt=a.oldValue;if(ht instanceof Un)typeof ft=="number"&&mt instanceof pe?y?ht.Gb(ft,mt):ht.pc(ft):typeof ft=="number"&&mt instanceof Ro&&(mt.isRow?dx(ht,ft,y?mt:void 0):fx(ht,ft,y?mt:void 0));else if(ht instanceof es){var xt=a.newParam===!0;typeof ft=="number"&&mt instanceof Ai&&(y?0>ht.Pa.indexOf(mt)&&ht.oi(ft,mt,xt):(mt.isSelected=!1,mt.isHighlighted=!1,mt.Wb(),ht.pc(xt?ft:-1,mt,xt)))}else ht instanceof Ge?typeof ft=="number"&&mt instanceof es&&(y?(mt.Xe(this),this.Wa.Gb(ft,mt)):this.Wa.mb(ft)):Rt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==vl&&Rt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Ge.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ge.prototype.eb=function(a){return this.undoManager.eb(a)},Ge.prototype.Kf=function(){return this.undoManager.Kf()},Ge.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ge.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Ge.prototype.rp=function(){this.partManager.rp()};function Ep(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ka(a),a.N(),a.Ee=!0,b.zb&&(Mu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ka(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,nt=a.zoomPoint.x,it=a.zoomPoint.y,ot=a.contentAlignment;isNaN(nt)&&(ot.$c()?ot.Hf(pl)?nt=0:ot.Hf(As)&&(nt=z-1):nt=ot.sb()?ot.x*(z-1):z/2),isNaN(it)&&(ot.$c()?ot.Hf(Is)?it=0:ot.Hf(sl)&&(it=tt-1):it=ot.sb()?ot.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Lt.allocAt(a.pa.x+nt/y-nt/x,a.pa.y+it/y-it/x),a.position=z,Lt.free(z),a.Ca=x,Ka(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ia(a,!1),b.zb&&(Mu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Ge.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ts||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof io&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Fm(E,this)),this.vb||this.invalidateViewport(a,y),Va(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Va(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=kn.alloc(),E=1,z=1,tt=x.O.s,nt=tt.length,it=0;it<nt;it++){var ot=tt[it],st=Math.abs(ot.interval);2>st||(g0(ot.figure)?z=z*st/ge.vx(z,st):E=E*st/ge.vx(E,st))}if(tt=x.gridCellSize,b.h(z*tt.width,E*tt.height),y!==void 0)E=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=un.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){un.free(y);return}E=y.width,z=y.height,a=y.x,tt=y.y,un.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=Lt.alloc(),ge.No(a,tt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),kn.free(b),x.part.location=y,Lt.free(y)}}Ge.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Ge.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))},Ge.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),ze(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ai||Rt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Ai||Rt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Ge.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},yt=Ge.prototype,yt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},yt.Jz=function(a){a=new pn().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 Ai||Rt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},yt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=Lt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,E.y):y==="left"?this.position=z.h(E.x,x.y):y==="down"?this.position=z.h(x.x,E.bottom-x.height):y==="right"&&(this.position=z.h(E.right-x.width,x.y)),Lt.free(z);return}Rt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-E):y==="down"?this.position=z.h(x.x,x.y+E):y==="left"?this.position=z.h(x.x-E,x.y):y==="right"?this.position=z.h(x.x+E,x.y):Rt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Lt.free(z)},yt.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)},yt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},yt.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)},yt.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,tt=y.m11,nt=y.m12,it=y.m21,ot=y.m22,st=y.dx,ht=y.dy,ft=x*tt+b*it+st;y=x*nt+b*ot+ht;var mt=E*tt+b*it+st;return a=E*nt+b*ot+ht,b=x*tt+z*it+st,x=x*nt+z*ot+ht,tt=E*tt+z*it+st,E=E*nt+z*ot+ht,z=Math.min(ft,mt),ft=Math.max(ft,mt),mt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),ft=Math.max(ft,b),mt=Math.min(mt,x),y=Math.max(y,x),z=Math.min(z,tt),ft=Math.max(ft,tt),mt=Math.min(mt,E),y=Math.max(y,E),new un(z,mt,ft-z,y-mt)},yt.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),Gn(a.copy(),this.Ab)};function qm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Mp(a){return a=df.get(a),a!==null?new a:new Br}Ge.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===vl&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(it){return it.diagram=E}),a.mouseMoveTools.each(function(it){return it.diagram=E}),a.mouseUpTools.each(function(it){return it.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===vl){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ms(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Xd(z),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(qm(this),this.As.clear(),$m(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var nt=this;Ti(function(){nt.currentTool.standardMouseOver(),nt.Rt=!1},10)}}}finally{this.aa=!0}}}};function Nc(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Zh(a,y[b])}function Zh(a,y){if(y instanceof nl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof pn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Pp(a,y){if(y instanceof nl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof pn&&x.Bg.remove(a),Mf(b));break}}}}}Ge.prototype.Wd=function(){this.partManager.Wd()},Ge.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Ge.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Ge.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Ge.prototype.Vb=function(a){return this.partManager.Vb(a)},Ge.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},yt=Ge.prototype,yt.Lc=function(a){return this.partManager.Lc(a)},yt.ii=function(a){return this.partManager.ii(a)},yt.Kc=function(a){return this.partManager.Kc(a)},yt.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:Bn(xn(y)))},yt.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:Bn(xn(y)))};function Ka(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 Np(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ia(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}yt.Va=function(){if(this.Zi){var a=un.alloc();Np(this,this.computeBounds(a)),un.free(a)}},yt.rz=function(){for(var a=new pn,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},yt.qz=function(){return this.ai.iterator},yt.Uz=function(a){ms(this),a&&lf(this,!0),this.ld?Tp(this,!1):(this.Jk=!0,Zl(this))};function lf(a,y){for(var x=a.ai.iterator;x.next();)tg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tg(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tg(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Tp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,z=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||iu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)kp(a,tt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ms(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Xd(z),a.aa=x}}}function kp(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)kp(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),fd(a,y),E.isValidLayout=!0):a.xh=!0)}}yt.yz=function(){for(var a=new $e,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function n0(a){function y(E){var z=E.toLowerCase(),tt=new $e;x.add(E,tt),x.add(z,tt),b.add(E,E),b.add(z,E)}var x=new ai,b=new ai;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function eg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function af(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Rt("Unknown DiagramEvent name: "+y)}yt.Bj=function(a,y){return a=af(this,a),a!==null&&a.add(y),this},yt.am=function(a,y){a=af(this,a),a!==null&&a.remove(y)},yt.R=function(a,y,x){var b=af(this,a),E=new Hu;if(E.diagram=this,a=eg(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function uf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}yt.Yj=function(a,y){return hf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Ge.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?pp(this,a):a.assign(this.documentBounds)};function hf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new rm(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=ng(a,x)),x===null){y=un.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,nt=tt.layer;nt!==null&&nt.visible&&!nt.isTemporary&&cf(a,tt,b,y)}un.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=un.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof hi&&cf(a,tt,b,y);un.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&s1(E);return E}function ng(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ng(a,y.containingGroup):null}function cf(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,z=y.y;if(Lf(a,E,z))for(x=(z-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(z=a.ac[E],z.fill)z.fill(fh,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=fh}else if(y instanceof rr)for(y=y.memberParts;y.next();)E=y.value,E instanceof hi&&cf(a,E,x,b)}}function nh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Ge.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Op(this)};function Op(a){a.vk===-1&&(a.vk=Ti(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=un.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Np(a,y),un.free(y),a.Fc=!0,a.bd(),Op(a))}},a.vp))}Ge.prototype.ug=function(){this.vk!==-1&&(Jn.clearTimeout(this.vk),this.vk=-1)},Ge.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=un.allocAt(0,0,b.width*E,b.height*E);var z=Lt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<b.x+x.left/2&&(z.x-=tt),a.x<b.x+x.left/4&&(z.x-=4*tt)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>b.x+b.width-x.right/2&&(z.x+=tt),a.x>b.x+b.width-x.right/4&&(z.x+=4*tt));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<b.y+x.top/2&&(z.y-=tt),a.y<b.y+x.top/4&&(z.y-=4*tt)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>b.y+b.height-x.bottom/2&&(z.y+=tt),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(ur)||(y=new Lt(y.x+z.x/E,y.y+z.y/E)),un.free(b),Lt.free(z),y},yt=Ge.prototype,yt.Cs=function(){return null},yt.av=function(){return null},yt.bs=function(a,y){this.pj.add(a,y)},yt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof rr&&(y.$p=null)})};function pd(a,y,x){function b(){var st=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||st-ot>it?y(x,E,nt):Jn.requestAnimationFrame(b)}for(var E=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var nt=a,it=x.callbackTimeout||300,ot=+new Date;return Jn.requestAnimationFrame(function(){b()}),null}yt.Wz=function(a){return yo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},yt.Jx=function(a){return a===void 0&&(a={}),pd(this,this.Xz,a)},yt.Xz=function(a,y,x){var b=ig(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Oc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Oc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Rt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function ig(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Rt("properties argument must be an Object.");var E=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new kn(1/0,1/0):new kn(2e3,2e3));var nt=y.position||null,it=y.parts||null,ot=y.padding===void 0?1:y.padding,st=y.background||null,ht=y.omitTemporary;ht===void 0&&(ht=!0);var ft=y.document||document,mt=y.elementFinished||null,xt=y.showTemporary;xt===void 0&&(xt=!ht),y=y.showGrid,y===void 0&&(y=xt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ot=="number"?ot=new Xi(ot):ot instanceof Xi||Rt("MakeImage padding must be a Margin or a number."),ot.left=Math.max(ot.left,0),ot.right=Math.max(ot.right,0),ot.top=Math.max(ot.top,0),ot.bottom=Math.max(ot.bottom,0),a.ib.Vc(!0),ht=new oa(null,ft,void 0,!0);var St=ht.context;if(!(E||z||it||nt))return ht.width=a.Aa+Math.ceil(ot.left+ot.right),ht.height=a.ya+Math.ceil(ot.top+ot.bottom),x==="SVG"?b===null?null:(b.resize(ht.width,ht.height,ht.width,ht.height),b.ownerDocument=ft,b.hs=mt,nf(a,b.context,ot,new kn(ht.width,ht.height),a.Ca,a.pa,it,st,xt,y),b.context):(a.Xm=!1,nf(a,St,ot,new kn(ht.width,ht.height),a.Ca,a.pa,it,st,xt,y),a.Xm=!0,ht.context);var Ft=a.Pp,Ot=a.documentBounds.copy();if(Ot.Fv(a.yb),xt)for(var Wt=a.Wa.s,Ut=Wt.length,ne=0;ne<Ut;ne++){var fe=Wt[ne];if(fe.visible&&fe.isTemporary){fe=fe.Pa.s;for(var _e=fe.length,si=0;si<_e;si++){var bi=fe[si];bi.isInDocumentBounds&&bi.isVisible()&&(bi=bi.actualBounds,bi.w()&&Ot.ed(bi))}}}if(Wt=new Lt(Ot.x,Ot.y),it!==null){for(Ut=new un(0,0,0,0),ne=!0,fe=it.iterator,fe.reset();fe.next();)_e=fe.value,_e instanceof Ai&&(si=_e.layer,si!==null&&!si.visible||si!==null&&!xt&&si.isTemporary||!_e.isVisible()||(_e=_e.actualBounds,_e.w()&&(ne?(ne=!1,Ut.assign(_e)):Ut.ed(_e))));Ot.width=Ut.width,Ot.height=Ut.height,Wt.x=Ut.x,Wt.y=Ut.y}return nt!==null&&nt.w()&&(Wt=nt,z||(z=Ft)),Ut=nt=0,ot!==null&&(nt=ot.left+ot.right,Ut=ot.top+ot.bottom),ne=fe=0,E!==null&&(fe=E.width,ne=E.height,isFinite(fe)&&(fe=Math.max(0,fe-nt)),isFinite(ne)&&(ne=Math.max(0,ne-Ut))),E!==null&&z!==null?(z==="NaN"&&(z=Ft),E.w()?(E=fe,Ot=ne):isNaN(ne)?(E=fe,Ot=Ot.height*z):(E=Ot.width*z,Ot=ne)):E!==null?E.w()?(z=Math.min(fe/Ot.width,ne/Ot.height),E=fe,Ot=ne):isNaN(ne)?(z=fe/Ot.width,E=fe,Ot=Ot.height*z):(z=ne/Ot.height,E=Ot.width*z,Ot=ne):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-nt)/Ot.width,(tt.height-Ut)/Ot.height),z>Ft?(z=Ft,E=Ot.width,Ot=Ot.height):(E=tt.width,Ot=tt.height)):(E=Ot.width*z,Ot=Ot.height*z):(z=Ft,E=Ot.width,Ot=Ot.height),ot!==null?(E+=nt,Ot+=Ut):ot=new Xi(0),tt!==null&&(Ft=tt.width,tt=tt.height,isNaN(Ft)&&(Ft=2e3),isNaN(tt)&&(tt=2e3),isFinite(Ft)&&(E=Math.min(E,Ft)),isFinite(tt)&&(Ot=Math.min(Ot,tt))),ht.width=Math.ceil(E),ht.height=Math.ceil(Ot),x==="SVG"?b===null?null:(b.resize(ht.width,ht.height,ht.width,ht.height),b.ownerDocument=ft,b.hs=mt,nf(a,b.context,ot,new kn(Math.ceil(E),Math.ceil(Ot)),z,Wt,it,st,xt,y),b.context):(a.Xm=!1,nf(a,St,ot,new kn(Math.ceil(E),Math.ceil(Ot)),z,Wt,it,st,xt,y),a.Xm=!0,ht.context)}$n.Object.defineProperties(Ge.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ct||(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 _a(this,Jn.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 _a(this,Jn.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(Jn,"resize",this.Ov,!1),this.removeEventListener(Jn,"wheel",this.$j,!0),ru===this&&(ru=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),dp(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)&&qt(a,"0 <= value <= 1",Ge,"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),ia(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),ia(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),ia(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),ia(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&qt(a,">= 0",Ge,"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&&qt(a,">= 0",Ge,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else qt(a,">= 0",Ge,"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||qm(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Rt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=cp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,iu(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=Mp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(Jn,"pointermove",this.dk,!0),this.addEventListener(Jn,"pointerdown",this.ui,!0),this.addEventListener(Jn,"pointerup",this.fk,!0),this.addEventListener(Jn,"pointerout",this.ek,!0),this.addEventListener(Jn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Jn,"wheel",this.$j,!0),this.addEventListener(Jn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Jn,"pointermove",this.dk,!0),this.removeEventListener(Jn,"pointerdown",this.ui,!0),this.removeEventListener(Jn,"pointerup",this.fk,!0),this.removeEventListener(Jn,"pointerout",this.ek,!0),this.removeEventListener(Jn,"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(Jn,"wheel",this.$j,!0),this.removeEventListener(Jn,"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=Lt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Hm(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Ka(this):(this.vb=!0,a=this.scale,mp(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)}Lt.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=Ym(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Ym(this)),a.type!==Un.Grid&&Rt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Va(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),Ka(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Rt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Xi(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===ih&&ia(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,ia(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,Ep(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&&Ep(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!==Ts&&ia(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Rt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||Rt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):qt(a,"> 0",Ge,"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)):qt(a,"> 0",Ge,"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),ia(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 Xi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&Rt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Up(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==rh&&a!==Fo&&a!==ff&&Rt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new kn(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 Xi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),$n.Object.defineProperties(Ge,{licenseKey:{get:function(){return Bp.jc()},set:function(a){Bp.add(a.replace(/\s/g,""))}},version:{get:function(){return kc}}}),Ge.prototype.makeImageData=Ge.prototype.Jx,Ge.prototype.makeImage=Ge.prototype.Wz,Ge.prototype.cacheGroupExternalLinks=Ge.prototype.Fu,Ge.prototype.addRenderer=Ge.prototype.bs,Ge.prototype.makeSVG=Ge.prototype.av,Ge.prototype.makeSvg=Ge.prototype.Cs,Ge.prototype.stopAutoScroll=Ge.prototype.ug,Ge.prototype.doAutoScroll=Ge.prototype.gs,Ge.prototype.isUnoccupied=Ge.prototype.Yj,Ge.prototype.raiseDiagramEvent=Ge.prototype.R,Ge.prototype.removeDiagramListener=Ge.prototype.am,Ge.prototype.addDiagramListener=Ge.prototype.Bj,Ge.prototype.findTreeRoots=Ge.prototype.yz,Ge.prototype.layoutDiagram=Ge.prototype.Uz,Ge.prototype.findTopLevelGroups=Ge.prototype.qz,Ge.prototype.findTopLevelNodesAndLinks=Ge.prototype.rz,Ge.prototype.ensureBounds=Ge.prototype.Va,Ge.prototype.findLinksByExample=Ge.prototype.ls,Ge.prototype.findNodesByExample=Ge.prototype.ms,Ge.prototype.findLinkForData=Ge.prototype.Kc,Ge.prototype.findNodeForData=Ge.prototype.ii,Ge.prototype.findPartForData=Ge.prototype.Lc,Ge.prototype.findLinkForKey=Ge.prototype.findLinkForKey,Ge.prototype.findNodeForKey=Ge.prototype.Vb,Ge.prototype.findPartForKey=Ge.prototype.findPartForKey,Ge.prototype.rebuildParts=Ge.prototype.Wd,Ge.prototype.transformViewToDoc=Ge.prototype.Ps,Ge.prototype.transformRectDocToView=Ge.prototype.zA,Ge.prototype.transformDocToView=Ge.prototype.op,Ge.prototype.centerRect=Ge.prototype.es,Ge.prototype.scrollToRect=Ge.prototype.tv,Ge.prototype.scroll=Ge.prototype.scroll,Ge.prototype.highlightCollection=Ge.prototype.Jz,Ge.prototype.highlight=Ge.prototype.Iz,Ge.prototype.selectCollection=Ge.prototype.rA,Ge.prototype.select=Ge.prototype.select,Ge.prototype.updateAllRelationshipsFromData=Ge.prototype.rp,Ge.prototype.updateAllTargetBindings=Ge.prototype.updateAllTargetBindings,Ge.prototype.commit=Ge.prototype.commit,Ge.prototype.rollbackTransaction=Ge.prototype.Kf,Ge.prototype.commitTransaction=Ge.prototype.eb,Ge.prototype.startTransaction=Ge.prototype.Ea,Ge.prototype.raiseChanged=Ge.prototype.g,Ge.prototype.raiseChangedEvent=Ge.prototype.cb,Ge.prototype.removeChangedListener=Ge.prototype.ik,Ge.prototype.addChangedListener=Ge.prototype.Pe,Ge.prototype.removeModelChangedListener=Ge.prototype.mA,Ge.prototype.addModelChangedListener=Ge.prototype.Yw,Ge.prototype.findLayer=Ge.prototype.Qj,Ge.prototype.removeLayer=Ge.prototype.kA,Ge.prototype.addLayerAfter=Ge.prototype.Cy,Ge.prototype.addLayerBefore=Ge.prototype.Ww,Ge.prototype.addLayer=Ge.prototype.Al,Ge.prototype.moveParts=Ge.prototype.moveParts,Ge.prototype.copyParts=Ge.prototype.Kj,Ge.prototype.removeParts=Ge.prototype.Is,Ge.prototype.remove=Ge.prototype.remove,Ge.prototype.add=Ge.prototype.add,Ge.prototype.clearDelayedGeometries=Ge.prototype.bx,Ge.prototype.setProperties=Ge.prototype.nm,Ge.prototype.attach=Ge.prototype.Du,Ge.prototype.set=Ge.prototype.set,Ge.prototype.resetInputOptions=Ge.prototype.Sx,Ge.prototype.setInputOption=Ge.prototype.sA,Ge.prototype.getInputOption=Ge.prototype.Ql,Ge.prototype.resetRenderingHints=Ge.prototype.Tx,Ge.prototype.setRenderingHint=Ge.prototype.Xx,Ge.prototype.getRenderingHint=Ge.prototype.Gf,Ge.prototype.maybeUpdate=Ge.prototype.bd,Ge.prototype.requestUpdate=Ge.prototype.$b,Ge.prototype.delayInitialization=Ge.prototype.Xy,Ge.prototype.isUpdateRequested=Ge.prototype.Pz,Ge.prototype.invalidateDocumentBounds=Ge.prototype.Ya,Ge.prototype.findObjectsNear=Ge.prototype.og,Ge.prototype.findPartsNear=Ge.prototype.mz,Ge.prototype.findObjectsIn=Ge.prototype.Cf,Ge.prototype.findPartsIn=Ge.prototype.ux,Ge.prototype.findObjectsAt=Ge.prototype.ji,Ge.prototype.findPartsAt=Ge.prototype.lz,Ge.prototype.findObjectAt=Ge.prototype.ic,Ge.prototype.findPartAt=Ge.prototype.Ol,Ge.prototype.focusObject=Ge.prototype.zz,Ge.prototype.alignDocument=Ge.prototype.Jy,Ge.prototype.zoomToRect=Ge.prototype.BA,Ge.prototype.zoomToFit=Ge.prototype.zoomToFit,Ge.prototype.diagramScroll=Ge.prototype.kx,Ge.prototype.focus=Ge.prototype.focus;var df=new ai,rg=null,yo=Jn.document!==void 0,Tc=null,Wh="",Ts=new yn(Ge,"None",0),Ll=new yn(Ge,"Uniform",1),Vh=new yn(Ge,"UniformToFill",2),md=new yn(Ge,"CycleAll",10),Lp=new yn(Ge,"CycleNotDirected",11),Dp=new yn(Ge,"CycleNotDirectedFast",12),Ip=new yn(Ge,"CycleNotUndirected",13),Ap=new yn(Ge,"CycleDestinationTree",14),Fp=new yn(Ge,"CycleSourceTree",15),ih=new yn(Ge,"DocumentScroll",1),gd=new yn(Ge,"InfiniteScroll",2),rh=new yn(Ge,"TreeParentCollapsed",21),Fo=new yn(Ge,"AllParentsCollapsed",22),ff=new yn(Ge,"AnyParentsCollapsed",23),Bp=new $e,kc="2.3.10",Oc="image",vd=null,og=!1;function Ss(){if(yo){var a=Jn.document.createElement("canvas"),y=a.getContext("2d"),x=jn("7ca11abfd022028846");y[x]=jn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Vn.Dx+"4ae6247590da4bb21c324ba3a84e385776",er.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",ge.za],E=1;5>E;E++)y[jn("7ca11abfd7330390")](jn(b[E-1]),10,15*E);for(y[x]=jn("39f046ebb36e4b"),x=1;5>x;x++)y[jn("7ca11abfd7330390")](jn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(er.prototype.Cd=er.prototype.Eu),vd=a}}Ge.className="Diagram",Ge.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Jn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Ge?y.H:null},Ge.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},Ge.useDOM=function(a){yo=a?Jn.document!==void 0:!1},Ge.isUsingDOM=function(){return yo},Ge.None=Ts,Ge.Uniform=Ll,Ge.UniformToFill=Vh,Ge.CycleAll=md,Ge.CycleNotDirected=Lp,Ge.CycleNotDirectedFast=Dp,Ge.CycleNotUndirected=Ip,Ge.CycleDestinationTree=Ap,Ge.CycleSourceTree=Fp,Ge.DocumentScroll=ih,Ge.InfiniteScroll=gd,Ge.TreeParentCollapsed=rh,Ge.AllParentsCollapsed=Fo,Ge.AnyParentsCollapsed=ff;function sg(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Lc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=Jn[jn("76a715b2f73f148a")][jn("72ba13b5")]||"";if(a.Rc=!0,yo){var b=Ge[jn("76a115b6ed251eaf4692")];if(b)for(var E=Bp.iterator;E.next()&&(b=E.value,b=jn(b).split(jn("39e9")),!(6>b.length));){var z=jn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var tt=jn(Vn[jn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var nt=Jn[jn("74a900bae4370f8b51")][jn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=nt[jn("73a612b6fb191d")](jn("3aad1ab6e022098b4dc4")),z=jn(b[2]),-1<tt&&(nt=nt[jn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<nt&&nt<tt),!a.Rc))break;for(tt=x[jn("76ad18b4f73e")],nt=x[jn("73a612b6fb191d")](jn("35e7"))+2;nt<tt;nt++)y+=x[nt];if(tt=y[jn("73a612b6fb191d")](z),0>tt&&z!==jn("7da71ca0ad381e90")&&(tt=y[jn("73a612b6fb191d")](jn("76a715b2ef3e149757"))),0>tt&&(tt=y[jn("73a612b6fb191d")](jn("76a715b2ef3e149757"))),0>tt&&(tt=y[jn("73a612b6fb191d")](jn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[jn("73a612b6fb191d")](jn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[jn("73a612b6fb191d")](jn("35"))||y[jn("73a612b6fb191d")](jn("35"))===-1),!a.Rc||x[jn("73a612b6fb191d")](jn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[jn("73a612b6fb191d")](z)),!a.Rc)||(tt=Jn[jn("76a715b2f73f148a")][jn("69ad17a1e03e")],nt=tt[jn("73a612b6fb191d")](jn("7fb002b6ed25128b4da25b2e")),-1<nt&&(a.Rc=!(tt[jn("73a612b6fb191d")](z)>nt),!a.Rc)))break;if(z[0]==="#"){tt=Jn.document.createElement("div");for(var it=b[0].replace(/[A-Za-z]/g,"");4>it.length;)it+="9";if(nt=it,it=it.substr(it.length-4),b="",b+=["gsh","gsf"][parseInt(it.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(it.substr(0,1),10)%4],tt[jn("79a417a0f0181a8946")]=b,Jn.document[jn("78a712aa")]){Jn.document[jn("78a712aa")][jn("7bb806b6ed32388c4a875b")](tt),it=Jn.getComputedStyle(tt).getPropertyValue(jn("78a704b7e62456904c9b12701b6532a8"));var ot=Jn.getComputedStyle(tt).getPropertyValue(jn("75b817b0ea2202"));if(Jn.document[jn("78a712aa")][jn("68ad1bbcf533388c4a875b")](tt),it){if(tt=Jn[jn("77a902b0eb1b1e804a8a")],ot==="0."+parseInt(nt,10)%100||it.indexOf(parseInt(z[1]+z[2],16))!==-1&&it.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(jn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var st in tt)if(b===tt[st].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(st=x[jn("76ad18b4f73e")],E=x[jn("73a612b6fb191d")](jn("35e7"))+2;E<st;E++)y+=x[E];x=y[jn("73a612b6fb191d")](jn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[jn("73a612b6fb191d")](jn("35")))}}}return 0<a.Rc&&a!==a.wy}sg.className="DiagramHelper";function Tu(a){this.j=a===void 0?new Lt:a,this.o=new Lt}$n.Object.defineProperties(Tu.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 yd="DraggingInfo";Tu.className="DraggingInfo";function et(a,y,x){this.node=a,this.info=y,this.Su=x}et.className="DraggingNodeInfoPair";function rt(){this.reset()}rt.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new kn(NaN,NaN).freeze(),this.gridSnapCellSpot=gr,this.gridSnapOrigin=new Lt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},rt.className="DraggingOptions";function ut(a,y){if(typeof a=="string"||Jn.Element&&a instanceof Element)var x=Ge.call(this,a)||this;else x=Ge.call(this)||this,y=a;return at(x),y&&x.nm(y),x}Xn(ut,Ge);function at(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Lr,a.layout=new as}ut.prototype.reset=function(){Ge.prototype.reset.call(this),at(this)},ut.className="Palette";function ct(a,y){if(typeof a=="string"||Jn.Element&&a instanceof Element)var x=Ge.call(this,a)||this;else x=Ge.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Ai;var E=new ar;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Xi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Bt,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var tt=z.viewportBounds,nt=b.lastInput.documentPoint;z.position=new Lt(nt.x-tt.width/2,nt.y-tt.height/2)}},x.Pf=function(){b.Ya(),Mt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&Mt(b)},x.autoScale=Ll,x.vb=!1,y&&Object.assign(x,y),x}Xn(ct,Ge),ct.prototype.computePixelRatio=function(){return 1},ct.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(Mc(this),this.ql===null){var x=new oa(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),wt(this)}finally{this.ta=a,this.ib=y}}}Ge.prototype.redraw.call(this)},ct.prototype.gc=function(){if(this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!(this.ta instanceof _a)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Mc(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?wt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function wt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=un.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Va(y,E),un.free(E),ms(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),E.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var nt=y[tt],it=a;if(nt.visible&&nt.opacity!==0){var ot=nt.diagram.grid.part;if(!x&&nt.isTemporary)b&&ot.layer===nt&&(nt=Nu(nt,E),ot.gc(E,it),E.globalAlpha=nt);else{for(var st=Nu(nt,E),ht=it.scale,ft=un.alloc(),mt=nt.Pa.s,xt=mt.length,St=0;St<xt;St++){var Ft=mt[St];(b||Ft!==ot)&&nt.Oj(E,Ft,it,null,ht,ft,!1)}un.free(ft),E.globalAlpha=st}}}}}function Mt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=kn.alloc();E.h(x.width,x.height),b.desiredSize=E,kn.free(E),a=2/a.scale,b instanceof ar&&(b.strokeWidth=a),y.location=new Lt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ct.prototype.computeBounds=function(){var a=this.observed;if(a===null)return $r;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ct.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ct.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Mt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},$n.Object.defineProperties(ct.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ct&&Rt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),Mt(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),Mt(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)}}}),ct.className="Overview";function Bt(){po.call(this),this.j=null}Xn(Bt,po),Bt.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 Lt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Lt(a.x-this.j.x,a.y-this.j.y)),!0)},Bt.prototype.doActivate=function(){this.j=null,po.prototype.doActivate.call(this)},Bt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Bt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new Lt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Lt(a.x-this.j.x,a.y-this.j.y)}}},Bt.className="OverviewDraggingTool";function At(){wi(this),this.H=ru,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=$r,this.hb=!0,this.cg=null,this.ob=200}At.prototype.toString=function(){return"CommandHandler"},At.prototype.Xe=function(a){this.H=a},At.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=$i?y.meta:y.control,b=y.shift,E=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||b&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||b&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||E&&b&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||E&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():b&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},At.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},At.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof io&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},At.prototype.canStopCommand=function(){return!0},At.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},At.prototype.canSelectAll=function(){return this.diagram.allowSelect},At.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new pn,x=a.selection.iterator;x.next();)Uh(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},At.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},At.prototype.copySelection=function(){var a=this.diagram,y=new pn;for(a=a.selection.iterator;a.next();)Uh(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},At.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},At.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},At.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},At.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Tc=null,Wh="";else{x=y.model;var b=!1,E=!1,z=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new $e,x.addAll(z),Tc=x,Wh=y.model.dataFormat}}y.R("ClipboardChanged",x)},At.prototype.pasteFromClipboard=function(){var a=new pn,y=Tc;if(y===null)return a;var x=this.diagram;if(Wh!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,tt=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),y=tt.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},At.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);$h(y,z,new Lt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},At.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Tc===null||Tc.count===0||Wh!==a.model.dataFormat)},At.prototype.undo=function(){this.diagram.undoManager.undo()},At.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},At.prototype.redo=function(){this.diagram.undoManager.redo()},At.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},At.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ts&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},At.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ts?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},At.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ts&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},At.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ts?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},At.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},At.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},At.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;iu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=$r):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Xd(y)},At.prototype.canZoomToFit=function(){return this.diagram.allowZoom},At.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(it){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;iu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=oe(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var it=E.pop();0<E.length&&it instanceof hi&&it.isTreeExpanded&&(!(it instanceof rr)||it.isSubGraphExpanded);)it=E.pop();0<E.length?(it instanceof Ai&&y.tv(it.actualBounds),it instanceof hi&&!it.isTreeExpanded&&(it.isTreeExpanded=!0),it instanceof rr&&!it.isSubGraphExpanded&&(it.isSubGraphExpanded=!0)):(it instanceof Ai&&y.es(it.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Ti(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",tt),z()}}else{var nt=y.position.copy();y.es(a.actualBounds),nt.Xa(y.position)&&x.Cc()}}};function oe(a,y,x){if(y.isVisible())return x;if(y instanceof Pr)oe(a,y.adornedPart,x);else if(y instanceof ei){var b=y.fromNode;b!==null&&oe(a,b,x),y=y.toNode,y!==null&&oe(a,y,x)}else y instanceof hi&&(b=y.labeledLink,b!==null&&oe(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),oe(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),oe(a,y,x));return x}At.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ai)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},At.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),iu(y.animationManager,"Collapse Tree");var x=new $e;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof hi&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},At.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof hi&&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 hi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},At.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),iu(y.animationManager,"Expand Tree");var x=new $e;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof hi&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},At.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof hi)||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 hi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},At.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new $e,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&E.add(tt)}for(var nt=new $e,it=E.iterator;it.next();){var ot=it.value;z=!1;for(var st=E.iterator;st.next();)if(ot.Td(st.value)){z=!0;break}z||nt.add(ot)}if(0<nt.count){var ht=nt.first().containingGroup;if(ht!==null)for(;ht!==null;){E=!1;for(var ft=nt.iterator;ft.next();)if(!ft.value.Td(ht)){E=!0;break}if(E)ht=ht.containingGroup;else break}if(x instanceof rr)sa(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var mt=y.copyNodeData(x);ae(mt)&&(y.xf(mt),b=a.ii(mt))}if(b!==null){ht!==null&&this.isValidMember(ht,b)&&(b.containingGroup=ht);for(var xt=nt.iterator;xt.next();){var St=xt.value;this.isValidMember(b,St)&&(St.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},At.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function dn(a){var y=Ne();for(a=a.iterator;a.next();){var x=a.value;x instanceof ei||y.push(x)}a=new pn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,tt=0;tt<x;tt++)if(E.Td(y[tt])){z=!1;break}z&&a.add(E)}return Fe(y),a}At.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof ei)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},At.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new $e;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof rr&&z.canUngroup()&&b.add(z)}var tt=new $e;if(0<b.count){y.clearSelection(!0);for(var nt=b.iterator;nt.next();){var it=nt.value;it.expandSubGraph();var ot=it.containingGroup,st=ot!==null&&ot.data!==null?x.wa(ot.data):void 0;tt.addAll(it.memberParts);for(var ht=tt.iterator;ht.next();){var ft=ht.value;if(ft.isSelected=!0,!(ft instanceof ei)){var mt=ft.data;mt!==null?x.mp(mt,st):ft.containingGroup=ot}}y.remove(it)}}y.R("SelectionUngrouped",b,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},At.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof rr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&y.canUngroup())return!0;return!1},At.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=dn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},At.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),iu(y.animationManager,"Collapse SubGraph");var x=new $e;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof rr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},At.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof rr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&y.isSubGraphExpanded)return!0;return!1},At.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),iu(y.animationManager,"Expand SubGraph");var x=new $e;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof rr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},At.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof rr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&!y.isSubGraphExpanded)return!0;return!1},At.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Zr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},At.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Zr))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 Zr&&x.editable}),a!==null))return!0;return!1},At.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof pe?E=a.ga(cr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Lt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Eu(x,!1,a)}},At.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},At.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new ai,a===null)return b;for(var z=a.iterator;z.next();)su(x,b,z.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(z=a.iterator;z.next();)a=z.value,a instanceof ei&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},$n.Object.defineProperties(At.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Rt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),At.className="CommandHandler",Gm=function(){return new At};function pe(){wi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Lt(NaN,NaN).freeze(),this.jd=Ur,this.Ab=new er,this.wh=new er,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Qo,this.uc=new un(NaN,NaN,NaN,NaN).freeze(),this.Ib=new un(NaN,NaN,NaN,NaN).freeze(),this.dc=new un(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=di,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 Kn,zn,Pi,Di,Zi,or,vr,dr,xr,jr;pe.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=Jt(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},pe.prototype.Vw=function(a){var y=this.Dh;if(ze(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},pe.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},pe.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},pe.prototype.copy=function(){return this.clone()},yt=pe.prototype,yt.qb=function(a){a.classType===ei?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Rt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===pe&&(this.stretch=a)},yt.toString=function(){return Xe(this.constructor)+"#"+Ui(this)},yt.th=function(){this.A!==null&&(this.A.nc=!0)};function hr(a){a.A===null?a.A=new wd:a.A.nc&&(a.A=a.A.copy())}yt.Xc=function(){if(this.ba===null){var a=new Rp;a.Xi=mr,a.yj=mr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},yt.cb=function(a,y,x,b,E,z,tt){var nt=this.part;if(nt!==null&&(nt.gk(a,y,x,b,E,z,tt),x===this&&a===so&&cs(this)&&qr(this,nt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new ai),tt=z.undoManager.transactionLevel===0,a.startCondition===Rh?tt=!0:a.startCondition===Cc&&(tt=!1),tt?(z=new ps,Wm(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(iu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Un&&x===nt&&(nt.l&16777216)!==0&&nt.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)nt=x[E],nt instanceof Un&&Fc(nt,function(it){it.data!==null&&it.l&16777216&&it.La(y)})};function qr(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,tt=null;if(z.sourceName!==null){if(tt=T1(z,b,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var nt=y.diagram;nt===null||nt.skipsModelSourceBindings||z.sp(a,nt.model.modelData,x,b)}else{if(nt=b.data,nt===null)continue;var it=y.diagram;it===null||it.skipsModelSourceBindings||z.sp(a,nt,x,b)}tt===a&&(nt=b.ks(z.Ai),nt!==null&&z.Mv(nt,tt,x))}}yt.ks=function(a){return this.bindingId===a?this:null},yt.g=function(a,y,x){this.cb(so,a,this,y,x)},yt.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new er);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function _o(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}yt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?gi(a.x,a.y,0,0,0,b.height)<=y||gi(a.x,a.y,0,b.height,b.width,b.height)<=y||gi(a.x,a.y,b.width,b.height,b.width,0)<=y||gi(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},yt.se=function(){return!0},yt.ca=function(a){var y=Lt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Lt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),z=b.Ql("extraTouchArea"),tt=z/2,nt=this.naturalBounds;b=this.Df()*b.scale;var it=1/b;if(nt.width*b<E&&nt.height*b<E)return a=Sr(x.x-tt*it,x.y-tt*it,x.width+z*it,x.height+z*it,y.x,y.y),Lt.free(y),a}return E=!1,(this instanceof Pr||this instanceof ar?Sr(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),Lt.free(y),E},yt.gh=function(a){var y=this.naturalBounds;return Sr(0,0,y.width,y.height,a.x,a.y)},yt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=un.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Lt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),Lt.free(E),un.free(y),b},yt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Lt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),Lt.free(E),b},yt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Lt.allocAt(0,0),E=Lt.allocAt(0,x.height),z=Lt.allocAt(x.width,x.height),tt=Lt.allocAt(x.width,0),nt=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))nt=!0;else{x=un.allocAt(0,0,x.width,x.height);var it=Lt.allocAt(a.x,a.y);x.ca(y.Cd(it))?nt=!0:(it.h(a.x,a.bottom),x.ca(y.Cd(it))?nt=!0:(it.h(a.right,a.bottom),x.ca(y.Cd(it))?nt=!0:(it.h(a.right,a.y),x.ca(y.Cd(it))&&(nt=!0)))),Lt.free(it),un.free(x),!nt&&(ge.us(a,b,E)||ge.us(a,E,z)||ge.us(a,z,tt)||ge.us(a,tt,b))&&(nt=!0)}return Lt.free(b),Lt.free(E),Lt.free(z),Lt.free(tt),nt},yt.ga=function(a,y){if(y===void 0&&(y=new Lt),a instanceof Fi){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},yt.mi=function(a){a===void 0&&(a=new un);var y=this.naturalBounds,x=this.oe,b=Lt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ar(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ar(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ar(a,b.x,b.y,0,0),Lt.free(b),a},yt.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},yt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},yt.qs=function(a,y){return y===void 0&&(y=new Lt),y.assign(a),this.oe.Cd(y),y},yt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},yt.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),nt=z.m22*tt,it=-z.m12*tt,ot=-z.m21*tt,st=z.m11*tt,ht=tt*(z.m21*z.dy-z.m22*z.dx),ft=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,ge.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(tt=a*nt+y*ot+ht,a=a*it+y*st+ft,y=x*nt+b*ot+ht,x=x*it+b*st+ft,E.h(0,0),b=this.naturalBounds,x=ge.Ff(0,0,b.width,b.height,tt,a,y,x,E),E.transform(z),x)},pe.prototype.measure=function(a,y,x,b){if(Il(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+tt:a,y=isFinite(E.width)?E.width+tt:y):(a=isFinite(E.width)?E.width+tt:a,y=isFinite(E.height)?E.height+tt:y),E=x||0,tt=b||0;var nt=this instanceof Un;switch(tl(this,!0)){case zn:tt=E=0,nt&&(y=a=1/0);break;case Kn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(tt=y);break;case Di:isFinite(a)&&a>x&&(E=a),tt=0,nt&&(y=1/0);break;case Zi:isFinite(y)&&y>b&&(tt=y),E=0,nt&&(a=1/0)}nt=this.maxSize;var it=this.minSize;E>nt.width&&it.width<nt.width&&(E=nt.width),tt>nt.height&&it.height<nt.height&&(tt=nt.height),x=Math.max(E,it.width),b=Math.max(tt,it.height),nt.width<x&&(x=Math.min(it.width,x)),nt.height<b&&(b=Math.min(it.height,b)),a=Math.min(nt.width,a),y=Math.min(nt.height,y),a=Math.max(x,a),y=Math.max(b,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=b,b=z),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Rt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},pe.prototype.Wl=function(){},pe.prototype.Dd=function(){return!1},pe.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=un.alloc();z.assign(this.Ib),this.Ib.ka(),Hs(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&lh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Zr&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Rt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),lu(this,!1),un.free(z)},yt=pe.prototype,yt.eh=function(){};function ks(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,b+=y,E+=tt,y=tl(a,!0),x===b&&z===E&&(y=zn),y){case zn:(x>b||z>E)&&(Bo(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case Kn:Bo(a,!0),a.measure(b,E,0,0);break;case Di:Bo(a,!0),a.measure(b,z,0,0);break;case Zi:Bo(a,!0),a.measure(x,E,0,0)}}}yt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||z0(x,!0),this.N(),to(a,y)||(x.oh(),this.Pn(x)))},yt.Pn=function(a){this.portId!==null&&(z0(a,!0),a instanceof hi&&Kx(a,this))},yt.gc=function(a,y){if(!Wl(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var z=this instanceof Un&&lh(this),tt=this.Ib;if(z){var nt=this.Ib,it=this.dc,ot=this.areaBackground,st=this.Ma;ot===null&&st===null||a.yc(),ot!==null&&(xo(this,a,ot,!0,!0,it,nt),ot instanceof Fr&&ot.type===_l?(a.beginPath(),a.rect(nt.x,nt.y,nt.width,nt.height),a.ng(ot)):a.fillRect(nt.x,nt.y,nt.width,nt.height)),st!==null&&(xo(this,a,st,!0,!1,it,nt),st instanceof Fr&&st.type===_l?(a.beginPath(),a.rect(nt.x,nt.y,nt.width,nt.height),a.ng(st)):a.fillRect(nt.x,nt.y,nt.width,nt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,nt=this.panel,this.l&4096&&ls(this),ot=this.part,it=!1;var ht=0;ot&&y.Gf("drawShadows")&&(it=ot.isShadowed)&&(st=ot.shadowOffset,ht=Math.max(st.y,st.x)*y.scale*y.Mb),st=this.Dd();var ft;if(!(ft=y.$i||!st)){var mt=this.naturalBounds;ft=this.wh;var xt=ft.m11,St=ft.m21,Ft=ft.dx,Ot=ft.m12,Wt=ft.m22,Ut=ft.dy,ne,fe=ne=0;ft=ne*xt+fe*St+Ft;var _e=ne*Ot+fe*Wt+Ut;ne=mt.width+ht,fe=0;var si=ne*xt+fe*St+Ft;ne=ne*Ot+fe*Wt+Ut,fe=Math.min(ft,si);var bi=Math.min(_e,ne),mi=Math.max(ft+0,si)-fe,qn=Math.max(_e+0,ne)-bi;ft=fe,_e=bi,ne=mt.width+ht,fe=mt.height+ht,si=ne*xt+fe*St+Ft,ne=ne*Ot+fe*Wt+Ut,fe=Math.min(ft,si),bi=Math.min(_e,ne),mi=Math.max(ft+mi,si)-fe,qn=Math.max(_e+qn,ne)-bi,ft=fe,_e=bi,ne=0,fe=mt.height+ht,si=ne*xt+fe*St+Ft,ne=ne*Ot+fe*Wt+Ut,fe=Math.min(ft,si),bi=Math.min(_e,ne),mi=Math.max(ft+mi,si)-fe,qn=Math.max(_e+qn,ne)-bi,ft=fe,_e=bi,ht=y.viewportBounds,mt=ht.x,xt=ht.y,ft=!(ft>ht.width+mt||mt>mi+ft||_e>ht.height+xt||xt>qn+_e)}if(ft){if(ft=(this.l&256)!==0,a.clipInsteadOfFill&&(ft=!1),this instanceof Zr&&(a.font=this.font),ft){if(_e=nt.se()?nt.naturalBounds:nt.actualBounds,mi=Math.max(tt.x,_e.x),qn=Math.max(tt.y,_e.y),ht=Math.min(tt.right,_e.right)-mi,mt=Math.min(tt.bottom,_e.bottom)-qn,xt=this.tb,xt!==null&&(mi=xt.x,qn=xt.y,ht=xt.width,mt=xt.height),mi>tt.width+tt.x||tt.x>_e.width+_e.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(mi,qn,ht,mt),a.clip()}if(st){if(!ot.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}it&&(_e=ot.shadowOffset,a.Ev(_e.x*y.scale*this.scale*y.Mb,_e.y*y.scale*this.scale*y.Mb,ot.shadowBlur),ku(a),a.shadowColor=ot.shadowColor)}it&&this.shadowVisible===!0?ku(a):it&&this.shadowVisible===!1&&au(a),ot=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Dl(this,a,ot,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),it&&ns(this,nt)&&this.shadowVisible===null&&au(a),this.Ma!==null&&(a.yc(),al(this,a,ot,tt)),it&&(this.Ma!==null||this.areaBackground!==null||ns(this,nt))?(xa(this,!0),this.shadowVisible===null&&au(a)):xa(this,!1),this.hh(a,y),it&&this.l&512&&ku(a),st&&it&&au(a),ft&&(a.restore(),a.Vc(this instanceof Un)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ns(a,y){return y===null?!1:(lh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Un.Auto||y.type===Un.Spot)&&y.Pb()!==a)}yt.Dv=function(){};function Dl(a,y,x,b){xo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Fr&&a.areaBackground.type===_l?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function al(a,y,x,b){var E=a.kq(),z=x.x,tt=x.y,nt=x.width+E,it=x.height+E;xo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Fr&&a.Ma.type===_l?(y.beginPath(),y.rect(z-E/2,tt-E/2,nt,it),y.ng(a.Ma)):y.fillRect(z-E/2,tt-E/2,nt,it)}function bs(a,y,x){for(var b=y.O.s,E=b.length,z=-1,tt=0;tt<E;tt++)if(b[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Un.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 Wl(a,y,x){if(!(y instanceof xl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&bs(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),ku(y),y.shadowColor=a.shadowColor}a instanceof Zr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Un;var nt=a instanceof Un?lh(a):!1;a.l&4096&&ls(a);var it=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&nt?(jp(y,1,0,0,1,0,0),a.svg=y.ad):z?(jp(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):jp(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var ot=tt.copy().Vj();y.rb.ha=[ot.m11,ot.m12,ot.m21,ot.m22,ot.dx,ot.dy],Dl(a,y,E,it),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(nt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),al(a,y,E,it),nt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],al(a,y,E,it)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,E=a.part,nt=!1,E&&x.Gf("drawShadows")&&(nt=E.isShadowed),y.clipInsteadOfFill&&(nt=!1),a.Dd()&&nt&&ku(y),nt&&a.shadowVisible===!0?ku(y):nt&&a.shadowVisible===!1&&au(y),E=a.panel,nt&&ns(a,E)&&a.shadowVisible===null&&au(y),y.Il&&(ot=x.computePixelRatio(),ot="drop-shadow("+y.shadowOffsetX/ot+"px "+y.shadowOffsetY/ot+"px "+y.shadowBlur/ot/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",ot),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",ot)),nt&&(a.Ma!==null||a.areaBackground!==null||ns(a,E))?(xa(a,!0),a.shadowVisible===null&&au(y)):xa(a,!1),E=nt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,nt=z?a.svg:y.yd,ot=a.svg,!z&&ot!==null&&nt!==ot&&ot.parentNode===a.panel.svg?(a.svg.replaceWith(nt),a.svg=nt,nt!==null&&a.$o(y,b,it,nt),qs(y,ot),!0):(a.svg=nt,tt!==null&&nt===null&&(ag(y),y.nh.pop()),nt===null||(a.$o(y,b,it,nt),y.Il&&(x=x.computePixelRatio(),a.Dv(nt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&ku(y),a.Dd()&&au(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&nt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&nt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(nt):y.Nj.prepend(nt),y.ti=nt):b!==null&&bs(a,b,nt),tt!==null&&tt(a,nt)),!0)}yt.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),E=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-E,z=this.tb,z!==null&&(y=z.x,E=z.y,tt=z.width,x=z.height),z=b.getAttribute("clip-path");var nt=null;z!==null&&(nt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),nt===null?(z="CLIP"+Vi++,nt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:tt,height:x}),this instanceof Un&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),nt.appendChild(y),a.svg.appendChild(nt),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=nt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),qs(a,b)};function qs(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Es(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=xn(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}yt.hh=function(){},yt.lv=function(){this.Uc=!0},yt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Un?lh(this):!1;if(!(this instanceof Un&&E))if(this instanceof nl){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],z!==null&&Jy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof Un)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof ar){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=b.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Dl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&ug(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(ug(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Un))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),al(this,a,this.naturalBounds,this.actualBounds),y.Ma?(ug(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&&ug(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},yt.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 xo(a,y,x,b,E,z,tt){if(x!==null){var nt=1,it=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ot=a.kq();if(nt=z.width,it=z.height,E?(nt=tt.width,it=tt.height):b||(nt+=ot,it+=ot),(z=y instanceof Ac)&&x.xe&&(x.type===wf||x.yk===nt&&x.ft===it))var st=x.xe;else{var ht=0,ft=0,mt=0,xt=0,St=0,Ft=0;if(Ft=St=0,E?(St=tt.x,Ft=tt.y):b||(St-=ot/2,Ft-=ot/2),ht=x.start.x*nt+x.start.offsetX,ft=x.start.y*it+x.start.offsetY,mt=x.end.x*nt+x.end.offsetX,xt=x.end.y*it+x.end.offsetY,ht+=St,mt+=St,ft+=Ft,xt+=Ft,x.type===Lu)st=y.createLinearGradient(ht,ft,mt,xt);else if(x.type===_l)Ft=isNaN(x.endRadius)?Math.max(nt,it)/2:x.endRadius,isNaN(x.startRadius)?(St=0,Ft=Math.max(nt,it)/2):St=x.startRadius,st=y.createRadialGradient(ht,ft,St,mt,xt,Ft);else if(x.type===wf)try{st=y.createPattern(x.pattern,"repeat")}catch(Wt){st=null}if(x.type!==wf&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)st.addColorStop(E.key,E.value);if(z&&(x.xe=st,st!==null&&(x.yk=nt,x.ft=it),st===null&&x.type===wf&&x.yk!==-1)){x.yk=-1;var Ot=a.diagram;Ot!==null&&x.yk===-1&&Ti(function(){Ot.redraw()},600)}}b?y.fillStyle=st:y.strokeStyle=st}}}yt.rg=function(a){if(a instanceof Un)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},yt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},yt.If=function(){for(var a=this instanceof Un?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ls(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){ra(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)}ra(a,!1),Vl(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Vl(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,Vl(a,!1)))}yt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Lt.alloc();z.yi(y,x,b,E,cr),a.rotate(this.Kb,z.x,z.y),Lt.free(z)}},yt.v=function(a){if(!Il(this)){a===void 0&&(a=!1),Bo(this,!0),lu(this,!0);var y=this.panel;y===null||a||y.v()}},yt.Uj=function(){Il(this)||(Bo(this,!0),lu(this,!0))};function $s(a){if(!Hs(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof hi&&a.Bd(),y.$b())),lu(a,!0)}}yt.Uk=function(){!(this.l&2048)&&(ra(this,!0),Vl(this,!0))},yt.Wu=function(){Vl(this,!0)},yt.N=function(){var a=this.part;a!==null&&a.N()};function tl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Un.Table?Oa(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Un.Auto&&b.Pb()===a?is(a,Kn,y):x===or?b!==null?b.type===Un.Spot&&b.Pb()===a?is(a,Kn,y):(x=b.defaultStretch,x===or?is(a,zn,y):is(a,x,y)):is(a,zn,y):is(a,x,y)}function Oa(a,y,x,b){var E=a.stretch;if(E!==or)return is(a,E,b);var z=E=null;switch(y.stretch){case Zi:z=!0;break;case Kn:z=!0}switch(x.stretch){case Di:E=!0;break;case Kn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Di||y===Kn),z===null&&(z=y===Zi||y===Kn),E===!0&&z===!0?is(a,Kn,b):E===!0?is(a,Di,b):z===!0?is(a,Zi,b):is(a,zn,b)}function is(a,y,x){if(x)return y;if(y===zn||(x=a.desiredSize,x.w()))return zn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Di)return zn;if(y===Kn)return Zi}else{if(y===Zi)return zn;if(y===Kn)return Di}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Zi)return zn;if(y===Kn)return Di}else{if(y===Di)return zn;if(y===Kn)return Zi}return y}function xa(a,y){a.l=y?a.l|512:a.l&-513}function cs(a){return(a.l&1024)!==0}function xd(a,y){a.l=y?a.l|1024:a.l&-1025}function ra(a,y){a.l=y?a.l|2048:a.l&-2049}function Vl(a,y){a.l=y?a.l|4096:a.l&-4097}function Il(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Hs(a){return(a.l&16384)!==0}function lu(a,y){a.l=y?a.l|16384:a.l&-16385}yt.Gj=function(){this.svg=null},yt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},yt.Av=function(){},yt.zv=function(a){return this.pa=a,$s(this),!0},yt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},yt.kq=function(){return 0};function Dc(a){var y=a.part;if(y instanceof hi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Kx(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Un?a instanceof hi?a.Bd():a.qm(a,function(x){Dc(x)}):Dc(a))}yt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Oo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&px(a)&&Rt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new $e),this.localBindings.add(E),this},yt.set=function(a){return Object.assign(this,a),this},yt.Du=function(a){return i0(this,a),this},yt.apply=function(a){return a(this),this},yt.nm=function(a){return Ec(this,a),this},yt.pz=function(){return this.ih()},yt.ih=function(){for(var a=this instanceof Un?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},yt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ai),this.animationTriggers.add(a.propertyName,a),this};function Kl(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var z=pf.I(a);typeof z=="function"?(x=Jt(arguments),b=z(x),ae(b)||Rt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Jn.go[a]}if(b===null&&(E!=null&&E.constructor||Rt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Ge&&1<x.length){z=b;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(dp(z,tt),E++)}for(;E<x.length;E++)z=x[E],z===void 0?Rt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):i0(b,z);return b}function i0(a,y){if(typeof y=="string")if(a instanceof Zr)a.text=y;else if(a instanceof ar)a.figure=y;else if(a instanceof nl)a.source=y;else if(a instanceof Un)y=wa.I(y),y!==null&&(a.type=y);else if(a instanceof Fr){var x=zi(Fr,y);x!==null?a.type=x:Rt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof ti?(y=zi(ti,y),y!==null&&(a.type=y)):a instanceof Tr&&(y=zi(Tr,y),y!==null&&(a.type=y));else if(y instanceof pe)a instanceof Un||Rt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ro){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Ro?Mg(b,y):Rt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof yn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof $o)a.type=y;else if(y instanceof Oo)a instanceof pe||a instanceof Ro?a.bind(y):Rt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof va)a instanceof pe?a.Jv(y):Rt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Vo)a instanceof ti&&a.type===ti.o?a.figures.add(y):Rt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Tr)a instanceof Vo?a.segments.add(y):Rt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof no)a instanceof Ge||a instanceof rr?a.layout=y:Rt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)i0(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Fr){x=new Ii;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Ec(a,x)}else if(a instanceof Ro){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Rt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Rt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Ii;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Ec(a,E)}else Ec(a,y);else Rt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function oh(a,y){pf.add(a,y)}function lg(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}$n.Object.defineProperties(pe.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new wd),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 wd),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 wd),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(hr(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&&(hr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Vs},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Kh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Vs&&(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 Kh),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 Kh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:ur},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Kh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:or},set:function(a){var y=this.stretch;y!==a&&(hr(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&&(hr(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)&&qt(a,"0 <= value <= 1",pe,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(jc(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(jc(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(),Yy(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&&Sd(a,"GraphObject.areaBackground"),a instanceof Fr&&a.freeze(),hr(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&&Sd(a,"GraphObject.background"),a instanceof Fr&&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 Ai)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new Lt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Rt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof ar&&this.qc(),this.g("desiredSize",b,a),cs(this)&&(a=this.part,a!==null&&(qr(this,a,"width"),qr(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 kn(a,this.jd.height).freeze(),this.v(),this instanceof ar&&this.qc(),this.g("desiredSize",y,a),cs(this)&&(a=this.part,a!==null&&qr(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 kn(this.jd.width,a).freeze(),this.v(),this instanceof ar&&this.qc(),this.g("desiredSize",y,a),cs(this)&&(a=this.part,a!==null&&qr(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ji},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),hr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Gr},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(),hr(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 Xi(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&&ls(this),this.Ab}},oe:{get:function(){return this.l&4096&&ls(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(hr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:zn},set:function(a){this.reshapingBehavior!==a&&(hr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&Rt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),$s(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&&qt(a,">= 0",pe,"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&&qt(a,">= 1",pe,"columnSpan"),hr(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&&qt(a,">= 0",pe,"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&&qt(a,">= 1",pe,"rowSpan"),hr(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&&(hr(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 hi||Rt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&W0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Ux(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:mr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Dc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&qt(a,">= 0",pe,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Dc(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),Dc(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&&qt(a,">= 0",pe,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:mr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Dc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&qt(a,">= 0",pe,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Dc(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),Dc(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&&qt(a,">= 0",pe,"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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(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&&(hr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),pe.prototype.trigger=pe.prototype.Jv,pe.prototype.findBindingPanel=pe.prototype.ih,pe.prototype.findTemplateBinder=pe.prototype.pz,pe.prototype.setProperties=pe.prototype.nm,pe.prototype.apply=pe.prototype.apply,pe.prototype.attach=pe.prototype.Du,pe.prototype.set=pe.prototype.set,pe.prototype.isEnabledObject=pe.prototype.If,pe.prototype.isVisibleObject=pe.prototype.Ed,pe.prototype.isContainedBy=pe.prototype.rg,pe.prototype.getNearestIntersectionPoint=pe.prototype.rs,pe.prototype.getLocalPoint=pe.prototype.qs,pe.prototype.getDocumentScale=pe.prototype.Df,pe.prototype.getDocumentAngle=pe.prototype.li,pe.prototype.getDocumentBounds=pe.prototype.mi,pe.prototype.getDocumentPoint=pe.prototype.ga,pe.prototype.intersectsRect=pe.prototype.Yc,pe.prototype.containedInRect=pe.prototype.fh,pe.prototype.containsRect=pe.prototype.Re,pe.prototype.containsPoint=pe.prototype.ca,pe.prototype.raiseChanged=pe.prototype.g,pe.prototype.raiseChangedEvent=pe.prototype.cb,pe.prototype.addCopyProperty=pe.prototype.Vw;var pf=null;pe.className="GraphObject",pf=new ai,oh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=Kl(Un,Un.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Un){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Kl(ar,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Fi(0,0,2.76142374915397,2.761423749153969),spot2:new Fi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Un&&(x=b.fb("ButtonBorder"),x instanceof ar)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Un&&(x=b.fb("ButtonBorder"),x instanceof ar&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Un&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ar){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=tt,tt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Un&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ar){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Un&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof ar){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Un&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof ar))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var tt=b._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=b._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),E.skipsUndoManager=z}}},y}),oh("TreeExpanderButton",function(){var a=Kl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Kl(ar,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Or},new Oo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Oo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Pr&&(x=x.adornedPart),x instanceof hi){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),oh("SubGraphExpanderButton",function(){var a=Kl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Kl(ar,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Or},new Oo("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 Pr&&(x=x.adornedPart),x instanceof rr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),oh("ToolTip",function(){return Kl(Pr,Un.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Lt(0,3),shadowBlur:5},Kl(ar,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Fi(0,0,4,6),spot2:new Fi(1,1,-4,-4)}))}),oh("ContextMenu",function(){return Kl(Pr,Un.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Lt(0,3),shadowBlur:5},new Oo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),oh("ContextMenuButton",function(){var a=Kl("Button");a.stretch=Di;var y=a.fb("ButtonBorder");return y instanceof ar&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Fi(0,0,2,3),y.spot2=new Fi(1,1,-2,-2)),a}),oh("PanelExpanderButton",function(a){var y=lg(a,"COLLAPSIBLE"),x=Kl("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},Kl(ar,{name:"ButtonIcon",strokeWidth:2},new Oo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof ar&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var tt=E.ih();tt===null&&(tt=E.part),tt!==null&&(E=tt.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),oh("CheckBoxButton",function(a){var y=lg(a);return a=Kl("Button",{desiredSize:new kn(14,14)},Kl(ar,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Kn,geometryStretch:Pi,visible:!1},y!==""?new Oo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Un){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),oh("CheckBox",function(a){a=lg(a),a=Kl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Xi(0,1,0,0)});var y=Kl(Un,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Xi(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}),pe.None=zn=new yn(pe,"None",0),pe.Default=or=new yn(pe,"Default",0),pe.Vertical=Zi=new yn(pe,"Vertical",4),pe.Horizontal=Di=new yn(pe,"Horizontal",5),pe.Fill=Kn=new yn(pe,"Fill",3),pe.Uniform=Pi=new yn(pe,"Uniform",1),pe.UniformToFill=vr=new yn(pe,"UniformToFill",2),pe.FlipVertical=dr=new yn(pe,"FlipVertical",1),pe.FlipHorizontal=xr=new yn(pe,"FlipHorizontal",2),pe.FlipBoth=jr=new yn(pe,"FlipBoth",3),pe.make=Kl,pe.getBuilders=function(){var a=new ai,y;for(y in pf)if(y!==y.toLowerCase()){var x=pf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},pe.defineBuilder=oh,pe.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=pf.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof pe))return y&&b.set(y),b;Rt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},pe.takeBuilderArgument=lg;function wd(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=ji,this.o=Gr,this.hg=or,this.ob=this.Bi=1,this.Pf=zn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}wd.prototype.copy=function(){var a=new wd;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 Kh(){this.u=-1/0,this.o=0,this.F=ur,this.rr=Vs,this.j=this.V="None"}Kh.prototype.copy=function(){var a=new Kh;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},Kh.className="LinkElementSettings";function Rp(){this.yj=this.Xi=di,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Rp.prototype.copy=function(){var a=new Rp;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},Rp.className="LinkSettings";function Ic(){this.ha=[1,0,0,1,0,0]}Ic.prototype.copy=function(){var a=new Ic;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},Ic.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},Ic.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Ic.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,z=this.ha[0]*-b+this.ha[2]*a,tt=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Ic.className="STransform";function Cd(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Cd.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Cd.className="SGradient";function _a(a,y,x){this.ownerDocument=a=y===void 0?Jn.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 xl(this,x)}_a.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},_a.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),ae(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},_a.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},_a.prototype.focus=function(){this.Oa.focus()},_a.prototype.mx=function(){this.ownerDocument=null},$n.Object.defineProperties(_a.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}}}),_a.className="SVGSurface";function xl(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 Ic,this.j=ag(this),this.Nj=ag(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Vi++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,b,E,z,tt){a.Nj===void 0?jp(a,y,x,b,E,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+tt+")")}yt=xl.prototype,yt.arc=function(a,y,x,b,E,z,tt,nt){var it=2*Math.PI,ot=it-1e-6,st=x*Math.cos(b),ht=x*Math.sin(b),ft=a+st,mt=y+ht,xt=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(tt-ft)||1e-6<Math.abs(nt-mt))&&this.path.push(["L",ft,+mt]),0>b&&(b=b%it+it),b>ot?(this.path.push(["A",x,x,0,1,xt,a-st,y-ht]),this.path.push(["A",x,x,0,1,xt,ft,mt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),xt,a+x*Math.cos(E),y+x*Math.sin(E)])},yt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},yt.Se=function(a){this.addPath(this.path,this.rb,a||0)},yt.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},yt.clearRect=function(){},yt.clip=function(){this.Yl.clipPath=!0},yt.closePath=function(){this.path.push(["z"])},yt.createLinearGradient=function(a,y,x,b){var E=new Cd("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},yt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Vi++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Oc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},yt.createRadialGradient=function(a,y,x,b,E,z){var tt=new Cd("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=b,tt.y2=E,tt.r2=z,tt};function Jy(a,y,x,b,E,z,tt,nt,it){b=nt/b,E=it/E,z===0&&tt===0||a.rb.translate(z,tt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}yt.drawImage=function(a,y,x,b,E,z,tt,nt,it){var ot="";a instanceof HTMLCanvasElement&&(ot=a.toDataURL()),a instanceof HTMLImageElement&&(ot=a.getAttribute("src"));var st=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,tt=x,nt=b=st,it=E=a),b=b||0,E=E||0,nt=nt||0,it=it||0,Jy(this,y,x,b,E,z||0,tt||0,nt,it),z={x:0,y:0,width:st||b,height:a||E,href:ot},ge.$(b,nt)&&ge.$(E,it)?ot.toLowerCase().indexOf(".svg")===-1&&ot.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==st||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),mf(this,Oc,z,this.rb),this.addElement(Oc,z)},yt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),r0(this,this.Yl)},yt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},yt.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},mf(this,"fill",a,this.rb),this.addElement("rect",a)},yt.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},mf(this,"fill",a,this.rb),r0(this,a),this.svg.prepend(this.Ud("rect",a))},yt.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},mf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},yt.lineTo=function(a,y){this.path.push(["L",a,y])},yt.moveTo=function(a,y){this.path.push(["M",a,y])},yt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},yt.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},yt.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},yt.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())},yt.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||jp(this,a,y,x,b,E,z)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}yt.scale=function(a,y){this.rb.scale(a,y)},yt.translate=function(a,y){this.rb.translate(a,y)},yt.transform=function(){},yt.yc=function(){},yt.stroke=function(){tx(this,this.Yl)},yt.jk=function(){this.clipInsteadOfFill||this.stroke()},yt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},yt.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 mf(a,y,x,b){y==="fill"?r0(a,x):y==="stroke"&&tx(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function r0(a,y){a.fillStyle instanceof Cd?y.fill=o0(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 qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Cd?y.setAttributeNS(null,"fill",o0(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 tx(a,y){if(a.strokeStyle instanceof Cd)y.stroke=o0(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 o0(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Vi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var z=[],tt=0;tt<y;tt++){var nt=E[tt],it=nt.color;nt={offset:nt.offset,"stop-color":it},/^rgba\(/.test(it)&&(it=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(it),nt["stop-color"]="rgb("+it[1]+","+it[2]+","+it[3]+")",nt["stop-opacity"]=it[4]),z.push(nt)}for(z.sort(function(ot,st){return ot.offset>st.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}yt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=Jt(a[E]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());b.push(tt.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,mf(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var nt in a)nt!=="transform"&&y.setAttributeNS(null,nt,a[nt]);else{nt=y.getElementsByTagName("path");for(var it in a)it!=="transform"&&nt[x].setAttributeNS(null,it,a[it])}else this.addElement("path",a)};function jp(a,y,x,b,E,z,tt){var nt=new Ic;nt.ha=[y,x,b,E,z,tt],y={},mf(a,"g",y,nt),nt=a.addElement("g",y),a.nh.push(nt)}function ag(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}yt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function au(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function ku(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}yt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},yt.fs=function(){this.Ct=!1},yt.Vc=function(){},yt.Wx=function(){},xl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},xl.prototype.getImageData=function(){return null},xl.prototype.measureText=function(){return null};function ug(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()))}xl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},xl.className="SVGContext",Ge.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new _a(this,Jn.document));var y=new _a(this,Jn.document,!0);a===void 0&&(a=new Ii);var x=this;return pd(this,function(b,E){return b=ig(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Ge.prototype.makeSvg=Ge.prototype.Cs,Ge.prototype.av=function(a){return this.Cs(a)},Ge.prototype.makeSVG=Ge.prototype.av;function oa(a,y,x,b){this.ownerDocument=y=y===void 0?Jn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Ac(y,x,b),y.H=a}oa.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},oa.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},oa.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},oa.prototype.focus=function(){this.Oa.focus()},oa.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},$n.Object.defineProperties(oa.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}}}),oa.className="CanvasSurface";function Ac(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Rt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new er,this.isTemporary=!!x}yt=Ac.prototype,yt.Wx=function(a){this.Z.imageSmoothingEnabled=a},yt.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},yt.beginPath=function(){this.Z.beginPath()},yt.Se=function(){},yt.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},yt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},yt.clip=function(){this.Z.clip()},yt.closePath=function(){this.Z.closePath()},yt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},yt.createPattern=function(a,y){return this.Z.createPattern(a,y)},yt.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},yt.drawImage=function(a,y,x,b,E,z,tt,nt,it){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,tt,nt,it)},yt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},yt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},yt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},yt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},yt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},yt.lineTo=function(a,y){this.Z.lineTo(a,y)},yt.measureText=function(a){return this.Z.measureText(a)},yt.moveTo=function(a,y){this.Z.moveTo(a,y)},yt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},yt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},yt.restore=function(){this.Z.restore()},yt.save=function(){this.yc(),this.Z.save()},Ac.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},yt=Ac.prototype,yt.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},yt.scale=function(a,y){this.El.scale(a,y)},yt.translate=function(a,y){this.El.translate(a,y)},yt.stroke=function(){this.Z.stroke()},yt.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var tt=this.El,nt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*b,x=tt.m12*x+tt.m22*b,tt.dx=tt.m11*E+tt.m21*z+tt.dx,tt.dy=tt.m12*E+tt.m22*z+tt.dy,tt.m11=nt,tt.m12=a,tt.m21=y,tt.m22=x}},yt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},yt.ng=function(a,y){if(a instanceof Fr&&a.type===_l){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)},yt.jk=function(){this.Hm||this.stroke()},yt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},yt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},yt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Sw),a.lineDashOffset=0)},yt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},yt.Hs=function(){},$n.Object.defineProperties(Ac.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 Sw=Object.freeze([]);Ac.className="CanvasSurfaceContext";function zp(){this.F=this.o=this.u=this.j=0}zp.className="ColorNumbers";function Fr(a,y){xf||(c0(),xf=!0),wi(this),this._isFrozen=!1,a===void 0?(this.na=sh,this.xk="black"):typeof a=="string"?(this.na=sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Lu?(this.Qd=Lr,this.Lk=rs):this.Lk=a===_l?this.Qd=cr:this.Qd=mr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Fr.prototype.copy=function(){var a=new Fr;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},yt=Fr.prototype,yt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},yt.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},yt.qb=function(a){a.classType===Fr&&(this.type=a)},yt.toString=function(){var a="Brush(";if(this.type===sh)a+=this.color;else if(a=this.type===Lu?a+"Linear ":this.type===_l?a+"Radial ":this.type===wf?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+")"},yt.addColorStop=function(a,y){return this._isFrozen&&Pe(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&qt(a,"0 <= loc <= 1",Fr,"addColorStop:loc"),this.we===null&&(this.we=new ai),this.we.add(a,y),this.na===sh&&(this.type=Lu),this.xe=null,this},yt.Vz=function(a,y){if(this._isFrozen&&Pe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Cf:y,this.type===sh)Ou(this.color),this.color=vf(a,y);else if((this.type===Lu||this.type===_l)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Ou(x.value),this.addColorStop(x.key,vf(a,y));return this};function ex(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Cf:x,Ou(a),vf(y,x)}yt.Wy=function(a,y){if(this._isFrozen&&Pe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Cf:y,this.type===sh)Ou(this.color),this.color=vf(-a,y);else if((this.type===Lu||this.type===_l)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Ou(x.value),this.addColorStop(x.key,vf(-a,y));return this};function nx(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Cf:x,Ou(a),vf(-y,x)}function s0(a,y,x){Ou(a),a=_r.j;var b=_r.u,E=_r.o,z=_r.F;return Ou(y),x===void 0&&(x=.5),"rgba("+Math.round((_r.j-a)*x+a)+", "+Math.round((_r.u-b)*x+b)+", "+Math.round((_r.o-E)*x+E)+", "+Math.round((_r.F-z)*x+z)+")"}yt.Gx=function(){if(this.type===sh)return gf(this.color);if((this.type===Lu||this.type===_l)&&this.colorStops!==null){var a=this.colorStops;if(this.type===_l)return gf(a.first().value);if(a.get(.5)!==null)return gf(a.get(.5));if(a.count===2)return a=a.Fa(),gf(s0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var tt=y.key,nt=Math.abs(.5-y.key);E>z&&nt<E?(x=tt,E=nt):z>=E&&nt<z&&(b=tt,z=nt)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,gf(s0(a.get(x),a.get(b),1-z/E))}return!1};function gf(a){return a?a instanceof Fr?a.Gx():(Ou(a),128>(299*_r.j+587*_r.u+114*_r.o)/1e3):!1}function vf(a,y){switch(y){case Cf:y=100*a0(_r.j);var x=100*a0(_r.u),b=100*a0(_r.o);return Zs.j=.4124564*y+.3575761*x+.1804375*b,Zs.u=.2126729*y+.7151522*x+.072175*b,Zs.o=.0193339*y+.119192*x+.9503041*b,Zs.F=_r.F,y=h0(Zs.j/yf[0]),x=h0(Zs.u/yf[1]),b=h0(Zs.o/yf[2]),uu.j=116*x-16,uu.u=500*(y-x),uu.o=200*(x-b),uu.F=Zs.F,uu.j=Math.min(100,Math.max(0,uu.j+100*a)),a=(uu.j+16)/116,y=a-uu.o/200,Zs.j=yf[0]*ix(uu.u/500+a),Zs.u=yf[1]*(uu.j>hg*d0?Math.pow(a,3):uu.j/hg),Zs.o=yf[2]*ix(y),Zs.F=uu.F,a=-.969266*Zs.j+1.8760108*Zs.u+.041556*Zs.o,y=.0556434*Zs.j+-.2040259*Zs.u+1.0572252*Zs.o,_r.j=255*u0((3.2404542*Zs.j+-1.5371385*Zs.u+-.4985314*Zs.o)/100),_r.u=255*u0(a/100),_r.o=255*u0(y/100),_r.F=Zs.F,_r.j=Math.round(_r.j),255<_r.j?_r.j=255:0>_r.j&&(_r.j=0),_r.u=Math.round(_r.u),255<_r.u?_r.u=255:0>_r.u&&(_r.u=0),_r.o=Math.round(_r.o),255<_r.o?_r.o=255:0>_r.o&&(_r.o=0),"rgba("+_r.j+", "+_r.u+", "+_r.o+", "+_r.F+")";case rx:return l0(),Al.o=Math.min(100,Math.max(0,Al.o+100*a)),"hsla("+Al.j+", "+Al.u+"%, "+Al.o+"%, "+Al.F+")";default:Rt("Unknown color space: "+y)}}function Ou(a){xf||(c0(),xf=!0);var y=f0;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,_r.j=a[0],_r.u=a[1],_r.o=a[2],_r.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,_r.j=0,_r.u=0,_r.o=0,_r.F=1)}}function l0(){var a=_r.j/255,y=_r.u/255,x=_r.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var tt=a=0;else{switch(b){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*E-1))}Al.j=Math.round(tt),Al.u=Math.round(100*a),Al.o=Math.round(100*E),Al.F=_r.F}function a0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>d0?Math.pow(a,1/3):(hg*a+16)/116}function ix(a){var y=a*a*a;return y>d0?y:(116*a-16)/hg}function Sd(a,y){typeof a!="string"&&(a instanceof Fr||Rt("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){f0=yo?new oa(null,void 0,{willReadFrequently:!0}).context:null}$n.Object.defineProperties(Fr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Pe(this,a),this.na=a,this.start.Mc()&&(a===Lu?this.start=Lr:a===_l&&(this.start=cr)),this.end.Mc()&&(a===Lu?this.end=rs:a===_l&&(this.end=cr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Pe(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Pe(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Pe(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Pe(this,a),0>a&&qt(a,">= zero",Fr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Pe(this,a),0>a&&qt(a,">= zero",Fr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Pe(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Pe(this,a),this.cr=a,this.xe=null}}}),Fr.prototype.isDark=Fr.prototype.Gx,Fr.prototype.darkenBy=Fr.prototype.Wy,Fr.prototype.lightenBy=Fr.prototype.Vz,Fr.prototype.addColorStop=Fr.prototype.addColorStop;var d0=216/24389,hg=24389/27,yf=[95.047,100,108.883],f0=null,_r=new zp,Al=new zp,Zs=new zp,uu=new zp,xf=!1;Fr.className="Brush";var sh;Fr.Solid=sh=new yn(Fr,"Solid",0);var Lu;Fr.Linear=Lu=new yn(Fr,"Linear",1);var _l;Fr.Radial=_l=new yn(Fr,"Radial",2);var wf;Fr.Pattern=wf=new yn(Fr,"Pattern",4);var Cf;Fr.Lab=Cf=new yn(Fr,"Lab",5);var rx;Fr.HSL=rx=new yn(Fr,"HSL",6),Fr.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Fr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;xf||(c0(),xf=!0);var y=f0;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)},Fr.lighten=function(a){return ex(a)},Fr.lightenBy=ex,Fr.darken=function(a){return nx(a)},Fr.darkenBy=nx,Fr.mix=s0,Fr.isDark=gf;function $o(){this.xa="Base"}$o.prototype.measure=function(){},$o.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},$o.prototype.arrange=function(){},$o.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},$o.prototype.iA=function(a){a.Uj()},$o.prototype.gc=function(){},$n.Object.defineProperties($o.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Un}}}),$o.prototype.remeasureObject=$o.prototype.iA,$o.prototype.arrangeElement=$o.prototype.Ly,$o.prototype.measureElement=$o.prototype.Yz,$o.className="PanelLayout";function cg(){this.xa="Base"}Xn(cg,$o),cg.prototype.measure=function(a,y,x,b,E,z,tt){var nt=b.length;a=Du(a);for(var it=0;it<nt;it++){var ot=b[it];if(ot.visible||ot===a){var st=ot.margin,ht=st.right+st.left;st=st.top+st.bottom,ot.measure(y,x,z,tt);var ft=ot.measuredBounds;ht=Math.max(ft.width+ht,0),st=Math.max(ft.height+st,0),ft=ot.position.x;var mt=ot.position.y;isFinite(ft)||(ft=0),isFinite(mt)||(mt=0),ot instanceof ar&&ot.isGeometryPositioned&&(ot=ot.strokeWidth/2,ft-=ot,mt-=ot),Ar(E,ft,mt,ht,st)}}},cg.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var z=y[E],tt=z.measuredBounds,nt=z.margin,it=z.position.x,ot=z.position.y;if(it=isNaN(it)?-a:it-a,ot=isNaN(ot)?-x:ot-x,z instanceof ar&&z.isGeometryPositioned){var st=z.strokeWidth/2;it-=st,ot-=st}z.visible&&z.arrange(it+nt.left,ot+nt.top,tt.width,tt.height)}};function dg(){this.xa="Base"}Xn(dg,$o),dg.prototype.measure=function(a,y,x,b,E,z,tt){var nt=b.length;y=Ne(),z=Du(a);for(var it=0;it<nt;it++){var ot=b[it];if(ot.visible||ot===z){var st=tl(ot,!1);if(st!==zn&&st!==Di)y.push(ot);else{ot.measure(1/0,x,0,tt),st=ot.margin,ot=ot.measuredBounds;var ht=Math.max(ot.height+st.top+st.bottom,0);E.width+=Math.max(ot.width+st.right+st.left,0),E.height=Math.max(E.height,ht)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)it=y[a],(it.visible||it===z)&&(st=it.margin,nt=st.right+st.left,st=st.top+st.bottom,it.measure(1/0,x,0,tt),it=it.measuredBounds,st=Math.max(it.height+st,0),E.width+=Math.max(it.width+nt,0),E.height=Math.max(E.height,st));Fe(y)},dg.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,tt=a.isOpposite,nt=tt?x.width:E.left,it=0;it<b;it++){var ot=z,st=y[it];if(st.visible){var ht=st.measuredBounds,ft=st.margin,mt=ft.top+ft.bottom,xt=z+E.bottom,St=ht.height,Ft=tl(st,!1);(isNaN(st.desiredSize.height)&&Ft===Kn||Ft===Zi)&&(St=Math.max(x.height-mt-xt,0)),mt=St+mt+xt,xt=st.alignment,xt.Xb()&&(xt=a.defaultAlignment),xt.sb()||(xt=cr),tt&&(nt-=ht.width+ft.left+ft.right),st.arrange(nt+xt.offsetX+ft.left,ot+xt.offsetY+ft.top+(x.height*xt.y-mt*xt.y),ht.width,St),tt||(nt+=ht.width+ft.left+ft.right)}}};function fg(){this.xa="Base"}Xn(fg,$o),fg.prototype.measure=function(a,y,x,b,E,z){var tt=b.length;x=Ne();for(var nt=Du(a),it=0;it<tt;it++){var ot=b[it];if(ot.visible||ot===nt){var st=tl(ot,!1);if(st!==zn&&st!==Zi)x.push(ot);else{var ht=ot.margin;st=ht.right+ht.left,ht=ht.top+ht.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,So(E,Math.max(E.width,Math.max(ot.width+st,0)),E.height+Math.max(ot.height+ht,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)it=x[a],(it.visible||it===nt)&&(ot=it.margin,tt=ot.right+ot.left,ot=ot.top+ot.bottom,it.measure(y,1/0,z,0),it=it.measuredBounds,ot=Math.max(it.height+ot,0),E.width=Math.max(E.width,Math.max(it.width+tt,0)),E.height+=ot);Fe(x)}},fg.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,tt=a.isOpposite,nt=tt?x.height:E.top,it=0;it<b;it++){var ot=z,st=y[it];if(st.visible){var ht=st.measuredBounds,ft=st.margin,mt=ft.left+ft.right,xt=z+E.right,St=ht.width,Ft=tl(st,!1);(isNaN(st.desiredSize.width)&&Ft===Kn||Ft===Di)&&(St=Math.max(x.width-mt-xt,0)),mt=St+mt+xt,xt=st.alignment,xt.Xb()&&(xt=a.defaultAlignment),xt.sb()||(xt=cr),tt&&(nt-=ht.height+ft.bottom+ft.top),st.arrange(ot+xt.offsetX+ft.left+(x.width*xt.x-mt*xt.x),nt+xt.offsetY+ft.top,St,ht.height),tt||(nt+=ht.height+ft.bottom+ft.top)}}};function pg(){this.xa="Base"}Xn(pg,$o),pg.prototype.measure=function(a,y,x,b,E,z,tt){var nt=b.length,it=a.Pb(),ot=it.margin,st=ot.right+ot.left,ht=ot.top+ot.bottom;it.measure(y,x,z,tt);var ft=it.measuredBounds;z=ft.width,tt=ft.height;var mt=Math.max(z+st,0),xt=Math.max(tt+ht,0),St=a.isClipping,Ft=un.allocAt(-ot.left,-ot.top,mt,xt),Ot=un.allocAt(0,0,z,tt);p0(it,Ot,!0),z=Ot.width,tt=Ot.height;for(var Wt=!0,Ut=Du(a),ne=0;ne<nt;ne++){var fe=b[ne];ft=y;var _e=x;if(fe!==it&&(fe.visible||fe===Ut)){ot=fe.margin;var si=ot.left,bi=ot.top;switch(mt=ot.right+ot.left,xt=ot.top+ot.bottom,ot=tl(fe,!1),ot){case Kn:ft=z,_e=tt,bi=si=xt=mt=0;break;case Di:ft=z,si=mt=0;break;case Zi:_e=tt,bi=xt=0}fe.measure(ft,_e,0,0),ft=fe.measuredBounds,mt=Math.max(ft.width+mt,0),xt=Math.max(ft.height+xt,0),ot=fe.alignment,ot.Xb()&&(ot=a.defaultAlignment),ot.sb()||(ot=cr);var mi=fe.alignmentFocus;if(mi.Xb()&&(mi=cr),_e=null,fe instanceof Un&&fe.$e!==""&&(_e=fe.fb(fe.$e),_e===fe&&(_e=null)),si=Ot.x-si,bi=Ot.y-bi,_e!==null){for(fe.arrange(0,0,ft.width,ft.height),ft=_e.actualBounds,ft=Lt.allocAt(ft.x+(mi.x*ft.width-mi.offsetX),ft.y+(mi.y*ft.height-mi.offsetY)),_e=_e.panel;_e!==fe;)_e.transform.Ga(ft),_e=_e.panel;si+=ot.x*z+ot.offsetX-ft.x,bi+=ot.y*tt+ot.offsetY-ft.y,Lt.free(ft)}else si+=ot.x*z+ot.offsetX-(mi.x*ft.width+mi.offsetX),bi+=ot.y*tt+ot.offsetY-(mi.y*ft.height+mi.offsetY);Wt?(Wt=!1,E.h(si,bi,mt,xt)):Ar(E,si,bi,mt,xt)}}switch(Wt?E.assign(Ft):St?E.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Ar(E,Ft.x,Ft.y,Ft.width,Ft.height),un.free(Ft),un.free(Ot),ot=it.stretch,ot===or&&(ot=tl(it,!1)),ot){case zn:return;case Kn:if(!isFinite(y)&&!isFinite(x))return;break;case Di:if(!isFinite(y))return;break;case Zi:if(!isFinite(x))return}for(ft=it.measuredBounds,z=ft.width,tt=ft.height,mt=Math.max(z+st,0),xt=Math.max(tt+ht,0),ot=it.margin,Ot=un.allocAt(-ot.left,-ot.top,mt,xt),p0(it,Ot,!0),z=Ot.width,tt=Ot.height,y=0;y<nt;y++)x=b[y],x===it||!x.visible&&x!==Ut||(ot=x.margin,mt=ot.right+ot.left,xt=ot.top+ot.bottom,ft=x.measuredBounds,mt=Math.max(ft.width+mt,0),xt=Math.max(ft.height+xt,0),st=x.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=cr),x=x.alignmentFocus,x.Xb()&&(x=cr),Wt?(Wt=!1,E.h(st.x*z+st.offsetX-(x.x*ft.width+x.offsetX)-ot.left,st.y*tt+st.offsetY-(x.y*ft.height+x.offsetY)-ot.top,mt,xt)):Ar(E,st.x*z+st.offsetX-(x.x*ft.width+x.offsetX)-ot.left,st.y*tt+st.offsetY-(x.y*ft.height+x.offsetY)-ot.top,mt,xt));Wt?E.assign(Ft):St?E.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Ar(E,Ft.x,Ft.y,Ft.width,Ft.height),un.free(Ot)},pg.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,tt=z.width,nt=z.height,it=a.padding;z=it.left,it=it.top;var ot=z-x.x,st=it-x.y;for(E.arrange(ot,st,tt,nt),tt=un.allocAt(0,0,tt,nt),p0(E,tt,!1),nt=0;nt<b;nt++){var ht=y[nt];if(ht!==E){ot=ht.measuredBounds;var ft=ot.width,mt=ot.height;st=ht.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=cr);var xt=ht.alignmentFocus;if(xt.Xb()&&(xt=cr),ot=null,ht instanceof Un&&ht.$e!==""&&(ot=ht.fb(ht.$e),ot===ht&&(ot=null)),ot!==null){var St=ot.actualBounds;for(xt=Lt.allocAt(St.x+(xt.x*St.width-xt.offsetX),St.y+(xt.y*St.height-xt.offsetY)),ot=ot.panel;ot!==ht;)ot.transform.Ga(xt),ot=ot.panel;ot=st.x*tt.width+st.offsetX-xt.x,st=st.y*tt.height+st.offsetY-xt.y,Lt.free(xt)}else ot=st.x*tt.width+st.offsetX-(xt.x*ft+xt.offsetX),st=st.y*tt.height+st.offsetY-(xt.y*mt+xt.offsetY);ot+=tt.x-x.x,st+=tt.y-x.y,ht.visible&&ht.arrange(z+ot,it+st,ft,mt)}}un.free(tt)};function p0(a,y,x){var b=null;if(a instanceof Un&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function mg(){this.xa="Base"}Xn(mg,$o),mg.prototype.measure=function(a,y,x,b,E,z,tt){var nt=b.length,it=a.Pb(),ot=it.margin,st=y,ht=x,ft=ot.right+ot.left,mt=ot.top+ot.bottom;it.measure(y,x,z,tt),ot=it.measuredBounds;var xt=0,St=null;it instanceof ar&&(St=it,xt=St.strokeWidth*St.scale);var Ft=Math.max(ot.width+ft,0);ot=Math.max(ot.height+mt,0);var Ot=y0(it),Wt=Ot.x*Ft+Ot.offsetX;Ot=Ot.y*ot+Ot.offsetY;var Ut=x0(it),ne=Ut.x*Ft+Ut.offsetX;for(Ut=Ut.y*ot+Ut.offsetY,isFinite(y)&&(st=Math.max(Math.abs(Wt-ne)-xt,0)),isFinite(x)&&(ht=Math.max(Math.abs(Ot-Ut)-xt,0)),xt=kn.alloc(),xt.h(0,0),a=Du(a),Ut=0;Ut<nt;Ut++)Ot=b[Ut],Ot===it||!Ot.visible&&Ot!==a||(ot=Ot.margin,Ft=ot.right+ot.left,Wt=ot.top+ot.bottom,Ot.measure(st,ht,0,0),ot=Ot.measuredBounds,Ft=Math.max(ot.width+Ft,0),ot=Math.max(ot.height+Wt,0),xt.h(Math.max(Ft,xt.width),Math.max(ot,xt.height)));if(nt===1)E.width=Ft,E.height=ot,kn.free(xt);else{switch(Ot=y0(it),Ut=x0(it),nt=b=0,Ut.x!==Ot.x&&Ut.y!==Ot.y&&(b=xt.width/Math.abs(Ut.x-Ot.x),nt=xt.height/Math.abs(Ut.y-Ot.y)),kn.free(xt),xt=0,St!==null&&(xt=St.strokeWidth*St.scale,M0(St)===Pi&&(b=nt=Math.max(b,nt))),b+=Math.abs(Ot.offsetX)+Math.abs(Ut.offsetX)+xt,nt+=Math.abs(Ot.offsetY)+Math.abs(Ut.offsetY)+xt,St=it.stretch,St===or&&(St=tl(it,!1)),St){case zn:tt=z=0;break;case Kn:isFinite(y)&&(b=y),isFinite(x)&&(nt=x);break;case Di:isFinite(y)&&(b=y),tt=0;break;case Zi:z=0,isFinite(x)&&(nt=x)}it.Uj(),it.measure(b,nt,z,tt),E.width=it.measuredBounds.width+ft,E.height=it.measuredBounds.height+mt}},mg.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=un.alloc();z.h(0,0,1,1);var tt=b.margin,nt=tt.left;tt=tt.top;var it=a.padding,ot=it.left;it=it.top,b.arrange(ot+nt,it+tt,E.width,E.height);var st=y0(b),ht=x0(b),ft=st.y*E.height+st.offsetY,mt=ht.x*E.width+ht.offsetX;for(ht=ht.y*E.height+ht.offsetY,z.x=st.x*E.width+st.offsetX,z.y=ft,Ar(z,mt,ht,0,0),z.x+=nt+ot,z.y+=tt+it,E=0;E<x;E++)nt=y[E],nt!==b&&(ot=nt.measuredBounds,tt=nt.margin,it=Math.max(ot.width+tt.right+tt.left,0),st=Math.max(ot.height+tt.top+tt.bottom,0),ft=nt.alignment,ft.Xb()&&(ft=a.defaultAlignment),ft.sb()||(ft=cr),it=z.width*ft.x+ft.offsetX-it*ft.x+tt.left+z.x,tt=z.height*ft.y+ft.offsetY-st*ft.y+tt.top+z.y,nt.visible&&(Sr(z.x,z.y,z.width,z.height,it,tt,ot.width,ot.height)?nt.arrange(it,tt,ot.width,ot.height):nt.arrange(it,tt,ot.width,ot.height,new un(z.x,z.y,z.width,z.height))));un.free(z)};function gg(){this.xa="Base",this.name="Table"}Xn(gg,$o),gg.prototype.measure=function(a,y,x,b,E){for(var z=b.length,tt=Ne(),nt=Ne(),it=0;it<z;it++){var ot=b[it],st=ot instanceof Un?ot:null;if(st!==null&&lh(st)&&ot.visible){nt.push(st);for(var ht=st.O.s,ft=ht.length,mt=0;mt<ft;mt++){var xt=ht[mt];st.type===Un.TableRow?xt.row=ot.row:st.type===Un.TableColumn&&(xt.column=ot.column),tt.push(xt)}}else tt.push(ot)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var St=[],Ft=0;Ft<z;Ft++){var Ot=tt[Ft];Ot.visible&&(Bo(Ot,!0),lu(Ot,!0),St[Ot.row]||(St[Ot.row]=[]),St[Ot.row][Ot.column]||(St[Ot.row][Ot.column]=[]),St[Ot.row][Ot.column].push(Ot))}Fe(tt);var Wt=Ne(),Ut=Ne(),ne=Ne(),fe={count:0},_e={count:0},si=y,bi=x,mi=a.rowDefs,qn=a.colDefs,Fn=null;z=mi.length;for(var ir=0;ir<z;ir++)Fn=mi[ir],Fn!==void 0&&(Fn.actual=0);z=qn.length;for(var Gi=0;Gi<z;Gi++)Fn=qn[Gi],Fn!==void 0&&(Fn.actual=0);for(var kr=St.length,Hr=0,Go=0;Go<kr;Go++)St[Go]&&(Hr=Math.max(Hr,St[Go].length));var Jo=Math.min(a.topIndex,kr-1),Os=Math.min(a.leftIndex,Hr-1),Uo=0;kr=St.length;for(var vh=Du(a),Lo=0;Lo<kr;Lo++)if(St[Lo]){Hr=St[Lo].length;var Fa=a.Fb(Lo);Fa.actual=0;for(var Ls=Fa.oc=0;Ls<Hr;Ls++)if(St[Lo][Ls]){var yh=a.Eb(Ls);Wt[Ls]===void 0&&(yh.actual=0,yh.oc=0,Wt[Ls]=!0);for(var Rl=St[Lo][Ls],ua=Rl.length,Sl=0;Sl<ua;Sl++){var hl=Rl[Sl];if(hl.visible||hl===vh){var oc=1<hl.rowSpan||1<hl.columnSpan;oc&&(Lo<Jo||Ls<Os||Ut.push(hl));var Ba=hl.margin,Vf=Ba.right+Ba.left,bl=Ba.top+Ba.bottom,Ds=Oa(hl,Fa,yh,!1),Pm=hl.desiredSize,Ad=!isNaN(Pm.height),Ya=!isNaN(Pm.width)&&Ad;if(oc||Ds===zn||Ya||Lo<Jo||Ls<Os||(fe[Ls]!==void 0||Ds!==Kn&&Ds!==Di||(fe[Ls]=-1,fe.count++),_e[Lo]!==void 0||Ds!==Kn&&Ds!==Zi||(_e[Lo]=-1,_e.count++),ne.push(hl)),hl.measure(1/0,1/0,0,0),!(Lo<Jo||Ls<Os)){var cl=hl.measuredBounds,Wc=Math.max(cl.width+Vf,0),El=Math.max(cl.height+bl,0);if(hl.rowSpan===1&&(Ds===zn||Ds===Di)){Fn=a.Fb(Lo);var sc=Fn.Wc();Uo=Math.max(El-Fn.actual,0),Uo+sc>bi&&(Uo=Math.max(bi-sc,0));var zv=Fn.oa===0;Fn.oc=Fn.oc+Uo,Fn.actual=Fn.oa+Uo,bi=Math.max(bi-(Uo+(zv?sc:0)),0)}if(hl.columnSpan===1&&(Ds===zn||Ds===Zi)){Fn=a.Eb(Ls);var Nm=Fn.Wc();Uo=Math.max(Wc-Fn.actual,0),Uo+Nm>si&&(Uo=Math.max(si-Nm,0));var Hy=Fn.oa===0;Fn.oc=Fn.oc+Uo,Fn.actual=Fn.oa+Uo,si=Math.max(si-(Uo+(Hy?Nm:0)),0)}oc&&hl.Uj()}}}}}Fe(Wt);var yu=0,Fu=0;z=a.columnCount;for(var Fd=0;Fd<z;Fd++){var lc=qn[Fd];lc!==void 0&&(yu+=isNaN(lc.Hc)?lc.oc:lc.Hc,lc.oc!==0&&(yu+=lc.Wc()))}z=a.rowCount;for(var Kf=0;Kf<z;Kf++){var ac=mi[Kf];ac!==void 0&&(Fu+=isNaN(ac.Hc)?ac.oc:ac.Hc,ac.oc!==0&&(Fu+=ac.Wc()))}si=Math.max(y-yu,0);var xu=bi=Math.max(x-Fu,0),xh=si;z=ne.length;for(var dl=0;dl<z;dl++){var Xa=ne[dl],$v=a.Fb(Xa.row),Bu=a.Eb(Xa.column),_f=Xa.measuredBounds,Ra=Xa.margin,Vc=Ra.right+Ra.left,Ja=Ra.top+Ra.bottom;fe[Xa.column]=Bu.oc===0&&fe[Xa.column]!==void 0?Math.max(_f.width+Vc,fe[Xa.column]):null,_e[Xa.row]=$v.oc===0&&_e[Xa.row]!==void 0?Math.max(_f.height+Ja,_e[Xa.row]):null}var Bd=0,Gf=0,Pa;for(Pa in _e)Pa!=="count"&&(Bd+=_e[Pa]);for(Pa in fe)Pa!=="count"&&(Gf+=fe[Pa]);for(var us=kn.alloc(),Tm=0;Tm<z;Tm++){var Ys=ne[Tm];if(Ys.visible||Ys===vh){var Do=a.Fb(Ys.row),Xs=a.Eb(Ys.column),Ru=0;isFinite(Xs.width)?Ru=Xs.width:(isFinite(si)&&fe[Ys.column]!==null?Gf===0?Ru=Xs.actual+si:Ru=fe[Ys.column]/Gf*xh:fe[Ys.column]!==null?Ru=si:Ru=Xs.actual||si,Ru=Math.max(0,Ru-Xs.Wc()));var wh=0;switch(isFinite(Do.height)?wh=Do.height:(isFinite(bi)&&_e[Ys.row]!==null?Bd===0?wh=Do.actual+bi:wh=_e[Ys.row]/Bd*xu:_e[Ys.row]!==null?wh=bi:wh=Do.actual||bi,wh=Math.max(0,wh-Do.Wc())),us.h(Math.max(Xs.minimum,Math.min(Ru,Xs.maximum)),Math.max(Do.minimum,Math.min(wh,Do.maximum))),Ds=Oa(Ys,Do,Xs,!1),Ds){case Di:us.height=Math.max(us.height,Do.actual+bi);break;case Zi:us.width=Math.max(us.width,Xs.actual+si)}var Kc=Ys.margin,Zy=Kc.right+Kc.left,Hv=Kc.top+Kc.bottom;Ys.Uj(),Ys.measure(us.width,us.height,Xs.minimum,Do.minimum);var Uf=Ys.measuredBounds,_c=Math.max(Uf.width+Zy,0),Rd=Math.max(Uf.height+Hv,0);isFinite(si)&&(_c=Math.min(_c,us.width)),isFinite(bi)&&(Rd=Math.min(Rd,us.height));var fl=0;fl=Do.actual,Do.actual=Math.max(Do.actual,Rd),Do.oc=Math.max(Do.oc,Rd),Uo=Do.actual-fl,bi=Math.max(bi-Uo,0),_e[Ys.row]===null&&(xu=Math.max(xu-Uo,0)),fl=Xs.actual,Xs.actual=Math.max(Xs.actual,_c),Xs.oc=Math.max(Xs.oc,_c),Uo=Xs.actual-fl,si=Math.max(si-Uo,0),fe[Ys.column]===null&&(xh=Math.max(xh-Uo,0))}}Fe(ne);var ju=kn.alloc(),ja=Ne(),Jl=Ne();if(z=Ut.length,z!==0){for(var uc=0;uc<kr;uc++)if(St[uc]){Hr=St[uc].length;var Yf=a.Fb(uc);ja[uc]=Yf.actual;for(var hc=0;hc<Hr;hc++)if(St[uc][hc]){var Zv=a.Eb(hc);Jl[hc]=Zv.actual}}}for(var Xf=0;Xf<z;Xf++){var Co=Ut[Xf];if(Co.visible||Co===vh){var Na=a.Fb(Co.row),ha=a.Eb(Co.column);switch(us.h(Math.max(ha.minimum,Math.min(y,ha.maximum)),Math.max(Na.minimum,Math.min(x,Na.maximum))),Ds=Oa(Co,Na,ha,!1),Ds){case Kn:Jl[ha.index]!==0&&(us.width=Math.min(us.width,Jl[ha.index])),ja[Na.index]!==0&&(us.height=Math.min(us.height,ja[Na.index]));break;case Di:Jl[ha.index]!==0&&(us.width=Math.min(us.width,Jl[ha.index]));break;case Zi:ja[Na.index]!==0&&(us.height=Math.min(us.height,ja[Na.index]))}isFinite(ha.width)&&(us.width=ha.width),isFinite(Na.height)&&(us.height=Na.height),ju.h(0,0);for(var Wv=ha.minimum,Ml=Na.minimum,Ch=1;Ch<Co.rowSpan&&!(Co.row+Ch>=a.rowCount);Ch++)Fn=a.Fb(Co.row+Ch),Uo=0,Uo=Ds===Kn||Ds===Zi?Math.max(Fn.minimum,ja[Co.row+Ch]===0?Fn.maximum:Math.min(ja[Co.row+Ch],Fn.maximum)):Math.max(Fn.minimum,isNaN(Fn.Hc)?Fn.maximum:Math.min(Fn.Hc,Fn.maximum)),ju.height+=Uo,Ml+=Fn.minimum;for(var ca=1;ca<Co.columnSpan&&!(Co.column+ca>=a.columnCount);ca++)Fn=a.Eb(Co.column+ca),Uo=0,Uo=Ds===Kn||Ds===Di?Math.max(Fn.minimum,Jl[Co.column+ca]===0?Fn.maximum:Math.min(Jl[Co.column+ca],Fn.maximum)):Math.max(Fn.minimum,isNaN(Fn.Hc)?Fn.maximum:Math.min(Fn.Hc,Fn.maximum)),ju.width+=Uo,Wv+=Fn.minimum;us.width+=ju.width,us.height+=ju.height;var Jf=Co.margin,cc=Jf.right+Jf.left,km=Jf.top+Jf.bottom;Co.measure(us.width,us.height,Wv,Ml);for(var Qf=Co.measuredBounds,Qa=Math.max(Qf.width+cc,0),Gc=Math.max(Qf.height+km,0),dc=0,qf=0;qf<Co.rowSpan&&!(Co.row+qf>=a.rowCount);qf++)Fn=a.Fb(Co.row+qf),dc+=Fn.total||0;if(dc<Gc){var Sh=Gc-dc,wu=Gc-dc;if(Co.spanAllocation!==null)for(var bh=Co.spanAllocation,zu=0;zu<Co.rowSpan&&!(0>=Sh)&&!(Co.row+zu>=a.rowCount);zu++){Fn=a.Fb(Co.row+zu);var Eh=Fn.oa||0,Uc=bh(Co,Fn,wu);Fn.actual=Math.min(Fn.maximum,Eh+Uc),Fn.oa!==Eh&&(Sh-=Fn.oa-Eh)}for(;0<Sh;){var za=Fn.oa||0;if(isNaN(Fn.height)&&Fn.maximum>za&&(Fn.actual=Math.min(Fn.maximum,za+Sh),Fn.oa!==za&&(Sh-=Fn.oa-za)),Fn.index===0)break;Fn=a.Fb(Fn.index-1)}}for(var jd=0,Mh=0;Mh<Co.columnSpan&&!(Co.column+Mh>=a.columnCount);Mh++)Fn=a.Eb(Co.column+Mh),jd+=Fn.total||0;if(jd<Qa){var zd=Qa-jd,Wy=Qa-jd;if(Co.spanAllocation!==null)for(var $u=Co.spanAllocation,Yc=0;Yc<Co.columnSpan&&!(0>=zd)&&!(Co.column+Yc>=a.columnCount);Yc++){Fn=a.Eb(Co.column+Yc);var Om=Fn.oa||0,Vy=$u(Co,Fn,Wy);Fn.actual=Math.min(Fn.maximum,Om+Vy),Fn.oa!==Om&&(zd-=Fn.oa-Om)}for(;0<zd;){var Vv=Fn.oa||0;if(isNaN(Fn.width)&&Fn.maximum>Vv&&(Fn.actual=Math.min(Fn.maximum,Vv+zd),Fn.oa!==Vv&&(zd-=Fn.oa-Vv)),Fn.index===0)break;Fn=a.Eb(Fn.index-1)}}}}Fe(Ut),kn.free(ju),kn.free(us),ja!==void 0&&Fe(ja),Jl!==void 0&&Fe(Jl);var $d=0,Hd=0,Kv=a.desiredSize,gw=a.maxSize;Ds=tl(a,!0);var Lm=Fu=yu=0,Dm=0;z=a.columnCount;for(var _v=0;_v<z;_v++)qn[_v]!==void 0&&(Fn=a.Eb(_v),isFinite(Fn.width)?(Lm+=Fn.width,Lm+=Fn.Wc()):Pg(Fn)===Wp?(Lm+=Fn.oa,Lm+=Fn.Wc()):Fn.oa!==0&&(yu+=Fn.oa,yu+=Fn.Wc()));isFinite(Kv.width)?$d=Math.min(Kv.width,gw.width):$d=Ds!==zn&&isFinite(y)?y:yu,$d=Math.max($d,a.minSize.width),$d=Math.max($d-Lm,0);for(var iC=yu===0?1:Math.max($d/yu,1),Gv=0;Gv<z;Gv++)qn[Gv]!==void 0&&(Fn=a.Eb(Gv),isFinite(Fn.width)||Pg(Fn)===Wp||(Fn.actual=Fn.oa*iC),Fn.position=E.width,Fn.oa!==0&&(E.width+=Fn.oa,E.width+=Fn.Wc()));z=a.rowCount;for(var Uv=0;Uv<z;Uv++)mi[Uv]!==void 0&&(Fn=a.Fb(Uv),isFinite(Fn.height)?(Dm+=Fn.height,Dm+=Fn.Wc()):Pg(Fn)===Wp?(Dm+=Fn.oa,Dm+=Fn.Wc()):Fn.oa!==0&&(Fu+=Fn.oa,Fu+=Fn.Wc()));isFinite(Kv.height)?Hd=Math.min(Kv.height,gw.height):Hd=Ds!==zn&&isFinite(x)?x:Fu,Hd=Math.max(Hd,a.minSize.height),Hd=Math.max(Hd-Dm,0);for(var rC=Fu===0?1:Math.max(Hd/Fu,1),Yv=0;Yv<z;Yv++)mi[Yv]!==void 0&&(Fn=a.Fb(Yv),isFinite(Fn.height)||Pg(Fn)===Wp||(Fn.actual=Fn.oa*rC),Fn.position=E.height,Fn.oa!==0&&(E.height+=Fn.oa,E.height+=Fn.Wc()));z=nt.length;for(var Ky=0;Ky<z;Ky++){var Im=nt[Ky],_y=0,Gy=0;Im.type===Un.TableRow?(_y=E.width,Fn=a.Fb(Im.row),Gy=Fn.actual):(Fn=a.Eb(Im.column),_y=Fn.actual,Gy=E.height),Im.measuredBounds.h(0,0,_y,Gy),Bo(Im,!1)}Fe(nt),a.inRowsCols=St},gg.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var tt=a.inRowsCols;if(tt!==null){for(var nt,it,ot=tt.length,st=0,ht=0;ht<ot;ht++)tt[ht]&&(st=Math.max(st,tt[ht].length));it=a.rowDefs,nt=a.colDefs;var ft=ht=0,mt=Math.min(a.topIndex,ot-1);if(0<it.length){for(;mt!==ot&&(it[mt]===void 0||it[mt].oa===0);)mt++;mt=Math.max(Math.min(mt,ot-1),0),ht=-it[mt].position}var xt=Math.min(a.leftIndex,st-1);if(0<nt.length){for(;xt!==st&&(nt[xt]===void 0||nt[xt].oa===0);)xt++;xt=Math.max(Math.min(xt,st-1),0),ft=-nt[xt].position}for(var St=0,Ft=0;St!==ot&&it[St]===void 0;)St++;for(;Ft!==ot&&nt[Ft]===void 0;)Ft++;st=a.part,a.Fb(St),a.Eb(Ft);for(var Ot=0;Ot<y.length;Ot++){var Wt=y[Ot];if(Wt instanceof Un&&Wt.visible&&lh(Wt)){if(Wt.type===Un.TableRow){nt=a.Fb(Wt.row);var Ut=a.Eb(Ft)}else nt=a.Fb(St),Ut=a.Eb(Wt.column);it=nt.position+ht+E,nt.oa!==0&&(it+=nt.Io(Math.max(St,mt))),nt=Ut.position+ft+z,Ut.oa!==0&&(nt+=Ut.Io(Math.max(Ft,xt))),Ut=Wt.measuredBounds,Wt.Uk(),Wt.actualBounds.ka();var ne=Wt.actualBounds,fe=un.allocAt(ne.x,ne.y,ne.width,ne.height);ne.x=Wt.type===Un.TableRow?z:nt,ne.y=Wt.type===Un.TableColumn?E:it,ne.width=Ut.width,ne.height=Ut.height,Wt.actualBounds.freeze(),lu(Wt,!1),to(fe,ne)||st===null||(st.oh(),Wt.Pn(st)),un.free(fe)}}for(Ot=kn.alloc(),Wt=0;Wt<ot;Wt++)if(tt[Wt]){for(st=tt[Wt].length,Ut=a.Fb(Wt),it=Ut.position+ht+E,Ut.oa!==0&&(it+=Ut.Io(Math.max(St,mt))),ne=0;ne<st;ne++)if(tt[Wt][ne]){fe=a.Eb(ne),nt=fe.position+ft+z,fe.oa!==0&&(nt+=fe.Io(Math.max(Ft,xt)));for(var _e=tt[Wt][ne],si=_e.length,bi=0;bi<si;bi++){var mi=_e[bi],qn=mi.measuredBounds;Ot.h(0,0);for(var Fn=1;Fn<mi.rowSpan&&!(Wt+Fn>=a.rowCount);Fn++){var ir=a.Fb(Wt+Fn);ir.oa!==0&&(Ot.height+=ir.total)}for(Fn=1;Fn<mi.columnSpan&&!(ne+Fn>=a.columnCount);Fn++)ir=a.Eb(ne+Fn),ir.oa!==0&&(Ot.width+=ir.total);var Gi=fe.oa+Ot.width,kr=Ut.oa+Ot.height;Fn=nt,ir=it;var Hr=Gi,Go=kr,Jo=nt,Os=it,Uo=Gi,vh=kr;nt+Gi>x.width&&(Uo=Math.max(x.width-nt,0)),it+kr>x.height&&(vh=Math.max(x.height-it,0));var Lo=mi.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=cr);var Fa=Lo.x,Ls=Lo.y,yh=Lo.offsetX;Lo=Lo.offsetY;var Rl=fe.alignment,ua=Ut.alignment;Rl.sb()&&(Fa=Rl.x,yh=Rl.offsetX),ua.sb()&&(Ls=ua.y,Lo=ua.offsetY)}else Fa=Lo.x,Ls=Lo.y,yh=Lo.offsetX,Lo=Lo.offsetY;(isNaN(Fa)||isNaN(Ls))&&(Ls=Fa=.5,Lo=yh=0),Rl=qn.width,ua=qn.height;var Sl=mi.margin,hl=Sl.left+Sl.right,oc=Sl.top+Sl.bottom,Ba=Oa(mi,Ut,fe,!1);!isNaN(mi.desiredSize.width)||Ba!==Kn&&Ba!==Di||(Rl=Math.max(Gi-hl,0)),!isNaN(mi.desiredSize.height)||Ba!==Kn&&Ba!==Zi||(ua=Math.max(kr-oc,0)),Gi=mi.maxSize,kr=mi.minSize,Rl=Math.min(Gi.width,Rl),ua=Math.min(Gi.height,ua),Rl=Math.max(kr.width,Rl),ua=Math.max(kr.height,ua),Gi=ua+oc,Fn+=Hr*Fa-(Rl+hl)*Fa+yh+Sl.left,ir+=Go*Ls-Gi*Ls+Lo+Sl.top,mi.visible&&(Sr(Jo,Os,Uo,vh,Fn,ir,qn.width,qn.height)?mi.arrange(Fn,ir,Rl,ua):mi.arrange(Fn,ir,Rl,ua,new un(Jo,Os,Uo,vh)))}}}for(kn.free(Ot),a=0;a<b;a++)x=y[a],z=x instanceof Un?x:null,z!==null&&lh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function vg(){this.xa="Base"}Xn(vg,$o),vg.prototype.measure=function(){},vg.prototype.arrange=function(){};function yg(){this.xa="Base"}Xn(yg,$o),yg.prototype.measure=function(){},yg.prototype.arrange=function(){};function xg(){this.xa="Base"}Xn(xg,$o),xg.prototype.measure=function(a,y,x,b,E,z,tt){1<b.length&&Rt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,tt);var nt=b.measuredBounds,it=b.margin,ot=it.right+it.left;if(it=it.top+it.bottom,isFinite(y)||isFinite(x)){var st=b.scale,ht=nt.width;nt=nt.height;var ft=Math.max(y-ot,0),mt=Math.max(x-it,0),xt=1;a.viewboxStretch===Pi?ht!==0&&nt!==0&&(xt=Math.min(ft/ht,mt/nt)):ht!==0&&nt!==0&&(xt=Math.max(ft/ht,mt/nt)),xt===0&&(xt=1e-4),b.Ca*=xt,st!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,z,tt))}nt=b.measuredBounds,E.width=isFinite(y)?y:Math.max(nt.width+ot,0),E.height=isFinite(x)?x:Math.max(nt.height+it,0)},xg.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,z=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=cr),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-E*tt.y+tt.offsetY,b.width,b.height)};function $p(){this.xa="Base"}Xn($p,$o),$p.prototype.measure=function(){},$p.prototype.arrange=function(){},$p.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var z=a.naturalBounds,tt=a.actualBounds,nt=z.width,it=z.height,ot=Math.ceil(nt/E),st=Math.ceil(it/b),ht=a.gridOrigin,ft=ht.x;ht=ht.y,y.save(),y.beginPath(),y.rect(0,0,nt,it),y.clip(),y.Se();for(var mt=[],xt=a.O.s,St=xt.length,Ft=0;Ft<St;Ft++){var Ot=xt[Ft],Wt=[];if(mt.push(Wt),Ot.visible){var Ut=Ot.interval;if(!(0>Ut)){Ot=g0(Ot.figure);for(var ne=0;ne<St;ne++)if(ne!==Ft){var fe=xt[ne];fe.visible&&g0(fe.figure)===Ot&&(fe=fe.interval,fe>Ut&&Wt.push(fe))}}}}for(xt=a.O.s,St=xt.length,Ft=0;Ft<St;Ft++){var _e=xt[Ft];if(_e.visible&&(Wt=_e.interval||1,Ot=Math.abs(Wt),!(2>E*Ot*x))){if(Ut=_e.segmentIndex,(!isFinite(Ut)||isNaN(Ut))&&(Ut=0),0>Ut&&(Ut=Ot-Math.min(-Ut,Ot)),Ut=Math.round(Ut%Ot),Ot=_e.opacity,ne=1,Ot!==1){if(Ot===0)continue;ne=y.globalAlpha,y.globalAlpha=ne*Ot}fe=mt[Ft];var si=!1,bi=_e.strokeDashArray;if(bi!==null&&(si=!0,y.js(bi,_e.strokeDashOffset)),_e.figure==="LineV"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,xo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),bi=_e=Math.floor((ft-E)/E);bi<=_e+ot;bi++){var mi=bi*E+ft;0<=mi&&mi<=nt&&wg(bi,Wt,Ut,fe)&&(y.moveTo(mi,0),y.lineTo(mi,it))}y.stroke(),y.Se()}else if(_e.figure==="LineH"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,xo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),bi=_e=Math.floor((ht-b)/b);bi<=_e+st;bi++)mi=bi*b+ht,0<=mi&&mi<=it&&wg(bi,Wt,Ut,fe)&&(y.moveTo(0,mi),y.lineTo(nt,mi));y.stroke(),y.Se()}else if(_e.figure==="BarV"&&_e.fill!==null)for(xo(a,y,_e.fill,!0,!1,z,tt),_e=_e.width,isNaN(_e)&&(_e=E),mi=bi=Math.floor((ft-E)/E);mi<=bi+ot;mi++){var qn=mi*E+ft;0<=qn+_e&&qn<=nt&&wg(mi,Wt,Ut,fe)&&y.fillRect(qn,0,_e,it)}else if(_e.figure==="BarH"&&_e.fill!==null)for(xo(a,y,_e.fill,!0,!1,z,tt),_e=_e.height,isNaN(_e)&&(_e=b),mi=bi=Math.floor((ht-b)/b);mi<=bi+st;mi++)qn=mi*b+ht,0<=qn+_e&&qn<=it&&wg(mi,Wt,Ut,fe)&&y.fillRect(0,qn,nt,_e);si&&y.fs(),Ot!==1&&(y.globalAlpha=ne)}}y.restore(),y.Vc(!1)};function wg(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Cg(){this.xa="Base"}Xn(Cg,$o),Cg.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof Pr||a instanceof ei){var tt=null,nt=null;if(a instanceof ei&&(tt=a),a instanceof Pr&&(nt=a,tt=nt.adornedPart,a.j===null&&(a.j=[])),tt instanceof ei){var it=tt;if(z===0)So(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ot=a instanceof Pr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var st=it.points,ht=tt.pointsCount;nt!==null?nt.Ul(!1):tt!==null&&tt.Ul(!1),nt=y.width;var ft=y.height,mt=a.j;if(mt.length=0,ot!==null){ox(a,nt,ft,ot);var xt=ot.measuredBounds;x.ed(xt),mt.push(xt)}xt=er.alloc();for(var St=Lt.alloc(),Ft=Lt.alloc(),Ot=0;Ot<z;Ot++){var Wt=b[Ot];if(Wt!==ot)if(Wt.isPanelMain&&Wt instanceof ar){ox(a,nt,ft,Wt);var Ut=Wt.measuredBounds;x.ed(Ut),mt.push(Ut)}else if(2>ht)Wt.measure(1/0,1/0,0,0),Ut=Wt.measuredBounds,x.ed(Ut),mt.push(Ut);else{var ne=Wt.segmentIndex,fe=Wt.segmentFraction,_e=Wt.alignmentFocus;_e.Mc()&&(_e=cr);var si=Wt.segmentOrientation,bi=Wt.segmentOffset;if(isNaN(ne)){var mi=it.ua;Ut=Ne(),mi.Qu(fe,Ut);var qn=Lt.allocAt(Ut[0],Ut[1]);if(qn.add(it.i(0)),mi.type===ti.j?qn.offset(-mi.startX,-mi.startY):(mi=mi.figures.first(),mi!==null&&qn.offset(-mi.startX,-mi.startY)),mi=Ut[2],si!==Vs){var Fn=it.computeAngle(Wt,si,mi);Wt.Kb=Fn}Fn=qn.x-y.x;var ir=qn.y-y.y;Lt.free(qn),Fe(Ut)}else if(ne<-ht||ne>=ht)Ut=Lt.alloc(),it.vg(),it.computeMidPoint(Ut),mi=it.midAngle,si!==Vs&&(Fn=it.computeAngle(Wt,si,mi),Wt.Kb=Fn),Fn=Ut.x-y.x,ir=Ut.y-y.y,Lt.free(Ut);else{if(Fn=0,0<=ne?(ir=st.M(ne),Ut=ne<ht-1?st.M(ne+1):ir):(Fn=ht+ne,ir=st.M(Fn),Ut=0<Fn?st.M(Fn-1):ir),ir.Xa(Ut)){0<=ne?(mi=0<ne?st.M(ne-1):ir,Fn=ne<ht-2?st.M(ne+2):Ut):(mi=Fn<ht-1?st.M(Fn+1):ir,Fn=1<Fn?st.M(Fn-2):Ut),qn=mi.Bf(ir);var Gi=Ut.Bf(Fn);mi=qn>Gi+10?0<=ne?mi.ab(ir):ir.ab(mi):Gi>qn+10?0<=ne?Ut.ab(Fn):Fn.ab(Ut):0<=ne?mi.ab(Fn):Fn.ab(mi)}else mi=0<=ne?ir.ab(Ut):Ut.ab(ir);si!==Vs&&(Fn=it.computeAngle(Wt,si,mi),Wt.Kb=Fn),Fn=ir.x+(Ut.x-ir.x)*fe-y.x,ir=ir.y+(Ut.y-ir.y)*fe-y.y}Wt.measure(1/0,1/0,0,0),Ut=Wt.measuredBounds,qn=Wt.naturalBounds;var kr=0;Wt instanceof ar&&(kr=Wt.strokeWidth),Gi=qn.width+kr;var Hr=qn.height+kr;xt.reset(),xt.translate(-Ut.x,-Ut.y),xt.scale(Wt.scale,Wt.scale),xt.rotate(si===Vs?Wt.angle:mi,Gi/2,Hr/2),si!==qp&&si!==em||xt.rotate(90,Gi/2,Hr/2),si!==tm&&si!==nm||xt.rotate(-90,Gi/2,Hr/2),si===Jg&&(45<mi&&135>mi||225<mi&&315>mi)&&xt.rotate(-mi,Gi/2,Hr/2),qn=new un(0,0,Gi,Hr),St.xi(qn,_e),xt.Ga(St),_e=-St.x+kr/2*Wt.scale,Wt=-St.y+kr/2*Wt.scale,Ft.assign(bi),kr=isNaN(bi.x);var Go=isNaN(bi.y);if(kr||Go){Gi=Gi/2+3,Hr=Hr/2+3;var Jo=45<=mi&&135>=mi,Os=225<=mi&&315>=mi;si===Vs&&(Jo||Os)?(Ft.x=Go?Gi:bi.y,Ft.y=kr?Hr:bi.x,Jo?0<=ne||isNaN(ne)&&.5>fe||!kr||(Ft.y=-Hr):Os&&((0<=ne||isNaN(ne)&&.5>fe)&&kr&&(Ft.y=-Hr),Go&&(Ft.x=-Gi))):(kr&&(Ft.x=0<=ne||isNaN(ne)&&.5>fe?Gi:-Gi),Go&&(Ft.y=-Hr),Ft.rotate(mi))}else Ft.rotate(mi);Fn+=Ft.x,ir+=Ft.y,qn.set(Ut),qn.h(Fn+_e,ir+Wt,Ut.width,Ut.height),mt.push(qn),x.ed(qn)}}if(tt!==null)for(b=tt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),So(E,x.width||0,x.height||0),er.free(xt),Lt.free(St),Lt.free(Ft)}}}},Cg.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Pr||a instanceof ei){var b=a,E=null;a instanceof Pr&&(E=a,b=E.adornedPart);var z=a instanceof Pr?null:b.path,tt=a.j;if(tt.length!==0){var nt=0;if(z!==null&&nt<tt.length){var it=tt[nt];nt++,z.arrange(it.x-a.jg.x,it.y-a.jg.y,it.width,it.height)}for(it=0;it<x;it++){var ot=y[it];if(ot!==z&&nt<tt.length){var st=tt[nt];nt++,ot.arrange(st.x-a.jg.x,st.y-a.jg.y,st.width,st.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof ei)for(z=a.labelNodes;z.next();){var ht=a;tt=z.value,nt=tt.segmentIndex,it=tt.segmentFraction;var ft=tt.alignmentFocus;if(ot=tt.segmentOrientation,st=tt.segmentOffset,isNaN(nt)){var mt=ht.ua,xt=Ne();mt.Qu(it,xt);var St=Lt.allocAt(xt[0],xt[1]);St.add(ht.i(0)),mt.type===ti.j||(mt=mt.figures.first()),St.offset(-mt.startX,-mt.startY),mt=xt[2],ot!==Vs&&(ht=ht.computeAngle(tt,ot,mt),tt.angle=ht),ht=St.x;var Ft=St.y;Lt.free(St),Fe(xt)}else if(nt<-x||nt>=x)xt=Lt.alloc(),mt=ht,Ft=xt,mt.vg(),mt.computeMidPoint(Ft),mt=ht.midAngle,ot!==Vs&&(ht=ht.computeAngle(tt,ot,mt),tt.angle=ht),ht=xt.x,Ft=xt.y,Lt.free(xt);else{if(St=0,0<=nt?(xt=y.s[nt],Ft=nt<x-1?y.s[nt+1]:xt):(St=x+nt,xt=y.s[St],Ft=0<St?y.s[St-1]:xt),xt.Xa(Ft)){0<=nt?(mt=0<nt?y.s[nt-1]:xt,St=nt<x-2?y.s[nt+2]:Ft):(mt=St<x-1?y.s[St+1]:xt,St=1<St?y.s[St-2]:Ft);var Ot=mt.Bf(xt),Wt=Ft.Bf(St);mt=Ot>Wt+10?0<=nt?mt.ab(xt):xt.ab(mt):Wt>Ot+10?0<=nt?Ft.ab(St):St.ab(Ft):0<=nt?mt.ab(St):St.ab(mt)}else mt=0<=nt?xt.ab(Ft):Ft.ab(xt);ot!==Vs&&(ht=ht.computeAngle(tt,ot,mt),tt.angle=ht),ht=xt.x+(Ft.x-xt.x)*it,Ft=xt.y+(Ft.y-xt.y)*it}if(ft.ys())tt.location=new Lt(ht,Ft);else{ft.Mc()&&(ft=cr),xt=er.alloc(),xt.reset(),xt.scale(tt.scale,tt.scale),xt.rotate(tt.angle,0,0);var Ut=tt.naturalBounds;St=un.allocAt(0,0,Ut.width,Ut.height),Ot=Lt.alloc(),Ot.xi(St,ft),xt.Ga(Ot),ft=-Ot.x,Wt=-Ot.y;var ne=Ut.width,fe=Ut.height;Ut=Lt.alloc(),Ut.assign(st);var _e=isNaN(st.x),si=isNaN(st.y);if(_e||si){ne=ne/2+3,fe=fe/2+3;var bi=45<=mt&&135>=mt,mi=225<=mt&&315>=mt;ot===Vs&&(bi||mi)?(Ut.x=si?ne:st.y,Ut.y=_e?fe:st.x,bi?0<=nt||isNaN(nt)&&.5>it||!_e||(Ut.y=-fe):mi&&((0<=nt||isNaN(nt)&&.5>it)&&_e&&(Ut.y=-fe),si&&(Ut.x=-ne))):(_e&&(Ut.x=0<=nt||isNaN(nt)&&.5>it?ne:-ne),si&&(Ut.y=-fe),Ut.rotate(mt))}else Ut.rotate(mt);ht+=Ut.x,Ft+=Ut.y,xt.pp(St),ft+=St.x,Wt+=St.y,nt=Lt.allocAt(ht+ft,Ft+Wt),tt.move(nt),Lt.free(nt),Lt.free(Ut),Lt.free(Ot),un.free(St),er.free(xt)}}E!==null?E.Ul(!1):b.Ul(!1),b=Ax(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Lt.free(b)}};function ox(a,y,x,b){if(Il(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Pr&&a.type===Un.Link&&a.adornedObject instanceof ar&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof ei&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Pr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Bo(b,!1)}}function Hp(){this.xa="Base"}Xn(Hp,$o),Hp.prototype.measure=function(a,y,x,b,E,z,tt){var nt=a.Pb();a.graduatedBounds=[];var it=nt.margin,ot=it.right+it.left,st=it.top+it.bottom;nt.measure(y,x,z,tt);var ht=nt.measuredBounds,ft=new un(-it.left,-it.top,Math.max(ht.width+ot,0),Math.max(ht.height+st,0));a.graduatedBounds.push(ft),E.assign(ft);for(var mt=nt.geometry,xt=nt.strokeWidth,St=mt.flattenedSegments,Ft=mt.flattenedLengths,Ot=mt.flattenedTotalLength,Wt=St.length,Ut=0,ne=0,fe=Ne(),_e=0;_e<Wt;_e++){var si=St[_e],bi=[];ne=Ut=0;for(var mi=si.length,qn=0;qn<mi;qn+=2){var Fn=si[qn],ir=si[qn+1];if(qn!==0){var Gi=180*Math.atan2(ir-ne,Fn-Ut)/Math.PI;0>Gi&&(Gi+=360),bi.push(Gi)}Ut=Fn,ne=ir}fe.push(bi)}if(a.graduatedIntervals===null){for(var kr=[],Hr=a.O.s,Go=Hr.length,Jo=0;Jo<Go;Jo++){var Os=Hr[Jo],Uo=[];if(kr.push(Uo),Os.visible){var vh=Os.interval;if(!(0>vh)){for(var Lo=0;Lo<Go;Lo++)if(Lo!==Jo){var Fa=Hr[Lo];if(Fa.visible&&Os.constructor===Fa.constructor){var Ls=Fa.interval;Ls>vh&&Uo.push(Ls)}}}}}a.graduatedIntervals=kr}var yh=a.graduatedIntervals,Rl=a.O.s,ua=Rl.length,Sl=0,hl=0,oc=Ot;a.graduatedMarks=[];for(var Ba,Vf=0;Vf<ua;Vf++){var bl=Rl[Vf];if(Ba=[],bl.visible&&bl!==nt){var Ds=Math.abs(bl.interval),Pm=a.graduatedTickUnit;if(!(2>Pm*Ds*Ot/a.graduatedRange&&bl.graduatedSkip===null)){var Ad=Ft[0][0],Ya=0,cl=0;hl=Ot*bl.graduatedStart-1e-4,oc=Ot*bl.graduatedEnd+1e-4;var Wc=Pm*Ds,El=a.graduatedTickBase;if(El<a.graduatedMin){var sc=(a.graduatedMin-El)/Wc;sc=sc%1===0?sc:Math.floor(sc+1),El+=sc*Wc}else El>a.graduatedMin+Wc&&(El-=Math.floor((El-a.graduatedMin)/Wc)*Wc);for(var zv=yh[Vf],Nm=El,Hy=1e-6*a.graduatedMax,yu=1;El<=a.graduatedMax+Hy;yu++){t:{for(var Fu=zv.length,Fd=0;Fd<Fu;Fd++){var lc=(El-a.graduatedTickBase)%(zv[Fd]*a.graduatedTickUnit),Kf=1e-6*a.graduatedTickUnit;if(lc<Kf&&lc>-Kf){var ac=!1;break t}}ac=!0}if(ac&&(El>a.graduatedMax&&(El=a.graduatedMax),bl.graduatedSkip===null||bl instanceof Zr&&!bl.graduatedSkip(El,bl)||bl instanceof ar&&!bl.graduatedSkip(El,bl))&&(Sl=(El-a.graduatedMin)*Ot/a.graduatedRange,Sl>Ot&&(Sl=Ot),hl<=Sl&&Sl<=oc)){for(var xu=fe[Ya][cl],xh=Ft[Ya][cl];Ya<Ft.length;){for(;Sl>Ad&&cl<Ft[Ya].length-1;)cl++,xu=fe[Ya][cl],xh=Ft[Ya][cl],Ad+=xh;if(Sl<=Ad)break;Ya++,cl=0,xu=fe[Ya][cl],xh=Ft[Ya][cl],Ad+=xh}var dl=St[Ya],Xa=dl[2*cl],$v=dl[2*cl+1],Bu=(Sl-(Ad-xh))/xh,_f=new Lt(Xa+(dl[2*cl+2]-Xa)*Bu+xt/2-mt.bounds.x,$v+(dl[2*cl+3]-$v)*Bu+xt/2-mt.bounds.y);_f.scale(nt.scale,nt.scale);t:{var Ra=xu,Vc=fe[Ya];if(!(.5005>Bu&&.4995<Bu)){var Ja=Ra;if(.5>Bu?0<cl?Ja=Vc[cl-1]:ge.$(dl[0],dl[dl.length-2])&&ge.$(dl[1],dl[dl.length-1])&&(Ja=Vc[Vc.length-1]):.5<Bu&&(cl+1<Vc.length?Ja=Vc[cl+1]:ge.$(dl[0],dl[dl.length-2])&&ge.$(dl[1],dl[dl.length-1])&&(Ja=Vc[0])),Ra!==Ja){var Bd=Math.abs(Ra-Ja);if(180<Bd&&(Ra<Ja?Ra+=360:Ja+=360,Bd=Math.abs(Ra-Ja)),5e-4>Bu||.9995<Bu){xu=(Ra+Ja)/2%360;break t}if(10>Bd){var Gf=1-Math.abs(.5-Bu);xu=(Ra*Gf+Ja*(1-Gf))%360;break t}}}xu=Ra}if(bl instanceof Zr){var Pa="";bl.graduatedFunction!==null?(Pa=bl.graduatedFunction(El,bl),Pa=Pa!=null?Pa.toString():""):Pa=(+El.toFixed(2)).toString(),Pa!==""&&Ba.push({$l:_f,angle:xu,text:Pa})}else Ba.push({$l:_f,angle:xu})}El=Nm+yu*Wc}}}a.graduatedMarks.push(Ba)}Fe(fe);var us=a.graduatedMarks;if(us!==null)for(var Tm=b.length,Ys=0;Ys<Tm;Ys++){var Do=b[Ys],Xs=us[Ys];if(Do.visible&&Do!==nt&&Xs.length!==0){if(Do instanceof ar){var Ru=a,wh=E,Kc=Do.alignmentFocus;Kc.Mc()&&(Kc=Lr);var Zy=Do.angle;Do.Kb=0,Do.measure(1/0,1/0,0,0),Do.Kb=Zy;var Hv=Do.measuredBounds,Uf=Hv.width,_c=Hv.height,Rd=un.allocAt(0,0,Uf,_c),fl=Lt.alloc();fl.xi(Rd,Kc),un.free(Rd);for(var ju=-fl.x,ja=-fl.y,Jl=new un,uc=Xs.length,Yf=0;Yf<uc;Yf++)for(var hc=Xs[Yf],Zv=hc.$l.x,Xf=hc.$l.y,Co=hc.angle,Na=0;4>Na;Na++){switch(Na){case 0:fl.h(ju,ja);break;case 1:fl.h(ju+Uf,ja);break;case 2:fl.h(ju,ja+_c);break;case 3:fl.h(ju+Uf,ja+_c)}fl.rotate(Co+Do.angle),fl.offset(Zv,Xf),Yf===0&&Na===0?Jl.h(fl.x,fl.y,0,0):Jl.Ye(fl),fl.offset(-Zv,-Xf),fl.rotate(-Co-Do.angle)}Lt.free(fl),Ru.graduatedBounds!==null&&Ru.graduatedBounds.push(Jl),Ar(wh,Jl.x,Jl.y,Jl.width,Jl.height)}else if(Do instanceof Zr){var ha=a,Wv=E;ha.temporaryTextBlock===null&&(ha.temporaryTextBlock=new Zr);var Ml=ha.temporaryTextBlock;wx(Ml,Do);var Ch=Do.alignmentFocus;Ch.Mc()&&(Ch=Lr);for(var ca=Do.segmentOrientation,Jf=Do.segmentOffset,cc=new un,km=0,Qf=0,Qa=0,Gc=0,dc=0,qf=Xs.length,Sh=0;Sh<qf;Sh++){var wu=Xs[Sh];km=wu.$l.x,Qf=wu.$l.y,Qa=wu.angle,dc=Gc=Do.angle,ca!==Vs&&(dc=ca===Qp||ca===Xg?Qa+Do.angle:Qa,Gc=ei.computeAngle(ca,dc)),Ml.Kb=Gc,Ml.text=wu.text||"",Ml.measure(1/0,1/0,0,0);var bh=Ml.measuredBounds,zu=Ml.naturalBounds,Eh=zu.width,Uc=zu.height,za=er.alloc();za.reset(),za.translate(-bh.x,-bh.y),za.scale(Ml.scale,Ml.scale),za.rotate(dc,Eh/2,Uc/2),ca!==qp&&ca!==em||za.rotate(90,Eh/2,Uc/2),ca!==tm&&ca!==nm||za.rotate(-90,Eh/2,Uc/2),ca===Jg&&(45<Qa&&135>Qa||225<Qa&&315>Qa)&&za.rotate(-Qa,Eh/2,Uc/2);var jd=un.allocAt(0,0,Eh,Uc),Mh=Lt.alloc();Mh.xi(jd,Ch),za.Ga(Mh);var zd=-Mh.x,Wy=-Mh.y,$u=Lt.alloc();$u.assign(Jf),isNaN($u.x)&&($u.x=Eh/2+3),isNaN($u.y)&&($u.y=-(Uc/2+3)),$u.rotate(Qa),km+=$u.x+zd,Qf+=$u.y+Wy;var Yc=new un(km,Qf,bh.width,bh.height),Om=new un(bh.x,bh.y,bh.width,bh.height),Vy=new un(zu.x,zu.y,zu.width,zu.height);wu.Sz=Gc,wu.lineCount=Ml.lineCount,wu.lines=[Ml.Cb,Ml.Ih,Ml.df,Ml.Le,Ml.Qc,Ml.Qb,Ml.ze],wu.actualBounds=Yc,wu.measuredBounds=Om,wu.naturalBounds=Vy,Sh===0?cc.assign(Yc):cc.ed(Yc),Lt.free($u),Lt.free(Mh),un.free(jd),er.free(za)}ha.graduatedBounds!==null&&ha.graduatedBounds.push(cc),Ar(Wv,cc.x,cc.y,cc.width,cc.height)}Bo(Do,!1)}}},Hp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,tt=0,nt=z[tt];tt++,b!==null&&b.arrange(nt.x-x.x,nt.y-x.y,nt.width,nt.height);for(var it=y.length,ot=0;ot<it;ot++){var st=y[ot];nt=E[ot],st.visible&&st!==b&&nt.length!==0&&(nt=z[tt],tt++,st.arrange(nt.x-x.x,nt.y-x.y,nt.width,nt.height))}a.graduatedBounds=null}}},Hp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,tt=E.height;E=y instanceof xl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var nt=z.actualBounds,it=a.O.s,ot=a.graduatedMarks,st=it.length,ht=0;ht<st;ht++){var ft=it[ht],mt=ot[ht],xt=mt.length;if(ft.visible&&ft!==z&&mt.length!==0){if(ft instanceof ar){if(!(2>a.graduatedTickUnit*ft.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&ft.graduatedSkip===null)){var St=ft.measuredBounds,Ft=ft.strokeWidth*ft.scale,Ot=ft.alignmentFocus;Ot.Mc()&&(Ot=Lr);for(var Wt=0;Wt<xt;Wt++){var Ut=mt[Wt].$l,ne=mt[Wt].angle,fe=Ot,_e=ft.Ab;_e.reset(),_e.translate(Ut.x+nt.x,Ut.y+nt.y),_e.rotate(ne+ft.angle,0,0),_e.translate(-St.width*fe.x+fe.offsetX+Ft/2,-St.height*fe.y+fe.offsetY+Ft/2),_e.scale(ft.scale,ft.scale),ra(ft,!1),ft.wh.set(ft.Ab),ft.Kk=ft.scale,Vl(ft,!1),ft.gc(y,x),E&&(a.svg.appendChild(ft.svg),ft.svg=null),ft.Ab.reset()}}}else if(ft instanceof Zr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Zr),St=a.temporaryTextBlock,wx(St,ft),Ft=0;Ft<xt;Ft++)Ot=mt[Ft],Ot.actualBounds&&Ot.measuredBounds&&Ot.naturalBounds&&(St.ec=Ot.text||"",St.Kb=Ot.Sz||0,St.Gc=Ot.lineCount||0,Wt=Ot.lines,Wt!==void 0&&(St.Cb=Wt[0],St.Ih=Wt[1],St.df=Wt[2],St.Le=Wt[3],St.Qc=Wt[4],St.Qb=Wt[5],St.ze=Wt[6]),Ot.naturalBounds&&(St.dc=Ot.naturalBounds),Ot.actualBounds&&(Wt=Ot.actualBounds,St.arrange(Wt.x,Wt.y,Wt.width,Wt.height)),Wt=Ot.actualBounds,St.arrange(Wt.x,Wt.y,Wt.width,Wt.height),Ut=Ot.measuredBounds,Ot=Ot.naturalBounds,ne=St.Ab,ne.reset(),ne.translate(Wt.x+nt.x,Wt.y+nt.y),ne.translate(-Ut.x,-Ut.y),St.no(ne,Ot.x,Ot.y,Ot.width,Ot.height),ra(St,!1),St.wh.set(St.Ab),St.Kk=St.scale,Vl(St,!1),St.Ng=ft.part,St.Me=ft.panel,St.gc(y,x),St.Me=null,St.Ng=null,E&&(a.svg.appendChild(St.svg),St.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Un(a,y){if(pe.call(this),this.na=null,a===void 0)this.na=Un.Position;else if(typeof a=="string"){var x=wa.I(a);x!==null&&(this.na=x)}else a instanceof $o?this.na=a:a&&(this.na=Un.Position,y=a);this.na===null&&Rt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Un.Grid?1048576:0),this.O=new $e,this.yb=Qo,this.Tm=di,this.Uf=or,this.$g=null,this.$e="",this.jg=new un(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Pi,this.jn=Vr,this.kn=ur,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Xn(Un,pe),Un.prototype.cloneProtected=function(a){pe.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},Un.prototype.Af=function(a){pe.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Un.prototype.copy=function(){var a=pe.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof hi&&(z.Te=!0);var nt=a.diagram;nt!==null&&nt.undoManager.isUndoingRedoing||z.cb(No,"elements",a,null,E,null,tt)}}return a}return null},yt=Un.prototype,yt.toString=function(){return"Panel("+this.type.name+")#"+Ui(this)},yt.Pn=function(a){pe.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},yt.hh=function(a,y){if(this.na===Un.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Un.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Un.Table)if(a.yc(),a instanceof xl){var x=a.yd;a.yd=ag(a,"gojs-ts"),m0(this,a),a.nh.pop(),a.yd=x}else m0(this,a);(x=this.isClipping&&this.na===Un.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,tt=0;tt<z;tt++){var nt=E[tt];x&&nt===b&&(a.clipInsteadOfFill=!0),nt.gc(a,y),x&&nt===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function m0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Sg(a,y,!0,x,!0),b!==null&&Sg(a,y,!1,b,!0),x!==null&&sx(a,y,!0,x),b!==null&&sx(a,y,!1,b),x!==null&&Sg(a,y,!0,x,!1),b!==null&&Sg(a,y,!1,b,!1)}function sx(a,y,x,b){for(var E=b.length,z=a.actualBounds,tt=a.naturalBounds,nt=!0,it=0;it<E;it++){var ot=b[it];if(ot!==void 0&&ot.actual!==0)if(nt)nt=!1;else{if(x){if(ot.position>tt.height)continue}else if(ot.position>tt.width)continue;var st=ot.separatorStrokeWidth;isNaN(st)&&(st=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ht=ot.separatorStroke;if(ht===null&&(ht=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),st!==0&&ht!==null){xo(a,y,ht,!1,!1,tt,z),ht=!1;var ft=ot.separatorDashArray;ft===null&&(ft=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ft!==null&&(ht=!0,y.js(ft,0)),y.beginPath(),ft=ot.position+st,x?ft>tt.height&&(st-=ft-tt.height):ft>tt.width&&(st-=ft-tt.width),ot=ot.position+st/2,y.lineWidth=st,st=a.yb,x?(ot+=st.top,ft=tt.width-st.right,y.moveTo(st.left,ot),y.lineTo(ft,ot)):(ot+=st.left,ft=tt.height-st.bottom,y.moveTo(ot,st.top),y.lineTo(ot,ft)),y.stroke(),y.Se(),ht&&y.fs()}}}}function Sg(a,y,x,b,E){for(var z=b.length,tt=a.actualBounds,nt=a.naturalBounds,it=lx(a,!0),ot=lx(a,!1),st=0;st<z;st++){var ht=b[st];if(ht!==void 0&&ht.background!==null&&ht.coversSeparators!==E&&ht.actual!==0){var ft=x?tt.height:tt.width;if(!(ht.position>ft)){var mt=ht.Wc(),xt=ht.separatorStrokeWidth;isNaN(xt)&&(xt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var St=ht.separatorStroke;St===null&&(St=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(St===null||ht.index===(x?it:ot))&&(xt=0),mt-=xt,xt=ht.position+xt,mt+=ht.actual,xt+mt>ft&&(mt=ft-xt),0>=mt||(ft=a.yb,xo(a,y,ht.background,!0,!1,nt,tt),x?y.fillRect(ft.left,xt+ft.top,tt.width-(ft.left+ft.right),mt):y.fillRect(xt+ft.left,ft.top,mt,tt.height-(ft.top+ft.bottom)))}}}}function lx(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function g0(a){return a==="LineV"||a==="BarV"}yt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},yt.kk=function(a,y,x){if(!pe.prototype.kk.call(this,a,y,x))return!1;if(this.type===Un.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,m0(this,a),a.yd=null;else if(this.na===Un.Grid||this.na===Un.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},yt.nk=function(){return!0},yt.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var nt=y[tt].actualBounds;E=tt===0?nt.x:Math.min(nt.x,E),z=tt===0?nt.y:Math.min(nt.y,z)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else pe.prototype.$o.call(this,a,y,x,b)},yt.Sj=function(a,y,x,b,E){var z=this.se(),tt=this.transform,nt=1/(tt.m11*tt.m22-tt.m12*tt.m21),it=tt.m22*nt,ot=-tt.m12*nt,st=-tt.m21*nt,ht=tt.m11*nt,ft=nt*(tt.m21*tt.dy-tt.m22*tt.dx),mt=nt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,ge.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,b,E);if(this.background!==null)return z=a*it+y*st+ft,nt=a*ot+y*ht+mt,a=x*it+b*st+ft,it=x*ot+b*ht+mt,E.h(0,0),x=this.naturalBounds,z=ge.Ff(0,0,x.width,x.height,z,nt,a,it,E),E.transform(tt),z;z||(it=1,st=ot=0,ht=1,mt=ft=0),nt=a*it+y*st+ft,a=a*ot+y*ht+mt,it=x*it+b*st+ft,x=x*ot+b*ht+mt,E.h(it,x),b=(it-nt)*(it-nt)+(x-a)*(x-a),ot=!1,ht=this.O.s,mt=ht.length,st=Lt.alloc(),ft=null,y=1/0;var xt=null,St=this.isClipping&&this.na===Un.Spot;St&&(xt=Lt.alloc(),ft=this.Pb(),(ot=ft.Sj(nt,a,it,x,xt))&&(y=(nt-xt.x)*(nt-xt.x)+(a-xt.y)*(a-xt.y)));for(var Ft=0;Ft<mt;Ft++){var Ot=ht[Ft];Ot.visible&&Ot!==ft&&Ot.Sj(nt,a,it,x,st)&&(ot=!0,Ot=(nt-st.x)*(nt-st.x)+(a-st.y)*(a-st.y),Ot<b&&(b=Ot,E.set(st)))}return St&&(y>b&&E.set(xt),Lt.free(xt)),Lt.free(st),z&&E.transform(tt),ot},yt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();pe.prototype.Gj.call(this)},yt.v=function(a){if(!Il(this)){pe.prototype.v.call(this,a),a=null,(this.na===Un.Auto||this.na===Un.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var z=tl(E,!1);(E instanceof Ws||E instanceof Un||E instanceof Zr||z!==zn)&&E.v(!0)}}}},yt.Uj=function(){if(!Il(this)){Bo(this,!0),lu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},yt.Uk=function(){if(!(this.l&2048)){ra(this,!0),Vl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},yt.Wu=function(){Vl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},yt.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,b=tt.height),x=Math.max(x,tt.width),b=Math.max(b,tt.height);var nt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,nt.width)),isNaN(z.height)||(y=Math.min(z.height,nt.height)),a=Math.max(x,a),y=Math.max(b,y);var it=this.yb;a=Math.max(a-it.left-it.right,0),y=Math.max(y-it.top-it.bottom,0);var ot=this.O.s;ot.length!==0&&this.na.measure(this,a,y,ot,E,x,b),a=E.width+it.left+it.right,it=E.height+it.top+it.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(it=z.height),a=Math.min(nt.width,a),it=Math.min(nt.height,it),a=Math.max(tt.width,a),it=Math.max(tt.height,it),a=Math.max(x,a),it=Math.max(b,it),So(E,a,it),So(this.naturalBounds,a,it),this.Ge(0,0,a,it)},yt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Du(a){return a.part!==null?a.part.locationObject:null}yt.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=tl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,nt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===b&&(a=zn),a){case zn:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case Kn:this.v(!0),this.measure(x+nt,b+tt,0,0);break;case Di:this.v(!0),this.measure(x+nt,z+tt,0,0);break;case Zi:this.v(!0),this.measure(y+nt,b+tt,0,0)}}this.na.arrange(this,E,this.jg)}},yt.gh=function(a){var y=this.naturalBounds,x=Du(this);if(Sr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Lt.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Gn(E.set(a),z.transform),z.ca(E)))return Lt.free(E),!0}return Lt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},yt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},yt.qm=function(a,y){if(y(this,a),a instanceof Un){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Fc(a,y){ax(a,a,y)}function ax(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=y[E];z instanceof Un&&ax(a,z,x)}}function bw(a,y){ux(a,a,y)}function ux(a,y,x){if(x(y),y instanceof Un){y=y.O.s;for(var b=y.length,E=0;E<b;E++)ux(a,y[E],x)}}yt.Nl=function(a){return hx(this,this,a)};function hx(a,y,x){if(x(y))return y;if(y instanceof Un){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=hx(a,y[E],x);if(z!==null)return z}}return null}yt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Zp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Un){var z=E.fb(a);if(z!==null)return z}if(E.name===a)return E}return null};function cx(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Un?x=Math.max(x,cx(E)):E instanceof ar&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}yt.se=function(){return!(this.type===Un.TableRow||this.type===Un.TableColumn)};function lh(a){return a.type===Un.TableRow||a.type===Un.TableColumn}yt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Hs(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),tt=z?a:Gn(Lt.allocAt(a.x,a.y),this.transform),nt=this.diagram,it=10,ot=5;if(nt!==null&&(it=nt.Ql("extraTouchArea"),ot=it/2),Sr(-(ot*E),-(ot*E),b.width+it*E,b.height+it*E,tt.x,tt.y)){if(!this.isAtomic){E=this.O.s;var st=E.length;if(nt=Lt.alloc(),ot=(it=this.isClipping&&this.na===Un.Spot)?this.Pb():null,it&&(ot.se()?Gn(nt.set(a),ot.transform):nt.set(a),!ot.ca(nt)))return Lt.free(nt),z||Lt.free(tt),null;for(var ht=Du(this);st--;){var ft=E[st];if((ft.visible||ft===ht)&&(ft.se()?Gn(nt.set(a),ft.transform):nt.set(a),!it||ft!==ot)){var mt=null;if(ft instanceof Un?mt=ft.ic(nt,y,x):ft.pickable===!0&&ft.ca(nt)&&(mt=ft),mt!==null&&(y!==null&&(mt=y(mt)),mt!==null&&(x===null||x(mt))))return Lt.free(nt),z||Lt.free(tt),mt}}Lt.free(nt)}return this.background===null&&this.areaBackground===null?(z||Lt.free(tt),null):(a=Sr(0,0,b.width,b.height,tt.x,tt.y)?this:null,z||Lt.free(tt),a)}return z||Lt.free(tt),null},yt.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,z=this.se(),tt=z?a:Gn(Lt.allocAt(a.x,a.y),this.transform);if(E=Sr(0,0,E.width,E.height,tt.x,tt.y),lh(this)||E){if(!this.isAtomic){for(var nt=this.O.s,it=nt.length,ot=Lt.alloc(),st=Du(this);it--;){var ht=nt[it];if(ht.visible||ht===st){ht.se()?Gn(ot.set(a),ht.transform):ot.set(a);var ft=ht;ht=ht instanceof Un?ht:null,(ht!==null?ht.ji(ot,y,x,b):ft.ca(ot))&&ft.pickable!==!1&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft))}}Lt.free(ot)}return z||Lt.free(tt),E&&(this.background!==null||this.areaBackground!==null)}return z||Lt.free(tt),!1},yt.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=er.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return v0(this,y,x,E),z===void 0&&er.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var nt=Du(this),it=this.O.s,ot=it.length;ot--;){var st=it[ot];if(st.visible||st===nt){var ht=st.actualBounds,ft=this.naturalBounds;ht.x>ft.width||ht.y>ft.height||0>ht.x+ht.width||0>ht.y+ht.height||(ht=st,st=st instanceof Un?st:null,ft=er.alloc(),ft.set(tt),(st!==null?st.Cf(a,y,x,b,E,ft):_o(ht,a,b,ft))&&(y!==null&&(ht=y(ht)),ht===null||x!==null&&!x(ht)||E.add(ht)),er.free(ft))}}return z===void 0&&er.free(tt),b}return z===void 0&&er.free(tt),!1};function v0(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var tt=E[z];if(tt.visible){var nt=tt.actualBounds,it=a.naturalBounds;nt.x>it.width||nt.y>it.height||0>nt.x+nt.width||0>nt.y+nt.height||(tt instanceof Un&&v0(tt,y,x,b),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||b.add(tt))}}}yt.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var tt=this.naturalBounds,nt=this.se(),it=nt?a:Gn(Lt.allocAt(a.x,a.y),this.transform),ot=nt?y:Gn(Lt.allocAt(y.x,y.y),this.transform),st=it.Bf(ot),ht=0<it.x&&it.x<tt.width&&0<it.y&&it.y<tt.height||gi(it.x,it.y,0,0,0,tt.height)<=st||gi(it.x,it.y,0,tt.height,tt.width,tt.height)<=st||gi(it.x,it.y,tt.width,tt.height,tt.width,0)<=st||gi(it.x,it.y,tt.width,0,0,0)<=st;if(tt=it.zd(0,0)<=st&&it.zd(0,tt.height)<=st&&it.zd(tt.width,0)<=st&&it.zd(tt.width,tt.height)<=st,nt||(Lt.free(it),Lt.free(ot)),ht){if(!this.isAtomic){it=Lt.alloc(),ot=Lt.alloc(),st=Du(this);for(var ft=this.O.s,mt=ft.length;mt--;){var xt=ft[mt];if(xt.visible||xt===st){var St=xt.actualBounds,Ft=this.naturalBounds;(!nt||!(St.x>Ft.width||St.y>Ft.height||0>St.x+St.width||0>St.y+St.height))&&(xt.se()?(St=xt.transform,Gn(it.set(a),St),Gn(ot.set(y),St)):(it.set(a),ot.set(y)),St=xt,xt=xt instanceof Un?xt:null,(xt!==null?xt.og(it,ot,x,b,E,z):St.tx(it,ot,E))&&(x!==null&&(St=x(St)),St===null||b!==null&&!b(St)||z.add(St)))}}Lt.free(it),Lt.free(ot)}return E?ht:tt}return!1};function y0(a){var y=null;return a instanceof ar&&(y=a.spot1,y===di&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=gr),y}function x0(a){var y=null;return a instanceof ar&&(y=a.spot2,y===di&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Eo),y}yt.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},yt.M=function(a){return this.O.M(a)},yt.Gb=function(a,y){y instanceof Ai&&Rt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Rt("Cannot make a Panel contain itself: "+this.toString()),Rt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Rt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Un.Grid||y instanceof ar||Rt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Un.Graduated||y instanceof ar||y instanceof Zr||Rt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new ai),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,tt=this.O.s,nt=tt.length,it=0;it<nt;it++)if(tt[it]===y){z=it;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else Rt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Il(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Un&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Eg(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof hi&&(x.Te=!0),x.Te&&x instanceof hi&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(zo,"elements",this,y,null,b,null),x.cb(No,"elements",this,null,y,null,a)))};function w0(a,y){a.l=y?a.l|16777216:a.l&-16777217}yt.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},yt.mb=function(a){0<=a&&this.pc(a,!0)},yt.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Bo(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof hi&&(b instanceof Un?b.qm(b,function(tt,nt){W0(z,nt,y)}):W0(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(zo,"elements",this,b,null,a,null))},yt.Fb=function(a){0>a&&qt(a,">= 0",Un,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ro;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(No,"rowdefs",this,null,x,null,a)}return y[a]},yt.oA=function(a){if(0>a&&qt(a,">= 0",Un,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(zo,"rowdefs",this,x,null,a,null),this.v()}}};function dx(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Ro?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}yt.Eb=function(a){0>a&&qt(a,">= 0",Un,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ro;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(No,"coldefs",this,null,x,null,a)}return y[a]},yt.jA=function(a){if(0>a&&qt(a,">= 0",Un,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(zo,"coldefs",this,x,null,a,null),this.v()}}};function fx(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Ro?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}yt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Mg(y,a),this},yt.Hy=function(a,y){return(a=this.Fb(a))&&Mg(a,new Ro(y)),this},yt.By=function(a,y){return(a=this.Eb(a))&&Mg(a,new Ro(y)),this},yt.nz=function(a){if(0>a||this.type!==Un.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},yt.fz=function(a){if(0>a||this.type!==Un.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},yt.Fz=function(a,y){if(y===void 0&&(y=new Lt(NaN,NaN)),this.type!==Un.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)},yt.Gz=function(a){if(this.type!==Un.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function px(a){return a=a.allBindings,a!==null&&a._isFrozen}function sa(a){var y=a.allBindings;if(y===null)a.data!==null&&Rt("Template cannot have .data be non-null: "+a),a.allBindings=y=new $e;else if(y._isFrozen)return;var x=new $e;w0(a,!1),a.qm(a,function(ot,st){st.th();var ht=st.localBindings;if(ht!==null)for(xd(st,!1),ht=ht.iterator;ht.next();){var ft=ht.value;ft.mode===hm&&xd(st,!0);var mt=ft.sourceName;mt!==null&&(mt==="/"&&w0(ot,!0),mt=T1(ft,ot,st),mt!==null&&(x.add(mt),mt.srcBindings===null&&(mt.srcBindings=new $e),mt.srcBindings.add(ft))),y.add(ft)}if(st instanceof Un&&st.type===Un.Table){if(0<st.rowCount){for(ot=st.rowDefs,ht=ot.length,ft=0;ft<ht;ft++)if(mt=ot[ft],mt!==void 0&&mt.be!==null)for(var xt=mt.be.iterator;xt.next();){var St=xt.value;St.xd=mt,St.to=2,St.wl=mt.index,y.add(St)}}if(0<st.columnCount){for(st=st.colDefs,ot=st.length,ht=0;ht<ot;ht++)if(ft=st[ht],ft!==void 0&&ft.be!==null)for(mt=ft.be.iterator;mt.next();)xt=mt.value,xt.xd=ft,xt.to=1,xt.wl=ft.index,y.add(xt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){xd(E,!0);for(var z=E.srcBindings.iterator;z.next();){var tt=z.value;E.localBindings===null&&(E.localBindings=new $e),E.localBindings.add(tt)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var nt=E.targetProperty,it=nt.indexOf(".");0<it&&z instanceof Un&&(tt=nt.substring(0,it),nt=nt.substr(it+1),it=z.fb(tt),it!==null?(z=it,E.targetProperty=nt):He('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+E.toString())),z instanceof Ro?(tt=Ui(z.panel),E.Ai=tt===void 0?-1:tt,z.panel.bindingId=E.Ai):z instanceof pe?(tt=Ui(z),E.Ai=tt===void 0?-1:tt,z.bindingId=E.Ai):Rt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Ai&&a.Zc()&&a.Va()}yt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return bw(y,function(x){x instanceof Un&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&sa(y),y},yt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(E==="/"?b=z.part:E==="."?b=z:E===".."&&(b=z.panel),E=x.to,E!==0){if(!(z instanceof Un))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},yt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Ew(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof Un&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var tt=0;E<x&&tt<b;){if(z=a[E],!(z instanceof Un)||z.data!==y[tt])return!0;E++,tt++}return!1}function Zp(a){if(a.type===Un.Spot||a.type===Un.Auto)return Math.min(a.O.length,1);if(a.type===Un.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof ar&&b.isPanelMain))break}return x}return a.type===Un.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Un&&lh(a))?1:0}yt.mv=function(){for(var a=Zp(this);this.O.length>a;)this.pc(this.O.length-1,!1);mx(this,this.itemArray)};function mx(a,y){var x=Zp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)bg(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],tt=b<a.O.length?a.O.M(b):null;if(tt instanceof Un){if(tt.data!==z){var nt=S0(a,tt.data),it=S0(a,z),ot=it!==nt;ot||(nt=b0(a,nt),ot=b0(a,it)!==nt),ot?(a.pc(b,!1),bg(a,z,E,!1)):tt.data=z}}else bg(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,C0(a,x,0),Il(a)||a.v(),a.graduatedIntervals=null,a.If()||Eg(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof hi&&(y.Te=!0),y.Te&&y instanceof hi&&(y.wc=null))}}function bg(a,y,x,b){if(!(y==null||0>x)){var E=S0(a,y);if(E=b0(a,E),E!==null){if(sa(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&w0(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ai),a.ge.add(y,E)),z=x+Zp(a),a.Gb(z,E),b&&(E.ub=y,C0(a,z,x),E.ub=null),E.data=y}}}function C0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Un){var E=y,z=x;b.type===Un.TableRow?b.row=E:b.type===Un.TableColumn&&(b.column=E),b.itemIndex=z}y++,x++}}function S0(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=Mo(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Rt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function b0(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(gx||(gx=!0,He('No item template Panel found for category "'+y+'" on '+a),He(" Using default item template."),a=new Un,y=new Zr,y.bind(new Oo("text","",Je)),a.add(y),vx=a),b=vx)),b}function Eg(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Un){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof Un&&!z.isEnabled||Eg(a,z,x)}}}function Ga(a,y){y.name=a,wa.add(a,y)}$n.Object.defineProperties(Un.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Un.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&&qt(a,">= 0",Un,"padding"),a=new Xi(a)):(0>a.left&&qt(a.left,">= 0",Un,"padding:value.left"),0>a.right&&qt(a.right,">= 0",Un,"padding:value.right"),0>a.top&&qt(a.top,">= 0",Un,"padding:value.top"),0>a.bottom&&qt(a.bottom,">= 0",Un,"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:Qo},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Gl),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 Fr)&&(a instanceof Fr&&a.freeze(),this.T===null&&(this.T=new Gl),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 Gl),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("defaultRowSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Gl),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 Fr)&&(a instanceof Fr&&a.freeze(),this.T===null&&(this.T=new Gl),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 Gl),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("defaultColumnSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Gl),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 Gl),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Rt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Va(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||Rt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Va(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 Iu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),cs(this)&&(a=this.part,a!==null&&qr(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 Iu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),cs(this)&&(a=this.part,a!==null&&qr(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 Iu),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 Iu),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 Iu,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 Iu,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 Iu,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 Iu,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 Gl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Gl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Ng},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Gl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Ng},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Gl),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Rt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Gl),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Rt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Gl),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 Ai&&!(this instanceof Pr);sa(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof ei?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ai&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new wd),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Ew(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ay(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||mx(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new ai}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ai||a.isPanelMain)&&Rt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););hr(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&&(hr(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 rr&&(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&&Eg(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))}}}),$n.Object.defineProperties(Un,{Position:{get:function(){return wa.I("Position")}},Horizontal:{get:function(){return wa.I("Horizontal")}},Vertical:{get:function(){return wa.I("Vertical")}},Spot:{get:function(){return wa.I("Spot")}},Auto:{get:function(){return wa.I("Auto")}},Table:{get:function(){return wa.I("Table")}},Viewbox:{get:function(){return wa.I("Viewbox")}},TableRow:{get:function(){return wa.I("TableRow")}},TableColumn:{get:function(){return wa.I("TableColumn")}},Link:{get:function(){return wa.I("Link")}},Grid:{get:function(){return wa.I("Grid")}},Graduated:{get:function(){return wa.I("Graduated")}}}),Un.prototype.rebuildItemElements=Un.prototype.mv,Un.prototype.findItemPanelForData=Un.prototype.sx,Un.prototype.updateTargetBindings=Un.prototype.La,Un.prototype.copyTemplate=Un.prototype.Uy,Un.prototype.graduatedValueForPoint=Un.prototype.Gz,Un.prototype.graduatedPointForValue=Un.prototype.Fz,Un.prototype.findColumnForLocalX=Un.prototype.fz,Un.prototype.findRowForLocalY=Un.prototype.nz,Un.prototype.addColumnDefinition=Un.prototype.By,Un.prototype.addRowDefinition=Un.prototype.Hy,Un.prototype.addRowColumnDefinition=Un.prototype.Gy,Un.prototype.removeColumnDefinition=Un.prototype.jA,Un.prototype.getColumnDefinition=Un.prototype.Eb,Un.prototype.removeRowDefinition=Un.prototype.oA,Un.prototype.getRowDefinition=Un.prototype.Fb,Un.prototype.removeAt=Un.prototype.mb,Un.prototype.remove=Un.prototype.remove,Un.prototype.insertAt=Un.prototype.Gb,Un.prototype.elt=Un.prototype.M,Un.prototype.add=Un.prototype.add,Un.prototype.findObject=Un.prototype.fb,Un.prototype.findInVisualTree=Un.prototype.Nl,Un.prototype.walkVisualTreeFrom=Un.prototype.qm,Un.prototype.findMainElement=Un.prototype.Pb;var gx=!1,vx=null,wa=new ai;Un.className="Panel",Un.definePanelLayout=Ga,Ga("Position",new cg),Ga("Vertical",new fg),Ga("Auto",new mg),Ga("Link",new Cg);function Iu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Iu.prototype.copy=function(){var a=new Iu;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},Iu.className="GradPanelSettings";function Gl(){this.Pc=[],this.Oc=[],this.j=this.ob=Ng,this.hb=this.Hb=0,this.Qp=Qo,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Gl.prototype.copy=function(a){for(var y=new Gl,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),E[z]=tt}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),E[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Gl.className="TablePanelSettings";function Ro(a){wi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=di,this.pa=this.oc=this.oa=0,this.be=null,this.oo=E0,this.hg=or,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))}Ro.prototype.copy=function(){var a=new Ro;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=Jt(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Mg(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=Jt(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}yt=Ro.prototype,yt.qb=function(a){a.classType===Ro&&(this.sizing=a)},yt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Ui(this)},yt.wi=function(a){this.Me=a},yt.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)},yt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Un.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var tt=b?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},yt.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(so,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Pg(a){if(a.sizing===E0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}yt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Oo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&px(y)&&Rt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new $e),this.be.add(E),this},$n.Object.defineProperties(Ro.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&&qt(a,">= 0",Ro,"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&&qt(a,">= 0",Ro,"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))&&qt(a,">= 0",Ro,"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&&qt(a,">= 0",Ro,"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 Xi(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&&Sd(a,"RowColumnDefinition.separatorStroke"),a instanceof Fr&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("separatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Sd(a,"RowColumnDefinition.background"),a instanceof Fr&&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}}}),Ro.prototype.computeEffectiveSpacing=Ro.prototype.Wc,Ro.prototype.computeEffectiveSpacingTop=Ro.prototype.Io;var E0=new yn(Ro,"Default",0),Wp=new yn(Ro,"None",1),Ng=new yn(Ro,"ProportionalExtra",2);Ro.className="RowColumnDefinition",Ro.Default=E0,Ro.None=Wp,Ro.ProportionalExtra=Ng;function ar(a,y){pe.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)}Xn(ar,pe),ar.prototype.cloneProtected=function(a){pe.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=Jt(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 Bc(a){a.Na===null?a.Na=new N0:a.Na.nc&&(a.Na=a.Na.copy())}yt=ar.prototype,yt.th=function(){pe.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},yt.qb=function(a){a===zn||a===Pi||a===vr||a===or?this.geometryStretch=a:pe.prototype.qb.call(this,a)},yt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ui(this)};function Sf(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var nt=x[0],it=x[1],ot,st,ht,ft,mt,xt,St=0,Ft=Ne(),Ot=2;Ot<E;Ot+=2)ot=x[Ot],st=x[Ot+1],ht=ot-nt,nt=st-it,ht===0&&(ht=.001),ft=nt/ht,mt=Math.atan2(nt,ht),xt=Math.sqrt(ht*ht+nt*nt),Ft.push([ht,mt,ft,xt]),St+=xt,nt=ot,it=st;nt=x[0],it=x[1],ht=b.measuredBounds.width,b instanceof ar&&(ht-=b.strokeWidth),1>ht&&(ht=1),E=x=ht,ot=tt/2,st=ot!==0,Ot=0,xt=Ft[Ot],ht=xt[0],mt=xt[1],ft=xt[2],xt=xt[3];for(var Wt=0;.1<=St;){if(Wt===0&&(st?(E=x,E-=ot,St-=ot,st=!1):E=x,E===0&&(E=1)),E>St){Fe(Ft);return}E>xt?(Wt=E-xt,E=xt):Wt=0;var Ut=Math.sqrt(E*E/(1+ft*ft));if(0>ht&&(Ut=-Ut),nt+=Ut,it+=ft*Ut,a.translate(nt,it),a.rotate(mt),a.translate(-(tt/2),-(z/2)),Wt===0&&b.hh(a,y),a.translate(tt/2,z/2),a.rotate(-mt),a.translate(-nt,-it),St-=E,xt-=E,Wt!==0){if(Ot++,Ot===Ft.length){Fe(Ft);return}xt=Ft[Ot],ht=xt[0],mt=xt[1],ft=xt[2],xt=xt[3],E=Wt}}Fe(Ft)}}yt.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;b!==null&&xo(this,a,b,!0,!1,tt,z);var nt=this.part,it=this.ig;if(x===null||it!==0||nt===null||!this.isPanelMain&&nt.Pb()!==this||(it=nt.type===Un.Link&&nt instanceof Pr&&nt.category==="Selection"&&nt.adornedObject instanceof ar&&nt.adornedPart.Pb()===nt.adornedObject?nt.adornedObject.strokeWidth:0),it===0&&(x=null),x!==null&&it!==0&&(xo(this,a,x,!1,!1,tt,z),a.lineWidth=it,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,nt&&y.Gf("drawShadows")&&(z=nt.isShadowed),a.Il===!1&&(z=!1),nt=!0,x===null||b!==null&&b!=="transparent"||(nt=!1),tt=!1,it=this.strokeDashArray,it!==null&&(tt=!0,a.js(it,this.strokeDashOffset)),E.type===ti.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===ti.u){var ot=E.startX;it=E.startY;var st=E.endX,ht=E.endY;E=Math.min(ot,st);var ft=Math.min(it,ht);ot=Math.abs(st-ot),it=Math.abs(ht-it),a.beginPath(),a.rect(E,ft,ot,it),b!==null&&a.ng(b),x!==null&&(nt&&z&&au(a),a.jk(),nt&&z&&ku(a)),a.Se()}else if(E.type===ti.F)ot=E.startX,it=E.startY,st=E.endX,ht=E.endY,E=Math.abs(st-ot)/2,ft=Math.abs(ht-it)/2,ot=Math.min(ot,st)+E,it=Math.min(it,ht)+ft,a.beginPath(),a.moveTo(ot,it-ft),a.bezierCurveTo(ot+ge.wg*E,it-ft,ot+E,it-ge.wg*ft,ot+E,it),a.bezierCurveTo(ot+E,it+ge.wg*ft,ot+ge.wg*E,it+ft,ot,it+ft),a.bezierCurveTo(ot-ge.wg*E,it+ft,ot-E,it+ge.wg*ft,ot-E,it),a.bezierCurveTo(ot-E,it-ge.wg*ft,ot-ge.wg*E,it-ft,ot,it-ft),a.closePath(),b!==null&&a.ng(b),x!==null&&(nt&&z&&au(a),a.jk(),nt&&z&&ku(a)),a.Se();else if(E.type===ti.o)for(E=E.figures,it=E.length,ft=0;ft<it;ft++){ot=E.s[ft],a.beginPath(),a.moveTo(ot.startX,ot.startY),st=ot.segments.s,ht=st.length;for(var mt=null,xt=0;xt<ht;xt++){var St=st[xt];switch(St.type){case Ko:a.moveTo(St.endX,St.endY);break;case Xr:a.lineTo(St.endX,St.endY);break;case ds:a.bezierCurveTo(St.point1X,St.point1Y,St.point2X,St.point2Y,St.endX,St.endY);break;case kl:a.quadraticCurveTo(St.point1X,St.point1Y,St.endX,St.endY);break;case Ao:if(St.radiusX===St.radiusY){var Ft=Math.PI/180;a.arc(St.point1X,St.point1Y,St.radiusX,St.startAngle*Ft,(St.startAngle+St.sweepAngle)*Ft,0>St.sweepAngle,mt!==null?mt.endX:ot.startX,mt!==null?mt.endY:ot.startY)}else if(mt=gl(St,ot),Ft=mt.length,Ft===0)a.lineTo(St.centerX,St.centerY);else for(var Ot=0;Ot<Ft;Ot++){var Wt=mt[Ot];Ot===0&&a.lineTo(Wt[0],Wt[1]),a.bezierCurveTo(Wt[2],Wt[3],Wt[4],Wt[5],Wt[6],Wt[7])}break;case zl:if(Ot=Ft=0,mt!==null&&mt.type===Ao){if(mt=gl(mt,ot),Wt=mt.length,Wt===0){a.lineTo(St.endX,St.endY);break}mt=mt[Wt-1]||null,mt!==null&&(Ft=mt[6],Ot=mt[7])}else Ft=mt!==null?mt.endX:ot.startX,Ot=mt!==null?mt.endY:ot.startY;if(mt=ta(St,ot,Ft,Ot),Ft=mt.length,Ft===0){a.lineTo(St.endX,St.endY);break}for(Ot=0;Ot<Ft;Ot++)Wt=mt[Ot],a.bezierCurveTo(Wt[2],Wt[3],Wt[4],Wt[5],Wt[6],Wt[7]);break;default:Rt("Segment not of valid type: "+St.type)}St.isClosed&&a.closePath(),mt=St}st=ot.isFilled,z?ot.isShadowed?(st===!0&&b!=="transparent"&&b!==null&&a.ng(b,ot.isEvenOdd),x!==null&&(st&&nt&&au(a),a.jk(),st&&nt&&ku(a))):(au(a),st&&b!=="transparent"&&b!==null&&a.ng(b,ot.isEvenOdd),x!==null&&a.jk(),ku(a)):(st&&b!==null&&a.ng(b,ot.isEvenOdd),x!==null&&a.jk()),a.Se(ft)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),z=this.geometry,a.save(),a.beginPath(),b=Ne(),z.type===ti.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),Sf(a,y,b,x);else if(z.type===ti.o)for(z=z.figures.iterator;z.next();){for(nt=z.value,b.length=0,b.push(nt.startX),b.push(nt.startY),tt=nt.startX,E=nt.startY,it=tt,ft=E,ot=nt.segments.s,st=ot.length,ht=0;ht<st;ht++){switch(xt=ot[ht],xt.type){case Ko:Sf(a,y,b,x),b.length=0,b.push(xt.endX),b.push(xt.endY),tt=xt.endX,E=xt.endY,it=tt,ft=E;break;case Xr:b.push(xt.endX),b.push(xt.endY),tt=xt.endX,E=xt.endY;break;case ds:ge.Qe(tt,E,xt.point1X,xt.point1Y,xt.point2X,xt.point2Y,xt.endX,xt.endY,.5,b),tt=xt.endX,E=xt.endY;break;case kl:ge.ep(tt,E,xt.point1X,xt.point1Y,xt.endX,xt.endY,.5,b),tt=xt.endX,E=xt.endY;break;case Ao:if(St=gl(xt,nt),mt=St.length,mt===0){b.push(xt.centerX),b.push(xt.centerY),tt=xt.centerX,E=xt.centerY;break}for(Ft=0;Ft<mt;Ft++)Ot=St[Ft],ge.Qe(tt,E,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),tt=Ot[6],E=Ot[7];break;case zl:if(St=ta(xt,nt,tt,E),mt=St.length,mt===0){b.push(xt.endX),b.push(xt.endY),tt=xt.endX,E=xt.endY;break}for(Ft=0;Ft<mt;Ft++)Ot=St[Ft],ge.Qe(tt,E,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),tt=Ot[6],E=Ot[7];break;default:Rt("Segment not of valid type: "+xt.type)}xt.isClosed&&(b.push(it),b.push(ft),Sf(a,y,b,x))}Sf(a,y,b,x)}else if(z.type===ti.u)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.startY),b.push(z.endX),b.push(z.endY),b.push(z.startX),b.push(z.endY),b.push(z.startX),b.push(z.startY),Sf(a,y,b,x);else if(z.type===ti.F){if(E=new Vo,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,tt=new Tr(Ao),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,E.add(tt),z=gl(tt,E),nt=z.length,nt===0)b.push(tt.centerX),b.push(tt.centerY);else for(tt=E.startX,E=E.startY,it=0;it<nt;it++)ft=z[it],ge.Qe(tt,E,ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,b),tt=ft[6],E=ft[7];Sf(a,y,b,x)}Fe(b),a.restore(),a.Vc(!1)}}}},yt.kk=function(a,y,x){return!pe.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)},yt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:pe.prototype.nk.call(this,a)},yt.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)}},yt.ga=function(a,y){if(y===void 0&&(y=new Lt),a instanceof Fi){a.Mc()&&Rt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},yt.mi=function(a){a===void 0&&(a=new un);var y=this.naturalBounds,x=this.oe;y=un.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Lt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ar(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ar(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ar(a,b.x,b.y,0,0),un.free(y),Lt.free(b),a},yt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==ti.j||y||(E+=2);var z=un.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return un.free(z),!1;if(b=E+1e-4,x.type===ti.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(un.free(z),ge.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===ti.u){y=x.startX;var tt=x.startY,nt=x.endX;if(x=x.endY,z.x=Math.min(y,nt),z.y=Math.min(tt,x),z.width=Math.abs(nt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return un.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),un.free(z),a}if(x.type===ti.F){tt=x.startX,E=x.startY,nt=x.endX;var it=x.endY;if(x=Math.min(tt,nt),y=Math.min(E,it),tt=Math.abs(nt-tt)/2,E=Math.abs(it-E)/2,x=a.x-(x+tt),y=a.y-(y+E),this.fill===null){if(tt-=b,E-=b,0>=tt||0>=E||1>=x*x/(tt*tt)+y*y/(E*E))return un.free(z),!1;tt+=b,E+=b}return this.stroke!==null&&(tt+=b,E+=b),un.free(z),0>=tt||0>=E?!1:1>=x*x/(tt*tt)+y*y/(E*E)}if(x.type===ti.o)return un.free(z),this.fill===null?Ta(x,a.x,a.y,E):Tl(x,a,E,1<this.strokeWidth,y);Rt("Unknown Geometry type: "+x.type)},yt.Wl=function(a,y,x,b){var E=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var nt=this.figure,it=P0[nt];if(it===void 0){var ot=ge.Ze[nt];typeof ot=="string"&&(ot=ge.Ze[ot]),typeof ot=="function"?(it=ot(null,100,100),P0[nt]=it):Rt("Unsupported Figure: "+nt)}tt=it.bounds}nt=tt.width,it=tt.height,ot=tt.width;var st=tt.height;switch(tl(this,!0)){case zn:b=x=0;break;case Kn:ot=Math.max(a-z,0),st=Math.max(y-z,0);break;case Di:ot=Math.max(a-z,0),b=0;break;case Zi:x=0,st=Math.max(y-z,0)}isFinite(E.width)&&(ot=E.width),isFinite(E.height)&&(st=E.height);var ht=this.maxSize,ft=this.minSize;switch(x=Math.max(x-z,ft.width),b=Math.max(b-z,ft.height),ot=Math.min(ht.width,ot),st=Math.min(ht.height,st),ot=isFinite(ot)?Math.max(x,ot):Math.max(nt,x),st=isFinite(st)?Math.max(b,st):Math.max(it,b),x=M0(this),x){case zn:break;case Kn:nt=ot,it=st;break;case Pi:x=Math.min(ot/nt,st/it),isFinite(x)||(x=1),nt*=x,it*=x;break;default:Rt(x+" is not a valid geometryStretch.")}this.Rd!==null?(nt===0&&(nt=.001),it===0&&(it=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,b=nt/tt.width,tt=it/tt.height,isFinite(b)||(b=1),isFinite(tt)||(tt=1),this.ua=b===1&&tt===1?x:x.copy().scale(b,tt)):this.ua!==null&&ge.$(this.ua.Sk,a-z)&&ge.$(this.ua.Rk,y-z)||(this.ua=ar.makeGeometry(this,nt,it)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&nt===0?0:tt.width+z,y===0&&it===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),ot+z,st+z),E.w()?(ot=E.width,st=E.height,ot=Math.min(ht.width,ot),st=Math.min(ht.height,st),ot=Math.max(ft.width,ot),st=Math.max(ft.height,st),this.dc.h(0,0,ot,st)):this.dc.assign(tt)};function M0(a){var y=a.geometryStretch;return a.Rd!==null?y===or?Kn:y:y===or?P0[a.figure].defaultStretch:y}yt.eh=function(a,y,x,b){ks(this,a,y,x,b)},yt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},yt.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),nt=z.m22*tt,it=-z.m12*tt,ot=-z.m21*tt,st=z.m11*tt,ht=tt*(z.m21*z.dy-z.m22*z.dx),ft=tt*(z.m12*z.dx-z.m11*z.dy);z=a*nt+y*ot+ht,tt=a*it+y*st+ft,nt=x*nt+b*ot+ht,it=x*it+b*st+ft,ht=this.ig/2,ot=this.ua,ot===null&&(this.measure(1/0,1/0),ot=this.ua);var mt=ot.bounds;if(st=!1,ot.type===ti.j)if(1.5>=this.strokeWidth)st=ge.Ve(ot.startX,ot.startY,ot.endX,ot.endY,z,tt,nt,it,E);else{if(ot.startX===ot.endX?(b=ht,st=0):(y=(ot.endY-ot.startY)/(ot.endX-ot.startX),st=ht/Math.sqrt(1+y*y),b=st*y),y=Ne(),a=new Lt,ge.Ve(ot.startX+b,ot.startY+st,ot.endX+b,ot.endY+st,z,tt,nt,it,a)&&y.push(a),a=new Lt,ge.Ve(ot.startX-b,ot.startY-st,ot.endX-b,ot.endY-st,z,tt,nt,it,a)&&y.push(a),a=new Lt,ge.Ve(ot.startX+b,ot.startY+st,ot.startX-b,ot.startY-st,z,tt,nt,it,a)&&y.push(a),a=new Lt,ge.Ve(ot.endX+b,ot.endY+st,ot.endX-b,ot.endY-st,z,tt,nt,it,a)&&y.push(a),nt=y.length,nt===0)return Fe(y),!1;for(st=!0,it=1/0,b=0;b<nt;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<it&&(it=x,E.x=a.x,E.y=a.y);Fe(y)}else if(ot.type===ti.u)st=ge.Ff(mt.x-ht,mt.y-ht,mt.x+mt.width+ht,mt.y+mt.height+ht,z,tt,nt,it,E);else if(ot.type===ti.F){y=un.allocAt(mt.x,mt.y,mt.width,mt.height).Bc(ht,ht);t:if(y.width===0)st=ge.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,nt,it,E);else if(y.height===0)st=ge.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,nt,it,E);else{if(a=y.width/2,ot=y.height/2,b=y.x+a,st=y.y+ot,x=9999,z!==nt&&(x=(tt-it)/(z-nt)),9999>Math.abs(x)){if(it=tt-st-x*(z-b),0>a*a*x*x+ot*ot-it*it){E.x=NaN,E.y=NaN,st=!1;break t}ht=Math.sqrt(a*a*x*x+ot*ot-it*it),nt=(-(a*a*x*it)+a*ot*ht)/(ot*ot+a*a*x*x)+b,a=(-(a*a*x*it)-a*ot*ht)/(ot*ot+a*a*x*x)+b,ot=x*(nt-b)+it+st,it=x*(a-b)+it+st,Math.abs((z-nt)*(z-nt))+Math.abs((tt-ot)*(tt-ot))<Math.abs((z-a)*(z-a))+Math.abs((tt-it)*(tt-it))?(E.x=nt,E.y=ot):(E.x=a,E.y=it)}else{if(nt=ot*ot,it=z-b,nt-=nt/(a*a)*it*it,0>nt){E.x=NaN,E.y=NaN,st=!1;break t}it=Math.sqrt(nt),nt=st+it,it=st-it,Math.abs(nt-tt)<Math.abs(it-tt)?(E.x=z,E.y=nt):(E.x=z,E.y=it)}st=!0}un.free(y)}else if(ot.type===ti.o){ft=Lt.alloc();var xt=nt-z,St=it-tt,Ft=xt*xt+St*St,Ot=z,Wt=tt;if(0<Ft&&mt.contains(Ot,Wt)&&(ft.x=Ot,ft.y=Wt,this.ca(ft)))for(xt!==0&&.5>Math.abs(xt)?(St*=.5/xt,xt=.5):St!==0&&.5>Math.abs(St)&&(xt*=.5/St,St=.5),Ot-=xt,Wt-=St;mt.contains(Ot,Wt);)Ot-=xt,Wt-=St;for(E.x=nt,E.y=it,St=0;St<ot.figures.count;St++){var Ut=ot.figures.s[St],ne=Ut.isFilled?Ot:z,fe=Ut.isFilled?Wt:tt,_e=Ut.segments;mt=Ut.startX,xt=Ut.startY;for(var si=mt,bi=xt,mi=0;mi<_e.count;mi++){var qn=_e.s[mi],Fn=qn.type,ir=qn.endX,Gi=qn.endY,kr=!1;switch(Fn){case Ko:si=ir,bi=Gi;break;case Xr:kr=kg(mt,xt,ir,Gi,ne,fe,nt,it,ft);break;case ds:kr=ge.Eo(mt,xt,qn.point1X,qn.point1Y,qn.point2X,qn.point2Y,ir,Gi,ne,fe,nt,it,.6,ft);break;case kl:kr=ge.Eo(mt,xt,mt+2/3*(qn.point1X-mt),xt+2/3*(qn.point1Y-xt),ir+2/3*(qn.point1X-ir),Gi+2/3*(qn.point1Y-Gi),ir,Gi,ne,fe,nt,it,.6,ft);break;case Ao:case zl:Fn=qn.type===Ao?gl(qn,Ut):ta(qn,Ut,mt,xt);var Hr=Fn.length;if(Hr===0){kr=kg(mt,xt,qn.type===Ao?qn.centerX:qn.endX,qn.type===Ao?qn.centerY:qn.endY,ne,fe,nt,it,ft);break}for(Gi=null,ir=0;ir<Hr;ir++){if(Gi=Fn[ir],ir===0&&kg(mt,xt,Gi[0],Gi[1],ne,fe,nt,it,ft)){var Go=Tg(ne,fe,ft,Ft,E);Go<Ft&&(Ft=Go,st=!0)}ge.Eo(Gi[0],Gi[1],Gi[2],Gi[3],Gi[4],Gi[5],Gi[6],Gi[7],ne,fe,nt,it,.6,ft)&&(Go=Tg(ne,fe,ft,Ft,E),Go<Ft&&(Ft=Go,st=!0))}ir=Gi[6],Gi=Gi[7];break;default:Rt("Unknown Segment type: "+Fn)}mt=ir,xt=Gi,kr&&(kr=Tg(ne,fe,ft,Ft,E),kr<Ft&&(Ft=kr,st=!0)),qn.isClosed&&(ir=si,Gi=bi,kg(mt,xt,ir,Gi,ne,fe,nt,it,ft)&&(qn=Tg(ne,fe,ft,Ft,E),qn<Ft&&(Ft=qn,st=!0)))}}z=x-a,tt=b-y,nt=Math.sqrt(z*z+tt*tt),nt!==0&&(z/=nt,tt/=nt),E.x-=z*ht,E.y-=tt*ht,Lt.free(ft)}else Rt("Unknown Geometry type: "+ot.type);return st?(this.transform.Ga(E),!0):!1};function Tg(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function kg(a,y,x,b,E,z,tt,nt,it){if(ge.$(a,x)&&ge.$(y,b)||ge.$(E,tt)&&ge.$(z,nt))return!1;var ot=!1,st=(E-tt)*(y-b)-(z-nt)*(a-x);return st===0?!1:(it.x=((E*nt-z*tt)*(a-x)-(E-tt)*(a*b-y*x))/st,it.y=((E*nt-z*tt)*(y-b)-(z-nt)*(a*b-y*x))/st,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(it.y>a||ge.$(it.y,a))&&(it.y<y||ge.$(it.y,y))&&(ot=!0)):(y=a<x?a:x,a=a<x?x:a,(it.x>y||ge.$(it.x,y))&&(it.x<a||ge.$(it.x,a))&&(ot=!0)),ot)}yt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,z=Lt.alloc();return z.h(x.x-b,x.y-b),a.ca(y.Ga(z))&&(z.h(x.x-b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.y-b),a.ca(y.Ga(z))&&(E=!0)))),Lt.free(z),E},yt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=er.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var tt=Lt.alloc();if(tt.h(b,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(E,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0)))return Lt.free(tt),!0;var nt=Lt.alloc(),it=Lt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),nt.x=E,nt.y=z,nt.transform(x),tt.x=b,tt.y=z,tt.transform(x),y=!1,Rc(this,tt,nt,it)?y=!0:(tt.x=E,tt.y=a,tt.transform(x),Rc(this,tt,nt,it)?y=!0:(nt.x=b,nt.y=a,nt.transform(x),Rc(this,tt,nt,it)?y=!0:(tt.x=b,tt.y=z,tt.transform(x),Rc(this,tt,nt,it)&&(y=!0)))),Lt.free(tt),er.free(x),Lt.free(nt),Lt.free(it),y};function Rc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,z=x.y;return x=b.x,b=b.y,a===E?(y<z?(a=y,y=z):a=z,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}yt.tx=function(a,y,x){function b(Ft,Ot){for(var Wt=Ft.length,Ut=0;Ut<Wt;Ut+=2)if(Ot.zd(Ft[Ut],Ft[Ut+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,nt=tt.x,it=tt.y,ot=tt.x+tt.width;if(tt=tt.y+tt.height,Li(a.x,a.y,nt,it)<=E&&Li(a.x,a.y,ot,it)<=E&&Li(a.x,a.y,nt,tt)<=E&&Li(a.x,a.y,ot,tt)<=E)return!0}if(nt=y.startX,it=y.startY,ot=y.endX,tt=y.endY,y.type===ti.j){if(x=(nt-ot)*(a.x-ot)+(it-tt)*(a.y-tt),gi(a.x,a.y,nt,it,ot,tt)<=(0<=(ot-nt)*(a.x-nt)+(tt-it)*(a.y-it)&&0<=x?E:z))return!0}else{if(y.type===ti.u)return y=!1,x&&(y=gi(a.x,a.y,nt,it,nt,tt)<=E||gi(a.x,a.y,nt,it,ot,it)<=E||gi(a.x,a.y,ot,it,ot,tt)<=E||gi(a.x,a.y,nt,tt,ot,tt)<=E),y;if(y.type===ti.F){y=a.x-(nt+ot)/2,z=a.y-(it+tt)/2;var st=Math.abs(ot-nt)/2,ht=Math.abs(tt-it)/2;if(st===0||ht===0)return gi(a.x,a.y,nt,it,ot,tt)<=E;if(x){if(a=ge.$y(st,ht,y,z),a*a<=E)return!0}else return!(Li(y,z,-st,0)>=E||Li(y,z,0,-ht)>=E||Li(y,z,0,ht)>=E||Li(y,z,st,0)>=E)}else if(y.type===ti.o){if(ot=y.bounds,z=ot.x,nt=ot.y,it=ot.x+ot.width,ot=ot.y+ot.height,a.x>it&&a.x<z&&a.y>ot&&a.y<nt&&gi(a.x,a.y,z,nt,z,ot)>E&&gi(a.x,a.y,z,nt,it,nt)>E&&gi(a.x,a.y,it,ot,z,ot)>E&&gi(a.x,a.y,it,ot,it,nt)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?Ta(y,a.x,a.y,z):Tl(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,st=z.startY,a.zd(tt,st)>E)return!1;for(nt=z.segments.s,it=nt.length,ot=0;ot<it;ot++)switch(ht=nt[ot],ht.type){case Ko:case Xr:if(tt=ht.endX,st=ht.endY,a.zd(tt,st)>E)return!1;break;case ds:var ft=Ne();if(ge.Qe(tt,st,ht.point1X,ht.point1Y,ht.point2X,ht.point2Y,ht.endX,ht.endY,.8,ft),tt=b(ft,a),Fe(ft),tt||(tt=ht.endX,st=ht.endY,a.zd(tt,st)>E))return!1;break;case kl:if(ft=Ne(),ge.ep(tt,st,ht.point1X,ht.point1Y,ht.endX,ht.endY,.8,ft),tt=b(ft,a),Fe(ft),tt||(tt=ht.endX,st=ht.endY,a.zd(tt,st)>E))return!1;break;case Ao:case zl:ft=ht.type===Ao?gl(ht,z):ta(ht,z,tt,st);var mt=ft.length;if(mt===0){if(tt=ht.type===Ao?ht.centerX:ht.endX,st=ht.type===Ao?ht.centerY:ht.endY,a.zd(tt,st)>E)return!1;break}ht=null;for(var xt=Ne(),St=0;St<mt;St++)if(ht=ft[St],xt.length=0,ge.Qe(ht[0],ht[1],ht[2],ht[3],ht[4],ht[5],ht[6],ht[7],.8,xt),b(xt,a))return Fe(xt),!1;Fe(xt),ht!==null&&(tt=ht[6],st=ht[7]);break;default:Rt("Unknown Segment type: "+ht.type)}}return!0}}}return!1},yt.qc=function(){this.ua=null},yt.kq=function(){return this.ig};function yx(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Qp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Wo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Fi(1-Wo.x,Wo.y)))}ar.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=hu[a.toArrow];else a.fromArrow!=="None"?b=hu[a.fromArrow]:(b=ge.Ze[a.figure],typeof b=="string"&&(b=ge.Ze[b]),b===void 0&&Rt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=ge.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function xx(a){var y=hu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=hu[x],y===void 0){var b=null,E;for(E in ge.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=ti.parse(ge.um[b],!1),hu[b]=a,x!==b&&(hu[x]=b),b}}return typeof y=="string"?y:y instanceof ti?a:null}$n.Object.defineProperties(ar.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),cs(this)&&(a=this.part,a!==null&&qr(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=ti.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Lt.allocAt(-y.x,-y.y),Lt.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&&Sd(a,"Shape.fill"),a instanceof Fr&&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&&Sd(a,"Shape.stroke"),a instanceof Fr&&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 qt(a,"value >= 0",ar,"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"?qt(a,'"butt", "round", or "square"',ar,"strokeCap"):(Bc(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"?qt(a,'"miter", "bevel", or "round"',ar,"strokeJoin"):(Bc(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){Bc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];0<=z&&isFinite(z)||Rt("strokeDashArray:value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Bc(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=ge.Ze[a];typeof x=="function"?x=a:(x=ge.Ze[a.toLowerCase()])||Rt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=xx(a);x===null?Rt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Kh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),yx(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=xx(a);x===null?Rt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Kh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),yx(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:di},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Bc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:di},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Bc(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&&(Bc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:or},set:function(a){var y=this.geometryStretch;y!==a&&(Bc(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 cu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Va(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 cu),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 cu),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 cu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),ar.prototype.intersectsRect=ar.prototype.Yc,ar.prototype.containedInRect=ar.prototype.fh,ar.prototype.getNearestIntersectionPoint=ar.prototype.rs,ar.prototype.getDocumentBounds=ar.prototype.mi,ar.prototype.getDocumentPoint=ar.prototype.ga;var hu=new Ii,P0=new Ii;ar.className="Shape",ar.getFigureGenerators=function(){var a=new ai,y;for(y in ge.Ze)y!==y.toLowerCase()&&a.add(y,ge.Ze[y]);return a.freeze(),a},ar.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=ge.Ze;b[a]=y,b[x]=a},ar.getArrowheadGeometries=function(){var a=new ai;for(b in ge.um)if(hu[b]===void 0){var y=ti.parse(ge.um[b],!1);hu[b]=y,y=b.toLowerCase(),y!==b&&(hu[y]=b)}for(var x in hu)if(x!==x.toLowerCase()){var b=hu[x];b instanceof ti&&a.add(x,b)}return a.freeze(),a},ar.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=ti.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Rt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=hu;b[a]=x,b[y]=a};function N0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=or,this.gg=this.fg=di}N0.prototype.copy=function(){var a=new N0;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 Zr(a,y){return pe.call(this),Ag||(el=yo?new oa(null).context:null,Ag=!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}Xn(Zr,pe),Zr.prototype.cloneProtected=function(a){pe.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 Ua(a){a.da===null?a.da=new A0:a.da.nc&&(a.da=a.da.copy())}yt=Zr.prototype,yt.th=function(){pe.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function wx(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}yt.qb=function(a){a.classType===Zr?this.wrap=a:pe.prototype.qb.call(this,a)},yt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},yt.v=function(){pe.prototype.v.call(this)},yt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,z=x.height,tt=Kp(this),nt=a.textAlign=this.textAlign,it=y.tn;nt==="start"?nt=it?"right":"left":nt==="end"&&(nt=it?"left":"right"),it=this.isUnderline;var ot=this.isStrikethrough;xo(this,a,this.xc,!0,!1,x,b),(it||ot)&&xo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var st=this.oe,ht=st.dx-(tt*st.m21+st.dx);st=st.dy-(tt*st.m22+st.dy);var ft=y.scale;switch(8>(ht*ht+st*st)*ft*ft&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof xl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ht=this.spacingBelow,this.flip){case xr:a.translate(E,0),a.scale(-1,1);break;case dr:a.translate(0,z),a.scale(1,-1);break;case jr:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),st=this.Gc,ft=(y+tt+ht)*st,z>ft&&(b=this.verticalAlignment,b=b.y*z-b.y*ft+b.offsetY),st===1&&this.ze!==null)ht=this.Cb,ht>E&&(ht=E),this.Oj(this.ze,a,0,b+y,E,tt,ht,x,nt,it,ot);else if(this.Qc!==null&&this.Qb!==null)for(ft=0;ft<st;ft++){var mt=this.Qc[ft];mt>E&&(mt=E),b+=y,this.Oj(this.Qb[ft],a,0,b,E,tt,mt,x,nt,it,ot),b+=tt+ht}switch(this.flip){case xr:a.scale(-1,1),a.translate(-E,0);break;case dr:a.scale(1,-1),a.translate(0,-z);break;case jr:a.scale(-1,-1),a.translate(-E,-z)}}},yt.Oj=function(a,y,x,b,E,z,tt,nt,it,ot,st){var ht=0;if(nt)it==="left"?ht=0:it==="right"?ht=E-tt:it==="center"&&(ht=(E-tt)/2),y.fillRect(x+ht,b+.25*z,tt,1);else{if(it==="left"?ht=0:it==="right"?ht=E:it==="center"&&(ht=E/2),E=Og!==null?Og(this,z):.75*z,y.fillText(a,x+ht,b+E),a=z/20|0,a===0&&(a=1),it==="right"?ht-=tt:it==="center"&&(ht-=tt/2),ot){nt=Lg!==null?Lg(this,z):.8*z,it=x+ht,ot=b+nt,E=x+ht+tt,nt=b+nt;var ft=a;y.beginPath(),y.lineWidth=ft,y.moveTo(it,ot),y.lineTo(E,nt),y.stroke(),y.Se(),y instanceof xl&&y.ad.classList.add("gojs-td")}st&&(st=b+z-z/2.2|0,a%2!==0&&(st+=.5),b=x+ht,z=st,x=x+ht+tt,tt=st,ht=a,y.beginPath(),y.lineWidth=ht,y.moveTo(b,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof xl&&y.ad.classList.add("gojs-td"))}},yt.kk=function(a,y,x){if(!pe.prototype.kk.call(this,a,y,x))return!1;if(xo(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++)qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,qy(a,y,!0);return!0},yt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:pe.prototype.nk.call(this,a)},yt.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)}},yt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;el!==null&&Nx!==z&&(Nx=el.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var nt=tt=0,it=!1;!it;){var ot=z.indexOf(`
|
|
|
`,nt);ot===-1&&(ot=z.length,it=!0),nt=z.substr(nt,ot-nt),this.formatting===_p&&(nt=nt.trim()),tt=Math.max(tt,Ca(nt)),nt=ot+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Ca(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Sx(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,it=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Dg&&(y=this.Ae,y=this.overflow===Dg?Cx(y):0,ot=this.spacingAbove+this.spacingBelow,ot=Math.max(0,Kp(this)+ot),it=Math.min(this.maxLines-1,Math.max(Math.floor(it/ot+.01)-1,0)),!(it+1>=this.Qb.length))){for(this.l|=16777216,ot=this.Qb[it],y=Math.max(1,a-y);Ca(ot)>y&&1<ot.length;)ot=ot.substr(0,ot.length-1);ot+=Gp,y=Ca(ot),this.Qb[it]=ot,this.Qb=this.Qb.slice(0,it+1),this.Qc[it]=y,this.Qc=this.Qc.slice(0,it+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===bx||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(b,tt),So(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},yt.eh=function(a,y,x,b){ks(this,a,y,x,b)};function Vp(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 T0(a,y,x,b){var E=a.formatting===_p;E&&(y=y.trim());var z=0,tt=a.Ae,nt=a.spacingAbove+a.spacingBelow;nt=Math.max(0,Kp(a)+nt);var it=a.overflow===Dg?Cx(tt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,nt);else if(tt=y,a.wrap===k0){a.Le=1;var ot=Ca(y);if(it===0||ot<=x)a.Cb=Math.max(a.Cb,ot),Vp(a,y,a.Cb),b!==null&&b.h(ot,nt);else{for(z=bf(a,tt),tt=tt.substr(z.length),y=bf(a,tt),ot=Ca(z+y);0<y.length&&ot<=x;)z+=y,tt=tt.substr(y.length),y=bf(a,tt),ot=z+y,E&&(ot=ot.trim()),ot=Ca(ot);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-it);Ca(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Gp;var st=Ca(z);a.Cb=st,Vp(a,z,st),b!==null&&b.h(st,nt)}}else{for(it=0,tt.length===0&&(it=1,Vp(a,tt,0));0<tt.length;){for(y=bf(a,tt),tt=tt.substr(y.length);Ca(y)>x;){var ht=1;for(ot=Ca(y.substr(0,ht)),st=0;ot<=x;)ht++,st=ot,ot=Ca(y.substr(0,ht));if(ht===1){var ft=ot;z=Math.max(z,ot)}else ft=st,z=Math.max(z,st);if(ht--,1>ht&&(ht=1),Vp(a,y.substr(0,ht),ft),it++,y=y.substr(ht),a.Gc+it>a.maxLines)break}for(st=bf(a,tt),ot=Ca(y+st);0<st.length&&ot<=x;)y+=st,tt=tt.substr(st.length),st=bf(a,tt),ot=y+st,E&&(ot=ot.trim()),ot=Ca(ot);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),st.length===0?(ht=ot,z=Math.max(z,ot)):(ht=st=Ca(y),z=Math.max(z,st)),Vp(a,y,ht),it++,a.Gc+it>a.maxLines))break}a.Le=Math.min(a.maxLines,it),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,nt*a.Le)}}function bf(a,y){if(a.wrap===Ex)return y.substr(0,1);for(var x=y.length,b=0,E=Mw;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===Mx&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Ca(a){return el===null?8*a.length:el.measureText(a).width}function Kp(a){if(a.df!==null)return a.df;var y=a.Ae;if(el===null){var x=16;return a.df=x}return D0[y]!==void 0&&5e3>Px?x=D0[y]:(x=1.3*el.measureText("M").width,D0[y]=x,Px++),a.df=x}function Cx(a){if(el===null)return 6;if(Ig[a]!==void 0&&5e3>I0)var y=Ig[a];else y=el.measureText(Gp).width,Ig[a]=y,I0++;return y}function Sx(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Kp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var z=a.Gc=0,tt,nt=!1;!nt;){if(tt=x.indexOf(`
|
|
|
`,z),tt===-1&&(tt=x.length,nt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==k0){a.Le=0;var it=kn.alloc();T0(a,z,y,it),E+=it.height,kn.free(it),a.Gc+=a.Le}else T0(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(nt=!0)}z=tt+1}return a.Lq=E}$n.Object.defineProperties(Zr.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"||(Ua(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:zn},set:function(a){var y=this.flip;y!==a&&(Ua(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ir},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ua(this),this.da.Yr=a,$s(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=kn.alloc();T0(this,this.ec,999999,a);var y=a.width;kn.free(a),a=Sx(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),So(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:O0},set:function(a){var y=this.wrap;y!==a&&(Ua(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:L0},set:function(a){var y=this.overflow;y!==a&&(Ua(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&&Sd(a,"TextBlock.stroke"),a instanceof Fr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Kp(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&&(Ua(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&&(Ua(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 cu),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 cu),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 cu),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 cu),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 cu),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&&(Ua(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&&(Ua(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&&(Ua(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&&(Ua(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:_p},set:function(a){var y=this.formatting;y!==a&&(Ua(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&&qt(a,"> 0",Zr,"maxLines"),Ua(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 Og=null,Lg=null,k0=new yn(Zr,"None",0),bx=new yn(Zr,"WrapFit",1),O0=new yn(Zr,"WrapDesiredSize",2),Ex=new yn(Zr,"WrapBreakAll",3),L0=new yn(Zr,"OverflowClip",0),Dg=new yn(Zr,"OverflowEllipsis",1),_p=new yn(Zr,"FormatTrim",0),Mx=new yn(Zr,"FormatNone",0),Mw=/[ \u200b\u00ad]/,D0=new Ii,Px=0,Ig=new Ii,I0=0,Gp="...",Nx="",el=null,Ag=!1;Zr.className="TextBlock";function A0(){this.nc=!1,this.Hd=null,this.Xf=zn,this.gq=_p,this.Jq=1/0,this.$q=L0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ir,this.$r=O0}A0.prototype.copy=function(){var a=new A0;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},Zr.getEllipsis=function(){return Gp},Zr.setEllipsis=function(a){Gp=a,Ig=new Ii,I0=0},Zr.getBaseline=function(){return Og},Zr.setBaseline=function(a){Og=a},Zr.getUnderline=function(){return Lg},Zr.setUnderline=function(a){Lg=a},Zr.isValidFont=function(a){if(Ag||(el=yo?new oa(null).context:null,Ag=!0),el===null)return!0;var y=el.font;if(a===y||a==="10px sans-serif")return!0;el.font="10px sans-serif",el.font=a;var x=el.font;if(x!=="10px sans-serif")return el.font=y,!0;el.font="19px serif";var b=el.font;return el.font=a,x=el.font,el.font=y,x!==b},Zr.FormatNone=Mx,Zr.FormatTrim=_p,Zr.None=k0,Zr.OverflowClip=L0,Zr.OverflowEllipsis=Dg,Zr.WrapBreakAll=Ex,Zr.WrapDesiredSize=O0,Zr.WrapFit=bx;function cu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}cu.prototype.copy=function(){var a=new cu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},cu.className="GradElementSettings";function nl(a,y){pe.call(this),this.Eg=null,this.qo="",this.Xg=Er,this.Nk=Kn,this.Zg=this.Hd=null,this.Mk=cr,this.Xf=zn,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 Ef;Xn(nl,pe),nl.prototype.cloneProtected=function(a){pe.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},nl.prototype.qb=function(a){a===zn||a===Pi||a===vr?this.imageStretch=a:pe.prototype.qb.call(this,a)},nl.prototype.toString=function(){return"Picture("+this.source+")#"+Ui(this)};function Mf(a){a===void 0&&(a=""),a!==""?Ef[a]&&(delete Ef[a],Fg--):(Ef=new Ii,Fg=0)}function Tx(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null)for(var nt=tt.length,it=0;it<nt;it++)z=tt[it],E.Xn.add(z),z.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Bo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null){E=tt.length,z=Ne();for(var nt=0;nt<E;nt++)z.push(tt[nt]);if(y.hn)for(nt=0;nt<E;nt++)tt=z[nt],tt.Hd!==null&&tt.Hd(tt,x);Fe(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}nl.prototype.hA=function(){if(this.source!==""){Mf(this.source);var a=this.source;this.source="",this.source=a}},nl.prototype.redraw=function(){this.N(),this.Uc=!0},nl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Ac)){var E=a instanceof xl;b=this.naturalBounds;var z=0,tt=0,nt=this.qn,it=nt?+x.width:x.naturalWidth;if(nt=nt?+x.height:x.naturalHeight,it===void 0&&x.videoWidth&&(it=x.videoWidth),nt===void 0&&x.videoHeight&&(nt=x.videoHeight),it=it||b.width,nt=nt||b.height,it!==0&&nt!==0){var ot=it,st=nt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,it=this.Xg.width,nt=this.Xg.height);var ht=it,ft=nt,mt=this.Nk,xt=this.Mk;switch(mt){case zn:if(this.sourceRect.w())break;ht>=b.width&&(z=z+xt.offsetX+(ht*xt.x-b.width*xt.x)),ft>=b.height&&(tt=tt+xt.offsetY+(ft*xt.y-b.height*xt.y)),it=Math.min(b.width,ht),nt=Math.min(b.height,ft);break;case Kn:ht=b.width,ft=b.height;break;case Pi:case vr:mt===Pi?(mt=Math.min(b.height/ft,b.width/ht),ht*=mt,ft*=mt):mt===vr&&(mt=Math.max(b.height/ft,b.width/ht),ht*=mt,ft*=mt,ht>=b.width&&(z=(z+xt.offsetX+(ht*xt.x-b.width*xt.x)/ht)*it),ft>=b.height&&(tt=(tt+xt.offsetY+(ft*xt.y-b.height*xt.y)/ft)*nt),it*=1/(ht/b.width),nt*=1/(ft/b.height),ht=b.width,ft=b.height)}mt=this.Df()*y.scale;var St=ht*mt*ft*mt,Ft=it*nt/St,Ot=x.__goCache;mt=null;var Wt=Pw;if(!E){if(x.sq&&Ot!==void 0&&4<St&&Ft>Wt*Wt)for(Ot.gi===null&&(Ox(Ot,4,ot,st,x),Ox(Ot,16,ot,st,x)),E=Ot.gi,ot=E.length,st=0;st<ot&&E[st].ratio*E[st].ratio<Ft;st++)mt=E[st];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new oa(null).context;try{E.drawImage(this.Eg,0,0)}catch(Ut){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ut){this.vl=!0}}if(this.vl)return}}switch(E=ht<b.width?xt.offsetX+(b.width*xt.x-ht*xt.x):0,xt=ft<b.height?xt.offsetY+(b.height*xt.y-ft*xt.y):0,this.flip){case xr:a.translate(Math.min(b.width,ht),0),a.scale(-1,1);break;case dr:a.translate(0,Math.min(b.height,ft)),a.scale(1,-1);break;case jr:a.translate(Math.min(b.width,ht),Math.min(b.height,ft)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ot!==void 0&&mt!==null&&mt.ratio!==1){a.save(),y=mt.ratio;try{a.drawImage(mt.source,z/y,tt/y,Math.min(mt.source.width,it/y),Math.min(mt.source.height,nt/y),E,xt,Math.min(b.width,ht),Math.min(b.height,ft)),a instanceof xl&&(this.bt=[z/y,tt/y,Math.min(mt.source.width,it/y),Math.min(mt.source.height,nt/y),E,xt,Math.min(b.width,ht),Math.min(b.height,ft)])}catch(Ut){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,it,nt,E,xt,Math.min(b.width,ht),Math.min(b.height,ft)),a instanceof xl&&(this.bt=[z,tt,it,nt,E,xt,Math.min(b.width,ht),Math.min(b.height,ft)])}catch(Ut){this.en=!1}switch(this.flip){case xr:a.scale(-1,1),a.translate(-Math.min(b.width,ht),0);break;case dr:a.scale(1,-1),a.translate(0,-Math.min(b.height,ft));break;case jr:a.scale(-1,-1),a.translate(-Math.min(b.width,ht),-Math.min(b.height,ft))}}}}},nl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=tl(this,!0),tt=this.Eg,nt=this.qn,it=0,ot=0;(nt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(it=nt?+tt.width:tt.naturalWidth,ot=nt?+tt.height:tt.naturalHeight),isFinite(E.width)||z===Kn||z===Di?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=it)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:it),isFinite(E.height)||z===Kn||z===Zi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=ot)),b=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ot),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),b=Math.max(b||0,z.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),So(this.dc,a,y),this.Ge(0,0,a,y)},nl.prototype.eh=function(a,y,x,b){ks(this,a,y,x,b)},$n.Object.defineProperties(nl.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||Rt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Pp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new pn),b!==null&&x&&Zh(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Bo(this,!1),this.v())):x&&Tx(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=Ef;if(yo){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Fg&&(Mf(),x=Ef),b=Ci("img"),b.hn=!0,Tx(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Fg++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new kx),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}}}),nl.prototype.redraw=nl.prototype.redraw,nl.prototype.reloadSource=nl.prototype.hA;var Fg=0,Pw=4;nl.className="Picture",Ef=new Ii,nl.clearCache=Mf;function kx(){this.gi=null}function Ox(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new oa(null),tt=z.context,nt=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new Lx(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),tt.setTransform(nt*x,0,0,nt*x,0,0),tt.yc(),tt.drawImage(E,0,0),a.gi.push(y))}kx.className="PictureCacheArray";function Lx(a,y){this.source=a,this.ratio=y}Lx.className="PictureCacheInstance";function Pf(){this.os=new ti,this.mc=null}Pf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new ti,this.mc=null};function Nf(a,y,x,b,E,z){a.mc=new Vo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Nw(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Pf.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Tr(Ko);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Pf.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Tr(Xr);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function ah(a,y,x,b,E,z,tt){var nt;nt===void 0&&(nt=!1);var it=new Tr(ds);it.point1X=y,it.point1Y=x,it.point2X=b,it.point2Y=E,it.endX=z,it.endY=tt,nt&&it.close(),a.mc.segments.add(it)}function Bg(a,y,x,b,E){var z;z===void 0&&(z=!1);var tt=new Tr(kl);tt.point1X=y,tt.point1Y=x,tt.endX=b,tt.endY=E,z&&tt.close(),a.mc.segments.add(tt)}Pf.prototype.arcTo=function(a,y,x,b,E,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var nt=new Tr(Ao);nt.startAngle=a,nt.sweepAngle=y,nt.centerX=x,nt.centerY=b,nt.radiusX=E,nt.radiusY=z!==0?z:E,tt&&nt.close(),this.mc.segments.add(nt)};function Tw(a,y,x,b,E,z,tt,nt){var it;it===void 0&&(it=!1),y=new Tr(zl,tt,nt,y,x,b,E,z),it&&y.close(),a.mc.segments.add(y)}function Dx(a){var y=Rg;return y!==null?(Rg=null,y.reset(a),y):(y=new Pf,y.reset(a),y)}var Rg=null;Pf.className="StreamGeometryContext";function Ms(a,y){var x=a.toLowerCase(),b=ge.Ze;b[a]=y,b[x]=a}Ms("Rectangle",function(a,y,x){a="r"+y+","+x;var b=ge.Mf[a];return b!==void 0||(b=new ti(ti.u),b.endX=y,b.endY=x,ge.Nf<ge.vm&&(ge.Mf[a]=b,ge.Nf++)),b}),Ms("Square",function(a,y,x){a="s"+y+","+x;var b=ge.Mf[a];return b!==void 0||(b=new ti(ti.u),b.endX=y,b.endY=x,b.defaultStretch=Pi,ge.Nf<ge.vm&&(ge.Mf[a]=b,ge.Nf++)),b}),Ms("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=ge.Mf[b];if(E!==void 0)return E;var z=a*ge.wg;return E=new ti().add(new Vo(a,0,!0).add(new Tr(Xr,y-a,0)).add(new Tr(ds,y,a,y-z,0,y,z)).add(new Tr(Xr,y,x-a)).add(new Tr(ds,y-a,x,y,x-z,y-z,x)).add(new Tr(Xr,a,x)).add(new Tr(ds,0,x-a,z,x,0,x-z)).add(new Tr(Xr,0,a)).add(new Tr(ds,a,0,0,z,z,0).close())),1<z&&(E.spot1=new Fi(0,0,z,z),E.spot2=new Fi(1,1,-z,-z)),ge.Nf<ge.vm&&(ge.Mf[b]=E,ge.Nf++),E}),Ms("Border","RoundedRectangle"),Ms("Ellipse",function(a,y,x){a="e"+y+","+x;var b=ge.Mf[a];return b!==void 0||(b=new ti(ti.F),b.endX=y,b.endY=x,b.spot1=ql,b.spot2=Nl,ge.Nf<ge.vm&&(ge.Mf[a]=b,ge.Nf++)),b}),Ms("Circle",function(a,y,x){a="c"+y+","+x;var b=ge.Mf[a];return b!==void 0||(b=new ti(ti.F),b.endX=y,b.endY=x,b.spot1=ql,b.spot2=Nl,b.defaultStretch=Pi,ge.Nf<ge.vm&&(ge.Mf[a]=b,ge.Nf++)),b}),Ms("TriangleRight",function(a,y,x){return new ti().add(new Vo(0,0).add(new Tr(Xr,y,.5*x)).add(new Tr(Xr,0,x).close())).pm(0,.25,.5,.75)}),Ms("TriangleDown",function(a,y,x){return new ti().add(new Vo(0,0).add(new Tr(Xr,y,0)).add(new Tr(Xr,.5*y,x).close())).pm(.25,0,.75,.5)}),Ms("TriangleLeft",function(a,y,x){return new ti().add(new Vo(y,x).add(new Tr(Xr,0,.5*x)).add(new Tr(Xr,y,0).close())).pm(.5,.25,1,.75)}),Ms("TriangleUp",function(a,y,x){return new ti().add(new Vo(y,x).add(new Tr(Xr,0,x)).add(new Tr(Xr,.5*y,0).close())).pm(.25,.5,.75,1)}),Ms("Triangle","TriangleUp"),Ms("Diamond",function(a,y,x){return new ti().add(new Vo(.5*y,0).add(new Tr(Xr,0,.5*x)).add(new Tr(Xr,.5*y,x)).add(new Tr(Xr,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ms("LineH",function(a,y,x){return a=new ti(ti.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ms("LineV",function(a,y,x){return a=new ti(ti.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ms("None","Rectangle"),Ms("BarH","Rectangle"),Ms("BarV","Rectangle"),Ms("MinusLine","LineH"),Ms("PlusLine",function(a,y,x){return new ti().add(new Vo(0,x/2,!1).add(new Tr(Xr,y,x/2)).add(new Tr(Ko,y/2,0)).add(new Tr(Xr,y/2,x)))}),Ms("XLine",function(a,y,x){return new ti().add(new Vo(0,x,!1).add(new Tr(Xr,y,0)).add(new Tr(Ko,0,0)).add(new Tr(Xr,y,x)))}),Ms("LineRight",function(a,y,x){return new ti().add(new Vo(.25*y,0,!1).add(new Tr(Xr,.75*y,.5*x)).add(new Tr(Xr,.25*y,x)))}),Ms("LineDown",function(a,y,x){return new ti().add(new Vo(0,.25*x,!1).add(new Tr(Xr,.5*y,.75*x)).add(new Tr(Xr,y,.25*x)))}),Ms("LineLeft",function(a,y,x){return new ti().add(new Vo(.75*y,0,!1).add(new Tr(Xr,.25*y,.5*x)).add(new Tr(Xr,.75*y,x)))}),Ms("LineUp",function(a,y,x){return new ti().add(new Vo(0,.75*x,!1).add(new Tr(Xr,.5*y,.25*x)).add(new Tr(Xr,y,.75*x)))}),ge.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 F0(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ur,this.ir=null,this.jr="",this.lr=di,this.Gq="",this.Hq=gr,this.Pq=Qi,this.Kq=Yi,this.Up=null,this.Cq=127,this.zr=nr,this.yr="gray",this.Vg=4}F0.prototype.copy=function(){var a=new F0;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 Ai(a,y){a===void 0||a instanceof $o||typeof a=="string"?Un.call(this,a):(Un.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 Lt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new un,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Xn(Ai,Un),Ai.prototype.cloneProtected=function(a){Un.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},yt=Ai.prototype,yt.Af=function(a){Un.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},yt.toString=function(){var a=Xe(this.constructor)+"#"+Ui(this);return this.data!==null&&(a+="("+Je(this.data)+")"),a};function il(a){a.P===null?a.P=new F0:a.P.nc&&(a.P=a.P.copy())}yt.th=function(){Un.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},yt.gk=function(a,y,x,b,E,z,tt){var nt=this.diagram;nt!==null&&(a===No&&y==="elements"?E instanceof Un?Fc(E,function(it){ay(nt.partManager,it),Nc(nt,it)}):Zh(nt,E):a===zo&&y==="elements"&&(E instanceof Un?Fc(E,function(it){uy(nt.partManager,it,nt)}):Pp(nt,E)),nt.cb(a,y,x,b,E,z,tt))},yt.La=function(a){if(Un.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Un&&Fc(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ai.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ai.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ai.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new ai),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Ai.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Ai.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Ne();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Fe(y)}},Ai.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof rr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Pr))break t;sa(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Un.Link),x.adornedObject=y)}if(x!==null){x.type===Un.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(kw(this,a),y=this.adornments;y.next();)y.value.La()}},Ai.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function B0(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function kw(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function jg(a){if(_h(a)===!1){j0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Ix(a){if(a.G|=2097152,_h(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Bx(a,y,x),x=a.Ib;var b=un.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),un.free(b),j0(a,!1)}}Ai.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new er);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},Ai.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=cr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Lt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,b,E,z);a.rotate(this.Kb,tt.x,tt.y),Lt.free(tt)}},Ai.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ai.prototype.moveTo=function(a,y,x){a=Lt.allocAt(a,y),this.move(a,x),Lt.free(a)},Ai.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())},Ai.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())},Ai.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ai),y.I(a)!==null)return y.I(a);var x=Un.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function uh(a,y,x,b){b===void 0&&(b=new Lt),x=x.Mc()?cr:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Ai.prototype.mi=function(a){return a===void 0&&(a=new un),a.assign(this.actualBounds)},Ai.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Ax(a){var y=Lt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof ar?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function jc(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=cx(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,b-=tt/2,E-=tt/2,0<a.x?z+=a.x:(b+=a.x,z-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,z+2,y+2),x}Ai.prototype.arrange=function(){if(Hs(this)===!1)Ix(this);else{lu(this,!1);var a=this.Ib,y=un.alloc();y.assign(a);var x=Gh(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;Bx(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||ge.B(y.width,a.width)&&ge.B(y.height,a.height)||0<=this.vw&&this.C(16),un.free(y),j0(this,!1)}},yt=Ai.prototype,yt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=un.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),un.free(E)}!(this.G&65536)&&a.D(y)||zx(this,b,x),x.N(),!a.w()&&!y.w()||to(a,y)||(this instanceof hi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},yt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&Fx(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new Lt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),_h(this)===!1&&Hs(this)===!1&&(jg(this),Ix(this)),!0};function Fx(a,y,x,b,E){y===null||a instanceof Pr||(y=y.animationManager,y.zb&&Jd(y,a,new Lt(b,E),x))}yt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;_h(this)||Hs(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}jg(this)},yt.Av=function(){this.G&=-2097153,jg(this)};function Bx(a,y,x){var b=Ax(a),E=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Rx(a,y,x,E,b):jx(a,y,x,E,b):z?Rx(a,y,x,E,b):tt&&jx(a,y,x,E,b),a.G|=2097152,Lt.free(b),a.Uk()}function Rx(a,y,x,b,E){var z=y.x,tt=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Pr||Jd(x,a,new Lt(z,tt),y),b||y.x===z&&y.y===tt||a.g("position",new Lt(z,tt),y.copy()))}function jx(a,y,x,b,E){var z=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(z)||b===null||a.g("location",z,x.copy())}function zx(a,y,x){z0(a,!1),a instanceof hi&&nh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Gh(a)?(bo(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}yt.si=function(){return!0},yt.Zc=function(){return!0},yt.ph=function(){return!1},yt.Dd=function(){return!0};function R0(a,y,x,b){y.constructor===a.constructor||Zx||(Zx=!0,He('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),He(" Old class: "+Xe(a.constructor)+", new class: "+Xe(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,nt=!0,it=!0,ot=!1;a instanceof hi&&(nt=a.isTreeLeaf,it=a.isTreeExpanded,ot=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof hi&&(a.U=nt?a.U|4:a.U&-5,a.U=it?a.U|1:a.U&-2,a.U=ot?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Ai.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},Ai.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},Ai.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},Ai.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},Ai.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},Ai.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},Ai.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},Ai.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},Ai.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 _h(a){return(a.G&32768)!==0}function j0(a,y){a.G=y?a.G|32768:a.G&-32769}function z0(a,y){a.G=y?a.G|65536:a.G&-65537}function Gh(a){return(a.G&131072)!==0}yt=Ai.prototype,yt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zg(a,y){a.G=y?a.G|1048576:a.G&-1048577}yt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},yt.N=function(){var a=this.diagram;a!==null&&!Hs(this)&&!_h(this)&&this.isVisible()&&this.Ib.w()&&a.N(jc(this,this.Ib))},yt.v=function(){Un.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof hi&&this.labeledLink!==null&&$s(this.labeledLink),a.$b(!0))},yt.Vo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},yt.Wo=function(a){a||(a=this.Ah,a!==null&&_0(a,this))},yt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},yt.oz=function(){return $0(this,this)};function $0(a,y){var x=y.containingGroup;return x!==null?1+$0(a,x):y instanceof hi&&(y=y.labeledLink,y!==null)?$0(a,y):0}yt.sz=function(){return $x(this,this)};function $x(a,y){var x=y.containingGroup;return x!==null||y instanceof hi&&(x=y.labeledLink,x!==null)?$x(a,x):y}yt.Td=function(a){return a instanceof rr?H0(this,this,a):!1};function H0(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!H0(a,b,x)?y instanceof hi&&(y=y.labeledLink,y!==null)?H0(a,y,x):!1:!0}yt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof rr&&zg(y,!0),y instanceof hi){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 hi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof rr&&zg(y,!1),y instanceof hi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ai.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof hi&&this.isLinkLabel)},Ai.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 hi&&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 Hx(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Uh(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Pr)){if(a.add(y),y instanceof hi){if(x&&y instanceof rr)for(var tt=y.memberParts;tt.next();)Uh(a,tt.value,x,b,E,z);if(E!==!1)for(tt=y.linksConnected;tt.next();){var nt=tt.value;if(!a.contains(nt)){var it=nt.fromNode,ot=nt.toNode;it=it===null||a.contains(it),ot=ot===null||a.contains(ot),(E?it&&ot:it||ot)&&Uh(a,nt,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)Uh(a,y.value,x,b-1,E,z)}else if(y instanceof ei)for(y=y.labelNodes;y.next();)Uh(a,y.value,x,b,E,z)}}$n.Object.defineProperties(Ai.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?We:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(zo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(No,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(il(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&&tf(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 Pr?this.type!==Un.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:Qi},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),il(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Yi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),il(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&&(il(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:gr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),il(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Hs(this)===!1&&(jg(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),Fx(this,E,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof Pr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof Pr?this instanceof Pr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(sa(x),x=x.copy(),x!==null&&R0(this,x,y,a))):(z!==null&&z.jm(b,a),x=f1(x.partManager,b,a),x!==null&&(sa(x),x=x.copy(),x===null||x instanceof ei||(b=this.location.copy(),R0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){R0(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(il(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&&(il(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&&(il(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 ei?(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&&(il(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&&(il(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&&(il(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:Ur},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),il(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&&(il(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&&(il(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:di},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),il(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&Rt("Cannot make a Group a member of itself: "+this.toString()),Rt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?_0(y,this):this instanceof rr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(a,this):this instanceof rr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var z=E.wa(a!==null?a.data:null);E.mp(b,z)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof rr){for(x=new pn,Uh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof hi)for(b=b.linksConnected;b.next();)Tf(b.value)}if(this instanceof hi){for(x=this.linksConnected;x.next();)Tf(x.value);x=this.labeledLink,x!==null&&Tf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&tf(y,-1,a))}}else Rt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(il(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof hi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(il(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&&(il(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:nr},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),il(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&&(il(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&&(il(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ai.prototype.invalidateLayout=Ai.prototype.C,Ai.prototype.findCommonContainingGroup=Ai.prototype.px,Ai.prototype.isMemberOf=Ai.prototype.Td,Ai.prototype.findTopLevelPart=Ai.prototype.sz,Ai.prototype.findSubGraphLevel=Ai.prototype.oz,Ai.prototype.ensureBounds=Ai.prototype.Va,Ai.prototype.getDocumentBounds=Ai.prototype.mi,Ai.prototype.findObject=Ai.prototype.fb,Ai.prototype.moveTo=Ai.prototype.moveTo,Ai.prototype.invalidateAdornments=Ai.prototype.Wb,Ai.prototype.clearAdornments=Ai.prototype.Ej,Ai.prototype.removeAdornment=Ai.prototype.Jf,Ai.prototype.addAdornment=Ai.prototype.bh,Ai.prototype.findAdornment=Ai.prototype.Pj,Ai.prototype.updateTargetBindings=Ai.prototype.La;var Zx=!1;Ai.className="Part",Ai.LayoutNone=0,Ai.LayoutAdded=1,Ai.LayoutRemoved=2,Ai.LayoutShown=4,Ai.LayoutHidden=8,Ai.LayoutNodeSized=16,Ai.LayoutGroupLayout=32,Ai.LayoutNodeReplaced=64,Ai.LayoutStandard=127,Ai.LayoutAll=16777215;function Pr(a,y){a===void 0||a instanceof $o||typeof a=="string"?Ai.call(this,a):(Ai.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)}Xn(Pr,Ai),Pr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Pr.prototype.updateRelationshipsFromData=function(){},Pr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof ei&&y instanceof ar){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof ar&&(E.ua=a)}}},Pr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Hs(a))},Pr.prototype.Zc=function(){return!1},Pr.prototype.gk=function(a,y,x,b,E,z,tt){if(a===No&&y==="elements"){if(E instanceof Ws)this.$a===null&&(this.$a=E);else if(E instanceof Un){var nt=E.Nl(function(it){return it instanceof Ws});nt instanceof Ws&&this.$a===null&&(this.$a=nt)}}else a===zo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Un&&this.$a.rg(b)&&(this.$a=null));Ai.prototype.gk.call(this,a,y,x,b,E,z,tt)},Pr.prototype.updateAdornments=function(){},Pr.prototype.Lj=function(){},$n.Object.defineProperties(Pr.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}}}),Pr.className="Adornment";function Z0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=qo,this.er=Zg,this.Kr=this.ij=this.Nq=this.Mq=null}Z0.prototype.copy=function(){var a=new Z0;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 hi(a,y){a===void 0||a instanceof $o||typeof a=="string"?Ai.call(this,a):(Ai.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new $e,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Xn(hi,Ai),hi.prototype.cloneProtected=function(a){Ai.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},yt=hi.prototype,yt.Af=function(a){Ai.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function hh(a){a.Ba===null?a.Ba=new Z0:a.Ba.nc&&(a.Ba=a.Ba.copy())}yt.th=function(){Ai.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function Wx(a,y){y!==null&&(a.af===null&&(a.af=new pn),a.af.add(y))}function Vx(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var z=E.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===b||z.Ds===y&&z.cv===a&&z.Ox===b&&z.Px===x)return z}return null}yt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vx(this,a,y,x),a!==null&&a.Sl()},yt.gk=function(a,y,x,b,E,z,tt){a===No&&y==="elements"?this.wc=null:a===zo&&y==="elements"&&(this.wc=null),Ai.prototype.gk.call(this,a,y,x,b,E,z,tt)},yt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(wl(x.fromPort),wl(x.toPort),x.bb())}};function Kx(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(wl(x.fromPort),wl(x.toPort),x.bb())}}function wl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||wl(y.port)}}yt.si=function(){return!0},hi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},hi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},hi.prototype.isVisible=function(){if(!Ai.prototype.isVisible.call(this))return!1;var a=!0,y=rh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===rh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Fo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ff&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},hi.prototype.Zb=function(a){Ai.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},hi.prototype.qx=function(){var a=new pn,y=new pn;return _x(this,this,a,y),y.iterator};function _x(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,z=a.diagram;z!==null&&(E=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(E?tt.fromNode===y:tt.toNode===y)&&_x(a,E?tt.toNode:tt.fromNode,x,b):b.add(tt)})}}hi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new fn(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},yt=hi.prototype,yt.Mo=function(a){a===void 0&&(a=null);var y=new fn(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},yt.Sd=function(a){a===void 0&&(a=null);var y=new fn(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},yt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new pn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new pn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new mn(x):We},yt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new pn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new mn(x):We},yt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new pn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new mn(x):We},yt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new fn(this.jb),E=this;return b.predicate=function(z){return!((z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==E||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},b},yt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new fn(this.jb),E=this;return b.predicate=function(z){return!(z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},b};function $g(a,y,x){wl(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,y,x),tt!==null&&(tt.aa=z)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,z=b?x:y,E.ci||(E.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Hg(a,y,x){wl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var z=a.linkDisconnected;if(E=a.diagram,z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(a,y,x),E!==null&&(E.aa=tt)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Up(y)))}function Up(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}hi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},yt=hi.prototype,yt.Vo=function(a){Ai.prototype.Vo.call(this,a),a||(Up(this),a=this.Yk,a!==null&&e1(a,this))},yt.Wo=function(a){Ai.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},yt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Ai.prototype.Lj.call(this)},yt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Gx(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Gx(a){a.wc===null?a.wc=new ai:a.wc.clear(),a.qm(a,function(y,x){Ux(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Ux(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function W0(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Ne()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Fe(x)}}}yt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},yt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},yt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zg(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;)zg(y,!1),y=y.pg();return x},yt.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},yt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof hi)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},yt.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new pn;return a(this,y),y},yt.uz=function(){return Yx(this,this)};function Yx(a,y){return y=y.pg(),y===null?0:1+Yx(a,y)}yt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new fn(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},yt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new $e,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new $e,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new mn(x):We},yt.wz=function(a){a===void 0&&(a=1/0);var y=new pn;return Uh(y,this,!1,a,!0),y},hi.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 pn;x.add(this),Xx(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===rh),y.Ue=!1}};function Xx(a,y,x,b,E,z,tt){if(1<b)for(var nt=x?a.Mo():a.Sd();nt.next();){var it=nt.value;it.isTreeLink&&(it=it.To(a),it===null||it===a||y.contains(it)||(y.add(it),Xx(it,y,x,b-1,E,z,tt)))}else Jx(a,y,x,E,z,tt)}function Jx(a,y,x,b,E,z){for(var tt=E===a?!0:a.isTreeExpanded,nt=x?a.Mo():a.Sd(),it={};nt.next();){var ot=nt.value;if(ot.isTreeLink&&(ot=ot.To(a),ot!==null&&ot!==a)){var st=y.contains(ot);if(st||y.add(ot),tt){var ht=x?ot.Oo():ot.Po();it.uv=a,ht.all(function(ft){return function(mt){return mt===ft.uv||!mt.isTreeExpanded}}(it))&&b.Aj(ot,E),ot.oh(),ot.Zb(!1)}ot.isTreeExpanded&&(ot.wasTreeExpanded=ot.isTreeExpanded,st||Jx(ot,y,x,b,E,z))}it={uv:it.uv}}a.isTreeExpanded=!1}hi.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 pn;x.add(this),Qx(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===rh),y.Ue=!1}};function Qx(a,y,x,b,E,z,tt){for(var nt=z===a?!1:a.isTreeExpanded,it=x?a.Mo():a.Sd(),ot={};it.next();){var st=it.value;if(st.isTreeLink&&(nt||st.fd||st.bb(),st=st.To(a),st!==null&&st!==a&&!y.contains(st))){if(y.add(st),!nt){st.Zb(!0),st.oh();var ht=x?st.Oo():st.Po();ot.vv=a,ht.all(function(ft){return function(mt){return mt===ft.vv||!mt.isTreeExpanded}}(ot))&&E.Cj(st,z)}(2<b||st.wasTreeExpanded)&&(st.wasTreeExpanded=!1,Qx(st,y,x,b-1,E,z,tt))}ot={vv:ot.vv}}a.isTreeExpanded=!0}$n.Object.defineProperties(hi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Zg},set:function(a){var y=this.portSpreading;y!==a&&(hh(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&&nh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:qo},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),hh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&nh(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&&(hh(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&&(hh(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&&(hh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,z=x.model;if(E!==null&&z.ri()){var tt=z.wa(b);tt!==void 0&&z.Qx(E,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(e1(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),$s(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Gx(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(hh(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))}}}),hi.prototype.expandTree=hi.prototype.expandTree,hi.prototype.collapseTree=hi.prototype.collapseTree,hi.prototype.findTreeParts=hi.prototype.wz,hi.prototype.findTreeChildrenNodes=hi.prototype.Ou,hi.prototype.findTreeChildrenLinks=hi.prototype.Qo,hi.prototype.findTreeLevel=hi.prototype.uz,hi.prototype.findTreeParentChain=hi.prototype.vz,hi.prototype.findTreeParentNode=hi.prototype.pg,hi.prototype.findTreeParentLink=hi.prototype.kh,hi.prototype.findCommonTreeParent=hi.prototype.gz,hi.prototype.findTreeRoot=hi.prototype.xz,hi.prototype.isInTreeOf=hi.prototype.Nz,hi.prototype.findPort=hi.prototype.ns,hi.prototype.findLinksTo=hi.prototype.kz,hi.prototype.findLinksBetween=hi.prototype.jz,hi.prototype.findNodesInto=hi.prototype.Oo,hi.prototype.findNodesOutOf=hi.prototype.Po,hi.prototype.findNodesConnected=hi.prototype.Mu,hi.prototype.findLinksInto=hi.prototype.Sd,hi.prototype.findLinksOutOf=hi.prototype.Mo,hi.prototype.findExternalTreeLinksConnected=hi.prototype.qx,hi.prototype.invalidateConnectedLinks=hi.prototype.Bd,hi.prototype.invalidateLinkBundle=hi.prototype.Lz;var Ow=new yn(hi,"SpreadingNone",10),Zg=new yn(hi,"SpreadingEvenly",11),V0=new yn(hi,"SpreadingPacked",12);hi.className="Node",hi.SpreadingNone=Ow,hi.SpreadingEvenly=Zg,hi.SpreadingPacked=V0;function rr(a,y){a===void 0||a instanceof $o||typeof a=="string"?hi.call(this,a):(hi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new pn,this.$a=null,this.Sc=new no,this.Sc.group=this,this.gl=new pn,this.tb=this.$p=null,y&&Object.assign(this,y)}Xn(rr,hi),rr.prototype.cloneProtected=function(a){hi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ws});y instanceof Ws?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())},yt=rr.prototype,yt.Af=function(a){hi.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 hi)x.Bd(y);else if(x instanceof ei)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},yt.gk=function(a,y,x,b,E,z,tt){if(a===No&&y==="elements"){if(E instanceof Ws)this.$a===null?this.$a=E:this.$a!==E&&Rt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Un){var nt=E.Nl(function(it){return it instanceof Ws});nt instanceof Ws&&(this.$a===null?this.$a=nt:this.$a!==nt&&Rt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===zo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Un&&this.$a.rg(b)&&(this.$a=null));hi.prototype.gk.call(this,a,y,x,b,E,z,tt)},yt.Xl=function(a,y){hi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Un.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Un&&(a=a.Pb()),this.tb===null&&(this.tb=new un),a.mi(this.tb),a instanceof ar&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},yt.eh=function(a,y,x,b){this.nf=this.$a,hi.prototype.eh.call(this,a,y,x,b)},yt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof ei||y.Va()}),hi.prototype.Va.call(this)},yt.si=function(){if(!hi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof hi){if(y.isVisible()&&Hs(y))return!1}else if(y instanceof ei&&y.isVisible()&&Hs(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(a,y){if(a.Gn.add(y)){y instanceof rr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof ei&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function _0(a,y){if(a.Gn.remove(y)){y instanceof rr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof ei&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}yt.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)}hi.prototype.Lj.call(this)},rr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=dn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},rr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=dn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},rr.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))},yt=rr.prototype,yt.Bd=function(a){var y=(this.U&65536)!==0;if(hi.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(wl(x.fromPort),wl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(wl(x.fromPort),wl(x.toPort),x.bb()))}}},yt.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 pn,b=y.iterator;b.next();){var E=b.value;if(E instanceof hi)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},yt.iz=function(){var a=this.Rj();a.add(this);for(var y=new pn,x=a.iterator;x.next();){var b=x.value;if(b instanceof hi)for(b=b.linksConnected;b.next();){var E=b.value,z=E.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},yt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new pn;return a(this,y),y},yt.Rj=function(){var a=new pn;return Uh(a,this,!0,0,!0),a.remove(this),a},yt.Zb=function(a){hi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},rr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qx(this,y,a,this),a.Ue=!1}};function qx(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!1),z instanceof rr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,qx(z,y,x,b)),z instanceof hi)z.Bd(y),x.Aj(z,b);else if(z instanceof ei)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}rr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();t1(this,y,a,this),a.Ue=!1}};function t1(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!0),z instanceof rr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,t1(z,y,x,b)),z instanceof hi)z.Bd(y),x.Cj(z,b);else if(z instanceof ei)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}rr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,z=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===z||isNaN(x)&&isNaN(z))){for(b=E-(isNaN(b)?0:b),x=z-(isNaN(x)?0:x),z=Lt.alloc(),hi.prototype.move.call(this,a,y),a=new pn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof ei&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof hi&&E.isLinkLabel)){var tt=E.position,nt=E.location;tt.w()?(z.x=tt.x+b,z.y=tt.y+x,E.position=z):nt.w()&&(z.x=nt.x+b,z.y=nt.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof ei&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(tt=E.position,z.x=tt.x+b,z.y=tt.y+x,z.w()?E.move(z):E.bb(),U0(E)&&E.bb());Lt.free(z)}},$n.Object.defineProperties(rr.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Rt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(hh(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&&(hh(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&&(hh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(hh(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)}}}),rr.prototype.expandSubGraph=rr.prototype.expandSubGraph,rr.prototype.collapseSubGraph=rr.prototype.collapseSubGraph,rr.prototype.findSubGraphParts=rr.prototype.Rj,rr.prototype.findContainingGroupChain=rr.prototype.hz,rr.prototype.findExternalNodesConnected=rr.prototype.iz,rr.prototype.findExternalLinksConnected=rr.prototype.Lu,rr.prototype.ensureBounds=rr.prototype.Va,rr.className="Group";function Ws(a){pe.call(this),this.yb=Qo,this.ko=new un(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Xn(Ws,pe),Ws.prototype.cloneProtected=function(a){pe.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ws.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Sr(0,0,y.width,y.height,a.x,a.y)},Ws.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof rr||a instanceof Pr)||Rt("Placeholder is not inside a Group or Adornment."),a instanceof rr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(So(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Lt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Lt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof ar&&(tt=z.strokeWidth);var nt=z.Df(),it=z.naturalBounds,ot=(it.width+tt)*nt;tt=(it.height+tt)*nt,a.type!==Un.Link&&(nt=z.ga(a.category==="Selection"?gr:a.locationSpot,Lt.alloc()),a.location=nt,Lt.free(nt)),isNaN(ot)||isNaN(tt)?(a=z.ga(gr,Lt.alloc()),ot=un.allocAt(a.x,a.y,0,0),ot.Ye(z.ga(Eo,a)),ot.Ye(z.ga(zr,a)),ot.Ye(z.ga(hs,a)),So(y,ot.width+b||0,ot.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Lt.free(a),un.free(ot)):(So(y,ot+b||0,tt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ws.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ws.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof rr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=un.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof rr&&!y.isSubGraphExpanded?a.h(E.x-z.left,E.y-z.top,0,0):a.h(E.x-z.left,E.y-z.top,Math.max(E.width+z.left+z.right,0),Math.max(E.height+z.top+z.bottom,0)),un.free(x),b&&y instanceof rr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ws.prototype.computeMemberBounds=function(a){if(!(this.part instanceof rr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var nt=tt.value;if(nt.isVisible()){if(nt instanceof ei&&(!y.computesBoundsIncludingLinks||Il(nt)||nt.fromNode===y||nt.toNode===y))continue;nt=nt.actualBounds,nt.left<x&&(x=nt.left),nt.top<b&&(b=nt.top),nt.right>E&&(E=nt.right),nt.bottom>z&&(z=nt.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},$n.Object.defineProperties(Ws.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ws.className="Placeholder";function ei(a){Ai.call(this,Un.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Vs,this.Om=0,this.Qm=Vs,this.Rm=NaN,this.qj=J0,this.po=.5,this.wd=null,this.Nb=new $e().freeze(),this.Tg=this.Mg=null,this.ml=new un,this.ua=new ti,this.u=this.o=this.Sf=this.Wf=null,this.su=new Lt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Xn(ei,Ai),ei.prototype.cloneProtected=function(a){Ai.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())},yt=ei.prototype,yt.Af=function(a){Ai.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&&wl(y),a=a.toPort,a!==null&&wl(a)},yt.qb=function(a){a.classType===ei?(a.value&2)===2?this.routing=a:a===Fl||a===dh||a===Of?this.curve=a:a===Jp||a===Ug||a===Yg?this.adjusting=a:a!==J0&&a!==Vs&&Rt("Unknown Link enum value for a Link property: "+a):Ai.prototype.qb.call(this,a)},yt.Xc=function(){this.ba===null&&(this.ba=new Rp)},yt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Hs(a)||_h(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Hs(a)||_h(a)))},yt.zv=function(){return!1},yt.Av=function(){},yt.Zc=function(){return!1},ei.prototype.computeAngle=function(a,y,x){return ei.computeAngle(y,x)},ei.computeAngle=function(a,y){switch(a){default:case Vs:a=0;break;case Qp:a=y;break;case qp:a=y+90;break;case tm:a=y-90;break;case Q0:a=y+180;break;case Xg:a=ge.bp(y),90<a&&270>a&&(a-=180);break;case em:a=ge.bp(y+90),90<a&&270>a&&(a-=180);break;case nm:a=ge.bp(y-90),90<a&&270>a&&(a-=180);break;case Jg:if(a=ge.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return ge.bp(a)};function Tf(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&_0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}yt=ei.prototype,yt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ai.prototype.oh.call(this)},yt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},yt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function e1(a,y){a.wd===null&&(a.wd=new pn),a.wd.add(y),a.v()}yt.Vo=function(a){if(Ai.prototype.Vo.call(this,a),zc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,$g(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||$g(x,this,b)}Yp(this)}},yt.Wo=function(a){if(Ai.prototype.Wo.call(this,a),zc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Hg(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Hg(x,this,b)}Xp(this)}},yt.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))},ei.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},ei.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Ai.prototype.move.call(this,a,!1):(a=Lt.allocAt(x.x+b,x.y+E),Ai.prototype.move.call(this,a,!1),Lt.free(a)),ch(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},ei.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},ei.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},ei.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(_i),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Fl))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()===Fl){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return ge.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),ge.ax(b.x,b.y,E.x,E.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=tt[z],!(b+E>x/2));)b+=E,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},ei.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()===Fl))return this.ua.wx(.5);if(this.computeCurve()===Fl&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),ge.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var z;E<b/2&&x<a&&(z=y[x],!(E+z>b/2));)E+=z,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},yt=ei.prototype,yt.i=function(a){return this.Nb.s[a]},yt.dd=function(a,y){this.Nb.cd(a,y)},yt.L=function(a,y,x){this.Nb.cd(a,new Lt(y,x))},yt.Kz=function(a,y){this.Nb.Gb(a,y)},yt.m=function(a,y,x){this.Nb.Gb(a,new Lt(y,x))},yt.ne=function(a){this.Nb.add(a)},yt.yf=function(a,y){this.Nb.add(new Lt(a,y))},yt.pv=function(a){this.Nb.mb(a)},yt.Fj=function(){this.Nb.clear()};function ch(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new $e,z=a.Nb.iterator;z.next();){var tt=z.value;E.add(new Lt(tt.x+y,tt.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),$s(a)),b?Wg(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&qd(tt.animationManager,a,E),a.g("points",z,E)}}yt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},yt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,tt=0;tt<z;tt++){var nt=E[tt];x=Math.min(nt.x,x),b=Math.min(nt.y,b)}nt=tt=1/0;for(var it=y.s,ot=it.length,st=0;st<ot;st++){var ht=it[st];tt=Math.min(ht.x,tt),nt=Math.min(ht.y,nt),ht.freeze()}if(y.freeze(),ot===z){for(z=0;z<ot;z++)if(st=E[z],ht=it[z],st.x-x!==ht.x-tt||st.y-b!==ht.y-nt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&qd(x.animationManager,this,y),Wg(this),this.g("points",a,y)}},yt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Wg(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),Gg(a,!1))}yt.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())}},yt.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()}}},ei.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Md||(Md=new hi,Md.desiredSize=ji,Md.Va()),this.defaultFromPoint&&(Md.location=this.defaultFromPoint,Md.Va(),y=a=Md)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Pd||(Pd=new hi,Pd.desiredSize=ji,Pd.Va()),this.defaultToPoint&&(Pd.location=this.defaultToPoint,Pd.Va(),E=b=Pd)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var nt=kf(tt),it=kf(x),ot=y===E&&y!==null,st=this.isOrthogonal,ht=this.curve===Fl;this.Wf=ot&&!st?ht=!0:!1;var ft=this.computeAdjusting()===Vs||ot;if(!st&&!ot&&nt&&it){if(nt=!1,!ft&&3<=z&&(ft=this.getLinkPoint(a,y,tt,!0,!1,b,E),it=this.getLinkPoint(b,E,x,!1,!1,a,y),nt=this.adjustPoints(0,ft,z-1,it))&&(ft=this.getLinkPoint(a,y,tt,!0,!1,b,E),it=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,ft,z-1,it)),!nt)if(this.Fj(),ht){z=this.getLinkPoint(a,y,tt,!0,!1,b,E),ft=this.getLinkPoint(b,E,x,!1,!1,a,y),nt=ft.x-z.x,it=ft.y-z.y,ot=this.computeCurviness(),ht=st=0;var mt=z.x+nt/3,xt=z.y+it/3,St=mt,Ft=xt;ge.B(it,0)?Ft=0<nt?Ft-ot:Ft+ot:(st=-nt/it,ht=Math.sqrt(ot*ot/(st*st+1)),0>ot&&(ht=-ht),St=(0>it?-1:1)*ht+mt,Ft=st*(St-mt)+xt),mt=z.x+2*nt/3,xt=z.y+2*it/3;var Ot=mt,Wt=xt;ge.B(it,0)?Wt=0<nt?Wt-ot:Wt+ot:(Ot=(0>it?-1:1)*ht+mt,Wt=st*(Ot-mt)+xt),this.Fj(),this.ne(z),this.yf(St,Ft),this.yf(Ot,Wt),this.ne(ft),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,ft=E,b=this.getLinkPoint(a,y,tt,!0,!1,z,ft),E=this.getLinkPoint(z,ft,x,!1,!1,a,y),this.hasCurviness()?(ft=E.x-b.x,x=E.y-b.y,tt=this.computeCurviness(),a=b.x+ft/2,y=b.y+x/2,z=a,nt=y,ge.B(x,0)?nt=0<ft?nt-tt:nt+tt:(ft=-ft/x,z=Math.sqrt(tt*tt/(ft*ft+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,nt=ft*(z-a)+y),this.ne(b),this.yf(z,nt),this.ne(E)):(this.ne(b),this.ne(E),nt=un.alloc(),y.mi(nt),it=nt.ca(E),ft.mi(nt),ot=nt.ca(b),(it||ot)&&(tt=y.ga(Kg(tt),new Lt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,E,!0,tt)),x=ft.ga(Kg(x),new Lt),this.dd(1,this.getLinkPointFromPoint(z,ft,x,b,!1,x))),un.free(nt))}else{ht=this.isAvoiding,ft&&(st&&ht||ot)&&this.Fj();var Ut=ot?this.computeCurviness():0;ht=this.getLinkPoint(a,y,tt,!0,st,b,E),mt=St=xt=0,(st||!nt||ot)&&(Ft=this.computeEndSegmentLength(a,y,tt,!0),mt=this.getLinkDirection(a,y,ht,tt,!0,st,b,E),ot&&(nt||tt.D(x)||!st&&tt.x+x.x===1&&tt.y+x.y===1)&&(mt-=st?90:30,0>Ut&&(mt-=180)),0>mt?mt+=360:360<=mt&&(mt-=360),ot&&(Ft+=Math.abs(Ut)*(st?1:2)),mt===0?xt=Ft:mt===90?St=Ft:mt===180?xt=-Ft:mt===270?St=-Ft:(xt=Ft*Math.cos(mt*Math.PI/180),St=Ft*Math.sin(mt*Math.PI/180)),tt.Mc()&&ot&&(Ft=y.ga(cr,Lt.alloc()),Ot=Lt.allocAt(Ft.x+1e3*xt,Ft.y+1e3*St),this.getLinkPointFromPoint(a,y,Ft,Ot,!0,ht),Lt.free(Ft),Lt.free(Ot))),Ft=this.getLinkPoint(b,E,x,!1,st,a,y);var ne=Wt=Ot=0;if(st||!it||ot){var fe=this.computeEndSegmentLength(b,E,x,!1);ne=this.getLinkDirection(b,E,Ft,x,!1,st,a,y),ot&&(it||tt.D(x)||!st&&tt.x+x.x===1&&tt.y+x.y===1)&&(ne+=st?0:30,0>Ut&&(ne+=180)),0>ne?ne+=360:360<=ne&&(ne-=360),ot&&(fe+=Math.abs(Ut)*(st?1:2)),ne===0?Ot=fe:ne===90?Wt=fe:ne===180?Ot=-fe:ne===270?Wt=-fe:(Ot=fe*Math.cos(ne*Math.PI/180),Wt=fe*Math.sin(ne*Math.PI/180)),x.Mc()&&ot&&(x=E.ga(cr,Lt.alloc()),tt=Lt.allocAt(x.x+1e3*Ot,x.y+1e3*Wt),this.getLinkPointFromPoint(b,E,x,tt,!1,Ft),Lt.free(x),Lt.free(tt))}x=ht,(st||!nt||ot)&&(x=new Lt(ht.x+xt,ht.y+St)),tt=Ft,(st||!it||ot)&&(tt=new Lt(Ft.x+Ot,Ft.y+Wt)),!ft&&!st&&nt&&3<z&&this.adjustPoints(0,ht,z-2,tt)?this.dd(z-1,Ft):!ft&&!st&&it&&3<z&&this.adjustPoints(1,x,z-1,Ft)?this.dd(0,ht):!ft&&(st?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ht),this.dd(z-1,Ft)):(this.Fj(),this.ne(ht),(st||!nt||ot)&&this.ne(x),st&&this.addOrthoPoints(x,mt,tt,ne,a,b),(st||!it||ot)&&this.ne(tt),this.ne(Ft))}return!0};function G0(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}ei.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new Lt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var tt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*E;var nt=-a.m12*E,it=-a.m21*E,ot=a.m11*E,st=E*(a.m21*a.dy-a.m22*a.dx),ht=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*tt+b.y*it+st,b=b.x*nt+b.y*ot+ht,tt=x.x*tt+x.y*it+st,x=x.x*nt+x.y*ot+ht}return y.Sj(E,b,tt,x,z),a!==null&&z.transform(a),z};function Vg(a,y){var x=y.Zn;return x===null&&(x=new Nd,x.port=y,x.node=y.part,y.Zn=x),u1(x,a)}ei.prototype.getLinkPoint=function(a,y,x,b,E,z,tt,nt){if(nt===void 0&&(nt=new Lt),x.sb()&&!kf(x))return y.ga(x,nt),nt;if(x.$c()){var it=Vg(this,y);if(it!==null){if(nt.assign(it.Zo),E&&this.routing===i1){var ot=Vg(this,tt);if(ot!==null&&it.Gl<ot.Gl){it=Lt.alloc(),ot=Lt.alloc();var st=new un(y.ga(gr,it),y.ga(Eo,ot)),ht=this.computeSpot(!b,tt);a=this.getLinkPoint(z,tt,ht,!b,E,a,y,ot),(x.Hf(pl)||x.Hf(As))&&a.y>=st.y&&a.y<=st.y+st.height?nt.y=a.y:(x.Hf(Is)||x.Hf(sl))&&a.x>=st.x&&a.x<=st.x+st.width&&(nt.x=a.x),Lt.free(it),Lt.free(ot)}}return nt}}return x=y.ga(Kg(x),Lt.alloc()),this.pointsCount>(E?6:2)?(tt=b?this.i(1):this.i(this.pointsCount-2),E&&(tt=G0(x,tt.copy()))):(it=this.computeSpot(!b,tt),z=Lt.alloc(),tt=tt.ga(Kg(it),z),E&&(tt=G0(x,tt)),Lt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,b,nt),Lt.free(x),nt},ei.prototype.getLinkDirection=function(a,y,x,b,E,z,tt,nt){t:if(b.sb())var it=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(it=Vg(this,y),it!==null))switch(it.Nc){case 1:it=270;break t;case 2:it=180;break t;default:case 4:it=0;break t;case 8:it=90;break t}it=y.ga(cr,Lt.alloc()),this.pointsCount>(z?6:2)?(nt=E?this.i(1):this.i(this.pointsCount-2),nt=z?G0(it,nt.copy()):x):(x=Lt.alloc(),nt=nt.ga(cr,x),Lt.free(x)),x=Math.abs(nt.x-it.x)>Math.abs(nt.y-it.y)?nt.x>=it.x?0:180:nt.y>=it.y?90:270,Lt.free(it),it=x}return b.Mc()&&tt.Td(a)&&(it+=180,360<=it&&(it-=360)),kf(b)||(a=y.li(),a===0)||(45<=a&&135>a?it+=90:135<=a&&225>a?it+=180:225<=a&&315>a&&(it+=270),360<=it&&(it-=360)),it},ei.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Vg(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},ei.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=cr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===di?mr:y)):(a=y||this.toPort,a===null?a=cr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===di?mr:y)),a};function kf(a){return a===mr||a.x===.5&&a.y===.5}function Kg(a){return a.x===.5&&a.y===.5?a:cr}ei.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Vs&&4<this.pointsCount?this.computeMidPoint(new Lt):(a=y.Zn,a=a!==null?u1(a,this):null,a!==null?a.Zo:y.ga(cr))},ei.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},ei.prototype.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=er.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return v0(this,y,x,E),z===void 0&&er.free(tt),!0;if(this.Yc(a,tt)){var nt=!1;if(!this.isAtomic)for(var it=this.O.s,ot=it.length;ot--;){var st=it[ot];if(st.visible||st===this.locationObject){var ht=st.actualBounds,ft=this.naturalBounds;if(!(ht.x>ft.width||ht.y>ft.height||0>ht.x+ht.width||0>ht.y+ht.height)){if(ht=er.alloc(),ht.set(tt),st instanceof Un)nt=st.Cf(a,y,x,b,E,ht);else if(this.path===st){if(st instanceof ar)if(nt=a,ft=b,st.pickable===!1)nt=!1;else if(ht.multiply(st.transform),ft)t:{var mt=nt,xt=ht;if(st.fh(mt,xt))nt=!0;else{if(xt===void 0&&(xt=st.transform,mt.Re(st.actualBounds))){nt=!0;break t}nt=mt.left,ft=mt.right;var St=mt.top;mt=mt.bottom;var Ft=Lt.alloc(),Ot=Lt.alloc(),Wt=Lt.alloc(),Ut=er.alloc();Ut.set(xt),Ut.bv(st.transform),Ut.Vj(),Ot.x=ft,Ot.y=St,Ot.transform(Ut),Ft.x=nt,Ft.y=St,Ft.transform(Ut),xt=!1,Rc(st,Ft,Ot,Wt)?xt=!0:(Ft.x=ft,Ft.y=mt,Ft.transform(Ut),Rc(st,Ft,Ot,Wt)?xt=!0:(Ot.x=nt,Ot.y=mt,Ot.transform(Ut),Rc(st,Ft,Ot,Wt)?xt=!0:(Ft.x=nt,Ft.y=St,Ft.transform(Ut),Rc(st,Ft,Ot,Wt)&&(xt=!0)))),er.free(Ut),Lt.free(Ft),Lt.free(Ot),Lt.free(Wt),nt=xt}}else nt=st.fh(nt,ht)}else nt=_o(st,a,b,ht);nt&&(ft=st,y!==null&&(ft=y(st)),ft&&(x===null||x(ft))&&E.add(ft)),er.free(ht)}}}return z===void 0&&er.free(tt),nt||this.background!==null||this.areaBackground!==null}return z===void 0&&er.free(tt),!1},ei.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?Fl:this.curve},ei.prototype.computeCorner=function(){if(this.curve===Fl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},ei.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},ei.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=o1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,z=b.margin,tt=isNaN(E.width)?30:E.width*b.scale+z.left+z.right;E=isNaN(E.height)?14:E.height*b.scale+z.top+z.bottom,b=b.segmentOrientation,b===Qp||b===Xg||b===Q0?a=Math.max(a,E):b===tm||b===nm||b===qp||b===em?a=Math.max(a,tt):(y=y.ga(cr).ab(x.ga(cr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*E)+1)),this.curve===Fl&&(a*=1.333)}}return a},ei.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Vs&&x.bb()}},ei.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=r1;var y=this.Sf;if(y!==null){for(var x=Ne(),b=0,E=y.links,z=0;z<E.length;z++){var tt=E[z].computeSpacing();x.push(tt),b+=tt}for(b=-b/2,z=0;z<E.length;z++){if(E[z]===this){a=b+x[z]/2;break}b+=x[z]}y.Ds===this.fromNode&&(a=-a),Fe(x)}}return a},ei.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},ei.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},ei.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ug)return!1;E===Yg&&(E=Jp)}switch(E){case Ug:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(b)){E=z.x,z=z.y;var nt=tt.x-E,it=tt.y-z,ot=Math.sqrt(nt*nt+it*it);if(!ge.$(ot,0)){if(ge.$(nt,0))var st=0>it?-Math.PI/2:Math.PI/2;else st=Math.atan(it/Math.abs(nt)),0>nt&&(st=Math.PI-st);tt=y.x;var ht=y.y;nt=b.x-tt;var ft=b.y-ht;for(it=Math.sqrt(nt*nt+ft*ft),ge.$(nt,0)?ft=0>ft?-Math.PI/2:Math.PI/2:(ft=Math.atan(ft/Math.abs(nt)),0>nt&&(ft=Math.PI-ft)),ot=it/ot,st=ft-st,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),nt=y.x-E,it=y.y-z,y=Math.sqrt(nt*nt+it*it),ge.$(y,0)||(ge.$(nt,0)?it=0>it?-Math.PI/2:Math.PI/2:(it=Math.atan(it/Math.abs(nt)),0>nt&&(it=Math.PI-it)),nt=it+st,y*=ot,this.L(a,tt+y*Math.cos(nt),ht+y*Math.sin(nt)));this.dd(x,b)}}return!0;case Yg:if(z=this.i(a),ht=this.i(x),!z.Xa(y)||!ht.Xa(b)){E=z.x,z=z.y,tt=ht.x,ht=ht.y,ot=(tt-E)*(tt-E)+(ht-z)*(ht-z),nt=y.x,st=y.y,it=b.x,ft=b.y;var mt=1;if(it-nt!==0){var xt=(ft-st)/(it-nt);mt=Math.sqrt(1+1/(xt*xt))}else xt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var St=y.x,Ft=y.y,Ot=.5;ot!==0&&(Ot=((E-St)*(E-tt)+(z-Ft)*(z-ht))/ot);var Wt=E+Ot*(tt-E),Ut=z+Ot*(ht-z);y=Math.sqrt((St-Wt)*(St-Wt)+(Ft-Ut)*(Ft-Ut)),Ft<xt*(St-Wt)+Ut&&(y=-y),0<xt&&(y=-y),St=nt+Ot*(it-nt),Ot=st+Ot*(ft-st),xt!==0?(y=St+y/mt,this.L(a,y,Ot-(y-St)/xt)):this.L(a,St,Ot+y)}this.dd(x,b)}return!0;case Jp:t:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),tt=this.i(a+2),nt=z.x,st=z.y,ht=nt,ot=st,ge.B(E.y,z.y)?ge.B(z.x,tt.x)?st=y.y:ge.B(z.y,tt.y)&&(nt=y.x):ge.B(E.x,z.x)&&(ge.B(z.y,tt.y)?nt=y.x:ge.B(z.x,tt.x)&&(st=y.y)),this.L(a+1,nt,st),E=this.i(x),z=this.i(x-1),tt=this.i(x-2),nt=z.x,st=z.y,it=nt,ft=st,ge.B(E.y,z.y)?ge.B(z.x,tt.x)?st=b.y:ge.B(z.y,tt.y)&&(nt=b.x):ge.B(E.x,z.x)&&(ge.B(z.y,tt.y)?nt=b.x:ge.B(z.x,tt.x)&&(st=b.y)),this.L(x-1,nt,st),U0(this))){this.L(a+1,ht,ot),this.L(x-1,it,ft),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},ei.prototype.addOrthoPoints=function(a,y,x,b,E,z){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var tt=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var nt=E.actualBounds.copy(),it=z.actualBounds.copy();if(nt.w()&&it.w()){nt.Bc(im,im),it.Bc(im,im),nt.Ye(a),it.Ye(x);var ot=Lt.alloc(),st=Lt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&it.right>a.x||b===90&&x.y>a.y&&it.right>a.x?(ot.h(x.x,a.y),st.h(x.x,(a.y+x.y)/2),b===180?(ot.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),st.x=ot.x,st.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ot.x=a.x<it.left?this.computeMidOrthoPosition(a.x,a.y,it.left,x.y,!1):a.x<it.right&&(b===270&&a.y<it.top||b===90&&a.y>it.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):it.right,st.x=ot.x,st.y=x.y):b===0&&a.x<it.left&&a.y>it.top&&a.y<it.bottom&&(ot.x=a.x,ot.y=a.y<x.y?Math.min(x.y,it.top):Math.max(x.y,it.bottom),st.y=ot.y)):(ot.h(a.x,x.y),st.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<nt.top||b===270&&x.y>nt.bottom)&&(b===180&&(it.ca(a)||nt.ca(x))?ot.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ot.y=this.computeMidOrthoPosition(a.x,nt.top,x.x,Math.max(x.y,it.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ot.y=this.computeMidOrthoPosition(a.x,nt.bottom,x.x,Math.min(x.y,it.top),!0)),st.x=x.x,st.y=ot.y),ot.y>nt.top&&ot.y<nt.bottom&&(x.x>=nt.left&&x.x<=a.x||a.x<=it.right&&a.x>=x.x?(b===90||b===270)&&(ot.h(Math.max((a.x+x.x)/2,a.x),a.y),st.h(ot.x,x.y)):(ot.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?nt.top:Math.min(nt.top,it.top)):Math.max(x.y,b===0?nt.bottom:Math.max(nt.bottom,it.bottom)),st.x=x.x,st.y=ot.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&it.left<a.x||b===90&&x.y>a.y&&it.left<a.x?(ot.h(x.x,a.y),st.h(x.x,(a.y+x.y)/2),b===0?(ot.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),st.x=ot.x,st.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ot.x=a.x>it.right?this.computeMidOrthoPosition(a.x,a.y,it.right,x.y,!1):a.x>it.left&&(b===270&&a.y<it.top||b===90&&a.y>it.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):it.left,st.x=ot.x,st.y=x.y):b===180&&a.x>it.right&&a.y>it.top&&a.y<it.bottom&&(ot.x=a.x,ot.y=a.y<x.y?Math.min(x.y,it.top):Math.max(x.y,it.bottom),st.y=ot.y)):(ot.h(a.x,x.y),st.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<nt.top||b===270&&x.y>nt.bottom)&&(b===0&&(it.ca(a)||nt.ca(x))?ot.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ot.y=this.computeMidOrthoPosition(a.x,nt.top,x.x,Math.max(x.y,it.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ot.y=this.computeMidOrthoPosition(a.x,nt.bottom,x.x,Math.min(x.y,it.top),!0)),st.x=x.x,st.y=ot.y),ot.y>nt.top&&ot.y<nt.bottom&&(x.x<=nt.right&&x.x>=a.x||a.x>=it.left&&a.x<=x.x?(b===90||b===270)&&(ot.h(Math.min((a.x+x.x)/2,a.x),a.y),st.h(ot.x,x.y)):(ot.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?nt.top:Math.min(nt.top,it.top)):Math.max(x.y,b===180?nt.bottom:Math.max(nt.bottom,it.bottom)),st.x=x.x,st.y=ot.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&it.bottom>a.y||b===0&&x.x>a.x&&it.bottom>a.y?(ot.h(a.x,x.y),st.h((a.x+x.x)/2,x.y),b===270?(ot.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),st.x=x.x,st.y=ot.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ot.y=a.y<it.top?this.computeMidOrthoPosition(a.x,a.y,x.x,it.top,!0):a.y<it.bottom&&(b===180&&a.x<it.left||b===0&&a.x>it.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):it.bottom,st.x=x.x,st.y=ot.y):b===90&&a.y<it.top&&a.x>it.left&&a.x<it.right&&(ot.x=a.x<x.x?Math.min(x.x,it.left):Math.max(x.x,it.right),ot.y=a.y,st.x=ot.x)):(ot.h(x.x,a.y),st.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<nt.left||b===180&&x.x>nt.right)&&(b===270&&(it.ca(a)||nt.ca(x))?ot.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ot.x=this.computeMidOrthoPosition(nt.left,a.y,Math.max(x.x,it.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ot.x=this.computeMidOrthoPosition(nt.right,a.y,Math.min(x.x,it.left),x.y,!1)),st.x=ot.x,st.y=x.y),ot.x>nt.left&&ot.x<nt.right&&(x.y>=nt.top&&x.y<=a.y||a.y<=it.bottom&&a.y>=x.y?(b===0||b===180)&&(ot.h(a.x,Math.max((a.y+x.y)/2,a.y)),st.h(x.x,ot.y)):(ot.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?nt.left:Math.min(nt.left,it.left)):Math.max(x.x,b===90?nt.right:Math.max(nt.right,it.right)),st.x=ot.x,st.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&it.top<a.y||b===0&&x.x>a.x&&it.top<a.y?(ot.h(a.x,x.y),st.h((a.x+x.x)/2,x.y),b===90?(ot.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),st.x=x.x,st.y=ot.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ot.y=a.y>it.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,it.bottom,!0):a.y>it.top&&(b===180&&a.x<it.left||b===0&&a.x>it.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):it.top,st.x=x.x,st.y=ot.y):b===270&&a.y>it.bottom&&a.x>it.left&&a.x<it.right&&(ot.x=a.x<x.x?Math.min(x.x,it.left):Math.max(x.x,it.right),ot.y=a.y,st.x=ot.x)):(ot.h(x.x,a.y),st.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<nt.left||b===180&&x.x>nt.right)&&(b===90&&(it.ca(a)||nt.ca(x))?ot.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ot.x=this.computeMidOrthoPosition(nt.left,a.y,Math.max(x.x,it.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ot.x=this.computeMidOrthoPosition(nt.right,a.y,Math.min(x.x,it.left),x.y,!1)),st.x=ot.x,st.y=x.y),ot.x>nt.left&&ot.x<nt.right&&(x.y<=nt.bottom&&x.y>=a.y||a.y>=it.top&&a.y<=x.y?(b===0||b===180)&&(ot.h(a.x,Math.min((a.y+x.y)/2,a.y)),st.h(x.x,ot.y)):(ot.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?nt.left:Math.min(nt.left,it.left)):Math.max(x.x,b===270?nt.right:Math.max(nt.right,it.right)),st.x=ot.x,st.y=x.y)));var ht=x;if(this.isAvoiding){var ft=this.diagram;if(ft===null||E===z||this.layer.isTemporary||!uf(ft)||nt.ca(ht)&&!z.Td(E)||it.ca(a)&&!E.Td(z))y=!1;else{var mt=hf(ft,!0,this.containingGroup,null);if(this.segmentIndex!==17&&mt.Yj(Math.min(a.x,ot.x),Math.min(a.y,ot.y),Math.abs(a.x-ot.x),Math.abs(a.y-ot.y))&&mt.Yj(Math.min(ot.x,st.x),Math.min(ot.y,st.y),Math.abs(ot.x-st.x),Math.abs(ot.y-st.y))&&mt.Yj(Math.min(st.x,ht.x),Math.min(st.y,ht.y),Math.abs(st.x-ht.x),Math.abs(st.y-ht.y)))y=!1;else{E=a,z=ht;var xt=x=null;if(ft.isVirtualized){ft=mt.bounds.copy(),ft.Bc(-mt.Ho,-mt.Go);var St=Lt.alloc();Lf(mt,a.x,a.y)||(ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,a.x,a.y,ot.x,ot.y,St)?(x=a=St.copy(),y=St.ab(ot)):ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,ot.x,ot.y,st.x,st.y,St)?(x=a=St.copy(),y=St.ab(st)):ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,st.x,st.y,ht.x,ht.y,St)&&(x=a=St.copy(),y=St.ab(ht))),Lf(mt,ht.x,ht.y)||(ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,ht.x,ht.y,st.x,st.y,St)?(xt=ht=St.copy(),b=st.ab(St)):ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,st.x,st.y,ot.x,ot.y,St)?(xt=ht=St.copy(),b=ot.ab(St)):ge.Ff(ft.x,ft.y,ft.x+ft.width,ft.y+ft.height,ot.x,ot.y,a.x,a.y,St)&&(xt=ht=St.copy(),b=a.ab(St))),Lt.free(St)}nt=nt.copy().ed(it),nt.Bc(mt.Ho*mt.Os,mt.Go*mt.Os),l1(mt,a,y,ht,b,nt,!0),it=du(mt,ht.x,ht.y),!mt.abort&&it>=Df&&(s1(mt),nt.Bc(mt.Ho*mt.Hx,mt.Go*mt.Ix),l1(mt,a,y,ht,b,nt,!1),it=du(mt,ht.x,ht.y)),!mt.abort&&it<Df&&du(mt,ht.x,ht.y)!==fh?(Y0(this,mt,ht.x,ht.y,b,!0,tt),nt=this.i(2),4>this.pointsCount?(y===0||y===180?(nt.x=a.x,nt.y=ht.y):(nt.x=ht.x,nt.y=a.y),this.L(2,nt.x,nt.y),this.m(3,nt.x,nt.y)):(tt=this.i(3),y===0||y===180?ge.B(nt.x,tt.x)?(nt=y===0?Math.max(nt.x,a.x):Math.min(nt.x,a.x),this.L(2,nt,a.y),this.L(3,nt,tt.y)):ge.B(nt.y,tt.y)?(Math.abs(a.y-nt.y)<=mt.Go/2&&(this.L(2,nt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,nt.x,a.y)):this.L(2,a.x,nt.y):(y===90||y===270)&&(ge.B(nt.y,tt.y)?(nt=y===90?Math.max(nt.y,a.y):Math.min(nt.y,a.y),this.L(2,a.x,nt),this.L(3,tt.x,nt)):ge.B(nt.x,tt.x)?(Math.abs(a.x-nt.x)<=mt.Ho/2&&(this.L(2,a.x,nt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,nt.y)):this.L(2,nt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),xt!==null&&(b===0||b===180?this.yf(z.x,xt.y):this.yf(xt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ot.copy()),this.ne(st.copy())),Lt.free(ot),Lt.free(st)}},ei.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function U0(a){if(a.diagram===null||!a.isAvoiding||!uf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=hf(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],z=y[b+1];if(!a.Yj(Math.min(E.x,z.x),Math.min(E.y,z.y),Math.abs(E.x-z.x),Math.abs(E.y-z.y)))return!0}return!1}function Y0(a,y,x,b,E,z,tt){var nt=y.Ho,it=y.Go,ot=du(y,x,b),st=x,ht=b;for(E===0?st+=nt:E===90?ht+=it:E===180?st-=nt:ht-=it,E!==tt&&ot>$c&&du(y,st,ht)!==ot-1&&(du(y,x-nt,b)===ot-1?(E=180,st=x-nt,ht=b):du(y,x+nt,b)===ot-1?(E=0,st=x+nt,ht=b):du(y,x,b-it)===ot-1?(E=270,st=x,ht=b-it):du(y,x,b+it)===ot-1&&(E=90,st=x,ht=b+it));ot>$c&&du(y,st,ht)===ot-1;)x=st,b=ht,E===0?st+=nt:E===90?ht+=it:E===180?st-=nt:ht-=it,--ot;z?ot>$c&&(E===180||E===0?x=Math.floor(x/nt)*nt+nt/2:(E===90||E===270)&&(b=Math.floor(b/it)*it+it/2)):(x=Math.floor(x/nt)*nt+nt/2,b=Math.floor(b/it)*it+it/2),ot>$c&&(z=E,tt=x,st=b,E===0?(z=90,st+=it):E===90?(z=180,tt-=nt):E===180?(z=270,st-=it):E===270&&(z=0,tt+=nt),du(y,tt,st)===ot-1?Y0(a,y,tt,st,z,!1,z):(tt=x,st=b,E===0?(z=270,st-=it):E===90?(z=0,tt+=nt):E===180?(z=90,st+=it):E===270&&(z=180,tt-=nt),du(y,tt,st)===ot-1&&Y0(a,y,tt,st,z,!1,z))),a.yf(x,b)}ei.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=gi(y,a,x.x,x.y,b.x,b.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var nt=gi(y,a,b.x,b.y,x.x,x.y);b=x,nt<E&&(z=tt,E=nt)}return z},ei.prototype.qc=function(){this.lk=!1,this.v()},ei.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof ar&&(E.ua=this.ua)}}},ei.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&zc(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),z=E.copy();b=this.Nb.s;var tt=this.computeCurve();if(tt===Fl&&3<=y&&!ge.$(this.smoothness,0))if(y===3){var nt=this.i(1);b=Math.min(E.x,nt.x);var it=Math.min(E.y,nt.y);nt=this.i(2),b=Math.min(b,nt.x),it=Math.min(it,nt.y)}else{if(this.isOrthogonal)for(it=0;it<y;it++)nt=b[it],z.x=Math.min(nt.x,z.x),z.y=Math.min(nt.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),it=this.i(b),z.x=Math.min(it.x,z.x),z.y=Math.min(it.y,z.y);b=z.x,it=z.y}else{for(it=0;it<y;it++)nt=b[it],z.x=Math.min(nt.x,z.x),z.y=Math.min(nt.y,z.y);b=z.x,it=z.y}if(b-=this.su.x,it-=this.su.y,E.x-=b,E.y-=it,y!==2||zc(this)){if(a.type=ti.o,nt=Dx(a),this.computeShortLength(!0)!==0&&(E=bd(this,E,!0,z)),Nf(nt,E.x,E.y,!1),tt===Fl&&3<=y&&!ge.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-it,E=this.i(2).copy(),E.x-=b,E.y-=it,this.computeShortLength(!1)!==0&&(E=bd(this,E,!1,z)),ah(nt,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Lt.allocAt(b,it),x=Lt.alloc(),x.assign(this.i(1)),z=Lt.allocAt(b,it),E=Lt.allocAt(b,it),tt=this.i(0);for(var ot,st=this.smoothness/3,ht=1;ht<this.pointsCount-1;ht++){ot=this.i(ht);var ft=tt,mt=ot,xt=this.i(X0(this,ot,ht,!1));if((!ge.$(ft.x,mt.x)||!ge.$(mt.x,xt.x))&&(!ge.$(ft.y,mt.y)||!ge.$(mt.y,xt.y))){var St=st;isNaN(St)&&(St=this.smoothness/3);var Ft=ft.x;ft=ft.y;var Ot=mt.x;mt=mt.y;var Wt=xt.x;xt=xt.y;var Ut=St*_g(Ft,ft,Ot,mt);St*=_g(Ot,mt,Wt,xt),ge.$(ft,mt)&&ge.$(Ot,Wt)&&(Ot>Ft?xt>mt?(z.x=Ot-Ut,z.y=mt-Ut,E.x=Ot+St,E.y=mt+St):(z.x=Ot-Ut,z.y=mt+Ut,E.x=Ot+St,E.y=mt-St):xt>mt?(z.x=Ot+Ut,z.y=mt-Ut,E.x=Ot-St,E.y=mt+St):(z.x=Ot+Ut,z.y=mt+Ut,E.x=Ot-St,E.y=mt-St)),ge.$(Ft,Ot)&&ge.$(mt,xt)&&(mt>ft?(Wt>Ot?(z.x=Ot-Ut,z.y=mt-Ut,E.x=Ot+St):(z.x=Ot+Ut,z.y=mt-Ut,E.x=Ot-St),E.y=mt+St):(Wt>Ot?(z.x=Ot-Ut,z.y=mt+Ut,E.x=Ot+St):(z.x=Ot+Ut,z.y=mt+Ut,E.x=Ot-St),E.y=mt-St)),(ge.$(Ft,Ot)&&ge.$(Ot,Wt)||ge.$(ft,mt)&&ge.$(mt,xt))&&(Ft=.5*(Ft+Wt),ft=.5*(ft+xt),z.x=Ft,z.y=ft,E.x=Ft,E.y=ft),(ht===1||ht===2&&ge.$(tt.x,this.i(0).x)&&ge.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+ot.x),x.y=.5*(tt.y+ot.y)),ah(nt,x.x-b,x.y-it,z.x-b,z.y-it,ot.x-b,ot.y-it),y.set(z),x.set(E),tt=ot}}ot=tt.x,tt=tt.y,st=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(st=bd(this,st.copy(),!1,ur)),ot=.5*(ot+st.x),tt=.5*(tt+st.y),ah(nt,E.x-b,E.y-it,ot-b,tt-it,st.x-b,st.y-it),Lt.free(y),Lt.free(x),Lt.free(z),Lt.free(E)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=bd(this,tt.copy(),!1,ur)),ah(nt,z.x-b,z.y-it,E.x-b,E.y-it,tt.x-b,tt.y-it);else{for(z=Lt.alloc(),z.assign(this.i(0)),E=Lt.alloc(),E.assign(z),tt=this.computeCorner(),ht=1,ot=0;ht<y;){if(ht=X0(this,z,ht,1<ht),st=this.i(ht),ht>=y-1){if(!z.D(st))this.computeShortLength(!1)!==0&&(st=bd(this,st.copy(),!1,ur)),Ed(this,nt,-b,-it,z,st,x);else if(ot===0)for(ht=1;ht<y;)E.assign(z),st=this.i(ht++),Ed(this,nt,-b,-it,z,st,x),z.assign(st);break}if(ot=X0(this,st,ht+1,ht<y-3),ht=-b,Ft=-it,ft=st,Ot=this.i(ot),St=x,ge.B(z.y,ft.y)&&ge.B(ft.x,Ot.x))if(xt=Math.min(tt,Math.abs(ft.x-E.x)/2),xt=Ut=Math.min(xt,Math.abs(Ot.y-ft.y)/2),ge.B(xt,0))Ed(this,nt,ht,Ft,z,ft,St),z.assign(ft);else{var ne=ft.x,fe=ft.y;mt=ne,Wt=fe,ft.x>z.x?ne=ft.x-xt:ne=ft.x+xt,Ot.y>ft.y?Wt=ft.y+Ut:Wt=ft.y-Ut,Ot=Lt.allocAt(ne,fe),Ed(this,nt,ht,Ft,z,Ot,St),Lt.free(Ot),Bg(nt,ft.x+ht,ft.y+Ft,mt+ht,Wt+Ft),z.h(mt,Wt)}else ge.B(z.x,ft.x)&&ge.B(ft.y,Ot.y)?(xt=Math.min(tt,Math.abs(ft.y-E.y)/2),xt=Ut=Math.min(xt,Math.abs(Ot.x-ft.x)/2),ge.B(Ut,0)?(Ed(this,nt,ht,Ft,z,ft,St),z.assign(ft)):(ne=ft.x,fe=ft.y,mt=ne,Wt=fe,ft.y>z.y?fe=ft.y-xt:fe=ft.y+xt,Ot.x>ft.x?mt=ft.x+Ut:mt=ft.x-Ut,Ot=Lt.allocAt(ne,fe),Ed(this,nt,ht,Ft,z,Ot,St),Lt.free(Ot),Bg(nt,ft.x+ht,ft.y+Ft,mt+ht,Wt+Ft),z.h(mt,Wt))):(Ed(this,nt,ht,Ft,z,ft,St),z.assign(ft));E.assign(st),ht=ot}Lt.free(z)}Rg=nt}else nt=this.i(1).copy(),nt.x-=b,nt.y-=it,this.computeShortLength(!0)!==0&&(E=bd(this,E,!0,z)),this.computeShortLength(!1)!==0&&(nt=bd(this,nt,!1,z)),a.type=ti.j,a.startX=E.x,a.startY=E.y,a.endX=nt.x,a.endY=nt.y;return this.lk=!0,a};function _g(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),ge.$(a,0)?y:ge.$(y,0)?a:Math.sqrt(a*a+y*y)))}function bd(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=_g(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=_g(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function X0(a,y,x,b){for(var E=a.pointsCount,z=y;ge.$(y.x,z.x)&&ge.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!ge.$(y.x,z.x)&&!ge.$(y.y,z.y))return x-1;for(var tt=z;ge.$(y.x,z.x)&&ge.$(z.x,tt.x)&&(!b||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||ge.$(y.y,z.y)&&ge.$(z.y,tt.y)&&(!b||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=E)return E-1;tt=a.i(x++)}return x-2}ei.prototype.computeJumpLength=function(){return 10};function Ed(a,y,x,b,E,z,tt){if(!tt&&zc(a)){tt=a.computeJumpLength();var nt=tt/2,it=[],ot=0;if(a.isVisible()&&(ot=Lw(a,E,z,it)),0<ot){if(ge.B(E.y,z.y))if(E.x<z.x)for(var st=0;st<ot;){var ht=Math.max(E.x,Math.min(it[st++]-nt,z.x-tt));y.lineTo(ht+x,z.y+b);for(var ft=ht+x,mt=Math.min(ht+tt,z.x);st<ot&&(ht=it[st],ht<mt+tt);)st++,mt=Math.min(ht+nt,z.x);ht=z.y-tt+b,mt+=x;var xt=z.y+b;a.curve===dh?Nf(y,mt,xt,!1):ah(y,ft,ht,mt,ht,mt,xt)}else for(--ot;0<=ot;){for(st=Math.min(E.x,Math.max(it[ot--]+nt,z.x+tt)),y.lineTo(st+x,z.y+b),ft=st+x,ht=Math.max(st-tt,z.x);0<=ot&&(st=it[ot],st>ht-tt);)ot--,ht=Math.max(st-nt,z.x);st=z.y-tt+b,ht+=x,mt=z.y+b,a.curve===dh?Nf(y,ht,mt,!1):ah(y,ft,st,ht,st,ht,mt)}else if(ge.B(E.x,z.x))if(E.y<z.y)for(st=0;st<ot;){for(ht=Math.max(E.y,Math.min(it[st++]-nt,z.y-tt)),y.lineTo(z.x+x,ht+b),ft=ht+b,ht=Math.min(ht+tt,z.y);st<ot&&(mt=it[st],mt<ht+tt);)st++,ht=Math.min(mt+nt,z.y);mt=z.x-tt+x,xt=z.x+x,ht+=b,a.curve===dh?Nf(y,xt,ht,!1):ah(y,mt,ft,mt,ht,xt,ht)}else for(--ot;0<=ot;){for(st=Math.min(E.y,Math.max(it[ot--]+nt,z.y+tt)),y.lineTo(z.x+x,st+b),ft=st+b,st=Math.max(st-tt,z.y);0<=ot&&(ht=it[ot],ht>st-tt);)ot--,st=Math.max(ht-nt,z.y);ht=z.x-tt+x,mt=z.x+x,st+=b,a.curve===dh?Nf(y,mt,st,!1):ah(y,ht,ft,ht,st,mt,st)}}}y.lineTo(z.x+x,z.y+b)}function Lw(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,nt=0;nt<tt;nt++){var it=z[nt];if(it instanceof ei){if(it===a)return 0<b.length&&b.sort(function(st,ht){return st-ht}),b.length;if(it.isVisible()&&zc(it)){var ot=it.routeBounds;ot.w()&&a.routeBounds.Yc(ot)&&!a.usesSamePort(it)&&(ot=it.path,ot!==null&&ot.Ed()&&Dw(y,x,b,it))}}}}}return 0<b.length&&b.sort(function(st,ht){return st-ht}),b.length}function Dw(a,y,x,b){for(var E=ge.B(a.y,y.y),z=b.pointsCount,tt=b.i(0),nt=Lt.alloc(),it=1;it<z;it++){var ot=b.i(it);if(it<z-1){var st=b.i(it+1);if(tt.y===ot.y&&ot.y===st.y){if(ot.x>tt.x&&st.x>=ot.x||ot.x<tt.x&&st.x<=ot.x)continue}else if(tt.x===ot.x&&ot.x===st.x&&(ot.y>tt.y&&st.y>=ot.y||ot.y<tt.y&&st.y<=ot.y))continue}t:{st=a.x;var ht=a.y,ft=y.x,mt=y.y,xt=tt.x;tt=tt.y;var St=ot.x,Ft=ot.y;if(ge.B(st,ft)){if(!ge.B(ht,mt)&&ge.B(tt,Ft)&&Math.min(ht,mt)<tt&&Math.max(ht,mt)>tt&&Math.min(xt,St)<st&&Math.max(xt,St)>st&&!ge.B(xt,St)){nt.x=st,nt.y=tt,st=!0;break t}}else if(ge.B(ht,mt)&&ge.B(xt,St)&&Math.min(st,ft)<xt&&Math.max(st,ft)>xt&&Math.min(tt,Ft)<ht&&Math.max(tt,Ft)>ht&&!ge.B(tt,Ft)){nt.x=xt,nt.y=ht,st=!0;break t}nt.x=0,nt.y=0,st=!1}st&&(E?x.push(nt.x):x.push(nt.y)),tt=ot}Lt.free(nt)}function zc(a){return a=a.curve,a===Of||a===dh}function Gg(a,y){(y||zc(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()))}ei.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var z=!1;E=E.Pa.s;for(var tt=E.length,nt=0;nt<tt;nt++){var it=E[nt];it instanceof ei&&(it===this?z=!0:z&&n1(this,it,a))}}else if(b)for(z=E.Pa.s,E=z.length,tt=0;tt<E;tt++)nt=z[tt],nt instanceof ei&&n1(this,nt,a)}}}}};function n1(a,y,x){if(y!==null&&y.lk&&y.fd&&zc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}ei.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},ei.prototype.isVisible=function(){if(!Ai.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},ei.prototype.Zb=function(a){if(Ai.prototype.Zb.call(this,a),a&&Gg(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},ei.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Jp:this.qk};function Yp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,z=a=null,tt=y.jb.s,nt=tt.length,it=0;it<nt;it++){var ot=tt[it];(ot.ef===y&&ot.ff===b&&ot.uf===x&&ot.vf===E||ot.ef===x&&ot.ff===E&&ot.uf===y&&ot.vf===b)&&(z===null?z=ot:(a===null&&(a=[],a.push(z)),a.push(ot)))}if(a!==null){for(z=Vx(y,x,b,E),z===null&&(z=new Qg(y,b,x,E),Wx(y,z),Wx(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function Xp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(cn(y.links,a),y.Sl()))}ei.prototype.ph=function(){return!0},$n.Object.defineProperties(ei.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&&Hg(y,this,x),Xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.uf!==a&&$g(a,this,E),Yp(this),this.C(1)),this.g("fromNode",y,a),Tf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&wl(x),Xp(this),this.ff=a;var b=this.fromPort;b!==null&&wl(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),Yp(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&&Hg(y,this,x),Xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.ef!==a&&$g(a,this,E),Yp(this),this.C(1)),this.g("toNode",y,a),Tf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&wl(x),Xp(this),this.vf=a;var b=this.toPort;b!==null&&wl(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),Yp(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:di},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&&wl(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&&qt(a,">= 0",ei,"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:di},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&&wl(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&&qt(a,">= 0",ei,"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?We: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&&Up(this.fromNode),this.toNode!==null&&Up(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof ar?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Fl&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),ge.Dl(E.x,E.y,b.x,b.y,b.x,b.y,z.x,z.y,.5,a)}else for(z=3;z<b;z+=3){var tt=this.i(z-2);z+3>=b&&(z=b-1);var nt=this.i(z-1),it=this.i(z);ge.Dl(E.x,E.y,tt.x,tt.y,nt.x,nt.y,it.x,it.y,.5,a),y=Math.min(it.x,y),x=Math.min(it.y,x),E=it}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;E<b;E++)z=this.i(E),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Lt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Wg(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);ge.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):ge.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new $e,b=0;b<a.length/2;b++)E=new Lt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var z=a[E];if(!ae(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new $e,b=0;b<a.length;b++)E=a[b],x.add(new Lt(E.x,E.y).freeze())}}else if(a instanceof $e)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Rt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Wg(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&qd(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||!kf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!kf(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(),Gg(this,y===dh||y===Of||a===dh||a===Of),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(),Gg(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)}}}),ei.prototype.invalidateOtherJumpOvers=ei.prototype.Xo,ei.prototype.findClosestSegment=ei.prototype.ez,ei.prototype.updateRoute=ei.prototype.vg,ei.prototype.invalidateRoute=ei.prototype.bb,ei.prototype.rollbackRoute=ei.prototype.rv,ei.prototype.commitRoute=ei.prototype.zf,ei.prototype.startRoute=ei.prototype.uh,ei.prototype.clearPoints=ei.prototype.Fj,ei.prototype.removePoint=ei.prototype.pv,ei.prototype.addPointAt=ei.prototype.yf,ei.prototype.addPoint=ei.prototype.ne,ei.prototype.insertPointAt=ei.prototype.m,ei.prototype.insertPoint=ei.prototype.Kz,ei.prototype.setPointAt=ei.prototype.L,ei.prototype.setPoint=ei.prototype.dd,ei.prototype.getPoint=ei.prototype.i,ei.prototype.getOtherPort=ei.prototype.Cz,ei.prototype.getOtherNode=ei.prototype.To;var Md=null,Pd=null,J0=new yn(ei,"Normal",1),Iw=new yn(ei,"Orthogonal",2),Aw=new yn(ei,"AvoidsNodes",6),i1=new yn(ei,"AvoidsNodesStraight",7),Vs=new yn(ei,"None",0),Fl=new yn(ei,"Bezier",9),dh=new yn(ei,"JumpGap",10),Of=new yn(ei,"JumpOver",11),Jp=new yn(ei,"End",17),Ug=new yn(ei,"Scale",18),Yg=new yn(ei,"Stretch",19),Qp=new yn(ei,"OrientAlong",21),qp=new yn(ei,"OrientPlus90",22),tm=new yn(ei,"OrientMinus90",23),Q0=new yn(ei,"OrientOpposite",24),Xg=new yn(ei,"OrientUpright",25),em=new yn(ei,"OrientPlus90Upright",26),nm=new yn(ei,"OrientMinus90Upright",27),Jg=new yn(ei,"OrientUpright45",28),r1=16,o1=14,im=8;ei.className="Link",ei.Normal=J0,ei.Orthogonal=Iw,ei.AvoidsNodes=Aw,ei.AvoidsNodesStraight=i1,ei.None=Vs,ei.Bezier=Fl,ei.JumpGap=dh,ei.JumpOver=Of,ei.End=Jp,ei.Scale=Ug,ei.Stretch=Yg,ei.OrientAlong=Qp,ei.OrientPlus90=qp,ei.OrientMinus90=tm,ei.OrientOpposite=Q0,ei.OrientUpright=Xg,ei.OrientPlus90Upright=em,ei.OrientMinus90Upright=nm,ei.OrientUpright45=Jg,ei.EndSegmentStep=8,ei.CurvinessStart=r1,ei.SpacingMin=o1,ei.OrthoShortCut=im;function Qg(a,y,x,b){wi(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}Qg.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},Qg.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))}},Qg.className="LinkBundle";function rm(a){wi(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}rm.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=q0,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Lf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function du(a,y,x){return Lf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):q0}function s1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=$c&&(x[b]=q0)}rm.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var z=y;z<=x;z++)if(E[z]===fh)return!1}return!0};function fu(a,y,x,b,E,z,tt,nt,it){if(!(y<z||y>tt||x<nt||x>it)){var ot=y|0,st=x|0,ht=a.ac[ot][st];if(ht>=$c&&ht<Df)for(E?st+=b:ot+=b,ht+=1;z<=ot&&ot<=tt&&nt<=st&&st<=it&&!(ht>=a.ac[ot][st]);)a.ac[ot][st]=ht,ht+=1,E?st+=b:ot+=b;if(ot=E?st:ot,E)if(0<b)for(x+=b;x<ot;x+=b)fu(a,y,x,1,!E,z,tt,nt,it),fu(a,y,x,-1,!E,z,tt,nt,it);else for(x+=b;x>ot;x+=b)fu(a,y,x,1,!E,z,tt,nt,it),fu(a,y,x,-1,!E,z,tt,nt,it);else if(0<b)for(y+=b;y<ot;y+=b)fu(a,y,x,1,!E,z,tt,nt,it),fu(a,y,x,-1,!E,z,tt,nt,it);else for(y+=b;y>ot;y+=b)fu(a,y,x,1,!E,z,tt,nt,it),fu(a,y,x,-1,!E,z,tt,nt,it)}}function qg(a,y,x,b,E,z,tt,nt,it){y|=0,x|=0;var ot=fh,st=$c;for(a.ac[y][x]=st;ot===fh&&y>z&&y<tt&&x>nt&&x<it;)st+=1,a.ac[y][x]=st,E?x+=b:y+=b,ot=a.ac[y][x]}function tv(a,y,x,b,E,z,tt,nt,it){y|=0,x|=0;var ot=fh,st=Df;for(a.ac[y][x]=st;ot===fh&&y>z&&y<tt&&x>nt&&x<it;)a.ac[y][x]=st,E?x+=b:y+=b,ot=a.ac[y][x]}function l1(a,y,x,b,E,z,tt){if(a.ac!==null){a.abort=!1;var nt=y.x,it=y.y;if(Lf(a,nt,it)){nt-=a.Nd,nt/=a.rc,it-=a.Od,it/=a.sc;var ot=b.x,st=b.y;if(Lf(a,ot,st))if(ot-=a.Nd,ot/=a.rc,st-=a.Od,st/=a.sc,1>=Math.abs(nt-ot)&&1>=Math.abs(it-st))a.abort=!0;else{var ht=z.x;b=z.y,y=z.x+z.width;var ft=z.y+z.height;ht-=a.Nd,ht/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,ft-=a.Od,ft/=a.sc,z=Math.max(0,Math.min(a.di,ht|0)),y=Math.min(a.di,Math.max(0,y|0)),ht=Math.max(0,Math.min(a.ei,b|0)),ft=Math.min(a.ei,Math.max(0,ft|0)),b=a.ac,nt|=0,it|=0,ot|=0,st|=0;var mt=x===0||x===90?1:-1;if(x=x===90||x===270,b[nt][it]===fh?(qg(a,nt,it,mt,x,z,y,ht,ft),qg(a,nt,it,1,!x,z,y,ht,ft),qg(a,nt,it,-1,!x,z,y,ht,ft)):qg(a,nt,it,mt,x,nt,it,nt,it),b[ot][st]===fh?(tv(a,ot,st,E===0||E===90?1:-1,E===90||E===270,z,y,ht,ft),tv(a,ot,st,1,!(E===90||E===270),z,y,ht,ft),tv(a,ot,st,-1,!(E===90||E===270),z,y,ht,ft)):tv(a,ot,st,mt,x,ot,st,ot,st),x=Ne(),tt&&a1(a,ot,st,E,nt,it,x))for((x[0]!==ot||x[1]!==st)&&(x.unshift(st),x.unshift(ot)),(x[x.length-2]!==nt||x[x.length-1]!==it)&&(x.push(nt),x.push(it)),a=$c,E=x[x.length-2],tt=x[x.length-1],b[E][tt]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],tt=x[z+3],y=x[z],ot=x[z+1];y>E?E++:y<E?E--:ot>tt?tt++:ot<tt&&tt--,b[E][tt]=a++,E!==y||tt!==ot;);else fu(a,nt,it,1,!1,z,y,ht,ft),fu(a,nt,it,-1,!1,z,y,ht,ft),fu(a,nt,it,1,!0,z,y,ht,ft),fu(a,nt,it,-1,!0,z,y,ht,ft);Fe(x)}}}}function a1(a,y,x,b,E,z,tt){for(var nt=a.ac,it=y,ot=x;;){if(it===E&&ot===z)return!0;var st=it,ht=ot;if(b===0)if(st<E)st++;else break;else if(b===90)if(ht<z)ht++;else break;else if(b===180)if(st>E)st--;else break;else if(ht>z)ht--;else break;var ft=nt[st][ht];if(ft===0||ft===ty)break;it=st,ot=ht}for(;;){if(st=b,ht=it,ft=ot,b===0?ft<z?(st=90,ft++):ft>z&&(st=270,ft--):b===90?ht<E?(st=0,ht++):ht>E&&(st=180,ht--):b===180?ft<z?(st=90,ft++):ft>z&&(st=270,ft--):ht<E?(st=0,ht++):ht>E&&(st=180,ht--),ht=nt[ht][ft],st!==b&&ht!==0&&ht!==ty){if(tt.push(it),tt.push(ot),a1(a,it,ot,st,E,z,tt))return!0;tt.pop(),tt.pop()}if(nt[it][ot]=ty,b===0){if(it===y)return!1;it--}else if(b===90){if(ot===x)return!1;ot--}else if(b===180){if(it===y)return!1;it++}else{if(ot===x)return!1;ot++}}}$n.Object.defineProperties(rm.prototype,{bounds:{get:function(){return new un(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 fh=0,$c=1,Df=999999,q0=Df+1,ty=Df+2;rm.className="PositionArray";function Nd(){wi(this),this.port=this.node=null,this.pe=[],this.ap=!1}Nd.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function Fw(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Nd.prototype.Sl=function(){this.pe.length=0};function u1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof rr?E:null;if(z===null||z.isSubGraphExpanded)var tt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}b=z,tt=b.Lu()}z=a.pe.length=0;var nt=a.port.ga(gr,Lt.alloc()),it=a.port.ga(Eo,Lt.alloc());for(E=un.allocAt(nt.x,nt.y,0,0),E.Ye(it),Lt.free(nt),Lt.free(it),nt=Lt.allocAt(E.x+E.width/2,E.y+E.height/2),it=a.port.li(),tt=tt.iterator;tt.next();){var ot=tt.value;if(ot.isVisible()&&ot.fromPort!==ot.toPort){var st=ot.fromPort===a.port||ot.fromNode!==null&&ot.fromNode.Td(b),ht=ot.computeSpot(st,a.port);if(ht.$c()&&(st=st?ot.toPort:ot.fromPort,st!==null)){var ft=st.part;if(ft!==null){var mt=ft.findVisibleNode();mt!==null&&mt!==ft&&(ft=mt,st=ft.port),st=ot.computeOtherPoint(ft,st),ft=nt.ab(st),ft-=it,0>ft?ft+=360:360<=ft&&(ft-=360),ht=Fw(E,ht,ft,ot.isOrthogonal),ht===0?(ht=4,180<ft&&(ft-=360)):ht===90?(ht=8,270<ft&&(ft-=360)):ht===180?ht=2:(ht=1,90>ft&&(ft+=360)),mt=a.pe[z],mt===void 0?(mt=new ey(ot,ft,ht),a.pe[z]=mt):(mt.link=ot,mt.angle=ft,mt.Nc=ht),mt.hv.set(st),z++}}}}for(Lt.free(nt),a.pe.sort(Nd.prototype.j),it=a.pe.length,b=-1,z=nt=0;z<it;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==b&&(b=tt.Nc,nt=0),tt.Uo=nt,nt++);for(b=-1,nt=0,z=it-1;0<=z;z--)it=a.pe[z],it!==void 0&&(it.Nc!==b&&(b=it.Nc,nt=it.Uo+1),it.Gl=nt);if(z=a.pe,ht=a.port,b=a.node.portSpreading,nt=Lt.alloc(),it=Lt.alloc(),tt=Lt.alloc(),ot=Lt.alloc(),ht.ga(gr,nt),ht.ga(zr,it),ht.ga(Eo,tt),ht.ga(hs,ot),mt=ft=st=ht=0,b===V0)for(var xt=0;xt<z.length;xt++){var St=z[xt];if(St!==null){var Ft=St.link.computeThickness();switch(St.Nc){case 8:ft+=Ft;break;case 2:mt+=Ft;break;case 1:ht+=Ft;break;default:case 4:st+=Ft}}}var Ot=xt=0,Wt=1,Ut=St=0;for(Ft=0;Ft<z.length;Ft++){var ne=z[Ft];if(ne!==null){if(xt!==ne.Nc){switch(xt=ne.Nc,xt){case 8:var fe=tt;Ot=ot;break;case 2:fe=ot,Ot=nt;break;case 1:fe=nt,Ot=it;break;default:case 4:fe=it,Ot=tt}switch(St=Ot.x-fe.x,Ut=Ot.y-fe.y,xt){case 8:ft>Math.abs(St)?(Wt=Math.abs(St)/ft,ft=Math.abs(St)):Wt=1;break;case 2:mt>Math.abs(Ut)?(Wt=Math.abs(Ut)/mt,mt=Math.abs(Ut)):Wt=1;break;case 1:ht>Math.abs(St)?(Wt=Math.abs(St)/ht,ht=Math.abs(St)):Wt=1;break;default:case 4:st>Math.abs(Ut)?(Wt=Math.abs(Ut)/st,st=Math.abs(Ut)):Wt=1}Ot=0}var _e=ne.Zo;if(b===V0){switch(ne=ne.link.computeThickness(),ne*=Wt,_e.set(fe),xt){case 8:_e.x=fe.x+St/2+ft/2-Ot-ne/2;break;case 2:_e.y=fe.y+Ut/2+mt/2-Ot-ne/2;break;case 1:_e.x=fe.x+St/2-ht/2+Ot+ne/2;break;default:case 4:_e.y=fe.y+Ut/2-st/2+Ot+ne/2}Ot+=ne}else{var si=.5;b===Zg&&(si=(ne.Uo+1)/(ne.Gl+1)),_e.x=fe.x+St*si,_e.y=fe.y+Ut*si}}}for(Lt.free(nt),Lt.free(it),Lt.free(tt),Lt.free(ot),fe=a.pe,z=0;z<fe.length;z++)b=fe[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,un.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}Nd.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},Nd.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,mr,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*b:(a?y.y===z.y:y.x===z.x)?x:x+8*(E-1-b)},Nd.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Lt,this.Gl=this.Uo=0,this.Zo=new Lt,this.Ju=0}ey.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ey.className="LinkInfo";function no(a){wi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Lt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}no.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},no.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},no.prototype.qb=function(){},no.prototype.toString=function(){var a=Xe(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},no.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())}}},no.prototype.createNetwork=function(){return new Wr(this)},no.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Ge?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof rr?y.lg(a.memberParts):y.lg(a.iterator),y},no.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")}},no.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()}},no.prototype.doLayout=function(a){var y=new pn;a instanceof Ge?(Yh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Yh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof rr?Yh(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},no.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var nt=a.value;om(nt);var it=nt.measuredBounds,ot=it.width;it=it.height,nt.moveTo(b,E),nt instanceof rr&&(nt.rh=!1),b+=Math.max(ot,50)+20,tt=Math.max(tt,Math.max(it,50)),z>=y-1?(z=0,b=x,E+=tt+20,tt=0):z++}},no.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var nt=tt.value.node;if(!(nt===null||nt instanceof ei)&&(om(nt),this.rh(nt))){var it=nt.measuredBounds,ot=it.width;it=it.height,nt.moveTo(x,b),nt instanceof rr&&(nt.rh=!1),x+=Math.max(ot,50)+20,z=Math.max(z,Math.max(it,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},no.prototype.rh=function(a){return!!(!a.location.w()||a instanceof rr&&a.rh)};function Yh(a,y,x,b,E,z,tt,nt){for(x=x.iterator;x.next();){var it=x.value;b&&!it.isTopLevel||E!==null&&!E(it)||!it.canLayout()||(z&&it instanceof hi?it.isLinkLabel||(it instanceof rr&&it.layout===null?Yh(a,y,it.memberParts,!1,E,z,tt,nt):(om(it),y.add(it))):tt&&it instanceof ei?y.add(it):!nt||!it.Zc()||it instanceof hi||(om(it),y.add(it)))}}function om(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}no.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new un),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},no.prototype.ex=function(a){var y=new pn;return a instanceof Ge?(Yh(this,y,a.nodes,!0,null,!0,!0,!0),Yh(this,y,a.links,!0,null,!0,!0,!0),Yh(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof rr?Yh(this,y,a.memberParts,!1,null,!0,!0,!0):Yh(this,y,a.iterator,!1,null,!0,!0,!0),y},no.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(gr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},$n.Object.defineProperties(no.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())}}}),no.prototype.collectParts=no.prototype.ex,no.prototype.getLayoutBounds=no.prototype.ni,no.prototype.invalidateLayout=no.prototype.C,no.className="Layout";function Wr(a){wi(this),this.Sc=a,this.wf=new pn,this.ye=new pn,this.Es=new ai,this.zs=new ai}Wr.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 pn,this.ye=new pn,this.Es=new ai,this.zs=new ai},Wr.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},Wr.prototype.createVertex=function(){return new Ho(this)},Wr.prototype.createEdge=function(){return new Cl(this)},Wr.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof hi)return!tt.isLinkLabel;if(tt instanceof ei){var nt=tt.fromNode;return nt===null||nt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof hi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof rr&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof ei&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var z=b.fromNode;E=b.toNode,z!==null&&E!==null&&z!==E&&(z=this.findGroupVertex(z),E=this.findGroupVertex(E),z!==null&&E!==null&&this.Zj(z,E,b))}}},Wr.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},yt=Wr.prototype,yt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},yt.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},yt.Iu=function(a){if(a!==null&&h1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function h1(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}yt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},yt.ki=function(a){return a===null?null:this.Es.I(a)},yt.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(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}}yt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},yt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),iy(this,a)}};function iy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}yt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},yt.Lo=function(a){return a===null?null:this.zs.I(a)},yt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},yt.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))}},yt.Ko=function(){for(var a=Ne(),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]);Fe(a)},Wr.prototype.deleteArtificialVertexes=function(){for(var a=Ne(),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=Ne(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);Fe(a),Fe(y)};function Bw(a){for(var y=Ne(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);Fe(y)}Wr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Bw(this),this.Ko()),a=new $e;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(this,y,b),y=!0;break}}}return a.sort(function(E,z){return E===null||z===null||E===z?0:z.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){h1(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}Wr.prototype.dz=function(){for(var a=new pn,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},$n.Object.defineProperties(Wr.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}}}),Wr.prototype.findAllParts=Wr.prototype.dz,Wr.prototype.splitIntoSubNetworks=Wr.prototype.Zx,Wr.prototype.deleteSelfEdges=Wr.prototype.Ko,Wr.prototype.reverseEdge=Wr.prototype.gm,Wr.prototype.linkVertexes=Wr.prototype.Zj,Wr.prototype.findEdge=Wr.prototype.Lo,Wr.prototype.deleteLink=Wr.prototype.Yy,Wr.prototype.deleteEdge=Wr.prototype.Mj,Wr.prototype.addLink=Wr.prototype.Dy,Wr.prototype.addEdge=Wr.prototype.Bo,Wr.prototype.findVertex=Wr.prototype.ki,Wr.prototype.deleteNode=Wr.prototype.Zy,Wr.prototype.deleteVertex=Wr.prototype.Iu,Wr.prototype.addNode=Wr.prototype.Bl,Wr.prototype.addVertex=Wr.prototype.dh,Wr.prototype.addParts=Wr.prototype.lg,Wr.className="LayoutNetwork";function Ho(a){wi(this),this.ob=a,this.j=new un(0,0,10,10).freeze(),this.o=new Lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new $e,this.mg=new $e}Ho.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new $e,this.mg=new $e},Ho.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ui(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var z=b.value;x?x=!1:E+=",",E+=z.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Ho.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;ae(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 rr)){x=un.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(cr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),un.free(x);return}un.free(x)}a.moveTo(y.x,y.y)}},Ho.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ho.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ho.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ho.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}$n.Object.defineProperties(Ho.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=un.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),un.free(x),!(a instanceof rr)&&(a=a.locationObject.ga(cr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new pn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new pn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new pn,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 $e,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}}}),Ho.prototype.deleteDestinationEdge=Ho.prototype.Jl,Ho.prototype.addDestinationEdge=Ho.prototype.zl,Ho.prototype.deleteSourceEdge=Ho.prototype.Kl,Ho.prototype.addSourceEdge=Ho.prototype.Cl,Ho.className="LayoutVertex",Ho.standardComparer=oy,Ho.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Cl(a){wi(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Cl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Cl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Ui(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},Cl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Cl.prototype.commit=function(){},Cl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},$n.Object.defineProperties(Cl.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)}}}),Cl.prototype.getOtherVertex=Cl.prototype.Ax,Cl.className="LayoutEdge";function as(a){no.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new kn(NaN,NaN).freeze(),this.tf=new kn(10,10).freeze(),this.Jb=sm,this.Rb=nv,this.nd=lm,this.hd=c1,a&&Object.assign(this,a)}Xn(as,no),as.prototype.cloneProtected=function(a){no.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},as.prototype.qb=function(a){a.classType===as?a===lm||a===rv||a===sy||a===iv?this.sorting=a:a===nv||a===La?this.arrangement=a:a===sm||a===ev?this.alignment=a:Rt("Unknown enum value: "+a):no.prototype.qb.call(this,a)},as.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof rr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case iv:E.reverse();break;case lm:E.sort(this.comparer);break;case rv:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case ev:var nt=y,it=x,ot=un.alloc(),st=Math.max(this.cellSize.width,1);if(!isFinite(st))for(var ht=st=0;ht<E.length;ht++){var ft=this.ni(E[ht],ot);st=Math.max(st,ft.width)}if(st=Math.max(st+nt,1),ht=Math.max(this.cellSize.height,1),!isFinite(ht))for(ft=ht=0;ft<E.length;ft++){var mt=this.ni(E[ft],ot);ht=Math.max(ht,mt.height)}ht=Math.max(ht+it,1),ft=this.arrangement;for(var xt=mt=this.arrangementOrigin.x,St=this.arrangementOrigin.y,Ft=0,Ot=0,Wt=0;Wt<E.length;Wt++){var Ut=E[Wt],ne=this.ni(Ut,ot),fe=Math.ceil((ne.width+nt)/st)*st,_e=Math.ceil((ne.height+it)/ht)*ht;switch(ft){case La:var si=Math.abs(xt-ne.width);break;default:si=xt+ne.width}switch((0<z&&Ft>z-1||0<tt&&0<Ft&&si-mt>tt)&&(b.push(new un(0,St,tt+nt,Ot)),Ft=0,xt=mt,St+=Ot,Ot=0),Ot=Math.max(Ot,_e),ft){case La:ne=-ne.width;break;default:ne=0}switch(Ut.moveTo(xt+ne,St),ft){case La:xt-=fe;break;default:xt+=fe}Ft++}b.push(new un(0,St,tt+nt,Ot)),un.free(ot);break;case sm:for(it=tt,st=z,ht=y,ft=x,tt=un.alloc(),mt=Math.max(this.cellSize.width,1),z=St=ot=0,nt=Lt.alloc(),xt=0;xt<E.length;xt++)Ot=E[xt],Ft=this.ni(Ot,tt),Ot=uh(Ot,Ot.locationObject,Ot.locationSpot,nt),ot=Math.max(ot,Ot.x),St=Math.max(St,Ft.width-Ot.x),z=Math.max(z,Ot.y);switch(xt=this.arrangement,xt){case La:ot+=ht;break;default:St+=ht}mt=isFinite(mt)?Math.max(mt+ht,1):Math.max(ot+St,1);var bi=Ot=this.arrangementOrigin.x;for(Wt=this.arrangementOrigin.y,St=0,it>=ot&&(it-=ot),ot=Ut=0,fe=Math.max(this.cellSize.height,1),ne=z=0,_e=!0,Ft=Lt.alloc(),si=0;si<E.length;si++){var mi=E[si],qn=this.ni(mi,tt),Fn=uh(mi,mi.locationObject,mi.locationSpot,nt);if(0<St)switch(xt){case La:bi=(bi-Ot-(qn.width-Fn.x))/mt,bi=ge.$(Math.round(bi),bi)?Math.round(bi):Math.floor(bi),bi=bi*mt+Ot;break;default:bi=(bi-Ot+Fn.x)/mt,bi=ge.$(Math.round(bi),bi)?Math.round(bi):Math.ceil(bi),bi=bi*mt+Ot}else switch(xt){case La:Ut=bi+Fn.x+qn.width;break;default:Ut=bi-Fn.x}switch(xt){case La:var ir=-(bi+Fn.x)+Ut;break;default:ir=bi+qn.width-Fn.x-Ut}if(0<st&&St>st-1||0<it&&0<St&&ir>it){for(b.push(new un(0,_e?Wt-z:Wt,it+ht,ne+z+ft)),bi=0;bi<St&&si!==St;bi++){ir=E[si-St+bi];var Gi=uh(ir,ir.locationObject,ir.locationSpot,Ft);ir.moveTo(ir.position.x,ir.position.y+z-Gi.y)}ne+=ft,Wt=_e?Wt+ne:Wt+(ne+z),St=ne=z=0,bi=Ot,_e=!1}switch(bi===Ot&&(ot=xt===La?Math.max(ot,qn.width-Fn.x):Math.min(ot,-Fn.x)),z=Math.max(z,Fn.y),ne=Math.max(ne,qn.height-Fn.y),isFinite(fe)&&(ne=Math.max(ne,Math.max(qn.height,fe)-Fn.y)),_e?mi.moveTo(bi-Fn.x,Wt-Fn.y):mi.moveTo(bi-Fn.x,Wt),xt){case La:bi-=Fn.x+ht;break;default:bi+=qn.width-Fn.x+ht}St++}if(b.push(new un(0,Wt,it+ht,(_e?ne:ne+z)+ft)),E.length!==St)for(it=0;it<St;it++)st=E[E.length-St+it],ht=uh(st,st.locationObject,st.locationSpot,nt),st.moveTo(st.position.x,st.position.y+z-ht.y);if(Lt.free(nt),Lt.free(Ft),xt===La)for(E=0;E<b.length;E++)z=b[E],z.width+=ot,z.x-=ot;else for(E=0;E<b.length;E++)z=b[E],z.x>ot&&(z.width+=z.x-ot,z.x=ot);un.free(tt)}for(nt=z=tt=E=0;nt<b.length;nt++)it=b[nt],E=Math.min(E,it.x),tt=Math.min(tt,it.y),z=Math.max(z,it.x+it.width);this.arrangement===La?this.commitLayers(b,new Lt(E+y/2-(z+E),tt-x/2)):this.commitLayers(b,new Lt(E-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},as.prototype.commitLayers=function(){};function c1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}$n.Object.defineProperties(as.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!==sm&&a!==ev||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==nv&&a!==La||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==iv&&a!==lm&&a!==rv||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var ev=new yn(as,"Position",0),sm=new yn(as,"Location",1),nv=new yn(as,"LeftToRight",2),La=new yn(as,"RightToLeft",3),sy=new yn(as,"Forward",4),iv=new yn(as,"Reverse",5),lm=new yn(as,"Ascending",6),rv=new yn(as,"Descending",7);as.className="GridLayout",as.standardComparer=c1,as.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},as.Position=ev,as.Location=sm,as.LeftToRight=nv,as.RightToLeft=La,as.Forward=sy,as.Reverse=iv,as.Ascending=lm,as.Descending=rv;function Br(){this.On=new pn,this.Dn=new pn,this.Pa=new pn,this.cf=new ai,this.bf=new ai,this.aj=new ai,this.H=null,this.tp=!1}yt=Br.prototype,yt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},yt.Xe=function(a){this.H=a},yt.oi=function(a){if(a instanceof hi){if(this.On.add(a),a instanceof rr){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 ei?this.Dn.add(a):a instanceof Pr||this.Pa.add(a);y=a.data,y===null||a instanceof Pr||(a instanceof ei?this.bf.add(y,a):this.cf.add(y,a))},yt.pc=function(a){if(a.Ej(),a instanceof hi){if(this.On.remove(a),a instanceof rr){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 ei?this.Dn.remove(a):a instanceof Pr||this.Pa.remove(a);y=a.data,y===null||a instanceof Pr||(a instanceof ei?this.bf.remove(y):this.cf.remove(y))},yt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof rr)&&Rt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof rr||Rt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof ei||Rt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Ne(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Ne(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Ne(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);Fe(y),Fe(x),Fe(a)}},Br.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Br.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&d1(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&lf(this.diagram,!1)};function d1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=f1(a,y,b);if(E!==null&&(sa(E),E=E.copy(),E!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=z,b=E;break t}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}Br.prototype.insertLink=function(){return null},Br.prototype.resolveReferencesForData=function(){},Br.prototype.Ro=function(a){return this.H.model.Ro(a)};function f1(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(g1||(g1=!0,He('No Group template found for category "'+x+'"'),He(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,He('No Node template found for category "'+x+'"'),He(" Using default node template")),y=a.ny))),y}Br.prototype.getLinkCategoryForData=function(){return""},Br.prototype.setLinkCategoryForData=function(){},Br.prototype.setFromNodeForLink=function(){},Br.prototype.setToNodeForLink=function(){},Br.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(v1||(v1=!0,He('No Link template found for category "'+a+'"'),He(" Using default link template")),x=y.my)),x},Br.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Br.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Br.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Cp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Br.prototype.unresolveReferencesForPart=function(){},Br.prototype.removeDataForLink=function(){},Br.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Br.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof hi?a:null)},Br.prototype.findLinkForKey=function(){return null},yt=Br.prototype,yt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},yt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof hi?a:null)},yt.Kc=function(a){return a===null?null:this.bf.I(a)},yt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new pn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(ae(tt)&&ly(this,E,tt)){y.add(b);break}}}return y.iterator},yt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new pn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(ae(tt)&&ly(this,E,tt)){y.add(b);break}}}return y.iterator};function ly(a,y,x){for(var b in x){var E=y[b],z=x[b];if(ze(z)){if(!ze(E)||E.length<z.length)return!1;for(var tt=0;tt<E.length;tt++){var nt=z[tt];if(nt!==void 0&&!p1(a,E[tt],nt))return!1}}else if(!p1(a,E,z))return!1}return!0}function p1(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(ae(y)&&ae(x)){if(!ly(a,y,x))return!1}else if(y!==x)return!1;return!0}Br.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===so){if(b==="nodeCategory"){var E=this.Lc(a.object),z=a.newValue;E!==null&&typeof z=="string"&&(E.category=z)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===No){var tt=a.newValue;b==="nodeDataArray"&&ae(tt)&&d1(this,tt),y.isModified=!0}else if(x===zo){var nt=a.oldValue;b==="nodeDataArray"&&ae(nt)&&this.ip(nt),y.isModified=!0}else x===vl&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===so){var it=a.propertyName,ot=a.object;ot===y.model?(it==="nodeKeyProperty"||it==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ot,it),y.isModified=!0}else if(x===No||x===zo){var st=a.change===No,ht=st?a.newParam:a.oldParam,ft=st?a.newValue:a.oldValue,mt=this.aj.I(a.object);if(Array.isArray(mt))for(a=0;a<mt.length;a++){var xt=mt[a];if(st)bg(xt,ft,ht,!0);else if(!(0>ht)){var St=ht+Zp(xt);xt.pc(St,!0),C0(xt,St,ht)}}y.isModified=!0}}finally{y.aa=!0}}}}},Br.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)},Br.prototype.rp=function(){for(var a=this.H.model,y=new pn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),E.forEach(function(tt){P1(a,tt,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&M1(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()},Br.prototype.refreshDataBoundLinks=function(){},Br.prototype.updateRelationshipsFromData=function(){},Br.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,z=0;z<E.length;z++){var tt=E[z].sx(a);tt!==null&&(x===null&&(x=Ne()),x.push(tt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Fe(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ay(a,y){var x=y.Hh;if(ze(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){Fc(y,function(tt){tt=tt.O.s;for(var nt=tt.length,it=0;it<nt;it++)Pp(x,tt[it])});var b=y.Hh;if(ze(b)){var E=a.aj.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&a.aj.remove(b);break}}}}Br.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new ai;if(ze(a))for(var E=0;E<a.length;E++)ov(this,a[E],y,b,x);else for(a=a.iterator;a.next();)ov(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new pn;for(var z=new ai,tt=b.iterator;tt.next();){var nt=tt.value;if(nt instanceof ei)a||nt.fromNode!==null&&nt.toNode!==null||E.add(nt);else if(nt instanceof hi&&nt.data!==null&&x.Tl()){var it=nt;nt=tt.key;var ot=nt.pg();ot!==null&&(ot=b.I(ot),ot!==null?(x.qe(it.data,x.wa(ot.data)),it=y.Kc(it.data),nt=nt.kh(),nt!==null&&it!==null&&z.add(nt,it)):x.qe(it.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<z.count)for(x=z.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var st=new ai;b.each(function(ht){ht.key.data!==null&&st.add(ht.key.data,ht.value.data)}),x(st,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function ov(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Ai))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof hi){for(var tt=y.linksConnected;tt.next();){var nt=tt.value;if(nt.fromNode===y){var it=b.I(nt);it!==null&&(it.fromNode=z)}nt.toNode===y&&(nt=b.I(nt),nt!==null&&(nt.toNode=z))}if(y instanceof rr&&z instanceof rr)for(y=y.memberParts;y.next();)tt=ov(a,y.value,x,b,E),tt instanceof ei||tt===null||(tt.containingGroup=z)}else if(y instanceof ei&&z instanceof ei)for(tt=y.fromNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=ov(a,y.value,x,b,E),tt!==null&&tt instanceof hi&&(tt.labeledLink=z);return z}Br.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof ei||(b=E.copyNodeData(b),ae(b)&&(E.xf(b),x=y.Lc(b)))}else sa(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof ei||(E=y.copyNodeData(b)),ae(E)&&(x.data=E)));return x},$n.Object.defineProperties(Br.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}}}),Br.prototype.updateAllRelationshipsFromData=Br.prototype.rp,Br.prototype.findLinksByExample=Br.prototype.ls,Br.prototype.findNodesByExample=Br.prototype.ms,Br.prototype.findLinkForData=Br.prototype.Kc,Br.prototype.findNodeForData=Br.prototype.ii,Br.prototype.findPartForData=Br.prototype.Lc,Br.prototype.findNodeForKey=Br.prototype.Vb,Br.prototype.removeModeledPart=Br.prototype.ip,Br.prototype.removeModeledParts=Br.prototype.Gs,Br.prototype.rebuildParts=Br.prototype.Wd;var m1=!1,g1=!1,v1=!1;Br.className="PartManager";function Xo(a){Br.apply(this,arguments)}Xn(Xo,Br),Xo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),y1(this,a.linkDataArray)},Xo.prototype.addModeledParts=function(a){for(Br.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Tf(a.value);lf(this.diagram,!1)};function y1(a,y){y.forEach(function(x){x1(a,x)}),lf(a.diagram,!1)}function x1(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){sa(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var z=uv(x,y,!0);z!==""&&(E.fromPortId=z),z=Bl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof hi&&(E.fromNode=z)),z=uv(x,y,!1),z!==""&&(E.toPortId=z),z=Bl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof hi&&(E.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}Xo.prototype.removeAllModeledParts=function(){var a=this.diagram.model;w1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function w1(a,y){y.forEach(function(x){a.ip(x)})}Xo.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Xo.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Xo.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Xo.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Xo.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Xo.prototype.findPartForKey=function(a){var y=Br.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Xo.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Xo.prototype.doModelChanged=function(a){var y=this;if(Br.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===so){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(E==="linkToKey"){var nt=this.Kc(a.object);if(nt!==null){var it=this.Vb(a.newValue);nt.toNode=it}}else if(E==="linkFromPortId"){var ot=this.Kc(a.object);if(ot!==null){var st=a.newValue;typeof st=="string"&&(ot.fromPortId=st)}}else if(E==="linkToPortId"){var ht=this.Kc(a.object);if(ht!==null){var ft=a.newValue;typeof ft=="string"&&(ht.toPortId=ft)}}else if(E==="nodeGroupKey"){var mt=this.Lc(a.object);if(mt!==null){var xt=a.newValue;if(xt!==void 0){var St=this.Vb(xt);St instanceof rr?mt.containingGroup=St:mt.containingGroup=null}else mt.containingGroup=null}}else if(E==="linkLabelKeys"){var Ft=this.Kc(a.object);if(Ft!==null){var Ot=a.oldValue,Wt=a.newValue;Array.isArray(Ot)&&Ot.forEach(function(Fn){0<=Wt.indexOf(Fn)||(Fn=y.Vb(Fn),Fn!==null&&(Fn.labeledLink=null))}),Array.isArray(Wt)&&Wt.forEach(function(Fn){Fn=y.Vb(Fn),Fn!==null&&(Fn.labeledLink=Ft)})}}else if(E==="linkCategory"){var Ut=this.Kc(a.object),ne=a.newValue;Ut!==null&&typeof ne=="string"&&(Ut.category=ne)}else E==="linkDataArray"&&(w1(this,a.oldValue),y1(this,a.newValue));x.isModified=!0}else if(b===No){var fe=a.newValue;if(E==="linkDataArray"&&typeof fe=="object"&&fe!==null)x1(this,fe);else if(E==="linkLabelKeys"&&Jh(fe)){var _e=this.Kc(a.object),si=this.Vb(fe);_e!==null&&si!==null&&(si.labeledLink=_e)}x.isModified=!0}else if(b===zo){var bi=a.oldValue;if(E==="linkDataArray"&&typeof bi=="object"&&bi!==null)this.ip(bi);else if(E==="linkLabelKeys"&&Jh(bi)){var mi=this.Vb(bi);mi!==null&&(mi.labeledLink=null)}x.isModified=!0}}else if(b===so){var qn=a.propertyName;a.object!==x.model||qn!=="linkFromKeyProperty"&&qn!=="linkToKeyProperty"&&qn!=="linkFromPortIdProperty"&&qn!=="linkToPortIdProperty"&&qn!=="linkLabelKeysProperty"&&qn!=="nodeIsGroupProperty"&&qn!=="nodeGroupKeyProperty"&&qn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Xo.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new pn,b=y.linkDataArray;b.forEach(function(z){x.add(z)});var E=[];this.links.each(function(z){z.data===null||x.contains(z.data)||E.push(z.data)}),E.forEach(function(z){D1(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&L1(y,z,!1)})},Xo.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof ei){var E=Bl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Bl(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var z=a.labelNodes.first();if(b.wa(z.data)===E)return}E=new pn().addAll(y);var tt=new pn;a.labelNodes.each(function(nt){nt.data!==null&&(nt=b.wa(nt.data),nt!==void 0&&tt.add(nt))}),y=tt.copy(),y.hp(E),E=E.copy(),E.hp(tt),(0<y.count||0<E.count)&&(y.each(function(nt){nt=x.Vb(nt),nt!==null&&nt.labeledLink===a&&(nt.labeledLink=null)}),E.each(function(nt){nt=x.Vb(nt),nt!==null&&nt.labeledLink!==a&&(nt.labeledLink=a)}))}}else!(a instanceof Pr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof rr)&&(a.containingGroup=y)}}},Xo.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=am(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var tt=b.value;y.lb(tt)?E instanceof rr&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=E)):(z.link=this.Kc(tt),z.link!==null&&E instanceof hi&&(Bl(y,tt,!0)===x&&(z.link.fromNode=E),Bl(y,tt,!1)===x&&(z.link.toNode=E),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(nt){return function(it){return it===x?(E.labeledLink=nt.link,!0):!1}}(z)))),z={link:z.link}}Ia(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof rr&&(E.containingGroup=a))}},Xo.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof hi){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Da(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Da(y,x,b.data)),a instanceof rr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Da(y,x,b)}}},Xo.prototype.copyPartData=function(a,y){var x=Br.prototype.copyPartData.call(this,a,y);if(a instanceof ei)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Xo.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,tt=E.toolManager.findTool("Linking"),nt="";if(a!==null&&(y===null&&(y=a),nt=y.portId,nt===null&&(nt="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=tt.archetypeLinkData,b instanceof ei){if(sa(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=nt,z.toNode=x,z.toPortId=y,E.add(z),a=tt.archetypeLabelNodeData,a instanceof hi&&(sa(a),a=a.copy(),a!==null&&(a.labeledLink=z,E.add(a))),z}else if(b!==null&&(b=z.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Af(z,b,z.wa(a.data),!0),Ff(z,b,nt,!0),x!==null&&Af(z,b,z.wa(x.data),!1),Ff(z,b,y,!1),z.fi(b),a=tt.archetypeLabelNodeData,a===null||a instanceof hi||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(b,a))),E.Kc(b);return null},Xo.prototype.findLinkForKey=Xo.prototype.findLinkForKey,Xo.prototype.findPartForKey=Xo.prototype.findPartForKey,Xo.prototype.removeAllModeledParts=Xo.prototype.removeAllModeledParts,Xo.prototype.addModeledParts=Xo.prototype.addModeledParts,Xo.prototype.addAllModeledParts=Xo.prototype.addAllModeledParts,Xo.className="GraphLinksPartManager";function Ul(){Br.apply(this,arguments),this.Sg=null}Xn(Ul,Br);function sv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,z=x;if(a.diagram.isTreePathToChildren||(E=x,z=y),(b===null||!Fs(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(sa(b),b=b.copy(),b!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=z,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}Ul.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Ul.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Ul.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},Ul.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},Ul.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Ul.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Ul.prototype.doModelChanged=function(a){if(Br.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===so){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),tt=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(tt!==null){var nt=tt.kh();nt!==null?z===null?y.remove(nt):y.isTreePathToChildren?nt.fromNode=z:nt.toNode=z:sv(this,z,tt)}}else if(b==="parentLinkCategory"){var it=this.ii(a.object),ot=a.newValue;if(it!==null&&typeof ot=="string"){var st=it.kh();st!==null&&(st.category=ot)}}y.isModified=!0}}else if(x===so){var ht=a.propertyName;a.object===y.model&&ht==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Ul.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof hi&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:sv(this,y,a):b!==null&&Cp(x,b,!1)))}}},Ul.prototype.updateDataBindings=function(a,y){Br.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Ul.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=am(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var z=b.value;y.lb(z)&&E instanceof hi&&y.mh(z)===x&&sv(this,E,this.ii(z))}Ia(y,x)}a=y.mh(a),a!==void 0&&E instanceof hi&&(a=this.Vb(a),sv(this,a,E))}},Ul.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof hi){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var z=E.pc(-1,b,!1);0<=z&&this.diagram.cb(zo,"parts",E,b,null,z,null),z=b.layerChanged,z!==null&&z(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Da(y,x,E)}},Ul.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},Ul.prototype.findLinkForKey=Ul.prototype.findLinkForKey,Ul.className="TreePartManager";function ki(a,y){this.kl=new pn,this.il=new pn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,wi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ai,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new ai,this.Lt=new $e,this.Wg=!1,this.o=null,this.undoManager=new fo,a!==void 0&&(ze(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ki.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},ki.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ki.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ki.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Je(E)}}return y},ki.prototype.xA=function(a){a.change!==vl&&Rt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Yo?(S1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ki.prototype.Qv=function(a,y){var x=this,b=!1,E=new pn,z=new pn,tt=new pn,nt=this.vh;a.changes.each(function(ht){ht.model===x&&(ht.modelChange==="nodeDataArray"?ht.change===No?E.add(ht.newValue):ht.change===zo&&tt.add(ht.oldValue):x.lb(ht.object)?z.add(ht.object):ht.change!==so||x.modelData!==ht.object&&ht.propertyName!=="modelData"?ht.object!==null&&(nt&&nt.contains(ht.object)?nt.get(ht.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ht.object instanceof ki||x.ri()&&x.Jc(ht.object)||b1(x,ht.object).each(function(ft){z.add(ft)})):b=!0)});var it=this.il;it.clear(),E.each(function(ht){it.add(x.wa(ht)),y||z.add(ht)});var ot=this.kl;ot.clear(),tt.each(function(ht){ot.add(x.wa(ht)),y&&z.add(ht)}),a=x.cloneDeep(z.Fa());var st=null;return b&&(st===null&&(st={}),st.modelData=this.cloneDeep(this.modelData)),0<it.count&&(st===null&&(st={}),y?st.removedNodeKeys=it.Fa():st.insertedNodeKeys=it.Fa()),0<a.length&&(st===null&&(st={}),st.modifiedNodeData=a),0<ot.count&&(st===null&&(st={}),y?st.insertedNodeKeys=ot.Fa():st.removedNodeKeys=ot.Fa()),ot.clear(),it.clear(),st},ki.prototype.cloneDeep=function(a){return If(this,a,!0)};function If(a,y,x,b,E,z){function tt(ht,ft){nt?(ht.__gohashid===void 0&&z.push(ht),b.set(ht,ft)):(ht=Vi++,b.set(ht,ft),E.set(ht,y))}if(!ae(y))return y;z||(z=[]);var nt=Object.isExtensible(y);if(b||(b=new ai),nt){var it=b.get(y);if(it)return it}else for(E||(E=new ai),it=E.iterator;it.next();){var ot=it.key;if(it.value===y&&(ot=b.get(ot)))return ot}if(Array.isArray(y)){it=[],tt(y,it);for(var st=0;st<y.length;st++)it.push(If(a,y[st],!1,b,E,z))}else if(y instanceof Lt||y instanceof kn||y instanceof un||y instanceof Xi||y instanceof Fi)it=y.copy(),tt(y,it);else{if(y instanceof Fr||y instanceof ti||y instanceof yn)return y;if(y instanceof $e)it=new $e().addAll(If(a,y.Fa(),!1,b,E,z)),tt(y,it);else if(y instanceof pn)it=new pn().addAll(If(a,y.Fa(),!1,b,E,z)),tt(y,it);else if(y instanceof ai)it=new ai().addAll(If(a,y.Fa(),!1,b,E,z)),tt(y,it);else if(y instanceof Date)it=new Date(y.getTime()),tt(y,it);else if(y instanceof RegExp)it=new RegExp(y),tt(y,it),it.lastIndex=y.lastIndex;else if(typeof y.copy=="function")it=y.copy(),tt(y,it);else for(st in it={},tt(y,it),y)st!=="__gohashid"&&(it[st]=If(a,y[st],!1,b,E,z))}return x&&z.forEach(function(ht){delete ht.__gohashid}),it}yt=ki.prototype,yt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},yt.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},yt.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 C1(a,y){y=y.modelData,ae(y)&&(a.dm(y),a.modelData=y)}yt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!E1(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+hy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+Xh(this,this.nodeDataArray,!0)},yt.kv=function(a){C1(this,a),a=a.nodeDataArray,ze(a)&&(this.dm(a),this.nodeDataArray=a)};function S1(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var tt=b.get(E);tt===null?(tt=new pn,tt.add(z),b.add(E,tt)):tt.add(z)}}var b=a.vh;b===null&&(b=new ai,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===so?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===No||z===zo)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function b1(a,y){for(var x=new pn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];lv(a,y,E,E,x)}return x}function lv(a,y,x,b,E){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return E.add(b),!0;if(lv(a,y,tt,b,E))return!0}else if(ae(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return E.add(b),!0;if(lv(a,y,tt,b,E))return!0}return!1}yt.Pv=function(a,y){var x=this,b=!1,E=new pn,z=new pn,tt=new pn,nt=this.vh;a.changes.each(function(st){st.model===x&&(st.modelChange==="nodeDataArray"?st.change===No?E.add(st.newValue):st.change===zo&&tt.add(st.oldValue):x.lb(st.object)?z.add(st.object):st.change!==so||x.modelData!==st.object&&st.propertyName!=="modelData"?st.object!==null&&(nt&&nt.contains(st.object)?nt.get(st.object).each(function(ht){x.lb(ht)&&z.add(ht)}):st.object instanceof ki||x.ri()&&x.Jc(st.object)||b1(x,st.object).each(function(ht){z.add(ht)})):b=!0)});var it=this.il;it.clear(),E.each(function(st){it.add(x.wa(st)),y||z.add(st)});var ot=this.kl;return ot.clear(),tt.each(function(st){ot.add(x.wa(st)),y&&z.add(st)}),a="",b&&(a+=`,
|
|
|
"modelData": `+hy(this,this.modelData)),0<it.count&&(a+=(y?this.Yv:this.Wv)+Xh(this,it.Fa(),!0)),0<z.count&&(a+=this.jy+Xh(this,z.Fa(),!0)),0<ot.count&&(a+=(y?this.Wv:this.Yv)+Xh(this,ot.Fa(),!0)),ot.clear(),it.clear(),a},yt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Rt("applyIncrementalJson cannot change Model properties"),C1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new ai;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],tt=this.wa(z);tt!=null&&b.set(tt,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){tt=y[z];var nt=this.hc(tt);nt===null&&(nt=(nt=b.get(tt))?nt:this.copyNodeData({}),this.km(nt,tt),this.xf(nt))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],z=this.wa(E),z=this.hc(z),z!==null){for(var it in E)it==="__gohashid"||it===this.nodeKeyProperty||this.Wj()&&it===this.nodeIsGroupProperty||this.setDataProperty(z,it,E[it]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,it=0;it<x;it++)y=this.hc(a[it]),y!==null&&this.cm(y)},yt.$x=function(a,y){a.change!==vl&&Rt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Yo?(y===void 0&&(y=um(this,this)),S1(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 }'},yt.yA=function(a,y){return this.$x(a,y)},yt.np=function(a){return a===void 0&&(a=um(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},yt.toJSON=function(a){return this.np(a)},yt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Jn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Rt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Rt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},yt.Ky=function(a){return this.Zw(a)},ki.constructGraphLinksModel=function(){return new ki},yt=ki.prototype,yt.dm=function(a){if(ze(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(ae(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Rt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(ae(a)){for(y in a)if(x=a[y],ae(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new $e,b=0;b<x.length/2;b++)E.add(new Lt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Rw(a)}return a},yt.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()):ze(a)?Xh(this,a):ae(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function Xh(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new Ri;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var tt=y[z];tt!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(tt)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function E1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Ks(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Lt)y={class:"go.Point",x:Ks(x.x),y:Ks(x.y)};else if(x instanceof kn)y={class:"go.Size",width:Ks(x.width),height:Ks(x.height)};else if(x instanceof un)y={class:"go.Rect",x:Ks(x.x),y:Ks(x.y),width:Ks(x.width),height:Ks(x.height)};else if(x instanceof Xi)y={class:"go.Margin",top:Ks(x.top),right:Ks(x.right),bottom:Ks(x.bottom),left:Ks(x.left)};else if(x instanceof Fi)x.sb()?y={class:"go.Spot",x:Ks(x.x),y:Ks(x.y),offsetX:Ks(x.offsetX),offsetY:Ks(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Fr){if(y={class:"go.Brush",type:x.type.name},x.type===sh?y.color=x.color:(x.type===Lu||x.type===_l)&&(y.start=x.start,y.end=x.end,x.type===_l&&(x.startRadius!==0&&(y.startRadius=Ks(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ks(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof ti?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ks(x.startX)),x.startY!==0&&(y.startY=Ks(x.startY)),x.endX!==0&&(y.endX=Ks(x.endX)),x.endY!==0&&(y.endY=Ks(x.endY)),x.spot1.D(gr)||(y.spot1=x.spot1),x.spot2.D(Eo)||(y.spot2=x.spot2),x.type===ti.o&&(y.path=ti.ia(x))):x instanceof yn&&(y={class:"go.EnumValue",classType:um(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=Mo(y,E);if(!E1(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof $e){var tt="[";for(z=z.iterator;z.next();){var nt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(nt.x),tt+=",",tt+=a.sm(nt.y)}tt+="]",b+=tt}else b+=a.sm(z)}return b+"}"}function _s(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Rw(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 Lt(_s(a.x),_s(a.y));else if(y==="Size")x=new kn(_s(a.width),_s(a.height));else if(y==="Rect")x=new un(_s(a.x),_s(a.y),_s(a.width),_s(a.height));else if(y==="Margin")x=new Xi(_s(a.top),_s(a.right),_s(a.bottom),_s(a.left));else if(y==="Spot")typeof a.enum=="string"?x=co(a.enum):x=new Fi(_s(a.x),_s(a.y),_s(a.offsetX),_s(a.offsetY));else if(y==="Brush"){if(x=new Fr,x.type=zi(Fr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Fi&&(x.start=a.start),a.end instanceof Fi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=_s(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=_s(a.endRadius)),a=a.colorStops,ae(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=ti.parse(a.path):x=new ti,x.type=zi(ti,a.type),typeof a.startX=="number"&&(x.startX=_s(a.startX)),typeof a.startY=="number"&&(x.startY=_s(a.startY)),typeof a.endX=="number"&&(x.endX=_s(a.endX)),typeof a.endY=="number"&&(x.endY=_s(a.endY)),a.spot1 instanceof Fi&&(x.spot1=a.spot1),a.spot2 instanceof Fi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=zi(b,a.name)));return x}yt.Pe=function(a){return this.Lt.add(a),this},yt.ik=function(a){this.Lt.remove(a)},yt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},yt.cb=function(a,y,x,b,E,z,tt){jo(this,"",a,y,x,b,E,z,tt)},yt.g=function(a,y,x,b,E){jo(this,"",so,a,this,y,x,b,E)},yt.Fs=function(a,y,x,b,E,z){jo(this,"",so,y,a,x,b,E,z)};function jo(a,y,x,b,E,z,tt,nt,it){nt===void 0&&(nt=null),it===void 0&&(it=null);var ot=new ao;ot.model=a,ot.change=x,ot.modelChange=y,ot.propertyName=b,ot.object=E,ot.oldValue=z,ot.oldParam=nt,ot.newValue=tt,ot.newParam=it,a.ds(ot)}ki.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===so){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),eo(x,b,E)}else a.change===No?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,ae(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&cn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&nn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!ze(b)&&a.propertyName&&(b=Mo(a.object,a.propertyName)),ze(b)&&typeof x=="number"&&(a=a.newValue,y?cn(b,x):nn(b,x,a))):Rt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===zo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,ae(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&nn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&cn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!ze(b)&&a.propertyName&&(b=Mo(a.object,a.propertyName)),ze(b)&&typeof x=="number"&&(a=a.oldValue,y?nn(b,x,a):cn(b,x))):Rt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==vl&&Rt("unknown ChangedEvent: "+a.toString())},ki.prototype.Ea=function(a){return this.undoManager.Ea(a)},ki.prototype.eb=function(a){return this.undoManager.eb(a)},ki.prototype.Kf=function(){return this.undoManager.Kf()},ki.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},yt=ki.prototype,yt.La=function(a,y){y===void 0&&(y=""),jo(this,"SourceChanged",vl,y,a,null,null)},yt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Mo(a,y),y!==void 0)){if(Jh(y))return y;Rt("Key value for node data "+a+" is not a number or a string: "+y)}}},yt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Mo(a,x);b!==y&&this.hc(y)===null&&(eo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),jo(this,"nodeKey",so,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else eo(a,x,y)}};function Jh(a){return typeof a=="number"||typeof a=="string"}yt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},yt.hc=function(a){return a===null&&Rt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Jh(a)?this.kb.I(a):null},yt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){eo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;eo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;eo(a,y,x)}}}}},yt.xf=function(a){a!==null&&(Wi(a),this.lb(a)||M1(this,a,!0))};function M1(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Rt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,nn(a.Tc,b,y)),jo(a,"nodeDataArray",No,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}yt.Fy=function(a){if(ze(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)},yt.cm=function(a){a!==null&&P1(this,a,!0)};function P1(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){t:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break t}b=-1}if(0>b)return;cn(a.Tc,b)}jo(a,"nodeDataArray",zo,"nodeDataArray",a,y,null,b,null),a.qp(y)}yt.nA=function(a){if(ze(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)},yt.$z=function(a){if(a!==this.nodeDataArray&&ze(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var z=a[E],tt=this.wa(z);if(tt!==void 0){x.add(tt);var nt=this.hc(tt);nt!==z&&(nt!==null?(this.Do(nt,z),this.lm(z,nt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},yt.jp=function(a,y){y!==void 0&&(a=am(this,a),a instanceof pn&&this.Vf.add(y,a))},yt.Lv=function(){},yt.fm=function(){},yt.em=function(){},yt.qp=function(){};function Da(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new pn,a.Vf.add(y,b)),b.add(x)}}function Ia(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof pn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function am(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof pn?a:null)}yt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ki.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):av(this,a,!0),ae(a)&&wi(a),a};function av(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=av(a,y[x],a.copiesArrayObjects);b.push(E)}return wi(b),b}if(x&&ae(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var z=Mo(y,b),tt=um(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof ki||z instanceof fo||z instanceof Yo||z instanceof ao||(z=av(a,z,!1)),eo(x,b,z)}return wi(x),x}return y instanceof Lt||y instanceof kn||y instanceof un||y instanceof Fi||y instanceof Xi?y.copy():y}ki.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!N1&&a instanceof pe&&(N1=!0,He('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),He(" Is that really your intent?"));var b=Mo(a,y);b!==x&&(eo(a,y,x),this.Fs(a,y,b,x))},yt=ki.prototype,yt.set=function(a,y,x){this.setDataProperty(a,y,x)},yt.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},yt.Ay=function(a,y){this.ts(a,-1,y)},yt.ts=function(a,y,x){0>y&&(y=a.length),nn(a,y,x),jo(this,"",No,"",a,null,x,null,y)},yt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Rt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];cn(a,y),jo(this,"",zo,"",a,x,null,y,null)},yt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Mo(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForNodeData found a non-string category for "+a+": "+y)},yt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Mo(a,x);b===void 0&&(b=""),b!==y&&(eo(a,x,y),jo(this,"nodeCategory",so,x,a,b,y))}else eo(a,x,y)}},yt.lm=function(a,y){this.jm(y,this.Ro(a))},yt.Tl=function(){return!1},yt.Wj=function(){return!1},yt.ri=function(){return!1},yt.xs=function(){return!1},yt.Xj=function(){return!1};function cy(){return new ki}function um(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 um(a,y.constructor);return typeof y}function dy(a){return Sa[a]?Sa[a]:Jn.go!==void 0&&Jn.go[a]?Jn.go[a]:null}function Mo(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function eo(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}$n.Object.defineProperties(ki.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Rt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Rt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];ae(E)||Rt("Model.nodeDataArray must only contain Objects, not: "+E),Wi(E)}for(this.Tc=a,b=new $e,E=0;E<x;E++){var z=a[E],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?b.add(z):this.kb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),z=this.wa(E),z!==void 0&&this.kb.add(z,E);for(jo(this,"nodeDataArray",so,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),ki.prototype.setCategoryForNodeData=ki.prototype.jm,ki.prototype.getCategoryForNodeData=ki.prototype.Ro,ki.prototype.removeArrayItem=ki.prototype.ov,ki.prototype.insertArrayItem=ki.prototype.ts,ki.prototype.addArrayItem=ki.prototype.Ay,ki.prototype.assignAllDataProperties=ki.prototype.Do,ki.prototype.set=ki.prototype.set,ki.prototype.clearUnresolvedReferences=ki.prototype.Qy,ki.prototype.mergeNodeDataArray=ki.prototype.$z,ki.prototype.removeNodeDataCollection=ki.prototype.nA,ki.prototype.removeNodeData=ki.prototype.cm,ki.prototype.addNodeDataCollection=ki.prototype.Fy,ki.prototype.addNodeData=ki.prototype.xf,ki.prototype.makeNodeDataKeyUnique=ki.prototype.$u,ki.prototype.findNodeDataForKey=ki.prototype.hc,ki.prototype.containsNodeData=ki.prototype.lb,ki.prototype.setKeyForNodeData=ki.prototype.km,ki.prototype.getKeyForNodeData=ki.prototype.wa,ki.prototype.updateTargetBindings=ki.prototype.La,ki.prototype.commit=ki.prototype.commit,ki.prototype.rollbackTransaction=ki.prototype.Kf,ki.prototype.commitTransaction=ki.prototype.eb,ki.prototype.startTransaction=ki.prototype.Ea,ki.prototype.raiseDataChanged=ki.prototype.Fs,ki.prototype.raiseChanged=ki.prototype.g,ki.prototype.raiseChangedEvent=ki.prototype.cb,ki.prototype.removeChangedListener=ki.prototype.ik,ki.prototype.addChangedListener=ki.prototype.Pe,ki.prototype.writeJsonValue=ki.prototype.sm,ki.prototype.replaceJsonObjects=ki.prototype.dm,ki.prototype.applyIncrementalJSON=ki.prototype.Ky,ki.prototype.applyIncrementalJson=ki.prototype.Zw,ki.prototype.toJSON=ki.prototype.toJSON,ki.prototype.toJson=ki.prototype.np,ki.prototype.toIncrementalJSON=ki.prototype.yA,ki.prototype.toIncrementalJson=ki.prototype.$x,ki.prototype.toIncrementalData=ki.prototype.xA,ki.prototype.clear=ki.prototype.clear;var N1=!1,Sa={};ki.className="Model",ki.fromJSON=ki.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Jn.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Rt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=dy(b)):(E=dy(b),E===null&&(E=Jn[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof ki?y=a:Rt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ki.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ki.safePropertyValue=Mo,ki.safePropertySet=eo,Sa.Brush=Fr,Sa.ChangedEvent=ao,Sa.Geometry=ti,Sa.Margin=Xi,Sa.Panel=Un,Sa.Point=Lt,Sa.Rect=un,Sa.Size=kn,Sa.Spot=Fi,Sa.Transaction=Yo,Sa.UndoManager=fo;function Oo(a,y,x,b){wi(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=k1,this.wk=null):(this.el=hm,this.wk=b),this.st=new pn}Oo.prototype.copy=function(){var a=new Oo;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},yt=Oo.prototype,yt.qb=function(a){a.classType===Oo&&(this.mode=a)},yt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},yt.freeze=function(){return this._isFrozen=!0,this},yt.ka=function(){return this._isFrozen=!1,this},yt.Kx=function(a){return a===void 0&&(a=null),this.mode=hm,this.backConverter=a,this},yt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},yt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function T1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}yt.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")He("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=Mo(y,b)),z!==void 0)if(E===null)x!==""&&eo(a,x,z);else try{if(x!==""){var tt=E(z,a);eo(a,x,tt)}else E(z,a)}catch(nt){}}}},yt.sp=function(a,y,x,b){if(this.el===hm){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,tt=a;if(E!==""&&(tt=Mo(a,E)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var nt=b!==null?b.diagram:null,it=nt!==null?nt.model:null;if(z===null){if(x!=="")it!==null?it.setDataProperty(y,x,tt):eo(y,x,tt);else if(it!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ot=b.itemIndex,st=b.panel.itemArray;it.ov(st,ot),it.ts(st,ot,tt)}}else try{if(x!==""){var ht=z(tt,y,it);it!==null?it.setDataProperty(y,x,ht):eo(y,x,ht)}else{var ft=z(tt,y,it);if(ft!==void 0&&it!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var mt=b.itemIndex,xt=b.panel.itemArray;it.ov(xt,mt),it.ts(xt,mt,ft)}}}catch(St){}}finally{this.st.remove(a)}}}},$n.Object.defineProperties(Oo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Pe(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Pe(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Pe(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Pe(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Pe(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Pe(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Pe(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Pe(this),this.el=a}}}),Oo.prototype.updateSource=Oo.prototype.sp,Oo.prototype.updateTarget=Oo.prototype.Mv,Oo.prototype.ofModel=Oo.prototype.dA,Oo.prototype.ofObject=Oo.prototype.cp,Oo.prototype.makeTwoWay=Oo.prototype.Kx;var jw="Binding",k1=new yn(Oo,"OneWay",1),hm=new yn(Oo,"TwoWay",2);Oo.className="Binding",Oo.parseEnum=function(a,y){return function(x){return x=zi(a,x),x===null?y:x}},Oo.toString=Je,Oo.OneWay=k1,Oo.TwoWay=hm;function yr(a,y,x){ki.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new pn,this.wb=new ai,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(ze(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Xn(yr,ki),yr.constructGraphLinksModel=ki.constructGraphLinksModel,yr.prototype.cloneProtected=function(a){ki.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},yt=yr.prototype,yt.clear=function(){ki.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},yt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Je(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Bl(this,E,!0)+"-->"+Bl(this,E,!1)}return y},yt.Qv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ki.prototype.Qv.call(this,a,y),b=this,E=new pn,z=new pn,tt=new pn,nt=this.vh;a.changes.each(function(st){st.model===b&&(st.modelChange==="linkDataArray"?st.change===No?E.add(st.newValue):st.change===zo&&tt.add(st.oldValue):b.Jc(st.object)?z.add(st.object):st.object!==null&&(st.object!==null&&nt&&nt.contains(st.object)?nt.get(st.object).each(function(ht){b.Jc(ht)&&z.add(ht)}):st.object instanceof ki||b.lb(st.object)||O1(b,st.object).each(function(ht){z.add(ht)})))});var it=this.il;it.clear(),E.each(function(st){it.add(b.Ac(st)),y||z.add(st)});var ot=this.kl;return ot.clear(),tt.each(function(st){ot.add(b.Ac(st)),y&&z.add(st)}),a=b.cloneDeep(z.Fa()),0<it.count&&(x===null&&(x={}),y?x.removedLinkKeys=it.Fa():x.insertedLinkKeys=it.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ot.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ot.Fa():x.removedLinkKeys=ot.Fa()),ot.clear(),it.clear(),x},yt.rm=function(){var a=ki.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},yt.gp=function(a){ki.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)},yt.Rv=function(){var a=ki.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+Xh(this,this.linkDataArray,!0);return a+y},yt.kv=function(a){ki.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function O1(a,y){for(var x=new pn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}yt.Pv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ki.prototype.Pv.call(this,a,y),b=this,E=new pn,z=new pn,tt=new pn,nt=this.vh;a.changes.each(function(st){st.model===b&&(st.modelChange==="linkDataArray"?st.change===No?E.add(st.newValue):st.change===zo&&tt.add(st.oldValue):b.Jc(st.object)?z.add(st.object):st.object!==null&&(st.object!==null&&nt&&nt.contains(st.object)?nt.get(st.object).each(function(ht){b.Jc(ht)&&z.add(ht)}):st.object instanceof ki||b.lb(st.object)||O1(b,st.object).each(function(ht){z.add(ht)})))});var it=this.il;it.clear(),E.each(function(st){it.add(b.Ac(st)),y||z.add(st)});var ot=this.kl;return ot.clear(),tt.each(function(st){ot.add(b.Ac(st)),y&&z.add(st)}),a=x,0<it.count&&(a+=(y?this.Xv:this.Vv)+Xh(this,it.Fa(),!0)),0<z.count&&(a+=this.iy+Xh(this,z.Fa(),!0)),0<ot.count&&(a+=(y?this.Vv:this.Xv)+Xh(this,ot.Fa(),!0)),ot.clear(),it.clear(),a},yt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Rt("applyIncrementalJson cannot change Model properties"),ki.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],z=this.jh(E);z===null&&(z=this.Jo({}),this.Ks(z,E),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],z=this.Ac(E),z=this.jh(z),z!==null){for(var tt in E)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,E[tt]);I1(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},yr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===so){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),eo(x,b,E);return}}else if(a.change===No){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,ae(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===zo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,ae(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}ki.prototype.changeState.call(this,a,y)}},yt=yr.prototype,yt.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),eo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},yt.yx=function(a){return Bl(this,a,!0)},yt.wv=function(a,y){Af(this,a,y,!0)},yt.Bx=function(a){return Bl(this,a,!1)},yt.Bv=function(a,y){Af(this,a,y,!1)};function Bl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Mo(y,a),a!==void 0))){if(Jh(a))return a;Rt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Af(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var z=Mo(y,E);z!==x&&(Ia(a,z,y),eo(y,E,x),a.hc(x)===null&&Da(a,x,y),jo(a,b?"linkFromKey":"linkToKey",so,E,y,z,x),typeof E=="string"&&a.La(y,E))}else eo(y,E,x)}}yt.zx=function(a){return uv(this,a,!0)},yt.xv=function(a,y){Ff(this,a,y,!0)},yt.Cx=function(a){return uv(this,a,!1)},yt.Cv=function(a,y){Ff(this,a,y,!1)};function uv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Mo(y,a),y===void 0?"":y)}function Ff(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=Mo(y,E);z===void 0&&(z=""),z!==x&&(eo(y,E,x),jo(a,b?"linkFromPortId":"linkToPortId",so,E,y,z,x),typeof E=="string"&&a.La(y,E))}else eo(y,E,x)}}yt.Ef=function(a){if(a===null)return hv;var y=this.je;return y===""?hv:(a=Mo(a,y),a===void 0?hv:a)},yt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Mo(a,x);if(b===void 0&&(b=hv),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)Ia(this,b[z],a);for(eo(a,x,y),E=y.length,z=0;z<E;z++){var tt=y[z];this.hc(tt)===null&&Da(this,tt,a)}jo(this,"linkLabelKeys",so,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else eo(a,x,y)}},yt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Mo(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Da(this,y,a),jo(this,"linkLabelKeys",No,x,a,null,y,null,E)))}else Rt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},yt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Mo(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Ia(this,y,a),jo(this,"linkLabelKeys",zo,x,a,y,null,E,null)))}else b!==void 0&&Rt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},yt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Mo(a,y),y!==void 0)){if(Jh(y))return y;Rt("Key value for link data "+a+" is not a number or a string: "+y)}}},yt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Mo(a,x);b!==y&&this.jh(y)===null&&(eo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),jo(this,"linkKey",so,x,a,b,y),typeof x=="string"&&this.La(a,x))}else eo(a,x,y)}},yt.jh=function(a){return a===null&&Rt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Jh(a)?this.wb.I(a):null},yt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){eo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;eo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;eo(a,y,x)}}}}},yt.Jc=function(a){return a===null?!1:this.$f.contains(a)},yt.fi=function(a){a!==null&&(Wi(a),this.Jc(a)||L1(this,a,!0))};function L1(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Rt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),jo(a,"linkDataArray",No,"linkDataArray",a,null,y,null,b),fy(a,y)}yt.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)},yt.bm=function(a){a!==null&&D1(this,a,!0)};function D1(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(jo(a,"linkDataArray",zo,"linkDataArray",a,y,null,b,null),x=Bl(a,y,!0),Ia(a,x,y),x=Bl(a,y,!1),Ia(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],Ia(a,x,y)}yt.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)},yt.Zz=function(a){if(this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&ze(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var z=a[E],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var nt=this.jh(tt);nt!==z&&(nt!==null?(this.Do(nt,z),I1(this,z,nt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function fy(a,y){var x=Bl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Da(a,x,y),x=Bl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Da(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],a.hc(x)===null&&Da(a,x,y)}yt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):av(this,a,!0),ae(a)&&(wi(a),this.lf!==""&&eo(a,this.lf,void 0),this.mf!==""&&eo(a,this.mf,void 0),this.je!==""&&eo(a,this.je,[])),a},yt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Mo(a,y)},yt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Mo(a,y),y!==void 0)){if(Jh(y))return y;Rt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},yt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Mo(a,x);b!==y&&(Ia(this,b,a),eo(a,x,y),this.hc(y)===null&&Da(this,y,a),jo(this,"nodeGroupKey",so,x,a,b,y),typeof x=="string"&&this.La(a,x))}else eo(a,x,y)}},yr.prototype.copyNodeData=function(a){return a===null?null:(a=ki.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Mo(a,this.Je)===void 0||eo(a,this.Je,void 0),a)},yr.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){Af(this,a,x,!0);return}if(y===this.linkToKeyProperty){Af(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Ff(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Ff(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var b=Mo(a,y);b!==x&&(eo(a,y,x),this.Fs(a,y,b,x))},yt=yr.prototype,yt.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Mo(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},yt.jp=function(a,y){ki.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,z=y;if(Bl(this,b,!0)===E){var tt=this.lf;eo(b,tt,z),jo(this,"linkFromKey",so,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)}if(Bl(this,b,!1)===E&&(tt=this.mf,eo(b,tt,z),jo(this,"linkToKey",so,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)),tt=this.Ef(b),Array.isArray(tt))for(var nt=tt.length,it=this.je,ot=0;ot<nt;ot++)tt[ot]===E&&(tt[ot]=z,jo(this,"linkLabelKeys",No,it,b,E,z,ot,ot))}},yt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;eo(a,b,x),jo(this,"nodeGroupKey",so,b,a,y,x),typeof b=="string"&&this.La(a,b)}},yt.Lv=function(){ki.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},yt.fm=function(a){ki.prototype.fm.call(this,a),a=this.wa(a);var y=am(this,a);if(y!==null){var x=Ne();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;jo(this,"nodeGroupKey",so,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Bl(this,b,!0)===a&&(E=this.lf,jo(this,"linkFromKey",so,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Bl(this,b,!1)===a&&(E=this.mf,jo(this,"linkToKey",so,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var z=E.length,tt=this.je,nt=0;nt<z;nt++)E[nt]===a&&(jo(this,"linkLabelKeys",No,tt,b,a,a,nt,nt),x.push(b))}for(y=0;y<x.length;y++)Ia(this,a,x[y]);Fe(x)}},yt.em=function(a){ki.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Da(this,y,a)},yt.qp=function(a){ki.prototype.qp.call(this,a);var y=this.lh(a);Ia(this,y,a)},yt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Mo(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForLinkData found a non-string category for "+a+": "+y)},yr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},yr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Mo(a,x);b===void 0&&(b=""),b!==y&&(eo(a,x,y),jo(this,"linkCategory",so,x,a,b,y),typeof x=="string"&&this.La(a,x))}else eo(a,x,y)}},yr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},yt=yr.prototype,yt.lm=function(a,y){ki.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function I1(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))}yt.Wj=function(){return!0},yt.ri=function(){return!0},yt.xs=function(){return!0},yt.Xj=function(){return!0},$n.Object.defineProperties(yr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];ae(E)||Rt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Wi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new $e,E=0;E<x;E++){var z=a[E],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?b.add(z):this.wb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),z=this.Ac(E),z!==void 0&&this.wb.add(z,E)}for(b=new pn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,jo(this,"linkDataArray",so,"linkDataArray",this,y,a),y=0;y<x;y++)fy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],z=this.Ac(E);z===void 0&&(this.Bs(E),z=this.Ac(E)),z!==void 0&&this.wb.add(z,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),yr.prototype.setCategoryForLinkData=yr.prototype.lp,yr.prototype.getCategoryForLinkData=yr.prototype.ps,yr.prototype.assignAllDataProperties=yr.prototype.Do,yr.prototype.setGroupKeyForNodeData=yr.prototype.mp,yr.prototype.getGroupKeyForNodeData=yr.prototype.lh,yr.prototype.isGroupForNodeData=yr.prototype.Yu,yr.prototype.copyLinkData=yr.prototype.Jo,yr.prototype.mergeLinkDataArray=yr.prototype.Zz,yr.prototype.removeLinkDataCollection=yr.prototype.lA,yr.prototype.removeLinkData=yr.prototype.bm,yr.prototype.addLinkDataCollection=yr.prototype.Ey,yr.prototype.addLinkData=yr.prototype.fi,yr.prototype.containsLinkData=yr.prototype.Jc,yr.prototype.makeLinkDataKeyUnique=yr.prototype.Bs,yr.prototype.findLinkDataForKey=yr.prototype.jh,yr.prototype.setKeyForLinkData=yr.prototype.Ks,yr.prototype.getKeyForLinkData=yr.prototype.Ac,yr.prototype.removeLabelKeyForLinkData=yr.prototype.Qx,yr.prototype.addLabelKeyForLinkData=yr.prototype.Bu,yr.prototype.setLabelKeysForLinkData=yr.prototype.Ls,yr.prototype.getLabelKeysForLinkData=yr.prototype.Ef,yr.prototype.setToPortIdForLinkData=yr.prototype.Cv,yr.prototype.getToPortIdForLinkData=yr.prototype.Cx,yr.prototype.setFromPortIdForLinkData=yr.prototype.xv,yr.prototype.getFromPortIdForLinkData=yr.prototype.zx,yr.prototype.setToKeyForLinkData=yr.prototype.Bv,yr.prototype.getToKeyForLinkData=yr.prototype.Bx,yr.prototype.setFromKeyForLinkData=yr.prototype.wv,yr.prototype.getFromKeyForLinkData=yr.prototype.yx,yr.prototype.clear=yr.prototype.clear;var hv=Object.freeze([]);yr.className="GraphLinksModel",Sa.GraphLinksModel=yr,ki.constructGraphLinksModel=ki.constructGraphLinksModel=function(){return new yr},ki.initDiagramModel=cy=function(){return new yr};function Gs(a,y){ki.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(ze(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Xn(Gs,ki),Gs.constructGraphLinksModel=ki.constructGraphLinksModel,Gs.prototype.cloneProtected=function(a){ki.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},yt=Gs.prototype,yt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Je(E)}}return y},yt.rm=function(){var a=ki.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},yt.gp=function(a){ki.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},yt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Rt("applyIncrementalJson cannot change Model properties"),ki.prototype.fp.call(this,a)},yt.Vl=function(a){return a},yt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Mo(a,y),y!==void 0)){if(Jh(y))return y;Rt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},yt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=Mo(a,x);b!==y&&(Ia(this,b,a),eo(a,x,y),this.hc(y)===null&&Da(this,y,a),jo(this,"nodeParentKey",so,x,a,b,y),typeof x=="string"&&this.La(a,x))}else eo(a,x,y)}},yt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Mo(a,y),y===void 0)?"":typeof y=="string"?y:(Rt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Gs.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Gs.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Mo(a,x);b===void 0&&(b=""),b!==y&&(eo(a,x,y),jo(this,"parentLinkCategory",so,x,a,b,y),typeof x=="string"&&this.La(a,x))}else eo(a,x,y)}},Gs.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Gs.prototype.copyNodeData=function(a){return a===null?null:(a=ki.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Mo(a,this.Ke)===void 0||eo(a,this.Ke,void 0),a)},Gs.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=Mo(a,y);b!==x&&(eo(a,y,x),this.Fs(a,y,b,x))},yt=Gs.prototype,yt.jp=function(a,y){ki.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},yt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;eo(a,b,x),jo(this,"nodeParentKey",so,b,a,y,x),typeof b=="string"&&this.La(a,b)}},yt.fm=function(a){ki.prototype.fm.call(this,a),a=this.wa(a);var y=am(this,a);if(y!==null){var x=Ne();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;jo(this,"nodeParentKey",so,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Ia(this,a,x[y]);Fe(x)}},yt.em=function(a){ki.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Da(this,y,a)},yt.qp=function(a){ki.prototype.qp.call(this,a);var y=this.mh(a);Ia(this,y,a)},yt.lm=function(a,y){ki.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},yt.Tl=function(){return!0},yt.xs=function(){return!0},$n.Object.defineProperties(Gs.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"}}}),Gs.prototype.setParentLinkCategoryForNodeData=Gs.prototype.Ms,Gs.prototype.getParentLinkCategoryForNodeData=Gs.prototype.ss,Gs.prototype.setParentKeyForNodeData=Gs.prototype.qe,Gs.prototype.getParentKeyForNodeData=Gs.prototype.mh,Gs.className="TreeModel",Sa.TreeModel=Gs;function mo(a){no.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ba,this.Ti=0,this.Zv=new Lt,this.Jp=this.me=0,this.Xr=new pm,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=ba,this.K=Us,this.nd=Rf,this.hd=oy,this.tf=6,this.Nn=vv,a&&Object.assign(this,a)}Xn(mo,no),mo.prototype.cloneProtected=function(a){no.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},mo.prototype.qb=function(a){a.classType===mo?a===mv||a===gv||a===fv||a===pv||a===Rf?this.sorting=a:a===Hc||a===Bf||a===Us||a===qh?this.direction=a:a===ph||a===Qh||a===ba||a===Ea?this.arrangement=a:(a===Td||a===vv)&&(this.nodeDiameterFormula=a):no.prototype.qb.call(this,a)},mo.prototype.createNetwork=function(){return new jf(this)},mo.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 $e;y.addAll(a.iterator),a=new $e;var x=new $e,b=this.sort(y),E,z,tt=this.Jp,nt=this.arrangement,it=this.nodeDiameterFormula,ot=this.radius;(!isFinite(ot)||0>=ot)&&(ot=NaN);var st=this.aspectRatio;(!isFinite(st)||0>=st)&&(st=1);var ht=this.startAngle;isFinite(ht)||(ht=0);var ft=this.sweepAngle;if((!isFinite(ft)||360<ft||1>ft)&&(ft=360),y=this.spacing,isFinite(y)||(y=NaN),nt===Ea&&it===Td?nt=ba:nt===Ea&&it!==Td&&(nt=this.arrangement),(this.direction===Hc||this.direction===Bf)&&this.sorting!==Rf){for(it=0;!(it>=b.length)&&(a.add(b.M(it)),!(it+1>=b.length));it+=2)x.add(b.M(it+1));this.direction===Hc?(this.arrangement===Ea&&a.reverse(),b=new $e,b.addAll(a),b.addAll(x)):(this.arrangement===Ea&&x.reverse(),b=new $e,b.addAll(x),b.addAll(a))}it=b.length;for(var mt=z=E=0;mt<b.length;mt++){var xt=ht+ft*z*(this.direction===Us?1:-1)/it,St=b.M(mt).diameter;isNaN(St)&&(St=tc(b.M(mt),xt)),360>ft&&(mt===0||mt===b.length-1)&&(St/=2),E+=St,z++}if(isNaN(ot)||nt===Ea){if(isNaN(y)&&(y=6),nt!==ba&&nt!==Ea){for(z=-1/0,tt=0;tt<it;tt++)mt=b.M(tt),E=b.M(tt===it-1?0:tt+1),isNaN(mt.diameter)&&tc(mt,0),isNaN(E.diameter)&&tc(E,0),z=Math.max(z,(mt.diameter+E.diameter)/2);tt=z+y,nt===ph?ot=(z+y)/(2*Math.PI/it):ot=cv(this,tt*(360<=ft?it:it-1),st,ht*Math.PI/180,ft*Math.PI/180)}else ot=cv(this,E+(360<=ft?it:it-1)*(nt!==Ea?y:1.6*y),st,ht*Math.PI/180,ft*Math.PI/180);z=ot*st}else if(z=ot*st,mt=py(this,ot,z,ht*Math.PI/180,ft*Math.PI/180),isNaN(y))(nt===ba||nt===Ea)&&(y=(mt-E)/(360<=ft?it:it-1));else if(nt===ba||nt===Ea)mt=(mt-E)/(360<=ft?it:it-1),mt<y?(ot=cv(this,E+y*(360<=ft?it:it-1),st,ht*Math.PI/180,ft*Math.PI/180),z=ot*st):y=mt;else{for(tt=-1/0,E=0;E<it;E++)xt=b.M(E),St=b.M(E===it-1?0:E+1),isNaN(xt.diameter)&&tc(xt,0),isNaN(St.diameter)&&tc(St,0),tt=Math.max(tt,(xt.diameter+St.diameter)/2);tt+=y,E=cv(this,tt*(360<=ft?it:it-1),st,ht*Math.PI/180,ft*Math.PI/180),E>ot?(ot=E,z=ot*st):tt=mt/(360<=ft?it:it-1)}if(this.kw=nt,this.lc=ot,this.Zm=st,this.lw=ht,this.Wp=ft,this.Ti=y,this.me=z,this.Jp=tt,y=b,b=this.kw,nt=this.lc,ot=this.lw,st=this.Wp,ht=this.Ti,ft=this.me,it=this.Jp,this.direction!==Hc&&this.direction!==Bf||b!==Ea)if(this.direction===Hc||this.direction===Bf){switch(tt=0,b){case Qh:tt=180*dv(this,nt,ft,ot,it)/Math.PI;break;case ba:it=y=0,tt=a.first(),tt!==null&&(y=tc(tt,Math.PI/2)),tt=x.first(),tt!==null&&(it=tc(tt,Math.PI/2)),tt=180*dv(this,nt,ft,ot,ht+(y+it)/2)/Math.PI;break;case ph:tt=st/y.length}if(this.direction===Hc){switch(b){case Qh:fm(this,a,ot,qh);break;case ba:dm(this,a,ot,qh);break;case ph:cm(this,a,st/2,ot,qh)}switch(b){case Qh:fm(this,x,ot+tt,Us);break;case ba:dm(this,x,ot+tt,Us);break;case ph:cm(this,x,st/2,ot+tt,Us)}}else{switch(b){case Qh:fm(this,x,ot,qh);break;case ba:dm(this,x,ot,qh);break;case ph:cm(this,x,st/2,ot,qh)}switch(b){case Qh:fm(this,a,ot+tt,Us);break;case ba:dm(this,a,ot+tt,Us);break;case ph:cm(this,a,st/2,ot+tt,Us)}}}else switch(b){case Qh:fm(this,y,ot,this.direction);break;case ba:dm(this,y,ot,this.direction);break;case ph:cm(this,y,st,ot,this.direction);break;case Ea:A1(this,y,st,ot,this.direction)}else A1(this,y,st,ot-st/2,Us)}this.updateParts(),this.network=null,this.isValidLayout=!0};function cm(a,y,x,b,E){var z=a.Wp,tt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var nt=y.length,it=0;it<nt;it++){var ot=b+(E===Us?it*x/(360<=z?nt:nt-1):-(it*x)/nt),st=y.M(it),ht=tt*Math.tan(ot)/a;ht=Math.sqrt((tt*tt+a*a*ht*ht)/(1+ht*ht)),st.centerX=ht*Math.cos(ot),st.centerY=ht*Math.sin(ot),st.actualAngle=180*ot/Math.PI}}function dm(a,y,x,b){var E=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var nt=y.length,it=0;it<nt;it++){var ot=y.M(it),st=y.M(it===nt-1?0:it+1),ht=z*Math.sin(x);ot.centerX=E*Math.cos(x),ot.centerY=ht,ot.actualAngle=180*x/Math.PI,isNaN(ot.diameter)&&tc(ot,0),isNaN(st.diameter)&&tc(st,0),ot=dv(a,E,z,b===Us?x:-x,(ot.diameter+st.diameter)/2+tt),x+=b===Us?ot:-ot}}function fm(a,y,x,b){var E=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var nt=y.length,it=0;it<nt;it++){var ot=y.M(it);ot.centerX=E*Math.cos(x),ot.centerY=z*Math.sin(x),ot.actualAngle=180*x/Math.PI,ot=dv(a,E,z,b===Us?x:-x,tt),x+=b===Us?ot:-ot}}function A1(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new pm,360>x){for(z=b+(E===Us?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,B1(a,y,x,b,E)}else F1(a,y,x,b,E);a.Xr.commit(y)}function F1(a,y,x,b,E){var z=a.lc,tt=a.Ti,nt=a.Zm,it=z*Math.cos(b*Math.PI/180),ot=a.me*Math.sin(b*Math.PI/180),st=y.Fa();if(st.length===3)st[0].centerX=z,st[0].centerY=0,st[1].centerX=st[0].centerX-st[0].width/2-st[1].width/2-tt,st[1].y=st[0].y,st[2].centerX=(st[0].centerX+st[1].centerX)/2,st[2].y=st[0].y-st[2].height-tt;else if(st.length===4)st[0].centerX=z,st[0].centerY=0,st[2].centerX=-st[0].centerX,st[2].centerY=st[0].centerY,st[1].centerX=0,st[1].y=Math.min(st[0].y,st[2].y)-st[1].height-tt,st[3].centerX=0,st[3].y=Math.max(st[0].y+st[0].height+tt,st[2].y+st[2].height+tt);else{z=Lt.alloc();for(var ht=0;ht<st.length&&(st[ht].centerX=it,st[ht].centerY=ot,!(ht>=st.length-1));ht++)R1(a,it,ot,st,ht,E,z)||j1(a,it,ot,st,ht,E,z),it=z.x,ot=z.y;if(Lt.free(z),a.mj++,!(23<a.mj)){it=st[0].centerX,ot=st[0].centerY,z=st[st.length-1].centerX,ht=st[st.length-1].centerY;var ft=Math.abs(it-z)-((st[0].width+st[st.length-1].width)/2+tt),mt=Math.abs(ot-ht)-((st[0].height+st[st.length-1].height)/2+tt);tt=0,1>Math.abs(mt)?Math.abs(it-z)<(st[0].width+st[st.length-1].width)/2&&(tt=0):tt=0<mt?mt:1>Math.abs(ft)?0:ft,it=Math.abs(z)>Math.abs(ht)?0<z!=ot>ht:0<ht!=it<z,(it=E===Us?it:!it)&&(tt=-Math.abs(tt),tt=Math.min(tt,-st[st.length-1].width),tt=Math.min(tt,-st[st.length-1].height)),a.Xr.compare(tt,st),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>st.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*nt,F1(a,y,x,b,E))}}}function B1(a,y,x,b,E){for(var z=a.lc,tt=a.me,nt=a.Zm,it=z*Math.cos(b*Math.PI/180),ot=tt*Math.sin(b*Math.PI/180),st=Lt.alloc(),ht=y.Fa(),ft=0;ft<ht.length&&(ht[ft].centerX=it,ht[ft].centerY=ot,!(ft>=ht.length-1));ft++)R1(a,it,ot,ht,ft,E,st)||j1(a,it,ot,ht,ft,E,st),it=st.x,ot=st.y;if(Lt.free(st),a.mj++,!(23<a.mj)){if(it=Math.atan2(ot,it),it=E===Us?a.gt-it:it-a.gt,it=Math.abs(it)<Math.abs(it-2*Math.PI)?it:it-2*Math.PI,z=it*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],it=0;it<ht.length;it++)tt.mk[it]=ht[it].bounds.x,tt.tm[it]=ht[it].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*nt,B1(a,y,x,b,E))}}function R1(a,y,x,b,E,z,tt){var nt=a.lc,it=a.me,ot=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var st=!1;if(0<=x!=(z===Us)){if(z=y+a,z>nt){if(z=y-a,z<-nt)return tt.x=z,tt.y=ot,!1;st=!0}}else if(z=y-a,z<-nt){if(z=y+a,z>nt)return tt.x=z,tt.y=ot,!1;st=!0}return ot=Math.sqrt(1-Math.min(1,z*z/(nt*nt)))*it,0>x!==st&&(ot=-ot),Math.abs(x-ot)>(b[E].height+b[E+1].height)/2?(tt.x=z,tt.y=ot,!1):(tt.x=z,tt.y=ot,!0)}function j1(a,y,x,b,E,z,tt){var nt=a.lc,it=a.me,ot=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===Us)){if(z=x-a,z<-it){if(z=x+a,z>it){tt.x=ot,tt.y=z;return}b=!0}}else if(z=x+a,z>it){if(z=x-a,z<-it){tt.x=ot,tt.y=z;return}b=!0}ot=Math.sqrt(1-Math.min(1,z*z/(it*it)))*nt,0>y!==b&&(ot=-ot),tt.x=ot,tt.y=z}mo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},mo.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 Lt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},mo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var z=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,nt=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),it=0,ot=0;ot<=z;ot++){b!==void 0&&E!==void 0?it=b+ot*E/z:it=ot*Math.PI/(2*z);var st=Math.sin(it);tt+=Math.sqrt(1-a*a*st*st)*nt}return b!==void 0&&E!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function cv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function dv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var nt=0;;nt++){var it=Math.sin(b+nt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*it*it)*a,tt>=E)return nt*a}}mo.prototype.sort=function(a){switch(this.sorting){case fv:break;case pv:a.reverse();break;case mv:a.sort(this.comparer);break;case gv:a.sort(this.comparer),a.reverse();break;case Rf:return this.ak(zw(a));default:Rt("Invalid sorting type.")}return a};function zw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new $e;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var tt=0;tt<a.length;tt++){var nt=a.M(tt).edgesCount;nt>E&&(E=nt,z=tt)}else for(tt=0;tt<a.length;tt++)nt=y[tt],nt>E&&(E=nt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)E=a.indexOf(tt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}mo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,z=b.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],nt=[];b=[],E=new $e;for(var it=0,ot=0;ot<y.length;ot++){var st=y[ot].length;if(st===1)b.push(ot);else if(st===0)E.add(a.M(ot));else{if(it===0)x.push(ot);else{for(var ht=st=1/0,ft=-1,mt=[],xt=0;xt<x.length;xt++)0>y[x[xt]].indexOf(x[xt===x.length-1?0:xt+1])&&mt.push(xt===x.length-1?0:xt+1);if(mt.length===0)for(xt=0;xt<x.length;xt++)mt.push(xt);for(xt=0;xt<mt.length;xt++){for(var St=mt[xt],Ft=y[ot],Ot=0,Wt=0;Wt<tt.length;Wt++){var Ut=z[tt[Wt]],ne=z[nt[Wt]];if(Ut<ne){var fe=Ut;Ut=ne}else fe=ne;if(fe<St&&St<=Ut)for(ne=0;ne<Ft.length;ne++){var _e=Ft[ne];0>x.indexOf(_e)||fe<z[_e]&&z[_e]<Ut||fe===z[_e]||Ut===z[_e]||Ot++}else for(ne=0;ne<Ft.length;ne++)_e=Ft[ne],0>x.indexOf(_e)||fe<z[_e]&&z[_e]<Ut&&fe!==z[_e]&&Ut!==z[_e]&&Ot++}for(Ft=Ot,Wt=Ot=0;Wt<y[ot].length;Wt++)fe=x.indexOf(y[ot][Wt]),0<=fe&&(fe=Math.abs(St-(fe>=St?fe+1:fe)),Ot+=fe<x.length+1-fe?fe:x.length+1-fe);for(Wt=0;Wt<tt.length;Wt++)fe=z[tt[Wt]],Ut=z[nt[Wt]],fe>=St&&fe++,Ut>=St&&Ut++,fe>Ut&&(ne=Ut,Ut=fe,fe=ne),Ut-fe<(x.length+2)/2==(fe<St&&St<=Ut)&&Ot++;(Ft<st||Ft===st&&Ot<ht)&&(st=Ft,ht=Ot,ft=St)}for(x.splice(ft,0,ot),st=0;st<x.length;st++)z[x[st]]=st;for(st=0;st<y[ot].length;st++)ht=y[ot][st],0<=x.indexOf(ht)&&(tt.push(ot),nt.push(ht))}it++}}for(tt=x.length;;){for(z=!0,nt=0;nt<b.length;nt++)if(it=b[nt],ot=y[it][0],st=x.indexOf(ot),0<=st){for(ft=ht=0;ft<y[ot].length;ft++)mt=x.indexOf(y[ot][ft]),0>mt||mt===st||(xt=mt>st?mt-st:st-mt,ht+=mt<st!=xt>tt-xt?1:-1);x.splice(0>ht?st:st+1,0,it),b.splice(nt,1),nt--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},$n.Object.defineProperties(mo.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!==Ea&&a!==ba&&a!==Qh&&a!==ph||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Us&&a!==qh&&a!==Hc&&a!==Bf||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==fv&&a!==pv&&a!==mv&&!gv&&a!==Rf||(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!==vv&&a!==Td||(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 ba=new yn(mo,"ConstantSpacing",0),Qh=new yn(mo,"ConstantDistance",1),ph=new yn(mo,"ConstantAngle",2),Ea=new yn(mo,"Packed",3),Us=new yn(mo,"Clockwise",4),qh=new yn(mo,"Counterclockwise",5),Hc=new yn(mo,"BidirectionalLeft",6),Bf=new yn(mo,"BidirectionalRight",7),fv=new yn(mo,"Forwards",8),pv=new yn(mo,"Reverse",9),mv=new yn(mo,"Ascending",10),gv=new yn(mo,"Descending",11),Rf=new yn(mo,"Optimized",12),vv=new yn(mo,"Pythagorean",13),Td=new yn(mo,"Circular",14);mo.className="CircularLayout",mo.ConstantSpacing=ba,mo.ConstantDistance=Qh,mo.ConstantAngle=ph,mo.Packed=Ea,mo.Clockwise=Us,mo.Counterclockwise=qh,mo.BidirectionalLeft=Hc,mo.BidirectionalRight=Bf,mo.Forwards=fv,mo.Reverse=pv,mo.Ascending=mv,mo.Descending=gv,mo.Optimized=Rf,mo.Pythagorean=vv,mo.Circular=Td;function pm(){this.Pl=-1/0,this.tm=this.mk=null}pm.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},pm.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]}},pm.className="VertexArrangement";function jf(a){Wr.call(this,a)}Xn(jf,Wr),jf.prototype.createVertex=function(){return new mm(this)},jf.prototype.createEdge=function(){return new yv(this)},jf.className="CircularNetwork";function mm(a){Ho.call(this,a),this.u=this.Si=NaN}Xn(mm,Ho);function tc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ea)if(x.nodeDiameterFormula===Td)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===Td?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}$n.Object.defineProperties(mm.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)}}}),mm.className="CircularVertex";function yv(a){Cl.call(this,a)}Xn(yv,Cl),yv.className="CircularEdge";function gs(a){no.call(this),this.ah=null,this.An=0,this.$d=new kn(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)}Xn(gs,no),gs.prototype.cloneProtected=function(a){no.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},gs.prototype.createNetwork=function(){return new kd(this)},gs.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var z=E.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}z1(this,0,a)}this.network=y;var tt=b=x.iterator;b=this.arrangementSpacing;var nt=tt.count,it=!0;z=E=0;for(var ot=Ne(),st=0;st<nt+y.vertexes.count+2;st++)ot[st]=null;nt=0,tt.reset();for(var ht=un.alloc();tt.next();)if(st=tt.value,this.computeBounds(st,ht),it)it=!1,E=ht.x+ht.width/2,z=ht.y+ht.height/2,ot[0]=new Lt(ht.x+ht.width+b.width,ht.y),ot[1]=new Lt(ht.x,ht.y+ht.height+b.height),nt=2;else{var ft=$1(ot,nt,E,z,ht.width,ht.height,b),mt=ot[ft],xt=new Lt(mt.x+ht.width+b.width,mt.y),St=new Lt(mt.x,mt.y+ht.height+b.height);for(ft+1<nt&&ot.splice(ft+1,0,null),ot[ft]=xt,ot[ft+1]=St,nt++,ft=mt.x-ht.x,mt=mt.y-ht.y,st=st.vertexes.iterator;st.next();)xt=st.value,xt.centerX+=ft,xt.centerY+=mt}for(un.free(ht),st=y.vertexes.iterator;st.next();)tt=st.value,ft=tt.bounds,2>nt?(E=ft.x+ft.width/2,z=ft.y+ft.height/2,ot[0]=new Lt(ft.x+ft.width+b.width,ft.y),ot[1]=new Lt(ft.x,ft.y+ft.height+b.height),nt=2):(it=$1(ot,nt,E,z,ft.width,ft.height,b),ht=ot[it],mt=new Lt(ht.x+ft.width+b.width,ht.y),ft=new Lt(ht.x,ht.y+ft.height+b.height),it+1<nt&&ot.splice(it+1,0,null),ot[it]=mt,ot[it+1]=ft,nt++,tt.centerX=ht.x+tt.width/2,tt.centerY=ht.y+tt.height/2);for(Fe(ot),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}Z1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},gs.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},gs.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function z1(a,y,x){if($w(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Hw(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,z1(a,y+1,x),Z1(a,z),Zw(a,E),y=E.vertexes.Fa(),y.sort(function(tt,nt){return tt===null||nt===null||tt===nt?0:nt.Vd-tt.Vd}),x=0;x<y.length;x++)Ww(a,y[x]);a.Zf=b}}function $w(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Hw(a,y){for(var x=a.network,b=new kd(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var tt=new W1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new $e),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var nt=z.value;E=nt.fromVertex,tt=nt.toVertex,E.network===b&&tt.network===b?b.Bo(nt):E.network===b?(nt=E.Hj,nt===null&&(nt=new $e,E.Hj=nt),nt.add(tt),E.Vd--,E.sh+=tt.sh):tt.network===b&&(nt=tt.Hj,nt===null&&(nt=new $e,tt.Hj=nt),nt.add(E),tt.Vd--,tt.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,ge.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var it=E.Hj;if(it!==null&&0<it.count&&(tt=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=tt))){for(var ot=nt=0,st=it.count-tt;st<it.count;st++){var ht=it.M(st),ft=null;for(z=ht.edges.iterator;z.next();){var mt=z.value;if(mt.Ax(ht)===E){ft=mt;break}}ft!==null&&(ot+=ft.length,nt+=ht.width*ht.height)}z=E.centerX,it=E.centerY,st=E.width,ht=E.height,ft=E.focus,mt=st*ht,1>mt&&(mt=1),nt=ge.sqrt((nt+mt+ot*ot*4/(tt*tt))/mt),tt=(nt-1)*st/2,nt=(nt-1)*ht/2,E.bounds=new un(z-ft.x-tt,it-ft.y-nt,st+2*tt,ht+2*nt),E.focus=new Lt(ft.x+tt,ft.y+nt)}}return a.network=b,x}function Zw(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var z=E.Sv,tt=E.Tv;b.bounds=new un(b.centerX-z,b.centerY-tt,E.Ss,E.Qs),b.focus=new Lt(z,tt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Ww(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=ge.sqrt(z*z+tt*tt)/2;for(var nt=!1,it=tt=0,ot=0,st=y.vertexes.iterator;st.next();){var ht=st.value;1>=ht.Vd?it++:(nt=!0,ot++,tt+=Math.atan2(y.centerY-ht.centerY,y.centerX-ht.centerX))}if(it!==0){for(0<ot&&(tt/=ot),ot=y=0,y=nt?2*Math.PI/(it+1):2*Math.PI/it,it%2===0&&(ot=y/2),1<x.count&&x.sort(function(mt,xt){return mt===null||xt===null||mt===xt?0:xt.width*xt.height-mt.width*mt.height}),nt=it%2===0?0:1,x=x.iterator;x.next();)if(it=x.value,!(1<it.Vd||a.isFixed(it))){for(st=null,ht=it.edges.iterator;ht.next();){st=ht.value;break}ht=it.width;var ft=it.height;ht=ge.sqrt(ht*ht+ft*ft)/2,st=z+st.length+ht,ht=tt+(y*(nt/2>>1)+ot)*(nt%2===0?1:-1),it.centerX=b+st*Math.cos(ht),it.centerY=E+st*Math.sin(ht),nt++}}}}function $1(a,y,x,b,E,z,tt){var nt=9e19,it=-1,ot=0;t:for(;ot<y;ot++){var st=a[ot],ht=st.x-x,ft=st.y-b;if(ht=ht*ht+ft*ft,ht<nt){for(ft=ot-1;0<=ft;ft--)if(a[ft].y>st.y&&a[ft].x-st.x<E+tt.width)continue t;for(ft=ot+1;ft<y;ft++)if(a[ft].x>st.x&&a[ft].y-st.y<z+tt.height)continue t;it=ot,nt=ht}}return it}gs.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},gs.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var z=E.value;if(z.toVertex===a){x=z;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(z=E.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function H1(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var nt=z.width;return z=z.height,b+E<tt?a>y+z?(x=b+E-tt,a=a-y-z,ge.sqrt(x*x+a*a)):a+x<y?(b=b+E-tt,a=a+x-y,ge.sqrt(b*b+a*a)):tt-(b+E):b>tt+nt?a>y+z?(x=b-tt-nt,a=a-y-z,ge.sqrt(x*x+a*a)):a+x<y?(b=b-tt-nt,a=a+x-y,ge.sqrt(b*b+a*a)):b-(tt+nt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Z1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,Vw(a)););a.ah=null}function Vw(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,tt=1;tt<y.length;tt++){var nt=y[tt];nt.forceX=0,nt.forceY=0;var it=nt.centerX;nt=nt.centerY,b=Math.min(b,it),E=Math.max(E,it),x=Math.min(x,nt),z=Math.max(z,nt)}(E=E-b>z-x)?y.sort(function(St,Ft){return St===null||Ft===null||St===Ft?0:St.centerX-Ft.centerX}):y.sort(function(St,Ft){return St===null||Ft===null||St===Ft?0:St.centerY-Ft.centerY}),x=a.Zf;var ot=b=nt=0;for(z=0;z<y.length;z++){tt=y[z],b=tt.bounds,nt=tt.focus,it=b.x+nt.x;var st=b.y+nt.y;b=tt.charge*a.electricalFieldX(it,st),ot=tt.charge*a.electricalFieldY(it,st),b+=tt.mass*a.gravitationalFieldX(it,st),ot+=tt.mass*a.gravitationalFieldY(it,st),tt.forceX+=b,tt.forceY+=ot;for(var ht=z+1;ht<y.length;ht++){var ft=y[ht];if(ft!==tt){b=ft.bounds,nt=ft.focus,ot=b.x+nt.x;var mt=b.y+nt.y;if(it-ot>x||ot-it>x){if(E)break}else if(st-mt>x||mt-st>x){if(!E)break}else{var xt=H1(tt,ft);1>xt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),xt=b.random(),nt=b.random(),it>ot?(b=Math.abs(ft.bounds.right-tt.bounds.x),b=(1+b)*xt):it<ot?(b=Math.abs(ft.bounds.x-tt.bounds.right),b=-(1+b)*xt):(b=Math.max(ft.width,tt.width),b=(1+b)*xt-b/2),st>mt?(ot=Math.abs(ft.bounds.bottom-tt.bounds.y),ot=(1+ot)*nt):it<ot?(ot=Math.abs(ft.bounds.y-tt.bounds.bottom),ot=-(1+ot)*nt):(ot=Math.max(ft.height,tt.height),ot=(1+ot)*nt-ot/2)):(nt=-(tt.charge*ft.charge)/(xt*xt),b=(ot-it)/xt*nt,ot=(mt-st)/xt*nt),tt.forceX+=b,tt.forceY+=ot,ft.forceX-=b,ft.forceY-=ot}}}}for(E=a.network.edges.iterator;E.next();)nt=E.value,x=nt.fromVertex,z=nt.toVertex,tt=x.bounds,it=x.focus,b=tt.x+it.x,tt=tt.y+it.y,st=z.bounds,ht=z.focus,it=st.x+ht.x,st=st.y+ht.y,ht=H1(x,z),1>ht?(ht=a.randomNumberGenerator,ht===null&&(a.randomNumberGenerator=ht=new xv),nt=ht.random(),ht=ht.random(),b=(b>it?1:-1)*(1+(z.width>x.width?z.width:x.width))*nt,ot=(tt>st?1:-1)*(1+(z.height>x.height?z.height:x.height))*ht):(nt=nt.stiffness*(ht-nt.length),b=(it-b)/ht*nt,ot=(st-tt)/ht*nt),x.forceX+=b,x.forceY+=ot,z.forceX-=b,z.forceY-=ot;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}gs.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},gs.prototype.moveFixedVertex=function(){},gs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},gs.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=di,y.toSpot=di)}},gs.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=un.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,un.free(x)}x=un.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}un.free(x)},gs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},gs.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},gs.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},gs.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},gs.prototype.electricalFieldX=function(){return 0},gs.prototype.electricalFieldY=function(){return 0},gs.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},gs.prototype.gravitationalFieldX=function(){return 0},gs.prototype.gravitationalFieldY=function(){return 0},gs.prototype.isFixed=function(a){return a.isFixed},$n.Object.defineProperties(gs.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Rt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),gs.className="ForceDirectedLayout";function W1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}W1.className="ForceDirectedSubnet";function kd(a){Wr.call(this,a)}Xn(kd,Wr),kd.prototype.createVertex=function(){return new gm(this)},kd.prototype.createEdge=function(){return new vm(this)},kd.className="ForceDirectedNetwork";function gm(a){Ho.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}Xn(gm,Ho),$n.Object.defineProperties(gm.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)}}}),gm.className="ForceDirectedVertex";function vm(a){Cl.call(this,a),this.j=this.o=NaN}Xn(vm,Cl),$n.Object.defineProperties(vm.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)}}}),vm.className="ForceDirectedEdge";function xv(){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()}xv.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},xv.className="RandomNumberGenerator";function Rr(a){no.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Ev,this.Zk=Mv,this.Qk=Pv,this.bj=4,this.rk=Nv,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 Lt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Xn(Rr,no),Rr.prototype.cloneProtected=function(a){no.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},Rr.prototype.qb=function(a){a.classType===Rr?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:Rt("Unknown enum value: "+a):no.prototype.qb.call(this,a)},Rr.prototype.createNetwork=function(){return new $f(this)},Rr.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!==xm&&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===xm&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,z=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||z.node===null&&z.data===null)&&E.layer===z.layer)){var tt=0,nt=0,it=0,ot=0;if(b.link!==null){if(nt=b.link,nt===null)continue;var st=E.node;if(tt=z.node,st===null||tt===null)continue;var ht=nt.fromNode;it=nt.toNode;for(var ft=nt.fromPort;ft!==null&&!ft.Ed();)ft=ft.panel;for(nt=nt.toPort;nt!==null&&!nt.Ed();)nt=nt.panel;if(b.rev){ot=ht;var mt=ft;ht=it,ft=nt,it=ot,nt=mt}var xt=E.focus;ot=z.focus;var St=b.rev?z.bounds:E.bounds;mt=Lt.alloc(),st!==ht?St.w()&&ht.isVisible()?ht.actualBounds.w()?(uh(ht,ft,cr,mt),mt.x+=ht.actualBounds.x-St.x,mt.y+=ht.actualBounds.y-St.y):(uh(ht,ft,cr,mt),mt.w()||mt.assign(xt)):mt.assign(xt):St.w()?(uh(ht,ft,cr,mt),mt.w()||mt.assign(xt)):mt.assign(xt),ht=b.rev?E.bounds:z.bounds,st=Lt.alloc(),tt!==it?ht.w()&&it.isVisible()?it.actualBounds.w()?(uh(it,nt,cr,st),st.x+=it.actualBounds.x-ht.x,st.y+=it.actualBounds.y-ht.y):(uh(it,nt,cr,st),st.w()||st.assign(ot)):st.assign(ot):ht.w()?(uh(it,nt,cr,st),st.w()||st.assign(ot)):st.assign(ot),this.K===90||this.K===270?(tt=Math.round((mt.x-xt.x)/this.kc),it=mt.x,nt=Math.round((st.x-ot.x)/this.kc),ot=st.x):(tt=Math.round((mt.y-xt.y)/this.kc),it=mt.y,nt=Math.round((st.y-ot.y)/this.kc),ot=st.y),Lt.free(mt),Lt.free(st),b.portFromColOffset=tt,b.portFromPos=it,b.portToColOffset=nt,b.portToPos=ot}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(mt=E.layer,st=z.layer,ht=0,St=b.link,St!==null){var Ft=St.fromPort,Ot=St.toPort;if(Ft!==null&&Ot!==null){var Wt=St.fromNode;if(ft=St.toNode,Wt!==null&&ft!==null){var Ut=bv(this,!0),ne=bv(this,!1),fe=this.setsPortSpots?Ut:St.computeSpot(!0,Ft);xt=this.setsPortSpots?ne:St.computeSpot(!1,Ot);var _e=St.isOrthogonal;fe.$c()&&fe.Hf(ne)&&xt.$c()&&xt.Hf(Ut)?ht=0:(Ut=St.getLinkPoint(Wt,Ft,fe,!0,_e,ft,Ot,Lt.alloc()),ne=St.getLinkDirection(Wt,Ft,Ut,fe,!0,_e,ft,Ot),Lt.free(Ut),fe.ys()||ne!==Q1(this,b,!0)?this.setsPortSpots&&Wt!==null&&Wt.ports.count===1&&b.rev&&(ht+=1):ht+=1,fe=St.getLinkPoint(ft,Ot,xt,!1,_e,Wt,Ft,Lt.alloc()),St=St.getLinkDirection(ft,Ot,fe,xt,!1,_e,Wt,Ft),Lt.free(fe),xt.ys()||St!==Q1(this,b,!1)?this.setsPortSpots&&ft!==null&&ft.ports.count===1&&b.rev&&(ht+=2):ht+=2)}}}if(ft=ht,ht=ft===1||ft===3,(ft=ft===2||ft===3)&&(xt=a.createVertex(),xt.node=null,xt.Dj=1,xt.layer=mt,xt.near=E,a.dh(xt),E=a.Zj(E,xt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=tt,E.portToColOffset=0,E.portFromPos=it,E.portToPos=0,E=xt),St=1,ht&&St--,mt-st>St&&0<mt){for(b.valid=!1,xt=a.createVertex(),xt.node=null,xt.Dj=2,xt.layer=mt-1,a.dh(xt),E=a.Zj(E,xt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=ft?0:tt,E.portToColOffset=0,E.portFromPos=ft?0:it,E.portToPos=0,E=xt,mt--;mt-st>St&&0<mt;)xt=a.createVertex(),xt.node=null,xt.Dj=3,xt.layer=mt-1,a.dh(xt),E=a.Zj(E,xt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=xt,mt--;E=a.Zj(xt,z,b.link),E.valid=!ht,ht&&(xt.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=nt,E.portFromPos=0,E.portToPos=ot}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=ec(this,a),x=0,b=this.tc[a],z=0;z<b;z++)E=y[z],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),nc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Rr.prototype.linkMinLength=function(){return 1};function my(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}Rr.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},Rr.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 rl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function Yl(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function V1(a,y,x){var b=ec(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<E;tt++){var nt=0,it=b[tt],ot=it.near;if(ot!==null&&ot.layer===it.layer)if(it=ot.index,it>tt)for(var st=tt+1;st<it;st++){var ht=b[st];ht.near===ot&&ht.Dj===ot.Dj||nt++}else for(st=tt-1;st>it;st--)ht=b[st],ht.near===ot&&ht.Dj===ot.Dj||nt++;var ft;if(0<=x)for(it=b[tt].sourceEdgesArrayAccess,ot=0;ot<it.length;ot++){var mt=it[ot];if(mt.valid&&mt.fromVertex.layer!==y)for(ht=mt.fromVertex.index,st=mt.portToPos,mt=mt.portFromPos,ft=ot+1;ft<it.length;ft++){var xt=it[ft];if(xt.valid&&xt.fromVertex.layer!==y){var St=xt.fromVertex.index,Ft=xt.portToPos;xt=xt.portFromPos,st<Ft&&(ht>St||ht===St&&mt>xt)&&nt++,Ft<st&&(St>ht||St===ht&&xt>mt)&&nt++}}}if(0>=x){for(it=b[tt].destinationEdgesArrayAccess,ot=0;ot<it.length;ot++)if(mt=it[ot],mt.valid&&mt.toVertex.layer!==y)for(ht=mt.toVertex.index,st=mt.portToPos,mt=mt.portFromPos,ft=ot+1;ft<it.length;ft++)xt=it[ft],xt.valid&&xt.toVertex.layer!==y&&(St=xt.toVertex.index,Ft=xt.portToPos,xt=xt.portFromPos,mt<xt&&(ht>St||ht===St&&st>Ft)&&nt++,xt<mt&&(St>ht||St===ht&&Ft>st)&&nt++)}for(z[tt*E+tt]=nt,it=tt+1;it<E;it++){var Ot=0,Wt=0;if(0<=x){nt=b[tt].sourceEdgesArrayAccess;var Ut=b[it].sourceEdgesArrayAccess;for(ot=0;ot<nt.length;ot++)if(mt=nt[ot],mt.valid&&mt.fromVertex.layer!==y)for(ht=mt.fromVertex.index,mt=mt.portFromPos,ft=0;ft<Ut.length;ft++)xt=Ut[ft],xt.valid&&xt.fromVertex.layer!==y&&(St=xt.fromVertex.index,xt=xt.portFromPos,(ht<St||ht===St&&mt<xt)&&Wt++,(St<ht||St===ht&&xt<mt)&&Ot++)}if(0>=x){for(nt=b[tt].destinationEdgesArrayAccess,Ut=b[it].destinationEdgesArrayAccess,ot=0;ot<nt.length;ot++)if(mt=nt[ot],mt.valid&&mt.toVertex.layer!==y)for(ht=mt.toVertex.index,st=mt.portToPos,ft=0;ft<Ut.length;ft++)xt=Ut[ft],xt.valid&&xt.toVertex.layer!==y&&(St=xt.toVertex.index,Ft=xt.portToPos,(ht<St||ht===St&&st<Ft)&&Wt++,(St<ht||St===ht&&Ft<st)&&Ot++)}z[tt*E+it]=Ot,z[it*E+tt]=Wt}}return nc(a,y,b),z}Rr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=V1(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var z=E;z<b;z++)a+=x[E*b+z];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=ec(b,E),tt=b.tc[E],nt=0,it=0;it<tt;it++){var ot=z[it].destinationEdgesArrayAccess;if(ot!==null)for(var st=0;st<ot.length;st++){var ht=ot[st];if(ht.valid&&ht.toVertex.layer!==E){var ft=ht.fromVertex.column+ht.portFromColOffset,mt=ht.toVertex.column+ht.portToColOffset;nt+=(Math.abs(ft-mt)+1)*my(ht)}}}nc(b,E,z),y+=nt}return y}Rr.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 gy(a,y,x){for(var b=ec(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var nt=b[tt],it=null;0>=x&&(it=nt.sourceEdgesArrayAccess);var ot=null;0<=x&&(ot=nt.destinationEdgesArrayAccess);var st=0,ht=0,ft=nt.near;if(ft!==null&&ft.layer===nt.layer&&(st+=ft.column-1,ht++),it!==null)for(ft=0;ft<it.length;ft++){nt=it[ft];var mt=nt.fromVertex;nt.valid&&!nt.rev&&mt.layer!==y&&(st+=mt.column,ht++)}if(ot!==null)for(it=0;it<ot.length;it++)nt=ot[it],ft=nt.toVertex,nt.valid&&!nt.rev&&ft.layer!==y&&(st+=ft.column,ht++);z[tt]=ht===0?-1:st/ht}return nc(a,y,b),z}function K1(a,y,x){for(var b=ec(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var nt=b[tt],it=null;0>=x&&(it=nt.sourceEdgesArrayAccess);var ot=null;0<=x&&(ot=nt.destinationEdgesArrayAccess);var st=0,ht=[],ft=nt.near;if(ft!==null&&ft.layer===nt.layer&&(ht[st]=ft.column-1,st++),nt=void 0,it!==null)for(ft=0;ft<it.length;ft++){nt=it[ft];var mt=nt.fromVertex;nt.valid&&!nt.rev&&mt.layer!==y&&(ht[st]=mt.column+nt.portFromColOffset,st++)}if(ot!==null)for(it=0;it<ot.length;it++)nt=ot[it],ft=nt.toVertex,nt.valid&&!nt.rev&&ft.layer!==y&&(ht[st]=ft.column+nt.portToColOffset,st++);st===0?z[tt]=-1:(ht.sort(function(xt,St){return xt-St}),ot=st>>1,z[tt]=st&1?ht[ot]:ht[ot-1]+ht[ot]>>1)}return nc(a,y,b),z}function ym(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();){var nt=tt.value,it=nt.toVertex,ot=y.layer-it.layer;nt=a.linkMinLength(nt),ot===nt&&ym(a,it,x,b,E,z)}if(z)for(tt=y.sourceEdges;tt.next();)nt=tt.value,it=nt.fromVertex,ot=it.layer-y.layer,nt=a.linkMinLength(nt),ot===nt&&ym(a,it,x,b,E,z)}}function vy(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();)vy(a,tt.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,z)}}Rr.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case wy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;Kw(a)!==null;){for(E=_1(a);E!==null;)b[x]=E,x--,E.valid=!1,E=_1(a);for(E=G1(a);E!==null;)b[y]=E,y++,E.valid=!1,E=G1(a);E=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var nt=tt.value;if(nt.valid){for(var it=0,ot=nt.destinationEdges;ot.next();)ot.value.toVertex.valid&&it++;ot=0;for(var st=nt.sourceEdges;st.next();)st.value.fromVertex.valid&&ot++;(E===null||z<it-ot)&&(E=nt,z=it-ot)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Ev:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Ll<y.Ll&&x<z&&(this.network.gm(b),b.rev=!0));break;case xm:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(z=0;z<E.length;z++)E[z].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function Kw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function _1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function G1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Rr.prototype.assignLayers=function(){switch(this.Zk){case Cy:U1(this);break;case Sy:for(var a,y=this.network.vertexes.iterator;y.next();)a=X1(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case Mv:for(U1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&J1(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function U1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Y1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Y1(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,z=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,Y1(a,z)+E)}y.layer=x}else x=y.layer;return x}function X1(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,z=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,X1(a,z)+E)}y.layer=x}else x=y.layer;return x}function J1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)J1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,z=0;z<E;z++){var tt=b[z],nt=tt.fromVertex,it=tt.toVertex;tt=a.linkMinLength(tt),nt.layer-it.layer>tt&&ym(a,nt,0,-1,!0,!1)}for(ym(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,nt=0,it=null,tt=a.network.vertexes.iterator;tt.next();){var ot=tt.value;if(ot.component===1){var st=0,ht=!1,ft=ot.sourceEdgesArrayAccess;E=ft.length;for(var mt=0;mt<E;mt++){var xt=ft[mt],St=xt.fromVertex;st+=1,St.component!==1&&(z+=1,St=St.layer-ot.layer,xt=a.linkMinLength(xt),b=Math.min(b,St-xt))}for(ft=ot.destinationEdgesArrayAccess,E=ft.length,mt=0;mt<E;mt++)xt=ft[mt].toVertex,--st,xt.component!==1?--z:ht=!0;(it===null||st<nt)&&!ht&&(it=ot,nt=st)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else it.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(ym(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,nt=null,it=a.network.vertexes.iterator;it.next();)if(tt=it.value,tt.component===1){for(ot=0,st=!1,ft=tt.sourceEdgesArrayAccess,ht=ft.length,mt=0;mt<ht;mt++)xt=ft[mt].fromVertex,ot+=1,xt.component!==1?b+=1:st=!0;for(ft=tt.destinationEdgesArrayAccess,ht=ft.length,mt=0;mt<ht;mt++)xt=ft[mt],St=xt.toVertex,--ot,St.component!==1&&(--b,St=tt.layer-St.layer,xt=a.linkMinLength(xt),E=Math.min(E,St-xt));(nt===null||ot>z)&&!st&&(nt=tt,z=ot)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else nt.component=0}}}function Q1(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}Rr.prototype.initializeIndices=function(){switch(this.Qk){default:case Ey: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 Pv:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&q1(this,x);break;case by:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&tw(this,x)}};function q1(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],z=y[b+1];E.portFromColOffset>z.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&q1(a,b))}function tw(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],z=y[x+1];E.portToColOffset>z.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&tw(a,b))}Rr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=rl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Cv(this,b,1),la(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=rl(this)),b=this.Ia;0<=b;b--)Cv(this,b,-1),la(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=rl(this))}for(Yl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Cv(this,b,0),la(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=rl(this)),b=this.Ia;0<=b;b--)Cv(this,b,0),la(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=rl(this))}Yl(this,y);var z,tt,nt;switch(this.rk){case My:break;case Py:for(nt=a+1;(b=this.countCrossings())<nt;)for(nt=b,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,1)||z;for(E=this.countCrossings(),E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,1)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,-1)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,0)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,0)||z;E>=a?Yl(this,y):(a=E,y=rl(this))}break;default:case Nv:for(x=this.Ia,tt=0,nt=a+1;(b=this.countCrossings())<nt;){for(nt=b,z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,1)||z;for(E=this.countCrossings(),E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,1)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,-1)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=la(this,b,0)||z;for(E>=a?Yl(this,y):(a=E,y=rl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=la(this,b,0)||z;E>=a?Yl(this,y):(a=E,y=rl(this))}}Yl(this,y)};function Cv(a,y,x){var b=ec(a,y),E=a.tc[y],z=K1(a,y,x),tt=gy(a,y,x);for(x=0;x<E;x++)tt[x]===-1&&(tt[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var nt=!0,it;nt;)for(nt=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(nt=!0,it=z[x],z[x]=z[x+1],z[x+1]=it,it=tt[x],tt[x]=tt[x+1],tt[x+1]=it,it=b[x],b[x]=b[x+1],b[x+1]=it);for(x=z=0;x<E;x++)it=b[x],it.index=x,z+=a.nodeMinColumnSpace(it,!0),it.column=z,z+=1,z+=a.nodeMinColumnSpace(it,!1);nc(a,y,b)}function la(a,y,x){var b=ec(a,y),E=a.tc[y];x=V1(a,y,x);var z,tt=[];for(z=0;z<E;z++)tt[z]=-1;var nt=[];for(z=0;z<E;z++)nt[z]=-1;for(var it=!1,ot=!0;ot;)for(ot=!1,z=0;z<E-1;z++){var st=x[b[z].index*E+b[z+1].index],ht=x[b[z+1].index*E+b[z].index],ft=0,mt=0,xt=b[z].column,St=b[z+1].column,Ft=a.nodeMinColumnSpace(b[z],!0),Ot=a.nodeMinColumnSpace(b[z],!1),Wt=a.nodeMinColumnSpace(b[z+1],!0),Ut=a.nodeMinColumnSpace(b[z+1],!1);Ft=xt-Ft+Wt,Ot=St-Ot+Ut;var ne=b[z].sourceEdges.iterator;for(ne.reset();ne.next();)if(Wt=ne.value,Ut=Wt.fromVertex,Wt.valid&&Ut.layer===y){for(Wt=0;b[Wt]!==Ut;)Wt++;Wt<z&&(ft+=2*(z-Wt),mt+=2*(z+1-Wt)),Wt===z+1&&(ft+=1),Wt>z+1&&(ft+=4*(Wt-z),mt+=4*(Wt-(z+1)))}for(ne=b[z].destinationEdges.iterator,ne.reset();ne.next();)if(Wt=ne.value,Ut=Wt.toVertex,Wt.valid&&Ut.layer===y){for(Wt=0;b[Wt]!==Ut;)Wt++;Wt===z+1&&(mt+=1)}for(ne=b[z+1].sourceEdges.iterator,ne.reset();ne.next();)if(Wt=ne.value,Ut=Wt.fromVertex,Wt.valid&&Ut.layer===y){for(Wt=0;b[Wt]!==Ut;)Wt++;Wt<z&&(ft+=2*(z+1-Wt),mt+=2*(z-Wt)),Wt===z&&(mt+=1),Wt>z+1&&(ft+=4*(Wt-(z+1)),mt+=4*(Wt-z))}for(ne=b[z+1].destinationEdges.iterator,ne.reset();ne.next();)if(Wt=ne.value,Ut=Wt.toVertex,Wt.valid&&Ut.layer===y){for(Wt=0;b[Wt]!==Ut;)Wt++;Wt===z&&(ft+=1)}Wt=Ut=0,ne=tt[b[z].index];var fe=nt[b[z].index],_e=tt[b[z+1].index],si=nt[b[z+1].index];ne!==-1&&(Ut+=Math.abs(ne-xt),Wt+=Math.abs(ne-Ot)),fe!==-1&&(Ut+=Math.abs(fe-xt),Wt+=Math.abs(fe-Ot)),_e!==-1&&(Ut+=Math.abs(_e-St),Wt+=Math.abs(_e-Ft)),si!==-1&&(Ut+=Math.abs(si-St),Wt+=Math.abs(si-Ft)),(mt<ft-.5||mt===ft&&ht<st-.5||mt===ft&&ht===st&&Wt<Ut-.5)&&(ot=it=!0,b[z].column=Ot,b[z+1].column=Ft,st=b[z],b[z]=b[z+1],b[z+1]=st)}for(z=0;z<E;z++)b[z].index=z;return nc(a,y,b),it}Rr.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&qw)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var z=E.value;y=z.layer,b=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],b+z)}for(E.reset();E.next();)z=E.value,y=z.layer,b=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=zf(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=zf(this,y,-1)||x;x=zf(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)xy(this,y,1);for(y=this.Md-1;0<=y;y--)xy(this,y,-1);xy(this,this.Md,0)}if(a&&(ew(this,-1),ew(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=zf(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=zf(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=zf(this,y,0)||x}}else Yw(this)};function zf(a,y,x){for(var b=!1;_w(a,y,x);)b=!0;return b}function _w(a,y,x){var b,E=ec(a,y),z=a.tc[y],tt=gy(a,y,-1);if(0<x)for(b=0;b<z;b++)tt[b]=-1;var nt=gy(a,y,1);if(0>x)for(b=0;b<z;b++)nt[b]=-1;for(var it=!1,ot=!0;ot;)for(ot=!1,b=0;b<z;b++){var st=E[b].column,ht=a.nodeMinColumnSpace(E[b],!0),ft=a.nodeMinColumnSpace(E[b],!1),mt=0;0>b-1||st-E[b-1].column-1>ht+a.nodeMinColumnSpace(E[b-1],!1)?mt=st-1:mt=st,ht=b+1>=z||E[b+1].column-st-1>ft+a.nodeMinColumnSpace(E[b+1],!0)?st+1:st;var xt=ft=0,St=0;if(0>=x)for(var Ft=E[b].sourceEdges.iterator;Ft.next();){var Ot=Ft.value,Wt=Ot.fromVertex;if(Ot.valid&&Wt.layer!==y){var Ut=my(Ot),ne=Ot.portFromColOffset;Ot=Ot.portToColOffset,Wt=Wt.column,ft+=(Math.abs(st+Ot-(Wt+ne))+1)*Ut,xt+=(Math.abs(mt+Ot-(Wt+ne))+1)*Ut,St+=(Math.abs(ht+Ot-(Wt+ne))+1)*Ut}}if(0<=x)for(Ft=E[b].destinationEdges.iterator;Ft.next();)Ot=Ft.value,Wt=Ot.toVertex,Ot.valid&&Wt.layer!==y&&(Ut=my(Ot),ne=Ot.portFromColOffset,Ot=Ot.portToColOffset,Wt=Wt.column,ft+=(Math.abs(st+ne-(Wt+Ot))+1)*Ut,xt+=(Math.abs(mt+ne-(Wt+Ot))+1)*Ut,St+=(Math.abs(ht+ne-(Wt+Ot))+1)*Ut);Ot=ne=Ut=0,Ft=tt[E[b].index],Wt=nt[E[b].index],Ft!==-1&&(Ut+=Math.abs(Ft-st),ne+=Math.abs(Ft-mt),Ot+=Math.abs(Ft-ht)),Wt!==-1&&(Ut+=Math.abs(Wt-st),ne+=Math.abs(Wt-mt),Ot+=Math.abs(Wt-ht)),xt<ft||xt===ft&&ne<Ut?(ot=it=!0,E[b].column=mt):(St<ft||St===ft&&Ot<Ut)&&(ot=it=!0,E[b].column=ht)}return nc(a,y,E),a.normalize(),it}function xy(a,y,x){var b=ec(a,y),E=a.tc[y],z=K1(a,y,x),tt=[];for(x=0;x<E;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var nt=b[x].column,it=a.nodeMinColumnSpace(b[x],!0),ot=a.nodeMinColumnSpace(b[x],!1),st=0;if(tt[x]===-1)if(x===0&&x===E-1)st=nt;else if(x===0){var ht=b[x+1].column;ht-nt===ot+a.nodeMinColumnSpace(b[x+1],!0)?st=nt-1:st=nt}else x===E-1?(ht=b[x-1].column,st=nt-ht===it+a.nodeMinColumnSpace(b[x-1],!1)?nt+1:nt):(ht=b[x-1].column,it=ht+a.nodeMinColumnSpace(b[x-1],!1)+it+1,ht=b[x+1].column,ot=ht-a.nodeMinColumnSpace(b[x+1],!0)-ot-1,st=(it+ot)/2|0);else x===0&&x===E-1?st=tt[x]:x===0?(ht=b[x+1].column,ot=ht-a.nodeMinColumnSpace(b[x+1],!0)-ot-1,st=Math.min(tt[x],ot)):x===E-1?(ht=b[x-1].column,it=ht+a.nodeMinColumnSpace(b[x-1],!1)+it+1,st=Math.max(tt[x],it)):(ht=b[x-1].column,it=ht+a.nodeMinColumnSpace(b[x-1],!1)+it+1,ht=b[x+1].column,ot=ht-a.nodeMinColumnSpace(b[x+1],!0)-ot-1,it<tt[x]&&tt[x]<ot?st=tt[x]:it>=tt[x]?st=it:ot<=tt[x]&&(st=ot));st!==nt&&(z=!0,b[x].column=st)}nc(a,y,b),a.normalize()}function Gw(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),tt=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+tt>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Uw(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){b=tt.value;var nt=b.column-a.nodeMinColumnSpace(b,!0),it=b.column+a.nodeMinColumnSpace(b,!1);nt<=y&&it>=y&&(E[b.layer]=!0),nt<=x&&it>=x&&(z[b.layer]=!0)}for(nt=!0,x=!1,b=0;b<=a.Ia;b++)nt=nt&&!(E[b]&&z[b]);if(nt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function ew(a,y){for(var x=0;x<=a.Ra;x++)for(;Gw(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Uw(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=rl(a),z=wv(a);for(b=z+1;z<b;){b=z,nw(a,x,1);var tt=wv(a);tt>z?Yl(a,E):tt<z&&(z=tt,E=rl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=rl(a),z=wv(a),b=z+1;z<b;)b=z,nw(a,x,-1),tt=wv(a),tt>z?Yl(a,E):tt<z&&(z=tt,E=rl(a));a.normalize()}function nw(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(E=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)E[z]=-1;for(b.reset();b.next();){z=b.value;for(var tt=z.layer,nt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),it=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));nt<=it;nt++)E[tt*(a.Ra+1)+nt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt+1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt+1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt-1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt-1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(it=tt[tt.length-1],tt.pop(),E[it])for(E[it]=!1,z=0;z<a.le;z++)y[it*a.le+z]&&tt.splice(0,0,z);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Yw(a){for(var y=Ne(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new pn,Xw(y,x);var z=null,tt=null,nt=null,it=null,ot=(a.ve&1)!==0,st=(a.ve&2)!==0,ht=(a.ve&4)!==0,ft=(a.ve&8)!==0;for(ot&&(a.verticalAlignment(y,x,!0),z=Sv(a,y,!0,!1)),y.reverse(),ht&&(a.verticalAlignment(y,x,!1),nt=Sv(a,y,!1,!1)),b=xn(y),E=b.next();!E.done;E=b.next())E.value.reverse();ft&&(a.verticalAlignment(y,x,!1),it=Sv(a,y,!1,!0)),y.reverse(),st&&(a.verticalAlignment(y,x,!0),tt=Sv(a,y,!0,!0)),Fe(y),a.u(z,tt,nt,it),a.network.vertexes.each(function(mt){var xt=Ne();ot&&xt.push(z.get(mt)),st&&xt.push(tt.get(mt)),ht&&xt.push(nt.get(mt)),ft&&xt.push(it.get(mt)),xt.sort(function(Ft,Ot){return Ft-Ot});var St=xt.length;St=(xt[Math.floor((St-1)/2)]+xt[Math.ceil((St-1)/2)])/2,Fe(xt),mt.zc=St})}function Xw(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,tt=a[b],nt=a[b+1],it=0;z<nt.length;it++){var ot=nt[it];t:{if(ot.node===null){var st=Ny(ot);if(0<st.length){st=st[0].node===null;break t}}st=!1}var ht=st;if(it===nt.length-1||ht){for(st=tt.length-1,ht&&(st=Ny(ot)[0].index);z<=it;){if(ot=nt[z],!ot.bo){ht=[];for(var ft=xn(ot.sourceEdgesArrayAccess),mt=ft.next();!mt.done;mt=ft.next())mt=mt.value,mt.valid&&ht.push(mt);ot.bo=ht}for(ot=xn(ot.bo),ht=ot.next();!ht.done;ht=ot.next())ht=ht.value,ft=ht.fromVertex.index,(ft<E||ft>st)&&y.add(ht);z++}E=st}}}Rr.prototype.verticalAlignment=function(a,y,x){Jw(a),a=xn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=xn(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var tt=x?Ny(z):tC(z),nt=tt.length;if(0<nt){tt.sort(function(ht,ft){return ht.vi-ft.vi});var it=(nt-1)/2;for(nt=Math.floor(it),it=Math.ceil(it);nt<=it;nt++)if(z.align===z){var ot=tt[nt],st=void 0;st=x?Tv(ot,z):Tv(z,ot),!y.contains(st)&&E<ot.vi&&(ot.align=z,z.root=ot.root,z.align=ot.root,E=ot.vi)}}}}};function Jw(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Sv(a,y,x,b){for(var E=a.K===90||a.K===270,z=xn(y),tt=z.next();!tt.done;tt=z.next()){var nt=xn(tt.value);for(tt=nt.next();!tt.done;tt=nt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=xn(y),nt=z.next();!nt.done;nt=z.next()){nt=xn(nt.value);for(var it=nt.next();!it.done;it=nt.next())if(it=it.value,it.root===it){for(var ot=0,st=it;st.align!==it;){var ht=st.align,ft=tt?st.width:st.height,mt=tt?ht.width:ht.height;if(x){var xt=Tv(st,ht),St=xt.portFromPos,Ft=xt.portToPos;xt.link!==null&&(st.node&&st.node!==xt.link.fromNode&&(St=tt?st.focusX:st.focusY),ht.node&&ht.node!==xt.link.toNode&&(Ft=tt?ht.focusX:ht.focusY))}else xt=Tv(ht,st),St=xt.portToPos,Ft=xt.portFromPos,xt.link!==null&&(st.node&&st.node!==xt.link.toNode&&(St=tt?st.focusX:st.focusY),ht.node&&ht.node!==xt.link.fromNode&&(Ft=tt?ht.focusX:ht.focusY));ft=b?st.qg+(ft-St)-(mt-Ft):st.qg+St-Ft,ht.qg=ft,ot=Math.min(ot,ft),st=st.align}st=it;do st.qg=st.qg-ot,st=st.align;while(st!==it)}}for(x=xn(y),tt=x.next();!tt.done;tt=x.next())for(z=xn(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&iw(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,nt=0;do{for(z=y[tt][nt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(nt=rw(z,y),nt.sd.shift=Math.min(nt.sd.shift,z.sd.shift+z.zc+z.qg-(nt.zc+nt.qg+(E?nt.width:nt.height)+a.columnSpacing)));nt=z.vi+1}while(tt<y.length&&nt<y[tt].length&&z.sd===y[tt][nt].sd)}for(a=new ai,y=xn(y),tt=y.next();!tt.done;tt=y.next())for(x=xn(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=E?tt.width:tt.height,a.add(tt,b?-tt.zc-z:tt.zc);return a}function iw(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rw(b,x),z=E.root;iw(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+E.qg+tt-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rw(a,y){var x=a.Tz;return a=a.vi,1>a&&Rt("Could not determine previous vertex in layer"),y[x][a-1]}Rr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Ne(),E=Ne(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var nt=Qw(this,y[tt],b,E,tt);nt<z&&(x=tt,z=nt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?b[x]-b[tt]:E[x]-E[tt],z.delta!==0&&y[tt].each(function(it){return function(ot){ot.value+=it.delta}}(z)));Fe(b),Fe(E)};function Qw(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(nt){var it=nt.key;nt=nt.value,it=a.K===90||a.K===270?it.width:it.height,nt<z&&(z=nt),nt+it>tt&&(tt=nt+it)}),x[E]=z,b[E]=tt,tt-z}Rr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=bv(this,!0),y=bv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function bv(a,y){return a.K===270?y?vo:ts:a.K===90?y?ts:vo:a.K===180?y?Zo:Wo:y?Wo:Zo}Rr.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var z=1/0,tt=E=1/0,nt=-1/0;a.next();){var it=a.value,ot=it.layer,st=it.column|0;b?(tt=y.x+this.kc*st,ot=this.Kd[ot]):(tt=this.Kd[ot],ot=y.y+this.kc*st),it.centerX=tt,it.centerY=ot,x&&isFinite(it.zc)&&(b?it.node?it.x=y.x+it.zc:it.centerX=y.x+it.zc:it.node?it.y=y.y+it.zc:it.centerY=y.y+it.zc),z=Math.min(it.x,z),E=Math.min(it.y,E),b?(tt=z,nt=Math.max(nt,it.bounds.right)):(tt=E,nt=Math.max(nt,it.bounds.bottom))}for(this.xw=nt-tt,z=y.x-z,y=y.y-E,this.Rf=new Lt(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Rr.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new un(0,0,x,Math.abs(this.Ta[0]))):y.push(new un(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new un(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new un(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new un(0,0,Math.abs(this.Ta[0]),x)):y.push(new un(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new un(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new un(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Rr.prototype.commitLayers=function(){},Rr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,z=b.toNode,tt=b.fromPort,nt=b.toPort;if(E!==null){var it=E.findVisibleNode();it!==null&&it!==E&&(E=it,tt=it.port)}z!==null&&(it=z.findVisibleNode(),it!==null&&it!==z&&(z=it,nt=it.port));var ot=y.computeSpot(!0,tt);it=y.computeSpot(!1,nt);var st=x.fromVertex,ht=x.toVertex;if(x.valid)y.curve===Fl&&y.pointsCount===4&&(st.column===ht.column&&this.alignOption===0?(x=y.getLinkPoint(E,tt,ot,!0,!1,z,nt),nt=y.getLinkPoint(z,nt,it,!1,!1,E,tt),x.w()||x.set(E.actualBounds.center),nt.w()||nt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+nt.x)/3,(2*x.y+nt.y)/3),y.yf((x.x+2*nt.x)/3,(x.y+2*nt.y)/3),y.yf(nt.x,nt.y)):(x=b=!1,tt!==null&&ot===mr&&(b=!0),nt!==null&&it===mr&&(x=!0),(b||x)&&(it=null,b&&(it=y.getLinkPointFromPoint(E,tt,tt.ga(cr),y.i(3),!0),it.w()||it.set(E.actualBounds.center),y.L(0,it.x,it.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,nt,nt.ga(cr),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),it&&(z=y.i(2),y.L(1,(2*it.x+z.x)/3,(2*it.y+z.y)/3)),E&&(z=y.i(1),y.L(2,(2*E.x+z.x)/3,(2*E.y+z.y)/3))))),y.zf();else if(st.layer===ht.layer)y.zf();else{var ft=!1,mt=!1,xt=this.ie,St=y.firstPickIndex+1;if(y.isOrthogonal){mt=!0;var Ft=y.pointsCount;4<Ft&&y.points.removeRange(2,Ft-3)}else if(y.curve===Fl)ft=!0,Ft=y.pointsCount,4<Ft&&y.points.removeRange(2,Ft-3),Ft===4&&(St=2);else{Ft=y.pointsCount;var Ot=ot===mr,Wt=it===mr;2<Ft&&Ot&&Wt?y.points.removeRange(1,Ft-2):3<Ft&&Ot&&!Wt?y.points.removeRange(1,Ft-3):3<Ft&&!Ot&&Wt?y.points.removeRange(2,Ft-2):4<Ft&&!Ot&&!Wt&&y.points.removeRange(2,Ft-3)}if(x.rev){for(;ht!==null&&st!==ht;){var Ut=Ft=null;for(Ot=ht.sourceEdges.iterator;Ot.next()&&(Wt=Ot.value,Wt.link!==x.link||(Ft=Wt.fromVertex,Ut=Wt.toVertex,Ft.node!==null)););if(Ft===null)break;if(Ft!==st){Ot=y.i(St-1).x,Wt=y.i(St-1).y;var ne=Ft.centerX,fe=Ft.centerY;if(mt)this.K===180||this.K===0?St===y.firstPickIndex+1?(y.m(St++,Ot,Wt),y.m(St++,Ot,fe)):(Ut!==null?Ut.centerY:Wt)!==fe&&(Ut=this.Ta[Ft.layer-1]+this.Rf.x,y.m(St++,Ut,Wt),y.m(St++,Ut,fe)):St===y.firstPickIndex+1?(y.m(St++,Ot,Wt),y.m(St++,ne,Wt)):(Ut!==null?Ut.centerX:Ot)!==ne&&(Ut=this.Ta[Ft.layer-1]+this.Rf.y,y.m(St++,Ot,Ut),y.m(St++,ne,Ut));else if(St===y.firstPickIndex+1){Ut=Math.max(10,this.he[ht.layer]);var _e=Math.max(10,this.Ld[ht.layer]);if(ft)this.K===180?ne<=ht.bounds.x?(ht=ht.bounds.x,y.m(St++,ht-Ut,fe),y.m(St++,ht,fe),y.m(St++,ht+_e,fe)):(y.m(St++,ne-Ut,fe),y.m(St++,ne,fe),y.m(St++,ne+_e,fe)):this.K===90?fe>=ht.bounds.bottom?(ht=ht.bounds.y+ht.bounds.height,y.m(St++,ne,ht+_e),y.m(St++,ne,ht),y.m(St++,ne,ht-Ut)):(y.m(St++,ne,fe+_e),y.m(St++,ne,fe),y.m(St++,ne,fe-Ut)):this.K===270?fe<=ht.bounds.y?(ht=ht.bounds.y,y.m(St++,ne,ht-Ut),y.m(St++,ne,ht),y.m(St++,ne,ht+_e)):(y.m(St++,ne,fe-Ut),y.m(St++,ne,fe),y.m(St++,ne,fe+_e)):this.K===0&&(ne>=ht.bounds.right?(ht=ht.bounds.x+ht.bounds.width,y.m(St++,ht+_e,fe),y.m(St++,ht,fe),y.m(St++,ht-Ut,fe)):(y.m(St++,ne+_e,fe),y.m(St++,ne,fe),y.m(St++,ne-Ut,fe)));else{y.m(St++,Ot,Wt);var si=0;this.K===180||this.K===0?((this.K===180?ne>=ht.bounds.right:ne<=ht.bounds.x)&&(si=(this.K===0?-Ut:_e)/2),y.m(St++,Ot+si,fe)):((this.K===270?fe>=ht.bounds.bottom:fe<=ht.bounds.y)&&(si=(this.K===90?-Ut:_e)/2),y.m(St++,ne,Wt+si)),y.m(St++,ne,fe)}}else Ut=Math.max(10,this.he[Ft.layer]),_e=Math.max(10,this.Ld[Ft.layer]),ft?this.K===180?(y.m(St++,ne-Ut-xt,fe),y.m(St++,Math.min(ne-Ut+xt/2,ne),fe),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,Math.max(ne+_e-xt/2,ne),fe),y.m(St++,ne+_e+xt,fe)):this.K===90?(y.m(St++,ne,fe+_e+xt),y.m(St++,ne,Math.max(fe+_e-xt/2,fe)),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,ne,Math.min(fe-Ut+xt/2,fe)),y.m(St++,ne,fe-Ut-xt)):this.K===270?(y.m(St++,ne,fe-Ut-xt),y.m(St++,ne,Math.min(fe-Ut+xt/2,fe)),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,ne,Math.max(fe+_e-xt/2,fe)),y.m(St++,ne,fe+_e+xt)):(y.m(St++,ne+_e+xt,fe),y.m(St++,Math.max(ne+_e-xt/2,ne),fe),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,Math.min(ne-Ut+xt/2,ne),fe),y.m(St++,ne-Ut-xt,fe)):y.m(St++,ne,fe)}ht=Ft}(nt===null||ot!==mr||mt)&&(Ot=y.i(St-1).x,Wt=y.i(St-1).y,ne=y.i(St).x,fe=y.i(St).y,mt?(xt=this.Ld[st.layer],this.K===180||this.K===0?(mt=Wt,mt>=st.bounds.y&&mt<=st.bounds.bottom&&(this.K===180?ne>=st.bounds.x:ne<=st.bounds.right)&&(ht=st.centerX+(this.K===180?-xt:xt),mt<st.bounds.y+st.bounds.height/2?mt=st.bounds.y-this.kc/2:mt=st.bounds.bottom+this.kc/2,y.m(St++,ht,Wt),y.m(St++,ht,mt)),y.m(St++,ne,mt)):(mt=Ot,mt>=st.bounds.x&&mt<=st.bounds.right&&(this.K===270?fe>=st.bounds.y:fe<=st.bounds.bottom)&&(ht=st.centerY+(this.K===270?-xt:xt),mt<st.bounds.x+st.bounds.width/2?mt=st.bounds.x-this.kc/2:mt=st.bounds.right+this.kc/2,y.m(St++,Ot,ht),y.m(St++,mt,ht)),y.m(St++,mt,fe)),y.m(St++,ne,fe)):ft?(Ut=Math.max(10,this.he[st.layer]),_e=Math.max(10,this.Ld[st.layer]),this.K===180&&ne>=st.bounds.x?(ht=st.bounds.x+st.bounds.width,y.L(St-2,ht,Wt),y.L(St-1,ht+_e,Wt)):this.K===90&&fe<=st.bounds.bottom?(ht=st.bounds.y,y.L(St-2,Ot,ht),y.L(St-1,Ot,ht-Ut)):this.K===270&&fe>=st.bounds.y?(ht=st.bounds.y+st.bounds.height,y.L(St-2,Ot,ht),y.L(St-1,Ot,ht+_e)):this.K===0&&ne<=st.bounds.right&&(ht=st.bounds.x,y.L(St-2,ht,Wt),y.L(St-1,ht-Ut,Wt))):(Ut=Math.max(10,this.he[st.layer]),_e=Math.max(10,this.Ld[st.layer]),mt=0,this.K===180||this.K===0?((this.K===180?ne<=st.bounds.x:ne>=st.bounds.right)&&(mt=(this.K===0?_e:-Ut)/2),y.m(St++,ne+mt,Wt)):((this.K===270?fe<=st.bounds.y:fe>=st.bounds.bottom)&&(mt=(this.K===90?_e:-Ut)/2),y.m(St++,Ot,fe+mt)),y.m(St++,ne,fe)))}else{for(;st!==null&&st!==ht;){for(Ut=Ft=null,st=st.destinationEdges.iterator;st.next()&&(Ot=st.value,Ot.link!==x.link||(Ft=Ot.toVertex,Ut=Ot.fromVertex,Ut.node!==null&&(Ut=null),Ft.node!==null)););if(Ft===null)break;Ft!==ht&&(Ot=y.i(St-1).x,Wt=y.i(St-1).y,ne=Ft.centerX,fe=Ft.centerY,mt?this.K===180||this.K===0?(Ut!==null?Ut.centerY:Wt)!==fe&&(Ut=this.Ta[Ft.layer]+this.Rf.x,St===y.firstPickIndex+1&&(Ut=this.K===0?Math.max(Ut,Ot):Math.min(Ut,Ot)),y.m(St++,Ut,Wt),y.m(St++,Ut,fe)):(Ut!==null?Ut.centerX:Ot)!==ne&&(Ut=this.Ta[Ft.layer]+this.Rf.y,St===y.firstPickIndex+1&&(Ut=this.K===90?Math.max(Ut,Wt):Math.min(Ut,Wt)),y.m(St++,Ot,Ut),y.m(St++,ne,Ut)):(Ut=Math.max(10,this.he[Ft.layer]),_e=Math.max(10,this.Ld[Ft.layer]),ft?this.K===180?(y.m(St++,ne+_e+xt,fe),y.m(St++,Math.max(ne+_e-xt/2,ne),fe),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,Math.min(ne-Ut+xt/2,ne),fe),y.m(St++,ne-Ut-xt,fe)):this.K===90?(y.m(St++,ne,fe-Ut-xt),y.m(St++,ne,Math.min(fe-Ut+xt/2,fe)),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,ne,Math.max(fe+_e-xt/2,fe)),y.m(St++,ne,fe+_e+xt)):this.K===270?(y.m(St++,ne,fe+_e+xt),y.m(St++,ne,Math.max(fe+_e-xt/2,fe)),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,ne,Math.min(fe-Ut+xt/2,fe)),y.m(St++,ne,fe-Ut-xt)):(y.m(St++,ne-Ut-xt,fe),y.m(St++,Math.min(ne-Ut+xt/2,ne),fe),y.m(St++,ne,fe),y.m(St++,ne,fe),y.m(St++,Math.max(ne+_e-xt/2,ne),fe),y.m(St++,ne+_e+xt,fe)):this.K===180?(y.m(St++,ne+_e,fe),y.m(St++,ne-Ut,fe)):this.K===90?(y.m(St++,ne,fe-Ut),y.m(St++,ne,fe+_e)):this.K===270?(y.m(St++,ne,fe+_e),y.m(St++,ne,fe-Ut)):(y.m(St++,ne-Ut,fe),y.m(St++,ne+_e,fe)))),st=Ft}mt&&(Ot=y.i(St-1).x,Wt=y.i(St-1).y,ne=y.i(St).x,fe=y.i(St).y,this.K===180||this.K===0?Wt!==fe&&(Ut=this.K===0?Math.min(Math.max((ne+Ot)/2,this.Ta[ht.layer]+this.Rf.x),ne):Math.max(Math.min((ne+Ot)/2,this.Ta[ht.layer]+this.Rf.x),ne),y.m(St++,Ut,Wt),y.m(St++,Ut,fe)):Ot!==ne&&(Ut=this.K===90?Math.min(Math.max((fe+Wt)/2,this.Ta[ht.layer]+this.Rf.y),fe):Math.max(Math.min((fe+Wt)/2,this.Ta[ht.layer]+this.Rf.y),fe),y.m(St++,Ot,Ut),y.m(St++,ne,Ut)))}b!==null&&ft&&4<=y.pointsCount&&(tt!==null&&(tt=ot===mr?y.getLinkPointFromPoint(E,tt,tt.ga(cr),y.i(3),!0):y.i(0),ot===mr&&(ot=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+ot.x)/2,ot.y),y.L(2,b.x,(ot.y+b.y)/2)):(y.L(1,ot.x,(tt.y+ot.y)/2),y.L(2,(ot.x+b.x)/2,b.y))),tt.w()||tt.set(E.actualBounds.center),y.L(0,tt.x,tt.y)),nt!==null&&(E=it===mr?y.getLinkPointFromPoint(z,nt,nt.ga(cr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),it===mr&&(nt=y.i(y.pointsCount-3),it=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+nt.x)/2,nt.y),y.L(y.pointsCount-2,it.x,(nt.y+it.y)/2)):(y.L(y.pointsCount-2,nt.x,(E.y+nt.y)/2),y.L(y.pointsCount-3,(nt.x+it.x)/2,it.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Rr.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new $e,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var z=b.i(E),tt=b.i(E+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var nt=new ic;nt.layer=Math.floor(z.y/2);var it=b.i(0),ot=b.i(b.pointsCount-1);if(nt.first=it.x*it.x+it.y,nt.jc=ot.x*ot.x+ot.y,nt.rd=Math.min(z.x,tt.x),nt.Ic=Math.max(z.x,tt.x),nt.index=E,nt.link=b,E+2<b.pointsCount){it=b.i(E-1),ot=b.i(E+2);var st=0;it.y<z.y?st=ot.y<z.y?3:z.x<tt.x?2:1:it.y>z.y&&(st=ot.y>z.y?0:tt.x<z.x?2:1),nt.j=st}x.push(nt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),st=1,nt=x[z].jc,it=z;it<E;it++)ot=x[it],ot.jc!==nt&&(st++,nt=ot.jc);this.zi(x,this.Ux,z,z+tt);var ht=1;for(nt=x[z].first,it=z;it<E;it++)ot=x[it],ot.first!==nt&&(ht++,nt=ot.first);for(it=!0,ot=ht,st<ht?(it=!1,ot=st,nt=x[z].jc,this.zi(x,this.Js,z,z+tt)):nt=x[z].first,st=0,ht=z;ht<E;ht++){var ft=x[ht];(it?ft.first:ft.jc)!==nt&&(st++,nt=it?ft.first:ft.jc);var mt=ft.link;z=mt.i(ft.index),tt=mt.i(ft.index+1);var xt=this.linkSpacing*(st-(ot-1)/2);y++,mt.uh(),mt.L(ft.index,z.x,z.y+xt),mt.L(ft.index+1,tt.x,tt.y+xt),mt.zf()}}z=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)z=b.i(E),tt=b.i(E+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(nt=new ic,nt.layer=Math.floor(z.x/2),it=b.i(0),ot=b.i(b.pointsCount-1),nt.first=it.x+it.y*it.y,nt.jc=ot.x+ot.y*ot.y,nt.rd=Math.min(z.y,tt.y),nt.Ic=Math.max(z.y,tt.y),nt.index=E,nt.link=b,E+2<b.pointsCount&&(it=b.i(E-1),ot=b.i(E+2),st=0,it.x<z.x?st=ot.x<z.x?3:z.y<tt.y?2:1:it.x>z.x&&(st=ot.x>z.x?0:tt.y<z.y?2:1),nt.j=st),x.push(nt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),st=1,nt=x[z].jc,it=z;it<E;it++)ot=x[it],ot.jc!==nt&&(st++,nt=ot.jc);for(this.zi(x,this.Ux,z,z+tt),ht=1,nt=x[z].first,it=z;it<E;it++)ot=x[it],ot.first!==nt&&(ht++,nt=ot.first);for(it=!0,ot=ht,st<ht?(it=!1,ot=st,nt=x[z].jc,this.zi(x,this.Js,z,z+tt)):nt=x[z].first,st=0,ht=z;ht<E;ht++)ft=x[ht],(it?ft.first:ft.jc)!==nt&&(st++,nt=it?ft.first:ft.jc),mt=ft.link,z=mt.i(ft.index),tt=mt.i(ft.index+1),xt=this.linkSpacing*(st-(ot-1)/2),y++,mt.uh(),mt.L(ft.index,z.x+xt,z.y),mt.L(ft.index+1,tt.x+xt,tt.y),mt.zf()}z=E}a=b}}}},yt=Rr.prototype,yt.Vx=function(a,y){return a instanceof ic&&y instanceof ic&&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},yt.Ux=function(a,y){return a instanceof ic&&y instanceof ic&&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},yt.Js=function(a,y){return a instanceof ic&&y instanceof ic&&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},yt.B=function(a,y){return a-=y,-1<a&&1>a},yt.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&Rt("not in range 0 <= from < length: "+x),z===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function ec(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function nc(a,y,x){a.He[a.tc[y]]=x}$n.Object.defineProperties(Rr.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):Rt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==wy&&a!==Ev&&a!==xm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Mv&&a!==Cy&&a!==Sy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Pv&&a!==by&&a!==Ey||(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!==My&&a!==Nv&&a!==Py||(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 Ev=new yn(Rr,"CycleDepthFirst",0),wy=new yn(Rr,"CycleGreedy",1),xm=new yn(Rr,"CycleFromLayers",2),Mv=new yn(Rr,"LayerOptimalLinkLength",0),Cy=new yn(Rr,"LayerLongestPathSink",1),Sy=new yn(Rr,"LayerLongestPathSource",2),Pv=new yn(Rr,"InitDepthFirstOut",0),by=new yn(Rr,"InitDepthFirstIn",1),Ey=new yn(Rr,"InitNaive",2),My=new yn(Rr,"AggressiveNone",0),Nv=new yn(Rr,"AggressiveLess",1),Py=new yn(Rr,"AggressiveMore",2),qw=8;Rr.className="LayeredDigraphLayout",Rr.CycleDepthFirst=Ev,Rr.CycleGreedy=wy,Rr.CycleFromLayers=xm,Rr.LayerOptimalLinkLength=Mv,Rr.LayerLongestPathSink=Cy,Rr.LayerLongestPathSource=Sy,Rr.InitDepthFirstOut=Pv,Rr.InitDepthFirstIn=by,Rr.InitNaive=Ey,Rr.AggressiveNone=My,Rr.AggressiveLess=Nv,Rr.AggressiveMore=Py,Rr.PackNone=0,Rr.PackExpand=1,Rr.PackStraighten=2,Rr.PackMedian=4,Rr.PackAll=15,Rr.AlignNone=0,Rr.AlignUpperLeft=1,Rr.AlignUpperRight=2,Rr.AlignLowerLeft=4,Rr.AlignLowerRight=8,Rr.AlignAll=15;function ic(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}ic.className="SegInfo";function $f(a){Wr.call(this,a)}Xn($f,Wr),$f.prototype.createVertex=function(){return new Xl(this)},$f.prototype.createEdge=function(){return new wm(this)},$f.className="LayeredDigraphNetwork";function Xl(a){Ho.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}Xn(Xl,Ho);function ow(a,y){return a.index-y.index}function Tv(a,y){if(!a.$n){for(var x=[],b=xn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=xn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Rt("Unable to find destination edge to given vertex")}function Ny(a){if(!a.co){for(var y=[],x=xn(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ow),a.co=y}return a.co}function tC(a){if(!a.ao){for(var y=[],x=xn(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ow),a.ao=y}return a.ao}Xl.prototype.Cl=function(a){Ho.prototype.Cl.call(this,a),this.bo=this.co=null},Xl.prototype.Kl=function(a){Ho.prototype.Kl.call(this,a),this.bo=this.co=null},Xl.prototype.zl=function(a){Ho.prototype.zl.call(this,a),this.$n=this.ao=null},Xl.prototype.Jl=function(a){Ho.prototype.Jl.call(this,a),this.$n=this.ao=null},$n.Object.defineProperties(Xl.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)}}}),Xl.prototype.deleteDestinationEdge=Xl.prototype.Jl,Xl.prototype.addDestinationEdge=Xl.prototype.zl,Xl.prototype.deleteSourceEdge=Xl.prototype.Kl,Xl.prototype.addSourceEdge=Xl.prototype.Cl,Xl.className="LayeredDigraphVertex";function wm(a){Cl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Xn(wm,Cl),$n.Object.defineProperties(wm.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)}}}),wm.className="LayeredDigraphEdge";function pr(a){no.call(this),this.Ub=new pn,this.Wn=Dv,this.ud=pu,this.vo=Av,this.Bq=jy,this.$v=[],this.td=!0,this.Rb=Fv,this.$d=new kn(10,10).freeze();var y=new Id(this);this.W=new aa(y),this.Y=new aa(y),this.ru=[],a&&Object.assign(this,a)}Xn(pr,no),pr.prototype.cloneProtected=function(a){no.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)},pr.prototype.qb=function(a){a.classType===pr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Rt("Unknown enum value: "+a):no.prototype.qb.call(this,a)},pr.prototype.createNetwork=function(){return new Id(this)},pr.prototype.makeNetwork=function(a){function y(b){if(b instanceof hi)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof ei){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Ge?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof rr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},pr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Bv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Ge&&(y=a),this.path===Dv&&y!==null?this.ud=y.isTreePathToChildren?pu:Ld:this.ud=this.path===Dv?pu: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 pn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof hi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof aa&&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,Ty(this,y));for(y=this.network.vertexes,a=null;a=eC(y),0<a.count;)y=sw(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ty(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof aa&&aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof aa&&uw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof aa&&hw(this,y);if(this.Cu(),this.layerStyle===Rv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===zy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var z=y.children[E];b=Math.max(b,x?z.width:z.height)}if(0<=b)for(E=0;E<y.children.length;E++)z=y.children[E],x?(y.angle===180&&(z.focusX+=b-z.width),z.width=b):(y.angle===270&&(z.focusY+=b-z.height),z.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof aa&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new pn,this.isValidLayout=!0};function eC(a){var y=new pn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}pr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case pu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Ld:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Rt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=sw(this,a),a!==null&&this.Ub.add(a))};function sw(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case pu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Ld:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Rt("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case pu:if(0<y.destinationEdges.count){for(var x=new $e,b=y.destinationVertexes;b.next();){var E=b.value;lw(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Ld:if(0<y.sourceEdges.count){for(x=new $e,b=y.sourceVertexes;b.next();)E=b.value,lw(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Rt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var z=x[E];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<b;y++)Ty(a,x[y])}}function lw(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}pr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var z=E=0;z<x.length;z++)x[z]!==y&&(b[E++]=x[z]);a.children=b}}};function aw(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===vu&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,tt=z.length,nt=0;nt<tt;nt++){var it=z[nt];aw(a,it),x+=it.descendantCount+1,b=Math.max(b,it.maxChildrenCount),E=Math.max(E,it.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function nC(a,y){switch(a.vo){default:case Av:return y.parent!==null?y.parent:a.W;case By:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Fy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ay:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,z=0;z<E;z++)if(0<b[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}pr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(nC(this,a)),a.parent!==null&&a.parent.alignment===vu){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function uw(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)uw(a,y[b])}}pr.prototype.assignTreeVertexValues=function(){};function hw(a,y){if(y!==null){y.alignment!==vu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)hw(a,y[b])}}pr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Hf:break;case Sm:a.children.reverse();break;case bm:a.children.sort(a.comparer);break;case Em:a.children.sort(a.comparer),a.children.reverse();break;default:Rt("Unhandled sorting value "+a.sorting.toString())}},pr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},pr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=rc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,tt=0,nt=0,it=a.commentSpacing;if(a.node!==null)for(var ot=a.node.Mu();ot.next();){var st=ot.value;st.category==="Comment"&&st.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(st),st.Va(),st=st.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,st.width),tt+=st.height+Math.abs(nt)):(z+=st.width+Math.abs(nt),tt=Math.max(tt,st.height)),nt=it)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=un.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=E,un.free(E))};function rc(a){return a===mh||a===vu||a===gh||a===Au}function Cm(a){return a===mh||a===vu}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(rc(x)){if(Cm(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===gh)return!0}}return!1}pr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,z=!1;x!==null&&(E=x.angle,z=x.alignment,z=rc(z)),b=b===90||b===270,x=E===90||E===270;for(var tt=a.childrenCount===0,nt=ky(a),it=0,ot=a.comments,st=ot.length,ht=Lt.alloc(),ft=0;ft<st;ft++){var mt=ot[ft],xt=mt.measuredBounds;if(b&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<E&&!z||x&&nt)if(0<=a.commentMargin)for(ht.h(a.bounds.x-a.commentMargin-xt.width,a.bounds.y+it),mt.move(ht),mt=mt.Sd();mt.next();){var St=mt.value;St.fromSpot=Zo,St.toSpot=Wo}else for(ht.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+it),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=Wo,St.toSpot=Zo;else if(0<=a.commentMargin)for(ht.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+it),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=Wo,St.toSpot=Zo;else for(ht.h(a.bounds.x+a.commentMargin-xt.width,a.bounds.y+it),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=Zo,St.toSpot=Wo;it=0<=a.commentSpacing?it+(xt.height+a.commentSpacing):it+(a.commentSpacing-xt.height)}else{if(135<E&&!z||!x&&nt)if(0<=a.commentMargin)for(ht.h(a.bounds.x+it,a.bounds.y-a.commentMargin-xt.height),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=vo,St.toSpot=ts;else for(ht.h(a.bounds.x+it,a.bounds.y+2*a.focus.y-a.commentMargin),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=ts,St.toSpot=vo;else if(0<=a.commentMargin)for(ht.h(a.bounds.x+it,a.bounds.y+2*a.focus.y+a.commentMargin),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=ts,St.toSpot=vo;else for(ht.h(a.bounds.x+it,a.bounds.y+a.commentMargin-xt.height),mt.move(ht),mt=mt.Sd();mt.next();)St=mt.value,St.fromSpot=vo,St.toSpot=ts;it=0<=a.commentSpacing?it+(xt.width+a.commentSpacing):it+(a.commentSpacing-xt.width)}}if(Lt.free(ht),y=it-a.commentSpacing-(b?y.height:y.width),this.ud===pu)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},pr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case Iv:cw(this,a);break;case Mm:if(a.alignment===vu)cw(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=rc(x)),b=ky(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=Ma(a);y=E===90||E===270;var z=0,tt=a.children,nt=tt.length;for(x=0;x<nt;x++)b=tt[x],z=Math.max(z,y?b.Da.width:b.Da.height);var it=a.alignment;b=it===mu;var ot=it===gu,st=rc(it),ht=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ft=a.nodeSpacing,mt=this.computeNodeIndent(a),xt=a.rowSpacing,St=0;(b||ot||a.hm||a.im&&a.maxGenerationCount===1)&&(St=Math.max(0,a.rowIndent)),b=a.width;var Ft=a.height,Ot=0,Wt=0,Ut=0,ne=null,fe=null,_e=0,si=0,bi=0,mi=0,qn=0,Fn=0,ir=0,Gi=0;if(st&&!Cm(it)&&135<E&&tt.reverse(),Cm(it))if(1<nt)for(var kr=0;kr<nt;kr++)kr%2===0&&kr!==nt-1&&(Gi=Math.max(Gi,y?tt[kr].Da.width:tt[kr].Da.height));else nt===1&&(Gi=y?tt[0].Da.width:tt[0].Da.height);if(st){switch(it){case mh:Wt=135>E?dw(this,a,tt,Gi,Ot,Wt):fw(this,a,tt,Gi,Ot,Wt),Gi=Wt.x,Ot=Wt.width,Wt=Wt.height;break;case gh:for(ne=0;ne<nt;ne++)fe=tt[ne],ht=fe.Da,Ut=Fn===0?0:xt,y?(fe.S.h(z-ht.width,mi+Ut),Ot=Math.max(Ot,ht.width),Wt=Math.max(Wt,mi+Ut+ht.height),mi+=Ut+ht.height):(fe.S.h(bi+Ut,z-ht.height),Ot=Math.max(Ot,bi+Ut+ht.width),Wt=Math.max(Wt,ht.height),bi+=Ut+ht.width),Fn++;break;case Au:for(ne=0;ne<nt;ne++)fe=tt[ne],z=fe.Da,ht=Fn===0?0:xt,y?(fe.S.h(ft/2+a.focus.x,mi+ht),Ot=Math.max(Ot,z.width),Wt=Math.max(Wt,mi+ht+z.height),mi+=ht+z.height):(fe.S.h(bi+ht,ft/2+a.focus.y),Ot=Math.max(Ot,bi+ht+z.width),Wt=Math.max(Wt,z.height),bi+=ht+z.width),Fn++}ne=ul(this,2),fe=ul(this,2),y?(ne[0].h(0,0),ne[1].h(0,Wt),fe[0].h(Ot,0)):(ne[0].h(0,0),ne[1].h(Ot,0),fe[0].h(0,Wt)),fe[1].h(Ot,Wt)}else for(kr=0;kr<nt;kr++){var Hr=tt[kr],Go=Hr.Da;if(y){0<ht&&0<Fn&&bi+ft+Go.width>ht&&(bi<z&&Zc(a,it,z-bi,0,ir,kr-1),qn++,Fn=0,ir=kr,Ut=Wt,bi=0,mi=135<E?-Wt-xt:Wt+xt),Ov(this,Hr,0,mi);var Jo=0;if(Fn===0)ne=Hr.Yo,fe=Hr.kp,_e=Go.width,si=Go.height,(ne===null||fe===null||E!==Ma(Hr))&&(ne=ul(this,2),fe=ul(this,2),ne[0].h(0,0),ne[1].h(0,si),fe[0].h(_e,0),fe[1].h(_e,si));else{var Os=Ne();si=pw(this,a,Hr,ne,fe,_e,si,Os),Jo=si.x,ne=Os[0],fe=Os[1],_e=si.width,si=si.height,Fe(Os),bi<Go.width&&0>Jo&&(Od(a,-Jo,0,ir,kr-1),Lv(ne,-Jo,0),Lv(fe,-Jo,0),Jo=0)}Hr.S.h(Jo,mi),Ot=Math.max(Ot,_e),Wt=Math.max(Wt,Ut+(qn===0?0:xt)+Go.height),bi=_e}else 0<ht&&0<Fn&&mi+ft+Go.height>ht&&(mi<z&&Zc(a,it,0,z-mi,ir,kr-1),qn++,Fn=0,ir=kr,Ut=Ot,mi=0,bi=135<E?-Ot-xt:Ot+xt),Ov(this,Hr,bi,0),Jo=0,Fn===0?(ne=Hr.Yo,fe=Hr.kp,_e=Go.width,si=Go.height,(ne===null||fe===null||E!==Ma(Hr))&&(ne=ul(this,2),fe=ul(this,2),ne[0].h(0,0),ne[1].h(_e,0),fe[0].h(0,si),fe[1].h(_e,si))):(Os=Ne(),si=pw(this,a,Hr,ne,fe,_e,si,Os),Jo=si.x,ne=Os[0],fe=Os[1],_e=si.width,si=si.height,Fe(Os),mi<Go.height&&0>Jo&&(Od(a,0,-Jo,ir,kr-1),Lv(ne,0,-Jo),Lv(fe,0,-Jo),Jo=0)),Hr.S.h(bi,Jo),Wt=Math.max(Wt,si),Ot=Math.max(Ot,Ut+(qn===0?0:xt)+Go.width),mi=si;Fn++}switch(0<qn&&(y?(Wt+=Math.max(0,x),bi<Ot&&Zc(a,it,Ot-bi,0,ir,nt-1),0<St&&(ot||Od(a,St,0,0,nt-1),Ot+=St)):(Ot+=Math.max(0,x),mi<Wt&&Zc(a,it,0,Wt-mi,ir,nt-1),0<St&&(ot||Od(a,0,St,0,nt-1),Wt+=St))),St=ot=0,it){case Zf:y?ot+=Ot/2-a.focus.x-mt/2:St+=Wt/2-a.focus.y-mt/2;break;case Dd:0<qn?y?ot+=Ot/2-a.focus.x-mt/2:St+=Wt/2-a.focus.y-mt/2:y?(Gi=tt[0].S.x+tt[0].la.x,ot+=Gi+(tt[nt-1].S.x+tt[nt-1].la.x+2*tt[nt-1].focus.x-Gi)/2-a.focus.x-mt/2):(Gi=tt[0].S.y+tt[0].la.y,St+=Gi+(tt[nt-1].S.y+tt[nt-1].la.y+2*tt[nt-1].focus.y-Gi)/2-a.focus.y-mt/2);break;case mu:y?(ot-=mt,Ot+=mt):(St-=mt,Wt+=mt);break;case gu:y?(ot+=Ot-a.width+mt,Ot+=mt):(St+=Wt-a.height+mt,Wt+=mt);break;case mh:y?1<nt?ot+=Gi+ft/2-a.focus.x:ot+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<nt?St+=Gi+ft/2-a.focus.y:St+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case gh:y?ot+=Ot+ft/2-a.focus.x:St+=Wt+ft/2-a.focus.y;break;case Au:break;default:Wt=this.customAlignment(a,ot,St,Ot,Wt),ot=Wt[0],St=Wt[1],Ot=Wt[2],Wt=Wt[3]}for(mt=0;mt<nt;mt++)Gi=tt[mt],y?Gi.S.h(Gi.S.x+Gi.la.x-ot,Gi.S.y+(135<E?(st?-Wt:-Gi.Da.height)+Gi.la.y-x:Ft+x+Gi.la.y)):Gi.S.h(Gi.S.x+(135<E?(st?-Ot:-Gi.Da.width)+Gi.la.x-x:b+x+Gi.la.x),Gi.S.y+Gi.la.y-St);if(nt=tt=0,st?y?(Ot=Oy(a,Ot,ot),0>ot&&(ot=0),135<E&&(St+=Wt+x),Wt+=Ft+x,it===Au&&(tt+=ft/2+a.focus.x),nt+=Ft+x):(135<E&&(ot+=Ot+x),Ot+=b+x,Wt=Ly(a,Wt,St),0>St&&(St=0),it===Au&&(nt+=ft/2+a.focus.y),tt+=b+x):y?(a.comments===null?b>Ot&&(Ot=Dy(it,b-Ot,0),tt=Ot.x,nt=Ot.y,Ot=b,ot=0):Ot=Oy(a,Ot,ot),0>ot&&(tt-=ot,ot=0),135<E&&(St+=Wt+x),Wt=Math.max(Math.max(Wt,Ft),Wt+Ft+x),nt+=Ft+x):(135<E&&(ot+=Ot+x),Ot=Math.max(Math.max(Ot,b),Ot+b+x),a.comments===null?Ft>Wt&&(Wt=Dy(it,0,Ft-Wt),tt=Wt.x,nt=Wt.y,Wt=Ft,St=0):Wt=Ly(a,Wt,St),0>St&&(nt-=St,St=0),tt+=b+x),0<qn)E=ul(this,4),qn=ul(this,4),y?(E[2].h(0,Ft+x),E[3].h(E[2].x,Wt),qn[2].h(Ot,E[2].y),qn[3].h(qn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Ot,E[2].y),qn[2].h(E[2].x,Wt),qn[3].h(E[3].x,qn[2].y));else{for(E=ul(this,ne.length+2),qn=ul(this,fe.length+2),it=0;it<ne.length;it++)st=ne[it],E[it+2].h(st.x+tt,st.y+nt);for(it=0;it<fe.length;it++)st=fe[it],qn[it+2].h(st.x+tt,st.y+nt)}y?(E[0].h(ot,0),E[1].h(E[0].x,Ft),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),qn[0].h(ot+b,0),qn[1].h(qn[0].x,Ft),qn[2].y<qn[1].y&&(qn[2].x<qn[0].x?qn[2].assign(qn[1]):qn[1].assign(qn[2])),qn[3].y<qn[2].y&&(qn[3].x<qn[0].x?qn[3].assign(qn[2]):qn[2].assign(qn[3])),E[2].y-=x/2,qn[2].y-=x/2):(E[0].h(0,St),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),qn[0].h(0,St+Ft),qn[1].h(b,qn[0].y),qn[2].x<qn[1].x&&(qn[2].y<qn[0].y?qn[2].assign(qn[1]):qn[1].assign(qn[2])),qn[3].x<qn[2].x&&(qn[3].y<qn[0].y?qn[3].assign(qn[2]):qn[2].assign(qn[3])),E[2].x-=x/2,qn[2].x-=x/2),Aa(this,ne),Aa(this,fe),a.Yo=E,a.kp=qn,a.la.h(ot,St),a.Da.h(Ot,Wt)}break;default:Rt("Unhandled compaction value "+a.compaction.toString())}}};function cw(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=rc(x));var E=ky(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=Ma(y),x=b===90||b===270;var z=0;E=y.children;for(var tt=E.length,nt=0;nt<tt;nt++){var it=E[nt];z=Math.max(z,x?it.Da.width:it.Da.height)}var ot=y.alignment,st=ot===mu,ht=ot===gu;nt=rc(ot);var ft=Math.max(0,y.breadthLimit);it=a.computeLayerSpacing(y);var mt=y.nodeSpacing,xt=a.computeNodeIndent(y),St=st||ht?0:xt/2,Ft=y.rowSpacing,Ot=0;(st||ht||y.hm||y.im&&y.maxGenerationCount===1)&&(Ot=Math.max(0,y.rowIndent)),st=y.width;var Wt=y.height,Ut=0,ne=0,fe=0,_e=0,si=0,bi=0,mi=0,qn=0,Fn=0,ir=0;if(nt&&!Cm(ot)&&135<b&&E.reverse(),Cm(ot))if(1<tt)for(var Gi=0;Gi<tt;Gi++){var kr=E[Gi],Hr=kr.Da;Gi%2===0&&Gi!==tt-1?Fn=Math.max(Fn,(x?Hr.width:Hr.height)+a.computeBusNodeSpacing(kr)-mt):Gi%2!==0&&(ir=Math.max(ir,(x?Hr.width:Hr.height)+a.computeBusNodeSpacing(kr)-mt))}else tt===1&&(Fn=x?E[0].Da.width:E[0].Da.height);if(nt)switch(ot){case mh:case vu:ne=135>b?dw(a,y,E,Fn,Ut,ne):fw(a,y,E,Fn,Ut,ne),Fn=ne.x,Ut=ne.width,ne=ne.height;break;case gh:for(ft=0;ft<tt;ft++)St=E[ft],fe=St.Da,ir=mi===0?0:Ft,x?(St.S.h(z-fe.width,si+ir),Ut=Math.max(Ut,fe.width),ne=Math.max(ne,si+ir+fe.height),si+=ir+fe.height):(St.S.h(_e+ir,z-fe.height),Ut=Math.max(Ut,_e+ir+fe.width),ne=Math.max(ne,fe.height),_e+=ir+fe.width),mi++;break;case Au:for(z=0;z<tt;z++)ft=E[z],St=ft.Da,fe=mi===0?0:Ft,x?(ft.S.h(mt/2+y.focus.x,si+fe),Ut=Math.max(Ut,St.width),ne=Math.max(ne,si+fe+St.height),si+=fe+St.height):(ft.S.h(_e+fe,mt/2+y.focus.y),Ut=Math.max(Ut,_e+fe+St.width),ne=Math.max(ne,St.height),_e+=fe+St.width),mi++}else for(ir=0;ir<tt;ir++)Gi=E[ir],kr=Gi.Da,x?(0<ft&&0<mi&&_e+mt+kr.width>ft&&(_e<z&&Zc(y,ot,z-_e,0,qn,ir-1),bi++,mi=0,qn=ir,fe=ne,_e=0,si=135<b?-ne-Ft:ne+Ft),Hr=mi===0?St:mt,Ov(a,Gi,0,si),Gi.S.h(_e+Hr,si),Ut=Math.max(Ut,_e+Hr+kr.width),ne=Math.max(ne,fe+(bi===0?0:Ft)+kr.height),_e+=Hr+kr.width):(0<ft&&0<mi&&si+mt+kr.height>ft&&(si<z&&Zc(y,ot,0,z-si,qn,ir-1),bi++,mi=0,qn=ir,fe=Ut,si=0,_e=135<b?-Ut-Ft:Ut+Ft),Hr=mi===0?St:mt,Ov(a,Gi,_e,0),Gi.S.h(_e,si+Hr),ne=Math.max(ne,si+Hr+kr.height),Ut=Math.max(Ut,fe+(bi===0?0:Ft)+kr.width),si+=Hr+kr.height),mi++;switch(0<bi&&(x?(ne+=Math.max(0,it),_e<Ut&&Zc(y,ot,Ut-_e,0,qn,tt-1),0<Ot&&(ht||Od(y,Ot,0,0,tt-1),Ut+=Ot)):(Ut+=Math.max(0,it),si<ne&&Zc(y,ot,0,ne-si,qn,tt-1),0<Ot&&(ht||Od(y,0,Ot,0,tt-1),ne+=Ot))),Ot=ht=0,ot){case Zf:x?ht+=Ut/2-y.focus.x-xt/2:Ot+=ne/2-y.focus.y-xt/2;break;case Dd:0<bi?x?ht+=Ut/2-y.focus.x-xt/2:Ot+=ne/2-y.focus.y-xt/2:x?(a=E[0].S.x+E[0].la.x,ht+=a+(E[tt-1].S.x+E[tt-1].la.x+2*E[tt-1].focus.x-a)/2-y.focus.x-xt/2):(a=E[0].S.y+E[0].la.y,Ot+=a+(E[tt-1].S.y+E[tt-1].la.y+2*E[tt-1].focus.y-a)/2-y.focus.y-xt/2);break;case mu:x?(ht-=xt,Ut+=xt):(Ot-=xt,ne+=xt);break;case gu:x?(ht+=Ut-y.width+xt,Ut+=xt):(Ot+=ne-y.height+xt,ne+=xt);break;case mh:case vu:x?1<tt?ht+=Fn+mt/2-y.focus.x:ht+=E[0].focus.x-y.focus.x+E[0].la.x:1<tt?Ot+=Fn+mt/2-y.focus.y:Ot+=E[0].focus.y-y.focus.y+E[0].la.y;break;case gh:x?ht+=Ut+mt/2-y.focus.x:Ot+=ne+mt/2-y.focus.y;break;case Au:break;default:a=a.customAlignment(y,ht,Ot,Ut,ne),ht=a[0],Ot=a[1],Ut=a[2],ne=a[3]}for(a=0;a<tt;a++)xt=E[a],x?xt.S.h(xt.S.x+xt.la.x-ht,xt.S.y+(135<b?(nt?-ne:-xt.Da.height)+xt.la.y-it:Wt+it+xt.la.y)):xt.S.h(xt.S.x+(135<b?(nt?-Ut:-xt.Da.width)+xt.la.x-it:st+it+xt.la.x),xt.S.y+xt.la.y-Ot);x?(Ut=Oy(y,Ut,ht),0>ht&&(ht=0),135<b&&(Ot+=ne+it),ne=Math.max(Math.max(ne,Wt),ne+Wt+it)):(135<b&&(ht+=Ut+it),Ut=Math.max(Math.max(Ut,st),Ut+st+it),ne=Ly(y,ne,Ot),0>Ot&&(Ot=0)),y.la.h(ht,Ot),y.Da.h(Ut,ne)}}pr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function dw(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new un(b,0,E,z);if(tt===1)return y=x[0],E=y.Da.width,z=y.Da.height,new un(b,0,E,z);for(var nt=y.nodeSpacing,it=y.rowSpacing,ot=Ma(y)===90,st=0,ht=0,ft=0,mt=0;mt<tt;mt++)if(!(mt%2!==0||1<tt&&mt===tt-1)){var xt=x[mt],St=xt.Da,Ft=st===0?0:it;if(ot){var Ot=a.computeBusNodeSpacing(xt)-nt;xt.S.h(b-(St.width+Ot),ft+Ft),E=Math.max(E,St.width+Ot),z=Math.max(z,ft+Ft+St.height),ft+=Ft+St.height}else Ot=a.computeBusNodeSpacing(xt)-nt,xt.S.h(ht+Ft,b-(St.height+Ot)),z=Math.max(z,St.height+Ot),E=Math.max(E,ht+Ft+St.width),ht+=Ft+St.width;st++}for(st=0,xt=ht,mt=ft,ot?(ht=b+nt,ft=0):(ht=0,ft=b+nt),St=0;St<tt;St++)if(St%2!==0){Ft=x[St],Ot=Ft.Da;var Wt=st===0?0:it;if(ot){var Ut=a.computeBusNodeSpacing(Ft)-nt;Ft.S.h(ht+Ut,ft+Wt),E=Math.max(E,ht+Ot.width+Ut),z=Math.max(z,ft+Wt+Ot.height),ft+=Wt+Ot.height}else Ut=a.computeBusNodeSpacing(Ft)-nt,Ft.S.h(ht+Wt,ft+Ut),E=Math.max(E,ht+Wt+Ot.width),z=Math.max(z,ft+Ot.height+Ut),ht+=Wt+Ot.width;st++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,ot?Math.max(Math.abs(mt),Math.abs(ft)):Math.max(Math.abs(xt),Math.abs(ht))),ot?(x.S.h(b+nt/2-x.focus.x-x.la.x,z+a),ot=b+nt/2-x.focus.x-x.la.x,E=Math.max(E,ot+tt.width),0>ot&&(E-=ot),z=Math.max(z,Math.max(mt,ft)+a+tt.height),0>x.S.x&&(b=kv(y,x.S.x,!1,b,nt))):(x.S.h(E+a,b+nt/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(xt,ht)+a+tt.width),ft=b+nt/2-x.focus.y-x.la.y,z=Math.max(z,ft+tt.height),0>ft&&(z-=ft),0>x.S.y&&(b=kv(y,x.S.y,!0,b,nt)))),new un(b,0,E,z)}function fw(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new un(b,0,E,z);if(tt===1)return x=x[0],E=x.Da.width,z=x.Da.height,new un(b,0,E,z);for(var nt=y.nodeSpacing,it=y.rowSpacing,ot=Ma(y)===270,st=0,ht=0,ft=0,mt=0;mt<tt;mt++)if(!(mt%2!==0||1<tt&&mt===tt-1)){var xt=x[mt],St=xt.Da,Ft=st===0?0:it;if(ot){var Ot=a.computeBusNodeSpacing(xt)-nt;ft-=Ft+St.height,xt.S.h(b-(St.width+Ot),ft),E=Math.max(E,St.width+Ot),z=Math.max(z,Math.abs(ft))}else Ot=a.computeBusNodeSpacing(xt)-nt,ht-=Ft+St.width,xt.S.h(ht,b-(St.height+Ot)),z=Math.max(z,St.height+Ot),E=Math.max(E,Math.abs(ht));st++}for(st=0,xt=ht,mt=ft,ot?(ht=b+nt,ft=0):(ht=0,ft=b+nt),St=0;St<tt;St++)if(St%2!==0){Ft=x[St],Ot=Ft.Da;var Wt=st===0?0:it;if(ot){var Ut=a.computeBusNodeSpacing(Ft)-nt;ft-=Wt+Ot.height,Ft.S.h(ht+Ut,ft),E=Math.max(E,ht+Ot.width+Ut),z=Math.max(z,Math.abs(ft))}else Ut=a.computeBusNodeSpacing(Ft)-nt,ht-=Wt+Ot.width,Ft.S.h(ht,ft+Ut),z=Math.max(z,ft+Ot.height+Ut),E=Math.max(E,Math.abs(ht));st++}for(1<tt&&tt%2===1&&(it=x[tt-1],st=it.Da,a=a.computeBusLastRowSpacing(it,ot?Math.max(Math.abs(mt),Math.abs(ft)):Math.max(Math.abs(xt),Math.abs(ht))),ot?(it.S.h(b+nt/2-it.focus.x-it.la.x,-z-st.height-a),ht=b+nt/2-it.focus.x-it.la.x,E=Math.max(E,ht+st.width),0>ht&&(E-=ht),z=Math.max(z,Math.abs(Math.min(mt,ft))+a+st.height),0>it.S.x&&(b=kv(y,it.S.x,!1,b,nt))):(it.S.h(-E-st.width-a,b+nt/2-it.focus.y-it.la.y),E=Math.max(E,Math.abs(Math.min(xt,ht))+a+st.width),ft=b+nt/2-it.focus.y-it.la.y,z=Math.max(z,ft+st.height),0>ft&&(z-=ft),0>it.S.y&&(b=kv(y,it.S.y,!0,b,nt)))),y=0;y<tt;y++)nt=x[y],ot?nt.S.h(nt.S.x,nt.S.y+z):nt.S.h(nt.S.x+E,nt.S.y);return new un(b,0,E,z)}pr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},pr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function kv(a,y,x,b,E){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Oy(a,y,x){switch(a.alignment){case Dd:case Zf:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case mu:return a.width>y?a.width:y;case gu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case mh:case vu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case gh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Au:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ly(a,y,x){switch(a.alignment){case Dd:case Zf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case mu:return a.height>y?a.height:y;case gu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case mh:case vu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case gh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Au:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Dy(a,y,x){switch(a){case Zf:y/=2,x/=2;break;case Dd:y/=2,x/=2;break;case mu:x=y=0;break;case gu:break;default:Rt("Unhandled alignment value "+a.toString())}return new Lt(y,x)}function Zc(a,y,x,b,E,z){y=Dy(y,x,b),Od(a,y.x,y.y,E,z)}function Od(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function Ov(a,y,x,b){var E=y.parent;switch(a.ud){case pu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Ld:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Rt("Unhandled path value "+a.ud.toString())}}function Lv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function pw(a,y,x,b,E,z,tt,nt){var it=Ma(y),ot=it===90||it===270,st=y.nodeSpacing;y=b;var ht=E;b=z;var ft=tt,mt=x.Yo,xt=x.kp;tt=x.Da;var St=ot?Math.max(ft,tt.height):Math.max(b,tt.width);if((mt===null||it!==Ma(x))&&(mt=ul(a,2),xt=ul(a,2),ot?(mt[0].h(0,0),mt[1].h(0,tt.height),xt[0].h(tt.width,0),xt[1].h(xt[0].x,mt[1].y)):(mt[0].h(0,0),mt[1].h(tt.width,0),xt[0].h(0,tt.height),xt[1].h(mt[1].x,xt[0].y))),ot){if(ft=9999999,!(ht===null||2>ht.length||mt===null||2>mt.length))for(E=x=0;x<ht.length&&E<mt.length;){z=ht[x];var Ft=mt[E];it=Ft.x,ot=Ft.y,it+=b;var Ot=z;x+1<ht.length&&(Ot=ht[x+1]);var Wt=Ft;Ft=Wt.x,Wt=Wt.y,E+1<mt.length&&(Wt=mt[E+1],Ft=Wt.x,Wt=Wt.y,Ft+=b);var Ut=ft;z.y===ot?Ut=it-z.x:z.y>ot&&z.y<Wt?Ut=it+(z.y-ot)/(Wt-ot)*(Ft-it)-z.x:ot>z.y&&ot<Ot.y&&(Ut=it-(z.x+(ot-z.y)/(Ot.y-z.y)*(Ot.x-z.x))),Ut<ft&&(ft=Ut),Ot.y<=z.y?x++:Wt<=ot?E++:(Ot.y<=Wt&&x++,Wt<=Ot.y&&E++)}if(ft=b-ft,ft+=st,x=mt,E=ft,y===null||2>y.length||x===null||2>x.length)b=null;else{for(st=ul(a,y.length+x.length),b=z=it=0;z<x.length&&x[z].y<y[0].y;)ot=x[z++],st[b++].h(ot.x+E,ot.y);for(;it<y.length;)ot=y[it++],st[b++].h(ot.x,ot.y);for(it=y[y.length-1].y;z<x.length&&x[z].y<=it;)z++;for(;z<x.length&&x[z].y>it;)ot=x[z++],st[b++].h(ot.x+E,ot.y);for(x=ul(a,b),it=0;it<b;it++)x[it].assign(st[it]);Aa(a,st),b=x}if(z=xt,it=ft,ht===null||2>ht.length||z===null||2>z.length)E=null;else{for(st=ul(a,ht.length+z.length),E=ot=x=0;x<ht.length&&ht[x].y<z[0].y;)Ot=ht[x++],st[E++].h(Ot.x,Ot.y);for(;ot<z.length;)Ot=z[ot++],st[E++].h(Ot.x+it,Ot.y);for(z=z[z.length-1].y;x<ht.length&&ht[x].y<=z;)x++;for(;x<ht.length&&ht[x].y>z;)it=ht[x++],st[E++].h(it.x,it.y);for(z=ul(a,E),x=0;x<E;x++)z[x].assign(st[x]);Aa(a,st),E=z}return z=Math.max(0,ft)+tt.width,tt=St,Aa(a,y),Aa(a,mt),Aa(a,ht),Aa(a,xt),nt[0]=b,nt[1]=E,new un(ft,0,z,tt)}if(b=9999999,!(ht===null||2>ht.length||mt===null||2>mt.length))for(E=x=0;x<ht.length&&E<mt.length;)z=ht[x],Ft=mt[E],it=Ft.x,ot=Ft.y,ot+=ft,Ot=z,x+1<ht.length&&(Ot=ht[x+1]),Wt=Ft,Ft=Wt.x,Wt=Wt.y,E+1<mt.length&&(Wt=mt[E+1],Ft=Wt.x,Wt=Wt.y,Wt+=ft),Ut=b,z.x===it?Ut=ot-z.y:z.x>it&&z.x<Ft?Ut=ot+(z.x-it)/(Ft-it)*(Wt-ot)-z.y:it>z.x&&it<Ot.x&&(Ut=ot-(z.y+(it-z.x)/(Ot.x-z.x)*(Ot.y-z.y))),Ut<b&&(b=Ut),Ot.x<=z.x?x++:Ft<=it?E++:(Ot.x<=Ft&&x++,Ft<=Ot.x&&E++);if(ft-=b,ft+=st,x=mt,E=ft,y===null||2>y.length||x===null||2>x.length)b=null;else{for(st=ul(a,y.length+x.length),b=z=it=0;z<x.length&&x[z].x<y[0].x;)ot=x[z++],st[b++].h(ot.x,ot.y+E);for(;it<y.length;)ot=y[it++],st[b++].h(ot.x,ot.y);for(it=y[y.length-1].x;z<x.length&&x[z].x<=it;)z++;for(;z<x.length&&x[z].x>it;)ot=x[z++],st[b++].h(ot.x,ot.y+E);for(x=ul(a,b),it=0;it<b;it++)x[it].assign(st[it]);Aa(a,st),b=x}if(z=xt,it=ft,ht===null||2>ht.length||z===null||2>z.length)E=null;else{for(st=ul(a,ht.length+z.length),E=ot=x=0;x<ht.length&&ht[x].x<z[0].x;)Ot=ht[x++],st[E++].h(Ot.x,Ot.y);for(;ot<z.length;)Ot=z[ot++],st[E++].h(Ot.x,Ot.y+it);for(z=z[z.length-1].x;x<ht.length&&ht[x].x<=z;)x++;for(;x<ht.length&&ht[x].x>z;)it=ht[x++],st[E++].h(it.x,it.y);for(z=ul(a,E),x=0;x<E;x++)z[x].assign(st[x]);Aa(a,st),E=z}return z=St,tt=Math.max(0,ft)+tt.height,Aa(a,y),Aa(a,mt),Aa(a,ht),Aa(a,xt),nt[0]=b,nt[1]=E,new un(ft,0,z,tt)}function ul(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 Lt;return a}function Aa(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}pr.prototype.arrangeTrees=function(){if(this.Rb===Bv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof aa){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Iy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof aa&&a.push(x);switch(this.sorting){case Hf:break;case Sm:a.reverse();break;case bm:a.sort(this.comparer);break;case Em:a.sort(this.comparer),a.reverse();break;default:Rt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Iy(this,E,y+E.la.x,x+E.la.y),this.Rb){case Fv:x+=E.Da.height+this.$d.height;break;case Ry:y+=E.Da.width+this.$d.width;break;default:Rt("Unhandled arrangement value "+this.Rb.toString())}}}};function Iy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,z=0;z<E;z++){var tt=y[z];Iy(a,tt,x+tt.S.x,b+tt.S.y)}}}pr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},pr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},pr.prototype.Gu=function(){if(this.layerStyle===Rv){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var z=y[E.level];z===void 0?z=this.computeLayerSpacing(E):z=Math.max(z,this.computeLayerSpacing(E)),y[E.level]=z}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new Lt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Lt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var nt=a[tt]+y[tt];this.angle===270?(z-=nt,E.push(new un(0,z,x,nt))):this.angle===90?(E.push(new un(0,z,x,nt)),z+=nt):this.angle===180?(z-=nt,E.push(new un(z,0,nt,x))):(E.push(new un(z,0,nt,x)),z+=nt)}this.commitLayers(E,b)}},pr.prototype.commitLayers=function(){},pr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},pr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof aa&&mw(this,y)}};function mw(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)mw(a,y[b])}}pr.prototype.setPortSpots=function(a){var y=a.alignment;if(rc(y)){var x=this.ud===pu,b=Ma(a);switch(b){case 0:var E=Wo;break;case 90:E=ts;break;case 180:E=Zo;break;default:E=vo}var z=a.children,tt=z.length;switch(y){case mh:case vu:for(y=0;y<tt;y++){var nt=z[y];if(nt=(x?nt.sourceEdges:nt.destinationEdges).first(),nt!==null&&(nt=nt.link,nt!==null)){var it=b===90||b===270?Zo:vo;if(tt===1||y===tt-1&&tt%2===1)switch(b){case 0:it=Zo;break;case 90:it=vo;break;case 180:it=Wo;break;default:it=ts}else y%2===0&&(it=b===90||b===270?Wo:ts);x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=it)):(a.setsPortSpot&&(nt.fromSpot=it),a.setsChildPortSpot&&(nt.toSpot=E))}}break;case gh:for(b=b===90||b===270?Wo:ts,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)));break;case Au:for(b=b===90||b===270?Zo:vo,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)))}}else if(x=Ma(a),this.ud===pu){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Wo;break;case 90:b.fromSpot=ts;break;case 180:b.fromSpot=Zo;break;default:b.fromSpot=vo}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Zo;break;case 90:b.toSpot=vo;break;case 180:b.toSpot=Wo;break;default:b.toSpot=ts}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Wo;break;case 90:b.toSpot=ts;break;case 180:b.toSpot=Zo;break;default:b.toSpot=vo}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Zo;break;case 90:b.fromSpot=vo;break;case 180:b.fromSpot=Wo;break;default:b.fromSpot=ts}else b.fromSpot=a.childPortSpot}};function Ma(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}pr.prototype.computeLayerSpacing=function(a){var y=Ma(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},pr.prototype.computeNodeIndent=function(a){var y=Ma(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},$n.Object.defineProperties(pr.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!==Av&&a!==Fy&&a!==Ay&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==jy&&a!==zy&&a!==Rv||(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!==Fv&&a!==Ry&&a!==Bv||(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!==Hf&&a!==Sm&&a!==bm&&!Em||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Rt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Iv&&a!==Mm||(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!==Hf&&a!==Sm&&a!==bm&&!Em||(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!==Iv&&a!==Mm||(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 Dv=new yn(pr,"PathDefault",-1),pu=new yn(pr,"PathDestination",0),Ld=new yn(pr,"PathSource",1),Hf=new yn(pr,"SortingForwards",10),Sm=new yn(pr,"SortingReverse",11),bm=new yn(pr,"SortingAscending",12),Em=new yn(pr,"SortingDescending",13),Zf=new yn(pr,"AlignmentCenterSubtrees",20),Dd=new yn(pr,"AlignmentCenterChildren",21),mu=new yn(pr,"AlignmentStart",22),gu=new yn(pr,"AlignmentEnd",23),mh=new yn(pr,"AlignmentBus",24),vu=new yn(pr,"AlignmentBusBranching",25),gh=new yn(pr,"AlignmentTopLeftBus",26),Au=new yn(pr,"AlignmentBottomRightBus",27),Iv=new yn(pr,"CompactionNone",30),Mm=new yn(pr,"CompactionBlock",31),Av=new yn(pr,"StyleLayered",40),Ay=new yn(pr,"StyleLastParents",41),Fy=new yn(pr,"StyleAlternating",42),By=new yn(pr,"StyleRootOnly",43),Fv=new yn(pr,"ArrangementVertical",50),Ry=new yn(pr,"ArrangementHorizontal",51),Bv=new yn(pr,"ArrangementFixedRoots",52),jy=new yn(pr,"LayerIndividual",60),zy=new yn(pr,"LayerSiblings",61),Rv=new yn(pr,"LayerUniform",62);pr.className="TreeLayout",pr.PathDefault=Dv,pr.PathDestination=pu,pr.PathSource=Ld,pr.SortingForwards=Hf,pr.SortingReverse=Sm,pr.SortingAscending=bm,pr.SortingDescending=Em,pr.AlignmentCenterSubtrees=Zf,pr.AlignmentCenterChildren=Dd,pr.AlignmentStart=mu,pr.AlignmentEnd=gu,pr.AlignmentBus=mh,pr.AlignmentBusBranching=vu,pr.AlignmentTopLeftBus=gh,pr.AlignmentBottomRightBus=Au,pr.CompactionNone=Iv,pr.CompactionBlock=Mm,pr.StyleLayered=Av,pr.StyleLastParents=Ay,pr.StyleAlternating=Fy,pr.StyleRootOnly=By,pr.ArrangementVertical=Fv,pr.ArrangementHorizontal=Ry,pr.ArrangementFixedRoots=Bv,pr.LayerIndividual=jy,pr.LayerSiblings=zy,pr.LayerUniform=Rv;function Id(a){Wr.call(this,a)}Xn(Id,Wr),Id.prototype.createVertex=function(){return new aa(this)},Id.prototype.createEdge=function(){return new Wf(this)},Id.className="TreeNetwork";function aa(a){Ho.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 Lt(0,0),this.Da=new kn(0,0),this.la=new Lt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Hf,this.hd=oy,this.Kb=0,this.Jb=Dd,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Mm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=di,this.wr=!0,this.Dp=di}Xn(aa,Ho),aa.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)},$n.Object.defineProperties(aa.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)}}}),aa.className="TreeVertex";function Wf(a){Cl.call(this,a),this.$t=new Lt(0,0)}Xn(Wf,Cl),Wf.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case pu:x=this.fromVertex,b=this.toVertex;break;case Ld:x=this.toVertex,b=this.fromVertex;break;default:Rt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var z=Ma(x),tt=y.computeLayerSpacing(x),nt=x.rowSpacing;a.vg();var it=a.curve===Fl,ot=a.isOrthogonal,st;if(a.uh(),ot||it){for(st=2;4<a.pointsCount;)a.pv(2);var ht=a.i(1),ft=a.i(2)}else{for(st=1;3<a.pointsCount;)a.pv(1);ht=a.i(0),ft=a.i(a.pointsCount-1)}var mt=a.i(a.pointsCount-1);z===0?(x.alignment===gu?(z=b.bottom+E.y,E.y===0&&ht.y>mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ht.y,z-y.computeNodeIndent(x))))):x.alignment===mu?(z=b.top+E.y,E.y===0&&ht.y<mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ht.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,it?(a.m(st,ht.x,z),st++,a.m(st,b.right+tt,z),st++,a.m(st,b.right+tt+(E.x-nt)/3,z),st++,a.m(st,b.right+tt+2*(E.x-nt)/3,z),st++,a.m(st,b.right+tt+(E.x-nt),z),st++,a.m(st,ft.x,z)):(ot&&(a.m(st,b.right+tt/2,ht.y),st++),a.m(st,b.right+tt/2,z),st++,a.m(st,b.right+tt+E.x-(ot?nt/2:nt),z),st++,ot&&a.m(st,a.i(st-1).x,ft.y))):z===90?(x.alignment===gu?(z=b.right+E.x,E.x===0&&ht.x>mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ht.x,z-y.computeNodeIndent(x))))):x.alignment===mu?(z=b.left+E.x,E.x===0&&ht.x<mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ht.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,it?(a.m(st,z,ht.y),st++,a.m(st,z,b.bottom+tt),st++,a.m(st,z,b.bottom+tt+(E.y-nt)/3),st++,a.m(st,z,b.bottom+tt+2*(E.y-nt)/3),st++,a.m(st,z,b.bottom+tt+(E.y-nt)),st++,a.m(st,z,ft.y)):(ot&&(a.m(st,ht.x,b.bottom+tt/2),st++),a.m(st,z,b.bottom+tt/2),st++,a.m(st,z,b.bottom+tt+E.y-(ot?nt/2:nt)),st++,ot&&a.m(st,ft.x,a.i(st-1).y))):z===180?(x.alignment===gu?(z=b.bottom+E.y,E.y===0&&ht.y>mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ht.y,z-y.computeNodeIndent(x))))):x.alignment===mu?(z=b.top+E.y,E.y===0&&ht.y<mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ht.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,it?(a.m(st,ht.x,z),st++,a.m(st,b.left-tt,z),st++,a.m(st,b.left-tt+(E.x+nt)/3,z),st++,a.m(st,b.left-tt+2*(E.x+nt)/3,z),st++,a.m(st,b.left-tt+(E.x+nt),z),st++,a.m(st,ft.x,z)):(ot&&(a.m(st,b.left-tt/2,ht.y),st++),a.m(st,b.left-tt/2,z),st++,a.m(st,b.left-tt+E.x+(ot?nt/2:nt),z),st++,ot&&a.m(st,a.i(st-1).x,ft.y))):z===270?(x.alignment===gu?(z=b.right+E.x,E.x===0&&ht.x>mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ht.x,z-y.computeNodeIndent(x))))):x.alignment===mu?(z=b.left+E.x,E.x===0&&ht.x<mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ht.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,it?(a.m(st,z,ht.y),st++,a.m(st,z,b.top-tt),st++,a.m(st,z,b.top-tt+(E.y+nt)/3),st++,a.m(st,z,b.top-tt+2*(E.y+nt)/3),st++,a.m(st,z,b.top-tt+(E.y+nt)),st++,a.m(st,z,ft.y)):(ot&&(a.m(st,ht.x,b.top-tt/2),st++),a.m(st,z,b.top-tt/2),st++,a.m(st,z,b.top-tt+E.y+(ot?nt/2:nt)),st++,ot&&a.m(st,ft.x,a.i(st-1).y))):Rt("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ma(x),y!==Ma(E)&&(tt=b.computeLayerSpacing(x),nt=x.bounds,x=E.bounds,y===0&&x.left-nt.right<tt+1||y===90&&x.top-nt.bottom<tt+1||y===180&&nt.left-x.right<tt+1||y===270&&nt.top-x.bottom<tt+1||(a.vg(),x=a.curve===Fl,E=a.isOrthogonal,b=rc(this.fromVertex.alignment),a.uh(),y===0?(y=nt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=nt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=nt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=nt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},$n.Object.defineProperties(Wf.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)}}}),Wf.className="TreeEdge",io.prototype.initializeStandardTools=function(){this.gb("Action",new ea,this.mouseDownTools),this.gb("Relinking",new Ol,this.mouseDownTools),this.gb("LinkReshaping",new To,this.mouseDownTools),this.gb("Rotating",new js,this.mouseDownTools),this.gb("Resizing",new xs,this.mouseDownTools),this.gb("Linking",new Rs,this.mouseMoveTools),this.gb("Dragging",new po,this.mouseMoveTools),this.gb("DragSelecting",new $l,this.mouseMoveTools),this.gb("Panning",new fs,this.mouseMoveTools),this.gb("ContextMenu",new zs,this.mouseUpTools),this.gb("TextEditing",new Qr,this.mouseUpTools),this.gb("ClickCreating",new Xu,this.mouseUpTools),this.gb("ClickSelecting",new Lh,this.mouseUpTools)},Ga("Horizontal",new dg),Ga("Spot",new pg),Ga("Table",new gg),Ga("Viewbox",new xg),Ga("TableRow",new vg),Ga("TableColumn",new yg),Ga("Graduated",new Hp),Ga("Grid",new $p),df.add("GraphLinksModel",Xo),df.add("TreeModel",Ul);var jv=Jn.go,$y={get licenseKey(){return Ge.licenseKey},set licenseKey(a){Ge.licenseKey=a},get version(){return Ge.version},Group:rr,EnumValue:yn,List:$e,Set:pn,Map:ai,Point:Lt,Size:kn,Rect:un,Margin:Xi,Spot:Fi,Geometry:ti,PathFigure:Vo,PathSegment:Tr,InputEvent:Ps,DiagramEvent:Hu,ChangedEvent:ao,Model:ki,GraphLinksModel:yr,TreeModel:Gs,Binding:Oo,Transaction:Yo,UndoManager:fo,CommandHandler:At,Tool:Mr,DraggingTool:po,DraggingInfo:Tu,DraggingOptions:rt,LinkingBaseTool:wo,LinkingTool:Rs,RelinkingTool:Ol,LinkReshapingTool:To,ResizingTool:xs,RotatingTool:js,ClickSelectingTool:Lh,ActionTool:ea,ClickCreatingTool:Xu,HTMLInfo:Za,ContextMenuTool:zs,DragSelectingTool:$l,PanningTool:fs,TextEditingTool:Qr,ToolManager:io,Animation:ps,AnimationManager:yl,AnimationTrigger:va,Layer:es,Diagram:Ge,Palette:ut,Overview:ct,Brush:Fr,GraphObject:pe,Panel:Un,RowColumnDefinition:Ro,Shape:ar,TextBlock:Zr,Picture:nl,Part:Ai,Adornment:Pr,Node:hi,Link:ei,Placeholder:Ws,Layout:no,LayoutNetwork:Wr,LayoutVertex:Ho,LayoutEdge:Cl,GridLayout:as,PanelLayout:$o,CircularLayout:mo,CircularNetwork:jf,CircularVertex:mm,CircularEdge:yv,ForceDirectedLayout:gs,ForceDirectedNetwork:kd,ForceDirectedVertex:gm,ForceDirectedEdge:vm,LayeredDigraphLayout:Rr,LayeredDigraphNetwork:$f,LayeredDigraphVertex:Xl,LayeredDigraphEdge:wm,TreeLayout:pr,TreeNetwork:Id,TreeVertex:aa,TreeEdge:Wf};typeof jv=="object"&&jv.version&&He("WARNING: a `go` object on the root object is already defined. "+("Debug"in jv?"debug ":"")+"version: "+jv.version+", replaced with version: "+$y.version),Ge.prototype.go=$y,Jn.go=$y,typeof Yn.exports=="object"&&(Yn.exports=typeof dt.g!="undefined"?dt.g.go:self.go)}();var lt=typeof dt.g!="undefined"?dt.g.go:self.go;const Dt=typeof dt.g!="undefined"?dt.g.go:self.go,It=Dt.Group,xe=Dt.EnumValue,_t=Dt.List,Gt=Dt.Set,Vt=Dt.Map,me=Dt.Point,Yt=Dt.Size,Nt=Dt.Rect,Oe=Dt.Margin,jt=Dt.Spot,Me=Dt.Geometry,ce=Dt.PathFigure,ee=Dt.PathSegment,Kt=Dt.InputEvent,Ht=Dt.DiagramEvent,de=Dt.ChangedEvent,Ae=Dt.Model,je=Dt.GraphLinksModel,se=Dt.TreeModel,Xt=Dt.Binding,ve=Dt.Transaction,Qt=Dt.UndoManager,Se=Dt.CommandHandler,be=Dt.Tool,Le=Dt.DraggingTool,en=Dt.DraggingInfo,ie=Dt.LinkingBaseTool,Re=Dt.LinkingTool,De=Dt.RelinkingTool,Tt=Dt.LinkReshapingTool,rn=Dt.ResizingTool,we=Dt.RotatingTool,Ue=Dt.ClickSelectingTool,On=Dt.ActionTool,zt=Dt.ClickCreatingTool,kt=Dt.HTMLInfo,Ye=Dt.ContextMenuTool,wn=Dt.DragSelectingTool,on=Dt.PanningTool,$t=Dt.TextEditingTool,Ee=Dt.ToolManager,Be=Dt.Animation,Cn=Dt.AnimationManager,Ie=Dt.AnimationTrigger,gn=Dt.Layer,ke=Dt.Diagram,Dn=Dt.Palette,ln=Dt.Overview,bt=Dt.Brush,gt=Dt.GraphObject,pt=Dt.Panel,Ct=Dt.RowColumnDefinition,Pt=Dt.Shape,vt=Dt.TextBlock,Et=Dt.TextBlockMetrics,Zt=Dt.Picture,Ve=Dt.Part,ue=Dt.Adornment,re=Dt.Node,Ce=Dt.Link,Te=Dt.Placeholder,tn=Dt.Layout,te=Dt.LayoutNetwork,le=Dt.LayoutVertex,bn=Dt.LayoutEdge,Sn=Dt.GridLayout,Rn=Dt.PanelLayout,In=Dt.CircularLayout,sn=Dt.CircularNetwork,Hn=Dt.CircularVertex,Mn=Dt.CircularEdge,ye=Dt.ForceDirectedLayout,Ze=Dt.ForceDirectedNetwork,En=Dt.ForceDirectedVertex,An=Dt.ForceDirectedEdge,he=Dt.LayeredDigraphLayout,Ke=Dt.LayeredDigraphNetwork,hn=Dt.LayeredDigraphVertex,Pn=Dt.LayeredDigraphEdge,_n=Dt.TreeLayout,ci=Dt.TreeNetwork,yi=Dt.TreeVertex,Ni=Dt.TreeEdge,ri=Dt.version},2859:function(Yn,qe,dt){"use strict";dt.d(qe,{hP:function(){return ln}});var lt=function(bt,gt){return(lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pt,Ct){pt.__proto__=Ct}||function(pt,Ct){for(var Pt in Ct)Object.prototype.hasOwnProperty.call(Ct,Pt)&&(pt[Pt]=Ct[Pt])})(bt,gt)};function Dt(bt,gt){function pt(){this.constructor=bt}lt(bt,gt),bt.prototype=gt===null?Object.create(gt):(pt.prototype=gt.prototype,new pt)}function It(bt,gt,pt,Ct){return new(pt||(pt=Promise))(function(Pt,vt){function Et(ue){try{Ve(Ct.next(ue))}catch(re){vt(re)}}function Zt(ue){try{Ve(Ct.throw(ue))}catch(re){vt(re)}}function Ve(ue){var re;ue.done?Pt(ue.value):(re=ue.value,re instanceof pt?re:new pt(function(Ce){Ce(re)})).then(Et,Zt)}Ve((Ct=Ct.apply(bt,gt||[])).next())})}function xe(bt,gt){var pt,Ct,Pt,vt,Et={label:0,sent:function(){if(1&Pt[0])throw Pt[1];return Pt[1]},trys:[],ops:[]};return vt={next:Zt(0),throw:Zt(1),return:Zt(2)},typeof Symbol=="function"&&(vt[Symbol.iterator]=function(){return this}),vt;function Zt(Ve){return function(ue){return function(re){if(pt)throw new TypeError("Generator is already executing.");for(;Et;)try{if(pt=1,Ct&&(Pt=2&re[0]?Ct.return:re[0]?Ct.throw||((Pt=Ct.return)&&Pt.call(Ct),0):Ct.next)&&!(Pt=Pt.call(Ct,re[1])).done)return Pt;switch(Ct=0,Pt&&(re=[2&re[0],Pt.value]),re[0]){case 0:case 1:Pt=re;break;case 4:return Et.label++,{value:re[1],done:!1};case 5:Et.label++,Ct=re[1],re=[0];continue;case 7:re=Et.ops.pop(),Et.trys.pop();continue;default:if(Pt=Et.trys,!((Pt=Pt.length>0&&Pt[Pt.length-1])||re[0]!==6&&re[0]!==2)){Et=0;continue}if(re[0]===3&&(!Pt||re[1]>Pt[0]&&re[1]<Pt[3])){Et.label=re[1];break}if(re[0]===6&&Et.label<Pt[1]){Et.label=Pt[1],Pt=re;break}if(Pt&&Et.label<Pt[2]){Et.label=Pt[2],Et.ops.push(re);break}Pt[2]&&Et.ops.pop(),Et.trys.pop();continue}re=gt.call(bt,Et)}catch(Ce){re=[6,Ce],Ct=0}finally{pt=Pt=0}if(5&re[0])throw re[1];return{value:re[0]?re[1]:void 0,done:!0}}([Ve,ue])}}}function _t(){for(var bt=0,gt=0,pt=arguments.length;gt<pt;gt++)bt+=arguments[gt].length;var Ct=Array(bt),Pt=0;for(gt=0;gt<pt;gt++)for(var vt=arguments[gt],Et=0,Zt=vt.length;Et<Zt;Et++,Pt++)Ct[Pt]=vt[Et];return Ct}var Gt=function(){function bt(){}return bt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},bt.setAttributes=function(gt,pt){for(var Ct=0,Pt=pt;Ct<Pt.length;Ct++){var vt=Pt[Ct],Et=vt[0],Zt=vt[1];gt.setAttribute(Et,Zt)}},bt.createRect=function(gt,pt,Ct){var Pt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Pt.setAttribute("width",gt.toString()),Pt.setAttribute("height",pt.toString()),Ct&&bt.setAttributes(Pt,Ct),Pt},bt.createLine=function(gt,pt,Ct,Pt,vt){var Et=document.createElementNS("http://www.w3.org/2000/svg","line");return Et.setAttribute("x1",gt.toString()),Et.setAttribute("y1",pt.toString()),Et.setAttribute("x2",Ct.toString()),Et.setAttribute("y2",Pt.toString()),vt&&bt.setAttributes(Et,vt),Et},bt.createPolygon=function(gt,pt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ct.setAttribute("points",gt),pt&&bt.setAttributes(Ct,pt),Ct},bt.createCircle=function(gt,pt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ct.setAttribute("cx",(gt/2).toString()),Ct.setAttribute("cy",(gt/2).toString()),Ct.setAttribute("r",gt.toString()),pt&&bt.setAttributes(Ct,pt),Ct},bt.createEllipse=function(gt,pt,Ct){var Pt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Pt.setAttribute("cx",(gt/2).toString()),Pt.setAttribute("cy",(pt/2).toString()),Pt.setAttribute("rx",(gt/2).toString()),Pt.setAttribute("ry",(pt/2).toString()),Ct&&bt.setAttributes(Pt,Ct),Pt},bt.createGroup=function(gt){var pt=document.createElementNS("http://www.w3.org/2000/svg","g");return gt&&bt.setAttributes(pt,gt),pt},bt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},bt.createMarker=function(gt,pt,Ct,Pt,vt,Et,Zt){var Ve=document.createElementNS("http://www.w3.org/2000/svg","marker");return bt.setAttributes(Ve,[["id",gt],["orient",pt],["markerWidth",Ct.toString()],["markerHeight",Pt.toString()],["refX",vt.toString()],["refY",Et.toString()]]),Ve.appendChild(Zt),Ve},bt.createText=function(gt){var pt=document.createElementNS("http://www.w3.org/2000/svg","text");return pt.setAttribute("x","0"),pt.setAttribute("y","0"),gt&&bt.setAttributes(pt,gt),pt},bt.createTSpan=function(gt,pt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ct.textContent=gt,pt&&bt.setAttributes(Ct,pt),Ct},bt.createImage=function(gt){var pt=document.createElementNS("http://www.w3.org/2000/svg","image");return gt&&bt.setAttributes(pt,gt),pt},bt.createPoint=function(gt,pt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ct.x=gt,Ct.y=pt,Ct},bt.createPath=function(gt,pt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","path");return Ct.setAttribute("d",gt),pt&&bt.setAttributes(Ct,pt),Ct},bt}(),Vt=function(){function bt(){}return bt.addKey=function(gt){bt.key=gt},Object.defineProperty(bt,"isLicensed",{get:function(){return!!bt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(bt.key)},enumerable:!1,configurable:!0}),bt}(),me=function(){function bt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return bt.prototype.rasterize=function(gt,pt,Ct){var Pt=this;return new Promise(function(vt){var Et=Ct!==void 0?Ct:document.createElement("canvas");gt===null&&(Pt.markersOnly=!0,Pt.naturalSize=!1);var Zt=document.createElementNS("http://www.w3.org/2000/svg","svg");Zt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Zt.setAttribute("width",pt.width.baseVal.valueAsString),Zt.setAttribute("height",pt.height.baseVal.valueAsString),Zt.setAttribute("viewBox","0 0 "+pt.viewBox.baseVal.width.toString()+" "+pt.viewBox.baseVal.height.toString()),Zt.innerHTML=pt.innerHTML,Pt.naturalSize===!0?(Zt.width.baseVal.value=gt.naturalWidth,Zt.height.baseVal.value=gt.naturalHeight):Pt.width!==void 0&&Pt.height!==void 0&&(Zt.width.baseVal.value=Pt.width,Zt.height.baseVal.value=Pt.height),Et.width=Zt.width.baseVal.value,Et.height=Zt.height.baseVal.value;var Ve=Zt.outerHTML,ue=Et.getContext("2d");Pt.markersOnly!==!0&&ue.drawImage(gt,0,0,Et.width,Et.height);var re=window.URL,Ce=new Image(Et.width,Et.height);Ce.setAttribute("crossOrigin","anonymous");var Te=new Blob([Ve],{type:"image/svg+xml"}),tn=re.createObjectURL(Te);Ce.onload=function(){ue.drawImage(Ce,0,0),re.revokeObjectURL(tn);var te=Et.toDataURL(Pt.imageType,Pt.imageQuality);vt(te)},Ce.src=tn})},bt}(),Yt=function(){},Nt=function(){function bt(gt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+gt+"_"}return Object.defineProperty(bt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(bt.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(bt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),bt.prototype.addClass=function(gt){return this.styleSheet===void 0&&this.addStyleSheet(),gt.name=""+this.classNamePrefix+gt.localName,this.classes.push(gt),this.styleSheet.sheet.insertRule("."+gt.name+" {"+gt.style+"}",this.styleSheet.sheet.cssRules.length),gt},bt.prototype.addRule=function(gt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(gt),this.styleSheet.sheet.insertRule(gt.selector+" {"+gt.style+"}",this.styleSheet.sheet.cssRules.length)},bt.prototype.addStyleSheet=function(){var gt;this.styleSheet=document.createElement("style"),((gt=this.styleSheetRoot)!==null&>!==void 0?gt:document.head).appendChild(this.styleSheet),this.addRule(new Oe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new jt("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new jt("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},bt.prototype.removeStyleSheet=function(){var gt;this.styleSheet&&(((gt=this.styleSheetRoot)!==null&>!==void 0?gt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},bt}(),Oe=function(bt,gt){this.selector=bt,this.style=gt},jt=function(bt,gt){this.localName=bt,this.style=gt},Me=function(){function bt(gt,pt,Ct,Pt,vt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=gt,this.displayMode=pt,this.markerItems=Ct,this.uiStyleSettings=Pt,this.styles=vt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return bt.prototype.show=function(gt){var pt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=gt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ct=document.createElement("div");Ct.className=this.toolbarBlockStyleClass.name,Ct.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ct),this.addActionButton(Ct,'<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(Ct,'<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(Ct,'<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(Ct,'<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(Ct,'<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(Ct,'<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(Ct,'<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(Ct,'<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(vt){var Et=document.createElement("div");Et.className=""+pt.toolbarButtonStyleClass.name,Et.setAttribute("data-type-name",vt.typeName),Et.innerHTML=vt.icon,Et.addEventListener("click",function(){pt.markerToolbarButtonClicked(Et,vt)}),pt.buttons.push(Et),pt.markerButtons.push(Et)}),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 Pt=document.createElement("div");Pt.className=this.toolbarBlockStyleClass.name,Pt.style.whiteSpace="nowrap",Pt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Pt),this.addActionButton(Pt,'<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(Pt,'<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()},bt.prototype.addButtonClickListener=function(gt){this.buttonClickListeners.push(gt)},bt.prototype.removeButtonClickListener=function(gt){this.buttonClickListeners.indexOf(gt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(gt),1)},bt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},bt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var gt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var pt=0;pt<this.markerButtons.length;pt++)pt<gt||pt===gt&&this.markerButtons.length-1===gt?this.markerButtonBlock.appendChild(this.markerButtons[pt]):(pt===gt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[pt]))}},bt.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")},bt.prototype.resetButtonStyles=function(){var gt=this;this.buttons.forEach(function(pt){pt.className=pt.className.replace(gt.uiStyleSettings.toolbarButtonStyleColorsClassName?gt.uiStyleSettings.toolbarButtonStyleColorsClassName:gt.toolbarButtonStyleColorsClass.name,"").trim(),pt.className=pt.className.replace(gt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?gt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:gt.toolbarActiveButtonStyleColorsClass.name,"").trim(),pt.className+=" "+(gt.uiStyleSettings.toolbarButtonStyleColorsClassName?gt.uiStyleSettings.toolbarButtonStyleColorsClassName:gt.toolbarButtonStyleColorsClass.name)})},bt.prototype.addActionButton=function(gt,pt,Ct){var Pt=this,vt=document.createElement("div");switch(vt.className=""+this.toolbarButtonStyleClass.name,vt.innerHTML=pt,vt.setAttribute("data-action",Ct),vt.addEventListener("click",function(){Pt.actionToolbarButtonClicked(vt,Ct)}),Ct){case"select":vt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":vt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":vt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":vt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":vt.style.fill=this.uiStyleSettings.closeButtonColor}gt.appendChild(vt),this.buttons.push(vt)},bt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new jt("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 jt("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new jt("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new jt("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 jt("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var gt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new jt("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*gt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*gt)+`px;
|
|
|
padding: `+gt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new jt("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new jt("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},bt.prototype.markerToolbarButtonClicked=function(gt,pt){this.setActiveButton(gt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ct){return Ct("marker",pt)}),this.markerButtonOverflowBlock.style.display="none"},bt.prototype.actionToolbarButtonClicked=function(gt,pt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ct){return Ct("action",pt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},bt.prototype.setActiveButton=function(gt){this.resetButtonStyles(),gt.className=gt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),gt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},bt.prototype.setActiveMarkerButton=function(gt){var pt=this.markerButtons.find(function(Ct){return Ct.getAttribute("data-type-name")===gt});pt&&this.setActiveButton(pt)},bt.prototype.setCurrentMarker=function(gt){var pt=this;this.currentMarker=gt,this.buttons.filter(function(Ct){return/delete|notes/.test(Ct.getAttribute("data-action"))}).forEach(function(Ct){pt.currentMarker===void 0?(Ct.style.fillOpacity="0.4",Ct.style.pointerEvents="none"):(Ct.style.fillOpacity="1",Ct.style.pointerEvents="all")})},bt}(),ce=function(){function bt(gt,pt,Ct,Pt){this.panels=[],this.panelButtons=[],this.markerjsContainer=gt,this.displayMode=pt,this.uiStyleSettings=Ct,this.styles=Pt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return bt.prototype.addStyles=function(){var gt;this.toolboxStyleClass=this.styles.addClass(new jt("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 jt("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var pt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new jt("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new jt("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new jt("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 jt("toolbox-panel-row_colors",`
|
|
|
background-color: `+((gt=this.uiStyleSettings.toolboxBackgroundColor)!==null&>!==void 0?gt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new jt("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*pt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*pt)+`px;
|
|
|
padding: `+pt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new jt("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new jt("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},bt.prototype.show=function(gt){var pt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=gt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((pt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&pt!==void 0?pt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},bt.prototype.setPanelButtons=function(gt){var pt,Ct,Pt=this;this.panels=gt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((pt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&pt!==void 0?pt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ct=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ct!==void 0?Ct:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(vt){var Et;vt.uiStyleSettings=Pt.uiStyleSettings;var Zt=document.createElement("div");Zt.className=Pt.toolboxButtonStyleClass.name+" "+((Et=Pt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Et!==void 0?Et:Pt.toolboxButtonStyleColorsClass.name),Zt.innerHTML=vt.icon,Zt.title=vt.title,Zt.addEventListener("click",function(){Pt.panelButtonClick(vt)}),Pt.panelButtons.push(Zt),Pt.buttonRow.appendChild(Zt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},bt.prototype.panelButtonClick=function(gt){var pt=this,Ct=-1;if(gt!==this.activePanel){Ct=this.panels.indexOf(gt),this.panelRow.innerHTML="";var Pt=gt.getUi();Pt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Pt),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=gt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){pt.displayMode==="inline"?pt.panelRow.style.display="none":pt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(vt,Et){var Zt,Ve;vt.className=pt.toolboxButtonStyleClass.name+" "+(Et===Ct?""+((Zt=pt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Zt!==void 0?Zt:pt.toolboxActiveButtonStyleColorsClass.name):""+((Ve=pt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:pt.toolboxButtonStyleColorsClass.name))})},bt}(),ee=function(bt,gt){this.title=bt,this.icon=gt},Kt=function(bt){function gt(pt,Ct,Pt,vt){var Et=bt.call(this,pt,vt||'<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 Et.colors=[],Et.addTransparent=!1,Et.colorBoxes=[],Et.colors=Ct,Et.currentColor=Pt,Et.setCurrentColor=Et.setCurrentColor.bind(Et),Et.getColorBox=Et.getColorBox.bind(Et),Et}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");return Ct.style.overflow="hidden",Ct.style.whiteSpace="nowrap",this.colors.forEach(function(Pt){var vt=pt.getColorBox(Pt);Ct.appendChild(vt),pt.colorBoxes.push(vt)}),Ct},gt.prototype.getColorBox=function(pt){var Ct=this,Pt=this.uiStyleSettings.toolbarHeight/4,vt=this.uiStyleSettings.toolbarHeight-Pt,Et=document.createElement("div");Et.style.display="inline-block",Et.style.boxSizing="content-box",Et.style.width=vt-2+"px",Et.style.height=vt-2+"px",Et.style.padding="1px",Et.style.marginRight="2px",Et.style.marginBottom="2px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderRadius=(vt+2)/2+"px",Et.style.borderColor=pt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){Ct.setCurrentColor(pt,Et)});var Zt=document.createElement("div");return Zt.style.display="inline-block",Zt.style.width=vt-2+"px",Zt.style.height=vt-2+"px",Zt.style.backgroundColor=pt,Zt.style.borderRadius=vt/2+"px",pt==="transparent"&&(Zt.style.fill=this.uiStyleSettings.toolboxAccentColor,Zt.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>`),Et.appendChild(Zt),Et},gt.prototype.setCurrentColor=function(pt,Ct){var Pt=this;this.currentColor=pt,this.colorBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(pt)},gt}(ee),Ht=function(){function bt(gt,pt,Ct){this._state="new",this._isSelected=!1,this._container=gt,this._overlayContainer=pt,this.globalSettings=Ct,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(bt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),bt.prototype.ownsTarget=function(gt){return!1},Object.defineProperty(bt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),bt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},bt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},bt.prototype.pointerDown=function(gt,pt){},bt.prototype.dblClick=function(gt,pt){},bt.prototype.manipulate=function(gt){},bt.prototype.pointerUp=function(gt){this.stateChanged()},bt.prototype.dispose=function(){},bt.prototype.addMarkerVisualToContainer=function(gt){this.container.childNodes.length>0?this.container.insertBefore(gt,this.container.childNodes[0]):this.container.appendChild(gt)},bt.prototype.getState=function(){return{typeName:bt.typeName,state:this.state,notes:this.notes}},bt.prototype.restoreState=function(gt){this._state=gt.state,this.notes=gt.notes},bt.prototype.scale=function(gt,pt){},bt.prototype.colorChanged=function(gt){this.onColorChanged&&this.onColorChanged(gt),this.stateChanged()},bt.prototype.fillColorChanged=function(gt){this.onFillColorChanged&&this.onFillColorChanged(gt),this.stateChanged()},bt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var gt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),gt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(gt)&&this.onStateChanged(this)}},bt.typeName="MarkerBase",bt}(),de=function(){function bt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return bt.prototype.findGripByVisual=function(gt){return this.topLeft.ownsTarget(gt)?this.topLeft:this.topCenter.ownsTarget(gt)?this.topCenter:this.topRight.ownsTarget(gt)?this.topRight:this.centerLeft.ownsTarget(gt)?this.centerLeft:this.centerRight.ownsTarget(gt)?this.centerRight:this.bottomLeft.ownsTarget(gt)?this.bottomLeft:this.bottomCenter.ownsTarget(gt)?this.bottomCenter:this.bottomRight.ownsTarget(gt)?this.bottomRight:void 0},bt}(),Ae=function(){function bt(){this.GRIP_SIZE=10,this.visual=Gt.createGroup(),this.visual.appendChild(Gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Gt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return bt.prototype.ownsTarget=function(gt){return gt===this.visual||gt===this.visual.childNodes[0]||gt===this.visual.childNodes[1]},bt}(),je=function(){function bt(){}return bt.toITransformMatrix=function(gt){return{a:gt.a,b:gt.b,c:gt.c,d:gt.d,e:gt.e,f:gt.f}},bt.toSVGMatrix=function(gt,pt){return gt.a=pt.a,gt.b=pt.b,gt.c=pt.c,gt.d=pt.d,gt.e=pt.e,gt.f=pt.f,gt},bt}(),se=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.left=0,vt.top=0,vt.width=0,vt.height=0,vt.defaultSize={x:50,y:20},vt.offsetX=0,vt.offsetY=0,vt.rotationAngle=0,vt.CB_DISTANCE=10,vt._suppressMarkerCreateEvent=!1,vt.container.transform.baseVal.appendItem(Gt.createTransform()),vt.setupControlBox(),vt}return Dt(gt,bt),Object.defineProperty(gt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(gt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(gt.prototype,"visual",{get:function(){return this._visual},set:function(pt){this._visual=pt;var Ct=Gt.createTransform();this._visual.transform.baseVal.appendItem(Ct)},enumerable:!1,configurable:!0}),gt.prototype.ownsTarget=function(pt){return!!bt.prototype.ownsTarget.call(this,pt)||!!(this.controlGrips.findGripByVisual(pt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(pt))},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="new"&&(this.left=pt.x,this.top=pt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Pt=this.unrotatePoint(pt);if(this.manipulationStartX=Pt.x,this.manipulationStartY=Pt.y,this.offsetX=Pt.x-this.left,this.offsetY=Pt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ct),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ct)){this.activeGrip=this.rotatorGrip;var vt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=vt.x-this.width/2,this.top=vt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Et=this.container.transform.baseVal.getItem(0);Et.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Et,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},gt.prototype.pointerUp=function(pt){var Ct=this.state;bt.prototype.pointerUp.call(this,pt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(pt),this._state="select",Ct==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},gt.prototype.moveVisual=function(pt){this.visual.style.transform="translate("+pt.x+"px, "+pt.y+"px)"},gt.prototype.manipulate=function(pt){var Ct=this.unrotatePoint(pt);this.state==="creating"?this.resize(pt):this.state==="move"?(this.left=this.manipulationStartLeft+(Ct.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ct.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ct):this.state==="rotate"&&this.rotate(pt)},gt.prototype.resize=function(pt){var Ct=this.manipulationStartLeft,Pt=this.manipulationStartWidth,vt=this.manipulationStartTop,Et=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ct=this.manipulationStartLeft+pt.x-this.manipulationStartX,Pt=this.manipulationStartWidth+this.manipulationStartLeft-Ct;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Pt=this.manipulationStartWidth+pt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:vt=this.manipulationStartTop+pt.y-this.manipulationStartY,Et=this.manipulationStartHeight+this.manipulationStartTop-vt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Et=this.manipulationStartHeight+pt.y-this.manipulationStartY}Pt>=0?(this.left=Ct,this.width=Pt):(this.left=Ct+Pt,this.width=-Pt),Et>=0?(this.top=vt,this.height=Et):(this.top=vt+Et,this.height=-Et),this.setSize()},gt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},gt.prototype.rotate=function(pt){if(Math.abs(pt.x-this.centerX)>.1){var Ct=Math.sign(pt.x-this.centerX);this.rotationAngle=180*Math.atan((pt.y-this.centerY)/(pt.x-this.centerX))/Math.PI+90*Ct,this.applyRotation()}},gt.prototype.applyRotation=function(){var pt=this.container.transform.baseVal.getItem(0);pt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(pt,0)},gt.prototype.rotatePoint=function(pt){if(this.rotationAngle===0)return pt;var Ct=this.container.getCTM(),Pt=Gt.createPoint(pt.x,pt.y);return{x:(Pt=Pt.matrixTransform(Ct)).x,y:Pt.y}},gt.prototype.unrotatePoint=function(pt){if(this.rotationAngle===0)return pt;var Ct=this.container.getCTM();Ct=Ct.inverse();var Pt=Gt.createPoint(pt.x,pt.y);return{x:(Pt=Pt.matrixTransform(Ct)).x,y:Pt.y}},gt.prototype.select=function(){bt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},gt.prototype.deselect=function(){bt.prototype.deselect.call(this),this.controlBox.style.display="none"},gt.prototype.setupControlBox=function(){this.controlBox=Gt.createGroup();var pt=Gt.createTransform();pt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(pt),this.container.appendChild(this.controlBox),this.controlRect=Gt.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=Gt.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 de,this.addControlGrips(),this.controlBox.style.display="none"},gt.prototype.adjustControlBox=function(){var pt=this.controlBox.transform.baseVal.getItem(0);pt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(pt,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()},gt.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()},gt.prototype.createGrip=function(){var pt=new Ae;return pt.visual.transform.baseVal.appendItem(Gt.createTransform()),this.controlBox.appendChild(pt.visual),pt},gt.prototype.positionGrips=function(){var pt=this.controlGrips.topLeft.GRIP_SIZE,Ct=-pt/2,Pt=Ct,vt=(this.width+this.CB_DISTANCE)/2-pt/2,Et=(this.height+this.CB_DISTANCE)/2-pt/2,Zt=this.height+this.CB_DISTANCE-pt/2,Ve=this.width+this.CB_DISTANCE-pt/2;this.positionGrip(this.controlGrips.topLeft.visual,Ct,Pt),this.positionGrip(this.controlGrips.topCenter.visual,vt,Pt),this.positionGrip(this.controlGrips.topRight.visual,Ve,Pt),this.positionGrip(this.controlGrips.centerLeft.visual,Ct,Et),this.positionGrip(this.controlGrips.centerRight.visual,Ve,Et),this.positionGrip(this.controlGrips.bottomLeft.visual,Ct,Zt),this.positionGrip(this.controlGrips.bottomCenter.visual,vt,Zt),this.positionGrip(this.controlGrips.bottomRight.visual,Ve,Zt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,vt,Pt-3*this.CB_DISTANCE)},gt.prototype.positionGrip=function(pt,Ct,Pt){var vt=pt.transform.baseVal.getItem(0);vt.setTranslate(Ct,Pt),pt.transform.baseVal.replaceItem(vt,0)},gt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},gt.prototype.showControlBox=function(){this.controlBox.style.display=""},gt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:je.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:je.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},bt.prototype.getState.call(this))},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt);var Ct=pt;this.left=Ct.left,this.top=Ct.top,this.width=Ct.width,this.height=Ct.height,this.rotationAngle=Ct.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(je.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ct.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(je.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ct.containerTransformMatrix))},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct);var Pt=this.rotatePoint({x:this.left,y:this.top}),vt=this.unrotatePoint({x:Pt.x*pt,y:Pt.y*Ct});this.left=vt.x,this.top=vt.y,this.width=this.width*pt,this.height=this.height*Ct,this.adjustControlBox()},gt}(Ht),Xt=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.fillColor="transparent",vt.strokeColor="transparent",vt.strokeWidth=0,vt.strokeDasharray="",vt.opacity=1,vt.setStrokeColor=vt.setStrokeColor.bind(vt),vt.setFillColor=vt.setFillColor.bind(vt),vt.setStrokeWidth=vt.setStrokeWidth.bind(vt),vt.setStrokeDasharray=vt.setStrokeDasharray.bind(vt),vt.createVisual=vt.createVisual.bind(vt),vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual)},gt.prototype.createVisual=function(){this.visual=Gt.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)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="new"&&(this.createVisual(),this.moveVisual(pt),this._state="creating")},gt.prototype.manipulate=function(pt){bt.prototype.manipulate.call(this,pt)},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),this.setSize()},gt.prototype.setSize=function(){bt.prototype.setSize.call(this),Gt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},gt.prototype.pointerUp=function(pt){bt.prototype.pointerUp.call(this,pt),this.setSize()},gt.prototype.setStrokeColor=function(pt){this.strokeColor=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(pt),this.stateChanged()},gt.prototype.setFillColor=function(pt){this.fillColor=pt,this.visual&&Gt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},gt.prototype.setStrokeWidth=function(pt){this.strokeWidth=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},gt.prototype.setStrokeDasharray=function(pt){this.strokeDasharray=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},gt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},bt.prototype.getState.call(this))},gt.prototype.restoreState=function(pt){var Ct=pt;this.fillColor=Ct.fillColor,this.strokeColor=Ct.strokeColor,this.strokeWidth=Ct.strokeWidth,this.strokeDasharray=Ct.strokeDasharray,this.opacity=Ct.opacity,this.createVisual(),bt.prototype.restoreState.call(this,pt),this.setSize()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.setSize()},gt.title="Rectangle marker",gt}(se),ve=function(bt){function gt(pt,Ct,Pt,vt){var Et=bt.call(this,pt,vt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Et.widths=[],Et.widthBoxes=[],Et.widths=Ct,Et.currentWidth=Pt,Et.setCurrentWidth=Et.setCurrentWidth.bind(Et),Et}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");return Ct.style.display="flex",Ct.style.overflow="hidden",Ct.style.flexGrow="2",this.widths.forEach(function(Pt){var vt=document.createElement("div");vt.style.display="flex",vt.style.flexGrow="2",vt.style.alignItems="center",vt.style.justifyContent="space-between",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.borderColor=Pt===pt.currentWidth?pt.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){pt.setCurrentWidth(Pt,vt)}),Ct.appendChild(vt);var Et=document.createElement("div");Et.innerText=Pt.toString(),Et.style.marginRight="5px",vt.appendChild(Et);var Zt=document.createElement("div");Zt.style.minHeight="20px",Zt.style.flexGrow="2",Zt.style.display="flex",Zt.style.alignItems="center";var Ve=document.createElement("hr");Ve.style.minWidth="20px",Ve.style.border="0px",Ve.style.borderTop=Pt+"px solid "+pt.uiStyleSettings.toolboxColor,Ve.style.flexGrow="2",Zt.appendChild(Ve),vt.appendChild(Zt),pt.widthBoxes.push(vt)}),Ct},gt.prototype.setCurrentWidth=function(pt,Ct){var Pt=this;this.currentWidth=pt,this.widthBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},gt}(ee),Qt=function(bt){function gt(pt,Ct,Pt,vt){var Et=bt.call(this,pt,vt||'<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 Et.styles=[],Et.styleBoxes=[],Et.styles=Ct,Et.currentStyle=Pt,Et.setCurrentStyle=Et.setCurrentStyle.bind(Et),Et}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");return Ct.style.display="flex",Ct.style.overflow="hidden",Ct.style.flexGrow="2",this.styles.forEach(function(Pt){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.justifyContent="space-between",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.overflow="hidden",vt.style.maxWidth=100/pt.styles.length-5+"%",vt.style.borderColor=Pt===pt.currentStyle?pt.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){pt.setCurrentStyle(Pt,vt)}),Ct.appendChild(vt);var Et=document.createElement("div");Et.style.minHeight="20px",Et.style.flexGrow="2",Et.style.overflow="hidden";var Zt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+pt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Pt!==""?'stroke-dasharray="'+Pt+'"':"")+` />
|
|
|
</svg>`;Et.innerHTML=Zt,vt.appendChild(Et),pt.styleBoxes.push(vt)}),Ct},gt.prototype.setCurrentStyle=function(pt,Ct){var Pt=this;this.currentStyle=pt,this.styleBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},gt}(ee),Se=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.strokeColor=Pt.defaultColor,vt.strokeWidth=Pt.defaultStrokeWidth,vt.strokeDasharray=Pt.defaultStrokeDasharray,vt.strokePanel=new Kt("Line color",Pt.defaultColorSet,Pt.defaultColor),vt.strokePanel.onColorChanged=vt.setStrokeColor,vt.strokeWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.strokeWidthPanel.onWidthChanged=vt.setStrokeWidth,vt.strokeStylePanel=new Qt("Line style",Pt.defaultStrokeDasharrays,Pt.defaultStrokeDasharray),vt.strokeStylePanel.onStyleChanged=vt.setStrokeDasharray,vt}return Dt(gt,bt),Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=bt.prototype.getState.call(this);return pt.typeName=gt.typeName,pt},gt.typeName="FrameMarker",gt.title="Frame marker",gt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',gt}(Xt),be=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"},Le=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.x1=0,vt.y1=0,vt.x2=0,vt.y2=0,vt.defaultLength=50,vt.manipulationStartX=0,vt.manipulationStartY=0,vt.manipulationStartX1=0,vt.manipulationStartY1=0,vt.manipulationStartX2=0,vt.manipulationStartY2=0,vt.setupControlBox(),vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!!bt.prototype.ownsTarget.call(this,pt)||!(!this.grip1.ownsTarget(pt)&&!this.grip2.ownsTarget(pt))},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.manipulationStartX=pt.x,this.manipulationStartY=pt.y,this.state==="new"&&(this.x1=pt.x,this.y1=pt.y,this.x2=pt.x,this.y2=pt.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(Ct)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ct)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},gt.prototype.pointerUp=function(pt){var Ct=this.state;bt.prototype.pointerUp.call(this,pt),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(pt),this._state="select",Ct==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},gt.prototype.adjustVisual=function(){},gt.prototype.manipulate=function(pt){this.state==="creating"?this.resize(pt):this.state==="move"?(this.x1=this.manipulationStartX1+pt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+pt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+pt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+pt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(pt)},gt.prototype.resize=function(pt){switch(this.activeGrip){case this.grip1:this.x1=pt.x,this.y1=pt.y;break;case this.grip2:case void 0:this.x2=pt.x,this.y2=pt.y}this.adjustVisual(),this.adjustControlBox()},gt.prototype.select=function(){bt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},gt.prototype.deselect=function(){bt.prototype.deselect.call(this),this.controlBox.style.display="none"},gt.prototype.setupControlBox=function(){this.controlBox=Gt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},gt.prototype.adjustControlBox=function(){this.positionGrips()},gt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},gt.prototype.createGrip=function(){var pt=new Ae;return pt.visual.transform.baseVal.appendItem(Gt.createTransform()),this.controlBox.appendChild(pt.visual),pt},gt.prototype.positionGrips=function(){var pt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-pt/2,this.y1-pt/2),this.positionGrip(this.grip2.visual,this.x2-pt/2,this.y2-pt/2)},gt.prototype.positionGrip=function(pt,Ct,Pt){var vt=pt.transform.baseVal.getItem(0);vt.setTranslate(Ct,Pt),pt.transform.baseVal.replaceItem(vt,0)},gt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},bt.prototype.getState.call(this))},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt);var Ct=pt;this.x1=Ct.x1,this.y1=Ct.y1,this.x2=Ct.x2,this.y2=Ct.y2},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.x1=this.x1*pt,this.y1=this.y1*Ct,this.x2=this.x2*pt,this.y2=this.y2*Ct,this.adjustVisual(),this.adjustControlBox()},gt}(Ht),en=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.strokeColor="transparent",vt.strokeWidth=0,vt.strokeDasharray="",vt.setStrokeColor=vt.setStrokeColor.bind(vt),vt.setStrokeWidth=vt.setStrokeWidth.bind(vt),vt.setStrokeDasharray=vt.setStrokeDasharray.bind(vt),vt.strokeColor=Pt.defaultColor,vt.strokeWidth=Pt.defaultStrokeWidth,vt.strokeDasharray=Pt.defaultStrokeDasharray,vt.strokePanel=new Kt("Line color",Pt.defaultColorSet,Pt.defaultColor),vt.strokePanel.onColorChanged=vt.setStrokeColor,vt.strokeWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.strokeWidthPanel.onWidthChanged=vt.setStrokeWidth,vt.strokeStylePanel=new Qt("Line style",Pt.defaultStrokeDasharrays,Pt.defaultStrokeDasharray),vt.strokeStylePanel.onStyleChanged=vt.setStrokeDasharray,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual&&pt!==this.selectorLine&&pt!==this.visibleLine)},gt.prototype.createVisual=function(){this.visual=Gt.createGroup(),this.selectorLine=Gt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Gt.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)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},gt.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()),Gt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Gt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Gt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},gt.prototype.setStrokeColor=function(pt){this.strokeColor=pt,this.adjustVisual(),this.colorChanged(pt)},gt.prototype.setStrokeWidth=function(pt){this.strokeWidth=pt,this.adjustVisual()},gt.prototype.setStrokeDasharray=function(pt){this.strokeDasharray=pt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt);var Ct=pt;this.strokeColor=Ct.strokeColor,this.strokeWidth=Ct.strokeWidth,this.strokeDasharray=Ct.strokeDasharray,this.createVisual(),this.adjustVisual()},gt.typeName="LineMarker",gt.title="Line marker",gt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',gt}(Le),ie=function(bt){function gt(pt,Ct,Pt,vt){var Et=bt.call(this,pt,vt||'<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 Et.fonts=[],Et.fontBoxes=[],Et.fonts=Ct,Et.currentFont=Pt,Et.setCurrentFont=Et.setCurrentFont.bind(Et),Et}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");return Ct.style.overflow="hidden",Ct.style.flexGrow="2",this.fonts.forEach(function(Pt){var vt=document.createElement("div");vt.style.display="inline-block",vt.style.alignItems="center",vt.style.justifyContent="space-between",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.overflow="hidden",vt.style.maxWidth=100/pt.fonts.length-5+"%",vt.style.borderColor=Pt===pt.currentFont?pt.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){pt.setCurrentFont(Pt,vt)}),Ct.appendChild(vt);var Et=document.createElement("div");Et.style.display="flex",Et.style.minHeight="20px",Et.style.flexGrow="2",Et.style.fontFamily=Pt,Et.style.overflow="hidden";var Zt=document.createElement("div");Zt.style.whiteSpace="nowrap",Zt.style.overflow="hidden",Zt.style.textOverflow="ellipsis",Zt.innerHTML="The quick brown fox jumps over the lazy dog",Et.appendChild(Zt),vt.appendChild(Et),pt.fontBoxes.push(vt)}),Ct},gt.prototype.setCurrentFont=function(pt,Ct){var Pt=this;this.currentFont=pt,this.fontBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},gt}(ee),Re=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.color="transparent",vt.padding=5,vt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",vt.text=vt.DEFAULT_TEXT,vt.isMoved=!1,vt.color=Pt.defaultColor,vt.fontFamily=Pt.defaultFontFamily,vt.defaultSize={x:100,y:30},vt.setColor=vt.setColor.bind(vt),vt.setFont=vt.setFont.bind(vt),vt.renderText=vt.renderText.bind(vt),vt.sizeText=vt.sizeText.bind(vt),vt.textEditDivClicked=vt.textEditDivClicked.bind(vt),vt.showTextEditor=vt.showTextEditor.bind(vt),vt.setSize=vt.setSize.bind(vt),vt.positionTextEditor=vt.positionTextEditor.bind(vt),vt.colorPanel=new Kt("Color",Pt.defaultColorSet,Pt.defaultColor),vt.colorPanel.onColorChanged=vt.setColor,vt.fontFamilyPanel=new ie("Font",Pt.defaultFontFamilies,Pt.defaultFontFamily),vt.fontFamilyPanel.onFontChanged=vt.setFont,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){if(bt.prototype.ownsTarget.call(this,pt)||pt===this.visual||pt===this.textElement||pt===this.bgRectangle)return!0;var Ct=!1;return this.textElement.childNodes.forEach(function(Pt){Pt===pt&&(Ct=!0)}),Ct},gt.prototype.createVisual=function(){this.visual=Gt.createGroup(),this.bgRectangle=Gt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Gt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Gt.createTransform()),this.textElement.transform.baseVal.appendItem(Gt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.isMoved=!1,this.pointerDownPoint=pt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(pt),this._state="creating")},gt.prototype.renderText=function(){var pt=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(Ct){pt.textElement.appendChild(Gt.createTSpan(Ct.trim()===""?" ":Ct.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},gt.prototype.getTextScale=function(){var pt=this.textElement.getBBox(),Ct=1;if(pt.width>0&&pt.height>0){var Pt=(1*this.width-this.width*this.padding*2/100)/pt.width,vt=(1*this.height-this.height*this.padding*2/100)/pt.height;Ct=Math.min(Pt,vt)}return Ct},gt.prototype.getTextPosition=function(pt){var Ct=this.textElement.getBBox(),Pt=0,vt=0;return Ct.width>0&&Ct.height>0&&(Pt=(this.width-Ct.width*pt)/2,vt=this.height/2-Ct.height*pt/2),{x:Pt,y:vt}},gt.prototype.sizeText=function(){var pt=this.textElement.getBBox(),Ct=this.getTextScale(),Pt=this.getTextPosition(Ct);Pt.y-=pt.y*Ct,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Pt.x+"px, "+Pt.y+"px) scale("+Ct+", "+Ct+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Pt.x,Pt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ct,Ct))},gt.prototype.manipulate=function(pt){bt.prototype.manipulate.call(this,pt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(pt.x-this.pointerDownPoint.x)>5||Math.abs(pt.y-this.pointerDownPoint.y)>5)},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),this.isMoved=!0,this.setSize(),this.sizeText()},gt.prototype.setSize=function(){bt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Gt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Gt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},gt.prototype.pointerUp=function(pt){var Ct=this.state;Ct==="creating"&&(this._suppressMarkerCreateEvent=!0),bt.prototype.pointerUp.call(this,pt),this.setSize(),(Ct==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},gt.prototype.showTextEditor=function(){var pt=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(Ct){Ct.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ct=Number.parseFloat(pt.textEditor.style.fontSize);pt.textEditor.clientWidth>=Number.parseInt(pt.textEditor.style.maxWidth)&&Ct>.9;)Ct-=.1,pt.textEditor.style.fontSize=Math.max(Ct,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ct){Ct.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ct){if(Ct.clipboardData){var Pt=Ct.clipboardData.getData("text"),vt=window.getSelection();if(!vt.rangeCount)return!1;vt.deleteFromDocument(),vt.getRangeAt(0).insertNode(document.createTextNode(Pt)),Ct.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){pt.textEditDivClicked(pt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},gt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var pt=this.getTextScale(),Ct=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Pt=this.textElement.getBBox(),vt={x:Pt.width*pt,y:Pt.height*pt};Ct.x-=vt.x/2,Ct.y-=vt.y/2,this.textEditor.style.top=Ct.y+"px",this.textEditor.style.left=Ct.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ct.x+"px",this.textEditor.style.fontSize=Math.max(16*pt,12)+"px",this.textElement.style.display="none"}},gt.prototype.textEditDivClicked=function(pt){this.text=pt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},gt.prototype.select=function(){bt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},gt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),bt.prototype.deselect.call(this)},gt.prototype.dblClick=function(pt,Ct){bt.prototype.dblClick.call(this,pt,Ct),this.showTextEditor()},gt.prototype.setColor=function(pt){this.textElement&&Gt.setAttributes(this.textElement,[["fill",pt]]),this.color=pt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(pt)},gt.prototype.setFont=function(pt){this.textElement&&Gt.setAttributes(this.textElement,[["font-family",pt]]),this.fontFamily=pt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},gt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},gt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){var Ct=pt;this.color=Ct.color,this.fontFamily=Ct.fontFamily,this.padding=Ct.padding,this.text=Ct.text,this.createVisual(),bt.prototype.restoreState.call(this,pt),this.setSize()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.setSize(),this.sizeText(),this.positionTextEditor()},gt.typeName="TextMarker",gt.title="Text marker",gt.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>',gt}(se),De=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.color="transparent",vt.lineWidth=3,vt.drawing=!1,vt.pixelRatio=1,vt.color=Pt.defaultColor,vt.lineWidth=Pt.defaultStrokeWidth,vt.pixelRatio=Pt.freehandPixelRatio,vt.setColor=vt.setColor.bind(vt),vt.addCanvas=vt.addCanvas.bind(vt),vt.finishCreation=vt.finishCreation.bind(vt),vt.setLineWidth=vt.setLineWidth.bind(vt),vt.colorPanel=new Kt("Color",Pt.defaultColorSet,Pt.defaultColor),vt.colorPanel.onColorChanged=vt.setColor,vt.lineWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.lineWidthPanel.onWidthChanged=vt.setLineWidth,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual&&pt!==this.drawingImage)},gt.prototype.createVisual=function(){this.visual=Gt.createGroup(),this.drawingImage=Gt.createImage(),this.visual.appendChild(this.drawingImage);var pt=Gt.createTransform();this.visual.transform.baseVal.appendItem(pt),this.addMarkerVisualToContainer(this.visual)},gt.prototype.pointerDown=function(pt,Ct){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(pt.x,pt.y),this.drawing=!0):bt.prototype.pointerDown.call(this,pt,Ct)},gt.prototype.manipulate=function(pt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(pt.x,pt.y),this.canvasContext.stroke()):bt.prototype.manipulate.call(this,pt)},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),Gt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Gt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},gt.prototype.pointerUp=function(pt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):bt.prototype.pointerUp.call(this,pt)},gt.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)},gt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),bt.prototype.select.call(this)},gt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),bt.prototype.deselect.call(this)},gt.prototype.finishCreation=function(){for(var pt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ct=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Pt=Ct[0],vt=Ct[1],Et=Ct[2],Zt=Ct[3],Ve=!1,ue=0;ue<this.canvasElement.height;ue++)for(var re=0;re<this.canvasElement.width;re++)pt.data[ue*this.canvasElement.width*4+4*re+3]>0&&(Ve=!0,ue<vt&&(vt=ue),re<Pt&&(Pt=re),ue>Zt&&(Zt=ue),re>Et&&(Et=re));if(Ve){this.left=Pt/this.pixelRatio,this.top=vt/this.pixelRatio,this.width=(Et-Pt)/this.pixelRatio,this.height=(Zt-vt)/this.pixelRatio;var Ce=document.createElement("canvas");Ce.width=Et-Pt,Ce.height=Zt-vt,Ce.getContext("2d").putImageData(this.canvasContext.getImageData(Pt,vt,Et-Pt,Zt-vt),0,0),this.drawingImgUrl=Ce.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},gt.prototype.setDrawingImage=function(){Gt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Gt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},gt.prototype.setColor=function(pt){this.color=pt,this.colorChanged(pt)},gt.prototype.setLineWidth=function(pt){this.lineWidth=pt},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({drawingImgUrl:this.drawingImgUrl},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){this.createVisual(),bt.prototype.restoreState.call(this,pt),this.drawingImgUrl=pt.drawingImgUrl,this.setDrawingImage()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.setDrawingImage()},gt.typeName="FreehandMarker",gt.title="Freehand marker",gt.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>',gt}(se),Tt=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Pt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return vt.typeBoxes=[],vt.currentType=Ct,vt.setCurrentType=vt.setCurrentType.bind(vt),vt}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");Ct.style.display="flex",Ct.style.overflow="hidden",Ct.style.flexGrow="2";for(var Pt=function(Zt){var Ve="both";switch(Zt){case 0:Ve="both";break;case 1:Ve="start";break;case 2:Ve="end";break;case 3:Ve="none"}var ue=document.createElement("div");if(ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=Ve===vt.currentType?vt.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){pt.setCurrentType(Ve,ue)}),Ct.appendChild(ue),Ve==="both"||Ve==="start"){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.minHeight="20px",re.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="`+(vt.uiStyleSettings!==void 0?vt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,re.style.marginLeft="5px",ue.appendChild(re)}var Ce=document.createElement("div");Ce.style.display="flex",Ce.style.alignItems="center",Ce.style.minHeight="20px",Ce.style.flexGrow="2";var Te=document.createElement("hr");if(Te.style.minWidth="20px",Te.style.border="0px",Te.style.borderTop="3px solid "+(vt.uiStyleSettings!==void 0?vt.uiStyleSettings.toolboxColor:"#eeeeee"),Te.style.flexGrow="2",Ce.appendChild(Te),ue.appendChild(Ce),Ve==="both"||Ve==="end"){var tn=document.createElement("div");tn.style.display="flex",tn.style.alignItems="center",tn.style.minHeight="20px",tn.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="`+(vt.uiStyleSettings!==void 0?vt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,tn.style.marginRight="5px",ue.appendChild(tn)}vt.typeBoxes.push(ue)},vt=this,Et=0;Et<4;Et++)Pt(Et);return Ct},gt.prototype.setCurrentType=function(pt,Ct){var Pt=this;this.currentType=pt,this.typeBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings!==void 0?Pt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},gt}(ee),rn=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.arrowType="end",vt.arrowBaseHeight=10,vt.arrowBaseWidth=10,vt.getArrowPoints=vt.getArrowPoints.bind(vt),vt.setArrowType=vt.setArrowType.bind(vt),vt.arrowTypePanel=new Tt("Arrow type","end"),vt.arrowTypePanel.onArrowTypeChanged=vt.setArrowType,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.arrow1&&pt!==this.arrow2)},gt.prototype.getArrowPoints=function(pt,Ct){var Pt=this.arrowBaseWidth+2*this.strokeWidth,vt=this.arrowBaseHeight+2*this.strokeWidth;return pt-Pt/2+","+(Ct+vt/2)+" "+pt+","+(Ct-vt/2)+" "+(pt+Pt/2)+","+(Ct+vt/2)},gt.prototype.createTips=function(){this.arrow1=Gt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Gt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Gt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Gt.createTransform()),this.visual.appendChild(this.arrow2)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="creating"&&this.createTips()},gt.prototype.adjustVisual=function(){if(bt.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",Gt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Gt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var pt=0;Math.abs(this.x1-this.x2)>.1&&(pt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ct=this.arrow1.transform.baseVal.getItem(0);Ct.setRotate(pt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ct,0);var Pt=this.arrow2.transform.baseVal.getItem(0);Pt.setRotate(pt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Pt,0)}},gt.prototype.setArrowType=function(pt){this.arrowType=pt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({arrowType:this.arrowType},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt);var Ct=pt;this.arrowType=Ct.arrowType,this.createTips(),this.adjustVisual()},gt.typeName="ArrowMarker",gt.title="Arrow marker",gt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',gt}(en),we=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.fillColor=Pt.defaultFillColor,vt.strokeWidth=0,vt.fillPanel=new Kt("Color",Pt.defaultColorSet,Pt.defaultFillColor),vt.fillPanel.onColorChanged=vt.setFillColor,vt}return Dt(gt,bt),Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=bt.prototype.getState.call(this);return pt.typeName=gt.typeName,pt},gt.typeName="CoverMarker",gt.title="Cover marker",gt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',gt}(Xt),Ue=function(bt){function gt(pt,Ct,Pt,vt){var Et=bt.call(this,pt,vt||'<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 Et.opacities=[],Et.opacityBoxes=[],Et.opacities=Ct,Et.currentOpacity=Pt,Et.setCurrentOpacity=Et.setCurrentOpacity.bind(Et),Et}return Dt(gt,bt),gt.prototype.getUi=function(){var pt=this,Ct=document.createElement("div");return Ct.style.display="flex",Ct.style.overflow="hidden",Ct.style.flexGrow="2",Ct.style.justifyContent="space-between",this.opacities.forEach(function(Pt){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.justifyContent="center",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.borderColor=Pt===pt.currentOpacity?pt.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){pt.setCurrentOpacity(Pt,vt)}),Ct.appendChild(vt);var Et=document.createElement("div");Et.innerText=100*Pt+"%",vt.appendChild(Et),pt.opacityBoxes.push(vt)}),Ct},gt.prototype.setCurrentOpacity=function(pt,Ct){var Pt=this;this.currentOpacity=pt,this.opacityBoxes.forEach(function(vt){vt.style.borderColor=vt===Ct?Pt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},gt}(ee),On=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.setOpacity=vt.setOpacity.bind(vt),vt.fillColor=Pt.defaultHighlightColor,vt.strokeWidth=0,vt.opacity=Pt.defaultHighlightOpacity,vt.fillPanel=new Kt("Color",Pt.defaultColorSet,vt.fillColor),vt.fillPanel.onColorChanged=vt.setFillColor,vt.opacityPanel=new Ue("Opacity",Pt.defaultOpacitySteps,vt.opacity),vt.opacityPanel.onOpacityChanged=vt.setOpacity,vt}return Dt(gt,bt),gt.prototype.setOpacity=function(pt){this.opacity=pt,this.visual&&Gt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=bt.prototype.getState.call(this);return pt.typeName=gt.typeName,pt},gt.typeName="HighlightMarker",gt.title="Highlight marker",gt.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>',gt}(we),zt='<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>',kt='<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>',Ye=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.bgColor="transparent",vt.tipPosition={x:0,y:0},vt.tipBase1Position={x:0,y:0},vt.tipBase2Position={x:0,y:0},vt.tipMoving=!1,vt.color=Pt.defaultStrokeColor,vt.bgColor=Pt.defaultFillColor,vt.fontFamily=Pt.defaultFontFamily,vt.defaultSize={x:100,y:30},vt.setBgColor=vt.setBgColor.bind(vt),vt.getTipPoints=vt.getTipPoints.bind(vt),vt.positionTip=vt.positionTip.bind(vt),vt.setTipPoints=vt.setTipPoints.bind(vt),vt.colorPanel=new Kt("Text color",Pt.defaultColorSet,vt.color,zt),vt.colorPanel.onColorChanged=vt.setColor,vt.bgColorPanel=new Kt("Fill color",Pt.defaultColorSet,vt.bgColor,kt),vt.bgColorPanel.onColorChanged=vt.setBgColor,vt.fontFamilyPanel=new ie("Font",Pt.defaultFontFamilies,Pt.defaultFontFamily),vt.fontFamilyPanel.onFontChanged=vt.setFont,vt.tipGrip=new Ae,vt.tipGrip.visual.transform.baseVal.appendItem(Gt.createTransform()),vt.controlBox.appendChild(vt.tipGrip.visual),vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return bt.prototype.ownsTarget.call(this,pt)||this.tipGrip.ownsTarget(pt)||this.tip===pt},gt.prototype.createTip=function(){Gt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Gt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},gt.prototype.pointerDown=function(pt,Ct){this.state==="new"&&bt.prototype.pointerDown.call(this,pt,Ct),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ct)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):bt.prototype.pointerDown.call(this,pt,Ct)},gt.prototype.pointerUp=function(pt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,bt.prototype.pointerUp.call(this,pt);else{var Ct=this.state==="creating";bt.prototype.pointerUp.call(this,pt),this.setTipPoints(Ct),this.positionTip()}},gt.prototype.manipulate=function(pt){if(this.tipMoving){var Ct=this.unrotatePoint(pt);this.tipPosition={x:Ct.x-this.manipulationStartLeft,y:Ct.y-this.manipulationStartTop},this.positionTip()}else bt.prototype.manipulate.call(this,pt)},gt.prototype.setBgColor=function(pt){this.bgRectangle&&this.tip&&(Gt.setAttributes(this.bgRectangle,[["fill",pt]]),Gt.setAttributes(this.tip,[["fill",pt]])),this.bgColor=pt,this.fillColorChanged(pt)},gt.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},gt.prototype.setTipPoints=function(pt){pt===void 0&&(pt=!1);var Ct=Math.min(this.height/2,15),Pt=this.height/5;pt&&(this.tipPosition={x:Ct+Pt/2,y:this.height+20});var vt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?vt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Pt=this.width/5,Ct=Math.min(this.width/2,15),this.tipBase1Position={x:Ct,y:0},this.tipBase2Position={x:Ct+Pt,y:0}):(this.tipBase1Position={x:0,y:Ct},this.tipBase2Position={x:0,y:Ct+Pt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?vt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Pt=this.width/5,Ct=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ct-Pt,y:0},this.tipBase2Position={x:this.width-Ct,y:0}):(this.tipBase1Position={x:this.width,y:Ct},this.tipBase2Position={x:this.width,y:Ct+Pt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?vt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Pt=this.width/5,Ct=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ct-Pt,y:this.height},this.tipBase2Position={x:this.width-Ct,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ct-Pt},this.tipBase2Position={x:this.width,y:this.height-Ct}):vt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Pt=this.width/5,Ct=Math.min(this.width/2,15),this.tipBase1Position={x:Ct,y:this.height},this.tipBase2Position={x:Ct+Pt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ct},this.tipBase2Position={x:0,y:this.height-Ct-Pt})},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),this.positionTip()},gt.prototype.positionTip=function(){Gt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var pt=this.tipGrip.visual.transform.baseVal.getItem(0);pt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(pt,0)},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),gt.prototype.select=function(){this.positionTip(),bt.prototype.select.call(this)},gt.prototype.getState=function(){var pt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){var Ct=pt;this.bgColor=Ct.bgColor,this.tipPosition=Ct.tipPosition,bt.prototype.restoreState.call(this,pt),this.createTip(),this.setTipPoints()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.tipPosition={x:this.tipPosition.x*pt,y:this.tipPosition.y*Ct},this.positionTip()},gt.typeName="CalloutMarker",gt.title="Callout marker",gt.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>',gt}(Re),wn=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.fillColor="transparent",vt.strokeColor="transparent",vt.strokeWidth=0,vt.strokeDasharray="",vt.opacity=1,vt.strokeColor=Pt.defaultColor,vt.strokeWidth=Pt.defaultStrokeWidth,vt.strokeDasharray=Pt.defaultStrokeDasharray,vt.fillColor=Pt.defaultFillColor,vt.setStrokeColor=vt.setStrokeColor.bind(vt),vt.setFillColor=vt.setFillColor.bind(vt),vt.setStrokeWidth=vt.setStrokeWidth.bind(vt),vt.setStrokeDasharray=vt.setStrokeDasharray.bind(vt),vt.setOpacity=vt.setOpacity.bind(vt),vt.createVisual=vt.createVisual.bind(vt),vt.strokePanel=new Kt("Line color",_t(Pt.defaultColorSet,["transparent"]),Pt.defaultColor),vt.strokePanel.onColorChanged=vt.setStrokeColor,vt.fillPanel=new Kt("Fill color",_t(Pt.defaultColorSet,["transparent"]),vt.fillColor,kt),vt.fillPanel.onColorChanged=vt.setFillColor,vt.strokeWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.strokeWidthPanel.onWidthChanged=vt.setStrokeWidth,vt.strokeStylePanel=new Qt("Line style",Pt.defaultStrokeDasharrays,Pt.defaultStrokeDasharray),vt.strokeStylePanel.onStyleChanged=vt.setStrokeDasharray,vt.opacityPanel=new Ue("Opacity",Pt.defaultOpacitySteps,vt.opacity),vt.opacityPanel.onOpacityChanged=vt.setOpacity,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual)},gt.prototype.createVisual=function(){this.visual=Gt.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)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="new"&&(this.createVisual(),this.moveVisual(pt),this._state="creating")},gt.prototype.manipulate=function(pt){bt.prototype.manipulate.call(this,pt)},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),this.setSize()},gt.prototype.setSize=function(){bt.prototype.setSize.call(this),Gt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},gt.prototype.pointerUp=function(pt){bt.prototype.pointerUp.call(this,pt),this.setSize()},gt.prototype.setStrokeColor=function(pt){this.strokeColor=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(pt),this.stateChanged()},gt.prototype.setFillColor=function(pt){this.fillColor=pt,this.visual&&Gt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(pt),this.stateChanged()},gt.prototype.setStrokeWidth=function(pt){this.strokeWidth=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},gt.prototype.setStrokeDasharray=function(pt){this.strokeDasharray=pt,this.visual&&Gt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},gt.prototype.setOpacity=function(pt){this.opacity=pt,this.visual&&Gt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){var Ct=pt;this.fillColor=Ct.fillColor,this.strokeColor=Ct.strokeColor,this.strokeWidth=Ct.strokeWidth,this.strokeDasharray=Ct.strokeDasharray,this.opacity=Ct.opacity,this.createVisual(),bt.prototype.restoreState.call(this,pt),this.setSize()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.setSize()},gt.typeName="EllipseMarker",gt.title="Ellipse marker",gt.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>',gt}(se),on=function(bt){function gt(pt,Ct,Pt){return bt.call(this,pt,Ct,Pt)||this}return Dt(gt,bt),Object.defineProperty(gt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.tip1&&pt!==this.tip2)},gt.prototype.createTips=function(){this.tip1=Gt.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(Gt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Gt.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(Gt.createTransform()),this.visual.appendChild(this.tip2)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.state==="creating"&&this.createTips()},gt.prototype.adjustVisual=function(){if(bt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Gt.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()]]),Gt.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 pt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ct=this.tip1.transform.baseVal.getItem(0);Ct.setRotate(pt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ct,0);var Pt=this.tip2.transform.baseVal.getItem(0);Pt.setRotate(pt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Pt,0)}},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=bt.prototype.getState.call(this);return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt),this.createTips(),this.adjustVisual()},gt.typeName="MeasurementMarker",gt.title="Measurement marker",gt.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>',gt}(en),$t=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.strokePanel.colors=Pt.defaultColorSet,vt.fillColor="transparent",vt}return Dt(gt,bt),Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=bt.prototype.getState.call(this);return pt.typeName=gt.typeName,pt},gt.typeName="EllipseFrameMarker",gt.title="Ellipse frame marker",gt.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>',gt}(wn),Ee=function(){function bt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(bt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),bt.prototype.addUndoStep=function(gt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(gt)||(this.undoStack.push(gt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(gt)&&this.redoStack.splice(0,this.redoStack.length))},bt.prototype.replaceLastUndoStep=function(gt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=gt)},bt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},bt.prototype.undo=function(){if(this.undoStack.length>1){var gt=this.undoStack.pop();return gt!==void 0&&this.redoStack.push(gt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},bt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},bt}(),Be=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.strokeColor="transparent",vt.strokeWidth=0,vt.strokeDasharray="",vt.curveX=0,vt.curveY=0,vt.manipulationStartCurveX=0,vt.manipulationStartCurveY=0,vt.setStrokeColor=vt.setStrokeColor.bind(vt),vt.setStrokeWidth=vt.setStrokeWidth.bind(vt),vt.setStrokeDasharray=vt.setStrokeDasharray.bind(vt),vt.positionGrips=vt.positionGrips.bind(vt),vt.addControlGrips=vt.addControlGrips.bind(vt),vt.adjustVisual=vt.adjustVisual.bind(vt),vt.setupControlBox=vt.setupControlBox.bind(vt),vt.resize=vt.resize.bind(vt),vt.strokeColor=Pt.defaultColor,vt.strokeWidth=Pt.defaultStrokeWidth,vt.strokeDasharray=Pt.defaultStrokeDasharray,vt.strokePanel=new Kt("Line color",Pt.defaultColorSet,Pt.defaultColor),vt.strokePanel.onColorChanged=vt.setStrokeColor,vt.strokeWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.strokeWidthPanel.onWidthChanged=vt.setStrokeWidth,vt.strokeStylePanel=new Qt("Line style",Pt.defaultStrokeDasharrays,Pt.defaultStrokeDasharray),vt.strokeStylePanel.onStyleChanged=vt.setStrokeDasharray,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual&&pt!==this.selectorCurve&&pt!==this.visibleCurve&&!this.curveGrip.ownsTarget(pt))},gt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},gt.prototype.createVisual=function(){this.visual=Gt.createGroup(),this.selectorCurve=Gt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Gt.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)},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=pt.x,this.curveY=pt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ct)&&(this.activeGrip=this.curveGrip,this._state="resize")},gt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Gt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Gt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Gt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},gt.prototype.setupControlBox=function(){bt.prototype.setupControlBox.call(this),this.curveControlLine1=Gt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Gt.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)},gt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,bt.prototype.addControlGrips.call(this)},gt.prototype.positionGrips=function(){bt.prototype.positionGrips.call(this);var pt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-pt/2,this.curveY-pt/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()))},gt.prototype.manipulate=function(pt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+pt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+pt.y-this.manipulationStartY),bt.prototype.manipulate.call(this,pt)},gt.prototype.resize=function(pt){this.activeGrip===this.curveGrip&&(this.curveX=pt.x,this.curveY=pt.y),bt.prototype.resize.call(this,pt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},gt.prototype.setStrokeColor=function(pt){this.strokeColor=pt,this.adjustVisual(),this.colorChanged(pt)},gt.prototype.setStrokeWidth=function(pt){this.strokeWidth=pt,this.adjustVisual()},gt.prototype.setStrokeDasharray=function(pt){this.strokeDasharray=pt,this.adjustVisual()},gt.prototype.scale=function(pt,Ct){this.curveX=this.curveX*pt,this.curveY=this.curveY*Ct,bt.prototype.scale.call(this,pt,Ct)},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},bt.prototype.getState.call(this));return pt.typeName=gt.typeName,pt},gt.prototype.restoreState=function(pt){bt.prototype.restoreState.call(this,pt);var Ct=pt;this.strokeColor=Ct.strokeColor,this.strokeWidth=Ct.strokeWidth,this.strokeDasharray=Ct.strokeDasharray,this.curveX=Ct.curveX,this.curveY=Ct.curveY,this.createVisual(),this.adjustVisual()},gt.typeName="CurveMarker",gt.title="Curve marker",gt.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>',gt}(Le),Cn=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,Ct,Pt)||this;return vt.fillColor="transparent",vt.strokeColor="transparent",vt.strokeWidth=0,vt.strokeDasharray="",vt.textColor="transparent",vt.fontSize="1rem",vt.isMoved=!1,vt.captionText="Caption",vt.PADDING=5,vt.captionBoxWidth=0,vt.captionBoxHeight=0,vt.strokeColor=Pt.defaultColor,vt.strokeWidth=Pt.defaultStrokeWidth,vt.strokeDasharray=Pt.defaultStrokeDasharray,vt.fillColor=Pt.defaultFillColor,vt.textColor=Pt.defaultStrokeColor,vt.fontFamily=Pt.defaultFontFamily,vt.fontSize=Pt.defaultCaptionFontSize,vt.captionText=Pt.defaultCaptionText,vt.setStrokeColor=vt.setStrokeColor.bind(vt),vt.setFillColor=vt.setFillColor.bind(vt),vt.setStrokeWidth=vt.setStrokeWidth.bind(vt),vt.setStrokeDasharray=vt.setStrokeDasharray.bind(vt),vt.createVisual=vt.createVisual.bind(vt),vt.sizeCaption=vt.sizeCaption.bind(vt),vt.setCaptionText=vt.setCaptionText.bind(vt),vt.showTextEditor=vt.showTextEditor.bind(vt),vt.positionTextEditor=vt.positionTextEditor.bind(vt),vt.finishTextEditing=vt.finishTextEditing.bind(vt),vt.setFont=vt.setFont.bind(vt),vt.setTextColor=vt.setTextColor.bind(vt),vt.strokePanel=new Kt("Line color",_t(Pt.defaultColorSet,["transparent"]),vt.strokeColor),vt.strokePanel.onColorChanged=vt.setStrokeColor,vt.fillPanel=new Kt("Fill color",_t(Pt.defaultColorSet,["transparent"]),vt.fillColor,kt),vt.fillPanel.onColorChanged=vt.setFillColor,vt.strokeWidthPanel=new ve("Line width",Pt.defaultStrokeWidths,Pt.defaultStrokeWidth),vt.strokeWidthPanel.onWidthChanged=vt.setStrokeWidth,vt.strokeStylePanel=new Qt("Line style",Pt.defaultStrokeDasharrays,Pt.defaultStrokeDasharray),vt.strokeStylePanel.onStyleChanged=vt.setStrokeDasharray,vt.fontFamilyPanel=new ie("Font",Pt.defaultFontFamilies,Pt.defaultFontFamily),vt.fontFamilyPanel.onFontChanged=vt.setFont,vt.textColorPanel=new Kt("Text color",Pt.defaultColorSet,vt.textColor,zt),vt.textColorPanel.onColorChanged=vt.setTextColor,vt}return Dt(gt,bt),gt.prototype.ownsTarget=function(pt){return!(!bt.prototype.ownsTarget.call(this,pt)&&pt!==this.visual&&pt!==this.frame&&pt!==this.captionBg&&pt!==this.captionElement)},gt.prototype.createVisual=function(){this.visual=Gt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Gt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Gt.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=Gt.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()},gt.prototype.setCaptionText=function(pt){this.captionText=pt,this.captionElement.textContent=this.captionText,this.sizeCaption()},gt.prototype.pointerDown=function(pt,Ct){bt.prototype.pointerDown.call(this,pt,Ct),this.isMoved=!1,this.pointerDownPoint=pt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(pt),this._state="creating")},gt.prototype.manipulate=function(pt){bt.prototype.manipulate.call(this,pt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(pt.x-this.pointerDownPoint.x)>5||Math.abs(pt.y-this.pointerDownPoint.y)>5)},gt.prototype.resize=function(pt){bt.prototype.resize.call(this,pt),this.setSize()},gt.prototype.sizeCaption=function(){var pt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=pt.width+2*this.PADDING,this.captionBoxHeight=pt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Gt.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')"]]),Gt.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')"]])},gt.prototype.showTextEditor=function(){var pt=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(Ct){Ct.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ct){Ct.key==="Enter"&&pt.finishTextEditing(pt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ct){Ct.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){pt.finishTextEditing(pt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){pt.finishTextEditing(pt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},gt.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"))},gt.prototype.finishTextEditing=function(pt){this.setCaptionText(pt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},gt.prototype.setFont=function(pt){this.captionElement&&Gt.setAttributes(this.captionElement,[["font-family",pt]]),this.fontFamily=pt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},gt.prototype.setTextColor=function(pt){this.captionElement&&Gt.setAttributes(this.captionElement,[["fill",pt]]),this.textColor=pt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},gt.prototype.setSize=function(){bt.prototype.setSize.call(this),Gt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},gt.prototype.pointerUp=function(pt){bt.prototype.pointerUp.call(this,pt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},gt.prototype.dblClick=function(pt,Ct){bt.prototype.dblClick.call(this,pt,Ct),this.showTextEditor()},gt.prototype.setStrokeColor=function(pt){this.strokeColor=pt,this.frame&&Gt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(pt),this.stateChanged()},gt.prototype.setFillColor=function(pt){this.fillColor=pt,this.captionBg&&Gt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(pt),this.stateChanged()},gt.prototype.setStrokeWidth=function(pt){this.strokeWidth=pt,this.frame&&Gt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},gt.prototype.setStrokeDasharray=function(pt){this.strokeDasharray=pt,this.frame&&Gt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(gt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),gt.prototype.getState=function(){var pt=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},bt.prototype.getState.call(this));return pt.typeName=this.typeName,pt},gt.prototype.restoreState=function(pt){var Ct=pt;this.fillColor=Ct.fillColor,this.strokeColor=Ct.strokeColor,this.strokeWidth=Ct.strokeWidth,this.strokeDasharray=Ct.strokeDasharray,this.textColor=Ct.textColor,this.fontFamily=Ct.fontFamily,this.captionText=Ct.captionText,this.fontSize=Ct.fontSize,this.createVisual(),bt.prototype.restoreState.call(this,pt),this.setSize()},gt.prototype.scale=function(pt,Ct){bt.prototype.scale.call(this,pt,Ct),this.setSize()},gt.typeName="CaptionFrameMarker",gt.title="Caption frame marker",gt.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>',gt}(se),Ie=function(){function bt(gt,pt){pt===void 0&&(pt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=gt,this.cancelable=pt}return Object.defineProperty(bt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),bt.prototype.preventDefault=function(){this._defaultPrevented=!0},bt}(),gn=function(bt){function gt(pt,Ct,Pt){var vt=bt.call(this,pt,!1)||this;return vt.dataUrl=Ct,vt.state=Pt,vt}return Dt(gt,bt),gt}(Ie),ke=function(bt){function gt(pt,Ct,Pt){Pt===void 0&&(Pt=!1);var vt=bt.call(this,pt,Pt)||this;return vt.marker=Ct,vt}return Dt(gt,bt),gt}(Ie),Dn=function(){function bt(){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 bt.prototype.addEventListener=function(gt,pt){this[gt].push(pt)},bt.prototype.removeEventListener=function(gt,pt){var Ct=this[gt].indexOf(pt);Ct>-1&&this[gt].splice(Ct,1)},bt}(),ln=function(){function bt(gt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new be,this._isOpen=!1,this.undoRedoManager=new Ee,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 Dn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=bt.instanceCounter++,this.styles=new Nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=gt,this.targetRoot=document.body,this.width=gt.clientWidth,this.height=gt.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(bt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Se,De,rn,Re,$t,wn,On,Ye,on,we,en,Be,Cn]},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Se,De,rn,Re,wn,On,Ye]},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Se,De,rn,Re,On]},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(gt){var pt=this;this._availableMarkerTypes.splice(0),gt.forEach(function(Ct){if(typeof Ct=="string"){var Pt=pt.ALL_MARKER_TYPES.find(function(vt){return vt.typeName===Ct});Pt!==void 0&&pt._availableMarkerTypes.push(Pt)}else pt._availableMarkerTypes.push(Ct)})},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(bt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(gt){this._zoomLevel=gt,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(bt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),bt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Vt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},bt.prototype.show=function(){var gt=this;this.styles.styleSheetRoot===void 0&&Yt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Yt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(pt){return pt(new Ie(gt))})},bt.prototype.render=function(){return It(this,void 0,void 0,function(){var gt;return xe(this,function(pt){switch(pt.label){case 0:return this.setCurrentMarker(),(gt=new me).naturalSize=this.renderAtNaturalSize,gt.imageType=this.renderImageType,gt.imageQuality=this.renderImageQuality,gt.markersOnly=this.renderMarkersOnly,gt.width=this.renderWidth,gt.height=this.renderHeight,[4,gt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return pt.sent(),[4,gt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,pt.sent()]}})})},bt.prototype.close=function(gt){var pt=this;if(gt===void 0&&(gt=!1),this.isOpen){var Ct=!1;gt||this.eventListeners.beforeclose.forEach(function(Pt){var vt=new Ie(pt,!0);Pt(vt),vt.defaultPrevented&&(Ct=!0)}),Ct||(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(Pt){return Pt(new Ie(pt))}),this.detachEvents(),this._isOpen=!1)}},bt.prototype.addMarkersToToolbar=function(){for(var gt,pt=[],Ct=0;Ct<arguments.length;Ct++)pt[Ct]=arguments[Ct];(gt=this._availableMarkerTypes).push.apply(gt,pt)},bt.prototype.addRenderEventListener=function(gt){this.addEventListener("render",function(pt){gt(pt.dataUrl,pt.state)})},bt.prototype.removeRenderEventListener=function(gt){},bt.prototype.addCloseEventListener=function(gt){this.addEventListener("close",function(){gt()})},bt.prototype.removeCloseEventListener=function(gt){},bt.prototype.setupResizeObserver=function(){var gt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){gt.resize(gt.target.clientWidth,gt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return gt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},bt.prototype.onPopupTargetResize=function(){var gt=1*this.target.clientWidth/this.target.clientHeight,pt=this.editorCanvas.clientWidth/gt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*gt:this.editorCanvas.clientWidth,Ct=pt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/gt;this.resize(pt,Ct)},bt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},bt.prototype.resize=function(gt,pt){this._isResizing=!0;var Ct=gt/this.imageWidth,Pt=pt/this.imageHeight;this.imageWidth=Math.round(gt),this.imageHeight=Math.round(pt),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(Ct,Pt),this._isResizing=!1},bt.prototype.scaleMarkers=function(gt,pt){var Ct,Pt=this;this._currentMarker&&this._currentMarker instanceof Re?this._currentMarker.scale(gt,pt):(Ct=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(vt){vt!==Pt._currentMarker&&vt.scale(gt,pt)}),Ct!==void 0&&this.setCurrentMarker(Ct)},bt.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"},bt.prototype.setTopLeft=function(){var gt=this.editingTarget.getBoundingClientRect(),pt=this.editorCanvas.getBoundingClientRect();this.left=gt.left-pt.left,this.top=gt.top-pt.top},bt.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)},bt.prototype.addDefs=function(){for(var gt,pt=[],Ct=0;Ct<arguments.length;Ct++)pt[Ct]=arguments[Ct];this.defs=Gt.createDefs(),this.addDefsToImage(),(gt=this.defs).append.apply(gt,pt)},bt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},bt.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)},bt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},bt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},bt.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)},bt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},bt.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)},bt.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 gt=document.createElement("a");gt.href="https://markerjs.com/",gt.target="_blank",gt.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>',gt.title="Powered by marker.js",gt.style.display="grid",gt.style.alignItems="center",gt.style.justifyItems="center",gt.style.padding="3px",gt.style.width="20px",gt.style.height="20px",this.logoUI.appendChild(gt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},bt.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")},bt.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"},bt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},bt.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 gt=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=gt+"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 Me(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 ce(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},bt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},bt.prototype.removeMarker=function(gt){this.markerImage.removeChild(gt.container),this.markers.indexOf(gt)>-1&&this.markers.splice(this.markers.indexOf(gt),1),gt.dispose()},bt.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())},bt.prototype.toolbarButtonClicked=function(gt,pt){if(gt==="marker"&&pt!==void 0)this.createNewMarker(pt);else if(gt==="action")switch(pt){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()}},bt.prototype.deleteSelectedMarker=function(){var gt=this;if(this._currentMarker!==void 0){var pt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Pt){var vt=new ke(gt,gt._currentMarker,!0);Pt(vt),vt.defaultPrevented&&(pt=!0)}),!pt){var Ct=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(Pt){return Pt(new ke(gt,Ct))})}}},bt.prototype.clear=function(){var gt=this,pt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Et){var Zt=new ke(gt,void 0,!0);Et(Zt),Zt.defaultPrevented&&(pt=!0)}),!pt)){this.setCurrentMarker();for(var Ct=function(Et){var Zt=Pt.markers[Et];Pt.setCurrentMarker(Pt.markers[Et]),Pt._currentMarker.dispose(),Pt.markerImage.removeChild(Pt._currentMarker.container),Pt.markers.splice(Pt.markers.indexOf(Pt._currentMarker),1),Pt.eventListeners.markerdelete.forEach(function(Ve){return Ve(new ke(gt,Zt))})},Pt=this,vt=this.markers.length-1;vt>=0;vt--)Ct(vt);this.addUndoStep()}},Object.defineProperty(bt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),bt.prototype.showNotesEditor=function(){var gt;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=(gt=this._currentMarker.notes)!==null&>!==void 0?gt:"",this.overlayContainer.appendChild(this.notesArea))},bt.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)},bt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},bt.prototype.addUndoStep=function(){var gt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var pt=this.getState(),Ct=this.undoRedoManager.getLastUndoStep();if(!Ct||Ct.width===pt.width&&Ct.height===pt.height){var Pt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(pt),Pt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(vt){return vt(new Ie(gt))})}else this.undoRedoManager.replaceLastUndoStep(pt),this.eventListeners.statechange.forEach(function(vt){return vt(new Ie(gt))})}},bt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},bt.prototype.undoStep=function(){var gt=this,pt=this.undoRedoManager.undo();pt!==void 0&&(this.restoreState(pt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ct){return Ct(new Ie(gt))}))},bt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},bt.prototype.redoStep=function(){var gt=this,pt=this.undoRedoManager.redo();pt!==void 0&&(this.restoreState(pt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ct){return Ct(new Ie(gt))}))},bt.prototype.stepZoom=function(){var gt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=gt<this.zoomSteps.length-1?this.zoomSteps[gt+1]:this.zoomSteps[0]},bt.prototype.panTo=function(gt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-gt.x,top:this.prevPanPoint.y-gt.y}),this.prevPanPoint=gt},bt.prototype.startRenderAndClose=function(){return It(this,void 0,void 0,function(){var gt,pt,Ct=this;return xe(this,function(Pt){switch(Pt.label){case 0:return[4,this.render()];case 1:return gt=Pt.sent(),pt=this.getState(),this.eventListeners.render.forEach(function(vt){return vt(new gn(Ct,gt,pt))}),this.close(!0),[2]}})})},bt.prototype.getState=function(gt){gt===!0&&this.setCurrentMarker();var pt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ct){return pt.markers.push(Ct.getState())}),pt},bt.prototype.restoreState=function(gt){var pt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);gt.markers.forEach(function(Ct){var Pt=pt._availableMarkerTypes.find(function(Et){return Et.typeName===Ct.typeName});if(Pt!==void 0){var vt=pt.addNewMarker(Pt);vt.restoreState(Ct),pt.markers.push(vt)}}),gt.width&>.height&&(gt.width!==this.imageWidth||gt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/gt.width,this.imageHeight/gt.height),this.eventListeners.restorestate.forEach(function(Ct){return Ct(new Ie(pt))})},bt.prototype.addNewMarker=function(gt){var pt=Gt.createGroup();return this.markerImage.appendChild(pt),new gt(pt,this.overlayContainer,this.settings)},bt.prototype.createNewMarker=function(gt){var pt,Ct=this;(pt=typeof gt=="string"?this._availableMarkerTypes.find(function(Pt){return Pt.typeName===gt}):gt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(pt),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(pt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Pt){return Pt(new ke(Ct,Ct._currentMarker))}))},bt.prototype.markerCreated=function(gt){var pt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(gt),this.setCurrentMarker(gt),gt instanceof De&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(De):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ct){return Ct(new ke(pt,pt._currentMarker))})},bt.prototype.colorChanged=function(gt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=gt,this.settings.defaultStrokeColor=gt)},bt.prototype.fillColorChanged=function(gt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=gt)},bt.prototype.markerStateChanged=function(gt){var pt=this;this.eventListeners.markerchange.forEach(function(Ct){return Ct(new ke(pt,gt))})},bt.prototype.setCurrentMarker=function(gt){var pt=this;this._currentMarker!==gt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ct){return Ct(new ke(pt,pt._currentMarker))})),this._currentMarker=gt,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(Ct){return Ct(new ke(pt,pt._currentMarker))}))},bt.prototype.onPointerDown=function(gt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||gt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var pt=this.markers.find(function(Ct){return Ct.ownsTarget(gt.target)});pt!==void 0?(this.setCurrentMarker(pt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(gt.clientX,gt.clientY),gt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:gt.clientX,y:gt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(gt.clientX,gt.clientY))},bt.prototype.onDblClick=function(gt){if(this._isFocused||this.focus(),this.mode==="select"){var pt=this.markers.find(function(Ct){return Ct.ownsTarget(gt.target)});pt!==void 0&&pt!==this._currentMarker&&this.setCurrentMarker(pt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(gt.clientX,gt.clientY),gt.target):this.setCurrentMarker()}},bt.prototype.onPointerMove=function(gt){this.touchPoints!==1&>.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||gt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(gt.clientX,gt.clientY)):this.zoomLevel>1&&this.panTo({x:gt.clientX,y:gt.clientY}))},bt.prototype.onPointerUp=function(gt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(gt.clientX,gt.clientY)),this.isDragging=!1,this.addUndoStep()},bt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},bt.prototype.onKeyUp=function(gt){this._currentMarker===void 0||this.notesArea!==void 0||gt.key!=="Delete"&>.key!=="Backspace"||this.deleteSelectedMarker()},bt.prototype.clientToLocalCoordinates=function(gt,pt){var Ct=this.markerImage.getBoundingClientRect();return{x:(gt-Ct.left)/this.zoomLevel,y:(pt-Ct.top)/this.zoomLevel}},bt.prototype.onWindowResize=function(){this.positionUI()},bt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var gt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=gt+"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()},bt.prototype.addLicenseKey=function(gt){Vt.addKey(gt)},bt.prototype.addEventListener=function(gt,pt){this.eventListeners.addEventListener(gt,pt)},bt.prototype.removeEventListener=function(gt,pt){this.eventListeners.removeEventListener(gt,pt)},bt.prototype.renderState=function(gt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(gt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(bt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),bt.prototype.focus=function(){var gt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(pt){return pt(new Ie(gt))}))},bt.prototype.blur=function(){var gt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(pt){return pt(new Ie(gt))}))},bt.instanceCounter=0,bt}()},6551:function(Yn,qe,dt){"use strict";dt.d(qe,{ZP:function(){return Vt}});var lt=dt(72190),Dt=dt(59301),It=dt(47273),xe=0,_t=(0,It.Z)();function Gt(){var me;return _t?(me=xe,xe+=1):me="TEST_OR_SSR",me}function Vt(me){var Yt=Dt.useState(),Nt=(0,lt.Z)(Yt,2),Oe=Nt[0],jt=Nt[1];return Dt.useEffect(function(){jt("rc_select_".concat(Gt()))},[]),me||Oe}},37463:function(Yn,qe,dt){"use strict";dt.d(qe,{Ac:function(){return sn},Xo:function(){return Mn},Wx:function(){return Ze},ZP:function(){return Ci},lk:function(){return je}});var lt=dt(60499),Dt=dt(77654),It=dt(18642),xe=dt(85899),_t=dt(72190),Gt=dt(42244),Vt=dt(43749),me=dt(18929),Yt=dt(48736),Nt=dt(59301),Oe=dt(92310),jt=dt.n(Oe),Me=dt(34280),ce=dt(49658),ee=dt(8654),Kt=function(Pe){var qt=Pe.className,He=Pe.customizeIcon,ae=Pe.customizeIconProps,ze=Pe.children,Jt=Pe.onMouseDown,nn=Pe.onClick,cn=typeof He=="function"?He(ae):He;return Nt.createElement("span",{className:qt,onMouseDown:function(Fe){Fe.preventDefault(),Jt==null||Jt(Fe)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:nn,"aria-hidden":!0},cn!==void 0?cn:Nt.createElement("span",{className:jt()(qt.split(/\s+/).map(function(Ne){return"".concat(Ne,"-icon")}))},ze))},Ht=Kt,de=function(Pe,qt,He,ae,ze){var Jt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,nn=arguments.length>6?arguments[6]:void 0,cn=arguments.length>7?arguments[7]:void 0,Ne=Nt.useMemo(function(){if((0,Vt.Z)(ae)==="object")return ae.clearIcon;if(ze)return ze},[ae,ze]),Fe=Nt.useMemo(function(){return!!(!Jt&&ae&&(He.length||nn)&&!(cn==="combobox"&&nn===""))},[ae,Jt,He.length,nn,cn]);return{allowClear:Fe,clearIcon:Nt.createElement(Ht,{className:"".concat(Pe,"-clear"),onMouseDown:qt,customizeIcon:Ne},"\xD7")}},Ae=Nt.createContext(null);function je(){return Nt.useContext(Ae)}function se(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=Nt.useState(!1),qt=(0,_t.Z)(Pe,2),He=qt[0],ae=qt[1],ze=Nt.useRef(null),Jt=function(){window.clearTimeout(ze.current)};Nt.useEffect(function(){return Jt},[]);var nn=function(Ne,Fe){Jt(),ze.current=window.setTimeout(function(){ae(Ne),Fe&&Fe()},Rt)};return[He,nn,Jt]}function Xt(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=Nt.useRef(null),qt=Nt.useRef(null);Nt.useEffect(function(){return function(){window.clearTimeout(qt.current)}},[]);function He(ae){(ae||Pe.current===null)&&(Pe.current=ae),window.clearTimeout(qt.current),qt.current=window.setTimeout(function(){Pe.current=null},Rt)}return[function(){return Pe.current},He]}function ve(Rt,Pe,qt,He){var ae=Nt.useRef(null);ae.current={open:Pe,triggerOpen:qt,customizedTrigger:He},Nt.useEffect(function(){function ze(Jt){var nn;if(!((nn=ae.current)!==null&&nn!==void 0&&nn.customizedTrigger)){var cn=Jt.target;cn.shadowRoot&&Jt.composed&&(cn=Jt.composedPath()[0]||cn),ae.current.open&&Rt().filter(function(Ne){return Ne}).every(function(Ne){return!Ne.contains(cn)&&Ne!==cn})&&ae.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ze),function(){return window.removeEventListener("mousedown",ze)}},[])}var Qt=dt(10228);function Se(Rt){return Rt&&![Qt.Z.ESC,Qt.Z.SHIFT,Qt.Z.BACKSPACE,Qt.Z.TAB,Qt.Z.WIN_KEY,Qt.Z.ALT,Qt.Z.META,Qt.Z.WIN_KEY_RIGHT,Qt.Z.CTRL,Qt.Z.SEMICOLON,Qt.Z.EQUALS,Qt.Z.CAPS_LOCK,Qt.Z.CONTEXT_MENU,Qt.Z.F1,Qt.Z.F2,Qt.Z.F3,Qt.Z.F4,Qt.Z.F5,Qt.Z.F6,Qt.Z.F7,Qt.Z.F8,Qt.Z.F9,Qt.Z.F10,Qt.Z.F11,Qt.Z.F12].includes(Rt)}var be=dt(26112),Le=dt(83836);function en(Rt,Pe,qt){var He=(0,xe.Z)((0,xe.Z)({},Rt),qt?Pe:{});return Object.keys(Pe).forEach(function(ae){var ze=Pe[ae];typeof ze=="function"&&(He[ae]=function(){for(var Jt,nn=arguments.length,cn=new Array(nn),Ne=0;Ne<nn;Ne++)cn[Ne]=arguments[Ne];return ze.apply(void 0,cn),(Jt=Rt[ae])===null||Jt===void 0?void 0:Jt.call.apply(Jt,[Rt].concat(cn))})}),He}var ie=en,Re=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],De=function(Pe,qt){var He=Pe.prefixCls,ae=Pe.id,ze=Pe.inputElement,Jt=Pe.autoFocus,nn=Pe.autoComplete,cn=Pe.editable,Ne=Pe.activeDescendantId,Fe=Pe.value,Xe=Pe.open,Je=Pe.attrs,vn=(0,Gt.Z)(Pe,Re),li=ze||Nt.createElement("input",null),jn=li,vi=jn.ref,$i=jn.props;return(0,Yt.Kp)(!("maxLength"in li.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),li=Nt.cloneElement(li,(0,xe.Z)((0,xe.Z)((0,xe.Z)({type:"search"},ie(vn,$i,!0)),{},{id:ae,ref:(0,ee.sQ)(qt,vi),autoComplete:nn||"off",autoFocus:Jt,className:jt()("".concat(He,"-selection-search-input"),$i==null?void 0:$i.className),role:"combobox","aria-expanded":Xe||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ae,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ae,"_list"),"aria-activedescendant":Xe?Ne:void 0},Je),{},{value:cn?Fe:"",readOnly:!cn,unselectable:cn?null:"on",style:(0,xe.Z)((0,xe.Z)({},$i.style),{},{opacity:cn?null:0})})),li},Tt=Nt.forwardRef(De),rn=Tt;function we(Rt){return Array.isArray(Rt)?Rt:Rt!==void 0?[Rt]:[]}var Ue=typeof window!="undefined"&&window.document&&window.document.documentElement,On=Ue;function zt(Rt){return Rt!=null}function kt(Rt){return!Rt&&Rt!==0}function Ye(Rt){return["string","number"].includes((0,Vt.Z)(Rt))}function wn(Rt){var Pe=void 0;return Rt&&(Ye(Rt.title)?Pe=Rt.title.toString():Ye(Rt.label)&&(Pe=Rt.label.toString())),Pe}function on(Rt,Pe){On?Nt.useLayoutEffect(Rt,Pe):Nt.useEffect(Rt,Pe)}function $t(Rt){var Pe;return(Pe=Rt.key)!==null&&Pe!==void 0?Pe:Rt.value}var Ee=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},Be=function(Pe){var qt=Pe.id,He=Pe.prefixCls,ae=Pe.values,ze=Pe.open,Jt=Pe.searchValue,nn=Pe.autoClearSearchValue,cn=Pe.inputRef,Ne=Pe.placeholder,Fe=Pe.disabled,Xe=Pe.mode,Je=Pe.showSearch,vn=Pe.autoFocus,li=Pe.autoComplete,jn=Pe.activeDescendantId,vi=Pe.tabIndex,$i=Pe.removeIcon,Ji=Pe.maxTagCount,yn=Pe.maxTagTextLength,zi=Pe.maxTagPlaceholder,Ri=zi===void 0?function(Mi){return"+ ".concat(Mi.length," ...")}:zi,Ii=Pe.tagRender,an=Pe.onToggleOpen,Qe=Pe.onRemove,We=Pe.onInputChange,mn=Pe.onInputPaste,fn=Pe.onInputKeyDown,Wn=Pe.onInputMouseDown,$e=Pe.onInputCompositionStart,Si=Pe.onInputCompositionEnd,pn=Pe.onInputBlur,wi=Nt.useRef(null),Wi=(0,Nt.useState)(0),Ui=(0,_t.Z)(Wi,2),Vi=Ui[0],Ki=Ui[1],Oi=(0,Nt.useState)(!1),qi=(0,_t.Z)(Oi,2),fr=qi[0],tr=qi[1],ai="".concat(He,"-selection"),Lt=ze||Xe==="multiple"&&nn===!1||Xe==="tags"?Jt:"",ur=Xe==="tags"||Xe==="multiple"&&nn===!1||Je&&(ze||fr);on(function(){Ki(wi.current.scrollWidth)},[Lt]);var Qi=function(Gn,gi,Li,pi,ni){return Nt.createElement("span",{title:wn(Gn),className:jt()("".concat(ai,"-item"),(0,It.Z)({},"".concat(ai,"-item-disabled"),Li))},Nt.createElement("span",{className:"".concat(ai,"-item-content")},gi),pi&&Nt.createElement(Ht,{className:"".concat(ai,"-item-remove"),onMouseDown:Ee,onClick:ni,customizeIcon:$i},"\xD7"))},Yi=function(Gn,gi,Li,pi,ni,kn){var ji=function(Dr){Ee(Dr),an(!ze)};return Nt.createElement("span",{onMouseDown:ji},Ii({label:gi,value:Gn,disabled:Li,closable:pi,onClose:ni,isMaxTag:!!kn}))},nr=function(Gn){var gi=Gn.disabled,Li=Gn.label,pi=Gn.value,ni=!Fe&&!gi,kn=Li;if(typeof yn=="number"&&(typeof Li=="string"||typeof Li=="number")){var ji=String(kn);ji.length>yn&&(kn="".concat(ji.slice(0,yn),"..."))}var br=function(Or){Or&&Or.stopPropagation(),Qe(Gn)};return typeof Ii=="function"?Yi(pi,kn,gi,ni,br):Qi(Gn,kn,gi,ni,br)},_i=function(Gn){if(!ae.length)return null;var gi=typeof Ri=="function"?Ri(Gn):Ri;return typeof Ii=="function"?Yi(void 0,gi,!1,!1,void 0,!0):Qi({title:gi},gi,!1)},ui=Nt.createElement("div",{className:"".concat(ai,"-search"),style:{width:Vi},onFocus:function(){tr(!0)},onBlur:function(){tr(!1)}},Nt.createElement(rn,{ref:cn,open:ze,prefixCls:He,id:qt,inputElement:null,disabled:Fe,autoFocus:vn,autoComplete:li,editable:ur,activeDescendantId:jn,value:Lt,onKeyDown:fn,onMouseDown:Wn,onChange:We,onPaste:mn,onCompositionStart:$e,onCompositionEnd:Si,onBlur:pn,tabIndex:vi,attrs:(0,be.Z)(Pe,!0)}),Nt.createElement("span",{ref:wi,className:"".concat(ai,"-search-mirror"),"aria-hidden":!0},Lt,"\xA0")),Ei=Nt.createElement(Le.Z,{prefixCls:"".concat(ai,"-overflow"),data:ae,renderItem:nr,renderRest:_i,suffix:ui,itemKey:$t,maxCount:Ji});return Nt.createElement("span",{className:"".concat(ai,"-wrap")},Ei,!ae.length&&!Lt&&Nt.createElement("span",{className:"".concat(ai,"-placeholder")},Ne))},Cn=Be,Ie=function(Pe){var qt=Pe.inputElement,He=Pe.prefixCls,ae=Pe.id,ze=Pe.inputRef,Jt=Pe.disabled,nn=Pe.autoFocus,cn=Pe.autoComplete,Ne=Pe.activeDescendantId,Fe=Pe.mode,Xe=Pe.open,Je=Pe.values,vn=Pe.placeholder,li=Pe.tabIndex,jn=Pe.showSearch,vi=Pe.searchValue,$i=Pe.activeValue,Ji=Pe.maxLength,yn=Pe.onInputKeyDown,zi=Pe.onInputMouseDown,Ri=Pe.onInputChange,Ii=Pe.onInputPaste,an=Pe.onInputCompositionStart,Qe=Pe.onInputCompositionEnd,We=Pe.onInputBlur,mn=Pe.title,fn=Nt.useState(!1),Wn=(0,_t.Z)(fn,2),$e=Wn[0],Si=Wn[1],pn=Fe==="combobox",wi=pn||jn,Wi=Je[0],Ui=vi||"";pn&&$i&&!$e&&(Ui=$i),Nt.useEffect(function(){pn&&Si(!1)},[pn,$i]);var Vi=Fe!=="combobox"&&!Xe&&!jn?!1:!!Ui,Ki=mn===void 0?wn(Wi):mn,Oi=Nt.useMemo(function(){return Wi?null:Nt.createElement("span",{className:"".concat(He,"-selection-placeholder"),style:Vi?{visibility:"hidden"}:void 0},vn)},[Wi,Vi,vn,He]);return Nt.createElement("span",{className:"".concat(He,"-selection-wrap")},Nt.createElement("span",{className:"".concat(He,"-selection-search")},Nt.createElement(rn,{ref:ze,prefixCls:He,id:ae,open:Xe,inputElement:qt,disabled:Jt,autoFocus:nn,autoComplete:cn,editable:wi,activeDescendantId:Ne,value:Ui,onKeyDown:yn,onMouseDown:zi,onChange:function(fr){Si(!0),Ri(fr)},onPaste:Ii,onCompositionStart:an,onCompositionEnd:Qe,onBlur:We,tabIndex:li,attrs:(0,be.Z)(Pe,!0),maxLength:pn?Ji:void 0})),!pn&&Wi?Nt.createElement("span",{className:"".concat(He,"-selection-item"),title:Ki,style:Vi?{visibility:"hidden"}:void 0},Wi.label):null,Oi)},gn=Ie,ke=function(Pe,qt){var He=(0,Nt.useRef)(null),ae=(0,Nt.useRef)(!1),ze=Pe.prefixCls,Jt=Pe.open,nn=Pe.mode,cn=Pe.showSearch,Ne=Pe.tokenWithEnter,Fe=Pe.disabled,Xe=Pe.prefix,Je=Pe.autoClearSearchValue,vn=Pe.onSearch,li=Pe.onSearchSubmit,jn=Pe.onToggleOpen,vi=Pe.onInputKeyDown,$i=Pe.onInputBlur,Ji=Pe.domRef;Nt.useImperativeHandle(qt,function(){return{focus:function(Ki){He.current.focus(Ki)},blur:function(){He.current.blur()}}});var yn=Xt(0),zi=(0,_t.Z)(yn,2),Ri=zi[0],Ii=zi[1],an=function(Ki){var Oi=Ki.which,qi=He.current instanceof HTMLTextAreaElement;!qi&&Jt&&(Oi===Qt.Z.UP||Oi===Qt.Z.DOWN)&&Ki.preventDefault(),vi&&vi(Ki),Oi===Qt.Z.ENTER&&nn==="tags"&&!ae.current&&!Jt&&(li==null||li(Ki.target.value)),!(qi&&!Jt&&~[Qt.Z.UP,Qt.Z.DOWN,Qt.Z.LEFT,Qt.Z.RIGHT].indexOf(Oi))&&Se(Oi)&&jn(!0)},Qe=function(){Ii(!0)},We=(0,Nt.useRef)(null),mn=function(Ki){vn(Ki,!0,ae.current)!==!1&&jn(!0)},fn=function(){ae.current=!0},Wn=function(Ki){ae.current=!1,nn!=="combobox"&&mn(Ki.target.value)},$e=function(Ki){var Oi=Ki.target.value;if(Ne&&We.current&&/[\r\n]/.test(We.current)){var qi=We.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Oi=Oi.replace(qi,We.current)}We.current=null,mn(Oi)},Si=function(Ki){var Oi=Ki.clipboardData,qi=Oi==null?void 0:Oi.getData("text");We.current=qi||""},pn=function(Ki){var Oi=Ki.target;if(Oi!==He.current){var qi=document.body.style.msTouchAction!==void 0;qi?setTimeout(function(){He.current.focus()}):He.current.focus()}},wi=function(Ki){var Oi=Ri();Ki.target!==He.current&&!Oi&&!(nn==="combobox"&&Fe)&&Ki.preventDefault(),(nn!=="combobox"&&(!cn||!Oi)||!Jt)&&(Jt&&Je!==!1&&vn("",!0,!1),jn())},Wi={inputRef:He,onInputKeyDown:an,onInputMouseDown:Qe,onInputChange:$e,onInputPaste:Si,onInputCompositionStart:fn,onInputCompositionEnd:Wn,onInputBlur:$i},Ui=nn==="multiple"||nn==="tags"?Nt.createElement(Cn,(0,lt.Z)({},Pe,Wi)):Nt.createElement(gn,(0,lt.Z)({},Pe,Wi));return Nt.createElement("div",{ref:Ji,className:"".concat(ze,"-selector"),onClick:pn,onMouseDown:wi},Xe&&Nt.createElement("div",{className:"".concat(ze,"-prefix")},Xe),Ui)},Dn=Nt.forwardRef(ke),ln=Dn,bt=dt(68196),gt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],pt=function(Pe){var qt=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:qt,adjustY:1},htmlRegion:"scroll"}}},Ct=function(Pe,qt){var He=Pe.prefixCls,ae=Pe.disabled,ze=Pe.visible,Jt=Pe.children,nn=Pe.popupElement,cn=Pe.animation,Ne=Pe.transitionName,Fe=Pe.dropdownStyle,Xe=Pe.dropdownClassName,Je=Pe.direction,vn=Je===void 0?"ltr":Je,li=Pe.placement,jn=Pe.builtinPlacements,vi=Pe.dropdownMatchSelectWidth,$i=Pe.dropdownRender,Ji=Pe.dropdownAlign,yn=Pe.getPopupContainer,zi=Pe.empty,Ri=Pe.getTriggerDOMNode,Ii=Pe.onPopupVisibleChange,an=Pe.onPopupMouseEnter,Qe=(0,Gt.Z)(Pe,gt),We="".concat(He,"-dropdown"),mn=nn;$i&&(mn=$i(nn));var fn=Nt.useMemo(function(){return jn||pt(vi)},[jn,vi]),Wn=cn?"".concat(We,"-").concat(cn):Ne,$e=typeof vi=="number",Si=Nt.useMemo(function(){return $e?null:vi===!1?"minWidth":"width"},[vi,$e]),pn=Fe;$e&&(pn=(0,xe.Z)((0,xe.Z)({},pn),{},{width:vi}));var wi=Nt.useRef(null);return Nt.useImperativeHandle(qt,function(){return{getPopupElement:function(){var Ui;return(Ui=wi.current)===null||Ui===void 0?void 0:Ui.popupElement}}}),Nt.createElement(bt.Z,(0,lt.Z)({},Qe,{showAction:Ii?["click"]:[],hideAction:Ii?["click"]:[],popupPlacement:li||(vn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:fn,prefixCls:We,popupTransitionName:Wn,popup:Nt.createElement("div",{onMouseEnter:an},mn),ref:wi,stretch:Si,popupAlign:Ji,popupVisible:ze,getPopupContainer:yn,popupClassName:jt()(Xe,(0,It.Z)({},"".concat(We,"-empty"),zi)),popupStyle:pn,getTriggerDOMNode:Ri,onPopupVisibleChange:Ii}),Jt)},Pt=Nt.forwardRef(Ct),vt=Pt,Et=dt(48745);function Zt(Rt,Pe){var qt=Rt.key,He;return"value"in Rt&&(He=Rt.value),qt!=null?qt:He!==void 0?He:"rc-index-key-".concat(Pe)}function Ve(Rt){return typeof Rt!="undefined"&&!Number.isNaN(Rt)}function ue(Rt,Pe){var qt=Rt||{},He=qt.label,ae=qt.value,ze=qt.options,Jt=qt.groupLabel,nn=He||(Pe?"children":"label");return{label:nn,value:ae||"value",options:ze||"options",groupLabel:Jt||nn}}function re(Rt){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qt=Pe.fieldNames,He=Pe.childrenAsData,ae=[],ze=ue(qt,!1),Jt=ze.label,nn=ze.value,cn=ze.options,Ne=ze.groupLabel;function Fe(Xe,Je){Array.isArray(Xe)&&Xe.forEach(function(vn){if(Je||!(cn in vn)){var li=vn[nn];ae.push({key:Zt(vn,ae.length),groupOption:Je,data:vn,label:vn[Jt],value:li})}else{var jn=vn[Ne];jn===void 0&&He&&(jn=vn.label),ae.push({key:Zt(vn,ae.length),group:!0,data:vn,label:jn}),Fe(vn[cn],!0)}})}return Fe(Rt,!1),ae}function Ce(Rt){var Pe=(0,xe.Z)({},Rt);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,Yt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}var Te=function(Pe,qt,He){if(!qt||!qt.length)return null;var ae=!1,ze=function nn(cn,Ne){var Fe=(0,Et.Z)(Ne),Xe=Fe[0],Je=Fe.slice(1);if(!Xe)return[cn];var vn=cn.split(Xe);return ae=ae||vn.length>1,vn.reduce(function(li,jn){return[].concat((0,Dt.Z)(li),(0,Dt.Z)(nn(jn,Je)))},[]).filter(Boolean)},Jt=ze(Pe,qt);return ae?typeof He!="undefined"?Jt.slice(0,He):Jt:null},tn=Nt.createContext(null),te=tn;function le(Rt){var Pe=Rt.visible,qt=Rt.values;if(!Pe)return null;var He=50;return Nt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(qt.slice(0,He).map(function(ae){var ze=ae.label,Jt=ae.value;return["number","string"].includes((0,Vt.Z)(ze))?ze:Jt}).join(", ")),qt.length>He?", ...":null)}var bn=["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","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Rn=function(Pe){return Pe==="tags"||Pe==="multiple"},In=Nt.forwardRef(function(Rt,Pe){var qt,He=Rt.id,ae=Rt.prefixCls,ze=Rt.className,Jt=Rt.showSearch,nn=Rt.tagRender,cn=Rt.direction,Ne=Rt.omitDomProps,Fe=Rt.displayValues,Xe=Rt.onDisplayValuesChange,Je=Rt.emptyOptions,vn=Rt.notFoundContent,li=vn===void 0?"Not Found":vn,jn=Rt.onClear,vi=Rt.mode,$i=Rt.disabled,Ji=Rt.loading,yn=Rt.getInputElement,zi=Rt.getRawInputElement,Ri=Rt.open,Ii=Rt.defaultOpen,an=Rt.onDropdownVisibleChange,Qe=Rt.activeValue,We=Rt.onActiveValueChange,mn=Rt.activeDescendantId,fn=Rt.searchValue,Wn=Rt.autoClearSearchValue,$e=Rt.onSearch,Si=Rt.onSearchSplit,pn=Rt.tokenSeparators,wi=Rt.allowClear,Wi=Rt.prefix,Ui=Rt.suffixIcon,Vi=Rt.clearIcon,Ki=Rt.OptionList,Oi=Rt.animation,qi=Rt.transitionName,fr=Rt.dropdownStyle,tr=Rt.dropdownClassName,ai=Rt.dropdownMatchSelectWidth,Lt=Rt.dropdownRender,ur=Rt.dropdownAlign,Qi=Rt.placement,Yi=Rt.builtinPlacements,nr=Rt.getPopupContainer,_i=Rt.showAction,ui=_i===void 0?[]:_i,Ei=Rt.onFocus,Mi=Rt.onBlur,Gn=Rt.onKeyUp,gi=Rt.onKeyDown,Li=Rt.onMouseDown,pi=(0,Gt.Z)(Rt,bn),ni=Rn(vi),kn=(Jt!==void 0?Jt:ni)||vi==="combobox",ji=(0,xe.Z)({},pi);Sn.forEach(function(co){delete ji[co]}),Ne==null||Ne.forEach(function(co){delete ji[co]});var br=Nt.useState(!1),Dr=(0,_t.Z)(br,2),Or=Dr[0],Vr=Dr[1];Nt.useEffect(function(){Vr((0,ce.Z)())},[]);var Gr=Nt.useRef(null),Ur=Nt.useRef(null),ro=Nt.useRef(null),Kr=Nt.useRef(null),uo=Nt.useRef(null),un=Nt.useRef(!1),So=se(),Io=(0,_t.Z)(So,3),ho=Io[0],to=Io[1],wr=Io[2];Nt.useImperativeHandle(Pe,function(){var co,Yr;return{focus:(co=Kr.current)===null||co===void 0?void 0:co.focus,blur:(Yr=Kr.current)===null||Yr===void 0?void 0:Yr.blur,scrollTo:function(er){var os;return(os=uo.current)===null||os===void 0?void 0:os.scrollTo(er)},nativeElement:Gr.current||Ur.current}});var Cr=Nt.useMemo(function(){var co;if(vi!=="combobox")return fn;var Yr=(co=Fe[0])===null||co===void 0?void 0:co.value;return typeof Yr=="string"||typeof Yr=="number"?String(Yr):""},[fn,vi,Fe]),bo=vi==="combobox"&&typeof yn=="function"&&yn()||null,Ar=typeof zi=="function"&&zi(),Sr=(0,ee.x1)(Ur,Ar==null||(qt=Ar.props)===null||qt===void 0?void 0:qt.ref),lo=Nt.useState(!1),$r=(0,_t.Z)(lo,2),Er=$r[0],oo=$r[1];(0,Me.Z)(function(){oo(!0)},[]);var Xi=(0,me.Z)(!1,{defaultValue:Ii,value:Ri}),vs=(0,_t.Z)(Xi,2),ws=vs[0],Qo=vs[1],qo=Er?ws:!1,Js=!li&&Je;($i||Js&&qo&&vi==="combobox")&&(qo=!1);var Fi=Js?!1:qo,mr=Nt.useCallback(function(co){var Yr=co!==void 0?co:!qo;$i||(Qo(Yr),qo!==Yr&&(an==null||an(Yr)))},[$i,qo,Qo,an]),gr=Nt.useMemo(function(){return(pn||[]).some(function(co){return[`
|
|
|
`,`\r
|
|
|
`].includes(co)})},[pn]),Lr=Nt.useContext(te)||{},zr=Lr.maxCount,go=Lr.rawValues,cr=function(Yr,ys,er){if(!(ni&&Ve(zr)&&(go==null?void 0:go.size)>=zr)){var os=!0,ge=Yr;We==null||We(null);var ti=Te(Yr,pn,Ve(zr)?zr-go.size:void 0),pa=er?null:ti;return vi!=="combobox"&&pa&&(ge="",Si==null||Si(pa),mr(!1),os=!1),$e&&Cr!==ge&&$e(ge,{source:ys?"typing":"effect"}),os}},ol=function(Yr){!Yr||!Yr.trim()||$e(Yr,{source:"submit"})};Nt.useEffect(function(){!qo&&!ni&&vi!=="combobox"&&cr("",!1,!1)},[qo]),Nt.useEffect(function(){ws&&$i&&Qo(!1),$i&&!un.current&&to(!1)},[$i]);var hs=Xt(),rs=(0,_t.Z)(hs,2),Eo=rs[0],Is=rs[1],pl=Nt.useRef(!1),As=function(Yr){var ys=Eo(),er=Yr.key,os=er==="Enter";if(os&&(vi!=="combobox"&&Yr.preventDefault(),qo||mr(!0)),Is(!!Cr),er==="Backspace"&&!ys&&ni&&!Cr&&Fe.length){for(var ge=(0,Dt.Z)(Fe),ti=null,pa=ge.length-1;pa>=0;pa-=1){var eu=ge[pa];if(!eu.disabled){ge.splice(pa,1),ti=eu;break}}ti&&Xe(ge,{type:"remove",values:[ti]})}for(var Tl=arguments.length,ml=new Array(Tl>1?Tl-1:0),Ta=1;Ta<Tl;Ta++)ml[Ta-1]=arguments[Ta];if(qo&&(!os||!pl.current)){var Cu;os&&(pl.current=!0),(Cu=uo.current)===null||Cu===void 0||Cu.onKeyDown.apply(Cu,[Yr].concat(ml))}gi==null||gi.apply(void 0,[Yr].concat(ml))},sl=function(Yr){for(var ys=arguments.length,er=new Array(ys>1?ys-1:0),os=1;os<ys;os++)er[os-1]=arguments[os];if(qo){var ge;(ge=uo.current)===null||ge===void 0||ge.onKeyUp.apply(ge,[Yr].concat(er))}Yr.key==="Enter"&&(pl.current=!1),Gn==null||Gn.apply(void 0,[Yr].concat(er))},da=function(Yr){var ys=Fe.filter(function(er){return er!==Yr});Xe(ys,{type:"remove",values:[Yr]})},jl=function(){pl.current=!1},$a=Nt.useRef(!1),Ph=function(){to(!0),$i||(Ei&&!$a.current&&Ei.apply(void 0,arguments),ui.includes("focus")&&mr(!0)),$a.current=!0},Cs=function(){un.current=!0,to(!1,function(){$a.current=!1,un.current=!1,mr(!1)}),!$i&&(Cr&&(vi==="tags"?$e(Cr,{source:"submit"}):vi==="multiple"&&$e("",{source:"blur"})),Mi&&Mi.apply(void 0,arguments))},Ql=[];Nt.useEffect(function(){return function(){Ql.forEach(function(co){return clearTimeout(co)}),Ql.splice(0,Ql.length)}},[]);var fa=function(Yr){var ys,er=Yr.target,os=(ys=ro.current)===null||ys===void 0?void 0:ys.getPopupElement();if(os&&os.contains(er)){var ge=setTimeout(function(){var Tl=Ql.indexOf(ge);if(Tl!==-1&&Ql.splice(Tl,1),wr(),!Or&&!os.contains(document.activeElement)){var ml;(ml=Kr.current)===null||ml===void 0||ml.focus()}});Ql.push(ge)}for(var ti=arguments.length,pa=new Array(ti>1?ti-1:0),eu=1;eu<ti;eu++)pa[eu-1]=arguments[eu];Li==null||Li.apply(void 0,[Yr].concat(pa))},Pl=Nt.useState({}),qa=(0,_t.Z)(Pl,2),tu=qa[1];function fi(){tu({})}var di;Ar&&(di=function(Yr){mr(Yr)}),ve(function(){var co;return[Gr.current,(co=ro.current)===null||co===void 0?void 0:co.getPopupElement()]},Fi,mr,!!Ar);var lr=Nt.useMemo(function(){return(0,xe.Z)((0,xe.Z)({},Rt),{},{notFoundContent:li,open:qo,triggerOpen:Fi,id:He,showSearch:kn,multiple:ni,toggleOpen:mr})},[Rt,li,Fi,qo,He,kn,ni,mr]),Nr=!!Ui||Ji,Ir;Nr&&(Ir=Nt.createElement(Ht,{className:jt()("".concat(ae,"-arrow"),(0,It.Z)({},"".concat(ae,"-arrow-loading"),Ji)),customizeIcon:Ui,customizeIconProps:{loading:Ji,searchValue:Cr,open:qo,focused:ho,showSearch:kn}}));var Jr=function(){var Yr;jn==null||jn(),(Yr=Kr.current)===null||Yr===void 0||Yr.focus(),Xe([],{type:"clear",values:Fe}),cr("",!1,!1)},vo=de(ae,Jr,Fe,wi,Vi,$i,Cr,vi),Zo=vo.allowClear,Wo=vo.clearIcon,ts=Nt.createElement(Ki,{ref:uo}),ql=jt()(ae,ze,(0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)({},"".concat(ae,"-focused"),ho),"".concat(ae,"-multiple"),ni),"".concat(ae,"-single"),!ni),"".concat(ae,"-allow-clear"),wi),"".concat(ae,"-show-arrow"),Nr),"".concat(ae,"-disabled"),$i),"".concat(ae,"-loading"),Ji),"".concat(ae,"-open"),qo),"".concat(ae,"-customize-input"),bo),"".concat(ae,"-show-search"),kn)),Nl=Nt.createElement(vt,{ref:ro,disabled:$i,prefixCls:ae,visible:Fi,popupElement:ts,animation:Oi,transitionName:qi,dropdownStyle:fr,dropdownClassName:tr,direction:cn,dropdownMatchSelectWidth:ai,dropdownRender:Lt,dropdownAlign:ur,placement:Qi,builtinPlacements:Yi,getPopupContainer:nr,empty:Je,getTriggerDOMNode:function(Yr){return Ur.current||Yr},onPopupVisibleChange:di,onPopupMouseEnter:fi},Ar?Nt.cloneElement(Ar,{ref:Sr}):Nt.createElement(ln,(0,lt.Z)({},Rt,{domRef:Ur,prefixCls:ae,inputElement:bo,ref:Kr,id:He,prefix:Wi,showSearch:kn,autoClearSearchValue:Wn,mode:vi,activeDescendantId:mn,tagRender:nn,values:Fe,open:qo,onToggleOpen:mr,activeValue:Qe,searchValue:Cr,onSearch:cr,onSearchSubmit:ol,onRemove:da,tokenWithEnter:gr,onInputBlur:jl}))),Po;return Ar?Po=Nl:Po=Nt.createElement("div",(0,lt.Z)({className:ql},ji,{ref:Gr,onMouseDown:fa,onKeyDown:As,onKeyUp:sl,onFocus:Ph,onBlur:Cs}),Nt.createElement(le,{visible:ho&&!qo,values:Fe}),Nl,Ir,Zo&&Wo),Nt.createElement(Ae.Provider,{value:lr},Po)}),sn=In,Hn=function(){return null};Hn.isSelectOptGroup=!0;var Mn=Hn,ye=function(){return null};ye.isSelectOption=!0;var Ze=ye,En=dt(80547),An=dt(2738),he=dt(48911);function Ke(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var hn=["disabled","title","children","style","className"];function Pn(Rt){return typeof Rt=="string"||typeof Rt=="number"}var _n=function(Pe,qt){var He=je(),ae=He.prefixCls,ze=He.id,Jt=He.open,nn=He.multiple,cn=He.mode,Ne=He.searchValue,Fe=He.toggleOpen,Xe=He.notFoundContent,Je=He.onPopupScroll,vn=Nt.useContext(te),li=vn.maxCount,jn=vn.flattenOptions,vi=vn.onActiveValue,$i=vn.defaultActiveFirstOption,Ji=vn.onSelect,yn=vn.menuItemSelectedIcon,zi=vn.rawValues,Ri=vn.fieldNames,Ii=vn.virtual,an=vn.direction,Qe=vn.listHeight,We=vn.listItemHeight,mn=vn.optionRender,fn="".concat(ae,"-item"),Wn=(0,En.Z)(function(){return jn},[Jt,jn],function(_i,ui){return ui[0]&&_i[1]!==ui[1]}),$e=Nt.useRef(null),Si=Nt.useMemo(function(){return nn&&Ve(li)&&(zi==null?void 0:zi.size)>=li},[nn,li,zi==null?void 0:zi.size]),pn=function(ui){ui.preventDefault()},wi=function(ui){var Ei;(Ei=$e.current)===null||Ei===void 0||Ei.scrollTo(typeof ui=="number"?{index:ui}:ui)},Wi=Nt.useCallback(function(_i){return cn==="combobox"?!1:zi.has(_i)},[cn,(0,Dt.Z)(zi).toString(),zi.size]),Ui=function(ui){for(var Ei=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Mi=Wn.length,Gn=0;Gn<Mi;Gn+=1){var gi=(ui+Gn*Ei+Mi)%Mi,Li=Wn[gi]||{},pi=Li.group,ni=Li.data;if(!pi&&!(ni!=null&&ni.disabled)&&(Wi(ni.value)||!Si))return gi}return-1},Vi=Nt.useState(function(){return Ui(0)}),Ki=(0,_t.Z)(Vi,2),Oi=Ki[0],qi=Ki[1],fr=function(ui){var Ei=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;qi(ui);var Mi={source:Ei?"keyboard":"mouse"},Gn=Wn[ui];if(!Gn){vi(null,-1,Mi);return}vi(Gn.value,ui,Mi)};(0,Nt.useEffect)(function(){fr($i!==!1?Ui(0):-1)},[Wn.length,Ne]);var tr=Nt.useCallback(function(_i){return cn==="combobox"?String(_i).toLowerCase()===Ne.toLowerCase():zi.has(_i)},[cn,Ne,(0,Dt.Z)(zi).toString(),zi.size]);(0,Nt.useEffect)(function(){var _i=setTimeout(function(){if(!nn&&Jt&&zi.size===1){var Ei=Array.from(zi)[0],Mi=Wn.findIndex(function(Gn){var gi=Gn.data;return Ne?String(gi.value).startsWith(Ne):gi.value===Ei});Mi!==-1&&(fr(Mi),wi(Mi))}});if(Jt){var ui;(ui=$e.current)===null||ui===void 0||ui.scrollTo(void 0)}return function(){return clearTimeout(_i)}},[Jt,Ne]);var ai=function(ui){ui!==void 0&&Ji(ui,{selected:!zi.has(ui)}),nn||Fe(!1)};if(Nt.useImperativeHandle(qt,function(){return{onKeyDown:function(ui){var Ei=ui.which,Mi=ui.ctrlKey;switch(Ei){case Qt.Z.N:case Qt.Z.P:case Qt.Z.UP:case Qt.Z.DOWN:{var Gn=0;if(Ei===Qt.Z.UP?Gn=-1:Ei===Qt.Z.DOWN?Gn=1:Ke()&&Mi&&(Ei===Qt.Z.N?Gn=1:Ei===Qt.Z.P&&(Gn=-1)),Gn!==0){var gi=Ui(Oi+Gn,Gn);wi(gi),fr(gi,!0)}break}case Qt.Z.TAB:case Qt.Z.ENTER:{var Li,pi=Wn[Oi];pi&&!(pi!=null&&(Li=pi.data)!==null&&Li!==void 0&&Li.disabled)&&!Si?ai(pi.value):ai(void 0),Jt&&ui.preventDefault();break}case Qt.Z.ESC:Fe(!1),Jt&&ui.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ui){wi(ui)}}}),Wn.length===0)return Nt.createElement("div",{role:"listbox",id:"".concat(ze,"_list"),className:"".concat(fn,"-empty"),onMouseDown:pn},Xe);var Lt=Object.keys(Ri).map(function(_i){return Ri[_i]}),ur=function(ui){return ui.label};function Qi(_i,ui){var Ei=_i.group;return{role:Ei?"presentation":"option",id:"".concat(ze,"_list_").concat(ui)}}var Yi=function(ui){var Ei=Wn[ui];if(!Ei)return null;var Mi=Ei.data||{},Gn=Mi.value,gi=Ei.group,Li=(0,be.Z)(Mi,!0),pi=ur(Ei);return Ei?Nt.createElement("div",(0,lt.Z)({"aria-label":typeof pi=="string"&&!gi?pi:null},Li,{key:ui},Qi(Ei,ui),{"aria-selected":tr(Gn)}),Gn):null},nr={role:"listbox",id:"".concat(ze,"_list")};return Nt.createElement(Nt.Fragment,null,Ii&&Nt.createElement("div",(0,lt.Z)({},nr,{style:{height:0,width:0,overflow:"hidden"}}),Yi(Oi-1),Yi(Oi),Yi(Oi+1)),Nt.createElement(he.Z,{itemKey:"key",ref:$e,data:Wn,height:Qe,itemHeight:We,fullHeight:!1,onMouseDown:pn,onScroll:Je,virtual:Ii,direction:an,innerProps:Ii?null:nr},function(_i,ui){var Ei=_i.group,Mi=_i.groupOption,Gn=_i.data,gi=_i.label,Li=_i.value,pi=Gn.key;if(Ei){var ni,kn=(ni=Gn.title)!==null&&ni!==void 0?ni:Pn(gi)?gi.toString():void 0;return Nt.createElement("div",{className:jt()(fn,"".concat(fn,"-group"),Gn.className),title:kn},gi!==void 0?gi:pi)}var ji=Gn.disabled,br=Gn.title,Dr=Gn.children,Or=Gn.style,Vr=Gn.className,Gr=(0,Gt.Z)(Gn,hn),Ur=(0,An.Z)(Gr,Lt),ro=Wi(Li),Kr=ji||!ro&&Si,uo="".concat(fn,"-option"),un=jt()(fn,uo,Vr,(0,It.Z)((0,It.Z)((0,It.Z)((0,It.Z)({},"".concat(uo,"-grouped"),Mi),"".concat(uo,"-active"),Oi===ui&&!Kr),"".concat(uo,"-disabled"),Kr),"".concat(uo,"-selected"),ro)),So=ur(_i),Io=!yn||typeof yn=="function"||ro,ho=typeof So=="number"?So:So||Li,to=Pn(ho)?ho.toString():void 0;return br!==void 0&&(to=br),Nt.createElement("div",(0,lt.Z)({},(0,be.Z)(Ur),Ii?{}:Qi(_i,ui),{"aria-selected":tr(Li),className:un,title:to,onMouseMove:function(){Oi===ui||Kr||fr(ui)},onClick:function(){Kr||ai(Li)},style:Or}),Nt.createElement("div",{className:"".concat(uo,"-content")},typeof mn=="function"?mn(_i,{index:ui}):ho),Nt.isValidElement(yn)||ro,Io&&Nt.createElement(Ht,{className:"".concat(fn,"-option-state"),customizeIcon:yn,customizeIconProps:{value:Li,disabled:Kr,isSelected:ro}},ro?"\u2713":null))}))},ci=Nt.forwardRef(_n),yi=ci,Ni=function(Rt,Pe){var qt=Nt.useRef({values:new Map,options:new Map}),He=Nt.useMemo(function(){var ze=qt.current,Jt=ze.values,nn=ze.options,cn=Rt.map(function(Xe){if(Xe.label===void 0){var Je;return(0,xe.Z)((0,xe.Z)({},Xe),{},{label:(Je=Jt.get(Xe.value))===null||Je===void 0?void 0:Je.label})}return Xe}),Ne=new Map,Fe=new Map;return cn.forEach(function(Xe){Ne.set(Xe.value,Xe),Fe.set(Xe.value,Pe.get(Xe.value)||nn.get(Xe.value))}),qt.current.values=Ne,qt.current.options=Fe,cn},[Rt,Pe]),ae=Nt.useCallback(function(ze){return Pe.get(ze)||qt.current.options.get(ze)},[Pe]);return[He,ae]};function ri(Rt,Pe){return we(Rt).join("").toUpperCase().includes(Pe)}var yt=function(Rt,Pe,qt,He,ae){return Nt.useMemo(function(){if(!qt||He===!1)return Rt;var ze=Pe.options,Jt=Pe.label,nn=Pe.value,cn=[],Ne=typeof He=="function",Fe=qt.toUpperCase(),Xe=Ne?He:function(vn,li){return ae?ri(li[ae],Fe):li[ze]?ri(li[Jt!=="children"?Jt:"label"],Fe):ri(li[nn],Fe)},Je=Ne?function(vn){return Ce(vn)}:function(vn){return vn};return Rt.forEach(function(vn){if(vn[ze]){var li=Xe(qt,Je(vn));if(li)cn.push(vn);else{var jn=vn[ze].filter(function(vi){return Xe(qt,Je(vi))});jn.length&&cn.push((0,xe.Z)((0,xe.Z)({},vn),{},(0,It.Z)({},ze,jn)))}return}Xe(qt,Je(vn))&&cn.push(vn)}),cn},[Rt,He,ae,qt,Pe])},Tn=dt(6551),xn=dt(11592),Bn=["children","value"],Zn=["children"];function Nn(Rt){var Pe=Rt,qt=Pe.key,He=Pe.props,ae=He.children,ze=He.value,Jt=(0,Gt.Z)(He,Bn);return(0,xe.Z)({key:qt,value:ze!==void 0?ze:qt,children:ae},Jt)}function Ln(Rt){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,xn.Z)(Rt).map(function(qt,He){if(!Nt.isValidElement(qt)||!qt.type)return null;var ae=qt,ze=ae.type.isSelectOptGroup,Jt=ae.key,nn=ae.props,cn=nn.children,Ne=(0,Gt.Z)(nn,Zn);return Pe||!ze?Nn(qt):(0,xe.Z)((0,xe.Z)({key:"__RC_SELECT_GRP__".concat(Jt===null?He:Jt,"__"),label:Jt},Ne),{},{options:Ln(cn)})}).filter(function(qt){return qt})}var ii=function(Pe,qt,He,ae,ze){return Nt.useMemo(function(){var Jt=Pe,nn=!Pe;nn&&(Jt=Ln(qt));var cn=new Map,Ne=new Map,Fe=function(vn,li,jn){jn&&typeof jn=="string"&&vn.set(li[jn],li)},Xe=function Je(vn){for(var li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jn=0;jn<vn.length;jn+=1){var vi=vn[jn];!vi[He.options]||li?(cn.set(vi[He.value],vi),Fe(Ne,vi,He.label),Fe(Ne,vi,ae),Fe(Ne,vi,ze)):Je(vi[He.options],!0)}};return Xe(Jt),{options:Jt,valueOptions:cn,labelOptions:Ne}},[Pe,qt,He,ae,ze])},Qn=ii;function xi(Rt){var Pe=Nt.useRef();Pe.current=Rt;var qt=Nt.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return qt}function Xn(Rt){var Pe=Rt.mode,qt=Rt.options,He=Rt.children,ae=Rt.backfill,ze=Rt.allowClear,Jt=Rt.placeholder,nn=Rt.getInputElement,cn=Rt.showSearch,Ne=Rt.onSearch,Fe=Rt.defaultOpen,Xe=Rt.autoFocus,Je=Rt.labelInValue,vn=Rt.value,li=Rt.inputValue,jn=Rt.optionLabelProp,vi=isMultiple(Pe),$i=cn!==void 0?cn:vi||Pe==="combobox",Ji=qt||convertChildrenToData(He);if(warning(Pe!=="tags"||Ji.every(function(Ii){return!Ii.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var yn=Ji.some(function(Ii){return Ii.options?Ii.options.some(function(an){return typeof("value"in an?an.value:an.key)=="number"}):typeof("value"in Ii?Ii.value:Ii.key)=="number"});warning(!yn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!jn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!ae,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!nn,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!nn||!ze||!Jt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ne&&!$i&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Fe||Xe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),vn!=null){var zi=toArray(vn);warning(!Je||zi.every(function(Ii){return _typeof(Ii)==="object"&&("key"in Ii||"value"in Ii)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!vi||Array.isArray(vn),"`value` should be array when `mode` is `multiple` or `tags`")}if(He){var Ri=null;toNodeArray(He).some(function(Ii){if(!React.isValidElement(Ii)||!Ii.type)return!1;var an=Ii,Qe=an.type;if(Qe.isSelectOption)return!1;if(Qe.isSelectOptGroup){var We=toNodeArray(Ii.props.children).every(function(mn){return!React.isValidElement(mn)||!Ii.type||mn.type.isSelectOption?!0:(Ri=mn.type,!1)});return!We}return Ri=Qe,!0}),Ri&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ri.displayName||Ri.name||Ri,"`.")),warning(li===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function $n(Rt,Pe){if(Rt){var qt=function He(ae){for(var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Jt=0;Jt<ae.length;Jt++){var nn=ae[Jt];if(nn[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ze&&Array.isArray(nn[Pe==null?void 0:Pe.options])&&He(nn[Pe==null?void 0:Pe.options],!0))break}};qt(Rt)}}var Hi=null,Bi=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],sr=["inputValue"];function Jn(Rt){return!Rt||(0,Vt.Z)(Rt)!=="object"}var Vn=Nt.forwardRef(function(Rt,Pe){var qt=Rt.id,He=Rt.mode,ae=Rt.prefixCls,ze=ae===void 0?"rc-select":ae,Jt=Rt.backfill,nn=Rt.fieldNames,cn=Rt.inputValue,Ne=Rt.searchValue,Fe=Rt.onSearch,Xe=Rt.autoClearSearchValue,Je=Xe===void 0?!0:Xe,vn=Rt.onSelect,li=Rt.onDeselect,jn=Rt.dropdownMatchSelectWidth,vi=jn===void 0?!0:jn,$i=Rt.filterOption,Ji=Rt.filterSort,yn=Rt.optionFilterProp,zi=Rt.optionLabelProp,Ri=Rt.options,Ii=Rt.optionRender,an=Rt.children,Qe=Rt.defaultActiveFirstOption,We=Rt.menuItemSelectedIcon,mn=Rt.virtual,fn=Rt.direction,Wn=Rt.listHeight,$e=Wn===void 0?200:Wn,Si=Rt.listItemHeight,pn=Si===void 0?20:Si,wi=Rt.labelRender,Wi=Rt.value,Ui=Rt.defaultValue,Vi=Rt.labelInValue,Ki=Rt.onChange,Oi=Rt.maxCount,qi=(0,Gt.Z)(Rt,Bi),fr=(0,Tn.ZP)(qt),tr=Rn(He),ai=!!(!Ri&&an),Lt=Nt.useMemo(function(){return $i===void 0&&He==="combobox"?!1:$i},[$i,He]),ur=Nt.useMemo(function(){return ue(nn,ai)},[JSON.stringify(nn),ai]),Qi=(0,me.Z)("",{value:Ne!==void 0?Ne:cn,postState:function(gr){return gr||""}}),Yi=(0,_t.Z)(Qi,2),nr=Yi[0],_i=Yi[1],ui=Qn(Ri,an,ur,yn,zi),Ei=ui.valueOptions,Mi=ui.labelOptions,Gn=ui.options,gi=Nt.useCallback(function(mr){var gr=we(mr);return gr.map(function(Lr){var zr,go,cr,ol,hs;if(Jn(Lr))zr=Lr;else{var rs;cr=Lr.key,go=Lr.label,zr=(rs=Lr.value)!==null&&rs!==void 0?rs:cr}var Eo=Ei.get(zr);if(Eo){var Is;if(go===void 0&&(go=Eo==null?void 0:Eo[zi||ur.label]),cr===void 0&&(cr=(Is=Eo==null?void 0:Eo.key)!==null&&Is!==void 0?Is:zr),ol=Eo==null?void 0:Eo.disabled,hs=Eo==null?void 0:Eo.title,0)var pl}return{label:go,value:zr,key:cr,disabled:ol,title:hs}})},[ur,zi,Ei]),Li=(0,me.Z)(Ui,{value:Wi}),pi=(0,_t.Z)(Li,2),ni=pi[0],kn=pi[1],ji=Nt.useMemo(function(){var mr,gr=tr&&ni===null?[]:ni,Lr=gi(gr);return He==="combobox"&&kt((mr=Lr[0])===null||mr===void 0?void 0:mr.value)?[]:Lr},[ni,gi,He,tr]),br=Ni(ji,Ei),Dr=(0,_t.Z)(br,2),Or=Dr[0],Vr=Dr[1],Gr=Nt.useMemo(function(){if(!He&&Or.length===1){var mr=Or[0];if(mr.value===null&&(mr.label===null||mr.label===void 0))return[]}return Or.map(function(gr){var Lr;return(0,xe.Z)((0,xe.Z)({},gr),{},{label:(Lr=typeof wi=="function"?wi(gr):gr.label)!==null&&Lr!==void 0?Lr:gr.value})})},[He,Or,wi]),Ur=Nt.useMemo(function(){return new Set(Or.map(function(mr){return mr.value}))},[Or]);Nt.useEffect(function(){if(He==="combobox"){var mr,gr=(mr=Or[0])===null||mr===void 0?void 0:mr.value;_i(zt(gr)?String(gr):"")}},[Or]);var ro=xi(function(mr,gr){var Lr=gr!=null?gr:mr;return(0,It.Z)((0,It.Z)({},ur.value,mr),ur.label,Lr)}),Kr=Nt.useMemo(function(){if(He!=="tags")return Gn;var mr=(0,Dt.Z)(Gn),gr=function(zr){return Ei.has(zr)};return(0,Dt.Z)(Or).sort(function(Lr,zr){return Lr.value<zr.value?-1:1}).forEach(function(Lr){var zr=Lr.value;gr(zr)||mr.push(ro(zr,Lr.label))}),mr},[ro,Gn,Ei,Or,He]),uo=yt(Kr,ur,nr,Lt,yn),un=Nt.useMemo(function(){return He!=="tags"||!nr||uo.some(function(mr){return mr[yn||"value"]===nr})||uo.some(function(mr){return mr[ur.value]===nr})?uo:[ro(nr)].concat((0,Dt.Z)(uo))},[ro,yn,He,uo,nr,ur]),So=function mr(gr){var Lr=(0,Dt.Z)(gr).sort(function(zr,go){return Ji(zr,go,{searchValue:nr})});return Lr.map(function(zr){return Array.isArray(zr.options)?(0,xe.Z)((0,xe.Z)({},zr),{},{options:zr.options.length>0?mr(zr.options):zr.options}):zr})},Io=Nt.useMemo(function(){return Ji?So(un):un},[un,Ji,nr]),ho=Nt.useMemo(function(){return re(Io,{fieldNames:ur,childrenAsData:ai})},[Io,ur,ai]),to=function(gr){var Lr=gi(gr);if(kn(Lr),Ki&&(Lr.length!==Or.length||Lr.some(function(cr,ol){var hs;return((hs=Or[ol])===null||hs===void 0?void 0:hs.value)!==(cr==null?void 0:cr.value)}))){var zr=Vi?Lr:Lr.map(function(cr){return cr.value}),go=Lr.map(function(cr){return Ce(Vr(cr.value))});Ki(tr?zr:zr[0],tr?go:go[0])}},wr=Nt.useState(null),Cr=(0,_t.Z)(wr,2),bo=Cr[0],Ar=Cr[1],Sr=Nt.useState(0),lo=(0,_t.Z)(Sr,2),$r=lo[0],Er=lo[1],oo=Qe!==void 0?Qe:He!=="combobox",Xi=Nt.useCallback(function(mr,gr){var Lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},zr=Lr.source,go=zr===void 0?"keyboard":zr;Er(gr),Jt&&He==="combobox"&&mr!==null&&go==="keyboard"&&Ar(String(mr))},[Jt,He]),vs=function(gr,Lr,zr){var go=function(){var da,jl=Vr(gr);return[Vi?{label:jl==null?void 0:jl[ur.label],value:gr,key:(da=jl==null?void 0:jl.key)!==null&&da!==void 0?da:gr}:gr,Ce(jl)]};if(Lr&&vn){var cr=go(),ol=(0,_t.Z)(cr,2),hs=ol[0],rs=ol[1];vn(hs,rs)}else if(!Lr&&li&&zr!=="clear"){var Eo=go(),Is=(0,_t.Z)(Eo,2),pl=Is[0],As=Is[1];li(pl,As)}},ws=xi(function(mr,gr){var Lr,zr=tr?gr.selected:!0;zr?Lr=tr?[].concat((0,Dt.Z)(Or),[mr]):[mr]:Lr=Or.filter(function(go){return go.value!==mr}),to(Lr),vs(mr,zr),He==="combobox"?Ar(""):(!Rn||Je)&&(_i(""),Ar(""))}),Qo=function(gr,Lr){to(gr);var zr=Lr.type,go=Lr.values;(zr==="remove"||zr==="clear")&&go.forEach(function(cr){vs(cr.value,!1,zr)})},qo=function(gr,Lr){if(_i(gr),Ar(null),Lr.source==="submit"){var zr=(gr||"").trim();if(zr){var go=Array.from(new Set([].concat((0,Dt.Z)(Ur),[zr])));to(go),vs(zr,!0),_i("")}return}Lr.source!=="blur"&&(He==="combobox"&&to(gr),Fe==null||Fe(gr))},Js=function(gr){var Lr=gr;He!=="tags"&&(Lr=gr.map(function(go){var cr=Mi.get(go);return cr==null?void 0:cr.value}).filter(function(go){return go!==void 0}));var zr=Array.from(new Set([].concat((0,Dt.Z)(Ur),(0,Dt.Z)(Lr))));to(zr),zr.forEach(function(go){vs(go,!0)})},Fi=Nt.useMemo(function(){var mr=mn!==!1&&vi!==!1;return(0,xe.Z)((0,xe.Z)({},ui),{},{flattenOptions:ho,onActiveValue:Xi,defaultActiveFirstOption:oo,onSelect:ws,menuItemSelectedIcon:We,rawValues:Ur,fieldNames:ur,virtual:mr,direction:fn,listHeight:$e,listItemHeight:pn,childrenAsData:ai,maxCount:Oi,optionRender:Ii})},[Oi,ui,ho,Xi,oo,ws,We,Ur,ur,mn,vi,fn,$e,pn,ai,Ii]);return Nt.createElement(te.Provider,{value:Fi},Nt.createElement(sn,(0,lt.Z)({},qi,{id:fr,prefixCls:ze,ref:Pe,omitDomProps:sr,mode:He,displayValues:Gr,onDisplayValuesChange:Qo,direction:fn,searchValue:nr,onSearch:qo,autoClearSearchValue:Je,onSearchSplit:Js,dropdownMatchSelectWidth:vi,OptionList:yi,emptyOptions:!ho.length,activeValue:bo,activeDescendantId:"".concat(fr,"_list_").concat($r)})))}),oi=Vn;oi.Option=Ze,oi.OptGroup=Mn;var Ti=oi,Ci=Ti},22711:function(Yn,qe,dt){"use strict";dt.r(qe),dt.d(qe,{ResizableTextArea:function(){return ie},default:function(){return rn}});var lt=dt(60499),Dt=dt(18642),It=dt(85899),xe=dt(77654),_t=dt(72190),Gt=dt(42244),Vt=dt(92310),me=dt.n(Vt),Yt=dt(36901),Nt=dt(66003),Oe=dt(30292),jt=dt(18929),Me=dt(59301),ce=dt(43749),ee=dt(29301),Kt=dt(34280),Ht=dt(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;
|
|
|
`,Ae=["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"],je={},se;function Xt(we){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,On=we.getAttribute("id")||we.getAttribute("data-reactid")||we.getAttribute("name");if(Ue&&je[On])return je[On];var zt=window.getComputedStyle(we),kt=zt.getPropertyValue("box-sizing")||zt.getPropertyValue("-moz-box-sizing")||zt.getPropertyValue("-webkit-box-sizing"),Ye=parseFloat(zt.getPropertyValue("padding-bottom"))+parseFloat(zt.getPropertyValue("padding-top")),wn=parseFloat(zt.getPropertyValue("border-bottom-width"))+parseFloat(zt.getPropertyValue("border-top-width")),on=Ae.map(function(Ee){return"".concat(Ee,":").concat(zt.getPropertyValue(Ee))}).join(";"),$t={sizingStyle:on,paddingSize:Ye,borderSize:wn,boxSizing:kt};return Ue&&On&&(je[On]=$t),$t}function ve(we){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,On=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;se||(se=document.createElement("textarea"),se.setAttribute("tab-index","-1"),se.setAttribute("aria-hidden","true"),se.setAttribute("name","hiddenTextarea"),document.body.appendChild(se)),we.getAttribute("wrap")?se.setAttribute("wrap",we.getAttribute("wrap")):se.removeAttribute("wrap");var kt=Xt(we,Ue),Ye=kt.paddingSize,wn=kt.borderSize,on=kt.boxSizing,$t=kt.sizingStyle;se.setAttribute("style","".concat($t,";").concat(de)),se.value=we.value||we.placeholder||"";var Ee=void 0,Be=void 0,Cn,Ie=se.scrollHeight;if(on==="border-box"?Ie+=wn:on==="content-box"&&(Ie-=Ye),On!==null||zt!==null){se.value=" ";var gn=se.scrollHeight-Ye;On!==null&&(Ee=gn*On,on==="border-box"&&(Ee=Ee+Ye+wn),Ie=Math.max(Ee,Ie)),zt!==null&&(Be=gn*zt,on==="border-box"&&(Be=Be+Ye+wn),Cn=Ie>Be?"":"hidden",Ie=Math.min(Be,Ie))}var ke={height:Ie,overflowY:Cn,resize:"none"};return Ee&&(ke.minHeight=Ee),Be&&(ke.maxHeight=Be),ke}var Qt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Se=0,be=1,Le=2,en=Me.forwardRef(function(we,Ue){var On=we,zt=On.prefixCls,kt=On.defaultValue,Ye=On.value,wn=On.autoSize,on=On.onResize,$t=On.className,Ee=On.style,Be=On.disabled,Cn=On.onChange,Ie=On.onInternalAutoSize,gn=(0,Gt.Z)(On,Qt),ke=(0,jt.Z)(kt,{value:Ye,postState:function(Ze){return Ze!=null?Ze:""}}),Dn=(0,_t.Z)(ke,2),ln=Dn[0],bt=Dn[1],gt=function(Ze){bt(Ze.target.value),Cn==null||Cn(Ze)},pt=Me.useRef();Me.useImperativeHandle(Ue,function(){return{textArea:pt.current}});var Ct=Me.useMemo(function(){return wn&&(0,ce.Z)(wn)==="object"?[wn.minRows,wn.maxRows]:[]},[wn]),Pt=(0,_t.Z)(Ct,2),vt=Pt[0],Et=Pt[1],Zt=!!wn,Ve=function(){try{if(document.activeElement===pt.current){var Ze=pt.current,En=Ze.selectionStart,An=Ze.selectionEnd,he=Ze.scrollTop;pt.current.setSelectionRange(En,An),pt.current.scrollTop=he}}catch(Ke){}},ue=Me.useState(Le),re=(0,_t.Z)(ue,2),Ce=re[0],Te=re[1],tn=Me.useState(),te=(0,_t.Z)(tn,2),le=te[0],bn=te[1],Sn=function(){Te(Se)};(0,Kt.Z)(function(){Zt&&Sn()},[Ye,vt,Et,Zt]),(0,Kt.Z)(function(){if(Ce===Se)Te(be);else if(Ce===be){var ye=ve(pt.current,!1,vt,Et);Te(Le),bn(ye)}else Ve()},[Ce]);var Rn=Me.useRef(),In=function(){Ht.Z.cancel(Rn.current)},sn=function(Ze){Ce===Le&&(on==null||on(Ze),wn&&(In(),Rn.current=(0,Ht.Z)(function(){Sn()})))};Me.useEffect(function(){return In},[]);var Hn=Zt?le:null,Mn=(0,It.Z)((0,It.Z)({},Ee),Hn);return(Ce===Se||Ce===be)&&(Mn.overflowY="hidden",Mn.overflowX="hidden"),Me.createElement(ee.Z,{onResize:sn,disabled:!(wn||on)},Me.createElement("textarea",(0,lt.Z)({},gn,{ref:pt,style:Mn,className:me()(zt,$t,(0,Dt.Z)({},"".concat(zt,"-disabled"),Be)),disabled:Be,value:ln,onChange:gt})))}),ie=en,Re=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],De=Me.forwardRef(function(we,Ue){var On,zt=we.defaultValue,kt=we.value,Ye=we.onFocus,wn=we.onBlur,on=we.onChange,$t=we.allowClear,Ee=we.maxLength,Be=we.onCompositionStart,Cn=we.onCompositionEnd,Ie=we.suffix,gn=we.prefixCls,ke=gn===void 0?"rc-textarea":gn,Dn=we.showCount,ln=we.count,bt=we.className,gt=we.style,pt=we.disabled,Ct=we.hidden,Pt=we.classNames,vt=we.styles,Et=we.onResize,Zt=we.onClear,Ve=we.onPressEnter,ue=we.readOnly,re=we.autoSize,Ce=we.onKeyDown,Te=(0,Gt.Z)(we,Re),tn=(0,jt.Z)(zt,{value:kt,defaultValue:zt}),te=(0,_t.Z)(tn,2),le=te[0],bn=te[1],Sn=le==null?"":String(le),Rn=Me.useState(!1),In=(0,_t.Z)(Rn,2),sn=In[0],Hn=In[1],Mn=Me.useRef(!1),ye=Me.useState(null),Ze=(0,_t.Z)(ye,2),En=Ze[0],An=Ze[1],he=(0,Me.useRef)(null),Ke=(0,Me.useRef)(null),hn=function(){var oi;return(oi=Ke.current)===null||oi===void 0?void 0:oi.textArea},Pn=function(){hn().focus()};(0,Me.useImperativeHandle)(Ue,function(){var Vn;return{resizableTextArea:Ke.current,focus:Pn,blur:function(){hn().blur()},nativeElement:((Vn=he.current)===null||Vn===void 0?void 0:Vn.nativeElement)||hn()}}),(0,Me.useEffect)(function(){Hn(function(Vn){return!pt&&Vn})},[pt]);var _n=Me.useState(null),ci=(0,_t.Z)(_n,2),yi=ci[0],Ni=ci[1];Me.useEffect(function(){if(yi){var Vn;(Vn=hn()).setSelectionRange.apply(Vn,(0,xe.Z)(yi))}},[yi]);var ri=(0,Nt.Z)(ln,Dn),yt=(On=ri.max)!==null&&On!==void 0?On:Ee,Tn=Number(yt)>0,xn=ri.strategy(Sn),Bn=!!yt&&xn>yt,Zn=function(oi,Ti){var Ci=Ti;!Mn.current&&ri.exceedFormatter&&ri.max&&ri.strategy(Ti)>ri.max&&(Ci=ri.exceedFormatter(Ti,{max:ri.max}),Ti!==Ci&&Ni([hn().selectionStart||0,hn().selectionEnd||0])),bn(Ci),(0,Oe.rJ)(oi.currentTarget,oi,on,Ci)},Nn=function(oi){Mn.current=!0,Be==null||Be(oi)},Ln=function(oi){Mn.current=!1,Zn(oi,oi.currentTarget.value),Cn==null||Cn(oi)},ii=function(oi){Zn(oi,oi.target.value)},Qn=function(oi){oi.key==="Enter"&&Ve&&Ve(oi),Ce==null||Ce(oi)},xi=function(oi){Hn(!0),Ye==null||Ye(oi)},Xn=function(oi){Hn(!1),wn==null||wn(oi)},$n=function(oi){bn(""),Pn(),(0,Oe.rJ)(hn(),oi,on)},Hi=Ie,Bi;ri.show&&(ri.showFormatter?Bi=ri.showFormatter({value:Sn,count:xn,maxLength:yt}):Bi="".concat(xn).concat(Tn?" / ".concat(yt):""),Hi=Me.createElement(Me.Fragment,null,Hi,Me.createElement("span",{className:me()("".concat(ke,"-data-count"),Pt==null?void 0:Pt.count),style:vt==null?void 0:vt.count},Bi)));var sr=function(oi){var Ti;Et==null||Et(oi),(Ti=hn())!==null&&Ti!==void 0&&Ti.style.height&&An(!0)},Jn=!re&&!Dn&&!$t;return Me.createElement(Yt.BaseInput,{ref:he,value:Sn,allowClear:$t,handleReset:$n,suffix:Hi,prefixCls:ke,classNames:(0,It.Z)((0,It.Z)({},Pt),{},{affixWrapper:me()(Pt==null?void 0:Pt.affixWrapper,(0,Dt.Z)((0,Dt.Z)({},"".concat(ke,"-show-count"),Dn),"".concat(ke,"-textarea-allow-clear"),$t))}),disabled:pt,focused:sn,className:me()(bt,Bn&&"".concat(ke,"-out-of-range")),style:(0,It.Z)((0,It.Z)({},gt),En&&!Jn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Bi=="string"?Bi:void 0}},hidden:Ct,readOnly:ue,onClear:Zt},Me.createElement(ie,(0,lt.Z)({},Te,{autoSize:re,maxLength:Ee,onKeyDown:Qn,onChange:ii,onFocus:xi,onBlur:Xn,onCompositionStart:Nn,onCompositionEnd:Ln,className:me()(Pt==null?void 0:Pt.textarea),style:(0,It.Z)((0,It.Z)({},vt==null?void 0:vt.textarea),{},{resize:gt==null?void 0:gt.resize}),disabled:pt,prefixCls:ke,onResize:sr,ref:Ke,readOnly:ue})))}),Tt=De,rn=Tt},639:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return je}});var lt=dt(60499),Dt=dt(18642),It=dt(85899),xe=dt(72190),_t=dt(42244),Gt=dt(59301),Vt=dt(92310),me=dt.n(Vt),Yt=dt(26112),Nt=dt(30699),Oe=function(Xt){for(var ve=Xt.prefixCls,Qt=Xt.level,Se=Xt.isStart,be=Xt.isEnd,Le="".concat(ve,"-indent-unit"),en=[],ie=0;ie<Qt;ie+=1)en.push(Gt.createElement("span",{key:ie,className:me()(Le,(0,Dt.Z)((0,Dt.Z)({},"".concat(Le,"-start"),Se[ie]),"".concat(Le,"-end"),be[ie]))}));return Gt.createElement("span",{"aria-hidden":"true",className:"".concat(ve,"-indent")},en)},jt=Gt.memo(Oe),Me=dt(65065),ce=dt(34061),ee=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Kt="open",Ht="close",de="---",Ae=function(Xt){var ve,Qt,Se,be=Xt.eventKey,Le=Xt.className,en=Xt.style,ie=Xt.dragOver,Re=Xt.dragOverGapTop,De=Xt.dragOverGapBottom,Tt=Xt.isLeaf,rn=Xt.isStart,we=Xt.isEnd,Ue=Xt.expanded,On=Xt.selected,zt=Xt.checked,kt=Xt.halfChecked,Ye=Xt.loading,wn=Xt.domRef,on=Xt.active,$t=Xt.data,Ee=Xt.onMouseMove,Be=Xt.selectable,Cn=(0,_t.Z)(Xt,ee),Ie=Gt.useContext(Nt.k),gn=Gt.useContext(Nt.y),ke=Gt.useRef(null),Dn=Gt.useState(!1),ln=(0,xe.Z)(Dn,2),bt=ln[0],gt=ln[1],pt=!!(Ie.disabled||Xt.disabled||(ve=gn.nodeDisabled)!==null&&ve!==void 0&&ve.call(gn,$t)),Ct=Gt.useMemo(function(){return!Ie.checkable||Xt.checkable===!1?!1:Ie.checkable},[Ie.checkable,Xt.checkable]),Pt=function(xn){pt||Ie.onNodeSelect(xn,(0,ce.F)(Xt))},vt=function(xn){pt||!Ct||Xt.disableCheckbox||Ie.onNodeCheck(xn,(0,ce.F)(Xt),!zt)},Et=Gt.useMemo(function(){return typeof Be=="boolean"?Be:Ie.selectable},[Be,Ie.selectable]),Zt=function(xn){Ie.onNodeClick(xn,(0,ce.F)(Xt)),Et?Pt(xn):vt(xn)},Ve=function(xn){Ie.onNodeDoubleClick(xn,(0,ce.F)(Xt))},ue=function(xn){Ie.onNodeMouseEnter(xn,(0,ce.F)(Xt))},re=function(xn){Ie.onNodeMouseLeave(xn,(0,ce.F)(Xt))},Ce=function(xn){Ie.onNodeContextMenu(xn,(0,ce.F)(Xt))},Te=Gt.useMemo(function(){return!!(Ie.draggable&&(!Ie.draggable.nodeDraggable||Ie.draggable.nodeDraggable($t)))},[Ie.draggable,$t]),tn=function(xn){xn.stopPropagation(),gt(!0),Ie.onNodeDragStart(xn,Xt);try{xn.dataTransfer.setData("text/plain","")}catch(Bn){}},te=function(xn){xn.preventDefault(),xn.stopPropagation(),Ie.onNodeDragEnter(xn,Xt)},le=function(xn){xn.preventDefault(),xn.stopPropagation(),Ie.onNodeDragOver(xn,Xt)},bn=function(xn){xn.stopPropagation(),Ie.onNodeDragLeave(xn,Xt)},Sn=function(xn){xn.stopPropagation(),gt(!1),Ie.onNodeDragEnd(xn,Xt)},Rn=function(xn){xn.preventDefault(),xn.stopPropagation(),gt(!1),Ie.onNodeDrop(xn,Xt)},In=function(xn){Ye||Ie.onNodeExpand(xn,(0,ce.F)(Xt))},sn=Gt.useMemo(function(){var Tn=(0,Me.Z)(Ie.keyEntities,be)||{},xn=Tn.children;return!!(xn||[]).length},[Ie.keyEntities,be]),Hn=Gt.useMemo(function(){return Tt===!1?!1:Tt||!Ie.loadData&&!sn||Ie.loadData&&Xt.loaded&&!sn},[Tt,Ie.loadData,sn,Xt.loaded]);Gt.useEffect(function(){Ye||typeof Ie.loadData=="function"&&Ue&&!Hn&&!Xt.loaded&&Ie.onNodeLoad((0,ce.F)(Xt))},[Ye,Ie.loadData,Ie.onNodeLoad,Ue,Hn,Xt]);var Mn=Gt.useMemo(function(){var Tn;return(Tn=Ie.draggable)!==null&&Tn!==void 0&&Tn.icon?Gt.createElement("span",{className:"".concat(Ie.prefixCls,"-draggable-icon")},Ie.draggable.icon):null},[Ie.draggable]),ye=function(xn){var Bn=Xt.switcherIcon||Ie.switcherIcon;return typeof Bn=="function"?Bn((0,It.Z)((0,It.Z)({},Xt),{},{isLeaf:xn})):Bn},Ze=function(){if(Hn){var xn=ye(!0);return xn!==!1?Gt.createElement("span",{className:me()("".concat(Ie.prefixCls,"-switcher"),"".concat(Ie.prefixCls,"-switcher-noop"))},xn):null}var Bn=ye(!1);return Bn!==!1?Gt.createElement("span",{onClick:In,className:me()("".concat(Ie.prefixCls,"-switcher"),"".concat(Ie.prefixCls,"-switcher_").concat(Ue?Kt:Ht))},Bn):null},En=Gt.useMemo(function(){if(!Ct)return null;var Tn=typeof Ct!="boolean"?Ct:null;return Gt.createElement("span",{className:me()("".concat(Ie.prefixCls,"-checkbox"),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},"".concat(Ie.prefixCls,"-checkbox-checked"),zt),"".concat(Ie.prefixCls,"-checkbox-indeterminate"),!zt&&kt),"".concat(Ie.prefixCls,"-checkbox-disabled"),pt||Xt.disableCheckbox)),onClick:vt,role:"checkbox","aria-checked":kt?"mixed":zt,"aria-disabled":pt||Xt.disableCheckbox,"aria-label":"Select ".concat(typeof Xt.title=="string"?Xt.title:"tree node")},Tn)},[Ct,zt,kt,pt,Xt.disableCheckbox,Xt.title]),An=Gt.useMemo(function(){return Hn?null:Ue?Kt:Ht},[Hn,Ue]),he=Gt.useMemo(function(){return Gt.createElement("span",{className:me()("".concat(Ie.prefixCls,"-iconEle"),"".concat(Ie.prefixCls,"-icon__").concat(An||"docu"),(0,Dt.Z)({},"".concat(Ie.prefixCls,"-icon_loading"),Ye))})},[Ie.prefixCls,An,Ye]),Ke=Gt.useMemo(function(){var Tn=!!Ie.draggable,xn=!Xt.disabled&&Tn&&Ie.dragOverNodeKey===be;return xn?Ie.dropIndicatorRender({dropPosition:Ie.dropPosition,dropLevelOffset:Ie.dropLevelOffset,indent:Ie.indent,prefixCls:Ie.prefixCls,direction:Ie.direction}):null},[Ie.dropPosition,Ie.dropLevelOffset,Ie.indent,Ie.prefixCls,Ie.direction,Ie.draggable,Ie.dragOverNodeKey,Ie.dropIndicatorRender]),hn=Gt.useMemo(function(){var Tn=Xt.title,xn=Tn===void 0?de:Tn,Bn="".concat(Ie.prefixCls,"-node-content-wrapper"),Zn;if(Ie.showIcon){var Nn=Xt.icon||Ie.icon;Zn=Nn?Gt.createElement("span",{className:me()("".concat(Ie.prefixCls,"-iconEle"),"".concat(Ie.prefixCls,"-icon__customize"))},typeof Nn=="function"?Nn(Xt):Nn):he}else Ie.loadData&&Ye&&(Zn=he);var Ln;return typeof xn=="function"?Ln=xn($t):Ie.titleRender?Ln=Ie.titleRender($t):Ln=xn,Gt.createElement("span",{ref:ke,title:typeof xn=="string"?xn:"",className:me()(Bn,"".concat(Bn,"-").concat(An||"normal"),(0,Dt.Z)({},"".concat(Ie.prefixCls,"-node-selected"),!pt&&(On||bt))),onMouseEnter:ue,onMouseLeave:re,onContextMenu:Ce,onClick:Zt,onDoubleClick:Ve},Zn,Gt.createElement("span",{className:"".concat(Ie.prefixCls,"-title")},Ln),Ke)},[Ie.prefixCls,Ie.showIcon,Xt,Ie.icon,he,Ie.titleRender,$t,An,ue,re,Ce,Zt,Ve]),Pn=(0,Yt.Z)(Cn,{aria:!0,data:!0}),_n=(0,Me.Z)(Ie.keyEntities,be)||{},ci=_n.level,yi=we[we.length-1],Ni=!pt&&Te,ri=Ie.draggingNodeKey===be,yt=Be!==void 0?{"aria-selected":!!Be}:void 0;return Gt.createElement("div",(0,lt.Z)({ref:wn,role:"treeitem","aria-expanded":Tt?void 0:Ue,className:me()(Le,"".concat(Ie.prefixCls,"-treenode"),(Se={},(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Se,"".concat(Ie.prefixCls,"-treenode-disabled"),pt),"".concat(Ie.prefixCls,"-treenode-switcher-").concat(Ue?"open":"close"),!Tt),"".concat(Ie.prefixCls,"-treenode-checkbox-checked"),zt),"".concat(Ie.prefixCls,"-treenode-checkbox-indeterminate"),kt),"".concat(Ie.prefixCls,"-treenode-selected"),On),"".concat(Ie.prefixCls,"-treenode-loading"),Ye),"".concat(Ie.prefixCls,"-treenode-active"),on),"".concat(Ie.prefixCls,"-treenode-leaf-last"),yi),"".concat(Ie.prefixCls,"-treenode-draggable"),Te),"dragging",ri),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Se,"drop-target",Ie.dropTargetKey===be),"drop-container",Ie.dropContainerKey===be),"drag-over",!pt&&ie),"drag-over-gap-top",!pt&&Re),"drag-over-gap-bottom",!pt&&De),"filter-node",(Qt=Ie.filterTreeNode)===null||Qt===void 0?void 0:Qt.call(Ie,(0,ce.F)(Xt))),"".concat(Ie.prefixCls,"-treenode-leaf"),Hn))),style:en,draggable:Ni,onDragStart:Ni?tn:void 0,onDragEnter:Te?te:void 0,onDragOver:Te?le:void 0,onDragLeave:Te?bn:void 0,onDrop:Te?Rn:void 0,onDragEnd:Te?Sn:void 0,onMouseMove:Ee},yt,Pn),Gt.createElement(jt,{prefixCls:Ie.prefixCls,level:ci,isStart:rn,isEnd:we}),Mn,Ze(),En,hn)};Ae.isTreeNode=1;var je=Ae},30699:function(Yn,qe,dt){"use strict";dt.d(qe,{k:function(){return Dt},y:function(){return It}});var lt=dt(59301),Dt=lt.createContext(null),It=lt.createContext({})},87632:function(Yn,qe,dt){"use strict";dt.d(qe,{OF:function(){return be.Z},y6:function(){return Ht.y},ZP:function(){return pt}});var lt=dt(60499),Dt=dt(43749),It=dt(85899),xe=dt(77654),_t=dt(38705),Gt=dt(17212),Vt=dt(15793),me=dt(39153),Yt=dt(55401),Nt=dt(18642),Oe=dt(92310),jt=dt.n(Oe),Me=dt(10228),ce=dt(26112),ee=dt(48736),Kt=dt(59301),Ht=dt(30699),de=function(Pt){var vt=Pt.dropPosition,Et=Pt.dropLevelOffset,Zt=Pt.indent,Ve={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(vt){case-1:Ve.top=0,Ve.left=-Et*Zt;break;case 1:Ve.bottom=0,Ve.left=-Et*Zt;break;case 0:Ve.bottom=0,Ve.left=Zt;break}return Kt.createElement("div",{style:Ve})},Ae=de;function je(Ct){if(Ct==null)throw new TypeError("Cannot destructure "+Ct)}var se=dt(72190),Xt=dt(42244),ve=dt(34280),Qt=dt(48911),Se=dt(77900),be=dt(639);function Le(Ct,Pt){var vt=Kt.useState(!1),Et=(0,se.Z)(vt,2),Zt=Et[0],Ve=Et[1];(0,ve.Z)(function(){if(Zt)return Ct(),function(){Pt()}},[Zt]),(0,ve.Z)(function(){return Ve(!0),function(){Ve(!1)}},[])}var en=Le,ie=dt(34061),Re=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],De=Kt.forwardRef(function(Ct,Pt){var vt=Ct.className,Et=Ct.style,Zt=Ct.motion,Ve=Ct.motionNodes,ue=Ct.motionType,re=Ct.onMotionStart,Ce=Ct.onMotionEnd,Te=Ct.active,tn=Ct.treeNodeRequiredProps,te=(0,Xt.Z)(Ct,Re),le=Kt.useState(!0),bn=(0,se.Z)(le,2),Sn=bn[0],Rn=bn[1],In=Kt.useContext(Ht.k),sn=In.prefixCls,Hn=Ve&&ue!=="hide";(0,ve.Z)(function(){Ve&&Hn!==Sn&&Rn(Hn)},[Ve]);var Mn=function(){Ve&&re()},ye=Kt.useRef(!1),Ze=function(){Ve&&!ye.current&&(ye.current=!0,Ce())};en(Mn,Ze);var En=function(he){Hn===he&&Ze()};return Ve?Kt.createElement(Se.default,(0,lt.Z)({ref:Pt,visible:Sn},Zt,{motionAppear:ue==="show",onVisibleChanged:En}),function(An,he){var Ke=An.className,hn=An.style;return Kt.createElement("div",{ref:he,className:jt()("".concat(sn,"-treenode-motion"),Ke),style:hn},Ve.map(function(Pn){var _n=Object.assign({},(je(Pn.data),Pn.data)),ci=Pn.title,yi=Pn.key,Ni=Pn.isStart,ri=Pn.isEnd;delete _n.children;var yt=(0,ie.H8)(yi,tn);return Kt.createElement(be.Z,(0,lt.Z)({},_n,yt,{title:ci,active:Te,data:Pn.data,key:yi,isStart:Ni,isEnd:ri}))}))}):Kt.createElement(be.Z,(0,lt.Z)({domRef:Pt,className:vt,style:Et},te,{active:Te}))}),Tt=De;function rn(){var Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],vt=Ct.length,Et=Pt.length;if(Math.abs(vt-Et)!==1)return{add:!1,key:null};function Zt(Ve,ue){var re=new Map;Ve.forEach(function(Te){re.set(Te,!0)});var Ce=ue.filter(function(Te){return!re.has(Te)});return Ce.length===1?Ce[0]:null}return vt<Et?{add:!0,key:Zt(Ct,Pt)}:{add:!1,key:Zt(Pt,Ct)}}function we(Ct,Pt,vt){var Et=Ct.findIndex(function(re){return re.key===vt}),Zt=Ct[Et+1],Ve=Pt.findIndex(function(re){return re.key===vt});if(Zt){var ue=Pt.findIndex(function(re){return re.key===Zt.key});return Pt.slice(Ve+1,ue)}return Pt.slice(Ve+1)}var Ue=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],On={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},zt=function(){},kt="RC_TREE_MOTION_".concat(Math.random()),Ye={key:kt},wn={key:kt,level:0,index:0,pos:"0",node:Ye,nodes:[Ye]},on={parent:null,children:[],pos:wn.pos,data:Ye,title:null,key:kt,isStart:[],isEnd:[]};function $t(Ct,Pt,vt,Et){return Pt===!1||!vt?Ct:Ct.slice(0,Math.ceil(vt/Et)+1)}function Ee(Ct){var Pt=Ct.key,vt=Ct.pos;return(0,ie.km)(Pt,vt)}function Be(Ct){for(var Pt=String(Ct.data.key),vt=Ct;vt.parent;)vt=vt.parent,Pt="".concat(vt.data.key," > ").concat(Pt);return Pt}var Cn=Kt.forwardRef(function(Ct,Pt){var vt=Ct.prefixCls,Et=Ct.data,Zt=Ct.selectable,Ve=Ct.checkable,ue=Ct.expandedKeys,re=Ct.selectedKeys,Ce=Ct.checkedKeys,Te=Ct.loadedKeys,tn=Ct.loadingKeys,te=Ct.halfCheckedKeys,le=Ct.keyEntities,bn=Ct.disabled,Sn=Ct.dragging,Rn=Ct.dragOverNodeKey,In=Ct.dropPosition,sn=Ct.motion,Hn=Ct.height,Mn=Ct.itemHeight,ye=Ct.virtual,Ze=Ct.scrollWidth,En=Ct.focusable,An=Ct.activeItem,he=Ct.focused,Ke=Ct.tabIndex,hn=Ct.onKeyDown,Pn=Ct.onFocus,_n=Ct.onBlur,ci=Ct.onActiveChange,yi=Ct.onListChangeStart,Ni=Ct.onListChangeEnd,ri=(0,Xt.Z)(Ct,Ue),yt=Kt.useRef(null),Tn=Kt.useRef(null);Kt.useImperativeHandle(Pt,function(){return{scrollTo:function(nn){yt.current.scrollTo(nn)},getIndentWidth:function(){return Tn.current.offsetWidth}}});var xn=Kt.useState(ue),Bn=(0,se.Z)(xn,2),Zn=Bn[0],Nn=Bn[1],Ln=Kt.useState(Et),ii=(0,se.Z)(Ln,2),Qn=ii[0],xi=ii[1],Xn=Kt.useState(Et),$n=(0,se.Z)(Xn,2),Hi=$n[0],Bi=$n[1],sr=Kt.useState([]),Jn=(0,se.Z)(sr,2),Vn=Jn[0],oi=Jn[1],Ti=Kt.useState(null),Ci=(0,se.Z)(Ti,2),Rt=Ci[0],Pe=Ci[1],qt=Kt.useRef(Et);qt.current=Et;function He(){var Jt=qt.current;xi(Jt),Bi(Jt),oi([]),Pe(null),Ni()}(0,ve.Z)(function(){Nn(ue);var Jt=rn(Zn,ue);if(Jt.key!==null)if(Jt.add){var nn=Qn.findIndex(function(vn){var li=vn.key;return li===Jt.key}),cn=$t(we(Qn,Et,Jt.key),ye,Hn,Mn),Ne=Qn.slice();Ne.splice(nn+1,0,on),Bi(Ne),oi(cn),Pe("show")}else{var Fe=Et.findIndex(function(vn){var li=vn.key;return li===Jt.key}),Xe=$t(we(Et,Qn,Jt.key),ye,Hn,Mn),Je=Et.slice();Je.splice(Fe+1,0,on),Bi(Je),oi(Xe),Pe("hide")}else Qn!==Et&&(xi(Et),Bi(Et))},[ue,Et]),Kt.useEffect(function(){Sn||He()},[Sn]);var ae=sn?Hi:Et,ze={expandedKeys:ue,selectedKeys:re,loadedKeys:Te,loadingKeys:tn,checkedKeys:Ce,halfCheckedKeys:te,dragOverNodeKey:Rn,dropPosition:In,keyEntities:le};return Kt.createElement(Kt.Fragment,null,he&&An&&Kt.createElement("span",{style:On,"aria-live":"assertive"},Be(An)),Kt.createElement("div",null,Kt.createElement("input",{style:On,disabled:En===!1||bn,tabIndex:En!==!1?Ke:null,onKeyDown:hn,onFocus:Pn,onBlur:_n,value:"",onChange:zt,"aria-label":"for screen reader"})),Kt.createElement("div",{className:"".concat(vt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},Kt.createElement("div",{className:"".concat(vt,"-indent")},Kt.createElement("div",{ref:Tn,className:"".concat(vt,"-indent-unit")}))),Kt.createElement(Qt.Z,(0,lt.Z)({},ri,{data:ae,itemKey:Ee,height:Hn,fullHeight:!1,virtual:ye,itemHeight:Mn,scrollWidth:Ze,prefixCls:"".concat(vt,"-list"),ref:yt,role:"tree",onVisibleChange:function(nn){nn.every(function(cn){return Ee(cn)!==kt})&&He()}}),function(Jt){var nn=Jt.pos,cn=Object.assign({},(je(Jt.data),Jt.data)),Ne=Jt.title,Fe=Jt.key,Xe=Jt.isStart,Je=Jt.isEnd,vn=(0,ie.km)(Fe,nn);delete cn.key,delete cn.children;var li=(0,ie.H8)(vn,ze);return Kt.createElement(Tt,(0,lt.Z)({},cn,li,{title:Ne,active:!!An&&Fe===An.key,pos:nn,data:Jt.data,isStart:Xe,isEnd:Je,motion:sn,motionNodes:Fe===kt?Vn:null,motionType:Rt,onMotionStart:yi,onMotionEnd:He,treeNodeRequiredProps:ze,onMouseMove:function(){ci(null)}}))}))}),Ie=Cn,gn=dt(82661),ke=dt(34643),Dn=dt(65065),ln=10,bt=function(Ct){(0,me.Z)(vt,Ct);var Pt=(0,Yt.Z)(vt);function vt(){var Et;(0,_t.Z)(this,vt);for(var Zt=arguments.length,Ve=new Array(Zt),ue=0;ue<Zt;ue++)Ve[ue]=arguments[ue];return Et=Pt.call.apply(Pt,[this].concat(Ve)),(0,Nt.Z)((0,Vt.Z)(Et),"destroyed",!1),(0,Nt.Z)((0,Vt.Z)(Et),"delayedDragEnterLogic",void 0),(0,Nt.Z)((0,Vt.Z)(Et),"loadingRetryTimes",{}),(0,Nt.Z)((0,Vt.Z)(Et),"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,ie.w$)()}),(0,Nt.Z)((0,Vt.Z)(Et),"dragStartMousePosition",null),(0,Nt.Z)((0,Vt.Z)(Et),"dragNodeProps",null),(0,Nt.Z)((0,Vt.Z)(Et),"currentMouseOverDroppableNodeKey",null),(0,Nt.Z)((0,Vt.Z)(Et),"listRef",Kt.createRef()),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDragStart",function(re,Ce){var Te=Et.state,tn=Te.expandedKeys,te=Te.keyEntities,le=Et.props.onDragStart,bn=Ce.eventKey;Et.dragNodeProps=Ce,Et.dragStartMousePosition={x:re.clientX,y:re.clientY};var Sn=(0,gn._5)(tn,bn);Et.setState({draggingNodeKey:bn,dragChildrenKeys:(0,gn.wA)(bn,te),indent:Et.listRef.current.getIndentWidth()}),Et.setExpandedKeys(Sn),window.addEventListener("dragend",Et.onWindowDragEnd),le==null||le({event:re,node:(0,ie.F)(Ce)})}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDragEnter",function(re,Ce){var Te=Et.state,tn=Te.expandedKeys,te=Te.keyEntities,le=Te.dragChildrenKeys,bn=Te.flattenNodes,Sn=Te.indent,Rn=Et.props,In=Rn.onDragEnter,sn=Rn.onExpand,Hn=Rn.allowDrop,Mn=Rn.direction,ye=Ce.pos,Ze=Ce.eventKey;if(Et.currentMouseOverDroppableNodeKey!==Ze&&(Et.currentMouseOverDroppableNodeKey=Ze),!Et.dragNodeProps){Et.resetDragState();return}var En=(0,gn.OM)(re,Et.dragNodeProps,Ce,Sn,Et.dragStartMousePosition,Hn,bn,te,tn,Mn),An=En.dropPosition,he=En.dropLevelOffset,Ke=En.dropTargetKey,hn=En.dropContainerKey,Pn=En.dropTargetPos,_n=En.dropAllowed,ci=En.dragOverNodeKey;if(le.includes(Ke)||!_n){Et.resetDragState();return}if(Et.delayedDragEnterLogic||(Et.delayedDragEnterLogic={}),Object.keys(Et.delayedDragEnterLogic).forEach(function(yi){clearTimeout(Et.delayedDragEnterLogic[yi])}),Et.dragNodeProps.eventKey!==Ce.eventKey&&(re.persist(),Et.delayedDragEnterLogic[ye]=window.setTimeout(function(){if(Et.state.draggingNodeKey!==null){var yi=(0,xe.Z)(tn),Ni=(0,Dn.Z)(te,Ce.eventKey);Ni&&(Ni.children||[]).length&&(yi=(0,gn.L0)(tn,Ce.eventKey)),Et.props.hasOwnProperty("expandedKeys")||Et.setExpandedKeys(yi),sn==null||sn(yi,{node:(0,ie.F)(Ce),expanded:!0,nativeEvent:re.nativeEvent})}},800)),Et.dragNodeProps.eventKey===Ke&&he===0){Et.resetDragState();return}Et.setState({dragOverNodeKey:ci,dropPosition:An,dropLevelOffset:he,dropTargetKey:Ke,dropContainerKey:hn,dropTargetPos:Pn,dropAllowed:_n}),In==null||In({event:re,node:(0,ie.F)(Ce),expandedKeys:tn})}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDragOver",function(re,Ce){var Te=Et.state,tn=Te.dragChildrenKeys,te=Te.flattenNodes,le=Te.keyEntities,bn=Te.expandedKeys,Sn=Te.indent,Rn=Et.props,In=Rn.onDragOver,sn=Rn.allowDrop,Hn=Rn.direction;if(Et.dragNodeProps){var Mn=(0,gn.OM)(re,Et.dragNodeProps,Ce,Sn,Et.dragStartMousePosition,sn,te,le,bn,Hn),ye=Mn.dropPosition,Ze=Mn.dropLevelOffset,En=Mn.dropTargetKey,An=Mn.dropContainerKey,he=Mn.dropTargetPos,Ke=Mn.dropAllowed,hn=Mn.dragOverNodeKey;tn.includes(En)||!Ke||(Et.dragNodeProps.eventKey===En&&Ze===0?Et.state.dropPosition===null&&Et.state.dropLevelOffset===null&&Et.state.dropTargetKey===null&&Et.state.dropContainerKey===null&&Et.state.dropTargetPos===null&&Et.state.dropAllowed===!1&&Et.state.dragOverNodeKey===null||Et.resetDragState():ye===Et.state.dropPosition&&Ze===Et.state.dropLevelOffset&&En===Et.state.dropTargetKey&&An===Et.state.dropContainerKey&&he===Et.state.dropTargetPos&&Ke===Et.state.dropAllowed&&hn===Et.state.dragOverNodeKey||Et.setState({dropPosition:ye,dropLevelOffset:Ze,dropTargetKey:En,dropContainerKey:An,dropTargetPos:he,dropAllowed:Ke,dragOverNodeKey:hn}),In==null||In({event:re,node:(0,ie.F)(Ce)}))}}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDragLeave",function(re,Ce){Et.currentMouseOverDroppableNodeKey===Ce.eventKey&&!re.currentTarget.contains(re.relatedTarget)&&(Et.resetDragState(),Et.currentMouseOverDroppableNodeKey=null);var Te=Et.props.onDragLeave;Te==null||Te({event:re,node:(0,ie.F)(Ce)})}),(0,Nt.Z)((0,Vt.Z)(Et),"onWindowDragEnd",function(re){Et.onNodeDragEnd(re,null,!0),window.removeEventListener("dragend",Et.onWindowDragEnd)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDragEnd",function(re,Ce){var Te=Et.props.onDragEnd;Et.setState({dragOverNodeKey:null}),Et.cleanDragState(),Te==null||Te({event:re,node:(0,ie.F)(Ce)}),Et.dragNodeProps=null,window.removeEventListener("dragend",Et.onWindowDragEnd)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDrop",function(re,Ce){var Te,tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=Et.state,le=te.dragChildrenKeys,bn=te.dropPosition,Sn=te.dropTargetKey,Rn=te.dropTargetPos,In=te.dropAllowed;if(In){var sn=Et.props.onDrop;if(Et.setState({dragOverNodeKey:null}),Et.cleanDragState(),Sn!==null){var Hn=(0,It.Z)((0,It.Z)({},(0,ie.H8)(Sn,Et.getTreeNodeRequiredProps())),{},{active:((Te=Et.getActiveItem())===null||Te===void 0?void 0:Te.key)===Sn,data:(0,Dn.Z)(Et.state.keyEntities,Sn).node}),Mn=le.includes(Sn);(0,ee.ZP)(!Mn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ye=(0,gn.yx)(Rn),Ze={event:re,node:(0,ie.F)(Hn),dragNode:Et.dragNodeProps?(0,ie.F)(Et.dragNodeProps):null,dragNodesKeys:[Et.dragNodeProps.eventKey].concat(le),dropToGap:bn!==0,dropPosition:bn+Number(ye[ye.length-1])};tn||sn==null||sn(Ze),Et.dragNodeProps=null}}}),(0,Nt.Z)((0,Vt.Z)(Et),"cleanDragState",function(){var re=Et.state.draggingNodeKey;re!==null&&Et.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Et.dragStartMousePosition=null,Et.currentMouseOverDroppableNodeKey=null}),(0,Nt.Z)((0,Vt.Z)(Et),"triggerExpandActionExpand",function(re,Ce){var Te=Et.state,tn=Te.expandedKeys,te=Te.flattenNodes,le=Ce.expanded,bn=Ce.key,Sn=Ce.isLeaf;if(!(Sn||re.shiftKey||re.metaKey||re.ctrlKey)){var Rn=te.filter(function(sn){return sn.key===bn})[0],In=(0,ie.F)((0,It.Z)((0,It.Z)({},(0,ie.H8)(bn,Et.getTreeNodeRequiredProps())),{},{data:Rn.data}));Et.setExpandedKeys(le?(0,gn._5)(tn,bn):(0,gn.L0)(tn,bn)),Et.onNodeExpand(re,In)}}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeClick",function(re,Ce){var Te=Et.props,tn=Te.onClick,te=Te.expandAction;te==="click"&&Et.triggerExpandActionExpand(re,Ce),tn==null||tn(re,Ce)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeDoubleClick",function(re,Ce){var Te=Et.props,tn=Te.onDoubleClick,te=Te.expandAction;te==="doubleClick"&&Et.triggerExpandActionExpand(re,Ce),tn==null||tn(re,Ce)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeSelect",function(re,Ce){var Te=Et.state.selectedKeys,tn=Et.state,te=tn.keyEntities,le=tn.fieldNames,bn=Et.props,Sn=bn.onSelect,Rn=bn.multiple,In=Ce.selected,sn=Ce[le.key],Hn=!In;Hn?Rn?Te=(0,gn.L0)(Te,sn):Te=[sn]:Te=(0,gn._5)(Te,sn);var Mn=Te.map(function(ye){var Ze=(0,Dn.Z)(te,ye);return Ze?Ze.node:null}).filter(Boolean);Et.setUncontrolledState({selectedKeys:Te}),Sn==null||Sn(Te,{event:"select",selected:Hn,node:Ce,selectedNodes:Mn,nativeEvent:re.nativeEvent})}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeCheck",function(re,Ce,Te){var tn=Et.state,te=tn.keyEntities,le=tn.checkedKeys,bn=tn.halfCheckedKeys,Sn=Et.props,Rn=Sn.checkStrictly,In=Sn.onCheck,sn=Ce.key,Hn,Mn={event:"check",node:Ce,checked:Te,nativeEvent:re.nativeEvent};if(Rn){var ye=Te?(0,gn.L0)(le,sn):(0,gn._5)(le,sn),Ze=(0,gn._5)(bn,sn);Hn={checked:ye,halfChecked:Ze},Mn.checkedNodes=ye.map(function(Pn){return(0,Dn.Z)(te,Pn)}).filter(Boolean).map(function(Pn){return Pn.node}),Et.setUncontrolledState({checkedKeys:ye})}else{var En=(0,ke.S)([].concat((0,xe.Z)(le),[sn]),!0,te),An=En.checkedKeys,he=En.halfCheckedKeys;if(!Te){var Ke=new Set(An);Ke.delete(sn);var hn=(0,ke.S)(Array.from(Ke),{checked:!1,halfCheckedKeys:he},te);An=hn.checkedKeys,he=hn.halfCheckedKeys}Hn=An,Mn.checkedNodes=[],Mn.checkedNodesPositions=[],Mn.halfCheckedKeys=he,An.forEach(function(Pn){var _n=(0,Dn.Z)(te,Pn);if(_n){var ci=_n.node,yi=_n.pos;Mn.checkedNodes.push(ci),Mn.checkedNodesPositions.push({node:ci,pos:yi})}}),Et.setUncontrolledState({checkedKeys:An},!1,{halfCheckedKeys:he})}In==null||In(Hn,Mn)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeLoad",function(re){var Ce,Te=re.key,tn=Et.state.keyEntities,te=(0,Dn.Z)(tn,Te);if(!(te!=null&&(Ce=te.children)!==null&&Ce!==void 0&&Ce.length)){var le=new Promise(function(bn,Sn){Et.setState(function(Rn){var In=Rn.loadedKeys,sn=In===void 0?[]:In,Hn=Rn.loadingKeys,Mn=Hn===void 0?[]:Hn,ye=Et.props,Ze=ye.loadData,En=ye.onLoad;if(!Ze||sn.includes(Te)||Mn.includes(Te))return null;var An=Ze(re);return An.then(function(){var he=Et.state.loadedKeys,Ke=(0,gn.L0)(he,Te);En==null||En(Ke,{event:"load",node:re}),Et.setUncontrolledState({loadedKeys:Ke}),Et.setState(function(hn){return{loadingKeys:(0,gn._5)(hn.loadingKeys,Te)}}),bn()}).catch(function(he){if(Et.setState(function(hn){return{loadingKeys:(0,gn._5)(hn.loadingKeys,Te)}}),Et.loadingRetryTimes[Te]=(Et.loadingRetryTimes[Te]||0)+1,Et.loadingRetryTimes[Te]>=ln){var Ke=Et.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Et.setUncontrolledState({loadedKeys:(0,gn.L0)(Ke,Te)}),bn()}Sn(he)}),{loadingKeys:(0,gn.L0)(Mn,Te)}})});return le.catch(function(){}),le}}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeMouseEnter",function(re,Ce){var Te=Et.props.onMouseEnter;Te==null||Te({event:re,node:Ce})}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeMouseLeave",function(re,Ce){var Te=Et.props.onMouseLeave;Te==null||Te({event:re,node:Ce})}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeContextMenu",function(re,Ce){var Te=Et.props.onRightClick;Te&&(re.preventDefault(),Te({event:re,node:Ce}))}),(0,Nt.Z)((0,Vt.Z)(Et),"onFocus",function(){var re=Et.props.onFocus;Et.setState({focused:!0});for(var Ce=arguments.length,Te=new Array(Ce),tn=0;tn<Ce;tn++)Te[tn]=arguments[tn];re==null||re.apply(void 0,Te)}),(0,Nt.Z)((0,Vt.Z)(Et),"onBlur",function(){var re=Et.props.onBlur;Et.setState({focused:!1}),Et.onActiveChange(null);for(var Ce=arguments.length,Te=new Array(Ce),tn=0;tn<Ce;tn++)Te[tn]=arguments[tn];re==null||re.apply(void 0,Te)}),(0,Nt.Z)((0,Vt.Z)(Et),"getTreeNodeRequiredProps",function(){var re=Et.state,Ce=re.expandedKeys,Te=re.selectedKeys,tn=re.loadedKeys,te=re.loadingKeys,le=re.checkedKeys,bn=re.halfCheckedKeys,Sn=re.dragOverNodeKey,Rn=re.dropPosition,In=re.keyEntities;return{expandedKeys:Ce||[],selectedKeys:Te||[],loadedKeys:tn||[],loadingKeys:te||[],checkedKeys:le||[],halfCheckedKeys:bn||[],dragOverNodeKey:Sn,dropPosition:Rn,keyEntities:In}}),(0,Nt.Z)((0,Vt.Z)(Et),"setExpandedKeys",function(re){var Ce=Et.state,Te=Ce.treeData,tn=Ce.fieldNames,te=(0,ie.oH)(Te,re,tn);Et.setUncontrolledState({expandedKeys:re,flattenNodes:te},!0)}),(0,Nt.Z)((0,Vt.Z)(Et),"onNodeExpand",function(re,Ce){var Te=Et.state.expandedKeys,tn=Et.state,te=tn.listChanging,le=tn.fieldNames,bn=Et.props,Sn=bn.onExpand,Rn=bn.loadData,In=Ce.expanded,sn=Ce[le.key];if(!te){var Hn=Te.includes(sn),Mn=!In;if((0,ee.ZP)(In&&Hn||!In&&!Hn,"Expand state not sync with index check"),Te=Mn?(0,gn.L0)(Te,sn):(0,gn._5)(Te,sn),Et.setExpandedKeys(Te),Sn==null||Sn(Te,{node:Ce,expanded:Mn,nativeEvent:re.nativeEvent}),Mn&&Rn){var ye=Et.onNodeLoad(Ce);ye&&ye.then(function(){var Ze=(0,ie.oH)(Et.state.treeData,Te,le);Et.setUncontrolledState({flattenNodes:Ze})}).catch(function(){var Ze=Et.state.expandedKeys,En=(0,gn._5)(Ze,sn);Et.setExpandedKeys(En)})}}}),(0,Nt.Z)((0,Vt.Z)(Et),"onListChangeStart",function(){Et.setUncontrolledState({listChanging:!0})}),(0,Nt.Z)((0,Vt.Z)(Et),"onListChangeEnd",function(){setTimeout(function(){Et.setUncontrolledState({listChanging:!1})})}),(0,Nt.Z)((0,Vt.Z)(Et),"onActiveChange",function(re){var Ce=Et.state.activeKey,Te=Et.props,tn=Te.onActiveChange,te=Te.itemScrollOffset,le=te===void 0?0:te;Ce!==re&&(Et.setState({activeKey:re}),re!==null&&Et.scrollTo({key:re,offset:le}),tn==null||tn(re))}),(0,Nt.Z)((0,Vt.Z)(Et),"getActiveItem",function(){var re=Et.state,Ce=re.activeKey,Te=re.flattenNodes;return Ce===null?null:Te.find(function(tn){var te=tn.key;return te===Ce})||null}),(0,Nt.Z)((0,Vt.Z)(Et),"offsetActiveKey",function(re){var Ce=Et.state,Te=Ce.flattenNodes,tn=Ce.activeKey,te=Te.findIndex(function(Sn){var Rn=Sn.key;return Rn===tn});te===-1&&re<0&&(te=Te.length),te=(te+re+Te.length)%Te.length;var le=Te[te];if(le){var bn=le.key;Et.onActiveChange(bn)}else Et.onActiveChange(null)}),(0,Nt.Z)((0,Vt.Z)(Et),"onKeyDown",function(re){var Ce=Et.state,Te=Ce.activeKey,tn=Ce.expandedKeys,te=Ce.checkedKeys,le=Ce.fieldNames,bn=Et.props,Sn=bn.onKeyDown,Rn=bn.checkable,In=bn.selectable;switch(re.which){case Me.Z.UP:{Et.offsetActiveKey(-1),re.preventDefault();break}case Me.Z.DOWN:{Et.offsetActiveKey(1),re.preventDefault();break}}var sn=Et.getActiveItem();if(sn&&sn.data){var Hn=Et.getTreeNodeRequiredProps(),Mn=sn.data.isLeaf===!1||!!(sn.data[le.children]||[]).length,ye=(0,ie.F)((0,It.Z)((0,It.Z)({},(0,ie.H8)(Te,Hn)),{},{data:sn.data,active:!0}));switch(re.which){case Me.Z.LEFT:{Mn&&tn.includes(Te)?Et.onNodeExpand({},ye):sn.parent&&Et.onActiveChange(sn.parent.key),re.preventDefault();break}case Me.Z.RIGHT:{Mn&&!tn.includes(Te)?Et.onNodeExpand({},ye):sn.children&&sn.children.length&&Et.onActiveChange(sn.children[0].key),re.preventDefault();break}case Me.Z.ENTER:case Me.Z.SPACE:{Rn&&!ye.disabled&&ye.checkable!==!1&&!ye.disableCheckbox?Et.onNodeCheck({},ye,!te.includes(Te)):!Rn&&In&&!ye.disabled&&ye.selectable!==!1&&Et.onNodeSelect({},ye);break}}}Sn==null||Sn(re)}),(0,Nt.Z)((0,Vt.Z)(Et),"setUncontrolledState",function(re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Et.destroyed){var tn=!1,te=!0,le={};Object.keys(re).forEach(function(bn){if(Et.props.hasOwnProperty(bn)){te=!1;return}tn=!0,le[bn]=re[bn]}),tn&&(!Ce||te)&&Et.setState((0,It.Z)((0,It.Z)({},le),Te))}}),(0,Nt.Z)((0,Vt.Z)(Et),"scrollTo",function(re){Et.listRef.current.scrollTo(re)}),Et}return(0,Gt.Z)(vt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Zt=this.props,Ve=Zt.activeKey,ue=Zt.itemScrollOffset,re=ue===void 0?0:ue;Ve!==void 0&&Ve!==this.state.activeKey&&(this.setState({activeKey:Ve}),Ve!==null&&this.scrollTo({key:Ve,offset:re}))}},{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 Zt=this.state,Ve=Zt.focused,ue=Zt.flattenNodes,re=Zt.keyEntities,Ce=Zt.draggingNodeKey,Te=Zt.activeKey,tn=Zt.dropLevelOffset,te=Zt.dropContainerKey,le=Zt.dropTargetKey,bn=Zt.dropPosition,Sn=Zt.dragOverNodeKey,Rn=Zt.indent,In=this.props,sn=In.prefixCls,Hn=In.className,Mn=In.style,ye=In.showLine,Ze=In.focusable,En=In.tabIndex,An=En===void 0?0:En,he=In.selectable,Ke=In.showIcon,hn=In.icon,Pn=In.switcherIcon,_n=In.draggable,ci=In.checkable,yi=In.checkStrictly,Ni=In.disabled,ri=In.motion,yt=In.loadData,Tn=In.filterTreeNode,xn=In.height,Bn=In.itemHeight,Zn=In.scrollWidth,Nn=In.virtual,Ln=In.titleRender,ii=In.dropIndicatorRender,Qn=In.onContextMenu,xi=In.onScroll,Xn=In.direction,$n=In.rootClassName,Hi=In.rootStyle,Bi=(0,ce.Z)(this.props,{aria:!0,data:!0}),sr;_n&&((0,Dt.Z)(_n)==="object"?sr=_n:typeof _n=="function"?sr={nodeDraggable:_n}:sr={});var Jn={prefixCls:sn,selectable:he,showIcon:Ke,icon:hn,switcherIcon:Pn,draggable:sr,draggingNodeKey:Ce,checkable:ci,checkStrictly:yi,disabled:Ni,keyEntities:re,dropLevelOffset:tn,dropContainerKey:te,dropTargetKey:le,dropPosition:bn,dragOverNodeKey:Sn,indent:Rn,direction:Xn,dropIndicatorRender:ii,loadData:yt,filterTreeNode:Tn,titleRender:Ln,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};return Kt.createElement(Ht.k.Provider,{value:Jn},Kt.createElement("div",{className:jt()(sn,Hn,$n,(0,Nt.Z)((0,Nt.Z)((0,Nt.Z)({},"".concat(sn,"-show-line"),ye),"".concat(sn,"-focused"),Ve),"".concat(sn,"-active-focused"),Te!==null)),style:Hi},Kt.createElement(Ie,(0,lt.Z)({ref:this.listRef,prefixCls:sn,style:Mn,data:ue,disabled:Ni,selectable:he,checkable:!!ci,motion:ri,dragging:Ce!==null,height:xn,itemHeight:Bn,virtual:Nn,focusable:Ze,focused:Ve,tabIndex:An,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Qn,onScroll:xi,scrollWidth:Zn},this.getTreeNodeRequiredProps(),Bi))))}}],[{key:"getDerivedStateFromProps",value:function(Zt,Ve){var ue=Ve.prevProps,re={prevProps:Zt};function Ce(An){return!ue&&Zt.hasOwnProperty(An)||ue&&ue[An]!==Zt[An]}var Te,tn=Ve.fieldNames;if(Ce("fieldNames")&&(tn=(0,ie.w$)(Zt.fieldNames),re.fieldNames=tn),Ce("treeData")?Te=Zt.treeData:Ce("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Te=(0,ie.zn)(Zt.children)),Te){re.treeData=Te;var te=(0,ie.I8)(Te,{fieldNames:tn});re.keyEntities=(0,It.Z)((0,Nt.Z)({},kt,wn),te.keyEntities)}var le=re.keyEntities||Ve.keyEntities;if(Ce("expandedKeys")||ue&&Ce("autoExpandParent"))re.expandedKeys=Zt.autoExpandParent||!ue&&Zt.defaultExpandParent?(0,gn.r7)(Zt.expandedKeys,le):Zt.expandedKeys;else if(!ue&&Zt.defaultExpandAll){var bn=(0,It.Z)({},le);delete bn[kt];var Sn=[];Object.keys(bn).forEach(function(An){var he=bn[An];he.children&&he.children.length&&Sn.push(he.key)}),re.expandedKeys=Sn}else!ue&&Zt.defaultExpandedKeys&&(re.expandedKeys=Zt.autoExpandParent||Zt.defaultExpandParent?(0,gn.r7)(Zt.defaultExpandedKeys,le):Zt.defaultExpandedKeys);if(re.expandedKeys||delete re.expandedKeys,Te||re.expandedKeys){var Rn=(0,ie.oH)(Te||Ve.treeData,re.expandedKeys||Ve.expandedKeys,tn);re.flattenNodes=Rn}if(Zt.selectable&&(Ce("selectedKeys")?re.selectedKeys=(0,gn.BT)(Zt.selectedKeys,Zt):!ue&&Zt.defaultSelectedKeys&&(re.selectedKeys=(0,gn.BT)(Zt.defaultSelectedKeys,Zt))),Zt.checkable){var In;if(Ce("checkedKeys")?In=(0,gn.E6)(Zt.checkedKeys)||{}:!ue&&Zt.defaultCheckedKeys?In=(0,gn.E6)(Zt.defaultCheckedKeys)||{}:Te&&(In=(0,gn.E6)(Zt.checkedKeys)||{checkedKeys:Ve.checkedKeys,halfCheckedKeys:Ve.halfCheckedKeys}),In){var sn=In,Hn=sn.checkedKeys,Mn=Hn===void 0?[]:Hn,ye=sn.halfCheckedKeys,Ze=ye===void 0?[]:ye;if(!Zt.checkStrictly){var En=(0,ke.S)(Mn,!0,le);Mn=En.checkedKeys,Ze=En.halfCheckedKeys}re.checkedKeys=Mn,re.halfCheckedKeys=Ze}}return Ce("loadedKeys")&&(re.loadedKeys=Zt.loadedKeys),re}}]),vt}(Kt.Component);(0,Nt.Z)(bt,"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:Ae,allowDrop:function(){return!0},expandAction:!1}),(0,Nt.Z)(bt,"TreeNode",be.Z);var gt=bt,pt=gt},82661:function(Yn,qe,dt){"use strict";dt.d(qe,{BT:function(){return Kt},E6:function(){return Ae},L0:function(){return Nt},OM:function(){return ee},_5:function(){return Yt},r7:function(){return je},wA:function(){return jt},yx:function(){return Oe}});var lt=dt(77654),Dt=dt(43749),It=dt(48736),xe=dt(59301),_t=dt(639),Gt=dt(65065),Vt=dt(34061),me=null;function Yt(se,Xt){if(!se)return[];var ve=se.slice(),Qt=ve.indexOf(Xt);return Qt>=0&&ve.splice(Qt,1),ve}function Nt(se,Xt){var ve=(se||[]).slice();return ve.indexOf(Xt)===-1&&ve.push(Xt),ve}function Oe(se){return se.split("-")}function jt(se,Xt){var ve=[],Qt=(0,Gt.Z)(Xt,se);function Se(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];be.forEach(function(Le){var en=Le.key,ie=Le.children;ve.push(en),Se(ie)})}return Se(Qt.children),ve}function Me(se){if(se.parent){var Xt=Oe(se.pos);return Number(Xt[Xt.length-1])===se.parent.children.length-1}return!1}function ce(se){var Xt=Oe(se.pos);return Number(Xt[Xt.length-1])===0}function ee(se,Xt,ve,Qt,Se,be,Le,en,ie,Re){var De,Tt=se.clientX,rn=se.clientY,we=se.target.getBoundingClientRect(),Ue=we.top,On=we.height,zt=(Re==="rtl"?-1:1)*(((Se==null?void 0:Se.x)||0)-Tt),kt=(zt-12)/Qt,Ye=ie.filter(function(pt){var Ct;return(Ct=en[pt])===null||Ct===void 0||(Ct=Ct.children)===null||Ct===void 0?void 0:Ct.length}),wn=(0,Gt.Z)(en,ve.eventKey);if(rn<Ue+On/2){var on=Le.findIndex(function(pt){return pt.key===wn.key}),$t=on<=0?0:on-1,Ee=Le[$t].key;wn=(0,Gt.Z)(en,Ee)}var Be=wn.key,Cn=wn,Ie=wn.key,gn=0,ke=0;if(!Ye.includes(Be))for(var Dn=0;Dn<kt&&Me(wn);Dn+=1)wn=wn.parent,ke+=1;var ln=Xt.data,bt=wn.node,gt=!0;return ce(wn)&&wn.level===0&&rn<Ue+On/2&&be({dragNode:ln,dropNode:bt,dropPosition:-1})&&wn.key===ve.eventKey?gn=-1:(Cn.children||[]).length&&Ye.includes(Ie)?be({dragNode:ln,dropNode:bt,dropPosition:0})?gn=0:gt=!1:ke===0?kt>-1.5?be({dragNode:ln,dropNode:bt,dropPosition:1})?gn=1:gt=!1:be({dragNode:ln,dropNode:bt,dropPosition:0})?gn=0:be({dragNode:ln,dropNode:bt,dropPosition:1})?gn=1:gt=!1:be({dragNode:ln,dropNode:bt,dropPosition:1})?gn=1:gt=!1,{dropPosition:gn,dropLevelOffset:ke,dropTargetKey:wn.key,dropTargetPos:wn.pos,dragOverNodeKey:Ie,dropContainerKey:gn===0?null:((De=wn.parent)===null||De===void 0?void 0:De.key)||null,dropAllowed:gt}}function Kt(se,Xt){if(se){var ve=Xt.multiple;return ve?se.slice():se.length?[se[0]]:se}}var Ht=function(Xt){return Xt};function de(se,Xt){if(!se)return[];var ve=Xt||{},Qt=ve.processProps,Se=Qt===void 0?Ht:Qt,be=Array.isArray(se)?se:[se];return be.map(function(Le){var en=Le.children,ie=_objectWithoutProperties(Le,me),Re=de(en,Xt);return React.createElement(TreeNode,_extends({key:ie.key},Se(ie)),Re)})}function Ae(se){if(!se)return null;var Xt;if(Array.isArray(se))Xt={checkedKeys:se,halfCheckedKeys:void 0};else if((0,Dt.Z)(se)==="object")Xt={checkedKeys:se.checked||void 0,halfCheckedKeys:se.halfChecked||void 0};else return(0,It.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Xt}function je(se,Xt){var ve=new Set;function Qt(Se){if(!ve.has(Se)){var be=(0,Gt.Z)(Xt,Se);if(be){ve.add(Se);var Le=be.parent,en=be.node;en.disabled||Le&&Qt(Le.key)}}}return(se||[]).forEach(function(Se){Qt(Se)}),(0,lt.Z)(ve)}},34643:function(Yn,qe,dt){"use strict";dt.d(qe,{S:function(){return Vt}});var lt=dt(48736),Dt=dt(65065);function It(me,Yt){var Nt=new Set;return me.forEach(function(Oe){Yt.has(Oe)||Nt.add(Oe)}),Nt}function xe(me){var Yt=me||{},Nt=Yt.disabled,Oe=Yt.disableCheckbox,jt=Yt.checkable;return!!(Nt||Oe)||jt===!1}function _t(me,Yt,Nt,Oe){for(var jt=new Set(me),Me=new Set,ce=0;ce<=Nt;ce+=1){var ee=Yt.get(ce)||new Set;ee.forEach(function(Ae){var je=Ae.key,se=Ae.node,Xt=Ae.children,ve=Xt===void 0?[]:Xt;jt.has(je)&&!Oe(se)&&ve.filter(function(Qt){return!Oe(Qt.node)}).forEach(function(Qt){jt.add(Qt.key)})})}for(var Kt=new Set,Ht=Nt;Ht>=0;Ht-=1){var de=Yt.get(Ht)||new Set;de.forEach(function(Ae){var je=Ae.parent,se=Ae.node;if(!(Oe(se)||!Ae.parent||Kt.has(Ae.parent.key))){if(Oe(Ae.parent.node)){Kt.add(je.key);return}var Xt=!0,ve=!1;(je.children||[]).filter(function(Qt){return!Oe(Qt.node)}).forEach(function(Qt){var Se=Qt.key,be=jt.has(Se);Xt&&!be&&(Xt=!1),!ve&&(be||Me.has(Se))&&(ve=!0)}),Xt&&jt.add(je.key),ve&&Me.add(je.key),Kt.add(je.key)}})}return{checkedKeys:Array.from(jt),halfCheckedKeys:Array.from(It(Me,jt))}}function Gt(me,Yt,Nt,Oe,jt){for(var Me=new Set(me),ce=new Set(Yt),ee=0;ee<=Oe;ee+=1){var Kt=Nt.get(ee)||new Set;Kt.forEach(function(je){var se=je.key,Xt=je.node,ve=je.children,Qt=ve===void 0?[]:ve;!Me.has(se)&&!ce.has(se)&&!jt(Xt)&&Qt.filter(function(Se){return!jt(Se.node)}).forEach(function(Se){Me.delete(Se.key)})})}ce=new Set;for(var Ht=new Set,de=Oe;de>=0;de-=1){var Ae=Nt.get(de)||new Set;Ae.forEach(function(je){var se=je.parent,Xt=je.node;if(!(jt(Xt)||!je.parent||Ht.has(je.parent.key))){if(jt(je.parent.node)){Ht.add(se.key);return}var ve=!0,Qt=!1;(se.children||[]).filter(function(Se){return!jt(Se.node)}).forEach(function(Se){var be=Se.key,Le=Me.has(be);ve&&!Le&&(ve=!1),!Qt&&(Le||ce.has(be))&&(Qt=!0)}),ve||Me.delete(se.key),Qt&&ce.add(se.key),Ht.add(se.key)}})}return{checkedKeys:Array.from(Me),halfCheckedKeys:Array.from(It(ce,Me))}}function Vt(me,Yt,Nt,Oe){var jt=[],Me;Oe?Me=Oe:Me=xe;var ce=new Set(me.filter(function(de){var Ae=!!(0,Dt.Z)(Nt,de);return Ae||jt.push(de),Ae})),ee=new Map,Kt=0;Object.keys(Nt).forEach(function(de){var Ae=Nt[de],je=Ae.level,se=ee.get(je);se||(se=new Set,ee.set(je,se)),se.add(Ae),Kt=Math.max(Kt,je)}),(0,lt.ZP)(!jt.length,"Tree missing follow keys: ".concat(jt.slice(0,100).map(function(de){return"'".concat(de,"'")}).join(", ")));var Ht;return Yt===!0?Ht=_t(ce,ee,Kt,Me):Ht=Gt(ce,Yt.halfCheckedKeys,ee,Kt,Me),Ht}},65065:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return lt}});function lt(Dt,It){return Dt[It]}},34061:function(Yn,qe,dt){"use strict";dt.d(qe,{F:function(){return je},H8:function(){return Ae},I8:function(){return de},km:function(){return jt},oH:function(){return Kt},w$:function(){return Me},zn:function(){return ee}});var lt=dt(43749),Dt=dt(77654),It=dt(85899),xe=dt(42244),_t=dt(11592),Gt=dt(2738),Vt=dt(48736),me=dt(65065),Yt=["children"];function Nt(se,Xt){return"".concat(se,"-").concat(Xt)}function Oe(se){return se&&se.type&&se.type.isTreeNode}function jt(se,Xt){return se!=null?se:Xt}function Me(se){var Xt=se||{},ve=Xt.title,Qt=Xt._title,Se=Xt.key,be=Xt.children,Le=ve||"title";return{title:Le,_title:Qt||[Le],key:Se||"key",children:be||"children"}}function ce(se,Xt){var ve=new Map;function Qt(Se){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Se||[]).forEach(function(Le){var en=Le[Xt.key],ie=Le[Xt.children];warning(en!=null,"Tree node must have a certain key: [".concat(be).concat(en,"]"));var Re=String(en);warning(!ve.has(Re)||en===null||en===void 0,"Same 'key' exist in the Tree: ".concat(Re)),ve.set(Re,!0),Qt(ie,"".concat(be).concat(Re," > "))})}Qt(se)}function ee(se){function Xt(ve){var Qt=(0,_t.Z)(ve);return Qt.map(function(Se){if(!Oe(Se))return(0,Vt.ZP)(!Se,"Tree/TreeNode can only accept TreeNode as children."),null;var be=Se.key,Le=Se.props,en=Le.children,ie=(0,xe.Z)(Le,Yt),Re=(0,It.Z)({key:be},ie),De=Xt(en);return De.length&&(Re.children=De),Re}).filter(function(Se){return Se})}return Xt(se)}function Kt(se,Xt,ve){var Qt=Me(ve),Se=Qt._title,be=Qt.key,Le=Qt.children,en=new Set(Xt===!0?[]:Xt),ie=[];function Re(De){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return De.map(function(rn,we){for(var Ue=Nt(Tt?Tt.pos:"0",we),On=jt(rn[be],Ue),zt,kt=0;kt<Se.length;kt+=1){var Ye=Se[kt];if(rn[Ye]!==void 0){zt=rn[Ye];break}}var wn=Object.assign((0,Gt.Z)(rn,[].concat((0,Dt.Z)(Se),[be,Le])),{title:zt,key:On,parent:Tt,pos:Ue,children:null,data:rn,isStart:[].concat((0,Dt.Z)(Tt?Tt.isStart:[]),[we===0]),isEnd:[].concat((0,Dt.Z)(Tt?Tt.isEnd:[]),[we===De.length-1])});return ie.push(wn),Xt===!0||en.has(On)?wn.children=Re(rn[Le]||[],wn):wn.children=[],wn})}return Re(se),ie}function Ht(se,Xt,ve){var Qt={};(0,lt.Z)(ve)==="object"?Qt=ve:Qt={externalGetKey:ve},Qt=Qt||{};var Se=Qt,be=Se.childrenPropName,Le=Se.externalGetKey,en=Se.fieldNames,ie=Me(en),Re=ie.key,De=ie.children,Tt=be||De,rn;Le?typeof Le=="string"?rn=function(On){return On[Le]}:typeof Le=="function"&&(rn=function(On){return Le(On)}):rn=function(On,zt){return jt(On[Re],zt)};function we(Ue,On,zt,kt){var Ye=Ue?Ue[Tt]:se,wn=Ue?Nt(zt.pos,On):"0",on=Ue?[].concat((0,Dt.Z)(kt),[Ue]):[];if(Ue){var $t=rn(Ue,wn),Ee={node:Ue,index:On,pos:wn,key:$t,parentPos:zt.node?zt.pos:null,level:zt.level+1,nodes:on};Xt(Ee)}Ye&&Ye.forEach(function(Be,Cn){we(Be,Cn,{node:Ue,pos:wn,level:zt?zt.level+1:-1},on)})}we(null)}function de(se){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=Xt.initWrapper,Qt=Xt.processEntity,Se=Xt.onProcessFinished,be=Xt.externalGetKey,Le=Xt.childrenPropName,en=Xt.fieldNames,ie=arguments.length>2?arguments[2]:void 0,Re=be||ie,De={},Tt={},rn={posEntities:De,keyEntities:Tt};return ve&&(rn=ve(rn)||rn),Ht(se,function(we){var Ue=we.node,On=we.index,zt=we.pos,kt=we.key,Ye=we.parentPos,wn=we.level,on=we.nodes,$t={node:Ue,nodes:on,index:On,key:kt,pos:zt,level:wn},Ee=jt(kt,zt);De[zt]=$t,Tt[Ee]=$t,$t.parent=De[Ye],$t.parent&&($t.parent.children=$t.parent.children||[],$t.parent.children.push($t)),Qt&&Qt($t,rn)},{externalGetKey:Re,childrenPropName:Le,fieldNames:en}),Se&&Se(rn),rn}function Ae(se,Xt){var ve=Xt.expandedKeys,Qt=Xt.selectedKeys,Se=Xt.loadedKeys,be=Xt.loadingKeys,Le=Xt.checkedKeys,en=Xt.halfCheckedKeys,ie=Xt.dragOverNodeKey,Re=Xt.dropPosition,De=Xt.keyEntities,Tt=(0,me.Z)(De,se),rn={eventKey:se,expanded:ve.indexOf(se)!==-1,selected:Qt.indexOf(se)!==-1,loaded:Se.indexOf(se)!==-1,loading:be.indexOf(se)!==-1,checked:Le.indexOf(se)!==-1,halfChecked:en.indexOf(se)!==-1,pos:String(Tt?Tt.pos:""),dragOver:ie===se&&Re===0,dragOverGapTop:ie===se&&Re===-1,dragOverGapBottom:ie===se&&Re===1};return rn}function je(se){var Xt=se.data,ve=se.expanded,Qt=se.selected,Se=se.checked,be=se.loaded,Le=se.loading,en=se.halfChecked,ie=se.dragOver,Re=se.dragOverGapTop,De=se.dragOverGapBottom,Tt=se.pos,rn=se.active,we=se.eventKey,Ue=(0,It.Z)((0,It.Z)({},Xt),{},{expanded:ve,selected:Qt,checked:Se,loaded:be,loading:Le,halfChecked:en,dragOver:ie,dragOverGapTop:Re,dragOverGapBottom:De,pos:Tt,active:rn,key:we});return"props"in Ue||Object.defineProperty(Ue,"props",{get:function(){return(0,Vt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),se}}),Ue}},48911:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return ln}});var lt=dt(60499),Dt=dt(43749),It=dt(85899),xe=dt(18642),_t=dt(72190),Gt=dt(42244),Vt=dt(92310),me=dt.n(Vt),Yt=dt(29301),Nt=dt(70425),Oe=dt(34280),jt=dt(59301),Me=dt(4676),ce=jt.forwardRef(function(bt,gt){var pt=bt.height,Ct=bt.offsetY,Pt=bt.offsetX,vt=bt.children,Et=bt.prefixCls,Zt=bt.onInnerResize,Ve=bt.innerProps,ue=bt.rtl,re=bt.extra,Ce={},Te={display:"flex",flexDirection:"column"};return Ct!==void 0&&(Ce={height:pt,position:"relative",overflow:"hidden"},Te=(0,It.Z)((0,It.Z)({},Te),{},(0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)({transform:"translateY(".concat(Ct,"px)")},ue?"marginRight":"marginLeft",-Pt),"position","absolute"),"left",0),"right",0),"top",0))),jt.createElement("div",{style:Ce},jt.createElement(Yt.Z,{onResize:function(te){var le=te.offsetHeight;le&&Zt&&Zt()}},jt.createElement("div",(0,lt.Z)({style:Te,className:me()((0,xe.Z)({},"".concat(Et,"-holder-inner"),Et)),ref:gt},Ve),vt,re)))});ce.displayName="Filler";var ee=ce;function Kt(bt){var gt=bt.children,pt=bt.setRef,Ct=jt.useCallback(function(Pt){pt(Pt)},[]);return jt.cloneElement(gt,{ref:Ct})}function Ht(bt,gt,pt,Ct,Pt,vt,Et,Zt){var Ve=Zt.getKey;return bt.slice(gt,pt+1).map(function(ue,re){var Ce=gt+re,Te=Et(ue,Ce,{style:{width:Ct},offsetX:Pt}),tn=Ve(ue);return jt.createElement(Kt,{key:tn,setRef:function(le){return vt(ue,le)}},Te)})}function de(bt,gt,pt,Ct){var Pt=pt-bt,vt=gt-pt,Et=Math.min(Pt,vt)*2;if(Ct<=Et){var Zt=Math.floor(Ct/2);return Ct%2?pt+Zt+1:pt-Zt}return Pt>vt?pt-(Ct-vt):pt+(Ct-Pt)}function Ae(bt,gt,pt){var Ct=bt.length,Pt=gt.length,vt,Et;if(Ct===0&&Pt===0)return null;Ct<Pt?(vt=bt,Et=gt):(vt=gt,Et=bt);var Zt={__EMPTY_ITEM__:!0};function Ve(te){return te!==void 0?pt(te):Zt}for(var ue=null,re=Math.abs(Ct-Pt)!==1,Ce=0;Ce<Et.length;Ce+=1){var Te=Ve(vt[Ce]),tn=Ve(Et[Ce]);if(Te!==tn){ue=Ce,re=re||Te!==Ve(Et[Ce+1]);break}}return ue===null?null:{index:ue,multiple:re}}function je(bt,gt,pt){var Ct=jt.useState(bt),Pt=(0,_t.Z)(Ct,2),vt=Pt[0],Et=Pt[1],Zt=jt.useState(null),Ve=(0,_t.Z)(Zt,2),ue=Ve[0],re=Ve[1];return jt.useEffect(function(){var Ce=Ae(vt||[],bt||[],gt);(Ce==null?void 0:Ce.index)!==void 0&&(pt==null||pt(Ce.index),re(bt[Ce.index])),Et(bt)},[bt]),[ue]}var se=dt(16089),Xt=(typeof navigator=="undefined"?"undefined":(0,Dt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ve=Xt,Qt=function(bt,gt,pt,Ct){var Pt=(0,jt.useRef)(!1),vt=(0,jt.useRef)(null);function Et(){clearTimeout(vt.current),Pt.current=!0,vt.current=setTimeout(function(){Pt.current=!1},50)}var Zt=(0,jt.useRef)({top:bt,bottom:gt,left:pt,right:Ct});return Zt.current.top=bt,Zt.current.bottom=gt,Zt.current.left=pt,Zt.current.right=Ct,function(Ve,ue){var re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ce=Ve?ue<0&&Zt.current.left||ue>0&&Zt.current.right:ue<0&&Zt.current.top||ue>0&&Zt.current.bottom;return re&&Ce?(clearTimeout(vt.current),Pt.current=!1):(!Ce||Pt.current)&&Et(),!Pt.current&&Ce}};function Se(bt,gt,pt,Ct,Pt,vt,Et){var Zt=(0,jt.useRef)(0),Ve=(0,jt.useRef)(null),ue=(0,jt.useRef)(null),re=(0,jt.useRef)(!1),Ce=Qt(gt,pt,Ct,Pt);function Te(Rn,In){if(se.Z.cancel(Ve.current),!Ce(!1,In)){var sn=Rn;if(!sn._virtualHandled)sn._virtualHandled=!0;else return;Zt.current+=In,ue.current=In,ve||sn.preventDefault(),Ve.current=(0,se.Z)(function(){var Hn=re.current?10:1;Et(Zt.current*Hn,!1),Zt.current=0})}}function tn(Rn,In){Et(In,!0),ve||Rn.preventDefault()}var te=(0,jt.useRef)(null),le=(0,jt.useRef)(null);function bn(Rn){if(bt){se.Z.cancel(le.current),le.current=(0,se.Z)(function(){te.current=null},2);var In=Rn.deltaX,sn=Rn.deltaY,Hn=Rn.shiftKey,Mn=In,ye=sn;(te.current==="sx"||!te.current&&Hn&&sn&&!In)&&(Mn=sn,ye=0,te.current="sx");var Ze=Math.abs(Mn),En=Math.abs(ye);te.current===null&&(te.current=vt&&Ze>En?"x":"y"),te.current==="y"?Te(Rn,ye):tn(Rn,Mn)}}function Sn(Rn){bt&&(re.current=Rn.detail===ue.current)}return[bn,Sn]}function be(bt,gt,pt,Ct){var Pt=jt.useMemo(function(){return[new Map,[]]},[bt,pt.id,Ct]),vt=(0,_t.Z)(Pt,2),Et=vt[0],Zt=vt[1],Ve=function(re){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re,Te=Et.get(re),tn=Et.get(Ce);if(Te===void 0||tn===void 0)for(var te=bt.length,le=Zt.length;le<te;le+=1){var bn,Sn=bt[le],Rn=gt(Sn);Et.set(Rn,le);var In=(bn=pt.get(Rn))!==null&&bn!==void 0?bn:Ct;if(Zt[le]=(Zt[le-1]||0)+In,Rn===re&&(Te=le),Rn===Ce&&(tn=le),Te!==void 0&&tn!==void 0)break}return{top:Zt[Te-1]||0,bottom:Zt[tn]}};return Ve}var Le=dt(38705),en=dt(17212),ie=function(){function bt(){(0,Le.Z)(this,bt),(0,xe.Z)(this,"maps",void 0),(0,xe.Z)(this,"id",0),(0,xe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,en.Z)(bt,[{key:"set",value:function(pt,Ct){this.diffRecords.set(pt,this.maps[pt]),this.maps[pt]=Ct,this.id+=1}},{key:"get",value:function(pt){return this.maps[pt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),bt}(),Re=ie;function De(bt){var gt=parseFloat(bt);return isNaN(gt)?0:gt}function Tt(bt,gt,pt){var Ct=jt.useState(0),Pt=(0,_t.Z)(Ct,2),vt=Pt[0],Et=Pt[1],Zt=(0,jt.useRef)(new Map),Ve=(0,jt.useRef)(new Re),ue=(0,jt.useRef)(0);function re(){ue.current+=1}function Ce(){var tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;re();var te=function(){var Sn=!1;Zt.current.forEach(function(Rn,In){if(Rn&&Rn.offsetParent){var sn=Rn.offsetHeight,Hn=getComputedStyle(Rn),Mn=Hn.marginTop,ye=Hn.marginBottom,Ze=De(Mn),En=De(ye),An=sn+Ze+En;Ve.current.get(In)!==An&&(Ve.current.set(In,An),Sn=!0)}}),Sn&&Et(function(Rn){return Rn+1})};if(tn)te();else{ue.current+=1;var le=ue.current;Promise.resolve().then(function(){le===ue.current&&te()})}}function Te(tn,te){var le=bt(tn),bn=Zt.current.get(le);te?(Zt.current.set(le,te),Ce()):Zt.current.delete(le),!bn!=!te&&(te?gt==null||gt(tn):pt==null||pt(tn))}return(0,jt.useEffect)(function(){return re},[]),[Te,Ce,Ve.current,vt]}var rn=14/15;function we(bt,gt,pt){var Ct=(0,jt.useRef)(!1),Pt=(0,jt.useRef)(0),vt=(0,jt.useRef)(0),Et=(0,jt.useRef)(null),Zt=(0,jt.useRef)(null),Ve,ue=function(tn){if(Ct.current){var te=Math.ceil(tn.touches[0].pageX),le=Math.ceil(tn.touches[0].pageY),bn=Pt.current-te,Sn=vt.current-le,Rn=Math.abs(bn)>Math.abs(Sn);Rn?Pt.current=te:vt.current=le;var In=pt(Rn,Rn?bn:Sn,!1,tn);In&&tn.preventDefault(),clearInterval(Zt.current),In&&(Zt.current=setInterval(function(){Rn?bn*=rn:Sn*=rn;var sn=Math.floor(Rn?bn:Sn);(!pt(Rn,sn,!0)||Math.abs(sn)<=.1)&&clearInterval(Zt.current)},16))}},re=function(){Ct.current=!1,Ve()},Ce=function(tn){Ve(),tn.touches.length===1&&!Ct.current&&(Ct.current=!0,Pt.current=Math.ceil(tn.touches[0].pageX),vt.current=Math.ceil(tn.touches[0].pageY),Et.current=tn.target,Et.current.addEventListener("touchmove",ue,{passive:!1}),Et.current.addEventListener("touchend",re,{passive:!0}))};Ve=function(){Et.current&&(Et.current.removeEventListener("touchmove",ue),Et.current.removeEventListener("touchend",re))},(0,Oe.Z)(function(){return bt&>.current.addEventListener("touchstart",Ce,{passive:!0}),function(){var Te;(Te=gt.current)===null||Te===void 0||Te.removeEventListener("touchstart",Ce),Ve(),clearInterval(Zt.current)}},[bt])}function Ue(bt){return Math.floor(Math.pow(bt,.5))}function On(bt,gt){var pt="touches"in bt?bt.touches[0]:bt;return pt[gt?"pageX":"pageY"]-window[gt?"scrollX":"scrollY"]}function zt(bt,gt,pt){jt.useEffect(function(){var Ct=gt.current;if(bt&&Ct){var Pt=!1,vt,Et,Zt=function(){se.Z.cancel(vt)},Ve=function Te(){Zt(),vt=(0,se.Z)(function(){pt(Et),Te()})},ue=function(){Pt=!1,Zt()},re=function(tn){if(!(tn.target.draggable||tn.button!==0)){var te=tn;te._virtualHandled||(te._virtualHandled=!0,Pt=!0)}},Ce=function(tn){if(Pt){var te=On(tn,!1),le=Ct.getBoundingClientRect(),bn=le.top,Sn=le.bottom;if(te<=bn){var Rn=bn-te;Et=-Ue(Rn),Ve()}else if(te>=Sn){var In=te-Sn;Et=Ue(In),Ve()}else Zt()}};return Ct.addEventListener("mousedown",re),Ct.ownerDocument.addEventListener("mouseup",ue),Ct.ownerDocument.addEventListener("mousemove",Ce),Ct.ownerDocument.addEventListener("dragend",ue),function(){Ct.removeEventListener("mousedown",re),Ct.ownerDocument.removeEventListener("mouseup",ue),Ct.ownerDocument.removeEventListener("mousemove",Ce),Ct.ownerDocument.removeEventListener("dragend",ue),Zt()}}},[bt])}var kt=10;function Ye(bt,gt,pt,Ct,Pt,vt,Et,Zt){var Ve=jt.useRef(),ue=jt.useState(null),re=(0,_t.Z)(ue,2),Ce=re[0],Te=re[1];return(0,Oe.Z)(function(){if(Ce&&Ce.times<kt){if(!bt.current){Te(function(ri){return(0,It.Z)({},ri)});return}vt();var tn=Ce.targetAlign,te=Ce.originAlign,le=Ce.index,bn=Ce.offset,Sn=bt.current.clientHeight,Rn=!1,In=tn,sn=null;if(Sn){for(var Hn=tn||te,Mn=0,ye=0,Ze=0,En=Math.min(gt.length-1,le),An=0;An<=En;An+=1){var he=Pt(gt[An]);ye=Mn;var Ke=pt.get(he);Ze=ye+(Ke===void 0?Ct:Ke),Mn=Ze}for(var hn=Hn==="top"?bn:Sn-bn,Pn=En;Pn>=0;Pn-=1){var _n=Pt(gt[Pn]),ci=pt.get(_n);if(ci===void 0){Rn=!0;break}if(hn-=ci,hn<=0)break}switch(Hn){case"top":sn=ye-bn;break;case"bottom":sn=Ze-Sn+bn;break;default:{var yi=bt.current.scrollTop,Ni=yi+Sn;ye<yi?In="top":Ze>Ni&&(In="bottom")}}sn!==null&&Et(sn),sn!==Ce.lastTop&&(Rn=!0)}Rn&&Te((0,It.Z)((0,It.Z)({},Ce),{},{times:Ce.times+1,targetAlign:In,lastTop:sn}))}},[Ce,bt.current]),function(tn){if(tn==null){Zt();return}if(se.Z.cancel(Ve.current),typeof tn=="number")Et(tn);else if(tn&&(0,Dt.Z)(tn)==="object"){var te,le=tn.align;"index"in tn?te=tn.index:te=gt.findIndex(function(Rn){return Pt(Rn)===tn.key});var bn=tn.offset,Sn=bn===void 0?0:bn;Te({times:0,index:te,offset:Sn,originAlign:le})}}}var wn=jt.forwardRef(function(bt,gt){var pt=bt.prefixCls,Ct=bt.rtl,Pt=bt.scrollOffset,vt=bt.scrollRange,Et=bt.onStartMove,Zt=bt.onStopMove,Ve=bt.onScroll,ue=bt.horizontal,re=bt.spinSize,Ce=bt.containerSize,Te=bt.style,tn=bt.thumbStyle,te=bt.showScrollBar,le=jt.useState(!1),bn=(0,_t.Z)(le,2),Sn=bn[0],Rn=bn[1],In=jt.useState(null),sn=(0,_t.Z)(In,2),Hn=sn[0],Mn=sn[1],ye=jt.useState(null),Ze=(0,_t.Z)(ye,2),En=Ze[0],An=Ze[1],he=!Ct,Ke=jt.useRef(),hn=jt.useRef(),Pn=jt.useState(te),_n=(0,_t.Z)(Pn,2),ci=_n[0],yi=_n[1],Ni=jt.useRef(),ri=function(){te===!0||te===!1||(clearTimeout(Ni.current),yi(!0),Ni.current=setTimeout(function(){yi(!1)},3e3))},yt=vt-Ce||0,Tn=Ce-re||0,xn=jt.useMemo(function(){if(Pt===0||yt===0)return 0;var $n=Pt/yt;return $n*Tn},[Pt,yt,Tn]),Bn=function(Hi){Hi.stopPropagation(),Hi.preventDefault()},Zn=jt.useRef({top:xn,dragging:Sn,pageY:Hn,startTop:En});Zn.current={top:xn,dragging:Sn,pageY:Hn,startTop:En};var Nn=function(Hi){Rn(!0),Mn(On(Hi,ue)),An(Zn.current.top),Et(),Hi.stopPropagation(),Hi.preventDefault()};jt.useEffect(function(){var $n=function(Jn){Jn.preventDefault()},Hi=Ke.current,Bi=hn.current;return Hi.addEventListener("touchstart",$n,{passive:!1}),Bi.addEventListener("touchstart",Nn,{passive:!1}),function(){Hi.removeEventListener("touchstart",$n),Bi.removeEventListener("touchstart",Nn)}},[]);var Ln=jt.useRef();Ln.current=yt;var ii=jt.useRef();ii.current=Tn,jt.useEffect(function(){if(Sn){var $n,Hi=function(Jn){var Vn=Zn.current,oi=Vn.dragging,Ti=Vn.pageY,Ci=Vn.startTop;se.Z.cancel($n);var Rt=Ke.current.getBoundingClientRect(),Pe=Ce/(ue?Rt.width:Rt.height);if(oi){var qt=(On(Jn,ue)-Ti)*Pe,He=Ci;!he&&ue?He-=qt:He+=qt;var ae=Ln.current,ze=ii.current,Jt=ze?He/ze:0,nn=Math.ceil(Jt*ae);nn=Math.max(nn,0),nn=Math.min(nn,ae),$n=(0,se.Z)(function(){Ve(nn,ue)})}},Bi=function(){Rn(!1),Zt()};return window.addEventListener("mousemove",Hi,{passive:!0}),window.addEventListener("touchmove",Hi,{passive:!0}),window.addEventListener("mouseup",Bi,{passive:!0}),window.addEventListener("touchend",Bi,{passive:!0}),function(){window.removeEventListener("mousemove",Hi),window.removeEventListener("touchmove",Hi),window.removeEventListener("mouseup",Bi),window.removeEventListener("touchend",Bi),se.Z.cancel($n)}}},[Sn]),jt.useEffect(function(){return ri(),function(){clearTimeout(Ni.current)}},[Pt]),jt.useImperativeHandle(gt,function(){return{delayHidden:ri}});var Qn="".concat(pt,"-scrollbar"),xi={position:"absolute",visibility:ci?null:"hidden"},Xn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ue?(Object.assign(xi,{height:8,left:0,right:0,bottom:0}),Object.assign(Xn,(0,xe.Z)({height:"100%",width:re},he?"left":"right",xn))):(Object.assign(xi,(0,xe.Z)({width:8,top:0,bottom:0},he?"right":"left",0)),Object.assign(Xn,{width:"100%",height:re,top:xn})),jt.createElement("div",{ref:Ke,className:me()(Qn,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(Qn,"-horizontal"),ue),"".concat(Qn,"-vertical"),!ue),"".concat(Qn,"-visible"),ci)),style:(0,It.Z)((0,It.Z)({},xi),Te),onMouseDown:Bn,onMouseMove:ri},jt.createElement("div",{ref:hn,className:me()("".concat(Qn,"-thumb"),(0,xe.Z)({},"".concat(Qn,"-thumb-moving"),Sn)),style:(0,It.Z)((0,It.Z)({},Xn),tn),onMouseDown:Nn}))}),on=wn,$t=20;function Ee(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,pt=bt/gt*bt;return isNaN(pt)&&(pt=0),pt=Math.max(pt,$t),Math.floor(pt)}var Be=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Cn=[],Ie={overflowY:"auto",overflowAnchor:"none"};function gn(bt,gt){var pt=bt.prefixCls,Ct=pt===void 0?"rc-virtual-list":pt,Pt=bt.className,vt=bt.height,Et=bt.itemHeight,Zt=bt.fullHeight,Ve=Zt===void 0?!0:Zt,ue=bt.style,re=bt.data,Ce=bt.children,Te=bt.itemKey,tn=bt.virtual,te=bt.direction,le=bt.scrollWidth,bn=bt.component,Sn=bn===void 0?"div":bn,Rn=bt.onScroll,In=bt.onVirtualScroll,sn=bt.onVisibleChange,Hn=bt.innerProps,Mn=bt.extraRender,ye=bt.styles,Ze=bt.showScrollBar,En=Ze===void 0?"optional":Ze,An=(0,Gt.Z)(bt,Be),he=jt.useCallback(function(ui){return typeof Te=="function"?Te(ui):ui==null?void 0:ui[Te]},[Te]),Ke=Tt(he,null,null),hn=(0,_t.Z)(Ke,4),Pn=hn[0],_n=hn[1],ci=hn[2],yi=hn[3],Ni=!!(tn!==!1&&vt&&Et),ri=jt.useMemo(function(){return Object.values(ci.maps).reduce(function(ui,Ei){return ui+Ei},0)},[ci.id,ci.maps]),yt=Ni&&re&&(Math.max(Et*re.length,ri)>vt||!!le),Tn=te==="rtl",xn=me()(Ct,(0,xe.Z)({},"".concat(Ct,"-rtl"),Tn),Pt),Bn=re||Cn,Zn=(0,jt.useRef)(),Nn=(0,jt.useRef)(),Ln=(0,jt.useRef)(),ii=(0,jt.useState)(0),Qn=(0,_t.Z)(ii,2),xi=Qn[0],Xn=Qn[1],$n=(0,jt.useState)(0),Hi=(0,_t.Z)($n,2),Bi=Hi[0],sr=Hi[1],Jn=(0,jt.useState)(!1),Vn=(0,_t.Z)(Jn,2),oi=Vn[0],Ti=Vn[1],Ci=function(){Ti(!0)},Rt=function(){Ti(!1)},Pe={getKey:he};function qt(ui){Xn(function(Ei){var Mi;typeof ui=="function"?Mi=ui(Ei):Mi=ui;var Gn=Qe(Mi);return Zn.current.scrollTop=Gn,Gn})}var He=(0,jt.useRef)({start:0,end:Bn.length}),ae=(0,jt.useRef)(),ze=je(Bn,he),Jt=(0,_t.Z)(ze,1),nn=Jt[0];ae.current=nn;var cn=jt.useMemo(function(){if(!Ni)return{scrollHeight:void 0,start:0,end:Bn.length-1,offset:void 0};if(!yt){var ui;return{scrollHeight:((ui=Nn.current)===null||ui===void 0?void 0:ui.offsetHeight)||0,start:0,end:Bn.length-1,offset:void 0}}for(var Ei=0,Mi,Gn,gi,Li=Bn.length,pi=0;pi<Li;pi+=1){var ni=Bn[pi],kn=he(ni),ji=ci.get(kn),br=Ei+(ji===void 0?Et:ji);br>=xi&&Mi===void 0&&(Mi=pi,Gn=Ei),br>xi+vt&&gi===void 0&&(gi=pi),Ei=br}return Mi===void 0&&(Mi=0,Gn=0,gi=Math.ceil(vt/Et)),gi===void 0&&(gi=Bn.length-1),gi=Math.min(gi+1,Bn.length-1),{scrollHeight:Ei,start:Mi,end:gi,offset:Gn}},[yt,Ni,xi,Bn,yi,vt]),Ne=cn.scrollHeight,Fe=cn.start,Xe=cn.end,Je=cn.offset;He.current.start=Fe,He.current.end=Xe,jt.useLayoutEffect(function(){var ui=ci.getRecord();if(ui.size===1){var Ei=Array.from(ui.keys())[0],Mi=ui.get(Ei),Gn=Bn[Fe];if(Gn&&Mi===void 0){var gi=he(Gn);if(gi===Ei){var Li=ci.get(Ei),pi=Li-Et;qt(function(ni){return ni+pi})}}}ci.resetRecord()},[Ne]);var vn=jt.useState({width:0,height:vt}),li=(0,_t.Z)(vn,2),jn=li[0],vi=li[1],$i=function(Ei){vi({width:Ei.offsetWidth,height:Ei.offsetHeight})},Ji=(0,jt.useRef)(),yn=(0,jt.useRef)(),zi=jt.useMemo(function(){return Ee(jn.width,le)},[jn.width,le]),Ri=jt.useMemo(function(){return Ee(jn.height,Ne)},[jn.height,Ne]),Ii=Ne-vt,an=(0,jt.useRef)(Ii);an.current=Ii;function Qe(ui){var Ei=ui;return Number.isNaN(an.current)||(Ei=Math.min(Ei,an.current)),Ei=Math.max(Ei,0),Ei}var We=xi<=0,mn=xi>=Ii,fn=Bi<=0,Wn=Bi>=le,$e=Qt(We,mn,fn,Wn),Si=function(){return{x:Tn?-Bi:Bi,y:xi}},pn=(0,jt.useRef)(Si()),wi=(0,Nt.zX)(function(ui){if(In){var Ei=(0,It.Z)((0,It.Z)({},Si()),ui);(pn.current.x!==Ei.x||pn.current.y!==Ei.y)&&(In(Ei),pn.current=Ei)}});function Wi(ui,Ei){var Mi=ui;Ei?((0,Me.flushSync)(function(){sr(Mi)}),wi()):qt(Mi)}function Ui(ui){var Ei=ui.currentTarget.scrollTop;Ei!==xi&&qt(Ei),Rn==null||Rn(ui),wi()}var Vi=function(Ei){var Mi=Ei,Gn=le?le-jn.width:0;return Mi=Math.max(Mi,0),Mi=Math.min(Mi,Gn),Mi},Ki=(0,Nt.zX)(function(ui,Ei){Ei?((0,Me.flushSync)(function(){sr(function(Mi){var Gn=Mi+(Tn?-ui:ui);return Vi(Gn)})}),wi()):qt(function(Mi){var Gn=Mi+ui;return Gn})}),Oi=Se(Ni,We,mn,fn,Wn,!!le,Ki),qi=(0,_t.Z)(Oi,2),fr=qi[0],tr=qi[1];we(Ni,Zn,function(ui,Ei,Mi,Gn){var gi=Gn;return $e(ui,Ei,Mi)?!1:!gi||!gi._virtualHandled?(gi&&(gi._virtualHandled=!0),fr({preventDefault:function(){},deltaX:ui?Ei:0,deltaY:ui?0:Ei}),!0):!1}),zt(yt,Zn,function(ui){qt(function(Ei){return Ei+ui})}),(0,Oe.Z)(function(){function ui(Mi){var Gn=We&&Mi.detail<0,gi=mn&&Mi.detail>0;Ni&&!Gn&&!gi&&Mi.preventDefault()}var Ei=Zn.current;return Ei.addEventListener("wheel",fr,{passive:!1}),Ei.addEventListener("DOMMouseScroll",tr,{passive:!0}),Ei.addEventListener("MozMousePixelScroll",ui,{passive:!1}),function(){Ei.removeEventListener("wheel",fr),Ei.removeEventListener("DOMMouseScroll",tr),Ei.removeEventListener("MozMousePixelScroll",ui)}},[Ni,We,mn]),(0,Oe.Z)(function(){if(le){var ui=Vi(Bi);sr(ui),wi({x:ui})}},[jn.width,le]);var ai=function(){var Ei,Mi;(Ei=Ji.current)===null||Ei===void 0||Ei.delayHidden(),(Mi=yn.current)===null||Mi===void 0||Mi.delayHidden()},Lt=Ye(Zn,Bn,ci,Et,he,function(){return _n(!0)},qt,ai);jt.useImperativeHandle(gt,function(){return{nativeElement:Ln.current,getScrollInfo:Si,scrollTo:function(Ei){function Mi(Gn){return Gn&&(0,Dt.Z)(Gn)==="object"&&("left"in Gn||"top"in Gn)}Mi(Ei)?(Ei.left!==void 0&&sr(Vi(Ei.left)),Lt(Ei.top)):Lt(Ei)}}}),(0,Oe.Z)(function(){if(sn){var ui=Bn.slice(Fe,Xe+1);sn(ui,Bn)}},[Fe,Xe,Bn]);var ur=be(Bn,he,ci,Et),Qi=Mn==null?void 0:Mn({start:Fe,end:Xe,virtual:yt,offsetX:Bi,offsetY:Je,rtl:Tn,getSize:ur}),Yi=Ht(Bn,Fe,Xe,le,Bi,Pn,Ce,Pe),nr=null;vt&&(nr=(0,It.Z)((0,xe.Z)({},Ve?"height":"maxHeight",vt),Ie),Ni&&(nr.overflowY="hidden",le&&(nr.overflowX="hidden"),oi&&(nr.pointerEvents="none")));var _i={};return Tn&&(_i.dir="rtl"),jt.createElement("div",(0,lt.Z)({ref:Ln,style:(0,It.Z)((0,It.Z)({},ue),{},{position:"relative"}),className:xn},_i,An),jt.createElement(Yt.Z,{onResize:$i},jt.createElement(Sn,{className:"".concat(Ct,"-holder"),style:nr,ref:Zn,onScroll:Ui,onMouseEnter:ai},jt.createElement(ee,{prefixCls:Ct,height:Ne,offsetX:Bi,offsetY:Je,scrollWidth:le,onInnerResize:_n,ref:Nn,innerProps:Hn,rtl:Tn,extra:Qi},Yi))),yt&&Ne>vt&&jt.createElement(on,{ref:Ji,prefixCls:Ct,scrollOffset:xi,scrollRange:Ne,rtl:Tn,onScroll:Wi,onStartMove:Ci,onStopMove:Rt,spinSize:Ri,containerSize:jn.height,style:ye==null?void 0:ye.verticalScrollBar,thumbStyle:ye==null?void 0:ye.verticalScrollBarThumb,showScrollBar:En}),yt&&le>jn.width&&jt.createElement(on,{ref:yn,prefixCls:Ct,scrollOffset:Bi,scrollRange:le,rtl:Tn,onScroll:Wi,onStartMove:Ci,onStopMove:Rt,spinSize:zi,containerSize:jn.width,horizontal:!0,style:ye==null?void 0:ye.horizontalScrollBar,thumbStyle:ye==null?void 0:ye.horizontalScrollBarThumb,showScrollBar:En}))}var ke=jt.forwardRef(gn);ke.displayName="List";var Dn=ke,ln=Dn},51353:function(Yn,qe,dt){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),Object.defineProperty(qe,"DraggableCore",{enumerable:!0,get:function(){return me.default}}),qe.default=void 0;var lt=Oe(dt(59301)),Dt=Nt(dt(12708)),It=Nt(dt(4676)),xe=dt(14625),_t=dt(77026),Gt=dt(22013),Vt=dt(80217),me=Nt(dt(68555)),Yt=Nt(dt(97510));function Nt(Ht){return Ht&&Ht.__esModule?Ht:{default:Ht}}function Oe(Ht,de){if(typeof WeakMap=="function")var Ae=new WeakMap,je=new WeakMap;return(Oe=function(se,Xt){if(!Xt&&se&&se.__esModule)return se;var ve,Qt,Se={__proto__:null,default:se};if(se===null||typeof se!="object"&&typeof se!="function")return Se;if(ve=Xt?je:Ae){if(ve.has(se))return ve.get(se);ve.set(se,Se)}for(const be in se)be!=="default"&&{}.hasOwnProperty.call(se,be)&&((Qt=(ve=Object.defineProperty)&&Object.getOwnPropertyDescriptor(se,be))&&(Qt.get||Qt.set)?ve(Se,be,Qt):Se[be]=se[be]);return Se})(Ht,de)}function jt(){return jt=Object.assign?Object.assign.bind():function(Ht){for(var de=1;de<arguments.length;de++){var Ae=arguments[de];for(var je in Ae)({}).hasOwnProperty.call(Ae,je)&&(Ht[je]=Ae[je])}return Ht},jt.apply(null,arguments)}function Me(Ht,de,Ae){return(de=ce(de))in Ht?Object.defineProperty(Ht,de,{value:Ae,enumerable:!0,configurable:!0,writable:!0}):Ht[de]=Ae,Ht}function ce(Ht){var de=ee(Ht,"string");return typeof de=="symbol"?de:de+""}function ee(Ht,de){if(typeof Ht!="object"||!Ht)return Ht;var Ae=Ht[Symbol.toPrimitive];if(Ae!==void 0){var je=Ae.call(Ht,de||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(de==="string"?String:Number)(Ht)}class Kt extends lt.Component{static getDerivedStateFromProps(de,Ae){let{position:je}=de,{prevPropsPosition:se}=Ae;return je&&(!se||je.x!==se.x||je.y!==se.y)?((0,Yt.default)("Draggable: getDerivedStateFromProps %j",{position:je,prevPropsPosition:se}),{x:je.x,y:je.y,prevPropsPosition:fc({},je)}):null}constructor(de){super(de),Me(this,"onDragStart",(Ae,je)=>{if((0,Yt.default)("Draggable: onDragStart: %j",je),this.props.onStart(Ae,(0,Gt.createDraggableData)(this,je))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Me(this,"onDrag",(Ae,je)=>{if(!this.state.dragging)return!1;(0,Yt.default)("Draggable: onDrag: %j",je);const se=(0,Gt.createDraggableData)(this,je),Xt={x:se.x,y:se.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Qt,y:Se}=Xt;Xt.x+=this.state.slackX,Xt.y+=this.state.slackY;const[be,Le]=(0,Gt.getBoundPosition)(this,Xt.x,Xt.y);Xt.x=be,Xt.y=Le,Xt.slackX=this.state.slackX+(Qt-Xt.x),Xt.slackY=this.state.slackY+(Se-Xt.y),se.x=Xt.x,se.y=Xt.y,se.deltaX=Xt.x-this.state.x,se.deltaY=Xt.y-this.state.y}if(this.props.onDrag(Ae,se)===!1)return!1;this.setState(Xt)}),Me(this,"onDragStop",(Ae,je)=>{if(!this.state.dragging||this.props.onStop(Ae,(0,Gt.createDraggableData)(this,je))===!1)return!1;(0,Yt.default)("Draggable: onDragStop: %j",je);const Xt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Qt,y:Se}=this.props.position;Xt.x=Qt,Xt.y=Se}this.setState(Xt)}),this.state={dragging:!1,dragged:!1,x:de.position?de.position.x:de.defaultPosition.x,y:de.position?de.position.y:de.defaultPosition.y,prevPropsPosition:fc({},de.position),slackX:0,slackY:0,isElementSVG:!1},de.position&&!(de.onDrag||de.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var de,Ae,je;return(je=(Ae=(de=this.props)==null?void 0:de.nodeRef)==null?void 0:Ae.current)!=null?je:It.default.findDOMNode(this)}render(){const On=this.props,{axis:de,bounds:Ae,children:je,defaultPosition:se,defaultClassName:Xt,defaultClassNameDragging:ve,defaultClassNameDragged:Qt,position:Se,positionOffset:be,scale:Le}=On,en=ww(On,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let ie={},Re=null;const Tt=!!!Se||this.state.dragging,rn=Se||se,we={x:(0,Gt.canDragX)(this)&&Tt?this.state.x:rn.x,y:(0,Gt.canDragY)(this)&&Tt?this.state.y:rn.y};this.state.isElementSVG?Re=(0,_t.createSVGTransform)(we,be):ie=(0,_t.createCSSTransform)(we,be);const Ue=(0,xe.clsx)(je.props.className||"",Xt,{[ve]:this.state.dragging,[Qt]:this.state.dragged});return lt.createElement(me.default,jt({},en,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),lt.cloneElement(lt.Children.only(je),{className:Ue,style:fc(fc({},je.props.style),ie),transform:Re}))}}qe.default=Kt,Me(Kt,"displayName","Draggable"),Me(Kt,"propTypes",Uy(fc({},me.default.propTypes),{axis:Dt.default.oneOf(["both","x","y","none"]),bounds:Dt.default.oneOfType([Dt.default.shape({left:Dt.default.number,right:Dt.default.number,top:Dt.default.number,bottom:Dt.default.number}),Dt.default.string,Dt.default.oneOf([!1])]),defaultClassName:Dt.default.string,defaultClassNameDragging:Dt.default.string,defaultClassNameDragged:Dt.default.string,defaultPosition:Dt.default.shape({x:Dt.default.number,y:Dt.default.number}),positionOffset:Dt.default.shape({x:Dt.default.oneOfType([Dt.default.number,Dt.default.string]),y:Dt.default.oneOfType([Dt.default.number,Dt.default.string])}),position:Dt.default.shape({x:Dt.default.number,y:Dt.default.number}),className:Vt.dontSetMe,style:Vt.dontSetMe,transform:Vt.dontSetMe})),Me(Kt,"defaultProps",Uy(fc({},me.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},68555:function(Yn,qe,dt){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=void 0;var lt=Yt(dt(59301)),Dt=me(dt(12708)),It=me(dt(4676)),xe=dt(77026),_t=dt(22013),Gt=dt(80217),Vt=me(dt(97510));function me(Kt){return Kt&&Kt.__esModule?Kt:{default:Kt}}function Yt(Kt,Ht){if(typeof WeakMap=="function")var de=new WeakMap,Ae=new WeakMap;return(Yt=function(je,se){if(!se&&je&&je.__esModule)return je;var Xt,ve,Qt={__proto__:null,default:je};if(je===null||typeof je!="object"&&typeof je!="function")return Qt;if(Xt=se?Ae:de){if(Xt.has(je))return Xt.get(je);Xt.set(je,Qt)}for(const Se in je)Se!=="default"&&{}.hasOwnProperty.call(je,Se)&&((ve=(Xt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(je,Se))&&(ve.get||ve.set)?Xt(Qt,Se,ve):Qt[Se]=je[Se]);return Qt})(Kt,Ht)}function Nt(Kt,Ht,de){return(Ht=Oe(Ht))in Kt?Object.defineProperty(Kt,Ht,{value:de,enumerable:!0,configurable:!0,writable:!0}):Kt[Ht]=de,Kt}function Oe(Kt){var Ht=jt(Kt,"string");return typeof Ht=="symbol"?Ht:Ht+""}function jt(Kt,Ht){if(typeof Kt!="object"||!Kt)return Kt;var de=Kt[Symbol.toPrimitive];if(de!==void 0){var Ae=de.call(Kt,Ht||"default");if(typeof Ae!="object")return Ae;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ht==="string"?String:Number)(Kt)}const Me={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let ce=Me.mouse;class ee extends lt.Component{constructor(){super(...arguments),Nt(this,"dragging",!1),Nt(this,"lastX",NaN),Nt(this,"lastY",NaN),Nt(this,"touchIdentifier",null),Nt(this,"mounted",!1),Nt(this,"handleDragStart",Ht=>{if(this.props.onMouseDown(Ht),!this.props.allowAnyClick&&typeof Ht.button=="number"&&Ht.button!==0)return!1;const de=this.findDOMNode();if(!de||!de.ownerDocument||!de.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:Ae}=de;if(this.props.disabled||!(Ht.target instanceof Ae.defaultView.Node)||this.props.handle&&!(0,xe.matchesSelectorAndParentsTo)(Ht.target,this.props.handle,de)||this.props.cancel&&(0,xe.matchesSelectorAndParentsTo)(Ht.target,this.props.cancel,de))return;Ht.type==="touchstart"&&!this.props.allowMobileScroll&&Ht.preventDefault();const je=(0,xe.getTouchIdentifier)(Ht);this.touchIdentifier=je;const se=(0,_t.getControlPosition)(Ht,je,this);if(se==null)return;const{x:Xt,y:ve}=se,Qt=(0,_t.createCoreData)(this,Xt,ve);(0,Vt.default)("DraggableCore: handleDragStart: %j",Qt),(0,Vt.default)("calling",this.props.onStart),!(this.props.onStart(Ht,Qt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,xe.addUserSelectStyles)(Ae),this.dragging=!0,this.lastX=Xt,this.lastY=ve,(0,xe.addEvent)(Ae,ce.move,this.handleDrag),(0,xe.addEvent)(Ae,ce.stop,this.handleDragStop))}),Nt(this,"handleDrag",Ht=>{const de=(0,_t.getControlPosition)(Ht,this.touchIdentifier,this);if(de==null)return;let{x:Ae,y:je}=de;if(Array.isArray(this.props.grid)){let ve=Ae-this.lastX,Qt=je-this.lastY;if([ve,Qt]=(0,_t.snapToGrid)(this.props.grid,ve,Qt),!ve&&!Qt)return;Ae=this.lastX+ve,je=this.lastY+Qt}const se=(0,_t.createCoreData)(this,Ae,je);if((0,Vt.default)("DraggableCore: handleDrag: %j",se),this.props.onDrag(Ht,se)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(ve){const Qt=document.createEvent("MouseEvents");Qt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Qt)}return}this.lastX=Ae,this.lastY=je}),Nt(this,"handleDragStop",Ht=>{if(!this.dragging)return;const de=(0,_t.getControlPosition)(Ht,this.touchIdentifier,this);if(de==null)return;let{x:Ae,y:je}=de;if(Array.isArray(this.props.grid)){let Qt=Ae-this.lastX||0,Se=je-this.lastY||0;[Qt,Se]=(0,_t.snapToGrid)(this.props.grid,Qt,Se),Ae=this.lastX+Qt,je=this.lastY+Se}const se=(0,_t.createCoreData)(this,Ae,je);if(this.props.onStop(Ht,se)===!1||this.mounted===!1)return!1;const ve=this.findDOMNode();ve&&this.props.enableUserSelectHack&&(0,xe.scheduleRemoveUserSelectStyles)(ve.ownerDocument),(0,Vt.default)("DraggableCore: handleDragStop: %j",se),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,ve&&((0,Vt.default)("DraggableCore: Removing handlers"),(0,xe.removeEvent)(ve.ownerDocument,ce.move,this.handleDrag),(0,xe.removeEvent)(ve.ownerDocument,ce.stop,this.handleDragStop))}),Nt(this,"onMouseDown",Ht=>(ce=Me.mouse,this.handleDragStart(Ht))),Nt(this,"onMouseUp",Ht=>(ce=Me.mouse,this.handleDragStop(Ht))),Nt(this,"onTouchStart",Ht=>(ce=Me.touch,this.handleDragStart(Ht))),Nt(this,"onTouchEnd",Ht=>(ce=Me.touch,this.handleDragStop(Ht)))}componentDidMount(){this.mounted=!0;const Ht=this.findDOMNode();Ht&&(0,xe.addEvent)(Ht,Me.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const Ht=this.findDOMNode();if(Ht){const{ownerDocument:de}=Ht;(0,xe.removeEvent)(de,Me.mouse.move,this.handleDrag),(0,xe.removeEvent)(de,Me.touch.move,this.handleDrag),(0,xe.removeEvent)(de,Me.mouse.stop,this.handleDragStop),(0,xe.removeEvent)(de,Me.touch.stop,this.handleDragStop),(0,xe.removeEvent)(Ht,Me.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,xe.scheduleRemoveUserSelectStyles)(de)}}findDOMNode(){var Ht,de,Ae;return(Ht=this.props)!=null&&Ht.nodeRef?(Ae=(de=this.props)==null?void 0:de.nodeRef)==null?void 0:Ae.current:It.default.findDOMNode(this)}render(){return lt.cloneElement(lt.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}qe.default=ee,Nt(ee,"displayName","DraggableCore"),Nt(ee,"propTypes",{allowAnyClick:Dt.default.bool,allowMobileScroll:Dt.default.bool,children:Dt.default.node.isRequired,disabled:Dt.default.bool,enableUserSelectHack:Dt.default.bool,offsetParent:function(Kt,Ht){if(Kt[Ht]&&Kt[Ht].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Dt.default.arrayOf(Dt.default.number),handle:Dt.default.string,cancel:Dt.default.string,nodeRef:Dt.default.object,onStart:Dt.default.func,onDrag:Dt.default.func,onStop:Dt.default.func,onMouseDown:Dt.default.func,scale:Dt.default.number,className:Gt.dontSetMe,style:Gt.dontSetMe,transform:Gt.dontSetMe}),Nt(ee,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},96249:function(Yn,qe,dt){"use strict";const{default:lt,DraggableCore:Dt}=dt(51353);Yn.exports=lt,Yn.exports.default=lt,Yn.exports.DraggableCore=Dt},77026:function(Yn,qe,dt){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.addClassName=Xt,qe.addEvent=Vt,qe.addUserSelectStyles=Ae,qe.createCSSTransform=ce,qe.createSVGTransform=ee,qe.getTouch=Ht,qe.getTouchIdentifier=de,qe.getTranslation=Kt,qe.innerHeight=Oe,qe.innerWidth=jt,qe.matchesSelector=_t,qe.matchesSelectorAndParentsTo=Gt,qe.offsetXYFromParent=Me,qe.outerHeight=Yt,qe.outerWidth=Nt,qe.removeClassName=ve,qe.removeEvent=me,qe.scheduleRemoveUserSelectStyles=je;var lt=dt(80217),Dt=It(dt(76172));function It(Qt,Se){if(typeof WeakMap=="function")var be=new WeakMap,Le=new WeakMap;return(It=function(en,ie){if(!ie&&en&&en.__esModule)return en;var Re,De,Tt={__proto__:null,default:en};if(en===null||typeof en!="object"&&typeof en!="function")return Tt;if(Re=ie?Le:be){if(Re.has(en))return Re.get(en);Re.set(en,Tt)}for(const rn in en)rn!=="default"&&{}.hasOwnProperty.call(en,rn)&&((De=(Re=Object.defineProperty)&&Object.getOwnPropertyDescriptor(en,rn))&&(De.get||De.set)?Re(Tt,rn,De):Tt[rn]=en[rn]);return Tt})(Qt,Se)}let xe="";function _t(Qt,Se){return xe||(xe=(0,lt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(be){return(0,lt.isFunction)(Qt[be])})),(0,lt.isFunction)(Qt[xe])?Qt[xe](Se):!1}function Gt(Qt,Se,be){let Le=Qt;do{if(_t(Le,Se))return!0;if(Le===be)return!1;Le=Le.parentNode}while(Le);return!1}function Vt(Qt,Se,be,Le){if(!Qt)return;const en=fc({capture:!0},Le);Qt.addEventListener?Qt.addEventListener(Se,be,en):Qt.attachEvent?Qt.attachEvent("on"+Se,be):Qt["on"+Se]=be}function me(Qt,Se,be,Le){if(!Qt)return;const en=fc({capture:!0},Le);Qt.removeEventListener?Qt.removeEventListener(Se,be,en):Qt.detachEvent?Qt.detachEvent("on"+Se,be):Qt["on"+Se]=null}function Yt(Qt){let Se=Qt.clientHeight;const be=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Se+=(0,lt.int)(be.borderTopWidth),Se+=(0,lt.int)(be.borderBottomWidth),Se}function Nt(Qt){let Se=Qt.clientWidth;const be=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Se+=(0,lt.int)(be.borderLeftWidth),Se+=(0,lt.int)(be.borderRightWidth),Se}function Oe(Qt){let Se=Qt.clientHeight;const be=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Se-=(0,lt.int)(be.paddingTop),Se-=(0,lt.int)(be.paddingBottom),Se}function jt(Qt){let Se=Qt.clientWidth;const be=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Se-=(0,lt.int)(be.paddingLeft),Se-=(0,lt.int)(be.paddingRight),Se}function Me(Qt,Se,be){const en=Se===Se.ownerDocument.body?{left:0,top:0}:Se.getBoundingClientRect(),ie=(Qt.clientX+Se.scrollLeft-en.left)/be,Re=(Qt.clientY+Se.scrollTop-en.top)/be;return{x:ie,y:Re}}function ce(Qt,Se){const be=Kt(Qt,Se,"px");return{[(0,Dt.browserPrefixToKey)("transform",Dt.default)]:be}}function ee(Qt,Se){return Kt(Qt,Se,"")}function Kt(Qt,Se,be){let{x:Le,y:en}=Qt,ie=`translate(${Le}${be},${en}${be})`;if(Se){const Re=`${typeof Se.x=="string"?Se.x:Se.x+be}`,De=`${typeof Se.y=="string"?Se.y:Se.y+be}`;ie=`translate(${Re}, ${De})`+ie}return ie}function Ht(Qt,Se){return Qt.targetTouches&&(0,lt.findInArray)(Qt.targetTouches,be=>Se===be.identifier)||Qt.changedTouches&&(0,lt.findInArray)(Qt.changedTouches,be=>Se===be.identifier)}function de(Qt){if(Qt.targetTouches&&Qt.targetTouches[0])return Qt.targetTouches[0].identifier;if(Qt.changedTouches&&Qt.changedTouches[0])return Qt.changedTouches[0].identifier}function Ae(Qt){if(!Qt)return;let Se=Qt.getElementById("react-draggable-style-el");Se||(Se=Qt.createElement("style"),Se.type="text/css",Se.id="react-draggable-style-el",Se.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
|
`,Se.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
|
`,Qt.getElementsByTagName("head")[0].appendChild(Se)),Qt.body&&Xt(Qt.body,"react-draggable-transparent-selection")}function je(Qt){window.requestAnimationFrame?window.requestAnimationFrame(()=>{se(Qt)}):se(Qt)}function se(Qt){if(Qt)try{if(Qt.body&&ve(Qt.body,"react-draggable-transparent-selection"),Qt.selection)Qt.selection.empty();else{const Se=(Qt.defaultView||window).getSelection();Se&&Se.type!=="Caret"&&Se.removeAllRanges()}}catch(Se){}}function Xt(Qt,Se){Qt.classList?Qt.classList.add(Se):Qt.className.match(new RegExp(`(?:^|\\s)${Se}(?!\\S)`))||(Qt.className+=` ${Se}`)}function ve(Qt,Se){Qt.classList?Qt.classList.remove(Se):Qt.className=Qt.className.replace(new RegExp(`(?:^|\\s)${Se}(?!\\S)`,"g"),"")}},76172:function(Yn,qe){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.browserPrefixToKey=Dt,qe.browserPrefixToStyle=It,qe.default=void 0,qe.getPrefix=lt;const dt=["Moz","Webkit","O","ms"];function lt(){var me,Yt;let Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const Vt=(Yt=(me=window.document)==null?void 0:me.documentElement)==null?void 0:Yt.style;if(!Vt||Gt in Vt)return"";for(let Nt=0;Nt<dt.length;Nt++)if(Dt(Gt,dt[Nt])in Vt)return dt[Nt];return""}function Dt(Gt,Vt){return Vt?`${Vt}${xe(Gt)}`:Gt}function It(Gt,Vt){return Vt?`-${Vt.toLowerCase()}-${Gt}`:Gt}function xe(Gt){let Vt="",me=!0;for(let Yt=0;Yt<Gt.length;Yt++)me?(Vt+=Gt[Yt].toUpperCase(),me=!1):Gt[Yt]==="-"?me=!0:Vt+=Gt[Yt];return Vt}var _t=qe.default=lt()},97510:function(Yn,qe){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=dt;function dt(){}},22013:function(Yn,qe,dt){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.canDragX=_t,qe.canDragY=Gt,qe.createCoreData=me,qe.createDraggableData=Yt,qe.getBoundPosition=It,qe.getControlPosition=Vt,qe.snapToGrid=xe;var lt=dt(80217),Dt=dt(77026);function It(jt,Me,ce){if(!jt.props.bounds)return[Me,ce];let{bounds:ee}=jt.props;ee=typeof ee=="string"?ee:Nt(ee);const Kt=Oe(jt);if(typeof ee=="string"){const{ownerDocument:Ht}=Kt,de=Ht.defaultView;let Ae;if(ee==="parent"?Ae=Kt.parentNode:Ae=Kt.getRootNode().querySelector(ee),!(Ae instanceof de.HTMLElement))throw new Error('Bounds selector "'+ee+'" could not find an element.');const je=Ae,se=de.getComputedStyle(Kt),Xt=de.getComputedStyle(je);ee={left:-Kt.offsetLeft+(0,lt.int)(Xt.paddingLeft)+(0,lt.int)(se.marginLeft),top:-Kt.offsetTop+(0,lt.int)(Xt.paddingTop)+(0,lt.int)(se.marginTop),right:(0,Dt.innerWidth)(je)-(0,Dt.outerWidth)(Kt)-Kt.offsetLeft+(0,lt.int)(Xt.paddingRight)-(0,lt.int)(se.marginRight),bottom:(0,Dt.innerHeight)(je)-(0,Dt.outerHeight)(Kt)-Kt.offsetTop+(0,lt.int)(Xt.paddingBottom)-(0,lt.int)(se.marginBottom)}}return(0,lt.isNum)(ee.right)&&(Me=Math.min(Me,ee.right)),(0,lt.isNum)(ee.bottom)&&(ce=Math.min(ce,ee.bottom)),(0,lt.isNum)(ee.left)&&(Me=Math.max(Me,ee.left)),(0,lt.isNum)(ee.top)&&(ce=Math.max(ce,ee.top)),[Me,ce]}function xe(jt,Me,ce){const ee=Math.round(Me/jt[0])*jt[0],Kt=Math.round(ce/jt[1])*jt[1];return[ee,Kt]}function _t(jt){return jt.props.axis==="both"||jt.props.axis==="x"}function Gt(jt){return jt.props.axis==="both"||jt.props.axis==="y"}function Vt(jt,Me,ce){const ee=typeof Me=="number"?(0,Dt.getTouch)(jt,Me):null;if(typeof Me=="number"&&!ee)return null;const Kt=Oe(ce),Ht=ce.props.offsetParent||Kt.offsetParent||Kt.ownerDocument.body;return(0,Dt.offsetXYFromParent)(ee||jt,Ht,ce.props.scale)}function me(jt,Me,ce){const ee=!(0,lt.isNum)(jt.lastX),Kt=Oe(jt);return ee?{node:Kt,deltaX:0,deltaY:0,lastX:Me,lastY:ce,x:Me,y:ce}:{node:Kt,deltaX:Me-jt.lastX,deltaY:ce-jt.lastY,lastX:jt.lastX,lastY:jt.lastY,x:Me,y:ce}}function Yt(jt,Me){const ce=jt.props.scale;return{node:Me.node,x:jt.state.x+Me.deltaX/ce,y:jt.state.y+Me.deltaY/ce,deltaX:Me.deltaX/ce,deltaY:Me.deltaY/ce,lastX:jt.state.x,lastY:jt.state.y}}function Nt(jt){return{left:jt.left,top:jt.top,right:jt.right,bottom:jt.bottom}}function Oe(jt){const Me=jt.findDOMNode();if(!Me)throw new Error("<DraggableCore>: Unmounted during event!");return Me}},80217:function(Yn,qe){"use strict";Object.defineProperty(qe,"__esModule",{value:!0}),qe.dontSetMe=xe,qe.findInArray=dt,qe.int=It,qe.isFunction=lt,qe.isNum=Dt;function dt(_t,Gt){for(let Vt=0,me=_t.length;Vt<me;Vt++)if(Gt.apply(Gt,[_t[Vt],Vt,_t]))return _t[Vt]}function lt(_t){return typeof _t=="function"||Object.prototype.toString.call(_t)==="[object Function]"}function Dt(_t){return typeof _t=="number"&&!isNaN(_t)}function It(_t){return parseInt(_t,10)}function xe(_t,Gt,Vt){if(_t[Gt])return new Error(`Invalid prop ${Gt} passed to ${Vt} - do not set this, set it on the child.`)}},51581:function(Yn,qe,dt){"use strict";Object.defineProperty(qe,"__esModule",{value:!0});var lt=function(){function jt(Me,ce){for(var ee=0;ee<ce.length;ee++){var Kt=ce[ee];Kt.enumerable=Kt.enumerable||!1,Kt.configurable=!0,"value"in Kt&&(Kt.writable=!0),Object.defineProperty(Me,Kt.key,Kt)}}return function(Me,ce,ee){return ce&&jt(Me.prototype,ce),ee&&jt(Me,ee),Me}}(),Dt=dt(59301),It=Gt(Dt),xe=dt(12708),_t=Gt(xe);function Gt(jt){return jt&&jt.__esModule?jt:{default:jt}}function Vt(jt,Me){var ce={};for(var ee in jt)Me.indexOf(ee)>=0||Object.prototype.hasOwnProperty.call(jt,ee)&&(ce[ee]=jt[ee]);return ce}function me(jt,Me){if(!(jt instanceof Me))throw new TypeError("Cannot call a class as a function")}function Yt(jt,Me){if(!jt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Me&&(typeof Me=="object"||typeof Me=="function")?Me:jt}function Nt(jt,Me){if(typeof Me!="function"&&Me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Me);jt.prototype=Object.create(Me&&Me.prototype,{constructor:{value:jt,enumerable:!1,writable:!0,configurable:!0}}),Me&&(Object.setPrototypeOf?Object.setPrototypeOf(jt,Me):jt.__proto__=Me)}var Oe=function(jt){Nt(Me,jt);function Me(ce){me(this,Me);var ee=Yt(this,(Me.__proto__||Object.getPrototypeOf(Me)).call(this,ce));return ee.scrollListener=ee.scrollListener.bind(ee),ee.eventListenerOptions=ee.eventListenerOptions.bind(ee),ee.mousewheelListener=ee.mousewheelListener.bind(ee),ee}return lt(Me,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var ee=this.getParentElement(this.scrollComponent);ee.scrollTop=ee.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var ee=!1,Kt={get passive(){ee=!0}};try{document.addEventListener("test",null,Kt),document.removeEventListener("test",null,Kt)}catch(Ht){}return ee}},{key:"eventListenerOptions",value:function(){var ee=this.props.useCapture;return this.isPassiveSupported()&&(ee={useCapture:this.props.useCapture,passive:!0}),ee}},{key:"setDefaultLoader",value:function(ee){this.defaultLoader=ee}},{key:"detachMousewheelListener",value:function(){var ee=window;this.props.useWindow===!1&&(ee=this.scrollComponent.parentNode),ee.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var ee=window;this.props.useWindow===!1&&(ee=this.getParentElement(this.scrollComponent)),ee.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),ee.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(ee){var Kt=this.props.getScrollParent&&this.props.getScrollParent();return Kt!=null?Kt:ee&&ee.parentNode}},{key:"filterProps",value:function(ee){return ee}},{key:"attachScrollListener",value:function(){var ee=this.getParentElement(this.scrollComponent);if(!(!this.props.hasMore||!ee)){var Kt=window;this.props.useWindow===!1&&(Kt=ee),Kt.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),Kt.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),Kt.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(ee){ee.deltaY===1&&!this.isPassiveSupported()&&ee.preventDefault()}},{key:"scrollListener",value:function(){var ee=this.scrollComponent,Kt=window,Ht=this.getParentElement(ee),de=void 0;if(this.props.useWindow){var Ae=document.documentElement||document.body.parentNode||document.body,je=Kt.pageYOffset!==void 0?Kt.pageYOffset:Ae.scrollTop;this.props.isReverse?de=je:de=this.calculateOffset(ee,je)}else this.props.isReverse?de=Ht.scrollTop:de=ee.scrollHeight-Ht.scrollTop-Ht.clientHeight;de<Number(this.props.threshold)&&ee&&ee.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=Ht.scrollHeight,this.beforeScrollTop=Ht.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(ee,Kt){return ee?this.calculateTopPosition(ee)+(ee.offsetHeight-Kt-window.innerHeight):0}},{key:"calculateTopPosition",value:function(ee){return ee?ee.offsetTop+this.calculateTopPosition(ee.offsetParent):0}},{key:"render",value:function(){var ee=this,Kt=this.filterProps(this.props),Ht=Kt.children,de=Kt.element,Ae=Kt.hasMore,je=Kt.initialLoad,se=Kt.isReverse,Xt=Kt.loader,ve=Kt.loadMore,Qt=Kt.pageStart,Se=Kt.ref,be=Kt.threshold,Le=Kt.useCapture,en=Kt.useWindow,ie=Kt.getScrollParent,Re=Vt(Kt,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);Re.ref=function(Tt){ee.scrollComponent=Tt,Se&&Se(Tt)};var De=[Ht];return Ae&&(Xt?se?De.unshift(Xt):De.push(Xt):this.defaultLoader&&(se?De.unshift(this.defaultLoader):De.push(this.defaultLoader))),It.default.createElement(de,Re,De)}}]),Me}(Dt.Component);Oe.propTypes={children:_t.default.node.isRequired,element:_t.default.node,hasMore:_t.default.bool,initialLoad:_t.default.bool,isReverse:_t.default.bool,loader:_t.default.node,loadMore:_t.default.func.isRequired,pageStart:_t.default.number,ref:_t.default.func,getScrollParent:_t.default.func,threshold:_t.default.number,useCapture:_t.default.bool,useWindow:_t.default.bool},Oe.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},qe.default=Oe,Yn.exports=qe.default},26724:function(Yn,qe,dt){Yn.exports=dt(51581)},4977:function(Yn){"use strict";Yn.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=="},16722:function(Yn,qe,dt){"use strict";dt.d(qe,{Z:function(){return me}});const lt=Yt=>typeof Yt=="object"&&Yt!=null&&Yt.nodeType===1,Dt=(Yt,Nt)=>(!Nt||Yt!=="hidden")&&Yt!=="visible"&&Yt!=="clip",It=(Yt,Nt)=>{if(Yt.clientHeight<Yt.scrollHeight||Yt.clientWidth<Yt.scrollWidth){const Oe=getComputedStyle(Yt,null);return Dt(Oe.overflowY,Nt)||Dt(Oe.overflowX,Nt)||(jt=>{const Me=(ce=>{if(!ce.ownerDocument||!ce.ownerDocument.defaultView)return null;try{return ce.ownerDocument.defaultView.frameElement}catch(ee){return null}})(jt);return!!Me&&(Me.clientHeight<jt.scrollHeight||Me.clientWidth<jt.scrollWidth)})(Yt)}return!1},xe=(Yt,Nt,Oe,jt,Me,ce,ee,Kt)=>ce<Yt&&ee>Nt||ce>Yt&&ee<Nt?0:ce<=Yt&&Kt<=Oe||ee>=Nt&&Kt>=Oe?ce-Yt-jt:ee>Nt&&Kt<Oe||ce<Yt&&Kt>Oe?ee-Nt+Me:0,_t=Yt=>{const Nt=Yt.parentElement;return Nt==null?Yt.getRootNode().host||null:Nt},Gt=(Yt,Nt)=>{var Oe,jt,Me,ce;if(typeof document=="undefined")return[];const{scrollMode:ee,block:Kt,inline:Ht,boundary:de,skipOverflowHiddenElements:Ae}=Nt,je=typeof de=="function"?de:on=>on!==de;if(!lt(Yt))throw new TypeError("Invalid target");const se=document.scrollingElement||document.documentElement,Xt=[];let ve=Yt;for(;lt(ve)&&je(ve);){if(ve=_t(ve),ve===se){Xt.push(ve);break}ve!=null&&ve===document.body&&It(ve)&&!It(document.documentElement)||ve!=null&&It(ve,Ae)&&Xt.push(ve)}const Qt=(jt=(Oe=window.visualViewport)==null?void 0:Oe.width)!=null?jt:innerWidth,Se=(ce=(Me=window.visualViewport)==null?void 0:Me.height)!=null?ce:innerHeight,{scrollX:be,scrollY:Le}=window,{height:en,width:ie,top:Re,right:De,bottom:Tt,left:rn}=Yt.getBoundingClientRect(),{top:we,right:Ue,bottom:On,left:zt}=(on=>{const $t=window.getComputedStyle(on);return{top:parseFloat($t.scrollMarginTop)||0,right:parseFloat($t.scrollMarginRight)||0,bottom:parseFloat($t.scrollMarginBottom)||0,left:parseFloat($t.scrollMarginLeft)||0}})(Yt);let kt=Kt==="start"||Kt==="nearest"?Re-we:Kt==="end"?Tt+On:Re+en/2-we+On,Ye=Ht==="center"?rn+ie/2-zt+Ue:Ht==="end"?De+Ue:rn-zt;const wn=[];for(let on=0;on<Xt.length;on++){const $t=Xt[on],{height:Ee,width:Be,top:Cn,right:Ie,bottom:gn,left:ke}=$t.getBoundingClientRect();if(ee==="if-needed"&&Re>=0&&rn>=0&&Tt<=Se&&De<=Qt&&($t===se&&!It($t)||Re>=Cn&&Tt<=gn&&rn>=ke&&De<=Ie))return wn;const Dn=getComputedStyle($t),ln=parseInt(Dn.borderLeftWidth,10),bt=parseInt(Dn.borderTopWidth,10),gt=parseInt(Dn.borderRightWidth,10),pt=parseInt(Dn.borderBottomWidth,10);let Ct=0,Pt=0;const vt="offsetWidth"in $t?$t.offsetWidth-$t.clientWidth-ln-gt:0,Et="offsetHeight"in $t?$t.offsetHeight-$t.clientHeight-bt-pt:0,Zt="offsetWidth"in $t?$t.offsetWidth===0?0:Be/$t.offsetWidth:0,Ve="offsetHeight"in $t?$t.offsetHeight===0?0:Ee/$t.offsetHeight:0;if(se===$t)Ct=Kt==="start"?kt:Kt==="end"?kt-Se:Kt==="nearest"?xe(Le,Le+Se,Se,bt,pt,Le+kt,Le+kt+en,en):kt-Se/2,Pt=Ht==="start"?Ye:Ht==="center"?Ye-Qt/2:Ht==="end"?Ye-Qt:xe(be,be+Qt,Qt,ln,gt,be+Ye,be+Ye+ie,ie),Ct=Math.max(0,Ct+Le),Pt=Math.max(0,Pt+be);else{Ct=Kt==="start"?kt-Cn-bt:Kt==="end"?kt-gn+pt+Et:Kt==="nearest"?xe(Cn,gn,Ee,bt,pt+Et,kt,kt+en,en):kt-(Cn+Ee/2)+Et/2,Pt=Ht==="start"?Ye-ke-ln:Ht==="center"?Ye-(ke+Be/2)+vt/2:Ht==="end"?Ye-Ie+gt+vt:xe(ke,Ie,Be,ln,gt+vt,Ye,Ye+ie,ie);const{scrollLeft:ue,scrollTop:re}=$t;Ct=Ve===0?0:Math.max(0,Math.min(re+Ct/Ve,$t.scrollHeight-Ee/Ve+Et)),Pt=Zt===0?0:Math.max(0,Math.min(ue+Pt/Zt,$t.scrollWidth-Be/Zt+vt)),kt+=re-Ct,Ye+=ue-Pt}wn.push({el:$t,top:Ct,left:Pt})}return wn},Vt=Yt=>Yt===!1?{block:"end",inline:"nearest"}:(Nt=>Nt===Object(Nt)&&Object.keys(Nt).length!==0)(Yt)?Yt:{block:"start",inline:"nearest"};function me(Yt,Nt){if(!Yt.isConnected||!(Me=>{let ce=Me;for(;ce&&ce.parentNode;){if(ce.parentNode===document)return!0;ce=ce.parentNode instanceof ShadowRoot?ce.parentNode.host:ce.parentNode}return!1})(Yt))return;const Oe=(Me=>{const ce=window.getComputedStyle(Me);return{top:parseFloat(ce.scrollMarginTop)||0,right:parseFloat(ce.scrollMarginRight)||0,bottom:parseFloat(ce.scrollMarginBottom)||0,left:parseFloat(ce.scrollMarginLeft)||0}})(Yt);if((Me=>typeof Me=="object"&&typeof Me.behavior=="function")(Nt))return Nt.behavior(Gt(Yt,Nt));const jt=typeof Nt=="boolean"||Nt==null?void 0:Nt.behavior;for(const{el:Me,top:ce,left:ee}of Gt(Yt,Vt(Nt))){const Kt=ce-Oe.top+Oe.bottom,Ht=ee-Oe.left+Oe.right;Me.scroll({top:Kt,left:Ht,behavior:jt})}}}}]);
|
|
|
}()); |