@univerjs-pro/boards-mind-ui 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +1 -1
  10. package/lib/cjs/locale/it-IT.js +1 -1
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +1 -1
  14. package/lib/cjs/locale/pt-BR.js +1 -1
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -1
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/locale/ar-SA.js +1 -1
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -1
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +1 -1
  30. package/lib/es/locale/it-IT.js +1 -1
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +1 -1
  34. package/lib/es/locale/pt-BR.js +1 -1
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +1 -1
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.css +51 -25
  42. package/lib/index.js +1 -1
  43. package/lib/locale/ar-SA.js +1 -1
  44. package/lib/locale/ca-ES.js +1 -1
  45. package/lib/locale/de-DE.js +1 -1
  46. package/lib/locale/en-US.js +1 -1
  47. package/lib/locale/es-ES.js +1 -1
  48. package/lib/locale/fa-IR.js +1 -1
  49. package/lib/locale/fr-FR.js +1 -1
  50. package/lib/locale/id-ID.js +1 -1
  51. package/lib/locale/it-IT.js +1 -1
  52. package/lib/locale/ja-JP.js +1 -1
  53. package/lib/locale/ko-KR.js +1 -1
  54. package/lib/locale/pl-PL.js +1 -1
  55. package/lib/locale/pt-BR.js +1 -1
  56. package/lib/locale/ru-RU.js +1 -1
  57. package/lib/locale/sk-SK.js +1 -1
  58. package/lib/locale/vi-VN.js +1 -1
  59. package/lib/locale/zh-CN.js +1 -1
  60. package/lib/locale/zh-HK.js +1 -1
  61. package/lib/locale/zh-TW.js +1 -1
  62. package/lib/types/views/BoardMindMapFloatingToolbar.d.ts +2 -3
  63. package/lib/umd/index.js +1 -1
  64. package/lib/umd/locale/ar-SA.js +1 -1
  65. package/lib/umd/locale/ca-ES.js +1 -1
  66. package/lib/umd/locale/de-DE.js +1 -1
  67. package/lib/umd/locale/en-US.js +1 -1
  68. package/lib/umd/locale/es-ES.js +1 -1
  69. package/lib/umd/locale/fa-IR.js +1 -1
  70. package/lib/umd/locale/fr-FR.js +1 -1
  71. package/lib/umd/locale/id-ID.js +1 -1
  72. package/lib/umd/locale/it-IT.js +1 -1
  73. package/lib/umd/locale/ja-JP.js +1 -1
  74. package/lib/umd/locale/ko-KR.js +1 -1
  75. package/lib/umd/locale/pl-PL.js +1 -1
  76. package/lib/umd/locale/pt-BR.js +1 -1
  77. package/lib/umd/locale/ru-RU.js +1 -1
  78. package/lib/umd/locale/sk-SK.js +1 -1
  79. package/lib/umd/locale/vi-VN.js +1 -1
  80. package/lib/umd/locale/zh-CN.js +1 -1
  81. package/lib/umd/locale/zh-HK.js +1 -1
  82. package/lib/umd/locale/zh-TW.js +1 -1
  83. package/package.json +16 -15
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x18b7a6=_0x4d64;(function(_0x3b5278,_0x2ee37c){const _0x22b31a=_0x4d64,_0x6b0c31=_0x3b5278();while(!![]){try{const _0x4e7108=-parseInt(_0x22b31a(0x394))/0x1+parseInt(_0x22b31a(0x28e))/0x2*(parseInt(_0x22b31a(0x359))/0x3)+parseInt(_0x22b31a(0x3bb))/0x4*(-parseInt(_0x22b31a(0x2bd))/0x5)+-parseInt(_0x22b31a(0x1ac))/0x6+-parseInt(_0x22b31a(0x42c))/0x7*(-parseInt(_0x22b31a(0x143))/0x8)+parseInt(_0x22b31a(0x477))/0x9+parseInt(_0x22b31a(0x174))/0xa;if(_0x4e7108===_0x2ee37c)break;else _0x6b0c31['push'](_0x6b0c31['shift']());}catch(_0x2b348b){_0x6b0c31['push'](_0x6b0c31['shift']());}}}(_0x6e6a,0x6f3b9),Object[_0x18b7a6(0x4a0)](exports,Symbol[_0x18b7a6(0x2b5)],{'value':'Module'}));let e=require('@univerjs-pro/boards'),t=require('@univerjs-pro/boards-mind'),n=require('@univerjs-pro/boards-ui'),r=require('@univerjs-pro/license'),i=require('@univerjs/core'),a=require('@univerjs/engine-render'),o=require('rxjs'),s=require('@univerjs/ui'),c=require('@univerjs-pro/shape-editor-ui'),l=require('@univerjs-pro/engine-shape'),u=require('@univerjs/design'),d=require('@univerjs/icons'),f=require('react'),p=require('react/jsx-runtime');var m='@univerjs-pro/boards-mind-ui',h=_0x18b7a6(0x31a);const g=_0x18b7a6(0x1f2),_={};function v(_0xe338c9){'@babel/helpers - typeof';const _0x1b0ce8=_0x18b7a6;return v=typeof Symbol==_0x1b0ce8(0x144)&&typeof Symbol[_0x1b0ce8(0x1ce)]==_0x1b0ce8(0x49b)?function(_0x1f1238){return typeof _0x1f1238;}:function(_0x47e98e){const _0x535853=_0x1b0ce8;return _0x47e98e&&typeof Symbol==_0x535853(0x144)&&_0x47e98e[_0x535853(0x179)]===Symbol&&_0x47e98e!==Symbol[_0x535853(0x3f7)]?'symbol':typeof _0x47e98e;},v(_0xe338c9);}function y(_0x1ee466,_0x267777){const _0x529599=_0x18b7a6;if(v(_0x1ee466)!=_0x529599(0x401)||!_0x1ee466)return _0x1ee466;var _0x415826;if(typeof Symbol<'u'&&(_0x415826=_0x1ee466[Symbol['toPrimitive']])!==void 0x0){var _0x5b5711=_0x415826[_0x529599(0x239)](_0x1ee466,_0x267777||_0x529599(0x4ce));if(v(_0x5b5711)!=_0x529599(0x401))return _0x5b5711;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x267777===_0x529599(0x3d3)?String:Number)(_0x1ee466);}function b(_0x566f2e){const _0x5bbbcb=_0x18b7a6;var _0x4bf1f9=y(_0x566f2e,_0x5bbbcb(0x3d3));return v(_0x4bf1f9)==_0x5bbbcb(0x49b)?_0x4bf1f9:_0x4bf1f9+'';}function x(_0x1e28f6,_0x501cf4,_0x300036){const _0x29473c=_0x18b7a6;return(_0x501cf4=b(_0x501cf4))in _0x1e28f6?Object[_0x29473c(0x4a0)](_0x1e28f6,_0x501cf4,{'value':_0x300036,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e28f6[_0x501cf4]=_0x300036,_0x1e28f6;}function S(_0x5a6dd5,_0x3cb99b){return function(_0x1f22ec,_0x37486c){_0x3cb99b(_0x1f22ec,_0x37486c,_0x5a6dd5);};}function C(_0x1c8746,_0x3bf65c,_0x5ae415,_0x56d505){const _0x14bf32=_0x18b7a6;var _0xc1856=arguments[_0x14bf32(0x2e5)],_0x3b4d0e=_0xc1856<0x3?_0x3bf65c:_0x56d505===null?_0x56d505=Object['getOwnPropertyDescriptor'](_0x3bf65c,_0x5ae415):_0x56d505,_0x47847b;if(typeof Reflect==_0x14bf32(0x401)&&typeof Reflect[_0x14bf32(0x28c)]==_0x14bf32(0x144))_0x3b4d0e=Reflect[_0x14bf32(0x28c)](_0x1c8746,_0x3bf65c,_0x5ae415,_0x56d505);else{for(var _0x47371c=_0x1c8746[_0x14bf32(0x2e5)]-0x1;_0x47371c>=0x0;_0x47371c--)(_0x47847b=_0x1c8746[_0x47371c])&&(_0x3b4d0e=(_0xc1856<0x3?_0x47847b(_0x3b4d0e):_0xc1856>0x3?_0x47847b(_0x3bf65c,_0x5ae415,_0x3b4d0e):_0x47847b(_0x3bf65c,_0x5ae415))||_0x3b4d0e);}return _0xc1856>0x3&&_0x3b4d0e&&Object[_0x14bf32(0x4a0)](_0x3bf65c,_0x5ae415,_0x3b4d0e),_0x3b4d0e;}let w=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x4e4f08,_0x5600c2,_0x4671a5){const _0x8c97de=_0x18b7a6;super(),this[_0x8c97de(0x30b)]=_0x4e4f08,this[_0x8c97de(0x25c)]=_0x5600c2,this[_0x8c97de(0x349)]=_0x4671a5,x(this,'_nodeSizeByKey',new Map()),x(this,_0x8c97de(0x1f9),new Map()),x(this,'_layoutFlushScheduled',!0x1),this[_0x8c97de(0x250)]();}[_0x18b7a6(0x250)](){const _0x4b6181=_0x18b7a6;this[_0x4b6181(0x24b)](),this[_0x4b6181(0x460)]((0x0,i[_0x4b6181(0x191)])(this[_0x4b6181(0x25c)]['elementAdd$'][_0x4b6181(0x34b)]((0x0,o[_0x4b6181(0x4e3)])(this['dispose$']))[_0x4b6181(0x15f)](_0x890df=>{_0x890df['forEach'](_0x8e45de=>{const _0x15d5a9=_0x4d64;let _0x59691d=this[_0x15d5a9(0x25c)]['getElementById'](_0x8e45de['unitId'],_0x8e45de[_0x15d5a9(0x159)],_0x8e45de[_0x15d5a9(0x194)]);this[_0x15d5a9(0x3fc)](_0x8e45de,_0x59691d);});}))),this[_0x4b6181(0x460)]((0x0,i['toDisposable'])(this['_boardElementService']['elementUpdate$'][_0x4b6181(0x34b)]((0x0,o['takeUntil'])(this[_0x4b6181(0x26f)]))['subscribe'](_0x4af61d=>{const _0x8ed6f6=_0x4b6181;_0x4af61d[_0x8ed6f6(0x137)](_0x1452e9=>this[_0x8ed6f6(0x454)](_0x1452e9));})));}[_0x18b7a6(0x24b)](){const _0x2a9df2=_0x18b7a6;let _0xcddd73=this[_0x2a9df2(0x30b)][_0x2a9df2(0x4bd)],_0x10bb1b=this[_0x2a9df2(0x25c)][_0x2a9df2(0x23b)](_0xcddd73);Object[_0x2a9df2(0x1ed)](_0x10bb1b)[_0x2a9df2(0x137)](([_0x4e3a8c,_0x5993f1])=>{const _0xef0dd5=_0x2a9df2;Object['values'](_0x5993f1[_0xef0dd5(0x3eb)])[_0xef0dd5(0x137)](_0x226b5c=>{const _0x2b2bfd=_0xef0dd5;this[_0x2b2bfd(0x3fc)]({'unitId':_0xcddd73,'subUnitId':_0x4e3a8c,'elementId':_0x226b5c[_0x2b2bfd(0x194)]},_0x226b5c);});});}[_0x18b7a6(0x454)](_0x4740de){const _0x5012c4=_0x18b7a6;if(_0x4740de['unitId']!==this[_0x5012c4(0x30b)][_0x5012c4(0x4bd)])return;let _0x5c1cbc=this[_0x5012c4(0x25c)][_0x5012c4(0x2cd)](_0x4740de[_0x5012c4(0x4bd)],_0x4740de[_0x5012c4(0x159)],_0x4740de[_0x5012c4(0x194)]),_0x469c2a=(0x0,t[_0x5012c4(0x306)])(_0x5c1cbc==null?void 0x0:_0x5c1cbc['element']),_0x1f9e7d=this['_resolveNodeSize'](_0x5c1cbc);if(!_0x469c2a||!_0x1f9e7d){this[_0x5012c4(0x46e)][_0x5012c4(0x18f)](this['_getElementKey'](_0x4740de));return;}let _0x9dc020=this[_0x5012c4(0x382)](_0x4740de),_0x270ac3=this[_0x5012c4(0x46e)][_0x5012c4(0x16a)](_0x9dc020);this[_0x5012c4(0x46e)]['set'](_0x9dc020,_0x1f9e7d),_0x270ac3&&_0x270ac3[_0x5012c4(0x3c4)]===_0x1f9e7d[_0x5012c4(0x3c4)]&&_0x270ac3[_0x5012c4(0x19a)]===_0x1f9e7d[_0x5012c4(0x19a)]||this['_queueLayout']({'unitId':_0x4740de[_0x5012c4(0x4bd)],'subUnitId':_0x4740de[_0x5012c4(0x159)],'scopeId':_0x469c2a[_0x5012c4(0x166)]});}['_rememberNodeSize'](_0x1d0f64,_0x4aaf69){const _0x6159b3=_0x18b7a6;if(_0x1d0f64[_0x6159b3(0x4bd)]!==this[_0x6159b3(0x30b)]['unitId'])return;let _0x3f15e6=(0x0,t[_0x6159b3(0x306)])(_0x4aaf69==null?void 0x0:_0x4aaf69['element']),_0x423aef=this[_0x6159b3(0x31f)](_0x4aaf69);_0x3f15e6&&_0x423aef&&this['_nodeSizeByKey'][_0x6159b3(0x270)](this[_0x6159b3(0x382)](_0x1d0f64),_0x423aef);}['_resolveNodeSize'](_0xad8454){const _0x31054b=_0x18b7a6;let _0x287ae2=(_0xad8454==null?void 0x0:_0xad8454['transform'])??(_0xad8454==null?void 0x0:_0xad8454['element'][_0x31054b(0x461)]),_0x33263b=_0x287ae2==null?void 0x0:_0x287ae2[_0x31054b(0x3c4)],_0x2119aa=_0x287ae2==null?void 0x0:_0x287ae2[_0x31054b(0x19a)];return!Number['isFinite'](_0x33263b)||!Number[_0x31054b(0x134)](_0x2119aa)?null:{'width':_0x33263b,'height':_0x2119aa};}[_0x18b7a6(0x427)](_0x4deea9){const _0x19e60d=_0x18b7a6;this[_0x19e60d(0x1f9)][_0x19e60d(0x270)](_0x4deea9[_0x19e60d(0x4bd)]+':'+_0x4deea9['subUnitId']+':'+_0x4deea9[_0x19e60d(0x17c)],_0x4deea9),this[_0x19e60d(0x49c)]||(this[_0x19e60d(0x49c)]=!0x0,Promise[_0x19e60d(0x398)]()['then'](()=>{const _0x175ded=_0x19e60d;this[_0x175ded(0x49c)]=!0x1;let _0x47820e=Array[_0x175ded(0x1b8)](this[_0x175ded(0x1f9)][_0x175ded(0x1a5)]());this['_queuedLayouts'][_0x175ded(0x287)](),_0x47820e[_0x175ded(0x137)](_0x3e32a3=>{const _0x32d6e6=_0x175ded;this[_0x32d6e6(0x1e8)](_0x3e32a3);});}));}[_0x18b7a6(0x1e8)](_0x3eea3b){const _0x18f77c=_0x18b7a6;var _0x53b869;let _0x104e6d=this['_boardElementService']['getElementById'](_0x3eea3b[_0x18f77c(0x4bd)],_0x3eea3b['subUnitId'],_0x3eea3b['scopeId']),_0x5c9072=(_0x53b869=(0x0,t['getMindMapContainerMeta'])(_0x104e6d==null?void 0x0:_0x104e6d[_0x18f77c(0x27d)]))==null?void 0x0:_0x53b869[_0x18f77c(0x1cb)];this[_0x18f77c(0x349)][_0x18f77c(0x486)](t['LayoutMindMapOperation']['id'],{..._0x3eea3b,'skipUndo':!0x0,..._0x5c9072?{'anchorNodeId':_0x5c9072}:null});}[_0x18b7a6(0x382)](_0x21c5d6){const _0x597b11=_0x18b7a6;return _0x21c5d6[_0x597b11(0x4bd)]+':'+_0x21c5d6[_0x597b11(0x159)]+':'+_0x21c5d6[_0x597b11(0x194)];}};w=C([S(0x1,(0x0,i[_0x18b7a6(0x46d)])(e[_0x18b7a6(0x2a9)])),S(0x2,i[_0x18b7a6(0x496)])],w);const T={'primaryColor':c[_0x18b7a6(0x348)],'surfaceColor':c['SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_BACKGROUND_COLOR'],'textColor':c['SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR'],'fontFamily':i[_0x18b7a6(0x44b)]['ff']};function E(_0x46f1a5,_0x3087a4){const _0x1a6eac=_0x18b7a6;let _0x3b3475=Math[_0x1a6eac(0x338)](0x1,Math['max'](0x0,Number[_0x1a6eac(0x134)](_0x3087a4)?_0x3087a4:0x1)),_0x29e8a5=_0x46f1a5[_0x1a6eac(0x13c)](),_0x534230=/^#([0-9a-fA-F]{6})$/[_0x1a6eac(0x362)](_0x29e8a5);if(!_0x534230)return _0x46f1a5;let _0x2e8193=_0x534230[0x1];return _0x1a6eac(0x41f)+Number['parseInt'](_0x2e8193[_0x1a6eac(0x157)](0x0,0x2),0x10)+',\x20'+Number[_0x1a6eac(0x288)](_0x2e8193[_0x1a6eac(0x157)](0x2,0x4),0x10)+',\x20'+Number[_0x1a6eac(0x288)](_0x2e8193[_0x1a6eac(0x157)](0x4,0x6),0x10)+',\x20'+_0x3b3475+')';}const D={'primaryColor':T[_0x18b7a6(0x43a)],'ghostFillColor':E(T['surfaceColor'],0.72),'ghostTextColor':E(T[_0x18b7a6(0x498)],0.62),'rootTextColor':E(T[_0x18b7a6(0x16e)],0.86),'sourceHighlightFillColor':E(T[_0x18b7a6(0x43a)],0.12),'sourceHighlightStrokeColor':E(T[_0x18b7a6(0x43a)],0.9),'objectAlpha':0.72,'dragObjectAlpha':0.78,'connectorAlpha':0.64,'lineWidthScreen':0x2,'fallbackNodeWidth':t[_0x18b7a6(0x4c9)][_0x18b7a6(0x48e)],'fallbackNodeHeight':t[_0x18b7a6(0x4c9)][_0x18b7a6(0x18a)],'branchGap':t[_0x18b7a6(0x455)][_0x18b7a6(0x34c)],'sourceHaloScreen':0x4,'ghostRadius':0x8,'rootRadius':0xa,'fontFamily':T[_0x18b7a6(0x40d)],'ghostFontWeight':0x1f4,'rootFontWeight':0x258,'rootFontSize':0x12,'textPaddingScreen':0xc,'dirtyPaddingScreen':0x18,'sourceDashScreen':[0x6,0x4]};function O(_0x5890ce,_0xae9186,_0x3a393c,_0x1a164f,_0x1532da,_0x4f00ed){const _0x554793=_0x18b7a6;let _0x938b3e=Math[_0x554793(0x338)](_0x4f00ed,_0x1a164f/0x2,_0x1532da/0x2);_0x5890ce[_0x554793(0x42a)](),_0x5890ce['moveTo'](_0xae9186+_0x938b3e,_0x3a393c),_0x5890ce[_0x554793(0x2c6)](_0xae9186+_0x1a164f-_0x938b3e,_0x3a393c),_0x5890ce[_0x554793(0x286)](_0xae9186+_0x1a164f,_0x3a393c,_0xae9186+_0x1a164f,_0x3a393c+_0x938b3e),_0x5890ce[_0x554793(0x2c6)](_0xae9186+_0x1a164f,_0x3a393c+_0x1532da-_0x938b3e),_0x5890ce[_0x554793(0x286)](_0xae9186+_0x1a164f,_0x3a393c+_0x1532da,_0xae9186+_0x1a164f-_0x938b3e,_0x3a393c+_0x1532da),_0x5890ce[_0x554793(0x2c6)](_0xae9186+_0x938b3e,_0x3a393c+_0x1532da),_0x5890ce[_0x554793(0x286)](_0xae9186,_0x3a393c+_0x1532da,_0xae9186,_0x3a393c+_0x1532da-_0x938b3e),_0x5890ce['lineTo'](_0xae9186,_0x3a393c+_0x938b3e),_0x5890ce[_0x554793(0x286)](_0xae9186,_0x3a393c,_0xae9186+_0x938b3e,_0x3a393c),_0x5890ce[_0x554793(0x47f)]();}function k(_0x848a6,_0x3535a2,_0x12dfc0){const _0x21cf29=_0x18b7a6;return _0x848a6+'\x20'+_0x3535a2/_0x12dfc0+_0x21cf29(0x3f3)+D['fontFamily'];}const A=_0x18b7a6(0x200),j=n[_0x18b7a6(0x4e4)][_0x18b7a6(0x25f)];function M(_0x15209c,_0x169f51){const _0x65b91f=_0x18b7a6;return Number[_0x65b91f(0x134)](_0x15209c)?_0x15209c:_0x169f51;}function N(){const _0x29fa75=_0x18b7a6;return D[_0x29fa75(0x379)];}function P(){const _0x3c3493=_0x18b7a6;return D[_0x3c3493(0x38b)];}function F(_0x821443){const _0x492f9e=_0x18b7a6;return _0x821443===0x1?_0x492f9e(0x3b5):_0x821443===0x3?'right':_0x492f9e(0x280);}function ee(_0x1766b4,_0x5237f8,_0x3cdc48,_0xfcae8c){return _0x3cdc48===0x1?_0x1766b4+_0xfcae8c:_0x3cdc48===0x3?_0x1766b4+_0x5237f8-_0xfcae8c:_0x1766b4+_0x5237f8/0x2;}function _0x6e6a(){const _0x3ea547=['_attachActivePointerDragListeners','_rememberNodeSize','_getRenderModules','rootFontSize','_attachObjectEvents','_getZoomRatio','object','connectors','enabled','univer-w-24','_syncDragPreview','ShapeLineDashEnum','mind-map-font-size','_localeService','boards-mind-ui.panel.tab.importExport','_getSelectedMindMapContext','notify','_undoRedoGroupService','fontFamily','_attachObjectPointerScheduled','ArrowRight','addSiblingNode','univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-xs\x20univer-text-gray-600','ShapeFloatingToolbarIcon','_createKeyboardShortcutOperation','diffValue','focusUnit','IUniverInstanceService','activeEditingId','addChildRadius','collapse-all','_resolvePreviewTextStyle','fontSize','board.mind-map.description-dialog','boards-mind-ui.panel.tab.layout','_activePreview','rgba(','univer-text-xs\x20univer-text-gray-400\x20dark:!univer-text-gray-500','style','push','sourceBounds','flatMap','routePoints','lineWidth','_queueLayout','_createShortcutItems','_boardTextEditingService','beginPath','BOARD_SHORTCUT_BINDINGS','1687zQvZWM','M16\x2029h18c7\x200\x2010-5\x2010-12v-3M34\x2029h10c7\x200\x2010\x205\x2010\x2012v3','univer-min-w-0\x20univer-whitespace-normal\x20univer-px-2','createControl$','boards-mind-ui.panel.branchLineType.orthogonal','buttons','boards-mind-ui.panel.emptyNodes','PasteMindMapAsNewMindMapOperation','objects','glyphSize','title','_toFiniteBounds','_state','ghostRadius','primaryColor','number','toLowerCase','BOARD_RENDER_OBJECT_Z_INDEX','ARROW_DOWN','parentNodeId','ArrowDown','TypographyPanelButton','state$','gap','setContextValue','CommandType','textEditingService','rootHeight','_applyScopeTranslation','boards-mind-ui.panel.nodeStyle.fontFamily','bold','DEFAULT_STYLES','scaleX','useState','_mindMapClipboardService','branch-curve','_instanceService','uiStateService','TRUE','scope','_handleElementUpdate','MIND_MAP_DEFAULT_LAYOUT','boards-mind-ui.panel.layout.both','localeCompare','getHitControl','univer-mb-3\x20univer-w-full','_componentManager','ChangeMindMapBranchLineTypeOperation','IBoardMindMapAdapterService','commandService','fonts$','_getBoardPointFromEvent','disposeWithMe','transform','MoreHorizontalIcon','move','type','useDependency','_ensurePreviewObject','item','IBoardUIStateService','M15\x2031h50M35\x2031V18c0-4\x203-7\x208-7h9M35\x2031v13c0\x204\x203\x207\x208\x207h9','_resolveControlBounds','add-child','shapeData','Inject','_nodeSizeByKey','BoardShapeIntrinsicSizeService','_isChildDragPastActivationThreshold','children','_childDragSelectionHidden','_object','curveData','bezierCurveTo','unit','2839158QOcMBn','paste-as-new','dropdown','blueprint','globalAlpha','onPointerUp$','univer-min-w-0\x20univer-flex-1\x20univer-justify-start\x20univer-truncate\x20univer-text-left','UniverBoardsMindMobileUIPlugin','closePath','collapsedDescendantCount','_captureDragStart','useEffect','_config','_resolveSelectedMindMapEntryFromState','timeline-vertical','executeCommand','ToggleMindMapNodeCollapseOperation','dataModel','addEventListener','LocaleService','registerProvider','after','show','nodeWidth','dataTransfer','_createTopologyBoundsByElementId','univer-grid\x20univer-h-14\x20univer-overflow-hidden\x20univer-rounded-xl\x20univer-bg-gray-100\x20univer-p-1','univer-mb-3\x20univer-text-sm\x20univer-font-semibold\x20univer-text-gray-900\x20dark:!univer-text-gray-100','arrow-up','Enter','transientPreviewForeground','ICommandService','verticalAlign','textColor','point','command','symbol','_layoutFlushScheduled','_removeDragPreviewObject','univer-size-full\x20univer-bg-gray-0\x20univer-text-sm\x20univer-text-gray-700\x20dark:!univer-bg-gray-900\x20dark:!univer-text-gray-200','fontColor','defineProperty','interactionMode','none','getShortcutDisplay','BACKSPACE','attachPopupToObject','open','_syncLayoutPreview','getBoundingClientRect','both','DeviceType','asObservable','_executeAndLayout','_removeObject','_intrinsicSizeService','_resolveDirtyBounds','focus','doc','nodeId','_childDragActivated','value','RIGHT','1.8','boards-mind-ui.toolbar.action.','zoomRatio','placement','boards-mind-ui.alignCenter','univer-mb-2\x20univer-text-lg\x20univer-text-gray-900','_deleteSelectedNode','unitId','getObjectIncludeInGroup','dashType','parentBounds','ReparentMindMapNodeOperation','complete','radius','MetaKeys','UniverBoardsPlugin','_dragStart','branch-rounded-orthogonal','getState','MIND_MAP_DEFAULT_NODE_SIZE','_showPopupForSelection','_activeScopeId','circle','structure','default','activated$','univer-space-y-3','currentTarget','labelKey','setActiveTool','dirtyPaddingScreen','reparent','primary','timeline-horizontal','univer-text-sm\x20univer-font-medium\x20univer-text-gray-900\x20dark:!univer-text-gray-0','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-4','boards-mind-ui.toolbar.action.stroke','boards-mind-ui.panel.spacing.siblingGap','save','_findChildNodeAtPoint','_popupSelectionKey','_preview','univer-h-7\x20univer-min-w-9\x20univer-w-auto\x20univer-gap-1\x20univer-px-1.5','textBaseline','sort','takeUntil','BOARD_RENDER_LAYER_INDEX','boards-mind-ui.toolbar.action.copy','useReducer','_consumeControlEvent','nodes','_getPointFromEvent','kind','ISidebarService','AlignBottomIcon','importExport','with','orderKey','ghostTextColor','_consumePointerEvent','isRoot','_isActive','rgb','Segmented','isFinite','mind-map-fill','UpdateMindMapNodeOperation','forEach','getSnapshot','referenceNodeId','_syncContext','hoveredControl','trim','Timeline','_getSceneObject','_disposed','Escape','boards-mind-ui.alignBottom','isTransforming','21008nWDikM','function','dot','_createQuoteShortcut','DeleteMindMapNodeOperation','getTouchHitDistance','BoardCanvasPopManagerService','_applyDragTopologyAction','size','M22\x208h36M22\x2048h36M14\x2018v20M66\x2018v20','custom','open-description','childNodeId','M56\x2012v32M56\x2019c0\x204-3\x206-7\x206h-7M56\x2029c0\x204-3\x206-7\x206h-7M56\x2039c0\x204-3\x206-7\x206h-7','registerRuntimeScopedDependencies','UniverInstanceType','hostSize','setHoveredControl','MobileShapeMenu','boards-mind-ui.panel.cancel','slice','orthogonal','subUnitId','connectorData','univer-flex\x20univer-justify-end\x20univer-gap-2','font','skipNextObservers','has','subscribe','M21\x2028h38M40\x2011v34M28\x2016c7\x204\x2010\x208\x2012\x2012\x202-4\x205-8\x2012-12M28\x2040c7-4\x2010-8\x2012-12\x202\x204\x205\x208\x2012\x2012','tree-diagram','params','boards-mind-ui.alignMiddle','abs','button','structureScopeId','refresh$','_isControlEvent','siblingGap','get','setPendingInsert','MIND_MAP_DEFAULT_NODE_TEXT','add-child-right','surfaceColor','toggle-collapse','Plugin','univer-text-gray-500','moveTo','boards-mind-ui.alignTop','404380YLIqqq','onPointerCancel$','documentStyle','stroke','more','constructor','clearSelection','addDescription','scopeId','writeText','_syncRootScopePreview','ComponentManager','_sidebarDisposable','right','univer-h-9\x20univer-w-12','rootRadius','transientControl','univer-flex-1','ShapeFloatingToolbarFontSizeSelect','lineJoin','editingParams$','Solid','nodeHeight','_pasteUnderSelectedNode','univer-size-5','setConfig','ghostFillColor','delete','getPayload','toDisposable','strokeWidth','DependentOn','elementId','getMindMapContainerMeta','text/plain','onChange','InsertBoardMindMapOperation','boards-mind-ui.panel.branchLineType.roundedOrthogonal','height','_refresh$','addSibling','_resolveCreateChildSide','scene','_previewObject','direction','M12\x2015h9M12\x2028h9M12\x2041h9M59\x2015h9M59\x2028h9M59\x2041h9','clientY','SquareDot','boards-mind-ui.toolbar.primary.typography','values','handleShortcut','dispose','Button','items','_textEditingService','hide','3360900CEMILF','ShapeFillButton','targetNodeId','ShapeDefaultConfig','_updateHostSize','rootWidth','changing$','ChangeMindMapLayoutOperation','_sidebarService','_syncElementDataToScene','UndoRedoGroupService','liveRootBounds','from','_resolveHostSize','_note','RoundDot','copy','add-child-bottom','IFontService','UnderlineIcon','boards-mind-ui.panel.branchLineType.curve','boards-mind-ui.panel.structureKind.timelineHorizontal','tree-right','getUnit','Textarea','boards-mind-ui.panel.addText','_applyRootTranslation','BOARDS_UI_PLUGIN_CONFIG_KEY','pointercancel','currentColor','span','rootNodeId','viewing','_getDependencies','iterator','section','M24\x2012v32M24\x2019c0\x204\x203\x206\x207\x206h7M24\x2029c0\x204\x203\x206\x207\x206h7M24\x2039c0\x204\x203\x206\x207\x206h7','sourceHaloScreen','next','univer-w-32','_syncRootReparentPreview','ArrowLeft','depth','ShapeStrokePanelContent','titleKey','ItalicIcon','elementUpdate$','makeDirtyNoDebounce','ENTER','boards-mind-ui.alignRight','jsxs','elementData','IShortcutService','_pointerDragStart','defaultValue','elementAdd$','start','true','focusedId','changeEnd$','_executeRootAnchoredLayout','collapsed','clearControl$','typography','addChildGlyphSize','entries','M19.5\x207.5h-4.2c-1.9\x200-3.3\x201.5-3.3\x203.3','_getMindMapChildren','ghost','add-sibling-or-child','boards-mind-ui.config','boundsByElementId','0\x200\x2024\x2024','getTemplate','createMindMapElements','Subject','_boardCanvasPopManagerService','_queuedLayouts','zIndex','univer-space-y-2','middle','M4.5\x2016.5h4.2c1.9\x200\x203.3-1.5\x203.3-3.3','addParentNode','_getBlankBoardContext','board-mind-map-drag-preview-object','syncBoardElementRenderObject','pluginName','max','_syncChildDragPreviewObject','underline','_disposeActivePointerDragListeners','addChildNode','_stateService','_handlePointerDown','MIDDLE','branch-orthogonal','boards-mind-ui.toolbar.action.addSibling','univer-flex\x20univer-items-center\x20univer-gap-1\x20univer-truncate\x20univer-rounded\x20univer-py-1\x20univer-text-left\x20univer-text-gray-800','unshift','_countDescendants','_getBoardsUIConfig','textFill','boards-mind-ui.toolbar.primary.line','board.operation.mind-map.open-panel','newParentNodeId','meta','_getPointerLiveBounds','fromEntries','boards-mind-ui.panel.structureKind.treeAlternate','ignoreExternalFocusChanges','oldShapeText','getAncestorScale','resolveBoardFloatingToolbarSelection','_syncChildDragPreview','effectAllowed','panel','getContextValue','BoardElementType','setTemplate','renderContext','evented','boards-mind-ui.panel.exportOPML','controls','_isPointInBounds','restore','_subscribeElementDataChanges','_removePreviewObject','_restoreActivePreview','boards-mind-ui.panel.nodeStyle.','getSelectedObjectMap','_cancelPointerChildDrag','VerticalAlign','univer-bg-[#e8eefc]\x20univer-text-[#2f6fed]\x20hover:univer-bg-[#e8eefc]','ghostBounds','_handlePointerMove','connector','horizontalAlign','AlignTextBothIcon','_clearPopupIfSelectionChanged','_capturePointerChildDragStart','getInjector','call','_syncControls','getElementDataForUnit','StrikethroughIcon','FOCUSING_MIND_MAP_TEXT_EDITOR','board.operation.mind-map.keyboard-shortcut','_lastChildDragAction','layout','IMindMapClipboardService','TextFillButton','ShapeFloatingToolbarMenuPanel','textPaddingScreen','setData','LayoutMindMapOperation','clientX','badgeCount','shapeId','DisposableCollection','_seedExistingNodeSizes','registerRenderModule','engine','#d8dce3','boards-mind-ui.panel.pasteOPML','_init','_normalizeChildren','color','Tools','UniverRenderEnginePlugin','offsetY','_uiStateService','top','beginMindMapMode','navigator','viewportPanOffset','offsetX','_boardElementService','elementStateService','BoardInteractionSurfaceService','preview','pathLst','snapDistance','getRootTopLeft','M12\x2026h11M58\x2036h11M12\x2045h11','_restoreObjectToDragStart','univer-flex\x20univer-flex-col\x20univer-gap-1','canvas','fillStyle','_scheduleAttachObjectPointerListeners','boards-mind-ui.panel.structureKind.treeRight','getScene','strokeStyle','_addChild','_syncPointerChildDragPreview','elementService','dispose$','set','_resolvePreviewSourceBounds','_executeChildDragAction','allowRootReparent','isInteractionSurfaceActive','Separator','LEFT','_enableMindMapToolbarTool','root','pointermove','_registerComponents','mind-map-layout-dropdown','lineCap','element','Tree\x20diagram','orthogonalData','center','packageName','boards-mind-ui.panel.tab.','AddMindMapChildOperation','_injector','onDblclick$','quadraticCurveTo','clear','parseInt','generateRandomId','structureKind','merge','decorate','arrow-left','4718MWWEAe','_previewHostSize','getElementData','_contextService','_configService','Fragment','registerAdapter','_hideSelectionForChildDrag','subscribeEvent','_pasteAsNewMindMap','createMindMapElementsFromBlueprint','boards-mind-ui.panel.layout.left','resolveBoardElementWorldBounds','changeStart$','HorizontalAlign','_instanceSrv','selectedIds','siblingDotRadius','_elementStateService','pointerStartX','unsubscribe','badgeFontWeight','Disposable','boards-mind-ui.panel.nodeStyle.fontSize','SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR','bounds','extraProps','IBoardElementService','rootTextColor','context','VerticalCenterIcon','Select','mindmap-horizontal','onStarting','onCommandExecuted','boards-mind-ui.panel.rename','hypot','textAlign','dragObjectAlpha','toStringTag','univer-mb-0','UniverBoardsMindPlugin','repeat(','edit-text','SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID','dataArray','BaseObject','15uKexXn','getRenderUnitById','objectAlpha','bottom','add-sibling-after','UniverBoardsMindUIPlugin','ShapeFloatingToolbarContent','pointerStartY','boards-mind-ui.panel.importOPML','lineTo','_resolveSelectedEntry','boards-mind-ui.panel.spacing.branchGap','textStyle','UNIVER_BOARD','board-mind-map-description-dialog','makeDirty','getElementById','ShapeFloatingToolbarDropdownTrigger','vertical','add-sibling-before','_getLiveObjectBounds','shapeText','univer-cursor-not-allowed\x20univer-text-gray-300\x20hover:univer-bg-transparent','_drawConnectorPreview','Touch','popup','Dropdown','side','then','HorizontallyIcon','small','requestRender','_resolveChildSide','dialogService','boards-mind-ui.panel.structureKind.mindmapVertical','_ensureObject','_resolveArrowNavigationTarget','_insertMindMap','SHIFT','container','length','Input','branch','mind-map-stroke','join','_executeNodeOperation','_previewRefreshService','add-child-top','M31\x2013c9\x208\x209\x2022\x2018\x2030M49\x2013c-9\x208-9\x2022-18\x2030M31\x2013c-7\x204-9\x209-9\x2015s2\x2011\x209\x2015M49\x2013c7\x204\x209\x209\x209\x2015s-2\x2011-9\x2015','_cloneBlueprintNode','_navigateByTopology','RxDisposable','_openSelectedTextEditing','top-center','Control','updateElement','filter','line','univer-flex\x20univer-flex-col\x20univer-gap-4\x20univer-py-4','jsx','siblingGlyphSize','rootText','svg','syncExecuteCommand','M56\x2011h11M56\x2051h11','label','boards-mind-ui.toolbar.primary.fontColor','univer-grid\x20univer-w-full\x20univer-gap-2','customGeometry','setLineDash','_activePointerDragDisposables','round','UniverBoardsUIPlugin','getMindMapNodeMeta','tree-left','univer-w-full\x20univer-justify-between','paste','mind-map','_renderContext','_addSiblingOrChild','board-mind-map-node-controls-object','6\x207','clipboardService','boards-mind-ui.panel.layout.right','InputNumber','div','_executeCreateAndEdit','documentTextStyleToBoardShapeTextStyle','badgeFontSize','boards-mind-ui.description','fallbackPoint','SolidLine','glyphWidth','1.5.1','resolveMindMapBranchLineTypeForStructure','boards-mind-ui.saveDescription','_objectPointerDisposables','CopyMindMapNodeOperation','_resolveNodeSize','boards-mind-ui.panel.title','_isPopupSelectionStillActive','arrow-down','IRenderManagerService','style-divider','rounded-orthogonal','univer-h-32\x20univer-resize-none\x20univer-text-sm','connectorAffordance','hideRootControls','boards-mind-ui.toolbar.action.delete','tree-alternate','removeObjects','ArrowUp','getEditing','horizontalGap','OPERATION','updateState','foreignAttributes','BoardToolType','univer-h-28\x20univer-resize-none','onPointerDown$','points','branchLineType','_objectEventDisposables','min','_attachObjectPointerListeners','boards-mind-ui.toolbar.action.layout','univer-py-3','dash','_resolveCurrentBoardContext','register','_resetContext','getMindMapDefaultChildOrderKey','IContextService','offsetBoardConnectorGeometry','UniverLicensePlugin','path','_openDescriptionDialog','M47\x2025h13M47\x2035h13M47\x2045h13','selectElements','SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR','_commandService','sourceHighlightFillColor','pipe','branchGap','transformByState','rootFontWeight','getConfig','_dragPreviewObject','_syncPreviewObject','univer-flex\x20univer-flex-col\x20univer-gap-2','ghostFontWeight','univer-grid-cols-3','univer-min-w-0\x20univer-break-words','compareMindMapOrderKey','FOCUSING_MIND_MAP_NODE','boards-mind-ui.toolbar.panel.more','117ojoZto','toolbar','registerShortcut','M42\x2012v32M42\x2020c0\x204-3\x206-7\x206h-7M42\x2030c0\x204\x203\x206\x207\x206h7M42\x2039c0\x204-3\x206-7\x206h-7','AddMindMapSiblingOperation','removeEventListener','getTextStyle','MobileColorPresets','dropEffect','exec','setEditing','detachWhenNoSnap','univer-flex\x20univer-gap-2','univer-w-full\x20[&_button]:univer-whitespace-normal\x20[&_button]:univer-break-words\x20[&_button]:univer-px-1','localeService','_insertStateService','rootStartBounds','visible','Mind\x20map','_interactionSurfaceService','getBoardElementRenderObjectKey','getCanvasElement','preventDefault','boards-mind-ui.panel.structureKind.timelineVertical','promote','_resolveCompleteSelectedScope','_updateShapeText','board.mind-map.panel','DELETE','connectorAlpha','_lastPoint','getTransformerByCreate','fallbackNodeWidth','_clearPopup','strikethrough','_template','board.mind-map.floating-toolbar','clsx','_renderManagerService','_copySelectedNode','solid','_getElementKey','hasChildren','owner','curve','opacity','key','lineWidthScreen','routing','Shape','fallbackNodeHeight','isBoardShortcutAvailable','buildShapeTextDataUpdate','rootNode','_resolveRootChildControlSides','version','map','Injector','boards-mind-ui.alignJustify','31225UYhguI','univer-py-4','BoardTextEditingService','M20\x2025h13M20\x2035h13M20\x2045h13','resolve','univer-text-xs','add-child-left','text','clipboard','panOffset','_initEditingRestore','_ensureDragPreviewObject','ShapeFloatingToolbarMenuItem','MindMap','keys','detach','_getPointerScreenPoint','find','rootChildSides','_cloneBlueprint','UniverBoardsMobileUIPlugin','activeTool','_collapseAll','_popupDisposable','univer-w-[202px]\x20univer-rounded-xl\x20univer-border\x20univer-border-gray-200\x20univer-bg-gray-0\x20univer-px-4\x20univer-py-4\x20univer-shadow-lg','boards-mind-ui.alignLeft','description','end','onReady','before','_buildPopupSelectionKey','_provider','isMindMapPlainStructureKind','left','getObject','createRunner','_resolveChildDragTopologyAction','mindmap-vertical','tools','45044pgICYR','mindmap','univer-items-center','FOCUSING_MIND_MAP_BLANK_BOARD','IBoardElementStateService','child','some','areBoardShapeTextValuesEquivalent',',\x20minmax(0,\x201fr))','width','siblingHoverRadius','boards-mind-ui.panel.spacing.parentGap','boards-mind-ui.panel.tab.structure','ShapeLineTypeEnum','timeline','BooleanNumber','action','renderGhostNode','dividerBefore','AlignTopIcon','glyphHoverWidth','boards-mind-ui.toolbar.action.paste','MIND_MAP_LAYOUT_SPACING_LIMITS','structured','string','divider-','resolveMindMapLayoutPreview','KeyCode','univer-mb-4','deviceType','boards-mind-ui.panel.searchNodes','run','_resolveIncomingConnectorStyle','fillText','getUnitId','stopPropagation','ARROW_LEFT','getMindMapConnectorMeta','_shortcutService','univer-w-full\x20univer-text-xs','SearchIcon','isHit','univer-flex\x20univer-min-w-0\x20univer-flex-1\x20univer-gap-2','addObject','getActivePageId','_activeNodeId','fill','univer-size-6\x20univer-rounded\x20univer-border\x20univer-border-solid\x20univer-border-gray-200','data','univer-flex\x20univer-h-12\x20univer-min-w-0\x20univer-items-center\x20univer-justify-center\x20univer-rounded-lg\x20univer-border-0\x20univer-bg-transparent\x20univer-p-0\x20univer-text-gray-900\x20univer-outline-none\x20univer-transition-colors\x20hover:univer-bg-gray-0','hasCommand','italic','univer-w-full','registerCommand','add','editCurrentNode','px\x20','render','M40\x209v40M40\x2020c8\x200\x2011\x204\x2011\x2011v8M40\x2035c-8\x200-11\x204-11\x2011v4','univer-max-w-[min(760px,calc(100vw-32px))]','prototype','boards-mind-ui.panel.structureKind.mindmapHorizontal','sourceHighlightStrokeColor','scaleY'];_0x6e6a=function(){return _0x3ea547;};return _0x6e6a();}var te=class extends a['BaseObject']{constructor(_0x3f8315=A,_0x55c013){const _0x1ffbc0=_0x18b7a6;super(_0x3f8315),x(this,_0x1ffbc0(0x438),{'ghostBounds':null,'parentBounds':null,'side':_0x1ffbc0(0x181),'zoomRatio':0x1}),this['evented']=!0x1,this['zIndex']=n['BOARD_RENDER_OBJECT_Z_INDEX'][_0x1ffbc0(0x495)],this['updateState'](_0x55c013);}[_0x18b7a6(0x330)](_0x33a998){const _0x4c5bb5=_0x18b7a6;if(this[_0x4c5bb5(0x438)]={...this[_0x4c5bb5(0x438)],..._0x33a998},this[_0x4c5bb5(0x438)][_0x4c5bb5(0x231)]){let _0x3318c1=this['_resolveDirtyBounds']();this[_0x4c5bb5(0x34d)](_0x3318c1),this['show']();}else this[_0x4c5bb5(0x1ab)]();let _0x368693=this;typeof _0x368693[_0x4c5bb5(0x1db)]==_0x4c5bb5(0x144)?_0x368693[_0x4c5bb5(0x1db)](!0x0):this[_0x4c5bb5(0x2cc)](!0x0);}[_0x18b7a6(0x3e4)](_0x4b4cab){return!0x1;}[_0x18b7a6(0x3f4)](_0x32d667,_0x508a31){const _0x334751=_0x18b7a6;let _0x507c61=this['_state'][_0x334751(0x231)];if(!_0x507c61||!this['visible'])return this[_0x334751(0x2cc)](!0x1),this;let _0x2fe866=Number[_0x334751(0x134)](this[_0x334751(0x438)][_0x334751(0x4b8)])&&(this[_0x334751(0x438)][_0x334751(0x4b8)]??0x0)>0x0?this[_0x334751(0x438)][_0x334751(0x4b8)]:0x1,_0x551d00=M(_0x507c61[_0x334751(0x3b5)],0x0),_0x142d87=M(_0x507c61[_0x334751(0x257)],0x0),_0x2c1d9a=Math[_0x334751(0x203)](0x1,M(_0x507c61[_0x334751(0x3c4)],N())),_0x474e3e=Math[_0x334751(0x203)](0x1,M(_0x507c61['height'],P()));if(_0x32d667['save'](),_0x32d667[_0x334751(0x47b)]=D[_0x334751(0x2b4)],_0x32d667['lineWidth']=D[_0x334751(0x388)]/_0x2fe866,_0x32d667[_0x334751(0x26b)]=D[_0x334751(0x43a)],_0x32d667[_0x334751(0x267)]=D[_0x334751(0x18e)],this[_0x334751(0x2d4)](_0x32d667,{'left':_0x551d00,'top':_0x142d87,'width':_0x2c1d9a,'height':_0x474e3e},_0x2fe866),this['_drawSourceHighlight'](_0x32d667,_0x2fe866),this[_0x334751(0x438)][_0x334751(0x3cc)]===!0x1)return _0x32d667[_0x334751(0x228)](),this[_0x334751(0x2cc)](!0x1),this;O(_0x32d667,_0x551d00,_0x142d87,_0x2c1d9a,_0x474e3e,D[_0x334751(0x439)]),_0x32d667[_0x334751(0x3e9)](),_0x32d667['stroke']();let _0x5d6654=this['_state'][_0x334751(0x2c9)],_0x2e36ff=Number[_0x334751(0x134)](_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x41b)])&&((_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x41b)])??0x0)>0x0?_0x5d6654['fontSize']:0x10,_0x338740=D[_0x334751(0x244)]/_0x2fe866;return _0x32d667[_0x334751(0x267)]=(_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x252)])??D[_0x334751(0x4f0)],_0x32d667[_0x334751(0x15c)]=k(D[_0x334751(0x353)],_0x2e36ff,_0x2fe866),_0x32d667[_0x334751(0x2b3)]=F(_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x234)]),_0x32d667[_0x334751(0x4e1)]=_0x334751(0x1fc),_0x32d667[_0x334751(0x3dc)]((_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x39b)])||t[_0x334751(0x16c)],ee(_0x551d00,_0x2c1d9a,_0x5d6654==null?void 0x0:_0x5d6654[_0x334751(0x234)],_0x338740),_0x142d87+_0x474e3e/0x2,Math['max'](0x1,_0x2c1d9a-_0x338740*0x2)),_0x32d667[_0x334751(0x228)](),this[_0x334751(0x2cc)](!0x1),this;}[_0x18b7a6(0x4af)](){const _0x52a732=_0x18b7a6;let _0x541416=this[_0x52a732(0x438)][_0x52a732(0x231)],_0xf69dcd=Number[_0x52a732(0x134)](this[_0x52a732(0x438)][_0x52a732(0x4b8)])&&(this[_0x52a732(0x438)][_0x52a732(0x4b8)]??0x0)>0x0?this['_state']['zoomRatio']:0x1,_0x453fdb=D[_0x52a732(0x4d4)]/_0xf69dcd;if(!_0x541416)return{'left':0x0,'top':0x0,'width':0x1,'height':0x1};let _0x23e4f7=M(_0x541416[_0x52a732(0x3b5)],0x0),_0xc5ed5e=M(_0x541416[_0x52a732(0x257)],0x0),_0x41beae=Math[_0x52a732(0x203)](0x1,M(_0x541416[_0x52a732(0x3c4)],N())),_0x15b12e=Math['max'](0x1,M(_0x541416['height'],P())),_0x164e7d=this[_0x52a732(0x438)][_0x52a732(0x423)],_0x3836b9=this[_0x52a732(0x438)]['parentBounds'],_0x1108f5=M(_0x164e7d==null?void 0x0:_0x164e7d[_0x52a732(0x3b5)],_0x23e4f7),_0x4831b6=M(_0x164e7d==null?void 0x0:_0x164e7d[_0x52a732(0x257)],_0xc5ed5e),_0x45a826=Math[_0x52a732(0x203)](0x1,M(_0x164e7d==null?void 0x0:_0x164e7d[_0x52a732(0x3c4)],_0x41beae)),_0x2d49cb=Math[_0x52a732(0x203)](0x1,M(_0x164e7d==null?void 0x0:_0x164e7d[_0x52a732(0x19a)],_0x15b12e));if(!_0x3836b9){let _0x3b9159=Math[_0x52a732(0x338)](_0x23e4f7,_0x1108f5)-_0x453fdb,_0x30b164=Math[_0x52a732(0x338)](_0xc5ed5e,_0x4831b6)-_0x453fdb,_0x481530=Math[_0x52a732(0x203)](_0x23e4f7+_0x41beae,_0x1108f5+_0x45a826)+_0x453fdb,_0x381693=Math[_0x52a732(0x203)](_0xc5ed5e+_0x15b12e,_0x4831b6+_0x2d49cb)+_0x453fdb;return{'left':_0x3b9159,'top':_0x30b164,'width':_0x481530-_0x3b9159,'height':_0x381693-_0x30b164};}let _0x20b74b=M(_0x3836b9[_0x52a732(0x3b5)],_0x23e4f7),_0x10f5cc=M(_0x3836b9['top'],_0xc5ed5e),_0x3ad1b7=Math[_0x52a732(0x203)](0x1,M(_0x3836b9[_0x52a732(0x3c4)],N())),_0x6acdc0=Math[_0x52a732(0x203)](0x1,M(_0x3836b9[_0x52a732(0x19a)],P())),_0x3b7b5e=Math[_0x52a732(0x338)](_0x23e4f7,_0x20b74b,_0x1108f5)-_0x453fdb,_0xabdb8f=Math[_0x52a732(0x338)](_0xc5ed5e,_0x10f5cc,_0x4831b6)-_0x453fdb,_0x15474e=Math['max'](_0x23e4f7+_0x41beae,_0x20b74b+_0x3ad1b7,_0x1108f5+_0x45a826)+_0x453fdb,_0x1a5971=Math['max'](_0xc5ed5e+_0x15b12e,_0x10f5cc+_0x6acdc0,_0x4831b6+_0x2d49cb)+_0x453fdb;return{'left':_0x3b7b5e,'top':_0xabdb8f,'width':_0x15474e-_0x3b7b5e,'height':_0x1a5971-_0xabdb8f};}['_drawSourceHighlight'](_0x2317a4,_0x242ade){const _0x5818ca=_0x18b7a6;var _0x683050;let _0x3b59cc=this[_0x5818ca(0x438)][_0x5818ca(0x423)];if(!_0x3b59cc)return;let _0x89ff0b=D[_0x5818ca(0x1d1)]/_0x242ade,_0x968fb1=M(_0x3b59cc[_0x5818ca(0x3b5)],0x0)-_0x89ff0b,_0x3f2cad=M(_0x3b59cc[_0x5818ca(0x257)],0x0)-_0x89ff0b,_0x3d9551=Math[_0x5818ca(0x203)](0x1,M(_0x3b59cc[_0x5818ca(0x3c4)],N()))+_0x89ff0b*0x2,_0xb7bb44=Math[_0x5818ca(0x203)](0x1,M(_0x3b59cc[_0x5818ca(0x19a)],P()))+_0x89ff0b*0x2;_0x2317a4[_0x5818ca(0x4dc)](),_0x2317a4[_0x5818ca(0x47b)]=0x1,_0x2317a4[_0x5818ca(0x426)]=D[_0x5818ca(0x388)]/_0x242ade,_0x2317a4[_0x5818ca(0x26b)]=D[_0x5818ca(0x3f9)],_0x2317a4[_0x5818ca(0x267)]=D[_0x5818ca(0x34a)],(_0x683050=_0x2317a4[_0x5818ca(0x302)])==null||_0x683050['call'](_0x2317a4,D['sourceDashScreen'][_0x5818ca(0x391)](_0x20d8ee=>_0x20d8ee/_0x242ade)),O(_0x2317a4,_0x968fb1,_0x3f2cad,_0x3d9551,_0xb7bb44,D['rootRadius']),_0x2317a4['fill'](),_0x2317a4['stroke'](),_0x2317a4[_0x5818ca(0x228)]();}[_0x18b7a6(0x2d4)](_0x23fb4b,_0x34831a,_0x427ddc){const _0x147a6a=_0x18b7a6;let _0x442f2c=this[_0x147a6a(0x438)][_0x147a6a(0x4c0)];if(!_0x442f2c)return;let _0x1442e3=M(_0x442f2c[_0x147a6a(0x3b5)],0x0),_0x380d86=M(_0x442f2c[_0x147a6a(0x257)],0x0),_0x4dad6b=Math[_0x147a6a(0x203)](0x1,M(_0x442f2c['width'],N())),_0x295fb0=Math[_0x147a6a(0x203)](0x1,M(_0x442f2c[_0x147a6a(0x19a)],P())),_0x52c8b3=D[_0x147a6a(0x34c)],_0x513a42=this[_0x147a6a(0x438)][_0x147a6a(0x2d8)]??'right';if(_0x23fb4b['save'](),_0x23fb4b[_0x147a6a(0x47b)]=D[_0x147a6a(0x376)],_0x23fb4b[_0x147a6a(0x26b)]=D[_0x147a6a(0x43a)],_0x23fb4b[_0x147a6a(0x426)]=D['lineWidthScreen']/_0x427ddc,_0x23fb4b[_0x147a6a(0x27c)]=_0x147a6a(0x304),_0x23fb4b[_0x147a6a(0x187)]=_0x147a6a(0x304),_0x23fb4b[_0x147a6a(0x42a)](),_0x513a42==='top'||_0x513a42===_0x147a6a(0x2c0)){let _0x3f97f1=_0x1442e3+_0x4dad6b/0x2,_0x283524=_0x34831a[_0x147a6a(0x3b5)]+_0x34831a[_0x147a6a(0x3c4)]/0x2,_0x36c1b6=_0x513a42===_0x147a6a(0x2c0)?_0x380d86+_0x295fb0:_0x380d86,_0x4d5da3=_0x513a42==='bottom'?_0x34831a[_0x147a6a(0x257)]:_0x34831a['top']+_0x34831a[_0x147a6a(0x19a)],_0x437da9=_0x513a42===_0x147a6a(0x2c0)?Math[_0x147a6a(0x338)](_0x36c1b6+_0x52c8b3,(_0x36c1b6+_0x4d5da3)/0x2):Math['max'](_0x36c1b6-_0x52c8b3,(_0x36c1b6+_0x4d5da3)/0x2);_0x23fb4b[_0x147a6a(0x172)](_0x3f97f1,_0x36c1b6),_0x23fb4b[_0x147a6a(0x2c6)](_0x3f97f1,_0x437da9),_0x23fb4b['lineTo'](_0x283524,_0x437da9),_0x23fb4b[_0x147a6a(0x2c6)](_0x283524,_0x4d5da3);}else{let _0x5c50f7=_0x380d86+_0x295fb0/0x2,_0x5d0f05=_0x34831a[_0x147a6a(0x257)]+_0x34831a['height']/0x2,_0x2ebcb6=_0x513a42===_0x147a6a(0x181)?_0x1442e3+_0x4dad6b:_0x1442e3,_0x17533b=_0x513a42===_0x147a6a(0x181)?_0x34831a['left']:_0x34831a[_0x147a6a(0x3b5)]+_0x34831a['width'],_0x44f8ff=_0x513a42===_0x147a6a(0x181)?Math['min'](_0x2ebcb6+_0x52c8b3,(_0x2ebcb6+_0x17533b)/0x2):Math[_0x147a6a(0x203)](_0x2ebcb6-_0x52c8b3,(_0x2ebcb6+_0x17533b)/0x2);_0x23fb4b[_0x147a6a(0x172)](_0x2ebcb6,_0x5c50f7),_0x23fb4b[_0x147a6a(0x2c6)](_0x44f8ff,_0x5c50f7),_0x23fb4b[_0x147a6a(0x2c6)](_0x44f8ff,_0x5d0f05),_0x23fb4b[_0x147a6a(0x2c6)](_0x17533b,_0x5d0f05);}_0x23fb4b[_0x147a6a(0x177)](),_0x23fb4b[_0x147a6a(0x228)]();}};function I(_0x191f3e,_0x580b34){const _0x1a997a=_0x18b7a6;return(_0x580b34==null?void 0x0:_0x580b34[_0x191f3e[_0x1a997a(0x194)]])??_0x191f3e[_0x1a997a(0x27d)]['transform'];}function L(_0xcc8a2a,_0xa8673e){const _0x24efec=_0x18b7a6;let _0x295036=I(_0xcc8a2a,_0xa8673e);return{'x':(_0x295036[_0x24efec(0x3b5)]??0x0)+(_0x295036[_0x24efec(0x3c4)]??0x0)/0x2,'y':(_0x295036[_0x24efec(0x257)]??0x0)+(_0x295036['height']??0x0)/0x2};}function ne(_0x5e6812,_0x2fca42){const _0x3d1b80=_0x18b7a6;return Math[_0x3d1b80(0x2b2)](_0x5e6812['x']-_0x2fca42['x'],_0x5e6812['y']-_0x2fca42['y']);}function re(_0x1aaf1b,_0x27f39a){const _0xe0cc3c=_0x18b7a6;let _0xe6666=_0x1aaf1b['left']??0x0,_0x539cb3=_0x1aaf1b['top']??0x0,_0x14daab=_0xe6666+(_0x1aaf1b['width']??0x0),_0x1b6745=_0x539cb3+(_0x1aaf1b[_0xe0cc3c(0x19a)]??0x0),_0x146dcd=_0x27f39a['left']??0x0,_0x5b33b7=_0x27f39a[_0xe0cc3c(0x257)]??0x0,_0xe47079=_0x146dcd+(_0x27f39a[_0xe0cc3c(0x3c4)]??0x0),_0x30b9e6=_0x5b33b7+(_0x27f39a['height']??0x0),_0x1aa9ca=Math['max'](_0x146dcd-_0x14daab,_0xe6666-_0xe47079,0x0),_0x37a190=Math[_0xe0cc3c(0x203)](_0x5b33b7-_0x1b6745,_0x539cb3-_0x30b9e6,0x0);return Math[_0xe0cc3c(0x2b2)](_0x1aa9ca,_0x37a190);}function ie(_0x339ce4,_0x414c8e,_0x7843c3){const _0x1ab598=_0x18b7a6;var _0x2fc48a;let _0x33bc44=(0x0,t[_0x1ab598(0x306)])((_0x2fc48a=_0x339ce4[_0x414c8e])==null?void 0x0:_0x2fc48a[_0x1ab598(0x27d)]);for(;_0x33bc44!=null&&_0x33bc44[_0x1ab598(0x43f)];){var _0x4a1039;if(_0x33bc44[_0x1ab598(0x43f)]===_0x7843c3)return!0x0;_0x33bc44=(0x0,t[_0x1ab598(0x306)])((_0x4a1039=_0x339ce4[_0x33bc44[_0x1ab598(0x43f)]])==null?void 0x0:_0x4a1039[_0x1ab598(0x27d)]);}return!0x1;}function ae(_0x272351,_0x2d63a2,_0x4c4be6){const _0x2353f7=_0x18b7a6;let _0x3d623d=I(_0x272351,_0x4c4be6),_0x310bdb=_0x3d623d['top']??0x0,_0x42e17b=_0x3d623d[_0x2353f7(0x19a)]??0x0;return _0x42e17b<=0x0?null:_0x2d63a2['y']<=_0x310bdb+_0x42e17b/0x3?'before':_0x2d63a2['y']>=_0x310bdb+_0x42e17b*0x2/0x3?_0x2353f7(0x48c):null;}function oe(_0x51e7ff,_0x17f850){const _0x1badec=_0x18b7a6;let _0x1ad7ce=_0x17f850==null?void 0x0:_0x17f850[_0x51e7ff];return Number[_0x1badec(0x134)](_0x1ad7ce==null?void 0x0:_0x1ad7ce['left'])&&Number[_0x1badec(0x134)](_0x1ad7ce==null?void 0x0:_0x1ad7ce[_0x1badec(0x257)])?{'kind':_0x1badec(0x3a3),'left':_0x1ad7ce[_0x1badec(0x3b5)],'top':_0x1ad7ce[_0x1badec(0x257)]}:{'kind':_0x1badec(0x3a3)};}function R(_0x40d941,_0x375902,_0x353716){const _0x2f1854=_0x18b7a6;let _0x177478=_0x40d941[_0x375902],_0x36124f=(0x0,t['getMindMapNodeMeta'])(_0x177478==null?void 0x0:_0x177478[_0x2f1854(0x27d)]);if(!_0x177478||!_0x36124f||!_0x36124f[_0x2f1854(0x43f)]&&!(_0x353716!=null&&_0x353716[_0x2f1854(0x273)]))return{'kind':_0x2f1854(0x4a2)};let _0x3e8d3b=_0x353716==null?void 0x0:_0x353716[_0x2f1854(0x1f3)],_0x2fcaac=I(_0x177478,_0x3e8d3b),_0x51da69=L(_0x177478,_0x3e8d3b),_0x1599e3=Object['values'](_0x40d941)[_0x2f1854(0x391)](_0x1d0791=>{const _0x3f43d1=_0x2f1854;let _0x2e3f07=(0x0,t[_0x3f43d1(0x306)])(_0x1d0791[_0x3f43d1(0x27d)]);return!_0x2e3f07||_0x1d0791[_0x3f43d1(0x194)]===_0x375902||_0x1d0791[_0x3f43d1(0x194)]===_0x36124f['parentNodeId']||_0x353716!=null&&_0x353716[_0x3f43d1(0x273)]&&!_0x36124f['parentNodeId']&&_0x2e3f07['structureScopeId']===_0x36124f['structureScopeId']||ie(_0x40d941,_0x1d0791[_0x3f43d1(0x194)],_0x375902)?null:{'item':_0x1d0791,'snapDistance':re(_0x2fcaac,I(_0x1d0791,_0x3e8d3b)),'center':L(_0x1d0791,_0x3e8d3b)};})[_0x2f1854(0x2f5)](_0x32cdf8=>!!_0x32cdf8)['sort']((_0x4a512b,_0x55dad5)=>_0x4a512b[_0x2f1854(0x261)]-_0x55dad5['snapDistance']||ne(_0x51da69,_0x4a512b['center'])-ne(_0x51da69,_0x55dad5[_0x2f1854(0x280)]))[0x0];if(_0x1599e3&&_0x1599e3[_0x2f1854(0x261)]<=0x64){let _0x52cb6a=(0x0,t[_0x2f1854(0x306)])(_0x1599e3[_0x2f1854(0x467)][_0x2f1854(0x27d)]),_0x5ea950=_0x52cb6a!=null&&_0x52cb6a[_0x2f1854(0x43f)]?ae(_0x1599e3['item'],_0x51da69,_0x3e8d3b):null;return _0x52cb6a!=null&&_0x52cb6a['parentNodeId']&&_0x5ea950?{'kind':'reparent','newParentNodeId':_0x52cb6a[_0x2f1854(0x43f)],'side':_0x52cb6a['side']??'right','referenceNodeId':_0x1599e3['item']['elementId'],'placement':_0x5ea950}:{'kind':_0x2f1854(0x4d5),'newParentNodeId':_0x1599e3['item'][_0x2f1854(0x194)],'side':_0x51da69['x']<_0x1599e3[_0x2f1854(0x280)]['x']?_0x2f1854(0x3b5):_0x2f1854(0x181)};}if(_0x353716!=null&&_0x353716[_0x2f1854(0x364)])return oe(_0x375902,_0x3e8d3b);if(!_0x36124f[_0x2f1854(0x43f)])return{'kind':_0x2f1854(0x4a2)};let _0x4d0370=_0x40d941[_0x36124f[_0x2f1854(0x43f)]];return _0x4d0370&&ne(_0x51da69,L(_0x4d0370,_0x3e8d3b))>0x230?oe(_0x375902,_0x3e8d3b):{'kind':'none'};}function se(_0x16af2b,_0x25ad0a){const _0x5544e1=_0x18b7a6;var _0x54d6fc,_0x575b93;return _0x16af2b[_0x5544e1(0x194)]===_0x25ad0a||((_0x54d6fc=(0x0,t[_0x5544e1(0x306)])(_0x16af2b['element']))==null?void 0x0:_0x54d6fc[_0x5544e1(0x166)])===_0x25ad0a||((_0x575b93=(0x0,t['getMindMapConnectorMeta'])(_0x16af2b[_0x5544e1(0x27d)]))==null?void 0x0:_0x575b93['structureScopeId'])===_0x25ad0a;}function ce(_0x2e13d2,_0x3fdd78,_0x3e84eb,_0x42bdf9){const _0x17cb81=_0x18b7a6;let _0x5e330d=_0x2e13d2[_0x3fdd78];if(!_0x5e330d)return _0x2e13d2;let _0x339596=_0x5e330d['transform']??_0x5e330d['element'][_0x17cb81(0x461)]??{};return{..._0x2e13d2,[_0x3fdd78]:{..._0x5e330d,'transform':{..._0x339596,'left':(_0x339596[_0x17cb81(0x3b5)]??0x0)+_0x3e84eb,'top':(_0x339596[_0x17cb81(0x257)]??0x0)+_0x42bdf9},'element':{..._0x5e330d['element'],'transform':{..._0x5e330d[_0x17cb81(0x27d)]['transform'],'left':(_0x5e330d[_0x17cb81(0x27d)][_0x17cb81(0x461)][_0x17cb81(0x3b5)]??0x0)+_0x3e84eb,'top':(_0x5e330d[_0x17cb81(0x27d)]['transform']['top']??0x0)+_0x42bdf9}}}};}function le(_0x314afa){const _0x228384=_0x18b7a6;if(!Number['isFinite'](_0x314afa[_0x228384(0x1b7)]['left'])||!Number[_0x228384(0x134)](_0x314afa['liveRootBounds'][_0x228384(0x257)])||!Number[_0x228384(0x134)](_0x314afa[_0x228384(0x369)][_0x228384(0x3b5)])||!Number['isFinite'](_0x314afa[_0x228384(0x369)]['top']))return null;let _0x11fd2c=_0x314afa[_0x228384(0x1b7)][_0x228384(0x3b5)]-_0x314afa[_0x228384(0x369)][_0x228384(0x3b5)],_0x5c4372=_0x314afa[_0x228384(0x1b7)][_0x228384(0x257)]-_0x314afa[_0x228384(0x369)][_0x228384(0x257)],_0x3a92fb=ce(_0x314afa[_0x228384(0x1df)],_0x314afa[_0x228384(0x17c)],_0x11fd2c,_0x5c4372),_0x4f2e82=[];return Object[_0x228384(0x1a5)](_0x3a92fb)[_0x228384(0x137)](_0x485a43=>{const _0xa730a8=_0x228384;if(_0x485a43[_0xa730a8(0x194)]===_0x314afa[_0xa730a8(0x1cb)]||_0x485a43[_0xa730a8(0x194)]===_0x314afa[_0xa730a8(0x17c)]||!se(_0x485a43,_0x314afa[_0xa730a8(0x17c)]))return;if(_0xa730a8(0x15a)in _0x485a43[_0xa730a8(0x27d)]){var _0x40a5c3;let _0x20d20b=(_0x40a5c3=_0x314afa[_0xa730a8(0x1df)][_0x485a43[_0xa730a8(0x194)]])==null?void 0x0:_0x40a5c3[_0xa730a8(0x27d)];_0x20d20b&&_0xa730a8(0x15a)in _0x20d20b&&_0x4f2e82[_0xa730a8(0x422)]({'kind':_0xa730a8(0x233),'elementId':_0x485a43['elementId'],'element':(0x0,e[_0xa730a8(0x342)])(_0x20d20b,{'x':_0x11fd2c,'y':_0x5c4372})});return;}let _0x1c47b2=(0x0,e[_0xa730a8(0x29a)])(_0x3a92fb,_0x485a43[_0xa730a8(0x194)]);_0x1c47b2&&_0x4f2e82[_0xa730a8(0x422)]({'kind':_0xa730a8(0x2a7),'elementId':_0x485a43['elementId'],'bounds':_0x1c47b2});}),{'deltaX':_0x11fd2c,'deltaY':_0x5c4372,'elementData':_0x3a92fb,'items':_0x4f2e82};}let ue=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x1d7087,_0x4c4d9b,_0x570de1,_0x41500e,_0x2395c6,_0x4d65b7,_0x5859ce){const _0x510017=_0x18b7a6;super(),this[_0x510017(0x30b)]=_0x1d7087,this['_boardElementService']=_0x4c4d9b,this['_elementStateService']=_0x570de1,this[_0x510017(0x349)]=_0x41500e,this[_0x510017(0x256)]=_0x2395c6,this['_instanceService']=_0x4d65b7,this[_0x510017(0x40c)]=_0x5859ce,x(this,'_dragStart',null),x(this,_0x510017(0x1e1),null),x(this,'_dragPreviewObject',null),x(this,_0x510017(0x4b3),!0x1),x(this,_0x510017(0x23f),null),x(this,'_objectPointerDisposables',null),x(this,'_attachObjectPointerScheduled',!0x1),x(this,_0x510017(0x303),null),x(this,'_childDragSelectionHidden',!0x1),this['_init']();}['_init'](){const _0x4595c6=_0x18b7a6;var _0x3629ce,_0x734c59,_0x171ccb,_0x5578a4,_0x573047;let _0xd0a5d9=this[_0x4595c6(0x30b)][_0x4595c6(0x19e)][_0x4595c6(0x378)]();this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(_0xd0a5d9['changeStart$'][_0x4595c6(0x34b)]((0x0,o[_0x4595c6(0x4e3)])(this[_0x4595c6(0x26f)]))[_0x4595c6(0x15f)](()=>{const _0x590a1d=_0x4595c6;this[_0x590a1d(0x481)]();}))),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(((_0x3629ce=_0xd0a5d9[_0x4595c6(0x1b2)])==null?void 0x0:_0x3629ce[_0x4595c6(0x34b)]((0x0,o['takeUntil'])(this[_0x4595c6(0x26f)]))[_0x4595c6(0x15f)](_0x3c6f4b=>{const _0x1fb339=_0x4595c6;this[_0x1fb339(0x405)](_0x3c6f4b==null?void 0x0:_0x3c6f4b[_0x1fb339(0x434)]);}))??{'dispose':()=>{}})),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(_0xd0a5d9[_0x4595c6(0x1e7)]['pipe']((0x0,o[_0x4595c6(0x4e3)])(this[_0x4595c6(0x26f)]))[_0x4595c6(0x15f)](_0x1a6d8f=>{const _0x5d36d3=_0x4595c6;setTimeout(()=>this[_0x5d36d3(0x14a)](_0x1a6d8f==null?void 0x0:_0x1a6d8f['objects']),0x0);}))),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(((_0x734c59=this[_0x4595c6(0x30b)][_0x4595c6(0x19e)][_0x4595c6(0x334)])==null?void 0x0:_0x734c59['subscribeEvent']({'priority':0x3,'next':([_0x3778a2])=>this[_0x4595c6(0x237)](_0x3778a2)}))??{'dispose':()=>{}})),this['disposeWithMe']((0x0,i[_0x4595c6(0x191)])(((_0x171ccb=this['_renderContext'][_0x4595c6(0x19e)]['onPointerMove$'])==null?void 0x0:_0x171ccb['subscribeEvent']({'priority':0x3,'next':([_0x1e433b,_0x4d2a35])=>this[_0x4595c6(0x26d)](_0x1e433b,_0x4d2a35)}))??{'dispose':()=>{}})),this['disposeWithMe']((0x0,i['toDisposable'])(((_0x5578a4=this[_0x4595c6(0x30b)][_0x4595c6(0x19e)][_0x4595c6(0x47c)])==null?void 0x0:_0x5578a4['subscribeEvent']({'priority':0x3,'next':([_0x2f4a78,_0x273f51])=>this['_applyPointerChildDrag'](_0x2f4a78,_0x273f51)}))??{'dispose':()=>{}})),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(((_0x573047=this[_0x4595c6(0x30b)][_0x4595c6(0x19e)][_0x4595c6(0x175)])==null?void 0x0:_0x573047[_0x4595c6(0x296)]({'priority':0x3,'next':([,_0x2ac57b])=>this[_0x4595c6(0x22e)](_0x2ac57b)}))??{'dispose':()=>{}})),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(()=>{const _0x509e7a=_0x4595c6;var _0x4cca11;return(_0x4cca11=this[_0x509e7a(0x31d)])==null?void 0x0:_0x4cca11[_0x509e7a(0x1a7)]();})),this['disposeWithMe']((0x0,i['toDisposable'])(()=>this[_0x4595c6(0x206)]())),this[_0x4595c6(0x229)](),this[_0x4595c6(0x268)](),this[_0x4595c6(0x460)]((0x0,i[_0x4595c6(0x191)])(()=>this[_0x4595c6(0x49d)]()));}[_0x18b7a6(0x229)](){const _0x25e874=_0x18b7a6;[this['_boardElementService'][_0x25e874(0x1e3)],this[_0x25e874(0x25c)][_0x25e874(0x1da)],this[_0x25e874(0x25c)]['elementRemove$']][_0x25e874(0x137)](_0xcc1b53=>{const _0x3d18c4=_0x25e874;this[_0x3d18c4(0x460)]((0x0,i[_0x3d18c4(0x191)])(_0xcc1b53[_0x3d18c4(0x34b)]((0x0,o[_0x3d18c4(0x4e3)])(this[_0x3d18c4(0x26f)]))[_0x3d18c4(0x15f)](()=>{const _0x11b580=_0x3d18c4;this[_0x11b580(0x268)]();})));}),this['_elementStateService'][_0x25e874(0x442)]&&this[_0x25e874(0x460)]((0x0,i[_0x25e874(0x191)])(this[_0x25e874(0x2a0)]['state$'][_0x25e874(0x34b)]((0x0,o['takeUntil'])(this[_0x25e874(0x26f)]))[_0x25e874(0x15f)](()=>{const _0x48b7bd=_0x25e874;this[_0x48b7bd(0x268)]();})));}['_scheduleAttachObjectPointerListeners'](){const _0x4e83c1=_0x18b7a6;this[_0x4e83c1(0x40e)]||(this[_0x4e83c1(0x40e)]=!0x0,Promise[_0x4e83c1(0x398)]()[_0x4e83c1(0x2d9)](()=>this[_0x4e83c1(0x339)]()));}[_0x18b7a6(0x339)](){const _0x2dc460=_0x18b7a6;var _0x515ea0;this[_0x2dc460(0x40e)]=!0x1;let _0x36b264=this[_0x2dc460(0x33d)](),_0xe9c44d=this[_0x2dc460(0x30b)][_0x2dc460(0x19e)];if(!_0x36b264||typeof _0xe9c44d['getObject']!=_0x2dc460(0x144))return;let _0xb903d4=this['_boardElementService']['getElementData'](_0x36b264['unitId'],_0x36b264[_0x2dc460(0x159)]),_0x298c55=new i['DisposableCollection']();(_0x515ea0=this[_0x2dc460(0x31d)])==null||_0x515ea0[_0x2dc460(0x1a7)](),this[_0x2dc460(0x31d)]=_0x298c55,Object[_0x2dc460(0x1a5)](_0xb903d4)[_0x2dc460(0x137)](_0x27d990=>{const _0x5e600f=_0x2dc460;var _0x229eda,_0x8fb865;let _0x1b1669=(0x0,t[_0x5e600f(0x306)])(_0x27d990[_0x5e600f(0x27d)]);if(!(_0x1b1669!=null&&_0x1b1669[_0x5e600f(0x43f)]))return;let _0x335ceb=(0x0,n[_0x5e600f(0x36d)])(_0x36b264[_0x5e600f(0x4bd)],_0x27d990['elementId']),_0x1a3c69=((_0x229eda=_0xe9c44d[_0x5e600f(0x4be)])==null?void 0x0:_0x229eda[_0x5e600f(0x239)](_0xe9c44d,_0x335ceb))??((_0x8fb865=_0xe9c44d['getObject'])==null?void 0x0:_0x8fb865[_0x5e600f(0x239)](_0xe9c44d,_0x335ceb));_0x1a3c69!=null&&_0x1a3c69[_0x5e600f(0x334)]&&_0x298c55[_0x5e600f(0x3f1)](_0x1a3c69[_0x5e600f(0x334)]['subscribeEvent']({'priority':-0xa,'next':([_0x28e5b9,_0x51e75d])=>this['_capturePointerChildDragStart'](_0x28e5b9,{'unitId':_0x36b264['unitId'],'subUnitId':_0x36b264[_0x5e600f(0x159)],'nodeId':_0x27d990[_0x5e600f(0x194)]},_0x51e75d)}));});}['_resolveCurrentBoardContext'](){const _0x299244=_0x18b7a6;let _0x811ce4=this['_elementStateService'][_0x299244(0x138)]()[_0x299244(0x2ab)];if(_0x811ce4)return _0x811ce4;let _0x5e27ea=this[_0x299244(0x30b)][_0x299244(0x4bd)],_0x354b42=_0x5e27ea?this[_0x299244(0x450)]['getUnit'](_0x5e27ea,i['UniverInstanceType'][_0x299244(0x2ca)]):null,_0x3f8200=_0x354b42==null?void 0x0:_0x354b42[_0x299244(0x3e7)]();return!_0x354b42||!_0x3f8200?null:{'unitId':_0x354b42['getUnitId'](),'subUnitId':_0x3f8200};}['_captureDragStart'](){const _0x5707a3=_0x18b7a6;let _0x44f541=this['_elementStateService'][_0x5707a3(0x138)]();this[_0x5707a3(0x4b3)]=!0x1,this[_0x5707a3(0x472)]=!0x1,this[_0x5707a3(0x23f)]=null;let _0x34283e=_0x44f541[_0x5707a3(0x2ab)],_0x6646bc=_0x44f541[_0x5707a3(0x1e6)]??_0x44f541[_0x5707a3(0x29e)][0x0];if(!_0x34283e||!_0x6646bc){this[_0x5707a3(0x4c6)]=null,this['_removeDragPreviewObject']();return;}let _0x171d72=this[_0x5707a3(0x25c)]['getElementData'](_0x34283e[_0x5707a3(0x4bd)],_0x34283e['subUnitId']);if(_0x44f541[_0x5707a3(0x29e)][_0x5707a3(0x2e5)]>0x1){let _0x2d077b=this[_0x5707a3(0x372)](_0x171d72,_0x44f541['selectedIds']);if(!_0x2d077b){this[_0x5707a3(0x4c6)]=null,this[_0x5707a3(0x49d)]();return;}let _0x4a0311=_0x171d72[_0x2d077b[_0x5707a3(0x1cb)]],_0x5e6251=(0x0,e[_0x5707a3(0x29a)])(_0x171d72,_0x2d077b[_0x5707a3(0x1cb)]),_0x56eddc=_0x4a0311['element'][_0x5707a3(0x461)];this['_dragStart']={'kind':_0x5707a3(0x453),'unitId':_0x34283e[_0x5707a3(0x4bd)],'subUnitId':_0x34283e[_0x5707a3(0x159)],'nodeId':_0x2d077b[_0x5707a3(0x1cb)],'scopeId':_0x2d077b['scopeId'],'left':(_0x5e6251==null?void 0x0:_0x5e6251[_0x5707a3(0x3b5)])??_0x56eddc[_0x5707a3(0x3b5)]??0x0,'top':(_0x5e6251==null?void 0x0:_0x5e6251[_0x5707a3(0x257)])??_0x56eddc[_0x5707a3(0x257)]??0x0,'width':(_0x5e6251==null?void 0x0:_0x5e6251[_0x5707a3(0x3c4)])??_0x56eddc[_0x5707a3(0x3c4)]??0x0,'height':(_0x5e6251==null?void 0x0:_0x5e6251[_0x5707a3(0x19a)])??_0x56eddc['height']??0x0,'elementData':_0x171d72};return;}let _0x5d49b8=_0x171d72[_0x6646bc],_0x5308ab=(0x0,t[_0x5707a3(0x306)])(_0x5d49b8==null?void 0x0:_0x5d49b8[_0x5707a3(0x27d)]);if(!_0x5d49b8||!_0x5308ab){this[_0x5707a3(0x4c6)]=null,this[_0x5707a3(0x49d)]();return;}let _0x2bdbc2=(0x0,e['resolveBoardElementWorldBounds'])(_0x171d72,_0x6646bc),_0x494c64=_0x5d49b8[_0x5707a3(0x27d)][_0x5707a3(0x461)];this['_dragStart']={'kind':_0x5308ab['parentNodeId']===null?_0x5707a3(0x278):_0x5707a3(0x3c0),'unitId':_0x34283e[_0x5707a3(0x4bd)],'subUnitId':_0x34283e['subUnitId'],'nodeId':_0x6646bc,'scopeId':_0x5308ab['structureScopeId'],'left':(_0x2bdbc2==null?void 0x0:_0x2bdbc2[_0x5707a3(0x3b5)])??_0x494c64[_0x5707a3(0x3b5)]??0x0,'top':(_0x2bdbc2==null?void 0x0:_0x2bdbc2[_0x5707a3(0x257)])??_0x494c64[_0x5707a3(0x257)]??0x0,'width':(_0x2bdbc2==null?void 0x0:_0x2bdbc2['width'])??_0x494c64['width']??0x0,'height':(_0x2bdbc2==null?void 0x0:_0x2bdbc2[_0x5707a3(0x19a)])??_0x494c64[_0x5707a3(0x19a)]??0x0,'elementData':_0x171d72};}['_resolveCompleteSelectedScope'](_0x58a02b,_0x24ca45){const _0x53b4ec=_0x18b7a6;let _0x376cb2=new Set(_0x24ca45),_0xcda37=_0x24ca45[_0x53b4ec(0x391)](_0x30edc6=>{const _0x284779=_0x53b4ec;var _0x416f42,_0x4cfb9b,_0x475ddf,_0x4a31ad;let _0x6b074d=(_0x416f42=_0x58a02b[_0x30edc6])==null?void 0x0:_0x416f42[_0x284779(0x27d)];return((_0x4cfb9b=(0x0,t[_0x284779(0x306)])(_0x6b074d))==null?void 0x0:_0x4cfb9b['structureScopeId'])??((_0x475ddf=(0x0,t[_0x284779(0x3e0)])(_0x6b074d))==null?void 0x0:_0x475ddf[_0x284779(0x166)])??((_0x4a31ad=(0x0,t['getMindMapContainerMeta'])(_0x6b074d))==null?void 0x0:_0x4a31ad['structureScopeId'])??null;});if(_0xcda37[_0x53b4ec(0x3c1)](_0x28b08a=>_0x28b08a===null)||new Set(_0xcda37)[_0x53b4ec(0x14b)]!==0x1)return null;let _0x328a54=_0xcda37[0x0];if(!_0x328a54)return null;let _0xd2b7c2=Object[_0x53b4ec(0x1a5)](_0x58a02b)[_0x53b4ec(0x2f5)](_0x541f47=>{const _0x2185b6=_0x53b4ec;var _0x1d4b4f;return _0x541f47[_0x2185b6(0x27d)][_0x2185b6(0x36a)]!==!0x1&&((_0x1d4b4f=(0x0,t[_0x2185b6(0x306)])(_0x541f47[_0x2185b6(0x27d)]))==null?void 0x0:_0x1d4b4f[_0x2185b6(0x166)])===_0x328a54;});if(_0xd2b7c2[_0x53b4ec(0x2e5)]===0x0||_0xd2b7c2[_0x53b4ec(0x3c1)](_0xc4eaf9=>!_0x376cb2[_0x53b4ec(0x15e)](_0xc4eaf9[_0x53b4ec(0x194)])))return null;let _0x530362=_0xd2b7c2['filter'](_0x8b8f4c=>{const _0x2d1ac9=_0x53b4ec;var _0x3e4051;return((_0x3e4051=(0x0,t[_0x2d1ac9(0x306)])(_0x8b8f4c[_0x2d1ac9(0x27d)]))==null?void 0x0:_0x3e4051['parentNodeId'])===null;});return _0x530362[_0x53b4ec(0x2e5)]===0x1?{'rootNodeId':_0x530362[0x0]['elementId'],'scopeId':_0x328a54}:null;}[_0x18b7a6(0x237)](_0x150128,_0x54d86e,_0x5d662a){const _0x5d600c=_0x18b7a6;var _0x2715e6,_0x1d9827,_0x6692e7,_0x551ca5,_0x417083;if(this['_uiStateService'][_0x5d600c(0x4c8)]()[_0x5d600c(0x4a1)]==='viewing'||(_0x150128[_0x5d600c(0x165)]??0x0)!==0x0)return;let _0x633b96=this[_0x5d600c(0x2a0)][_0x5d600c(0x138)]();if(_0x633b96[_0x5d600c(0x417)]){this[_0x5d600c(0x1e1)]=null;return;}let _0xcaae68=_0x54d86e?{'unitId':_0x54d86e['unitId'],'subUnitId':_0x54d86e[_0x5d600c(0x159)]}:_0x633b96[_0x5d600c(0x2ab)]??this[_0x5d600c(0x33d)](),_0xef6137=(_0x54d86e==null?void 0x0:_0x54d86e[_0x5d600c(0x4b2)])??(_0x633b96['selectedIds']['length']===0x1?_0x633b96[_0x5d600c(0x1e6)]??_0x633b96[_0x5d600c(0x29e)][0x0]:void 0x0);if(!_0xcaae68){this[_0x5d600c(0x1e1)]=null;return;}let _0x590c9e=this[_0x5d600c(0x25c)][_0x5d600c(0x290)](_0xcaae68[_0x5d600c(0x4bd)],_0xcaae68['subUnitId']),_0x3633f3=this[_0x5d600c(0x45f)](_0x150128);if(!_0x54d86e){let _0x5b7391=_0xef6137?_0x590c9e[_0xef6137]:null,_0x8210b8=(0x0,t['getMindMapNodeMeta'])(_0x5b7391==null?void 0x0:_0x5b7391[_0x5d600c(0x27d)]),_0x23a2d3=_0xef6137?(0x0,e[_0x5d600c(0x29a)])(_0x590c9e,_0xef6137)??(_0x5b7391==null?void 0x0:_0x5b7391[_0x5d600c(0x27d)]['transform']):null;_0x8210b8!=null&&_0x8210b8[_0x5d600c(0x43f)]&&_0x23a2d3&&this[_0x5d600c(0x227)](_0x3633f3,{'left':_0x23a2d3[_0x5d600c(0x3b5)]??0x0,'top':_0x23a2d3[_0x5d600c(0x257)]??0x0,'width':_0x23a2d3[_0x5d600c(0x3c4)]??0x0,'height':_0x23a2d3[_0x5d600c(0x19a)]??0x0})||(_0xef6137=this[_0x5d600c(0x4dd)](_0x590c9e,_0x3633f3));}if(!_0xef6137){this['_pointerDragStart']=null;return;}let _0x3f76a4=_0x590c9e[_0xef6137],_0x15abb8=(0x0,t[_0x5d600c(0x306)])(_0x3f76a4==null?void 0x0:_0x3f76a4[_0x5d600c(0x27d)]);if(!_0x3f76a4||!(_0x15abb8!=null&&_0x15abb8[_0x5d600c(0x43f)])){this[_0x5d600c(0x1e1)]=null;return;}this[_0x5d600c(0x450)][_0x5d600c(0x415)](_0xcaae68['unitId']),(_0x2715e6=this['_renderContext'][_0x5d600c(0x24d)])==null||(_0x1d9827=_0x2715e6[_0x5d600c(0x36e)])==null||(_0x1d9827=_0x1d9827['call'](_0x2715e6))==null||(_0x6692e7=_0x1d9827[_0x5d600c(0x4b0)])==null||_0x6692e7[_0x5d600c(0x239)](_0x1d9827,{'preventScroll':!0x0}),(_0x551ca5=(_0x417083=this[_0x5d600c(0x2a0)])[_0x5d600c(0x347)])==null||_0x551ca5['call'](_0x417083,_0xcaae68,[_0xef6137],_0xef6137),_0x5d662a==null||_0x5d662a[_0x5d600c(0x3de)]();let _0x5e101f=(0x0,e['resolveBoardElementWorldBounds'])(_0x590c9e,_0xef6137),_0x128b16=_0x3f76a4[_0x5d600c(0x27d)][_0x5d600c(0x461)],_0x4b6c65={'left':(_0x5e101f==null?void 0x0:_0x5e101f[_0x5d600c(0x3b5)])??_0x128b16['left']??0x0,'top':(_0x5e101f==null?void 0x0:_0x5e101f[_0x5d600c(0x257)])??_0x128b16['top']??0x0,'width':(_0x5e101f==null?void 0x0:_0x5e101f[_0x5d600c(0x3c4)])??_0x128b16['width']??0x0,'height':(_0x5e101f==null?void 0x0:_0x5e101f['height'])??_0x128b16['height']??0x0};if(!_0x54d86e&&!this[_0x5d600c(0x227)](_0x3633f3,_0x4b6c65)){this[_0x5d600c(0x1e1)]=null;return;}let _0x3a491e=this[_0x5d600c(0x3a4)](_0x150128);this[_0x5d600c(0x4b3)]=!0x1,this[_0x5d600c(0x472)]=!0x1,this[_0x5d600c(0x23f)]=null,this[_0x5d600c(0x1e1)]={'kind':_0x5d600c(0x3c0),'unitId':_0xcaae68[_0x5d600c(0x4bd)],'subUnitId':_0xcaae68[_0x5d600c(0x159)],'nodeId':_0xef6137,'scopeId':_0x15abb8[_0x5d600c(0x166)],..._0x4b6c65,'pointerStartX':_0x3a491e['x'],'pointerStartY':_0x3a491e['y'],'elementData':_0x590c9e},this['_attachActivePointerDragListeners'](),this['_consumePointerEvent'](_0x150128,_0x5d662a);}[_0x18b7a6(0x26d)](_0x321d2c,_0x22ca75){const _0x170378=_0x18b7a6;var _0x283dbd,_0x142883;let _0x3ba6bc=this[_0x170378(0x1e1)];if(!_0x3ba6bc||_0x321d2c[_0x170378(0x431)]!==void 0x0&&_0x321d2c[_0x170378(0x431)]!==0x1)return;let _0x553264=this[_0x170378(0x216)](_0x321d2c,_0x3ba6bc);if(!this[_0x170378(0x470)](_0x3ba6bc,_0x553264))return;this['_childDragActivated']||this[_0x170378(0x295)](),this[_0x170378(0x4b3)]=!0x0;let _0x1c7aee=this[_0x170378(0x490)](_0x3ba6bc[_0x170378(0x1df)],_0x3ba6bc[_0x170378(0x4b2)],_0x553264),_0x2ddde7=R(_0x3ba6bc[_0x170378(0x1df)],_0x3ba6bc[_0x170378(0x4b2)],{'boundsByElementId':_0x1c7aee,'detachWhenNoSnap':!0x0});this['_lastChildDragAction']=_0x2ddde7,this['_syncChildDragPreviewObject'](_0x553264,_0x2ddde7,_0x1c7aee),this['_consumePointerEvent'](_0x321d2c,_0x22ca75),this[_0x170378(0x30b)]['scene'][_0x170378(0x2cc)](!0x0),(_0x283dbd=(_0x142883=this[_0x170378(0x30b)][_0x170378(0x19e)])['requestRender'])==null||_0x283dbd[_0x170378(0x239)](_0x142883);}['_applyPointerChildDrag'](_0x185dc1,_0x286bfb){const _0x132f07=_0x18b7a6;let _0xaa4980=this[_0x132f07(0x1e1)];if(!_0xaa4980)return;if(this[_0x132f07(0x1e1)]=null,this[_0x132f07(0x206)](),this['_removeDragPreviewObject'](),!this['_childDragActivated']){this['_lastChildDragAction']=null;return;}let _0x4e826c=this[_0x132f07(0x25c)][_0x132f07(0x290)](_0xaa4980[_0x132f07(0x4bd)],_0xaa4980['subUnitId']),_0x58660a=this[_0x132f07(0x216)](_0x185dc1,_0xaa4980),_0x4ea9e6=this['_createTopologyBoundsByElementId'](_0x4e826c,_0xaa4980[_0x132f07(0x4b2)],_0x58660a),_0x1fcd3b=R(_0x4e826c,_0xaa4980[_0x132f07(0x4b2)],{'boundsByElementId':_0x4ea9e6,'detachWhenNoSnap':!0x0});this[_0x132f07(0x23f)]=null,this['_executeChildDragAction'](_0xaa4980[_0x132f07(0x4bd)],_0xaa4980[_0x132f07(0x159)],_0xaa4980['nodeId'],_0x4e826c,_0x1fcd3b),this[_0x132f07(0x472)]=!0x1,this[_0x132f07(0x4f1)](_0x185dc1,_0x286bfb);}[_0x18b7a6(0x22e)](_0x5b438e){const _0x3d7c96=_0x18b7a6;let _0x5d91f1=this[_0x3d7c96(0x1e1)];if(_0x5d91f1){if(this[_0x3d7c96(0x1e1)]=null,this[_0x3d7c96(0x206)](),this[_0x3d7c96(0x4b3)]=!0x1,this[_0x3d7c96(0x23f)]=null,this[_0x3d7c96(0x49d)](),this[_0x3d7c96(0x472)]){var _0x53a622,_0x26c9ab;(_0x53a622=(_0x26c9ab=this[_0x3d7c96(0x2a0)])[_0x3d7c96(0x347)])==null||_0x53a622[_0x3d7c96(0x239)](_0x26c9ab,{'unitId':_0x5d91f1[_0x3d7c96(0x4bd)],'subUnitId':_0x5d91f1['subUnitId']},[_0x5d91f1[_0x3d7c96(0x4b2)]],_0x5d91f1[_0x3d7c96(0x4b2)]),this[_0x3d7c96(0x472)]=!0x1;}_0x5b438e==null||_0x5b438e[_0x3d7c96(0x3de)]();}}[_0x18b7a6(0x3fb)](){const _0x446221=_0x18b7a6;this[_0x446221(0x206)]();let _0x5e86f7=typeof window>'u'?null:window;if(!(_0x5e86f7!=null&&_0x5e86f7['addEventListener']))return;let _0x4b541e=new i[(_0x446221(0x24a))](),_0x337730=_0xa9a3ad=>this[_0x446221(0x26d)](_0xa9a3ad),_0x539ed2=_0x507285=>this['_applyPointerChildDrag'](_0x507285),_0x38acf6=()=>this[_0x446221(0x22e)]();_0x5e86f7[_0x446221(0x489)](_0x446221(0x279),_0x337730,{'capture':!0x0}),_0x5e86f7[_0x446221(0x489)]('pointerup',_0x539ed2,{'capture':!0x0}),_0x5e86f7[_0x446221(0x489)]('pointercancel',_0x38acf6,{'capture':!0x0}),_0x4b541e[_0x446221(0x3f1)]((0x0,i['toDisposable'])(()=>{const _0x56beb1=_0x446221;_0x5e86f7[_0x56beb1(0x35e)](_0x56beb1(0x279),_0x337730,{'capture':!0x0}),_0x5e86f7[_0x56beb1(0x35e)]('pointerup',_0x539ed2,{'capture':!0x0}),_0x5e86f7['removeEventListener'](_0x56beb1(0x1c8),_0x38acf6,{'capture':!0x0});})),this[_0x446221(0x303)]=_0x4b541e;}[_0x18b7a6(0x4dd)](_0x18e939,_0x59df87){const _0x575ab9=_0x18b7a6;let _0x223aff=Object[_0x575ab9(0x1a5)](_0x18e939);for(let _0x436e0c=_0x223aff['length']-0x1;_0x436e0c>=0x0;--_0x436e0c){let _0x3540c6=_0x223aff[_0x436e0c],_0x345ad5=(0x0,t['getMindMapNodeMeta'])(_0x3540c6[_0x575ab9(0x27d)]);if(!(_0x345ad5!=null&&_0x345ad5['parentNodeId']))continue;let _0x2351bb=(0x0,e[_0x575ab9(0x29a)])(_0x18e939,_0x3540c6[_0x575ab9(0x194)])??_0x3540c6[_0x575ab9(0x27d)][_0x575ab9(0x461)];if(this['_isPointInBounds'](_0x59df87,{'left':_0x2351bb['left']??0x0,'top':_0x2351bb['top']??0x0,'width':_0x2351bb[_0x575ab9(0x3c4)]??0x0,'height':_0x2351bb[_0x575ab9(0x19a)]??0x0}))return _0x3540c6[_0x575ab9(0x194)];}}[_0x18b7a6(0x206)](){const _0x23962a=_0x18b7a6;var _0x52e9de;(_0x52e9de=this[_0x23962a(0x303)])==null||_0x52e9de[_0x23962a(0x1a7)](),this['_activePointerDragDisposables']=null;}[_0x18b7a6(0x405)](_0x5b2d0f){const _0x2e710b=_0x18b7a6;let _0x266c12=this['_dragStart'];_0x266c12&&((_0x266c12[_0x2e710b(0x4ea)]==='root'||_0x266c12[_0x2e710b(0x4ea)]==='scope')&&this[_0x2e710b(0x17e)](_0x5b2d0f),_0x266c12['kind']===_0x2e710b(0x278)?this[_0x2e710b(0x1d4)](_0x5b2d0f):this['_syncChildDragPreview'](_0x5b2d0f));}['_syncRootScopePreview'](_0x196e5d){const _0x42fb72=_0x18b7a6;let _0x505062=this['_dragStart'];if(!_0x505062||_0x505062[_0x42fb72(0x4ea)]!=='root'&&_0x505062[_0x42fb72(0x4ea)]!==_0x42fb72(0x453))return;let _0x15b140=_0x196e5d==null?void 0x0:_0x196e5d[_0x42fb72(0x16a)]((0x0,n[_0x42fb72(0x36d)])(_0x505062[_0x42fb72(0x4bd)],_0x505062[_0x42fb72(0x4b2)]));if(!_0x15b140||!Number['isFinite'](_0x15b140[_0x42fb72(0x3b5)])||!Number['isFinite'](_0x15b140[_0x42fb72(0x257)]))return;let _0x2c4c0f=le({'elementData':_0x505062[_0x42fb72(0x1df)],'rootNodeId':_0x505062[_0x42fb72(0x4b2)],'scopeId':_0x505062[_0x42fb72(0x17c)],'rootStartBounds':{'left':_0x505062[_0x42fb72(0x3b5)],'top':_0x505062[_0x42fb72(0x257)]},'liveRootBounds':{'left':_0x15b140['left'],'top':_0x15b140['top']}});if(!_0x2c4c0f)return;let _0x820e18=this[_0x42fb72(0x30b)]['scene'],_0x353945=_0x820e18,_0x396eaa=!0x1;_0x2c4c0f[_0x42fb72(0x1a9)]['forEach'](_0x57d4f4=>{const _0x1f34c6=_0x42fb72;var _0x47f324;let _0x44a7e4=(0x0,n[_0x1f34c6(0x36d)])(_0x505062[_0x1f34c6(0x4bd)],_0x57d4f4[_0x1f34c6(0x194)]),_0x5a2c44=((_0x47f324=_0x353945[_0x1f34c6(0x4be)])==null?void 0x0:_0x47f324[_0x1f34c6(0x239)](_0x353945,_0x44a7e4))??_0x820e18[_0x1f34c6(0x3b6)](_0x44a7e4);_0x5a2c44&&(_0x57d4f4[_0x1f34c6(0x4ea)]===_0x1f34c6(0x233)&&typeof _0x5a2c44[_0x1f34c6(0x2f4)]=='function'?(_0x5a2c44[_0x1f34c6(0x2f4)](_0x57d4f4[_0x1f34c6(0x27d)],_0x2c4c0f[_0x1f34c6(0x1df)]),_0x396eaa=!0x0):_0x57d4f4[_0x1f34c6(0x4ea)]===_0x1f34c6(0x2a7)&&(_0x5a2c44['transformByState'](_0x57d4f4[_0x1f34c6(0x2a7)]),typeof _0x5a2c44[_0x1f34c6(0x1db)]==_0x1f34c6(0x144)?_0x5a2c44[_0x1f34c6(0x1db)](!0x0):_0x5a2c44['makeDirty'](!0x0),_0x396eaa=!0x0));}),_0x396eaa&&_0x820e18[_0x42fb72(0x2cc)](!0x0);}[_0x18b7a6(0x1d4)](_0x33b425){const _0x1bd68f=_0x18b7a6;var _0x2cfbdf,_0x29c0b7;let _0x4c40e7=this[_0x1bd68f(0x4c6)];if(!_0x4c40e7||_0x4c40e7[_0x1bd68f(0x4ea)]!==_0x1bd68f(0x278))return;let _0x5d7e8b=_0x33b425==null?void 0x0:_0x33b425[_0x1bd68f(0x16a)]((0x0,n[_0x1bd68f(0x36d)])(_0x4c40e7['unitId'],_0x4c40e7[_0x1bd68f(0x4b2)]));if(!_0x5d7e8b||!Number[_0x1bd68f(0x134)](_0x5d7e8b[_0x1bd68f(0x3b5)])||!Number[_0x1bd68f(0x134)](_0x5d7e8b[_0x1bd68f(0x257)])){this[_0x1bd68f(0x49d)]();return;}let _0x459b03=this[_0x1bd68f(0x2d1)](_0x5d7e8b,_0x4c40e7),_0x5ac9e5=this[_0x1bd68f(0x490)](_0x4c40e7['elementData'],_0x4c40e7[_0x1bd68f(0x4b2)],_0x459b03),_0x1a6269=R(_0x4c40e7[_0x1bd68f(0x1df)],_0x4c40e7[_0x1bd68f(0x4b2)],{'boundsByElementId':_0x5ac9e5,'allowRootReparent':!0x0});if(_0x1a6269[_0x1bd68f(0x4ea)]!==_0x1bd68f(0x4d5)){this[_0x1bd68f(0x49d)]();return;}let _0x39fb70=this[_0x1bd68f(0x39f)]();_0x39fb70&&(_0x39fb70[_0x1bd68f(0x330)]({'ghostBounds':_0x459b03,'sourceBounds':null,'parentBounds':_0x5ac9e5[_0x1a6269[_0x1bd68f(0x214)]],'side':_0x1a6269[_0x1bd68f(0x2d8)],'textStyle':void 0x0,'renderGhostNode':!0x1}),this[_0x1bd68f(0x30b)][_0x1bd68f(0x19e)][_0x1bd68f(0x2cc)](!0x0),(_0x2cfbdf=(_0x29c0b7=this['_renderContext'][_0x1bd68f(0x19e)])[_0x1bd68f(0x2dc)])==null||_0x2cfbdf[_0x1bd68f(0x239)](_0x29c0b7));}[_0x18b7a6(0x21d)](_0x5c0c78){const _0x286143=_0x18b7a6;var _0x38d0dd,_0x445bc8;let _0x4c6b73=this[_0x286143(0x4c6)];if(!_0x4c6b73||_0x4c6b73[_0x286143(0x4ea)]!==_0x286143(0x3c0))return;let _0x50c2ef=_0x5c0c78==null?void 0x0:_0x5c0c78[_0x286143(0x16a)]((0x0,n['getBoardElementRenderObjectKey'])(_0x4c6b73['unitId'],_0x4c6b73['nodeId']));if(!_0x50c2ef){this[_0x286143(0x49d)]();return;}let _0x4c9c9b=this['_getLiveObjectBounds'](_0x50c2ef,_0x4c6b73);if(!this['_isChildDragPastActivationThreshold'](_0x4c6b73,_0x4c9c9b)){this[_0x286143(0x23f)]=null,this['_removeDragPreviewObject'](),this['_restoreObjectToDragStart'](_0x50c2ef,_0x4c6b73),this[_0x286143(0x30b)][_0x286143(0x19e)]['makeDirty'](!0x0);return;}this['_childDragActivated']||this[_0x286143(0x295)](),this['_childDragActivated']=!0x0;let _0x39d577=this[_0x286143(0x490)](_0x4c6b73['elementData'],_0x4c6b73[_0x286143(0x4b2)],_0x4c9c9b),_0x24b475=R(_0x4c6b73[_0x286143(0x1df)],_0x4c6b73[_0x286143(0x4b2)],{'boundsByElementId':_0x39d577,'detachWhenNoSnap':!0x0});this['_lastChildDragAction']=_0x24b475,this[_0x286143(0x204)](_0x4c9c9b,_0x24b475,_0x39d577),this[_0x286143(0x264)](_0x50c2ef,_0x4c6b73),this[_0x286143(0x30b)][_0x286143(0x19e)][_0x286143(0x2cc)](!0x0),(_0x38d0dd=(_0x445bc8=this[_0x286143(0x30b)][_0x286143(0x19e)])[_0x286143(0x2dc)])==null||_0x38d0dd[_0x286143(0x239)](_0x445bc8);}[_0x18b7a6(0x14a)](_0x254f17){const _0x16b625=_0x18b7a6;var _0x27f752;let _0x39f750=this[_0x16b625(0x2a0)]['getSnapshot'](),_0x8bc25f=_0x39f750[_0x16b625(0x2ab)],_0x33bca0=_0x39f750[_0x16b625(0x1e6)]??_0x39f750[_0x16b625(0x29e)][0x0];if(_0x8bc25f&&((_0x27f752=this[_0x16b625(0x4c6)])==null?void 0x0:_0x27f752[_0x16b625(0x4ea)])===_0x16b625(0x453)){this[_0x16b625(0x49d)](),this[_0x16b625(0x448)](_0x8bc25f[_0x16b625(0x4bd)],_0x8bc25f[_0x16b625(0x159)],_0x254f17);return;}if(!_0x8bc25f||!_0x33bca0||_0x39f750[_0x16b625(0x29e)][_0x16b625(0x2e5)]!==0x1){this[_0x16b625(0x49d)](),this[_0x16b625(0x4c6)]=null;return;}this['_removeDragPreviewObject']();let _0x55c105=this['_boardElementService']['getElementData'](_0x8bc25f[_0x16b625(0x4bd)],_0x8bc25f[_0x16b625(0x159)]);if(this['_applyRootTranslation'](_0x8bc25f['unitId'],_0x8bc25f[_0x16b625(0x159)],_0x33bca0,_0x55c105,_0x254f17))return;let _0xdea0c6=this[_0x16b625(0x3b8)](_0x8bc25f[_0x16b625(0x4bd)],_0x8bc25f[_0x16b625(0x159)],_0x33bca0,_0x55c105,_0x254f17);this['_executeChildDragAction'](_0x8bc25f[_0x16b625(0x4bd)],_0x8bc25f['subUnitId'],_0x33bca0,_0x55c105,_0xdea0c6);}[_0x18b7a6(0x448)](_0x28c11a,_0x5e792a,_0x69fe4e){const _0x3f90e0=_0x18b7a6;let _0x322968=this[_0x3f90e0(0x4c6)];if(this[_0x3f90e0(0x4c6)]=null,!_0x322968||_0x322968[_0x3f90e0(0x4ea)]!==_0x3f90e0(0x453)||_0x322968[_0x3f90e0(0x4bd)]!==_0x28c11a||_0x322968[_0x3f90e0(0x159)]!==_0x5e792a)return;let _0x140ac2=_0x69fe4e==null?void 0x0:_0x69fe4e['get']((0x0,n[_0x3f90e0(0x36d)])(_0x28c11a,_0x322968[_0x3f90e0(0x4b2)])),_0x540f02=_0x140ac2&&Number['isFinite'](_0x140ac2[_0x3f90e0(0x3b5)])?_0x140ac2[_0x3f90e0(0x3b5)]??_0x322968['left']:_0x322968[_0x3f90e0(0x3b5)],_0x1c5d48=_0x140ac2&&Number[_0x3f90e0(0x134)](_0x140ac2[_0x3f90e0(0x257)])?_0x140ac2['top']??_0x322968[_0x3f90e0(0x257)]:_0x322968[_0x3f90e0(0x257)],_0x4dd5a4=_0x540f02-_0x322968[_0x3f90e0(0x3b5)],_0x58311e=_0x1c5d48-_0x322968['top'];(_0x4dd5a4!==0x0||_0x58311e!==0x0)&&this['_commandService'][_0x3f90e0(0x486)](t['TranslateMindMapOperation']['id'],{'unitId':_0x28c11a,'subUnitId':_0x5e792a,'scopeId':_0x322968[_0x3f90e0(0x17c)],'deltaX':_0x4dd5a4,'deltaY':_0x58311e});}[_0x18b7a6(0x272)](_0x5b7239,_0x275bf5,_0x1224e1,_0x4253de,_0xda1a14){const _0x3232df=_0x18b7a6;if(_0xda1a14[_0x3232df(0x4ea)]==='reparent'){var _0x2e67dc,_0x14d0b3;let _0x4161c1=(0x0,t['getMindMapNodeMeta'])((_0x2e67dc=_0x4253de[_0x1224e1])==null?void 0x0:_0x2e67dc['element']),_0x4e3c55=(0x0,t[_0x3232df(0x306)])((_0x14d0b3=_0x4253de[_0xda1a14[_0x3232df(0x214)]])==null?void 0x0:_0x14d0b3['element']);this[_0x3232df(0x4ac)](t[_0x3232df(0x4c1)]['id'],{'unitId':_0x5b7239,'subUnitId':_0x275bf5,'nodeId':_0x1224e1,'newParentNodeId':_0xda1a14[_0x3232df(0x214)],'side':_0xda1a14['side'],..._0xda1a14[_0x3232df(0x139)]?{'referenceNodeId':_0xda1a14[_0x3232df(0x139)]}:null,..._0xda1a14['placement']?{'placement':_0xda1a14[_0x3232df(0x4b9)]}:null},[_0x4161c1==null?void 0x0:_0x4161c1['structureScopeId'],_0x4e3c55==null?void 0x0:_0x4e3c55[_0x3232df(0x166)]],_0x1224e1);}else{if(_0xda1a14[_0x3232df(0x4ea)]==='detach'){var _0x288db7;let _0x24629a=(0x0,t[_0x3232df(0x306)])((_0x288db7=_0x4253de[_0x1224e1])==null?void 0x0:_0x288db7[_0x3232df(0x27d)]);this[_0x3232df(0x4ac)](t['DetachMindMapNodeOperation']['id'],{'unitId':_0x5b7239,'subUnitId':_0x275bf5,'nodeId':_0x1224e1,...Number[_0x3232df(0x134)](_0xda1a14['left'])?{'left':_0xda1a14['left']}:null,...Number[_0x3232df(0x134)](_0xda1a14[_0x3232df(0x257)])?{'top':_0xda1a14['top']}:null},[_0x24629a==null?void 0x0:_0x24629a[_0x3232df(0x166)]],_0x1224e1);}}}[_0x18b7a6(0x1c6)](_0x435778,_0x367c97,_0xb96f4c,_0x3ded86,_0x29e2b0){const _0x457df9=_0x18b7a6;let _0x10b6b3=this['_dragStart'];if((_0x10b6b3==null?void 0x0:_0x10b6b3[_0x457df9(0x4ea)])===_0x457df9(0x278)&&(this[_0x457df9(0x4c6)]=null),!_0x10b6b3||_0x10b6b3[_0x457df9(0x4bd)]!==_0x435778||_0x10b6b3[_0x457df9(0x159)]!==_0x367c97||_0x10b6b3[_0x457df9(0x4b2)]!==_0xb96f4c)return!0x1;let _0x217ebd=_0x3ded86[_0xb96f4c],_0x37dac9=(0x0,t[_0x457df9(0x306)])(_0x217ebd==null?void 0x0:_0x217ebd[_0x457df9(0x27d)]);if(!_0x217ebd||!_0x37dac9||_0x37dac9['parentNodeId']!==null)return!0x1;let _0xb9f9fb=_0x29e2b0==null?void 0x0:_0x29e2b0[_0x457df9(0x16a)]((0x0,n[_0x457df9(0x36d)])(_0x435778,_0xb96f4c)),_0x4d00e9=(0x0,e[_0x457df9(0x29a)])(_0x3ded86,_0xb96f4c),_0x106763=Number[_0x457df9(0x134)](_0xb9f9fb==null?void 0x0:_0xb9f9fb[_0x457df9(0x3b5)])?_0xb9f9fb['left']:(_0x4d00e9==null?void 0x0:_0x4d00e9['left'])??_0x217ebd[_0x457df9(0x27d)][_0x457df9(0x461)][_0x457df9(0x3b5)]??0x0,_0x19f10b=Number[_0x457df9(0x134)](_0xb9f9fb==null?void 0x0:_0xb9f9fb[_0x457df9(0x257)])?_0xb9f9fb[_0x457df9(0x257)]:(_0x4d00e9==null?void 0x0:_0x4d00e9[_0x457df9(0x257)])??_0x217ebd[_0x457df9(0x27d)][_0x457df9(0x461)][_0x457df9(0x257)]??0x0,_0x11acf6=_0x106763-_0x10b6b3[_0x457df9(0x3b5)],_0xe0e59d=_0x19f10b-_0x10b6b3[_0x457df9(0x257)];if(_0x11acf6===0x0&&_0xe0e59d===0x0)return!0x0;let _0x134a10={'left':_0x106763,'top':_0x19f10b,'width':Number[_0x457df9(0x134)](_0xb9f9fb==null?void 0x0:_0xb9f9fb[_0x457df9(0x3c4)])?_0xb9f9fb[_0x457df9(0x3c4)]:_0x10b6b3['width'],'height':Number[_0x457df9(0x134)](_0xb9f9fb==null?void 0x0:_0xb9f9fb[_0x457df9(0x19a)])?_0xb9f9fb[_0x457df9(0x19a)]:_0x10b6b3['height']},_0x122893=R(_0x3ded86,_0xb96f4c,{'boundsByElementId':this[_0x457df9(0x490)](_0x3ded86,_0xb96f4c,_0x134a10),'allowRootReparent':!0x0});if(_0x122893[_0x457df9(0x4ea)]==='reparent')return this['_executeChildDragAction'](_0x435778,_0x367c97,_0xb96f4c,_0x3ded86,_0x122893),!0x0;let _0x18466b=!!_0x4d00e9&&Math['abs'](_0x4d00e9[_0x457df9(0x3b5)]-_0x106763)<0.001&&Math[_0x457df9(0x164)](_0x4d00e9[_0x457df9(0x257)]-_0x19f10b)<0.001;return this[_0x457df9(0x349)][_0x457df9(0x486)](t['TranslateMindMapOperation']['id'],{'unitId':_0x435778,'subUnitId':_0x367c97,'scopeId':_0x10b6b3[_0x457df9(0x17c)],'deltaX':_0x11acf6,'deltaY':_0xe0e59d,..._0x18466b?{'excludeElementIds':[_0xb96f4c],'preserveExcludedWorldTransforms':!0x0}:null}),!0x0;}[_0x18b7a6(0x3b8)](_0x5dc38f,_0x3d12ae,_0x40af00,_0x22793f,_0xeca16e){const _0x2fbcc1=_0x18b7a6;let _0x1269f1=this[_0x2fbcc1(0x4c6)];if(!_0x1269f1||_0x1269f1[_0x2fbcc1(0x4ea)]!=='child'||_0x1269f1[_0x2fbcc1(0x4bd)]!==_0x5dc38f||_0x1269f1[_0x2fbcc1(0x159)]!==_0x3d12ae||_0x1269f1['nodeId']!==_0x40af00)return{'kind':_0x2fbcc1(0x4a2)};this[_0x2fbcc1(0x4c6)]=null;let _0x5a9f91=_0xeca16e==null?void 0x0:_0xeca16e[_0x2fbcc1(0x16a)]((0x0,n['getBoardElementRenderObjectKey'])(_0x5dc38f,_0x40af00));if(!this[_0x2fbcc1(0x4b3)])return _0x5a9f91&&this[_0x2fbcc1(0x264)](_0x5a9f91,_0x1269f1),this[_0x2fbcc1(0x23f)]=null,{'kind':_0x2fbcc1(0x4a2)};if(!_0x5a9f91){let _0x815af4=this[_0x2fbcc1(0x23f)]??{'kind':_0x2fbcc1(0x4a2)};return this[_0x2fbcc1(0x23f)]=null,_0x815af4;}let _0x592aec=this[_0x2fbcc1(0x2d1)](_0x5a9f91,_0x1269f1);if(this[_0x2fbcc1(0x264)](_0x5a9f91,_0x1269f1),!this[_0x2fbcc1(0x470)](_0x1269f1,_0x592aec))return this[_0x2fbcc1(0x23f)]=null,{'kind':_0x2fbcc1(0x4a2)};let _0x23bbdd=R(_0x22793f,_0x40af00,{'boundsByElementId':this[_0x2fbcc1(0x490)](_0x22793f,_0x40af00,_0x592aec),'detachWhenNoSnap':!0x0});return this[_0x2fbcc1(0x23f)]=null,_0x23bbdd;}['_isChildDragPastActivationThreshold'](_0x5d8af8,_0x284251){const _0x463aa7=_0x18b7a6;let _0x49cae0=(_0x284251[_0x463aa7(0x3b5)]??_0x5d8af8['left'])-_0x5d8af8['left'],_0x20634f=(_0x284251[_0x463aa7(0x257)]??_0x5d8af8['top'])-_0x5d8af8[_0x463aa7(0x257)];return Math[_0x463aa7(0x2b2)](_0x49cae0,_0x20634f)>=0x12;}[_0x18b7a6(0x216)](_0x8e9570,_0x1831fa){const _0x24fc92=_0x18b7a6;let _0x149704=this[_0x24fc92(0x3a4)](_0x8e9570),_0x363fd9=this[_0x24fc92(0x400)]();return{'left':_0x1831fa[_0x24fc92(0x3b5)]+(_0x149704['x']-_0x1831fa[_0x24fc92(0x2a1)])/_0x363fd9,'top':_0x1831fa[_0x24fc92(0x257)]+(_0x149704['y']-_0x1831fa[_0x24fc92(0x2c4)])/_0x363fd9,'width':_0x1831fa[_0x24fc92(0x3c4)],'height':_0x1831fa[_0x24fc92(0x19a)]};}[_0x18b7a6(0x45f)](_0x369d85){const _0xefb80=_0x18b7a6;let _0x576b00=this[_0xefb80(0x256)][_0xefb80(0x4c8)](),_0x3635d0=(_0x576b00==null?void 0x0:_0x576b00[_0xefb80(0x25a)])??{'x':0x0,'y':0x0},_0x587d46=this[_0xefb80(0x400)]();return{'x':Math[_0xefb80(0x304)](((_0x369d85[_0xefb80(0x25b)]??0x0)-_0x3635d0['x'])/_0x587d46),'y':Math[_0xefb80(0x304)](((_0x369d85['offsetY']??0x0)-_0x3635d0['y'])/_0x587d46)};}['_getPointerScreenPoint'](_0xf479ed){const _0x437eb7=_0x18b7a6;return{'x':Number[_0x437eb7(0x134)](_0xf479ed[_0x437eb7(0x247)])?_0xf479ed['clientX']:_0xf479ed[_0x437eb7(0x25b)]??0x0,'y':Number[_0x437eb7(0x134)](_0xf479ed[_0x437eb7(0x1a2)])?_0xf479ed['clientY']:_0xf479ed[_0x437eb7(0x255)]??0x0};}[_0x18b7a6(0x400)](){const _0x5d1c6a=_0x18b7a6;let _0x3be644=this[_0x5d1c6a(0x256)]['getState']()[_0x5d1c6a(0x4b8)];return Number[_0x5d1c6a(0x134)](_0x3be644)&&(_0x3be644??0x0)>0x0?_0x3be644:0x1;}[_0x18b7a6(0x227)](_0x4e8062,_0x55cce6){const _0x1b345d=_0x18b7a6;return _0x4e8062['x']>=_0x55cce6['left']&&_0x4e8062['x']<=_0x55cce6[_0x1b345d(0x3b5)]+_0x55cce6['width']&&_0x4e8062['y']>=_0x55cce6[_0x1b345d(0x257)]&&_0x4e8062['y']<=_0x55cce6[_0x1b345d(0x257)]+_0x55cce6[_0x1b345d(0x19a)];}[_0x18b7a6(0x4f1)](_0x583913,_0x513de6){const _0xd89492=_0x18b7a6;var _0x933c61,_0x372338;_0x513de6==null||_0x513de6['stopPropagation'](),_0x513de6&&(_0x513de6[_0xd89492(0x15d)]=!0x0),(_0x933c61=_0x583913[_0xd89492(0x36f)])==null||_0x933c61[_0xd89492(0x239)](_0x583913),(_0x372338=_0x583913[_0xd89492(0x3de)])==null||_0x372338[_0xd89492(0x239)](_0x583913);}[_0x18b7a6(0x295)](){const _0x1c41dd=_0x18b7a6;var _0x4768b2,_0x11c5a2;this[_0x1c41dd(0x472)]||=((_0x4768b2=(_0x11c5a2=this[_0x1c41dd(0x2a0)])[_0x1c41dd(0x17a)])==null||_0x4768b2[_0x1c41dd(0x239)](_0x11c5a2),!0x0);}[_0x18b7a6(0x2d1)](_0x32660b,_0x5cef8a){const _0x21690c=_0x18b7a6;return{'left':Number['isFinite'](_0x32660b[_0x21690c(0x3b5)])?_0x32660b[_0x21690c(0x3b5)]:_0x5cef8a[_0x21690c(0x3b5)],'top':Number[_0x21690c(0x134)](_0x32660b[_0x21690c(0x257)])?_0x32660b[_0x21690c(0x257)]:_0x5cef8a[_0x21690c(0x257)],'width':Number[_0x21690c(0x134)](_0x32660b['width'])?_0x32660b[_0x21690c(0x3c4)]:_0x5cef8a[_0x21690c(0x3c4)],'height':Number[_0x21690c(0x134)](_0x32660b[_0x21690c(0x19a)])?_0x32660b[_0x21690c(0x19a)]:_0x5cef8a[_0x21690c(0x19a)]};}['_restoreObjectToDragStart'](_0x6dee27,_0x158c2c){const _0xcabcd0=_0x18b7a6;typeof _0x6dee27[_0xcabcd0(0x34d)]==_0xcabcd0(0x144)&&_0x6dee27[_0xcabcd0(0x34d)]({'left':_0x158c2c[_0xcabcd0(0x3b5)],'top':_0x158c2c['top'],'width':_0x158c2c[_0xcabcd0(0x3c4)],'height':_0x158c2c[_0xcabcd0(0x19a)]}),typeof _0x6dee27['makeDirtyNoDebounce']=='function'?_0x6dee27['makeDirtyNoDebounce'](!0x0):typeof _0x6dee27['makeDirty']==_0xcabcd0(0x144)&&_0x6dee27['makeDirty'](!0x0);}[_0x18b7a6(0x490)](_0xfd2f95,_0x34be22,_0x29b09d){const _0x40b6c7=_0x18b7a6;return Object[_0x40b6c7(0x217)](Object[_0x40b6c7(0x3a2)](_0xfd2f95)[_0x40b6c7(0x391)](_0x18d847=>_0x18d847===_0x34be22?[_0x18d847,_0x29b09d]:[_0x18d847,(0x0,e[_0x40b6c7(0x29a)])(_0xfd2f95,_0x18d847)??_0xfd2f95[_0x18d847]['element']['transform']]));}[_0x18b7a6(0x39f)](){const _0x25e7aa=_0x18b7a6;if(this[_0x25e7aa(0x350)])return this[_0x25e7aa(0x350)];let _0xf3a9b7=this['_renderContext'][_0x25e7aa(0x19e)];return typeof _0xf3a9b7[_0x25e7aa(0x3e6)]=='function'?(this[_0x25e7aa(0x350)]=new te(A),_0xf3a9b7['addObject'](this[_0x25e7aa(0x350)],j),this[_0x25e7aa(0x350)]):null;}[_0x18b7a6(0x204)](_0x4b62af,_0x2e5439,_0x10a1b6){const _0x345629=_0x18b7a6;let _0x19f05f=this[_0x345629(0x39f)]();_0x19f05f&&_0x19f05f[_0x345629(0x330)]({'ghostBounds':_0x4b62af,'sourceBounds':this[_0x345629(0x271)](),'parentBounds':_0x2e5439['kind']===_0x345629(0x4d5)?_0x10a1b6[_0x2e5439['newParentNodeId']]:null,'side':_0x2e5439[_0x345629(0x4ea)]===_0x345629(0x4d5)?_0x2e5439[_0x345629(0x2d8)]:_0x345629(0x181),'textStyle':this['_resolvePreviewTextStyle'](),'renderGhostNode':!0x0});}['_resolvePreviewSourceBounds'](){const _0x34652b=_0x18b7a6;let _0x46a51d=this['_pointerDragStart']??this[_0x34652b(0x4c6)];return _0x46a51d?{'left':_0x46a51d[_0x34652b(0x3b5)],'top':_0x46a51d[_0x34652b(0x257)],'width':_0x46a51d[_0x34652b(0x3c4)],'height':_0x46a51d['height']}:null;}[_0x18b7a6(0x41a)](){const _0x400fe3=_0x18b7a6;var _0x417710,_0x20abc0;let _0x52e905=this['_pointerDragStart']??this[_0x400fe3(0x4c6)],_0x355b33=_0x52e905==null||(_0x417710=_0x52e905['elementData'][_0x52e905[_0x400fe3(0x4b2)]])==null?void 0x0:_0x417710[_0x400fe3(0x27d)],_0xb9aaac=_0x355b33==null||(_0x20abc0=_0x355b33[_0x400fe3(0x46c)])==null?void 0x0:_0x20abc0[_0x400fe3(0x2d2)];if(_0xb9aaac)return{'text':typeof _0xb9aaac[_0x400fe3(0x39b)]==_0x400fe3(0x3d3)?_0xb9aaac['text']:void 0x0,'fontSize':Number[_0x400fe3(0x134)](_0xb9aaac[_0x400fe3(0x41b)])?_0xb9aaac[_0x400fe3(0x41b)]:void 0x0,'color':typeof _0xb9aaac[_0x400fe3(0x252)]==_0x400fe3(0x3d3)?_0xb9aaac[_0x400fe3(0x252)]:void 0x0,'horizontalAlign':Number[_0x400fe3(0x134)](_0xb9aaac[_0x400fe3(0x234)])?_0xb9aaac[_0x400fe3(0x234)]:void 0x0};}[_0x18b7a6(0x49d)](){const _0x5e7fb4=_0x18b7a6;var _0x217662,_0x305605,_0x2d0abf;if(!this[_0x5e7fb4(0x350)])return;let _0x33adfc=this[_0x5e7fb4(0x30b)][_0x5e7fb4(0x19e)];(_0x217662=_0x33adfc['removeObjects'])==null||_0x217662['call'](_0x33adfc,[this['_dragPreviewObject']]),this['_dragPreviewObject']=null,(_0x305605=(_0x2d0abf=this[_0x5e7fb4(0x30b)][_0x5e7fb4(0x19e)])[_0x5e7fb4(0x2cc)])==null||_0x305605[_0x5e7fb4(0x239)](_0x2d0abf,!0x0);}['_executeAndLayout'](_0x2b04c2,_0xb37ec6,_0x5c99d5,_0x440149){const _0x555493=_0x18b7a6;let _0x5637ac=[...new Set(_0x5c99d5['filter'](_0x24a07b=>!!_0x24a07b))],_0x35e714=typeof _0xb37ec6[_0x555493(0x4bd)]==_0x555493(0x3d3)?_0xb37ec6[_0x555493(0x4bd)]:this[_0x555493(0x30b)][_0x555493(0x4bd)],_0x32f5c1=this[_0x555493(0x40c)][_0x555493(0x3b7)](_0x35e714),_0x199305=_0x32f5c1(()=>this['_commandService'][_0x555493(0x486)](_0x2b04c2,_0xb37ec6));Promise[_0x555493(0x398)](_0x199305)['then'](_0x2135a8=>{const _0x5111e0=_0x555493;var _0x251080,_0x3a8bc7,_0x40c57f,_0x2893ac;if(_0x2135a8){if(_0x5637ac[_0x5111e0(0x137)](_0x79a368=>{const _0x5d79de=_0x5111e0;_0x32f5c1(()=>this['_commandService'][_0x5d79de(0x486)](t[_0x5d79de(0x246)]['id'],{'unitId':_0xb37ec6[_0x5d79de(0x4bd)],'subUnitId':_0xb37ec6[_0x5d79de(0x159)],'scopeId':_0x79a368}));}),_0x440149&&typeof _0xb37ec6[_0x5111e0(0x4bd)]=='string'&&typeof _0xb37ec6[_0x5111e0(0x159)]==_0x5111e0(0x3d3)){var _0x30aa14,_0x4254a8;(_0x30aa14=(_0x4254a8=this[_0x5111e0(0x2a0)])[_0x5111e0(0x347)])==null||_0x30aa14[_0x5111e0(0x239)](_0x4254a8,{'unitId':_0xb37ec6[_0x5111e0(0x4bd)],'subUnitId':_0xb37ec6['subUnitId']},[_0x440149],_0x440149);}(_0x251080=(_0x3a8bc7=this[_0x5111e0(0x30b)][_0x5111e0(0x19e)])['makeDirty'])==null||_0x251080[_0x5111e0(0x239)](_0x3a8bc7,!0x0),(_0x40c57f=(_0x2893ac=this[_0x5111e0(0x30b)][_0x5111e0(0x19e)])[_0x5111e0(0x2dc)])==null||_0x40c57f[_0x5111e0(0x239)](_0x2893ac);}});}};ue=C([S(0x1,(0x0,i[_0x18b7a6(0x46d)])(e['IBoardElementService'])),S(0x2,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x3bf)])),S(0x3,i[_0x18b7a6(0x496)]),S(0x4,n[_0x18b7a6(0x468)]),S(0x5,i[_0x18b7a6(0x416)]),S(0x6,(0x0,i[_0x18b7a6(0x46d)])(s[_0x18b7a6(0x1b6)]))],ue);let z=class extends i[_0x18b7a6(0x2a4)]{constructor(_0x28a1a6,_0xa9164f,_0x260aad,_0xdc151d,_0x5a3634,_0x23424a,_0x55a051,_0x411bb7,_0x3911fb){const _0x327c86=_0x18b7a6;super(),this[_0x327c86(0x223)]=_0x28a1a6,this['commandService']=_0xa9164f,this[_0x327c86(0x26e)]=_0x260aad,this[_0x327c86(0x25d)]=_0xdc151d,this[_0x327c86(0x451)]=_0x5a3634,this[_0x327c86(0x30f)]=_0x23424a,this[_0x327c86(0x2de)]=_0x55a051,this['localeService']=_0x411bb7,this[_0x327c86(0x446)]=_0x3911fb;}};z=C([S(0x1,i['ICommandService']),S(0x2,e[_0x18b7a6(0x2a9)]),S(0x3,n['IBoardElementStateService']),S(0x4,n[_0x18b7a6(0x468)]),S(0x5,t[_0x18b7a6(0x241)]),S(0x6,s['IDialogService']),S(0x7,(0x0,i[_0x18b7a6(0x46d)])(i['LocaleService'])),S(0x8,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x396)]))],z);const de=_0x18b7a6(0x41c),fe=_0x18b7a6(0x2cb);function pe(_0xa70108){const _0x5e18d4=_0x18b7a6;let {unitId:_0x38136e,subUnitId:_0x42f327,nodeId:_0x381c0a,initialDescription:_0x1412be=''}=_0xa70108,_0x470772=(0x0,s[_0x5e18d4(0x465)])(i['ICommandService']),_0x2c012b=(0x0,s[_0x5e18d4(0x465)])(s['IDialogService']),_0x39eb60=(0x0,s[_0x5e18d4(0x465)])(i[_0x5e18d4(0x48a)]),[_0x1eaf76,_0x1cabe4]=(0x0,f[_0x5e18d4(0x44d)])(_0x1412be),_0x3dc6e5=()=>_0x2c012b['close'](fe);return(0x0,p[_0x5e18d4(0x1de)])('div',{'className':'univer-flex\x20univer-w-full\x20univer-flex-col\x20univer-gap-4','data-board-mind-map-description-dialog':_0x5e18d4(0x1e5),'children':[(0x0,p[_0x5e18d4(0x1de)])(_0x5e18d4(0x2fe),{'className':'univer-flex\x20univer-flex-col\x20univer-gap-2','children':[(0x0,p[_0x5e18d4(0x2f8)])(_0x5e18d4(0x1ca),{'className':_0x5e18d4(0x4d8),'children':_0x39eb60['t'](_0x5e18d4(0x316))}),(0x0,p[_0x5e18d4(0x2f8)])(u['Textarea'],{'autoFocus':!0x0,'className':_0x5e18d4(0x326),'placeholder':_0x39eb60['t']('boards-mind-ui.descriptionPlaceholder'),'value':_0x1eaf76,'onValueChange':_0x1cabe4})]}),(0x0,p['jsxs'])(_0x5e18d4(0x312),{'className':_0x5e18d4(0x15b),'children':[(0x0,p['jsx'])(u[_0x5e18d4(0x1a8)],{'size':'small','variant':_0x5e18d4(0x4ce),'onClick':_0x3dc6e5,'children':_0x39eb60['t']('boards-mind-ui.cancel')}),(0x0,p[_0x5e18d4(0x2f8)])(u['Button'],{'size':_0x5e18d4(0x2db),'variant':_0x5e18d4(0x4d6),'onClick':()=>{const _0x21378c=_0x5e18d4;_0x470772[_0x21378c(0x486)](t['UpdateMindMapNodeOperation']['id'],{'unitId':_0x38136e,'subUnitId':_0x42f327,'nodeId':_0x381c0a,'foreignAttributes':{'_note':_0x1eaf76[_0x21378c(0x13c)]()?_0x1eaf76:null}}),_0x3dc6e5();},'children':_0x39eb60['t'](_0x5e18d4(0x31c))})]})]});}const B=_0x18b7a6(0x23e),me=_0x18b7a6(0x357),he='FOCUSING_MIND_MAP_BLANK_BOARD',ge={'copy':n[_0x18b7a6(0x42b)][_0x18b7a6(0x1bc)],'paste':n[_0x18b7a6(0x42b)][_0x18b7a6(0x309)],'paste-as-new':n[_0x18b7a6(0x42b)][_0x18b7a6(0x309)],'add-child':n['BOARD_SHORTCUT_BINDINGS'][_0x18b7a6(0x207)],'add-sibling-or-child':n['BOARD_SHORTCUT_BINDINGS'][_0x18b7a6(0x410)],'promote':n['BOARD_SHORTCUT_BINDINGS'][_0x18b7a6(0x1fe)],'toggle-collapse':n[_0x18b7a6(0x42b)]['foldChildNodes'],'collapse-all':n[_0x18b7a6(0x42b)]['collapseAllNodes'],'edit-text':n['BOARD_SHORTCUT_BINDINGS'][_0x18b7a6(0x3f2)],'open-description':n[_0x18b7a6(0x42b)][_0x18b7a6(0x17b)],'delete':s['KeyCode'][_0x18b7a6(0x375)],'arrow-left':s[_0x18b7a6(0x3d6)][_0x18b7a6(0x3df)],'arrow-right':s['KeyCode']['ARROW_RIGHT'],'arrow-up':s['KeyCode']['ARROW_UP'],'arrow-down':s[_0x18b7a6(0x3d6)][_0x18b7a6(0x43e)]},_e={'delete':[s['KeyCode'][_0x18b7a6(0x4a4)]]};function ve(_0x325d91){return[ge[_0x325d91],..._e[_0x325d91]??[]];}let V=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x1659e6,_0x43eebd,_0x37ae4a,_0x38418a){const _0x4efd6d=_0x18b7a6;super(),this[_0x4efd6d(0x44e)]=_0x1659e6,this[_0x4efd6d(0x349)]=_0x43eebd,this[_0x4efd6d(0x3e1)]=_0x37ae4a,this[_0x4efd6d(0x40c)]=_0x38418a,this[_0x4efd6d(0x250)]();}[_0x18b7a6(0x250)](){const _0x483305=_0x18b7a6;this[_0x483305(0x460)](this[_0x483305(0x349)]['registerCommand'](this[_0x483305(0x413)]())),this[_0x483305(0x428)]()[_0x483305(0x137)](_0x47767f=>{const _0x24ae8f=_0x483305;this[_0x24ae8f(0x460)](this['_shortcutService'][_0x24ae8f(0x35b)](_0x47767f));});}[_0x18b7a6(0x413)](){const _0x20c908=_0x18b7a6;return{'id':B,'type':i[_0x20c908(0x445)][_0x20c908(0x32f)],'handler':(_0x1a0a89,_0x4a916b,_0x1374f4)=>{const _0x2825dd=_0x20c908;let _0x1f26b8=ye(_0x1a0a89,_0x1374f4);return _0x1f26b8?this[_0x2825dd(0x1a6)](_0x1f26b8,_0x4a916b==null?void 0x0:_0x4a916b[_0x2825dd(0x3cb)]):!0x1;}};}['_createShortcutItems'](){const _0x2cdeb3=_0x18b7a6;let _0xc1f53=(_0x4ae2fa,_0x1c53ef)=>({'id':B,'binding':_0x4ae2fa,'priority':0xa0,'preconditions':_0x4f98ba=>(0x0,n[_0x2cdeb3(0x38c)])(_0x4f98ba)&&!!_0x4f98ba[_0x2cdeb3(0x220)](_0x2cdeb3(0x357)),'staticParameters':{'action':_0x1c53ef}}),_0x14ac63=_0x258276=>ve(_0x258276)[_0x2cdeb3(0x391)](_0x4621e6=>_0xc1f53(_0x4621e6,_0x258276));return[..._0x14ac63(_0x2cdeb3(0x1bc)),{'id':B,'binding':ge[_0x2cdeb3(0x309)],'priority':0xa0,'preconditions':_0x10d776=>(0x0,n[_0x2cdeb3(0x38c)])(_0x10d776)&&!!this[_0x2cdeb3(0x44e)]['getPayload']()&&!!_0x10d776[_0x2cdeb3(0x220)](_0x2cdeb3(0x357)),'staticParameters':{'action':'paste'}},{'id':B,'binding':ge['paste-as-new'],'priority':0x96,'preconditions':_0x1300c3=>(0x0,n['isBoardShortcutAvailable'])(_0x1300c3)&&!!this['_mindMapClipboardService'][_0x2cdeb3(0x190)]()&&!!_0x1300c3[_0x2cdeb3(0x220)](_0x2cdeb3(0x3be)),'staticParameters':{'action':'paste-as-new'}},..._0x14ac63(_0x2cdeb3(0x46b)),..._0x14ac63('add-sibling-or-child'),..._0x14ac63(_0x2cdeb3(0x371)),..._0x14ac63(_0x2cdeb3(0x16f)),..._0x14ac63('collapse-all'),..._0x14ac63(_0x2cdeb3(0x2b9)),..._0x14ac63(_0x2cdeb3(0x14e)),..._0x14ac63(_0x2cdeb3(0x18f)),..._0x14ac63(_0x2cdeb3(0x28d)),..._0x14ac63('arrow-right'),..._0x14ac63(_0x2cdeb3(0x493)),..._0x14ac63(_0x2cdeb3(0x322))];}[_0x18b7a6(0x1a6)](_0x3ec805,_0x44e089){const _0x182098=_0x18b7a6;return _0x3ec805[_0x182098(0x451)]['getState']()['interactionMode']===_0x182098(0x1cc)&&_0x44e089!=='copy'?!0x1:_0x44e089===_0x182098(0x1bc)?this[_0x182098(0x380)](_0x3ec805):_0x44e089===_0x182098(0x309)?this[_0x182098(0x18b)](_0x3ec805):_0x44e089===_0x182098(0x478)?this[_0x182098(0x297)](_0x3ec805):_0x44e089===_0x182098(0x46b)?this[_0x182098(0x26c)](_0x3ec805):_0x44e089===_0x182098(0x1f1)?this['_addSiblingOrChild'](_0x3ec805):_0x44e089===_0x182098(0x371)?this['_executeNodeOperation'](_0x3ec805,t['PromoteMindMapNodeOperation']['id']):_0x44e089==='toggle-collapse'?this[_0x182098(0x2ea)](_0x3ec805,t['ToggleMindMapNodeCollapseOperation']['id']):_0x44e089===_0x182098(0x419)?this[_0x182098(0x3aa)](_0x3ec805):_0x44e089===_0x182098(0x2b9)?this['_openSelectedTextEditing'](_0x3ec805):_0x44e089===_0x182098(0x14e)?this[_0x182098(0x345)](_0x3ec805):_0x44e089===_0x182098(0x18f)?this[_0x182098(0x4bc)](_0x3ec805):_0x44e089&&be(_0x44e089)?this['_navigateByTopology'](_0x3ec805,_0x44e089):!0x1;}[_0x18b7a6(0x380)](_0x23f1c6){const _0x504c58=_0x18b7a6;let _0x3c0ef4=this[_0x504c58(0x40a)](_0x23f1c6);return _0x3c0ef4?(_0x23f1c6[_0x504c58(0x45d)][_0x504c58(0x486)](t[_0x504c58(0x31e)]['id'],{'unitId':_0x3c0ef4['unitId'],'subUnitId':_0x3c0ef4['subUnitId'],'nodeId':_0x3c0ef4[_0x504c58(0x4b2)]}),!0x0):!0x1;}[_0x18b7a6(0x18b)](_0x36a820){const _0x39d58e=_0x18b7a6;let _0x26cb90=this[_0x39d58e(0x40a)](_0x36a820);return!_0x26cb90||!_0x36a820[_0x39d58e(0x30f)][_0x39d58e(0x190)]()?!0x1:(this[_0x39d58e(0x4ac)](_0x36a820,t['PasteMindMapNodeOperation']['id'],{'unitId':_0x26cb90['unitId'],'subUnitId':_0x26cb90[_0x39d58e(0x159)],'targetNodeId':_0x26cb90[_0x39d58e(0x4b2)]},_0x26cb90['scopeId']),!0x0);}[_0x18b7a6(0x297)](_0xf57321){const _0x485dd9=_0x18b7a6;let _0x31af6e=this['_getBlankBoardContext'](_0xf57321);if(!_0x31af6e||!_0xf57321['clipboardService']['getPayload']())return!0x1;let _0x5b7751=_0xf57321[_0x485dd9(0x451)][_0x485dd9(0x4c8)](),_0x155e79=Number[_0x485dd9(0x134)](_0x5b7751[_0x485dd9(0x4b8)])&&_0x5b7751['zoomRatio']>0x0?_0x5b7751[_0x485dd9(0x4b8)]:0x1,_0x54071f=Math[_0x485dd9(0x304)]((0x40-_0x5b7751[_0x485dd9(0x25a)]['x'])/_0x155e79),_0x29459a=Math[_0x485dd9(0x304)]((0x40-_0x5b7751[_0x485dd9(0x25a)]['y'])/_0x155e79);return _0xf57321[_0x485dd9(0x45d)][_0x485dd9(0x486)](t[_0x485dd9(0x433)]['id'],{'unitId':_0x31af6e[_0x485dd9(0x4bd)],'subUnitId':_0x31af6e[_0x485dd9(0x159)],'left':_0x54071f,'top':_0x29459a}),!0x0;}[_0x18b7a6(0x26c)](_0x3bedd4){const _0xcaad37=_0x18b7a6;let _0x2c0477=this['_getSelectedMindMapContext'](_0x3bedd4);if(!_0x2c0477)return!0x1;let _0x3f5850=(0x0,i[_0xcaad37(0x289)])(0x6);return this[_0xcaad37(0x313)](_0x3bedd4,t[_0xcaad37(0x283)]['id'],{'unitId':_0x2c0477[_0xcaad37(0x4bd)],'subUnitId':_0x2c0477[_0xcaad37(0x159)],'parentNodeId':_0x2c0477[_0xcaad37(0x4b2)],'nodeId':_0x3f5850,'connectorId':(0x0,i[_0xcaad37(0x289)])(0x6),'text':_0x3bedd4[_0xcaad37(0x367)]['t'](_0xcaad37(0x1c5))},_0x2c0477[_0xcaad37(0x17c)],_0x3f5850),!0x0;}[_0x18b7a6(0x30c)](_0x18e38e){const _0x27eec9=_0x18b7a6;let _0x2d3e6f=this[_0x27eec9(0x40a)](_0x18e38e);if(!_0x2d3e6f)return!0x1;let _0x4d0771=(0x0,i['generateRandomId'])(0x6);return this[_0x27eec9(0x313)](_0x18e38e,_0x2d3e6f[_0x27eec9(0x130)]?t[_0x27eec9(0x283)]['id']:t[_0x27eec9(0x35d)]['id'],{'unitId':_0x2d3e6f[_0x27eec9(0x4bd)],'subUnitId':_0x2d3e6f[_0x27eec9(0x159)],..._0x2d3e6f[_0x27eec9(0x130)]?{'parentNodeId':_0x2d3e6f[_0x27eec9(0x4b2)],'nodeId':_0x4d0771}:{'nodeId':_0x2d3e6f[_0x27eec9(0x4b2)],'siblingNodeId':_0x4d0771},'connectorId':(0x0,i[_0x27eec9(0x289)])(0x6),'text':_0x18e38e['localeService']['t'](_0x27eec9(0x1c5))},_0x2d3e6f[_0x27eec9(0x17c)],_0x4d0771),!0x0;}[_0x18b7a6(0x2ea)](_0x1c7152,_0x1bb133){const _0x570e38=_0x18b7a6;let _0x4f55ff=this[_0x570e38(0x40a)](_0x1c7152);return _0x4f55ff?(this[_0x570e38(0x4ac)](_0x1c7152,_0x1bb133,{'unitId':_0x4f55ff[_0x570e38(0x4bd)],'subUnitId':_0x4f55ff[_0x570e38(0x159)],'nodeId':_0x4f55ff[_0x570e38(0x4b2)]},_0x4f55ff[_0x570e38(0x17c)]),!0x0):!0x1;}['_deleteSelectedNode'](_0x1d9c74){const _0x4c7869=_0x18b7a6;let _0x5ca09f=this['_getSelectedMindMapContext'](_0x1d9c74);if(!_0x5ca09f)return!0x1;let _0x14c9a6=_0x1d9c74[_0x4c7869(0x45d)][_0x4c7869(0x2fc)](t[_0x4c7869(0x147)]['id'],{'unitId':_0x5ca09f['unitId'],'subUnitId':_0x5ca09f[_0x4c7869(0x159)],'nodeId':_0x5ca09f[_0x4c7869(0x4b2)]});return _0x14c9a6&&_0x1d9c74[_0x4c7869(0x25d)][_0x4c7869(0x17a)](),_0x14c9a6;}['_collapseAll'](_0x4d462b){const _0x4e011d=_0x18b7a6;let _0x1523de=this['_getSelectedMindMapContext'](_0x4d462b);if(!_0x1523de)return!0x1;let _0x3bc380=_0x4d462b[_0x4e011d(0x26e)]['getElementData'](_0x1523de[_0x4e011d(0x4bd)],_0x1523de[_0x4e011d(0x159)]),_0x20e59d=Object['values'](_0x3bc380)[_0x4e011d(0x391)](_0x7bfd5e=>{const _0x4ea0de=_0x4e011d;let _0x270020=(0x0,t[_0x4ea0de(0x306)])(_0x7bfd5e['element']);return(_0x270020==null?void 0x0:_0x270020['structureScopeId'])===_0x1523de[_0x4ea0de(0x17c)]&&this['_getMindMapChildren'](_0x3bc380,_0x1523de['scopeId'],_0x7bfd5e['elementId'])[_0x4ea0de(0x2e5)]>0x0?{'nodeId':_0x7bfd5e[_0x4ea0de(0x194)],'collapsed':_0x270020[_0x4ea0de(0x1e9)]}:null;})[_0x4e011d(0x2f5)](_0x132f2e=>!!_0x132f2e);if(_0x20e59d[_0x4e011d(0x2e5)]===0x0)return!0x1;let _0xd59be0=_0x20e59d['some'](_0x30fed4=>!_0x30fed4['collapsed']),_0x737e5a=_0x4d462b[_0x4e011d(0x45d)],_0x4dfee1=this['_undoRedoGroupService']['createRunner'](_0x1523de[_0x4e011d(0x4bd)]),_0xf3aa42=_0x20e59d[_0x4e011d(0x391)](_0x2de313=>_0x4dfee1(()=>_0x737e5a[_0x4e011d(0x486)](t[_0x4e011d(0x487)]['id'],{'unitId':_0x1523de[_0x4e011d(0x4bd)],'subUnitId':_0x1523de[_0x4e011d(0x159)],'nodeId':_0x2de313['nodeId'],'collapsed':_0xd59be0})));return Promise['all'](_0xf3aa42[_0x4e011d(0x391)](_0x109197=>Promise[_0x4e011d(0x398)](_0x109197)))[_0x4e011d(0x2d9)](_0x2ea171=>{const _0x1c3667=_0x4e011d;_0x2ea171[_0x1c3667(0x3c1)](Boolean)&&_0x4dfee1(()=>_0x737e5a[_0x1c3667(0x486)](t[_0x1c3667(0x246)]['id'],{'unitId':_0x1523de[_0x1c3667(0x4bd)],'subUnitId':_0x1523de[_0x1c3667(0x159)],'scopeId':_0x1523de['scopeId']}));}),!0x0;}[_0x18b7a6(0x2f1)](_0x3c55dd){const _0x40a4a6=_0x18b7a6;let _0x56708e=this[_0x40a4a6(0x40a)](_0x3c55dd);if(!_0x56708e)return!0x1;_0x3c55dd[_0x40a4a6(0x25d)][_0x40a4a6(0x347)]({'unitId':_0x56708e[_0x40a4a6(0x4bd)],'subUnitId':_0x56708e[_0x40a4a6(0x159)]},[_0x56708e[_0x40a4a6(0x4b2)]],_0x56708e[_0x40a4a6(0x4b2)]);let _0x36b418=_0x3c55dd[_0x40a4a6(0x446)];return _0x36b418[_0x40a4a6(0x219)](),_0x36b418['setEditing']({'unitId':_0x56708e[_0x40a4a6(0x4bd)],'subUnitId':_0x56708e[_0x40a4a6(0x159)],'shapeId':_0x56708e['nodeId'],'shapeKey':(0x0,n['getBoardElementRenderObjectKey'])(_0x56708e['unitId'],_0x56708e[_0x40a4a6(0x4b2)]),'visible':!0x0}),!0x0;}['_openDescriptionDialog'](_0x35efae){const _0x1199b7=_0x18b7a6;let _0x185100=this['_getSelectedMindMapContext'](_0x35efae);return _0x185100?(_0x35efae[_0x1199b7(0x2de)]['open']({'id':fe,'title':{'title':_0x1199b7(0x316)},'width':0x1a4,'draggable':!0x0,'mask':!0x1,'maskClosable':!0x0,'children':{'label':de,'unitId':_0x185100[_0x1199b7(0x4bd)],'subUnitId':_0x185100[_0x1199b7(0x159)],'nodeId':_0x185100['nodeId'],'initialDescription':_0x185100[_0x1199b7(0x3ae)]}}),!0x0):!0x1;}[_0x18b7a6(0x2ef)](_0x1e856f,_0x5c1f0e){const _0x35acf6=_0x18b7a6;let _0x2fef2a=this[_0x35acf6(0x40a)](_0x1e856f);if(!_0x2fef2a)return!0x1;let _0x1789b4=_0x1e856f[_0x35acf6(0x26e)][_0x35acf6(0x290)](_0x2fef2a[_0x35acf6(0x4bd)],_0x2fef2a[_0x35acf6(0x159)]),_0x4b4105=_0x1789b4[_0x2fef2a[_0x35acf6(0x4b2)]],_0x34b142=(0x0,t['getMindMapNodeMeta'])(_0x4b4105==null?void 0x0:_0x4b4105[_0x35acf6(0x27d)]);if(!_0x4b4105||!_0x34b142)return!0x1;let _0x44506d={'arrow-left':_0x35acf6(0x1d5),'arrow-right':_0x35acf6(0x40f),'arrow-up':_0x35acf6(0x32c),'arrow-down':_0x35acf6(0x440)}[_0x5c1f0e];if(!_0x44506d)return!0x1;let _0x1a9043=this[_0x35acf6(0x2e1)](_0x1789b4,_0x2fef2a[_0x35acf6(0x4b2)],_0x34b142,_0x44506d);return _0x1a9043?(_0x1e856f[_0x35acf6(0x25d)]['selectElements']({'unitId':_0x2fef2a['unitId'],'subUnitId':_0x2fef2a['subUnitId']},[_0x1a9043],_0x1a9043),!0x0):!0x1;}[_0x18b7a6(0x2e1)](_0x5eabf4,_0x28e027,_0x2c3ca4,_0x446ac0){const _0x3fc9ad=_0x18b7a6;let _0xbb0bb5=this[_0x3fc9ad(0x1ef)](_0x5eabf4,_0x2c3ca4['structureScopeId'],_0x28e027);if(_0x2c3ca4['parentNodeId']===null){if(_0x446ac0===_0x3fc9ad(0x1d5)){var _0x2a859c;return((_0x2a859c=_0xbb0bb5['find'](_0x33653b=>{const _0x38bd49=_0x3fc9ad;var _0x35866d;return((_0x35866d=(0x0,t[_0x38bd49(0x306)])(_0x33653b['element']))==null?void 0x0:_0x35866d['side'])==='left';}))==null?void 0x0:_0x2a859c[_0x3fc9ad(0x194)])??null;}if(_0x446ac0==='ArrowRight'){var _0x5d6383;return((_0x5d6383=_0xbb0bb5[_0x3fc9ad(0x3a5)](_0xe3d99d=>{const _0x5c2c4d=_0x3fc9ad;var _0x4b1769;return(((_0x4b1769=(0x0,t['getMindMapNodeMeta'])(_0xe3d99d['element']))==null?void 0x0:_0x4b1769[_0x5c2c4d(0x2d8)])??_0x5c2c4d(0x181))===_0x5c2c4d(0x181);}))==null?void 0x0:_0x5d6383[_0x3fc9ad(0x194)])??null;}return null;}let _0x20ddf1=_0x2c3ca4[_0x3fc9ad(0x2d8)]??_0x3fc9ad(0x181),_0x4a163e=_0x20ddf1===_0x3fc9ad(0x181)?_0x3fc9ad(0x1d5):'ArrowRight',_0xdf8cc5=_0x20ddf1===_0x3fc9ad(0x181)?_0x3fc9ad(0x40f):_0x3fc9ad(0x1d5);if(_0x446ac0===_0x4a163e)return _0x2c3ca4[_0x3fc9ad(0x43f)];if(_0x446ac0===_0xdf8cc5){var _0x5acda4;return((_0x5acda4=_0xbb0bb5[0x0])==null?void 0x0:_0x5acda4[_0x3fc9ad(0x194)])??null;}if(_0x446ac0===_0x3fc9ad(0x32c)||_0x446ac0===_0x3fc9ad(0x440)){let _0x5ec814=this[_0x3fc9ad(0x1ef)](_0x5eabf4,_0x2c3ca4['structureScopeId'],_0x2c3ca4[_0x3fc9ad(0x43f)]),_0x4203fc=_0x5ec814['findIndex'](_0x3eb377=>_0x3eb377['elementId']===_0x28e027),_0x49dbbb=_0x446ac0==='ArrowUp'?_0x5ec814[_0x4203fc-0x1]:_0x5ec814[_0x4203fc+0x1];return(_0x49dbbb==null?void 0x0:_0x49dbbb['elementId'])??null;}return null;}['_getMindMapChildren'](_0x5d8424,_0xac21d2,_0x320fbe){const _0x1e5f98=_0x18b7a6;return Object[_0x1e5f98(0x1a5)](_0x5d8424)[_0x1e5f98(0x2f5)](_0x93bef5=>{const _0x2ace29=_0x1e5f98;let _0x197293=(0x0,t[_0x2ace29(0x306)])(_0x93bef5[_0x2ace29(0x27d)]);return(_0x197293==null?void 0x0:_0x197293['structureScopeId'])===_0xac21d2&&_0x197293[_0x2ace29(0x43f)]===_0x320fbe&&_0x93bef5['element'][_0x2ace29(0x36a)]!==!0x1;})[_0x1e5f98(0x4e2)]((_0x34d589,_0x58b550)=>{const _0x5841d1=_0x1e5f98;let _0x201e70=(0x0,t[_0x5841d1(0x306)])(_0x34d589[_0x5841d1(0x27d)]),_0xcf1e41=(0x0,t[_0x5841d1(0x306)])(_0x58b550['element']);return(0x0,t[_0x5841d1(0x356)])(_0x201e70==null?void 0x0:_0x201e70[_0x5841d1(0x4ef)],_0xcf1e41==null?void 0x0:_0xcf1e41[_0x5841d1(0x4ef)])||_0x34d589[_0x5841d1(0x194)][_0x5841d1(0x457)](_0x58b550[_0x5841d1(0x194)]);});}['_getSelectedMindMapContext'](_0x497468){const _0x20e4c7=_0x18b7a6;var _0x31d5fa;let _0x3f5f0d=_0x497468[_0x20e4c7(0x25d)]['getSnapshot'](),_0x1381d7=_0x3f5f0d['focusedId']??_0x3f5f0d['selectedIds'][0x0];if(!_0x1381d7||_0x3f5f0d[_0x20e4c7(0x29e)]['length']!==0x1||_0x3f5f0d[_0x20e4c7(0x417)]||_0x3f5f0d[_0x20e4c7(0x142)])return null;let _0x38c0ad=_0x3f5f0d[_0x20e4c7(0x2ab)]??{'unitId':_0x497468[_0x20e4c7(0x223)]['unitId'],'subUnitId':_0x497468['renderContext']['unit'][_0x20e4c7(0x3e7)]()},_0x55df45=_0x497468['elementService']['getElementData'](_0x38c0ad['unitId'],_0x38c0ad[_0x20e4c7(0x159)])[_0x1381d7],_0x2e1b1d=(0x0,t[_0x20e4c7(0x306)])(_0x55df45==null?void 0x0:_0x55df45['element']);return!_0x55df45||!_0x2e1b1d?null:{'unitId':_0x38c0ad[_0x20e4c7(0x4bd)],'subUnitId':_0x38c0ad[_0x20e4c7(0x159)],'nodeId':_0x1381d7,'scopeId':_0x2e1b1d['structureScopeId'],'isRoot':_0x2e1b1d[_0x20e4c7(0x43f)]===null,'description':((_0x31d5fa=_0x2e1b1d['foreignAttributes'])==null?void 0x0:_0x31d5fa[_0x20e4c7(0x1ba)])??''};}[_0x18b7a6(0x1ff)](_0xa1d95){const _0x34de14=_0x18b7a6;var _0x5705b3,_0x262e59;let _0xa05e4d=_0xa1d95['elementStateService'][_0x34de14(0x138)]();return _0xa05e4d['activeEditingId']||_0xa05e4d['isTransforming']||_0xa05e4d[_0x34de14(0x29e)][_0x34de14(0x2e5)]>0x0||_0xa05e4d[_0x34de14(0x1e6)]?null:{'unitId':((_0x5705b3=_0xa05e4d[_0x34de14(0x2ab)])==null?void 0x0:_0x5705b3[_0x34de14(0x4bd)])??_0xa1d95['renderContext'][_0x34de14(0x4bd)],'subUnitId':((_0x262e59=_0xa05e4d[_0x34de14(0x2ab)])==null?void 0x0:_0x262e59[_0x34de14(0x159)])??_0xa1d95[_0x34de14(0x223)][_0x34de14(0x476)]['getActivePageId']()};}[_0x18b7a6(0x4ac)](_0x1515aa,_0xb07f44,_0x46b6cc,_0x3c5294){const _0x3aacee=_0x18b7a6;let _0x4497a0=_0x1515aa['commandService'],_0x2c6d41=this[_0x3aacee(0x40c)]['createRunner'](_0x46b6cc[_0x3aacee(0x4bd)]),_0x2f0e9f=_0x2c6d41(()=>_0x4497a0['executeCommand'](_0xb07f44,_0x46b6cc));Promise[_0x3aacee(0x398)](_0x2f0e9f)[_0x3aacee(0x2d9)](_0xd0ef01=>{const _0x567003=_0x3aacee;_0xd0ef01&&_0x2c6d41(()=>_0x4497a0['executeCommand'](t[_0x567003(0x246)]['id'],{'unitId':_0x46b6cc[_0x567003(0x4bd)],'subUnitId':_0x46b6cc[_0x567003(0x159)],'scopeId':_0x3c5294}));});}[_0x18b7a6(0x313)](_0x2dc021,_0x5c280c,_0x5586c6,_0x2e7801,_0x301d97){const _0x3c9be1=_0x18b7a6;let _0x496172={'unitId':_0x5586c6[_0x3c9be1(0x4bd)],'subUnitId':_0x5586c6['subUnitId']},_0x19c8c6=_0x2dc021[_0x3c9be1(0x45d)],_0x24125e=this['_undoRedoGroupService'][_0x3c9be1(0x3b7)](_0x5586c6[_0x3c9be1(0x4bd)]),_0x4f20f0=_0x24125e(()=>_0x19c8c6['executeCommand'](_0x5c280c,_0x5586c6));Promise[_0x3c9be1(0x398)](_0x4f20f0)[_0x3c9be1(0x2d9)](_0x4728fa=>{const _0x4e81e4=_0x3c9be1;if(!_0x4728fa)return;_0x24125e(()=>_0x19c8c6[_0x4e81e4(0x486)](t['LayoutMindMapOperation']['id'],{..._0x496172,'scopeId':_0x2e7801})),_0x2dc021[_0x4e81e4(0x25d)][_0x4e81e4(0x347)](_0x496172,[_0x301d97],_0x301d97);let _0x13ac0e=_0x2dc021[_0x4e81e4(0x446)];_0x13ac0e[_0x4e81e4(0x219)](),_0x13ac0e['setEditing']({..._0x496172,'shapeId':_0x301d97,'shapeKey':(0x0,n['getBoardElementRenderObjectKey'])(_0x496172[_0x4e81e4(0x4bd)],_0x301d97),'visible':!0x0});});}};V=C([S(0x0,t['IMindMapClipboardService']),S(0x1,i[_0x18b7a6(0x496)]),S(0x2,s[_0x18b7a6(0x1e0)]),S(0x3,(0x0,i[_0x18b7a6(0x46d)])(s[_0x18b7a6(0x1b6)]))],V);function ye(_0x5ea35a,_0x7687e3){const _0x301dbc=_0x18b7a6;var _0x13bb2a,_0x542150;let _0x8e9e40=typeof(_0x7687e3==null?void 0x0:_0x7687e3['unitId'])=='string'?_0x7687e3[_0x301dbc(0x4bd)]:(_0x13bb2a=_0x5ea35a[_0x301dbc(0x16a)](i[_0x301dbc(0x416)])['getCurrentUnitOfType'](i[_0x301dbc(0x152)][_0x301dbc(0x2ca)]))==null?void 0x0:_0x13bb2a[_0x301dbc(0x3dd)]();return _0x8e9e40?((_0x542150=_0x5ea35a[_0x301dbc(0x16a)](a[_0x301dbc(0x323)])['getRenderUnitById'](_0x8e9e40))==null?void 0x0:_0x542150[_0x301dbc(0x4ee)](z))??null:null;}function be(_0x20087a){const _0x4f96dd=_0x18b7a6;return _0x20087a===_0x4f96dd(0x28d)||_0x20087a==='arrow-right'||_0x20087a===_0x4f96dd(0x493)||_0x20087a===_0x4f96dd(0x322);}const xe={'min':0x1,'max':0x5,'defaultValue':0x3},Se={'min':0x0,'max':0x64,'defaultValue':0x64},Ce=[{'kind':_0x18b7a6(0x479),'titleKey':_0x18b7a6(0x212),'panel':'line'},{'kind':'fontColor','titleKey':_0x18b7a6(0x2ff)},{'kind':_0x18b7a6(0x1eb),'titleKey':_0x18b7a6(0x1a4)},{'kind':_0x18b7a6(0x479),'titleKey':'boards-mind-ui.toolbar.primary.more','panel':_0x18b7a6(0x178),'dividerBefore':!0x0}],H={'addSibling':_0x18b7a6(0x1f1),'addChild':_0x18b7a6(0x46b),'copy':_0x18b7a6(0x1bc),'paste':_0x18b7a6(0x309),'delete':_0x18b7a6(0x18f)},we=[{'key':'mind-map','title':_0x18b7a6(0x36b),'items':[{'value':_0x18b7a6(0x2ae),'icon':'mindmap-horizontal','labelKey':'boards-mind-ui.panel.structureKind.mindmapHorizontal'},{'value':_0x18b7a6(0x3b9),'icon':_0x18b7a6(0x3b9),'labelKey':_0x18b7a6(0x2df)}]},{'key':_0x18b7a6(0x161),'title':_0x18b7a6(0x27e),'items':[{'value':_0x18b7a6(0x1c2),'icon':'tree-right','labelKey':_0x18b7a6(0x269)},{'value':_0x18b7a6(0x307),'icon':_0x18b7a6(0x307),'labelKey':'boards-mind-ui.panel.structureKind.treeLeft'},{'value':_0x18b7a6(0x32a),'icon':'tree-alternate','labelKey':'boards-mind-ui.panel.structureKind.treeAlternate'}]},{'key':_0x18b7a6(0x3c9),'title':_0x18b7a6(0x13d),'items':[{'value':_0x18b7a6(0x4d7),'icon':_0x18b7a6(0x4d7),'labelKey':_0x18b7a6(0x1c1)},{'value':_0x18b7a6(0x485),'icon':_0x18b7a6(0x485),'labelKey':_0x18b7a6(0x370)}]}],Te={'key':_0x18b7a6(0x2e7),'title':'Branch','items':[{'value':_0x18b7a6(0x385),'icon':_0x18b7a6(0x44f),'labelKey':'boards-mind-ui.panel.branchLineType.curve'},{'value':'rounded-orthogonal','icon':'branch-rounded-orthogonal','labelKey':_0x18b7a6(0x199)},{'value':_0x18b7a6(0x158),'icon':_0x18b7a6(0x20b),'labelKey':_0x18b7a6(0x430)}]},Ee=_0x18b7a6(0x37d);function De(_0xf7159c,_0x491559){const _0x2c2992=_0x18b7a6;_0xf7159c[_0x2c2992(0x486)](B,{'action':_0x491559});}const Oe={'line':d['ShapeLineIcon'],'more':d[_0x18b7a6(0x462)]};function U(_0x338d61){const _0x4631f3=_0x18b7a6;_0x338d61[_0x4631f3(0x3de)](),_0x338d61[_0x4631f3(0x36f)]();}function ke(_0x2ffc26,_0xfc8ce4=_0x18b7a6(0x18c),_0xbff284){const _0x108ebe=_0x18b7a6;return(0x0,p[_0x108ebe(0x2f8)])(c[_0x108ebe(0x412)],{'children':(0x0,p[_0x108ebe(0x2f8)])(_0x2ffc26,{'className':_0xfc8ce4,'extend':_0xbff284})});}function Ae(_0x3a94c0){const _0x5689df=_0x18b7a6;var _0x115148,_0x5d165c;let _0x566bcc=(_0x3a94c0==null?void 0x0:_0x3a94c0['shapeText'])??{},_0x305c54=_0x566bcc['dataModel']&&typeof _0x566bcc['dataModel']==_0x5689df(0x401)?_0x566bcc[_0x5689df(0x488)]:{},_0x3639b3=(_0x115148=_0x305c54[_0x5689df(0x4b1)])==null||(_0x115148=_0x115148[_0x5689df(0x176)])==null?void 0x0:_0x115148[_0x5689df(0x2c9)];return{'color':typeof _0x566bcc['color']==_0x5689df(0x3d3)?_0x566bcc[_0x5689df(0x252)]:(_0x3639b3==null||(_0x5d165c=_0x3639b3['cl'])==null?void 0x0:_0x5d165c[_0x5689df(0x132)])??c[_0x5689df(0x2a6)],'fontFamily':typeof _0x566bcc[_0x5689df(0x40d)]==_0x5689df(0x3d3)?_0x566bcc[_0x5689df(0x40d)]:(_0x3639b3==null?void 0x0:_0x3639b3['ff'])??i[_0x5689df(0x44b)]['ff'],'fontSize':typeof _0x566bcc[_0x5689df(0x41b)]==_0x5689df(0x43b)?_0x566bcc[_0x5689df(0x41b)]:typeof(_0x3639b3==null?void 0x0:_0x3639b3['fs'])==_0x5689df(0x43b)?_0x3639b3['fs']:i[_0x5689df(0x44b)]['fs'],'horizontalAlign':_0x566bcc[_0x5689df(0x234)]??_0x305c54['ha']??i[_0x5689df(0x29c)][_0x5689df(0x276)],'textFill':_0x566bcc[_0x5689df(0x211)]&&typeof _0x566bcc[_0x5689df(0x211)]==_0x5689df(0x401)?_0x566bcc[_0x5689df(0x211)]:_0x3639b3==null?void 0x0:_0x3639b3[_0x5689df(0x211)],'verticalAlign':_0x566bcc[_0x5689df(0x497)]??_0x305c54['va']??i['VerticalAlign'][_0x5689df(0x20a)]};}function je(_0x4544bb,_0x9f876f){const _0x21a05d=_0x18b7a6;if(!_0x9f876f)return;let _0x237db2=ve(_0x9f876f);if(!_0x237db2[_0x21a05d(0x2e5)])return;let _0x82229c=_0x237db2['map'](_0x26f5f8=>_0x4544bb[_0x21a05d(0x4a3)]({'id':_0x21a05d(0x23e),'binding':_0x26f5f8,'staticParameters':{'action':_0x9f876f}})??void 0x0)[_0x21a05d(0x2f5)](_0xd5cf94=>!!_0xd5cf94);return _0x82229c['length']?[...new Set(_0x82229c)][_0x21a05d(0x2e9)]('/'):void 0x0;}async function Me(_0x4ca9ad,_0x167f94,_0x7d2dd6){const _0x1029d9=_0x18b7a6;return await Promise[_0x1029d9(0x398)](_0x167f94(()=>_0x4ca9ad[_0x1029d9(0x486)](t['ChangeMindMapLayoutOperation']['id'],_0x7d2dd6)))?(await Promise['resolve'](_0x167f94(()=>_0x4ca9ad[_0x1029d9(0x486)](t['LayoutMindMapOperation']['id'],{'unitId':_0x7d2dd6[_0x1029d9(0x4bd)],'subUnitId':_0x7d2dd6[_0x1029d9(0x159)],'scopeId':_0x7d2dd6[_0x1029d9(0x17c)]}))),!0x0):!0x1;}async function Ne(_0x135ba1,_0xbb723,_0x47fe43){const _0x207e93=_0x18b7a6;return await Promise[_0x207e93(0x398)](_0xbb723(()=>_0x135ba1[_0x207e93(0x486)](t[_0x207e93(0x45b)]['id'],_0x47fe43)))?(await Promise[_0x207e93(0x398)](_0xbb723(()=>_0x135ba1['executeCommand'](t['LayoutMindMapOperation']['id'],{'unitId':_0x47fe43[_0x207e93(0x4bd)],'subUnitId':_0x47fe43[_0x207e93(0x159)],'scopeId':_0x47fe43[_0x207e93(0x17c)]}))),!0x0):!0x1;}function Pe({className:_0x2d3575=_0x18b7a6(0x18c)}){const _0x570162=_0x18b7a6;return(0x0,p[_0x570162(0x2f8)])(c[_0x570162(0x412)],{'children':(0x0,p[_0x570162(0x1de)])(_0x570162(0x2fb),{'className':_0x2d3575,'viewBox':_0x570162(0x1f4),'fill':_0x570162(0x4a2),'aria-hidden':_0x570162(0x1e5),'children':[(0x0,p['jsx'])(_0x570162(0x344),{'d':'M4.5\x207.5h4.2c1.9\x200\x203.3\x201.5\x203.3\x203.3v2.4c0\x201.8\x201.4\x203.3\x203.3\x203.3h4.2','stroke':_0x570162(0x1c9),'strokeWidth':'1.8','strokeLinecap':_0x570162(0x304)}),(0x0,p[_0x570162(0x2f8)])(_0x570162(0x344),{'d':_0x570162(0x1ee),'stroke':_0x570162(0x1c9),'strokeWidth':_0x570162(0x4b6),'strokeLinecap':_0x570162(0x304)}),(0x0,p['jsx'])('path',{'d':_0x570162(0x1fd),'stroke':_0x570162(0x1c9),'strokeWidth':_0x570162(0x4b6),'strokeLinecap':'round'})]})});}function Fe({icon:_0x516e83}){const _0x1537fa=_0x18b7a6;let _0x14a6af=_0x1537fa(0x24e),_0x2064ea={'stroke':_0x1537fa(0x1c9),'strokeWidth':2.6,'strokeLinecap':_0x1537fa(0x304),'strokeLinejoin':_0x1537fa(0x304)},_0x16590f={'stroke':_0x14a6af,'strokeWidth':3.2,'strokeLinecap':'round'};return(0x0,p['jsxs'])(_0x1537fa(0x2fb),{'className':_0x1537fa(0x182),'viewBox':'0\x200\x2080\x2056','fill':_0x1537fa(0x4a2),'aria-hidden':_0x1537fa(0x1e5),'children':[_0x516e83==='mindmap-horizontal'&&(0x0,p['jsxs'])(p[_0x1537fa(0x293)],{'children':[(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x2ed),..._0x2064ea}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x1a1),..._0x16590f})]}),_0x516e83===_0x1537fa(0x3b9)&&(0x0,p[_0x1537fa(0x1de)])(p[_0x1537fa(0x293)],{'children':[(0x0,p['jsx'])('path',{'d':_0x1537fa(0x160),..._0x2064ea}),(0x0,p['jsx'])(_0x1537fa(0x344),{'d':_0x1537fa(0x14c),'stroke':_0x14a6af,'strokeWidth':2.6,'strokeLinecap':_0x1537fa(0x304),'strokeDasharray':_0x1537fa(0x30e)})]}),_0x516e83==='tree-right'&&(0x0,p[_0x1537fa(0x1de)])(p['Fragment'],{'children':[(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x1d0),..._0x2064ea}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x346),..._0x16590f}),(0x0,p['jsx'])(_0x1537fa(0x4cc),{'cx':'24','cy':'12','r':'3','fill':_0x1537fa(0x1c9)})]}),_0x516e83===_0x1537fa(0x307)&&(0x0,p[_0x1537fa(0x1de)])(p[_0x1537fa(0x293)],{'children':[(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x150),..._0x2064ea}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x397),..._0x16590f}),(0x0,p['jsx'])(_0x1537fa(0x4cc),{'cx':'56','cy':'12','r':'3','fill':'currentColor'})]}),_0x516e83==='tree-alternate'&&(0x0,p[_0x1537fa(0x1de)])(p[_0x1537fa(0x293)],{'children':[(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x35c),..._0x2064ea}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x263),..._0x16590f}),(0x0,p['jsx'])(_0x1537fa(0x4cc),{'cx':'42','cy':'12','r':'3','fill':'currentColor'})]}),_0x516e83===_0x1537fa(0x4d7)&&(0x0,p['jsxs'])(p['Fragment'],{'children':[(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x469),..._0x2064ea}),(0x0,p[_0x1537fa(0x2f8)])('path',{'d':_0x1537fa(0x2fd),..._0x16590f}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x4cc),{'cx':'17','cy':'31','r':'3','fill':'currentColor'})]}),_0x516e83===_0x1537fa(0x485)&&(0x0,p[_0x1537fa(0x1de)])(p[_0x1537fa(0x293)],{'children':[(0x0,p[_0x1537fa(0x2f8)])('path',{'d':_0x1537fa(0x3f5),..._0x2064ea}),(0x0,p['jsx'])(_0x1537fa(0x344),{'d':'M56\x2039h11M13\x2050h11',..._0x16590f}),(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x4cc),{'cx':'40','cy':'9','r':'3','fill':_0x1537fa(0x1c9)})]}),_0x516e83===_0x1537fa(0x44f)&&(0x0,p[_0x1537fa(0x2f8)])(p[_0x1537fa(0x293)],{'children':(0x0,p[_0x1537fa(0x2f8)])('path',{'d':'M16\x2028c16\x200\x2025-13\x2043-13M16\x2028c16\x200\x2025\x2013\x2043\x2013',..._0x2064ea})}),_0x516e83===_0x1537fa(0x4c7)&&(0x0,p[_0x1537fa(0x2f8)])(p[_0x1537fa(0x293)],{'children':(0x0,p[_0x1537fa(0x2f8)])(_0x1537fa(0x344),{'d':_0x1537fa(0x42d),..._0x2064ea})}),_0x516e83==='branch-orthogonal'&&(0x0,p['jsx'])(p[_0x1537fa(0x293)],{'children':(0x0,p['jsx'])(_0x1537fa(0x344),{'d':'M17\x2033h21M38\x2017v30M38\x2017h24',..._0x2064ea})})]});}function Ie(_0xbcbd2,_0x2ea9bd){const _0x2a45e8=_0x18b7a6;let _0x42a5d8=_0xbcbd2[_0x2a45e8(0x2c9)],_0x9be07=(0x0,e[_0x2a45e8(0x314)])(_0x42a5d8),_0x104fd7={..._0x9be07[_0x2a45e8(0x252)]===void 0x0?null:{'color':_0x9be07[_0x2a45e8(0x252)]},..._0x9be07[_0x2a45e8(0x40d)]===void 0x0?null:{'fontFamily':_0x9be07[_0x2a45e8(0x40d)]},..._0x9be07[_0x2a45e8(0x41b)]===void 0x0?null:{'fontSize':_0x9be07[_0x2a45e8(0x41b)]},..._0x9be07[_0x2a45e8(0x44a)]===void 0x0?null:{'bold':_0x9be07[_0x2a45e8(0x44a)]},..._0x9be07[_0x2a45e8(0x3ee)]===void 0x0?null:{'italic':_0x9be07[_0x2a45e8(0x3ee)]},..._0x9be07['underline']===void 0x0?null:{'underline':_0x9be07[_0x2a45e8(0x205)]},..._0x9be07['strikethrough']===void 0x0?null:{'strikethrough':_0x9be07[_0x2a45e8(0x37b)]},..._0x9be07[_0x2a45e8(0x211)]===void 0x0?null:{'textFill':_0x9be07[_0x2a45e8(0x211)]}};_0xbcbd2[_0x2a45e8(0x234)]!==void 0x0&&(_0x104fd7[_0x2a45e8(0x234)]=_0xbcbd2[_0x2a45e8(0x234)]),_0xbcbd2[_0x2a45e8(0x497)]!==void 0x0&&(_0x104fd7[_0x2a45e8(0x497)]=_0xbcbd2[_0x2a45e8(0x497)]),Object[_0x2a45e8(0x3a2)](_0x104fd7)[_0x2a45e8(0x2e5)]>0x0&&_0x2ea9bd({'textStyle':_0x104fd7});}function Le(_0x91a26c,_0x43bde4,_0x136df9){const _0x2c131e=_0x18b7a6;let _0x1712d1=_0x91a26c??{},_0x321600=(0x0,c[_0x2c131e(0x38d)])(_0x1712d1,_0x43bde4),_0xb48f19=_0x321600['shapeText']??_0x1712d1[_0x2c131e(0x2d2)]??{};return{..._0x1712d1,..._0x321600,'shapeText':{..._0xb48f19,..._0x136df9['color']===void 0x0?null:{'color':_0x136df9[_0x2c131e(0x252)]},..._0x136df9[_0x2c131e(0x41b)]===void 0x0?null:{'fontSize':_0x136df9['fontSize']},..._0x136df9['bold']===void 0x0?null:{'bold':_0x136df9[_0x2c131e(0x44a)]},..._0x136df9['italic']===void 0x0?null:{'italic':_0x136df9['italic']},..._0x136df9[_0x2c131e(0x205)]===void 0x0?null:{'underline':_0x136df9[_0x2c131e(0x205)]},..._0x136df9['strikethrough']===void 0x0?null:{'strikethrough':_0x136df9['strikethrough']},..._0x136df9[_0x2c131e(0x234)]===void 0x0?null:{'horizontalAlign':_0x136df9['horizontalAlign']},..._0x136df9[_0x2c131e(0x497)]===void 0x0?null:{'verticalAlign':_0x136df9['verticalAlign']},..._0x136df9['textFill']===void 0x0?null:{'textFill':_0x136df9[_0x2c131e(0x211)]}}};}function Re(_0x164473,_0x214e6e){const _0x642d1e=_0x18b7a6;let _0x4fe4e5=_0x164473==null?void 0x0:_0x164473[_0x642d1e(0x177)];_0x4fe4e5&&_0x214e6e({'lineType':_0x4fe4e5[_0x642d1e(0x4bf)]===l['ShapeLineDashEnum'][_0x642d1e(0x1bb)]||_0x4fe4e5['dashType']===l[_0x642d1e(0x406)][_0x642d1e(0x1a3)]?_0x642d1e(0x145):_0x4fe4e5[_0x642d1e(0x4bf)]===l[_0x642d1e(0x406)]['Dash']?_0x642d1e(0x33c):_0x642d1e(0x381),...typeof _0x4fe4e5[_0x642d1e(0x3c4)]==_0x642d1e(0x43b)?{'strokeWidth':_0x4fe4e5['width']}:null,...typeof _0x4fe4e5[_0x642d1e(0x252)]==_0x642d1e(0x3d3)?{'stroke':_0x4fe4e5[_0x642d1e(0x252)]}:null,...typeof _0x4fe4e5[_0x642d1e(0x386)]==_0x642d1e(0x43b)?{'opacity':_0x4fe4e5[_0x642d1e(0x386)]}:null});}function ze(_0x3603b2){const _0x4b0cec=_0x18b7a6;return _0x3603b2!=null&&_0x3603b2[_0x4b0cec(0x2e5)]?_0x3603b2[0x0]<=0x2?l[_0x4b0cec(0x406)][_0x4b0cec(0x1bb)]:l[_0x4b0cec(0x406)]['Dash']:l[_0x4b0cec(0x406)][_0x4b0cec(0x189)];}function Be(_0x4836e8){const _0x524761=_0x18b7a6;return{'stroke':{'lineStrokeType':l[_0x524761(0x3c8)][_0x524761(0x318)],'dashType':ze(_0x4836e8==null?void 0x0:_0x4836e8[_0x524761(0x33c)]),'color':(_0x4836e8==null?void 0x0:_0x4836e8[_0x524761(0x177)])??c[_0x524761(0x348)],'width':(_0x4836e8==null?void 0x0:_0x4836e8[_0x524761(0x192)])??xe[_0x524761(0x1e2)],'opacity':(_0x4836e8==null?void 0x0:_0x4836e8[_0x524761(0x386)])??Se[_0x524761(0x1e2)]/0x64}};}function Ve(_0x1d5665){const _0x39dbe7=_0x18b7a6;var _0x129657,_0xf24f36,_0x30be5e;let _0x59d58f=(0x0,s['useDependency'])(i[_0x39dbe7(0x496)]),_0x425d11=(0x0,s[_0x39dbe7(0x465)])(s[_0x39dbe7(0x1e0)]),_0x5d22fa=(0x0,s[_0x39dbe7(0x465)])(i[_0x39dbe7(0x48a)]),_0x526b12=(0x0,s[_0x39dbe7(0x465)])(s[_0x39dbe7(0x1b6)]),[_0xdb38b4,_0x539e20]=(0x0,f[_0x39dbe7(0x44d)])(null),[_0x5e81f5,_0x685eea]=(0x0,f[_0x39dbe7(0x44d)])((_0x129657=_0x1d5665[_0x39dbe7(0x2d6)][_0x39dbe7(0x2a8)])==null?void 0x0:_0x129657[_0x39dbe7(0x46c)]),_0x4a468c=_0x1d5665[_0x39dbe7(0x2d6)][_0x39dbe7(0x2a8)];if(!_0x4a468c)return null;let _0x174a81={'unitId':_0x4a468c[_0x39dbe7(0x4bd)],'subUnitId':_0x4a468c['subUnitId']},_0x328665=_0x3c27c0=>{const _0x5912ea=_0x39dbe7;_0x59d58f[_0x5912ea(0x486)](t['UpdateMindMapNodeOperation']['id'],{..._0x174a81,'nodeId':_0x4a468c[_0x5912ea(0x194)],..._0x3c27c0});},_0x20df7c=(_0xb6d00,_0x1b8a15)=>{const _0x5d31ef=_0x39dbe7;let _0x4a1a67=_0x1b8a15??{};_0x685eea(_0x491f82=>({..._0x491f82??{},..._0x4a1a67})),_0x328665({..._0x4a1a67[_0x5d31ef(0x3e9)]===void 0x0?null:{'fill':_0x4a1a67[_0x5d31ef(0x3e9)]},..._0x4a1a67[_0x5d31ef(0x177)]===void 0x0?null:{'stroke':_0x4a1a67['stroke']}});},_0xcb755e=_0x51095a=>{const _0xef4247=_0x39dbe7;_0x59d58f['executeCommand'](t['UpdateMindMapIncomingConnectorOperation']['id'],{..._0x174a81,'nodeId':_0x4a468c[_0xef4247(0x194)],'style':_0x51095a});},_0x118bed=Be(_0x4a468c['incomingConnectorStyle']),_0x3772ca=_0x388933=>je(_0x425d11,_0x388933),_0x56f987=_0x427b73=>{De(_0x59d58f,_0x427b73);},_0x2b516e=(_0x5e81f5==null?void 0x0:_0x5e81f5[_0x39dbe7(0x2d2)])??{},_0x52b079=Ae(_0x5e81f5),_0x4b18d2=_0x2d2d0b=>{Ie(_0x2d2d0b,_0x33e050=>{const _0x4c2623=_0x4d64;_0x685eea(_0x1fce8e=>Le(_0x1fce8e,_0x2d2d0b,_0x33e050[_0x4c2623(0x2c9)])),_0x328665(_0x33e050);});},_0x500b76=[{'label':_0x5d22fa['t'](_0x39dbe7(0x3ad)),'value':i[_0x39dbe7(0x29c)][_0x39dbe7(0x276)],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d['LeftJustifyingIcon'],{})},{'label':_0x5d22fa['t'](_0x39dbe7(0x4ba)),'value':i[_0x39dbe7(0x29c)]['CENTER'],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d[_0x39dbe7(0x2da)],{})},{'label':_0x5d22fa['t'](_0x39dbe7(0x1dd)),'value':i[_0x39dbe7(0x29c)][_0x39dbe7(0x4b5)],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d['RightJustifyingIcon'],{})},{'label':_0x5d22fa['t'](_0x39dbe7(0x393)),'value':i[_0x39dbe7(0x29c)]['JUSTIFIED'],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d[_0x39dbe7(0x235)],{})}],_0x37cdcd=[{'label':_0x5d22fa['t'](_0x39dbe7(0x173)),'value':i['VerticalAlign']['TOP'],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d[_0x39dbe7(0x3ce)],{})},{'label':_0x5d22fa['t'](_0x39dbe7(0x163)),'value':i[_0x39dbe7(0x22f)]['MIDDLE'],'icon':(0x0,p['jsx'])(d[_0x39dbe7(0x2ac)],{})},{'label':_0x5d22fa['t'](_0x39dbe7(0x141)),'value':i[_0x39dbe7(0x22f)]['BOTTOM'],'icon':(0x0,p[_0x39dbe7(0x2f8)])(d[_0x39dbe7(0x4ec)],{})}],_0xceb0a7=()=>{const _0x4b6a34=_0x39dbe7;_0x56f987(_0x4b6a34(0x1f1));},_0xfb1555=()=>{const _0x5f0f76=_0x39dbe7;_0x56f987(_0x5f0f76(0x46b));},_0x341721=()=>{const _0x3f1855=_0x39dbe7;_0x56f987(_0x3f1855(0x1bc));},_0x580710=()=>{const _0xa03c78=_0x39dbe7;_0x56f987(_0xa03c78(0x309));},_0x2438e9=()=>{_0x56f987('delete');},_0x3f9abf=((_0xf24f36=_0x4a468c[_0x39dbe7(0x240)])==null?void 0x0:_0xf24f36[_0x39dbe7(0x28a)])??t['MIND_MAP_DEFAULT_LAYOUT'][_0x39dbe7(0x28a)],_0x53ed48=(0x0,t[_0x39dbe7(0x31b)])(_0x3f9abf,((_0x30be5e=_0x4a468c['layout'])==null?void 0x0:_0x30be5e['branchLineType'])??t['MIND_MAP_DEFAULT_LAYOUT']['branchLineType']),_0x473d3b=_0x333179=>{const _0x321447=_0x39dbe7;let _0x361ce7=(0x0,t[_0x321447(0x31b)])(_0x333179,_0x53ed48);Me(_0x59d58f,_0x526b12[_0x321447(0x3b7)](_0x4a468c[_0x321447(0x4bd)]),{..._0x174a81,'scopeId':_0x4a468c[_0x321447(0x17c)],'structureKind':_0x333179,..._0x361ce7===_0x53ed48?null:{'branchLineType':_0x361ce7}}),_0x539e20(null);},_0x4f2b94=_0x31f9e9=>{const _0x245f91=_0x39dbe7;Ne(_0x59d58f,_0x526b12[_0x245f91(0x3b7)](_0x4a468c[_0x245f91(0x4bd)]),{..._0x174a81,'scopeId':_0x4a468c[_0x245f91(0x17c)],'branchLineType':_0x31f9e9}),_0x539e20(null);},_0x51d5ad=(_0x488c4b,_0x1577c1,_0x41108e,_0xfb546f=!0x1)=>(0x0,p[_0x39dbe7(0x2f8)])(_0x39dbe7(0x165),{'type':_0x39dbe7(0x165),'aria-label':_0x5d22fa['t'](_0x488c4b[_0x39dbe7(0x4d2)]),'disabled':_0xfb546f,'className':(0x0,u[_0x39dbe7(0x37e)])(_0x39dbe7(0x3ec),_0x1577c1&&_0x39dbe7(0x230),_0xfb546f&&_0x39dbe7(0x2d3)),'onMouseDown':U,'onPointerDown':U,'onClick':_0x3e62e6=>{_0x3e62e6['stopPropagation'](),_0xfb546f||_0x41108e();},'children':(0x0,p[_0x39dbe7(0x2f8)])(Fe,{'icon':_0x488c4b['icon']})},_0x488c4b[_0x39dbe7(0x4b4)]),_0x5684e4=()=>(0x0,p['jsxs'])(_0x39dbe7(0x312),{'className':_0x39dbe7(0x3ac),'onMouseDown':_0x5d3a19=>_0x5d3a19['stopPropagation'](),'onPointerDown':_0x13064c=>_0x13064c[_0x39dbe7(0x3de)](),'children':[we[_0x39dbe7(0x391)](_0x3eaa85=>(0x0,p[_0x39dbe7(0x1de)])('div',{'className':_0x39dbe7(0x3d7),'children':[(0x0,p[_0x39dbe7(0x2f8)])(_0x39dbe7(0x312),{'className':_0x39dbe7(0x4bb),'children':_0x3eaa85['title']}),(0x0,p['jsx'])(_0x39dbe7(0x312),{'className':'univer-grid\x20univer-h-14\x20univer-overflow-hidden\x20univer-rounded-xl\x20univer-bg-gray-100\x20univer-p-1','style':{'gridTemplateColumns':'repeat('+_0x3eaa85['items'][_0x39dbe7(0x2e5)]+_0x39dbe7(0x3c3)},'children':_0x3eaa85[_0x39dbe7(0x1a9)][_0x39dbe7(0x391)](_0x266a9d=>_0x51d5ad(_0x266a9d,_0x266a9d['value']===_0x3f9abf,()=>_0x473d3b(_0x266a9d[_0x39dbe7(0x4b4)])))})]},_0x3eaa85[_0x39dbe7(0x387)])),(0x0,p[_0x39dbe7(0x2f8)])(u[_0x39dbe7(0x275)],{}),(0x0,p[_0x39dbe7(0x1de)])(_0x39dbe7(0x312),{'className':_0x39dbe7(0x2b6),'children':[(0x0,p[_0x39dbe7(0x2f8)])('div',{'className':'univer-mb-2\x20univer-text-lg\x20univer-text-gray-900','children':Te[_0x39dbe7(0x436)]}),(0x0,p['jsx'])(_0x39dbe7(0x312),{'className':_0x39dbe7(0x491),'style':{'gridTemplateColumns':_0x39dbe7(0x2b8)+Te[_0x39dbe7(0x1a9)][_0x39dbe7(0x2e5)]+_0x39dbe7(0x3c3)},'children':Te[_0x39dbe7(0x1a9)][_0x39dbe7(0x391)](_0x2a5af9=>_0x51d5ad(_0x2a5af9,_0x2a5af9[_0x39dbe7(0x4b4)]===_0x53ed48,()=>_0x4f2b94(_0x2a5af9['value']),_0x2a5af9[_0x39dbe7(0x4b4)]===_0x39dbe7(0x385)&&!(0x0,t[_0x39dbe7(0x3b4)])(_0x3f9abf)))})]})]}),_0x288f7b=_0x54edfa=>{const _0xca0ea=_0x39dbe7;switch(_0x54edfa){case _0xca0ea(0x2f6):return(0x0,p[_0xca0ea(0x2f8)])(c[_0xca0ea(0x1d7)],{'title':_0x5d22fa['t']('boards-mind-ui.toolbar.panel.line'),'shapeData':_0x118bed,'modeOptions':[_0xca0ea(0x381),_0xca0ea(0x33c),_0xca0ea(0x145)],'showDashDropdown':!0x1,'widthRange':{'min':xe[_0xca0ea(0x338)],'max':xe[_0xca0ea(0x203)],'step':0x1},'onUpdateShapeData':(_0x11f1f8,_0x3cfd9e)=>{Re(_0x3cfd9e,_0xcb755e);}});case _0xca0ea(0x178):return(0x0,p[_0xca0ea(0x2f8)])(c[_0xca0ea(0x243)],{'title':_0x5d22fa['t'](_0xca0ea(0x358)),'minWidthClassName':'univer-min-w-[240px]','children':(0x0,p['jsxs'])(_0xca0ea(0x312),{'className':_0xca0ea(0x265),'children':[(0x0,p[_0xca0ea(0x2f8)])(c['ShapeFloatingToolbarMenuItem'],{'label':_0x5d22fa['t'](_0xca0ea(0x20c)),'shortcut':_0x3772ca(H[_0xca0ea(0x19c)]),'onClick':_0xceb0a7}),(0x0,p['jsx'])(c[_0xca0ea(0x3a0)],{'label':_0x5d22fa['t']('boards-mind-ui.toolbar.action.addChild'),'shortcut':_0x3772ca(H['addChild']),'onClick':_0xfb1555}),(0x0,p['jsx'])(u[_0xca0ea(0x275)],{}),(0x0,p[_0xca0ea(0x2f8)])(c[_0xca0ea(0x3a0)],{'label':_0x5d22fa['t'](_0xca0ea(0x4e5)),'shortcut':_0x3772ca(H[_0xca0ea(0x1bc)]),'onClick':_0x341721}),(0x0,p[_0xca0ea(0x2f8)])(c[_0xca0ea(0x3a0)],{'label':_0x5d22fa['t'](_0xca0ea(0x3d0)),'shortcut':_0x3772ca(H['paste']),'onClick':_0x580710}),(0x0,p['jsx'])(c['ShapeFloatingToolbarMenuItem'],{'label':_0x5d22fa['t'](_0xca0ea(0x329)),'shortcut':_0x3772ca(H['delete']),'onClick':_0x2438e9})]})});default:return null;}},_0x334d3b=Ce[_0x39dbe7(0x424)](_0x43ab5d=>{const _0x56da3e=_0x39dbe7;let _0x251d43=[];if(_0x43ab5d[_0x56da3e(0x3cd)]&&_0x251d43['push']((0x0,p[_0x56da3e(0x2f8)])(u[_0x56da3e(0x275)],{'orientation':'vertical'},_0x56da3e(0x3d4)+_0x43ab5d[_0x56da3e(0x4ea)])),_0x43ab5d[_0x56da3e(0x4ea)]===_0x56da3e(0x1eb))return _0x251d43['push']((0x0,p[_0x56da3e(0x2f8)])(c[_0x56da3e(0x441)],{'title':_0x5d22fa['t']('boards-mind-ui.toolbar.panel.typography'),'fontFamily':_0x52b079[_0x56da3e(0x40d)],'textStyle':{'isBold':_0x2b516e[_0x56da3e(0x44a)]===!0x0,'isItalic':_0x2b516e[_0x56da3e(0x3ee)]===!0x0,'isUnderline':_0x2b516e[_0x56da3e(0x205)]===!0x0,'isStrike':_0x2b516e['strikethrough']===!0x0},'horizontalAlign':_0x52b079[_0x56da3e(0x234)],'verticalAlign':_0x52b079['verticalAlign'],'horizontalAlignOptions':_0x500b76,'verticalAlignOptions':_0x37cdcd,'onUpdateText':_0x4b18d2},_0x43ab5d[_0x56da3e(0x4ea)])),_0x251d43;if(_0x43ab5d[_0x56da3e(0x4ea)]===_0x56da3e(0x49f)){let _0x54acdd={'fs':_0x52b079['fontSize'],'cl':{'rgb':_0x52b079[_0x56da3e(0x252)]},..._0x52b079[_0x56da3e(0x211)]===void 0x0?null:{'textFill':_0x52b079[_0x56da3e(0x211)]}};return _0x251d43[_0x56da3e(0x422)]((0x0,p[_0x56da3e(0x2f8)])(c[_0x56da3e(0x242)],{'title':_0x5d22fa['t']('boards-mind-ui.toolbar.action.fontColor'),'textStyle':_0x54acdd,'fallbackColor':_0x52b079[_0x56da3e(0x252)],'onChange':_0x579751=>_0x4b18d2({'textStyle':_0x579751})},_0x43ab5d[_0x56da3e(0x4ea)])),_0x251d43['push']((0x0,p[_0x56da3e(0x2f8)])(c[_0x56da3e(0x186)],{'value':String(_0x52b079['fontSize']),'onChange':_0x6789d8=>{_0x4b18d2({'textStyle':{'fs':_0x6789d8}});}},_0x56da3e(0x407))),_0x251d43;}return _0x251d43[_0x56da3e(0x422)]((0x0,p[_0x56da3e(0x2f8)])(u[_0x56da3e(0x2d7)],{'open':_0xdb38b4===_0x43ab5d[_0x56da3e(0x21f)],'overlay':_0x288f7b(_0x43ab5d[_0x56da3e(0x21f)]),'onOpenChange':_0x2cd433=>_0x539e20(_0x2cd433?_0x43ab5d[_0x56da3e(0x21f)]:null),'children':(0x0,p[_0x56da3e(0x2f8)])(_0x56da3e(0x1ca),{'children':(0x0,p[_0x56da3e(0x2f8)])(c['ShapeFloatingToolbarDropdownTrigger'],{'title':_0x5d22fa['t'](_0x43ab5d[_0x56da3e(0x1d8)]),'active':_0xdb38b4===_0x43ab5d['panel'],'icon':ke(Oe[_0x43ab5d[_0x56da3e(0x21f)]]),'sizeClassName':_0x56da3e(0x4e0),'onMouseDown':U,'onPointerDown':U})})},_0x43ab5d[_0x56da3e(0x21f)])),_0x251d43;}),_0x1ffe7d=[..._0x4a468c['isRootNode']?[(0x0,p['jsx'])(u['Dropdown'],{'open':_0xdb38b4===_0x39dbe7(0x240),'overlay':_0x5684e4(),'onOpenChange':_0x101240=>_0x539e20(_0x101240?_0x39dbe7(0x240):null),'children':(0x0,p[_0x39dbe7(0x2f8)])('span',{'children':(0x0,p[_0x39dbe7(0x2f8)])(c[_0x39dbe7(0x2ce)],{'title':_0x5d22fa['t'](_0x39dbe7(0x33a)),'active':_0xdb38b4===_0x39dbe7(0x240),'icon':(0x0,p[_0x39dbe7(0x2f8)])(Pe,{}),'sizeClassName':_0x39dbe7(0x4e0),'onMouseDown':U,'onPointerDown':U})})},_0x39dbe7(0x27b)),(0x0,p['jsx'])(u['Separator'],{'orientation':_0x39dbe7(0x2cf)},'layout-panel-divider')]:[],(0x0,p[_0x39dbe7(0x2f8)])(c[_0x39dbe7(0x1ad)],{'title':_0x5d22fa['t']('boards-mind-ui.toolbar.action.fill'),'shapeData':_0x5e81f5??{},'onUpdateShapeData':_0x20df7c},_0x39dbe7(0x135)),(0x0,p[_0x39dbe7(0x2f8)])(c['ShapeStrokePanelButton'],{'title':_0x5d22fa['t'](_0x39dbe7(0x4da)),'shapeData':_0x5e81f5??{},'onUpdateShapeData':_0x20df7c},_0x39dbe7(0x2e8)),(0x0,p[_0x39dbe7(0x2f8)])(u['Separator'],{'orientation':_0x39dbe7(0x2cf)},_0x39dbe7(0x324))];return(0x0,p[_0x39dbe7(0x1de)])(c[_0x39dbe7(0x2c3)],{'maxWidthClassName':_0x39dbe7(0x3f6),'onMouseDown':_0x54608f=>_0x54608f[_0x39dbe7(0x3de)](),'children':[_0x1ffe7d,_0x334d3b]});}function He(_0x3109db){let {left:_0x353d8b,top:_0x1fd41a,width:_0x1ec84f,height:_0x17224e}=_0x3109db;return{'left':_0x353d8b,'right':_0x353d8b+_0x1ec84f,'top':_0x1fd41a-0x38,'bottom':_0x1fd41a+_0x17224e};}let Ue=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x28ea76,_0x4153a,_0x15197f,_0x2f403c,_0x183987,_0x2dca3e){const _0x1ede25=_0x18b7a6;super(),this['_renderContext']=_0x28ea76,this[_0x1ede25(0x1f8)]=_0x4153a,this['_boardElementService']=_0x15197f,this[_0x1ede25(0x2a0)]=_0x2f403c,this[_0x1ede25(0x429)]=_0x183987,this[_0x1ede25(0x36c)]=_0x2dca3e,x(this,_0x1ede25(0x3ab),null),x(this,_0x1ede25(0x4de),null),this['_init']();}[_0x18b7a6(0x1a7)](){this['_clearPopup'](),super['dispose']();}['_init'](){const _0x6f2fa=_0x18b7a6;let _0x9814a7=this[_0x6f2fa(0x30b)][_0x6f2fa(0x19e)][_0x6f2fa(0x378)]();this[_0x6f2fa(0x460)]((0x0,i[_0x6f2fa(0x191)])(_0x9814a7[_0x6f2fa(0x42f)][_0x6f2fa(0x34b)]((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))[_0x6f2fa(0x15f)](()=>this['_showPopupForSelection']()))),this[_0x6f2fa(0x460)]((0x0,i['toDisposable'])(_0x9814a7[_0x6f2fa(0x1ea)]['pipe']((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))['subscribe'](()=>this['_clearPopupIfSelectionChanged']()))),this[_0x6f2fa(0x460)]((0x0,i[_0x6f2fa(0x191)])(_0x9814a7[_0x6f2fa(0x29b)][_0x6f2fa(0x34b)]((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))['subscribe'](()=>this[_0x6f2fa(0x37a)]()))),this[_0x6f2fa(0x460)]((0x0,i[_0x6f2fa(0x191)])(_0x9814a7[_0x6f2fa(0x1e7)][_0x6f2fa(0x34b)]((0x0,o['takeUntil'])(this['dispose$']))[_0x6f2fa(0x15f)](()=>setTimeout(()=>this[_0x6f2fa(0x4ca)](),0x0)))),this['disposeWithMe']((0x0,i[_0x6f2fa(0x191)])(this['_elementStateService']['state$']['pipe']((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))['subscribe'](()=>setTimeout(()=>this[_0x6f2fa(0x4ca)](),0x0)))),this['disposeWithMe']((0x0,i['toDisposable'])(this[_0x6f2fa(0x36c)]['interactionSurfaceActive$'][_0x6f2fa(0x34b)]((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))[_0x6f2fa(0x15f)](_0x3347ba=>{const _0x1804e8=_0x6f2fa;_0x3347ba?this[_0x1804e8(0x37a)]():setTimeout(()=>this[_0x1804e8(0x4ca)](),0x0);}))),this[_0x6f2fa(0x460)]((0x0,i['toDisposable'])(this[_0x6f2fa(0x429)][_0x6f2fa(0x188)][_0x6f2fa(0x34b)]((0x0,o[_0x6f2fa(0x4e3)])(this[_0x6f2fa(0x26f)]))['subscribe'](_0x5b9dcc=>{const _0xcaf2c1=_0x6f2fa;(_0x5b9dcc==null?void 0x0:_0x5b9dcc[_0xcaf2c1(0x4bd)])===this['_renderContext'][_0xcaf2c1(0x4bd)]&&(_0x5b9dcc[_0xcaf2c1(0x36a)]?this[_0xcaf2c1(0x37a)]():setTimeout(()=>this[_0xcaf2c1(0x4ca)](),0x0));})));}[_0x18b7a6(0x37a)](){const _0x269b4c=_0x18b7a6;var _0x175715;(_0x175715=this['_popupDisposable'])==null||_0x175715[_0x269b4c(0x1a7)](),this[_0x269b4c(0x3ab)]=null,this[_0x269b4c(0x4de)]=null;}[_0x18b7a6(0x236)](){setTimeout(()=>{const _0x18363e=_0x4d64;this[_0x18363e(0x321)]()||this['_clearPopup']();},0x0);}[_0x18b7a6(0x321)](){const _0x2d1794=_0x18b7a6;let _0x514f47=this[_0x2d1794(0x2a0)]['getSnapshot']();return!!_0x514f47['context']&&_0x514f47[_0x2d1794(0x29e)]['length']>0x0&&this[_0x2d1794(0x4de)]===this['_buildPopupSelectionKey'](_0x514f47[_0x2d1794(0x2ab)][_0x2d1794(0x4bd)],_0x514f47[_0x2d1794(0x2ab)][_0x2d1794(0x159)],_0x514f47[_0x2d1794(0x29e)]);}[_0x18b7a6(0x3b2)](_0x250133,_0x2eb892,_0x17b98c){return _0x250133+':'+_0x2eb892+':'+_0x17b98c['join'](',');}[_0x18b7a6(0x3db)](_0x92038,_0x367e61,_0x31c8bb,_0x30bd1d){const _0x1ab773=_0x18b7a6;let _0x46a720=this[_0x1ab773(0x25c)][_0x1ab773(0x290)](_0x92038,_0x367e61),_0x43d020=Object[_0x1ab773(0x1a5)](_0x46a720)[_0x1ab773(0x3a5)](_0x42df6e=>{const _0x144f45=_0x1ab773;let _0x206fbf=(0x0,t[_0x144f45(0x3e0)])(_0x42df6e[_0x144f45(0x27d)]);return(_0x206fbf==null?void 0x0:_0x206fbf[_0x144f45(0x166)])===_0x31c8bb&&_0x206fbf[_0x144f45(0x14f)]===_0x30bd1d;});if(_0x43d020&&'connectorData'in _0x43d020[_0x1ab773(0x27d)])return _0x43d020[_0x1ab773(0x27d)][_0x1ab773(0x15a)][_0x1ab773(0x421)];}[_0x18b7a6(0x4ca)](){const _0x3a2ee4=_0x18b7a6;var _0xd990fd,_0xfbf7f4,_0x185231;if(this[_0x3a2ee4(0x36c)][_0x3a2ee4(0x274)]){this[_0x3a2ee4(0x37a)]();return;}let _0x112fdb=this['_boardTextEditingService'][_0x3a2ee4(0x32d)]();if((_0x112fdb==null?void 0x0:_0x112fdb[_0x3a2ee4(0x36a)])===!0x0&&_0x112fdb[_0x3a2ee4(0x4bd)]===this[_0x3a2ee4(0x30b)][_0x3a2ee4(0x4bd)]){this[_0x3a2ee4(0x37a)]();return;}let _0x445975=this[_0x3a2ee4(0x2a0)][_0x3a2ee4(0x138)]();if(_0x445975['isTransforming']||(0x0,n[_0x3a2ee4(0x21c)])({'context':_0x445975[_0x3a2ee4(0x2ab)],'selectedIds':_0x445975['selectedIds'],'getElementById':(_0x3083dd,_0x12c0e6,_0x34edaa)=>this[_0x3a2ee4(0x25c)][_0x3a2ee4(0x2cd)](_0x3083dd,_0x12c0e6,_0x34edaa)})[_0x3a2ee4(0x384)]!==_0x3a2ee4(0x30a)){this['_clearPopup']();return;}let _0x4b2d15=this[_0x3a2ee4(0x30b)][_0x3a2ee4(0x19e)][_0x3a2ee4(0x378)]()[_0x3a2ee4(0x22d)](),_0x11eff9=Array[_0x3a2ee4(0x1b8)](_0x4b2d15[_0x3a2ee4(0x1a5)]())['map'](_0x45bf81=>this[_0x3a2ee4(0x2c7)](_0x45bf81))[_0x3a2ee4(0x2f5)](_0x411841=>!!_0x411841)['filter'](_0x16a91b=>!!(0x0,t[_0x3a2ee4(0x306)])(_0x16a91b['elementData'][_0x3a2ee4(0x27d)])),_0x4b3e7e=_0x11eff9[_0x3a2ee4(0x3a5)](_0x28cead=>_0x28cead[_0x3a2ee4(0x1df)][_0x3a2ee4(0x194)]===_0x445975[_0x3a2ee4(0x1e6)])??_0x11eff9[0x0]??this[_0x3a2ee4(0x484)]();if(!_0x4b3e7e){this[_0x3a2ee4(0x37a)]();return;}let _0x4377ae=(0x0,t[_0x3a2ee4(0x306)])(_0x4b3e7e[_0x3a2ee4(0x1df)]['element']);if(!_0x4377ae){this[_0x3a2ee4(0x37a)]();return;}let _0x54727c=(_0xd990fd=this[_0x3a2ee4(0x25c)]['getElementData'](_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x4bd)],_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x159)])[_0x4377ae[_0x3a2ee4(0x166)]])==null?void 0x0:_0xd990fd['element'],_0x4ed9a4=(0x0,t[_0x3a2ee4(0x195)])(_0x54727c),_0x4a4c6d=_0x54727c==null||(_0xfbf7f4=_0x54727c['custom'])==null||(_0xfbf7f4=_0xfbf7f4[_0x3a2ee4(0x3bc)])==null||(_0xfbf7f4=_0xfbf7f4[_0x3a2ee4(0x240)])==null?void 0x0:_0xfbf7f4['structureKind'],_0x14259a=((_0x4ed9a4==null?void 0x0:_0x4ed9a4[_0x3a2ee4(0x240)][_0x3a2ee4(0x28a)])??_0x4a4c6d)===_0x3a2ee4(0x3b9)&&(_0x4377ae[_0x3a2ee4(0x43f)]===null||_0x4377ae['side']===_0x3a2ee4(0x257)),_0x2ce67b=_0x4377ae[_0x3a2ee4(0x43f)]!==null&&_0x4377ae[_0x3a2ee4(0x2d8)]!=='top'&&_0x4377ae[_0x3a2ee4(0x2d8)]!=='bottom',_0x534e10=_0x14259a||_0x2ce67b,_0x4e3c2f=((_0x185231=_0x445975['context'])==null?void 0x0:_0x185231[_0x3a2ee4(0x4bd)])===_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x4bd)]&&_0x445975['context'][_0x3a2ee4(0x159)]===_0x4b3e7e[_0x3a2ee4(0x1df)]['subUnitId']&&_0x445975[_0x3a2ee4(0x29e)][_0x3a2ee4(0x2e5)]?_0x445975[_0x3a2ee4(0x29e)]:[_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x194)]],_0xa10391=this[_0x3a2ee4(0x3b2)](_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x4bd)],_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x159)],_0x4e3c2f);this[_0x3a2ee4(0x3ab)]&&this[_0x3a2ee4(0x4de)]===_0xa10391||(this[_0x3a2ee4(0x37a)](),this[_0x3a2ee4(0x3ab)]=this[_0x3a2ee4(0x460)](this['_boardCanvasPopManagerService'][_0x3a2ee4(0x4a5)](_0x4b3e7e['elementData'][_0x3a2ee4(0x4bd)],_0x4b3e7e['elementData'][_0x3a2ee4(0x159)],_0x4b3e7e[_0x3a2ee4(0x401)],{'componentKey':Ee,'direction':_0x3a2ee4(0x2f2),'offset':[0x0,0x8],..._0x534e10?{'anchorBoundResolver':He}:null,'extraProps':{'unitId':_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x4bd)],'subUnitId':_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x159)],'elementId':_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x194)],'scopeId':_0x4377ae[_0x3a2ee4(0x166)],'isRootNode':_0x4377ae[_0x3a2ee4(0x43f)]===null,'left':_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x27d)][_0x3a2ee4(0x461)][_0x3a2ee4(0x3b5)]??0x0,'top':_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x27d)][_0x3a2ee4(0x461)]['top']??0x0,'shapeData':_0x4b3e7e[_0x3a2ee4(0x1df)]['element']['type']===e[_0x3a2ee4(0x221)][_0x3a2ee4(0x38a)]?_0x4b3e7e['elementData']['element'][_0x3a2ee4(0x46c)]:void 0x0,'layout':_0x4ed9a4==null?void 0x0:_0x4ed9a4[_0x3a2ee4(0x240)],'incomingConnectorStyle':this['_resolveIncomingConnectorStyle'](_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x4bd)],_0x4b3e7e['elementData'][_0x3a2ee4(0x159)],_0x4377ae[_0x3a2ee4(0x166)],_0x4b3e7e[_0x3a2ee4(0x1df)][_0x3a2ee4(0x194)])}})),this[_0x3a2ee4(0x4de)]=_0xa10391);}[_0x18b7a6(0x484)](){const _0x5e4caa=_0x18b7a6;var _0x6decd9;let _0x2ea3e8=this[_0x5e4caa(0x2a0)][_0x5e4caa(0x138)](),_0x13f172=_0x2ea3e8['context'],_0x4d5d2f=_0x2ea3e8[_0x5e4caa(0x1e6)]??_0x2ea3e8['selectedIds'][0x0];if(!_0x13f172||!_0x4d5d2f)return null;let _0xcf0cd=this['_boardElementService'][_0x5e4caa(0x2cd)](_0x13f172[_0x5e4caa(0x4bd)],_0x13f172['subUnitId'],_0x4d5d2f);if(!_0xcf0cd||!(0x0,t[_0x5e4caa(0x306)])(_0xcf0cd[_0x5e4caa(0x27d)]))return null;let _0x2c40a4=(0x0,n['getBoardElementRenderObjectKey'])(_0x13f172[_0x5e4caa(0x4bd)],_0x4d5d2f),_0x1fc394=this[_0x5e4caa(0x30b)]['scene'],_0xdbe8aa=((_0x6decd9=_0x1fc394[_0x5e4caa(0x4be)])==null?void 0x0:_0x6decd9[_0x5e4caa(0x239)](_0x1fc394,_0x2c40a4))??this['_renderContext'][_0x5e4caa(0x19e)][_0x5e4caa(0x3b6)](_0x2c40a4);return _0xdbe8aa?{'object':_0xdbe8aa,'elementData':_0xcf0cd}:null;}[_0x18b7a6(0x2c7)](_0x16dad8){const _0x3b511b=_0x18b7a6;var _0x42bc1f;if(!_0x16dad8)return null;let _0x26daa5=(0x0,n['parseBoardElementRenderObjectKey'])(_0x16dad8['oKey']);if(!_0x26daa5)return null;let _0x178fda=this['_elementStateService'][_0x3b511b(0x138)](),_0x22d079=((_0x42bc1f=_0x178fda[_0x3b511b(0x2ab)])==null?void 0x0:_0x42bc1f['unitId'])===_0x26daa5[_0x3b511b(0x4bd)]?_0x178fda['context'][_0x3b511b(0x159)]:void 0x0;if(!_0x22d079)return null;let _0x6784b6=this[_0x3b511b(0x25c)][_0x3b511b(0x2cd)](_0x26daa5[_0x3b511b(0x4bd)],_0x22d079,_0x26daa5[_0x3b511b(0x194)]);return _0x6784b6?{'object':_0x16dad8,'elementData':_0x6784b6}:null;}};Ue=C([S(0x1,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x149)])),S(0x2,(0x0,i['Inject'])(e[_0x18b7a6(0x2a9)])),S(0x3,(0x0,i['Inject'])(n[_0x18b7a6(0x3bf)])),S(0x4,(0x0,i['Inject'])(n[_0x18b7a6(0x396)])),S(0x5,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x25e)]))],Ue);const We='board-mind-map-pending-insert-object',Ge=n[_0x18b7a6(0x4e4)][_0x18b7a6(0x25f)];var Ke=class extends a[_0x18b7a6(0x2bc)]{constructor(_0x5e2b7a=We,_0x3d0708){const _0x8e1f=_0x18b7a6;super(_0x5e2b7a),x(this,_0x8e1f(0x438),{'point':null,'children':[]}),x(this,'_preview',null),this[_0x8e1f(0x224)]=!0x1,this[_0x8e1f(0x1fa)]=n[_0x8e1f(0x43d)]['transientPreview'],this[_0x8e1f(0x330)](_0x3d0708);}[_0x18b7a6(0x330)](_0x4c1fa5){const _0x13c47b=_0x18b7a6;let _0x3b1e36=this[_0x13c47b(0x438)];if(this[_0x13c47b(0x438)]={..._0x3b1e36,..._0x4c1fa5},!this[_0x13c47b(0x4df)]||_0x3b1e36['structureKind']!==this[_0x13c47b(0x438)]['structureKind']||_0x3b1e36[_0x13c47b(0x2fa)]!==this[_0x13c47b(0x438)]['rootText']||_0x3b1e36[_0x13c47b(0x336)]!==this['_state'][_0x13c47b(0x336)]||!i[_0x13c47b(0x253)][_0x13c47b(0x414)](_0x3b1e36['children'],this[_0x13c47b(0x438)][_0x13c47b(0x471)])||!i['Tools'][_0x13c47b(0x414)](_0x3b1e36[_0x13c47b(0x47a)],this[_0x13c47b(0x438)][_0x13c47b(0x47a)])){let _0x436ec6={'left':0x0,'top':0x0,'structureKind':this['_state'][_0x13c47b(0x28a)],'branchLineType':this[_0x13c47b(0x438)][_0x13c47b(0x336)]},_0x2b8acb=this[_0x13c47b(0x438)][_0x13c47b(0x47a)];_0x2b8acb&&this[_0x13c47b(0x438)][_0x13c47b(0x2fa)]&&(_0x2b8acb={..._0x2b8acb,'root':{..._0x2b8acb[_0x13c47b(0x278)],'text':this[_0x13c47b(0x438)][_0x13c47b(0x2fa)]}}),this[_0x13c47b(0x4df)]=_0x2b8acb?(0x0,t[_0x13c47b(0x298)])({..._0x436ec6,'blueprint':_0x2b8acb}):(0x0,t[_0x13c47b(0x1f6)])({..._0x436ec6,'rootText':this['_state'][_0x13c47b(0x2fa)],'children':this[_0x13c47b(0x438)][_0x13c47b(0x471)]});}this['_state'][_0x13c47b(0x499)]?this[_0x13c47b(0x48d)]():this[_0x13c47b(0x1ab)](),this[_0x13c47b(0x2cc)](!0x0);}[_0x18b7a6(0x3e4)](_0x1d2c73){return!0x1;}['getRootTopLeft'](_0x362bc5){const _0x5695fc=_0x18b7a6;var _0x3c2eda,_0x3936ce;return{'left':Math['round'](_0x362bc5['x']-(((_0x3c2eda=this[_0x5695fc(0x4df)])==null?void 0x0:_0x3c2eda[_0x5695fc(0x38e)][_0x5695fc(0x461)]['width'])??t['MIND_MAP_DEFAULT_NODE_SIZE'][_0x5695fc(0x1b1)])/0x2),'top':Math[_0x5695fc(0x304)](_0x362bc5['y']-(((_0x3936ce=this[_0x5695fc(0x4df)])==null?void 0x0:_0x3936ce['rootNode'][_0x5695fc(0x461)]['height'])??t[_0x5695fc(0x4c9)][_0x5695fc(0x447)])/0x2)};}['render'](_0x4975be,_0x175b03){const _0x560a85=_0x18b7a6;var _0x2cf6c5;let _0x30d2af=this[_0x560a85(0x438)]['point'],_0x4ddec1=this[_0x560a85(0x4df)];if(!_0x30d2af||!_0x4ddec1||!this[_0x560a85(0x36a)])return this[_0x560a85(0x2cc)](!0x1),this;let _0x3f11c4=Number[_0x560a85(0x134)](this[_0x560a85(0x438)]['zoomRatio'])&&(this[_0x560a85(0x438)][_0x560a85(0x4b8)]??0x0)>0x0?this['_state'][_0x560a85(0x4b8)]:0x1,_0x3c3912=_0x4ddec1[_0x560a85(0x38e)]['transform'][_0x560a85(0x3c4)]??t['MIND_MAP_DEFAULT_NODE_SIZE']['rootWidth'],_0x4c7cbc=_0x4ddec1['rootNode'][_0x560a85(0x461)][_0x560a85(0x19a)]??t[_0x560a85(0x4c9)][_0x560a85(0x447)],_0x5ea95e=this[_0x560a85(0x262)](_0x30d2af),_0x61a3f2=_0x5ea95e[_0x560a85(0x3b5)]-(_0x4ddec1[_0x560a85(0x38e)][_0x560a85(0x461)][_0x560a85(0x3b5)]??0x0),_0x487d14=_0x5ea95e[_0x560a85(0x257)]-(_0x4ddec1[_0x560a85(0x38e)][_0x560a85(0x461)][_0x560a85(0x257)]??0x0),_0x572d1a=_0x61a3f2-(_0x4ddec1[_0x560a85(0x2e4)]['transform'][_0x560a85(0x3b5)]??0x0),_0x19a391=_0x487d14-(_0x4ddec1['container']['transform'][_0x560a85(0x257)]??0x0);_0x4975be['save'](),_0x4975be[_0x560a85(0x47b)]=D[_0x560a85(0x2bf)],_0x4975be[_0x560a85(0x426)]=D[_0x560a85(0x388)]/_0x3f11c4,_0x4975be[_0x560a85(0x26b)]=D[_0x560a85(0x43a)],_0x4975be[_0x560a85(0x42a)]();for(let _0x576a08 of((_0x2cf6c5=_0x4ddec1[_0x560a85(0x2e4)]['containerData'][_0x560a85(0x46c)][_0x560a85(0x301)])==null?void 0x0:_0x2cf6c5[_0x560a85(0x260)])??[])for(let _0x2903da of _0x576a08[_0x560a85(0x2bb)]??[]){let _0x4caf20=Number(_0x2903da[_0x560a85(0x335)][0x0])+_0x61a3f2,_0x2cb0a2=Number(_0x2903da[_0x560a85(0x335)][0x1])+_0x487d14;_0x2903da[_0x560a85(0x49a)]==='M'?_0x4975be['moveTo'](_0x4caf20,_0x2cb0a2):_0x2903da[_0x560a85(0x49a)]==='L'&&_0x4975be[_0x560a85(0x2c6)](_0x4caf20,_0x2cb0a2);}for(let _0x258f76 of _0x4ddec1[_0x560a85(0x402)]){var _0x32d439;if(_0x258f76[_0x560a85(0x36a)]===!0x1)continue;let _0x3948a3=_0x258f76['connectorData'],_0x467abd=_0x3948a3[_0x560a85(0x1e4)]['kind']==='free'?_0x3948a3['start']:_0x3948a3[_0x560a85(0x1e4)][_0x560a85(0x317)],_0x3883d9=_0x3948a3[_0x560a85(0x3af)]['kind']==='free'?_0x3948a3['end']:_0x3948a3[_0x560a85(0x3af)][_0x560a85(0x317)];if(!_0x467abd||!_0x3883d9)continue;_0x4975be['moveTo'](_0x467abd['x']+_0x572d1a,_0x467abd['y']+_0x19a391);let _0x4ec396=(_0x32d439=_0x3948a3[_0x560a85(0x474)])==null?void 0x0:_0x32d439[_0x560a85(0x226)];if(_0x3948a3[_0x560a85(0x389)]===_0x560a85(0x385)&&_0x4ec396&&_0x4ec396['length']>=0x2)_0x4975be[_0x560a85(0x475)](_0x4ec396[0x0]['x']+_0x572d1a,_0x4ec396[0x0]['y']+_0x19a391,_0x4ec396[0x1]['x']+_0x572d1a,_0x4ec396[0x1]['y']+_0x19a391,_0x3883d9['x']+_0x572d1a,_0x3883d9['y']+_0x19a391);else{var _0x4db1f8;for(let _0x516dd7 of((_0x4db1f8=_0x3948a3[_0x560a85(0x27f)])==null?void 0x0:_0x4db1f8[_0x560a85(0x425)])??[])_0x4975be['lineTo'](_0x516dd7['x']+_0x572d1a,_0x516dd7['y']+_0x19a391);_0x4975be[_0x560a85(0x2c6)](_0x3883d9['x']+_0x572d1a,_0x3883d9['y']+_0x19a391);}}_0x4975be[_0x560a85(0x177)]();for(let _0x54b2c9 of _0x4ddec1[_0x560a85(0x4e8)])_0x54b2c9['id']!==_0x4ddec1[_0x560a85(0x38e)]['id']&&_0x54b2c9[_0x560a85(0x36a)]!==!0x1&&(O(_0x4975be,_0x61a3f2+(_0x54b2c9['transform'][_0x560a85(0x3b5)]??0x0),_0x487d14+(_0x54b2c9[_0x560a85(0x461)][_0x560a85(0x257)]??0x0),_0x54b2c9[_0x560a85(0x461)][_0x560a85(0x3c4)]??t[_0x560a85(0x4c9)][_0x560a85(0x48e)],_0x54b2c9[_0x560a85(0x461)]['height']??t[_0x560a85(0x4c9)][_0x560a85(0x18a)],D[_0x560a85(0x439)]),_0x4975be[_0x560a85(0x267)]=D[_0x560a85(0x18e)],_0x4975be[_0x560a85(0x3e9)](),_0x4975be[_0x560a85(0x177)]());O(_0x4975be,_0x5ea95e[_0x560a85(0x3b5)],_0x5ea95e[_0x560a85(0x257)],_0x3c3912,_0x4c7cbc,D[_0x560a85(0x183)]),_0x4975be[_0x560a85(0x267)]=D['primaryColor'],_0x4975be[_0x560a85(0x3e9)](),_0x4975be[_0x560a85(0x177)](),_0x4975be[_0x560a85(0x267)]=D[_0x560a85(0x2aa)],_0x4975be[_0x560a85(0x15c)]=k(D[_0x560a85(0x34e)],D[_0x560a85(0x3fe)],_0x3f11c4),_0x4975be[_0x560a85(0x2b3)]='center',_0x4975be[_0x560a85(0x4e1)]=_0x560a85(0x1fc);let _0x4effdd=D[_0x560a85(0x244)]/_0x3f11c4;return _0x4975be[_0x560a85(0x3dc)](t[_0x560a85(0x16c)],_0x5ea95e[_0x560a85(0x3b5)]+_0x3c3912/0x2,_0x5ea95e[_0x560a85(0x257)]+_0x4c7cbc/0x2,Math[_0x560a85(0x203)](0x1,_0x3c3912-_0x4effdd*0x2)),_0x4975be['restore'](),this['makeDirty'](!0x1),this;}};const qe={'children':[{'text':t['MIND_MAP_DEFAULT_NODE_TEXT'],'orderKey':(0x0,t[_0x18b7a6(0x340)])(0x0),'side':_0x18b7a6(0x181)},{'text':t['MIND_MAP_DEFAULT_NODE_TEXT'],'orderKey':(0x0,t[_0x18b7a6(0x340)])(0x1),'side':_0x18b7a6(0x181)},{'text':t['MIND_MAP_DEFAULT_NODE_TEXT'],'orderKey':(0x0,t[_0x18b7a6(0x340)])(0x2),'side':_0x18b7a6(0x181)}]};var W=class extends i[_0x18b7a6(0x2a4)]{constructor(..._0xc73a82){const _0x6d2aa2=_0x18b7a6;super(..._0xc73a82),x(this,_0x6d2aa2(0x37c),qe);}['setTemplate'](_0x212d56){const _0x3bdc66=_0x18b7a6;var _0x278354;let _0x5f133f=(_0x212d56==null?void 0x0:_0x212d56[_0x3bdc66(0x471)])??(_0x212d56==null||(_0x278354=_0x212d56[_0x3bdc66(0x47a)])==null?void 0x0:_0x278354['root'][_0x3bdc66(0x471)]);this[_0x3bdc66(0x37c)]={'rootText':_0x212d56==null?void 0x0:_0x212d56[_0x3bdc66(0x2fa)],'structureKind':_0x212d56==null?void 0x0:_0x212d56['structureKind'],'branchLineType':_0x212d56==null?void 0x0:_0x212d56[_0x3bdc66(0x336)],'children':this[_0x3bdc66(0x251)](_0x5f133f,_0x212d56==null?void 0x0:_0x212d56['structureKind']),'blueprint':_0x212d56!=null&&_0x212d56[_0x3bdc66(0x47a)]?this[_0x3bdc66(0x3a7)](_0x212d56[_0x3bdc66(0x47a)]):void 0x0};}[_0x18b7a6(0x1f5)](){const _0x459780=_0x18b7a6;var _0x455c45;return{'rootText':this['_template'][_0x459780(0x2fa)],'structureKind':this[_0x459780(0x37c)]['structureKind'],'branchLineType':this[_0x459780(0x37c)][_0x459780(0x336)],'children':(_0x455c45=this['_template']['children'])==null?void 0x0:_0x455c45[_0x459780(0x391)](_0x135009=>({..._0x135009})),'blueprint':this['_template'][_0x459780(0x47a)]?this['_cloneBlueprint'](this['_template'][_0x459780(0x47a)]):void 0x0};}['_cloneBlueprint'](_0x38f467){const _0x472964=_0x18b7a6;return{'title':_0x38f467[_0x472964(0x436)],'root':this[_0x472964(0x2ee)](_0x38f467[_0x472964(0x278)])};}[_0x18b7a6(0x2ee)](_0x347f6b){const _0x47e0e5=_0x18b7a6;return{..._0x347f6b,'foreignAttributes':_0x347f6b['foreignAttributes']?{..._0x347f6b[_0x47e0e5(0x331)]}:void 0x0,'children':_0x347f6b[_0x47e0e5(0x471)]['map'](_0x24d520=>this[_0x47e0e5(0x2ee)](_0x24d520))};}['_normalizeChildren'](_0x109f02,_0x302158){const _0x54932d=_0x18b7a6;let _0x4905df=!_0x109f02,_0x5554ea=_0x109f02??qe[_0x54932d(0x471)];return _0x5554ea==null?void 0x0:_0x5554ea[_0x54932d(0x391)]((_0x5904b9,_0x971dd2)=>({..._0x5904b9,'text':_0x5904b9['text']??t[_0x54932d(0x16c)],'side':this['_resolveChildSide'](_0x5904b9[_0x54932d(0x2d8)],_0x971dd2,_0x302158,_0x4905df)}));}[_0x18b7a6(0x2dd)](_0x1e44bb,_0xf00b8b,_0x6ae3b8,_0x2b1f45){const _0x14b2d6=_0x18b7a6;return _0x6ae3b8===_0x14b2d6(0x3b9)?_0x2b1f45?_0x14b2d6(0x2c0):_0x1e44bb??_0x14b2d6(0x2c0):_0x6ae3b8==='tree-left'?_0x2b1f45?'left':_0x1e44bb??'left':_0x6ae3b8===_0x14b2d6(0x1c2)?_0x2b1f45?'right':_0x1e44bb??'right':_0x6ae3b8==='tree-alternate'?_0x2b1f45?_0xf00b8b%0x2==0x0?_0x14b2d6(0x3b5):_0x14b2d6(0x181):_0x1e44bb??(_0xf00b8b%0x2==0x0?_0x14b2d6(0x3b5):'right'):_0x6ae3b8==='timeline-horizontal'?_0x2b1f45?_0xf00b8b%0x2==0x0?_0x14b2d6(0x257):_0x14b2d6(0x2c0):_0x1e44bb??(_0xf00b8b%0x2==0x0?_0x14b2d6(0x257):'bottom'):_0x6ae3b8===_0x14b2d6(0x485)?_0x2b1f45?_0xf00b8b%0x2==0x0?_0x14b2d6(0x3b5):_0x14b2d6(0x181):_0x1e44bb??(_0xf00b8b%0x2==0x0?_0x14b2d6(0x3b5):_0x14b2d6(0x181)):_0x1e44bb;}};function Je(_0x34f88a,_0x2c4989){const _0x2aaaa7=_0x18b7a6;let _0x3b71c8=Number[_0x2aaaa7(0x134)](_0x2c4989[_0x2aaaa7(0x4b8)])&&_0x2c4989['zoomRatio']>0x0?_0x2c4989[_0x2aaaa7(0x4b8)]:0x1;return{'x':Math[_0x2aaaa7(0x304)]((_0x34f88a[_0x2aaaa7(0x25b)]-_0x2c4989[_0x2aaaa7(0x39d)]['x'])/_0x3b71c8),'y':Math[_0x2aaaa7(0x304)]((_0x34f88a[_0x2aaaa7(0x255)]-_0x2c4989[_0x2aaaa7(0x39d)]['y'])/_0x3b71c8)};}function Ye(_0x34d2b0){const _0x310f0a=_0x18b7a6;var _0x40c8a8;_0x34d2b0!=null&&_0x34d2b0['dispose']?_0x34d2b0[_0x310f0a(0x1a7)]():_0x34d2b0==null||(_0x40c8a8=_0x34d2b0['unsubscribe'])==null||_0x40c8a8[_0x310f0a(0x239)](_0x34d2b0);}function _0x4d64(_0x205568,_0x2c9f12){_0x205568=_0x205568-0x130;const _0x6e6aab=_0x6e6a();let _0x4d64b4=_0x6e6aab[_0x205568];return _0x4d64b4;}function Xe(_0x4f2e87){const _0x5f04f5=_0x18b7a6;var _0x30eb1f;return _0x4f2e87[_0x5f04f5(0x3a9)]===e['BoardToolType'][_0x5f04f5(0x3a1)]&&((_0x30eb1f=_0x4f2e87['pendingInsert'])==null?void 0x0:_0x30eb1f[_0x5f04f5(0x464)])===e['BoardToolType'][_0x5f04f5(0x3a1)];}let G=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x3475c6,_0x203e7f,_0x1a06ed,_0x37a8cb,_0x3d2325,_0x3609d4,_0x3ce24a){const _0x1a523a=_0x18b7a6;super(),this[_0x1a523a(0x30b)]=_0x3475c6,this[_0x1a523a(0x29d)]=_0x203e7f,this['_stateService']=_0x1a06ed,this['_commandService']=_0x37a8cb,this['_insertStateService']=_0x3d2325,this[_0x1a523a(0x2a0)]=_0x3609d4,this[_0x1a523a(0x429)]=_0x3ce24a,x(this,_0x1a523a(0x19f),null),x(this,_0x1a523a(0x377),null),this[_0x1a523a(0x250)]();}[_0x18b7a6(0x250)](){const _0x27ce6d=_0x18b7a6;var _0x169b40;let {scene:_0xaac165,unitId:_0x28443e}=this[_0x27ce6d(0x30b)],_0x36609d=this[_0x27ce6d(0x29d)][_0x27ce6d(0x1c3)](_0x28443e,i[_0x27ce6d(0x152)][_0x27ce6d(0x2ca)]);if(!_0x36609d)return;let _0x223bb8=(_0x169b40=_0xaac165['onPointerMove$'])==null?void 0x0:_0x169b40[_0x27ce6d(0x296)]({'priority':0x4,'next':([_0xc93668,_0x3eebf3])=>this[_0x27ce6d(0x232)](_0xc93668,_0x3eebf3)}),_0x4a60b4=_0xaac165[_0x27ce6d(0x334)][_0x27ce6d(0x296)]({'priority':0x4,'next':([_0x4fdc7c,_0x5eecb0])=>this[_0x27ce6d(0x209)](_0x36609d,_0x4fdc7c,_0x5eecb0)});this[_0x27ce6d(0x460)]((0x0,i[_0x27ce6d(0x191)])(()=>Ye(_0x223bb8))),this[_0x27ce6d(0x460)]((0x0,i['toDisposable'])(()=>Ye(_0x4a60b4)));let _0x3018c4=this[_0x27ce6d(0x208)][_0x27ce6d(0x442)][_0x27ce6d(0x15f)](()=>this[_0x27ce6d(0x351)]());this[_0x27ce6d(0x460)]((0x0,i[_0x27ce6d(0x191)])(()=>Ye(_0x3018c4))),this[_0x27ce6d(0x460)]((0x0,i[_0x27ce6d(0x191)])(()=>{const _0x4b8128=_0x27ce6d;this[_0x4b8128(0x22a)]();})),this['_syncPreviewObject']();}[_0x18b7a6(0x351)](){const _0x5d2cbe=_0x18b7a6;var _0x146a96,_0x2edaeb;let _0x1605eb=this[_0x5d2cbe(0x208)]['getState']();if(!Xe(_0x1605eb)){this[_0x5d2cbe(0x22a)]();return;}let _0x3291e2=this['_ensurePreviewObject'](),_0x23d67e=this['_insertStateService'][_0x5d2cbe(0x1f5)]();_0x3291e2['updateState']({'point':this[_0x5d2cbe(0x377)],'structureKind':_0x23d67e[_0x5d2cbe(0x28a)],'rootText':_0x23d67e[_0x5d2cbe(0x2fa)],'branchLineType':_0x23d67e[_0x5d2cbe(0x336)],'children':_0x23d67e[_0x5d2cbe(0x471)],'blueprint':_0x23d67e[_0x5d2cbe(0x47a)],'zoomRatio':_0x1605eb[_0x5d2cbe(0x4b8)]}),(_0x146a96=(_0x2edaeb=this[_0x5d2cbe(0x30b)][_0x5d2cbe(0x19e)])[_0x5d2cbe(0x2cc)])==null||_0x146a96[_0x5d2cbe(0x239)](_0x2edaeb,!0x0);}['_ensurePreviewObject'](){const _0x551e79=_0x18b7a6;var _0x5baa5e,_0x10d0f8;if(this[_0x551e79(0x19f)])return this[_0x551e79(0x19f)];let _0x4de32d=this[_0x551e79(0x368)][_0x551e79(0x1f5)](),_0x23c7e9=new Ke(We,{'point':this['_lastPoint'],'structureKind':_0x4de32d['structureKind'],'rootText':_0x4de32d[_0x551e79(0x2fa)],'branchLineType':_0x4de32d[_0x551e79(0x336)],'children':_0x4de32d[_0x551e79(0x471)],'blueprint':_0x4de32d[_0x551e79(0x47a)],'zoomRatio':this[_0x551e79(0x208)][_0x551e79(0x4c8)]()[_0x551e79(0x4b8)]});return this[_0x551e79(0x19f)]=_0x23c7e9,(_0x5baa5e=(_0x10d0f8=this['_renderContext'][_0x551e79(0x19e)])[_0x551e79(0x3e6)])==null||_0x5baa5e[_0x551e79(0x239)](_0x10d0f8,_0x23c7e9,Ge),_0x23c7e9;}['_removePreviewObject'](){const _0x5c5094=_0x18b7a6;var _0xc00b37,_0x171084,_0x193b6f,_0x555352;this['_previewObject']?((_0xc00b37=(_0x171084=this[_0x5c5094(0x30b)]['scene'])[_0x5c5094(0x32b)])==null||_0xc00b37['call'](_0x171084,[this[_0x5c5094(0x19f)]]),this[_0x5c5094(0x19f)]=null,this[_0x5c5094(0x377)]=null,(_0x193b6f=(_0x555352=this[_0x5c5094(0x30b)][_0x5c5094(0x19e)])[_0x5c5094(0x2cc)])==null||_0x193b6f[_0x5c5094(0x239)](_0x555352,!0x0)):this['_lastPoint']=null;}['_getPointFromEvent'](_0x223108){const _0xfe008e=_0x18b7a6;let _0x302c0f=this[_0xfe008e(0x208)][_0xfe008e(0x4c8)]();return Je(_0x223108,{'panOffset':_0x302c0f[_0xfe008e(0x25a)],'zoomRatio':_0x302c0f['zoomRatio']});}[_0x18b7a6(0x232)](_0x3dfcff,_0x58a12b){const _0x2be17e=_0x18b7a6;Xe(this['_stateService'][_0x2be17e(0x4c8)]())&&(this[_0x2be17e(0x377)]=this[_0x2be17e(0x4e9)](_0x3dfcff),this[_0x2be17e(0x351)](),_0x58a12b[_0x2be17e(0x3de)]());}async['_handlePointerDown'](_0xe2ed6,_0x397427,_0x29af34){const _0x5be300=_0x18b7a6;let _0x40be4e=await this[_0x5be300(0x2e2)](_0xe2ed6,_0x397427,_0x29af34);if(!_0x40be4e)return;let _0x87ab2f={'unitId':this[_0x5be300(0x30b)][_0x5be300(0x4bd)],'subUnitId':_0x40be4e[_0x5be300(0x159)]};this['_boardTextEditingService']['ignoreExternalFocusChanges'](),this[_0x5be300(0x429)][_0x5be300(0x363)]({..._0x87ab2f,'shapeId':_0x40be4e[_0x5be300(0x1cb)],'shapeKey':(0x0,n[_0x5be300(0x36d)])(_0x87ab2f[_0x5be300(0x4bd)],_0x40be4e[_0x5be300(0x1cb)]),'visible':!0x0});}async[_0x18b7a6(0x2e2)](_0x7cc4da,_0x2ece61,_0x30ac0c){const _0x2700bb=_0x18b7a6;var _0xeefef3;let _0x14ead8=this[_0x2700bb(0x208)]['getState'](),_0x5be49d=_0x2ece61[_0x2700bb(0x165)]??0x0;if(!Xe(_0x14ead8)||_0x5be49d!==0x0)return null;let _0x4ab6a2=this[_0x2700bb(0x4e9)](_0x2ece61);this['_lastPoint']=_0x4ab6a2,this[_0x2700bb(0x351)]();let _0x6aac41=this[_0x2700bb(0x466)]()[_0x2700bb(0x262)](_0x4ab6a2),_0x56c1f2=this[_0x2700bb(0x368)][_0x2700bb(0x1f5)](),_0x10fbdb=(0x0,i[_0x2700bb(0x289)])(0x6),_0x266cce=_0x7cc4da['getActivePageId'](),_0xd57ccd=this['_commandService'][_0x2700bb(0x486)](t[_0x2700bb(0x198)]['id'],{'unitId':this['_renderContext'][_0x2700bb(0x4bd)],'subUnitId':_0x266cce,'left':_0x6aac41[_0x2700bb(0x3b5)],'top':_0x6aac41[_0x2700bb(0x257)],'rootNodeId':_0x10fbdb,'rootText':_0x56c1f2[_0x2700bb(0x2fa)],'structureKind':_0x56c1f2['structureKind'],'branchLineType':_0x56c1f2[_0x2700bb(0x336)],'children':_0x56c1f2['children'],'blueprint':_0x56c1f2['blueprint']});if(this[_0x2700bb(0x208)]['setActiveTool'](e['BoardToolType'][_0x2700bb(0x2ad)]),_0x30ac0c[_0x2700bb(0x3de)](),(_0xeefef3=_0x2ece61[_0x2700bb(0x36f)])==null||_0xeefef3[_0x2700bb(0x239)](_0x2ece61),!await _0xd57ccd||this[_0x2700bb(0x13f)])return null;let _0x5781b7={'unitId':this[_0x2700bb(0x30b)][_0x2700bb(0x4bd)],'subUnitId':_0x266cce};return this['_elementStateService'][_0x2700bb(0x347)](_0x5781b7,[_0x10fbdb],_0x10fbdb),{'rootNodeId':_0x10fbdb,'subUnitId':_0x266cce};}};G=C([S(0x1,i['IUniverInstanceService']),S(0x2,n[_0x18b7a6(0x468)]),S(0x3,i[_0x18b7a6(0x496)]),S(0x4,(0x0,i[_0x18b7a6(0x46d)])(W)),S(0x5,n['IBoardElementStateService']),S(0x6,(0x0,i['Inject'])(n[_0x18b7a6(0x396)]))],G);var K=class extends i[_0x18b7a6(0x2a4)]{constructor(..._0xf49dba){const _0x47e964=_0x18b7a6;super(..._0xf49dba),x(this,_0x47e964(0x19b),new o[(_0x47e964(0x1f7))]()),x(this,_0x47e964(0x167),this[_0x47e964(0x19b)][_0x47e964(0x4ab)]());}[_0x18b7a6(0x40b)](_0x5bb912){const _0x2237a5=_0x18b7a6;this[_0x2237a5(0x19b)][_0x2237a5(0x1d2)](_0x5bb912);}[_0x18b7a6(0x1a7)](){const _0x541f6f=_0x18b7a6;this[_0x541f6f(0x19b)][_0x541f6f(0x4c2)](),super[_0x541f6f(0x1a7)]();}};function Ze(_0x183e8c){const _0xc3faaf=_0x18b7a6;return typeof _0x183e8c==_0xc3faaf(0x43b)&&Number[_0xc3faaf(0x134)](_0x183e8c)&&_0x183e8c>0x0;}function Qe(_0x594c59,_0x10bb63,_0x3abaf5){const _0x5bd1ca=_0x18b7a6;let _0x32c256=_0x594c59[_0x10bb63],_0x1c6240=(0x0,t[_0x5bd1ca(0x306)])(_0x32c256==null?void 0x0:_0x32c256[_0x5bd1ca(0x27d)]);if(!_0x32c256||!_0x1c6240)return null;let _0x4ee172=(0x0,t['resolveMindMapNodeHostSize'])(_0x32c256,_0x3abaf5);if(!_0x4ee172)return null;let _0x4c4a73=_0x32c256[_0x5bd1ca(0x461)]??_0x32c256['element'][_0x5bd1ca(0x461)],_0x20050e={..._0x594c59,[_0x10bb63]:{..._0x32c256,'transform':{..._0x4c4a73,'width':_0x4ee172['width'],'height':_0x4ee172[_0x5bd1ca(0x19a)]},'element':{..._0x32c256[_0x5bd1ca(0x27d)],'transform':{..._0x32c256['element'][_0x5bd1ca(0x461)],'width':_0x4ee172[_0x5bd1ca(0x3c4)],'height':_0x4ee172['height']}}}};return(0x0,t[_0x5bd1ca(0x3d5)])(_0x20050e,_0x1c6240[_0x5bd1ca(0x166)]);}let $e=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x3df8d4,_0x6a0e9e,_0x536bb7,_0x3cbb25,_0x56021b,_0x35f0d9){const _0x1d0978=_0x18b7a6;super(),this[_0x1d0978(0x30b)]=_0x3df8d4,this[_0x1d0978(0x4ae)]=_0x6a0e9e,this['_boardElementService']=_0x536bb7,this['_textEditingService']=_0x3cbb25,this['_previewRefreshService']=_0x56021b,this[_0x1d0978(0x349)]=_0x35f0d9,x(this,'_activePreview',null),x(this,_0x1d0978(0x3b3),{'match':_0xa07033=>_0xa07033[_0x1d0978(0x4bd)]===this[_0x1d0978(0x30b)][_0x1d0978(0x4bd)]&&!!(0x0,t[_0x1d0978(0x306)])(_0xa07033[_0x1d0978(0x27d)]),'resolveHostSize':_0x43ec43=>this[_0x1d0978(0x1b9)](_0x43ec43),'previewHostSize':_0xdcef9=>this['_previewHostSize'](_0xdcef9),'updateHostSize':_0x520494=>this[_0x1d0978(0x1b0)](_0x520494),'updateShapeText':_0x546ba3=>this[_0x1d0978(0x373)](_0x546ba3)}),this[_0x1d0978(0x460)](this[_0x1d0978(0x4ae)][_0x1d0978(0x48b)](this['_provider'])),this[_0x1d0978(0x39e)](),this['disposeWithMe']((0x0,i['toDisposable'])(()=>this[_0x1d0978(0x22b)]()));}[_0x18b7a6(0x1b0)](_0x5eecea){return this['_previewHostSize'](_0x5eecea);}[_0x18b7a6(0x373)](_0xb62038){const _0xb6d1f8=_0x18b7a6;let _0x10f6a7=_0xb62038[_0xb6d1f8(0x162)][_0xb6d1f8(0x153)]?this[_0xb6d1f8(0x1b9)]({'elementData':_0xb62038[_0xb6d1f8(0x1df)],'params':_0xb62038[_0xb6d1f8(0x162)][_0xb6d1f8(0x153)]}):null,_0x4c495d=_0xb62038['elementData'][_0xb6d1f8(0x461)]??_0xb62038[_0xb6d1f8(0x1df)]['element'][_0xb6d1f8(0x461)];return(!_0x10f6a7||_0x10f6a7[_0xb6d1f8(0x3c4)]===_0x4c495d[_0xb6d1f8(0x3c4)]&&_0x10f6a7[_0xb6d1f8(0x19a)]===_0x4c495d['height'])&&(0x0,n[_0xb6d1f8(0x3c2)])(_0xb62038[_0xb6d1f8(0x162)]['shapeText'],_0xb62038['params'][_0xb6d1f8(0x21a)])?!0x0:this[_0xb6d1f8(0x349)][_0xb6d1f8(0x2fc)](t['UpdateMindMapNodeOperation']['id'],{'unitId':_0xb62038[_0xb6d1f8(0x162)][_0xb6d1f8(0x4bd)],'subUnitId':_0xb62038[_0xb6d1f8(0x162)][_0xb6d1f8(0x159)],'nodeId':_0xb62038[_0xb6d1f8(0x162)][_0xb6d1f8(0x249)],'shapeText':_0xb62038[_0xb6d1f8(0x162)]['shapeText'],..._0x10f6a7?{'hostSize':{'width':_0x10f6a7[_0xb6d1f8(0x3c4)],'height':_0x10f6a7[_0xb6d1f8(0x19a)]}}:null});}[_0x18b7a6(0x28f)](_0x4eb354){const _0x47e2ea=_0x18b7a6;let _0x5e43d3=this[_0x47e2ea(0x1b9)](_0x4eb354);if(!_0x5e43d3)return!0x1;let _0x16d665=_0x4eb354[_0x47e2ea(0x1df)][_0x47e2ea(0x461)]??_0x4eb354[_0x47e2ea(0x1df)]['element'][_0x47e2ea(0x461)];return!this['_activePreview']&&_0x16d665[_0x47e2ea(0x3c4)]===_0x5e43d3[_0x47e2ea(0x3c4)]&&_0x16d665[_0x47e2ea(0x19a)]===_0x5e43d3[_0x47e2ea(0x19a)]||this[_0x47e2ea(0x4a7)](_0x4eb354,_0x5e43d3),!0x0;}['_resolveHostSize'](_0x107b97){const _0x55c19a=_0x18b7a6;return!Ze(_0x107b97[_0x55c19a(0x162)][_0x55c19a(0x3c4)])||!Ze(_0x107b97['params']['height'])?null:(0x0,t['resolveMindMapNodeHostSize'])(_0x107b97['elementData'],{'width':_0x107b97[_0x55c19a(0x162)][_0x55c19a(0x3c4)],'height':_0x107b97[_0x55c19a(0x162)][_0x55c19a(0x19a)]});}[_0x18b7a6(0x39e)](){const _0x2409f0=_0x18b7a6;this[_0x2409f0(0x460)]((0x0,i[_0x2409f0(0x191)])(this[_0x2409f0(0x1aa)][_0x2409f0(0x188)][_0x2409f0(0x34b)]((0x0,o[_0x2409f0(0x4e3)])(this[_0x2409f0(0x26f)]))[_0x2409f0(0x15f)](_0x278296=>{const _0x21b7b5=_0x2409f0;_0x278296||this[_0x21b7b5(0x22b)]();})));}['_syncLayoutPreview'](_0x18c012,_0x264762){const _0x35ddc2=_0x18b7a6;var _0x51ba0d;let _0x4d6ce6=this[_0x35ddc2(0x25c)]['getElementData'](_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x4bd)],_0x18c012['params'][_0x35ddc2(0x159)]),_0x22b5f3=Qe(_0x4d6ce6,_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x249)],_0x264762),_0x4bb50a=(0x0,t[_0x35ddc2(0x306)])((_0x51ba0d=_0x4d6ce6[_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x249)]])==null?void 0x0:_0x51ba0d[_0x35ddc2(0x27d)]);_0x22b5f3&&_0x4bb50a&&(this[_0x35ddc2(0x41e)]={'unitId':_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x4bd)],'subUnitId':_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x159)],'scopeId':_0x4bb50a[_0x35ddc2(0x166)]},this[_0x35ddc2(0x1b5)](_0x22b5f3,_0x4bb50a['structureScopeId'])&&this[_0x35ddc2(0x2eb)]['notify']({'unitId':_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x4bd)],'subUnitId':_0x18c012['params'][_0x35ddc2(0x159)],'nodeId':_0x18c012[_0x35ddc2(0x162)][_0x35ddc2(0x249)],'scopeId':_0x4bb50a[_0x35ddc2(0x166)]}));}['_restoreActivePreview'](){const _0xfa408=_0x18b7a6;let _0x227e41=this[_0xfa408(0x41e)];if(!_0x227e41)return;this[_0xfa408(0x41e)]=null;let _0x129ded=this[_0xfa408(0x25c)][_0xfa408(0x290)](_0x227e41[_0xfa408(0x4bd)],_0x227e41[_0xfa408(0x159)]);this[_0xfa408(0x1b5)](_0x129ded,_0x227e41['scopeId'])&&this[_0xfa408(0x2eb)][_0xfa408(0x40b)]({'unitId':_0x227e41['unitId'],'subUnitId':_0x227e41[_0xfa408(0x159)],'nodeId':_0x227e41['scopeId'],'scopeId':_0x227e41['scopeId']});}[_0x18b7a6(0x1b5)](_0x8e229,_0x137660){const _0x4ee552=_0x18b7a6;let _0x51bd8d=!0x1;if(Object[_0x4ee552(0x1a5)](_0x8e229)[_0x4ee552(0x137)](_0x271127=>{const _0x83061e=_0x4ee552;var _0x2d37a0;let _0x5877da=(0x0,t[_0x83061e(0x306)])(_0x271127[_0x83061e(0x27d)]),_0x423662=(_0x2d37a0=_0x271127[_0x83061e(0x27d)][_0x83061e(0x14d)])==null?void 0x0:_0x2d37a0[_0x83061e(0x3d2)];if(_0x271127[_0x83061e(0x194)]!==_0x137660&&(_0x5877da==null?void 0x0:_0x5877da[_0x83061e(0x166)])!==_0x137660&&(_0x423662==null?void 0x0:_0x423662['structureScopeId'])!==_0x137660)return;let _0x86ecce=this['_getSceneObject'](_0x271127[_0x83061e(0x194)]);_0x86ecce&&(_0x51bd8d=(0x0,n[_0x83061e(0x201)])(_0x86ecce,_0x271127,{'elementData':_0x8e229,'unitId':this[_0x83061e(0x30b)]['unitId']})||_0x51bd8d);}),_0x51bd8d){var _0x5a7b29,_0x425dc2;this['_renderContext'][_0x4ee552(0x19e)][_0x4ee552(0x2cc)](!0x0),(_0x5a7b29=(_0x425dc2=this[_0x4ee552(0x30b)][_0x4ee552(0x19e)])['requestRender'])==null||_0x5a7b29['call'](_0x425dc2);}return _0x51bd8d;}[_0x18b7a6(0x13e)](_0x56a69f){const _0x10ab91=_0x18b7a6;var _0x591f1e;let _0x508c27=(0x0,n[_0x10ab91(0x36d)])(this[_0x10ab91(0x30b)][_0x10ab91(0x4bd)],_0x56a69f),_0x3f05c4=this[_0x10ab91(0x30b)][_0x10ab91(0x19e)];return((_0x591f1e=_0x3f05c4[_0x10ab91(0x4be)])==null?void 0x0:_0x591f1e[_0x10ab91(0x239)](_0x3f05c4,_0x508c27))??this[_0x10ab91(0x30b)][_0x10ab91(0x19e)][_0x10ab91(0x3b6)](_0x508c27)??null;}};$e=C([S(0x1,(0x0,i['Inject'])(n[_0x18b7a6(0x46f)])),S(0x2,(0x0,i[_0x18b7a6(0x46d)])(e[_0x18b7a6(0x2a9)])),S(0x3,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x396)])),S(0x4,(0x0,i[_0x18b7a6(0x46d)])(K)),S(0x5,i[_0x18b7a6(0x496)])],$e);const q={'touchHitRadius':0x16,'radius':0x12,'addChildRadius':0xe,'siblingHoverRadius':0xa,'siblingDotRadius':0x5,'siblingDotGap':0x3,'gap':0xa,'collapsePlusMinDistance':0x2c,'primaryColor':T[_0x18b7a6(0x43a)],'surfaceColor':T[_0x18b7a6(0x16e)],'borderWidth':0x2,'glyphSize':0x8,'addChildGlyphSize':0x6,'siblingGlyphSize':5.5,'glyphWidth':2.4,'glyphHoverWidth':0x3,'badgeFontWeight':0x258,'badgeFontSize':0x12,'fontFamily':T['fontFamily']};function et(_0x5e3a01){const _0x5de3a3=_0x18b7a6;let _0x55e9f2=q['radius'],_0x59dd29=q[_0x5de3a3(0x418)],_0x1b6911=q[_0x5de3a3(0x3c5)],_0x54be49=q[_0x5de3a3(0x443)],_0x3866e0=q[_0x5de3a3(0x29f)],_0x454de9=_0x3866e0+q['siblingDotGap'],_0x2e61b7=q['collapsePlusMinDistance'],_0x91e782=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x257)]+_0x5e3a01['bounds'][_0x5de3a3(0x19a)]/0x2,_0x546251=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3b5)]+_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3c4)]/0x2,_0x3438fb=_0x5e3a01['bounds'][_0x5de3a3(0x3b5)]-_0x55e9f2-_0x54be49,_0x477e99=_0x5e3a01['bounds'][_0x5de3a3(0x3b5)]+_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3c4)]+_0x55e9f2+_0x54be49,_0x16710f=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x257)]-_0x55e9f2-_0x54be49,_0x4af173=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x257)]+_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x19a)]+_0x55e9f2+_0x54be49,_0x297633=_0x5e3a01[_0x5de3a3(0x2a7)]['left']-_0x59dd29-_0x54be49,_0x55d7d4=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3b5)]+_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3c4)]+_0x59dd29+_0x54be49,_0x4b0fe9=_0x5e3a01['bounds'][_0x5de3a3(0x257)]-_0x59dd29-_0x54be49,_0x7185b8=_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x257)]+_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x19a)]+_0x59dd29+_0x54be49,_0x33a159=[],_0x238f91=_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x257)||_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x2c0),_0xc0ebeb=_0x238f91?_0x546251:_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x3b5)?_0x3438fb:_0x477e99,_0x13c552=_0x238f91?_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x257)?_0x16710f:_0x4af173:_0x91e782;if(_0x5e3a01['hasChildren']&&_0x5e3a01['collapsedDescendantCount']>0x0)return _0x33a159[_0x5de3a3(0x422)]({'kind':'toggle-collapse','x':_0xc0ebeb,'y':_0x13c552,'radius':_0x55e9f2,'badgeCount':_0x5e3a01[_0x5de3a3(0x480)]}),_0x33a159;if(_0x5e3a01['isRoot']?(_0x5e3a01[_0x5de3a3(0x3a6)]??(_0x238f91?[_0x5de3a3(0x257),_0x5de3a3(0x2c0)]:['left',_0x5de3a3(0x181)]))[_0x5de3a3(0x137)](_0x386f60=>{const _0x3d545e=_0x5de3a3;_0x386f60==='top'?_0x33a159[_0x3d545e(0x422)]({'kind':'add-child-top','x':_0x546251,'y':_0x4b0fe9,'radius':_0x59dd29}):_0x386f60===_0x3d545e(0x2c0)?_0x33a159['push']({'kind':_0x3d545e(0x1bd),'x':_0x546251,'y':_0x7185b8,'radius':_0x59dd29}):_0x386f60===_0x3d545e(0x3b5)?_0x33a159[_0x3d545e(0x422)]({'kind':_0x3d545e(0x39a),'x':_0x297633,'y':_0x91e782,'radius':_0x59dd29}):_0x33a159[_0x3d545e(0x422)]({'kind':_0x3d545e(0x16d),'x':_0x55d7d4,'y':_0x91e782,'radius':_0x59dd29});}):(_0x33a159[_0x5de3a3(0x422)]({'kind':_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x3b5)?'add-child-left':_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x257)?'add-child-top':_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x2c0)?'add-child-bottom':'add-child-right','x':_0x238f91?_0x546251:_0x5e3a01[_0x5de3a3(0x2d8)]==='left'?_0x297633:_0x55d7d4,'y':_0x238f91?_0x5e3a01[_0x5de3a3(0x2d8)]==='top'?_0x4b0fe9:_0x7185b8:_0x91e782,'radius':_0x59dd29}),_0x238f91?(_0x33a159[_0x5de3a3(0x422)]({'kind':_0x5de3a3(0x2d0),'placement':_0x5de3a3(0x3b1),'x':_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x3b5)]-_0x454de9,'y':_0x91e782,'radius':_0x1b6911,'visualRadius':_0x3866e0}),_0x33a159[_0x5de3a3(0x422)]({'kind':'add-sibling-after','placement':_0x5de3a3(0x48c),'x':_0x5e3a01[_0x5de3a3(0x2a7)]['left']+_0x5e3a01['bounds'][_0x5de3a3(0x3c4)]+_0x454de9,'y':_0x91e782,'radius':_0x1b6911,'visualRadius':_0x3866e0})):(_0x33a159['push']({'kind':_0x5de3a3(0x2d0),'placement':'before','x':_0x546251,'y':_0x5e3a01[_0x5de3a3(0x2a7)][_0x5de3a3(0x257)]-_0x454de9,'radius':_0x1b6911,'visualRadius':_0x3866e0}),_0x33a159[_0x5de3a3(0x422)]({'kind':_0x5de3a3(0x2c1),'placement':_0x5de3a3(0x48c),'x':_0x546251,'y':_0x5e3a01['bounds'][_0x5de3a3(0x257)]+_0x5e3a01['bounds'][_0x5de3a3(0x19a)]+_0x454de9,'radius':_0x1b6911,'visualRadius':_0x3866e0}))),_0x5e3a01[_0x5de3a3(0x383)]){let _0x13ade8={'kind':_0x5de3a3(0x16f),'x':_0xc0ebeb,'y':_0x13c552,'radius':_0x55e9f2};_0x33a159[_0x5de3a3(0x422)](_0x13ade8);let _0x264372=_0x33a159[_0x5de3a3(0x3a5)](_0x4e321a=>_0x4e321a[_0x5de3a3(0x4ea)]===(_0x5e3a01['side']===_0x5de3a3(0x3b5)?_0x5de3a3(0x39a):_0x5e3a01[_0x5de3a3(0x2d8)]==='top'?_0x5de3a3(0x2ec):_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x2c0)?'add-child-bottom':'add-child-right'));_0x264372&&Math[_0x5de3a3(0x2b2)](_0x264372['x']-_0x13ade8['x'],_0x264372['y']-_0x13ade8['y'])<_0x2e61b7&&(_0x5e3a01['side']===_0x5de3a3(0x257)||_0x5e3a01[_0x5de3a3(0x2d8)]==='bottom'?_0x264372['y']=_0x13ade8['y']+(_0x5e3a01[_0x5de3a3(0x2d8)]==='top'?-_0x2e61b7:_0x2e61b7):_0x264372['x']=_0x13ade8['x']+(_0x5e3a01[_0x5de3a3(0x2d8)]===_0x5de3a3(0x3b5)?-_0x2e61b7:_0x2e61b7));}return _0x33a159;}const tt=_0x18b7a6(0x30d),nt=n['BOARD_RENDER_LAYER_INDEX'][_0x18b7a6(0x327)];function rt(_0x1455e8,_0x4fa8a2){return!!_0x1455e8&&_0x1455e8['kind']===_0x4fa8a2['kind']&&_0x1455e8['x']===_0x4fa8a2['x']&&_0x1455e8['y']===_0x4fa8a2['y'];}var it=class extends a[_0x18b7a6(0x2f3)]{constructor(_0x1df775=tt,_0x2af05a){const _0x40c871=_0x18b7a6;super(_0x1df775),x(this,_0x40c871(0x438),{'controls':[]}),this['evented']=!0x0,this['zIndex']=n['BOARD_RENDER_OBJECT_Z_INDEX'][_0x40c871(0x184)],this[_0x40c871(0x330)](_0x2af05a);}[_0x18b7a6(0x330)](_0x2eac71){const _0x69c569=_0x18b7a6;this[_0x69c569(0x438)]={...this[_0x69c569(0x438)],..._0x2eac71},this[_0x69c569(0x438)][_0x69c569(0x226)][_0x69c569(0x2e5)]>0x0?this[_0x69c569(0x48d)]():this[_0x69c569(0x1ab)](),this['makeDirty'](!0x0);}[_0x18b7a6(0x154)](_0x5f11cf){const _0x1acf8c=_0x18b7a6;!_0x5f11cf&&!this[_0x1acf8c(0x438)][_0x1acf8c(0x13b)]||_0x5f11cf&&rt(this[_0x1acf8c(0x438)][_0x1acf8c(0x13b)],_0x5f11cf)||(this['_state']={...this['_state'],'hoveredControl':_0x5f11cf},this[_0x1acf8c(0x2cc)](!0x0));}[_0x18b7a6(0x458)](_0xcc16b5,_0x1d3b95){const _0x55f2d5=_0x18b7a6;var _0x4c0fe9;let _0x30d1f8=(_0x4c0fe9=this[_0x55f2d5(0x26a)]())==null?void 0x0:_0x4c0fe9[_0x55f2d5(0x21b)](),_0xb32e7f=null,_0x16c389=0x1/0x0;for(let _0x220bc6=this['_state']['controls'][_0x55f2d5(0x2e5)]-0x1;_0x220bc6>=0x0;--_0x220bc6){let _0x35e602=this['_state'][_0x55f2d5(0x226)][_0x220bc6],_0x156820=Math[_0x55f2d5(0x2b2)](_0xcc16b5['x']-_0x35e602['x'],_0xcc16b5['y']-_0x35e602['y']);if(_0x1d3b95!==a[_0x55f2d5(0x4aa)][_0x55f2d5(0x2d5)]){if(_0x156820<=_0x35e602[_0x55f2d5(0x4c3)])return _0x35e602;continue;}let _0x163946=Math['hypot']((_0xcc16b5['x']-_0x35e602['x'])*((_0x30d1f8==null?void 0x0:_0x30d1f8['scaleX'])??0x1),(_0xcc16b5['y']-_0x35e602['y'])*((_0x30d1f8==null?void 0x0:_0x30d1f8[_0x55f2d5(0x3fa)])??0x1));(_0x156820<=_0x35e602['radius']||_0x163946<=q['touchHitRadius'])&&_0x163946<_0x16c389&&(_0xb32e7f=_0x35e602,_0x16c389=_0x163946);}return _0xb32e7f;}[_0x18b7a6(0x148)](_0x272cd0){const _0x5cf3ff=_0x18b7a6;var _0x571e55;let _0x56c535=this[_0x5cf3ff(0x458)](_0x272cd0,a['DeviceType'][_0x5cf3ff(0x2d5)]),_0x106a4d=(_0x571e55=this[_0x5cf3ff(0x26a)]())==null?void 0x0:_0x571e55['getAncestorScale']();return _0x56c535?Math[_0x5cf3ff(0x2b2)]((_0x272cd0['x']-_0x56c535['x'])*((_0x106a4d==null?void 0x0:_0x106a4d[_0x5cf3ff(0x44c)])??0x1),(_0x272cd0['y']-_0x56c535['y'])*((_0x106a4d==null?void 0x0:_0x106a4d[_0x5cf3ff(0x3fa)])??0x1)):0x1/0x0;}[_0x18b7a6(0x3e4)](_0x47c6f5){return!!this['getHitControl']({'x':_0x47c6f5['x'],'y':_0x47c6f5['y']});}[_0x18b7a6(0x3f4)](_0x1ae149,_0x4e981a){const _0x512302=_0x18b7a6;return!this['visible']||this['_state'][_0x512302(0x226)][_0x512302(0x2e5)]===0x0?(this['makeDirty'](!0x1),this):(_0x1ae149[_0x512302(0x4dc)](),this[_0x512302(0x438)]['controls']['forEach'](_0x4d8f79=>{const _0x7ef804=_0x512302;let _0x5272d7=rt(this[_0x7ef804(0x438)][_0x7ef804(0x13b)],_0x4d8f79),_0x561542=_0x4d8f79['badgeCount']!==void 0x0,_0x1e1ef4=_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x39a)||_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x16d)||_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x2ec)||_0x4d8f79[_0x7ef804(0x4ea)]==='add-child-bottom',_0x4ffabd=_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x2d0)||_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x2c1),_0x5d7273=_0x4ffabd&&!_0x5272d7?_0x4d8f79['visualRadius']??_0x4d8f79[_0x7ef804(0x4c3)]:_0x4d8f79[_0x7ef804(0x4c3)];if(_0x1ae149[_0x7ef804(0x42a)](),_0x1ae149[_0x7ef804(0x267)]=_0x4d8f79[_0x7ef804(0x4ea)]===_0x7ef804(0x16f)?q[_0x7ef804(0x16e)]:q[_0x7ef804(0x43a)],_0x1ae149[_0x7ef804(0x26b)]=q[_0x7ef804(0x43a)],_0x1ae149[_0x7ef804(0x426)]=q['borderWidth'],_0x1ae149['arc'](_0x4d8f79['x'],_0x4d8f79['y'],_0x5d7273,0x0,Math['PI']*0x2),_0x1ae149[_0x7ef804(0x3e9)](),(!_0x4ffabd||_0x5272d7)&&_0x1ae149[_0x7ef804(0x177)](),!_0x561542&&(!_0x4ffabd||_0x5272d7)){if(_0x1ae149['beginPath'](),_0x1ae149['strokeStyle']=_0x4d8f79[_0x7ef804(0x4ea)]==='toggle-collapse'?q[_0x7ef804(0x43a)]:q[_0x7ef804(0x16e)],_0x1ae149[_0x7ef804(0x426)]=_0x4ffabd?q[_0x7ef804(0x319)]:_0x5272d7?q[_0x7ef804(0x3cf)]:q[_0x7ef804(0x319)],_0x1ae149['lineCap']=_0x7ef804(0x304),_0x4d8f79[_0x7ef804(0x4ea)]==='toggle-collapse'){let _0x4a0923=q[_0x7ef804(0x435)];_0x1ae149[_0x7ef804(0x172)](_0x4d8f79['x']+_0x4a0923/0x2,_0x4d8f79['y']-_0x4a0923),_0x1ae149['lineTo'](_0x4d8f79['x']-_0x4a0923/0x2,_0x4d8f79['y']),_0x1ae149['lineTo'](_0x4d8f79['x']+_0x4a0923/0x2,_0x4d8f79['y']+_0x4a0923);}else{let _0x4025e9=_0x4ffabd?q[_0x7ef804(0x2f9)]:_0x1e1ef4?q[_0x7ef804(0x1ec)]:q[_0x7ef804(0x435)];_0x1ae149['moveTo'](_0x4d8f79['x']-_0x4025e9,_0x4d8f79['y']),_0x1ae149[_0x7ef804(0x2c6)](_0x4d8f79['x']+_0x4025e9,_0x4d8f79['y']),_0x1ae149[_0x7ef804(0x172)](_0x4d8f79['x'],_0x4d8f79['y']-_0x4025e9),_0x1ae149[_0x7ef804(0x2c6)](_0x4d8f79['x'],_0x4d8f79['y']+_0x4025e9);}_0x1ae149[_0x7ef804(0x177)]();}_0x561542&&(_0x1ae149[_0x7ef804(0x267)]=q[_0x7ef804(0x43a)],_0x1ae149[_0x7ef804(0x15c)]=q[_0x7ef804(0x2a3)]+'\x20'+q[_0x7ef804(0x315)]+_0x7ef804(0x3f3)+q['fontFamily'],_0x1ae149[_0x7ef804(0x2b3)]=_0x7ef804(0x280),_0x1ae149[_0x7ef804(0x4e1)]=_0x7ef804(0x1fc),_0x1ae149[_0x7ef804(0x3dc)](String(_0x4d8f79[_0x7ef804(0x248)]),_0x4d8f79['x'],_0x4d8f79['y']));}),_0x1ae149['restore'](),this[_0x512302(0x2cc)](!0x1),this);}};function at(_0x1f3d47){const _0xc2701e=_0x18b7a6;return _0x1f3d47===_0xc2701e(0x307)||_0x1f3d47===_0xc2701e(0x1c2)||_0x1f3d47===_0xc2701e(0x32a);}function ot(_0x344986){const _0x3e9b68=_0x18b7a6;return _0x344986===_0x3e9b68(0x4d7)||_0x344986==='timeline-vertical';}function st(_0x14e1f1,_0x3e87d5){const _0x2c8603=_0x18b7a6;let _0x32cb70=Number[_0x2c8603(0x134)](_0x3e87d5[_0x2c8603(0x4b8)])&&_0x3e87d5[_0x2c8603(0x4b8)]>0x0?_0x3e87d5['zoomRatio']:0x1;return{'x':Math['round']((_0x14e1f1['offsetX']-_0x3e87d5[_0x2c8603(0x39d)]['x'])/_0x32cb70),'y':Math['round']((_0x14e1f1['offsetY']-_0x3e87d5[_0x2c8603(0x39d)]['y'])/_0x32cb70)};}let ct=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x36079c,_0x38b7d7,_0x356409,_0x25c6b0,_0x418f46,_0x1bbdd7,_0x433512,_0x174acc,_0x38ace8){const _0x5e4180=_0x18b7a6;super(),this[_0x5e4180(0x30b)]=_0x36079c,this[_0x5e4180(0x25c)]=_0x38b7d7,this[_0x5e4180(0x2a0)]=_0x356409,this[_0x5e4180(0x208)]=_0x25c6b0,this[_0x5e4180(0x349)]=_0x418f46,this[_0x5e4180(0x429)]=_0x1bbdd7,this['_localeService']=_0x433512,this[_0x5e4180(0x2eb)]=_0x174acc,this[_0x5e4180(0x40c)]=_0x38ace8,x(this,_0x5e4180(0x473),null),x(this,'_objectEventDisposables',null),x(this,'_activeNodeId',null),x(this,_0x5e4180(0x4cb),null),this[_0x5e4180(0x250)]();}[_0x18b7a6(0x250)](){const _0x28c08c=_0x18b7a6;var _0x57b5e9,_0x3cf8ed,_0x165723;let {scene:_0x78324e}=this[_0x28c08c(0x30b)],_0x19c5cc=(_0x57b5e9=_0x78324e[_0x28c08c(0x378)])==null?void 0x0:_0x57b5e9[_0x28c08c(0x239)](_0x78324e);_0x19c5cc&&(this['disposeWithMe']((0x0,i[_0x28c08c(0x191)])(_0x19c5cc[_0x28c08c(0x1b2)]['pipe']((0x0,o[_0x28c08c(0x4e3)])(this[_0x28c08c(0x26f)]))[_0x28c08c(0x15f)](({objects:_0x8b2434})=>{const _0x164270=_0x28c08c;this[_0x164270(0x23a)](_0x8b2434,{'hideRootControls':!0x0});}))),this[_0x28c08c(0x460)]((0x0,i[_0x28c08c(0x191)])(_0x19c5cc[_0x28c08c(0x1e7)]['pipe']((0x0,o[_0x28c08c(0x4e3)])(this[_0x28c08c(0x26f)]))[_0x28c08c(0x15f)](_0x4e9f9c=>{const _0x1f8f2f=_0x28c08c;let _0x5a8085=_0x4e9f9c==null?void 0x0:_0x4e9f9c[_0x1f8f2f(0x434)];this['_syncControls'](_0x5a8085),setTimeout(()=>this[_0x1f8f2f(0x23a)](_0x5a8085),0x0);})))),this[_0x28c08c(0x460)]((0x0,i[_0x28c08c(0x191)])(this[_0x28c08c(0x2a0)]['state$']['pipe']((0x0,o[_0x28c08c(0x4e3)])(this['dispose$']))['subscribe'](()=>this[_0x28c08c(0x23a)]()))),this[_0x28c08c(0x460)]((0x0,i['toDisposable'])(this['_stateService'][_0x28c08c(0x442)][_0x28c08c(0x34b)]((0x0,o[_0x28c08c(0x4e3)])(this[_0x28c08c(0x26f)]))['subscribe'](()=>this[_0x28c08c(0x23a)]()))),this[_0x28c08c(0x460)]((0x0,i['toDisposable'])(this[_0x28c08c(0x25c)][_0x28c08c(0x1da)][_0x28c08c(0x34b)]((0x0,o['takeUntil'])(this[_0x28c08c(0x26f)]))['subscribe'](_0x317e17=>{const _0x32f007=_0x28c08c;let _0x5dfc6d=this[_0x32f007(0x2a0)][_0x32f007(0x138)]()[_0x32f007(0x2ab)];_0x5dfc6d&&_0x317e17[_0x32f007(0x3c1)](_0x1ef982=>_0x1ef982[_0x32f007(0x4bd)]===_0x5dfc6d[_0x32f007(0x4bd)]&&_0x1ef982[_0x32f007(0x159)]===_0x5dfc6d[_0x32f007(0x159)]&&(_0x1ef982[_0x32f007(0x194)]===this[_0x32f007(0x3e8)]||_0x1ef982[_0x32f007(0x194)]===this[_0x32f007(0x4cb)]))&&this[_0x32f007(0x23a)]();}))),this[_0x28c08c(0x460)]((0x0,i[_0x28c08c(0x191)])(this[_0x28c08c(0x2eb)][_0x28c08c(0x167)][_0x28c08c(0x34b)]((0x0,o[_0x28c08c(0x4e3)])(this[_0x28c08c(0x26f)]))[_0x28c08c(0x15f)](_0x41071a=>{const _0x258be9=_0x28c08c;let _0x57ec96=this[_0x258be9(0x2a0)][_0x258be9(0x138)]()[_0x258be9(0x2ab)];_0x57ec96&&_0x57ec96['unitId']===_0x41071a[_0x258be9(0x4bd)]&&_0x57ec96['subUnitId']===_0x41071a['subUnitId']&&(this[_0x258be9(0x4cb)]&&this['_activeScopeId']!==_0x41071a['scopeId']||this[_0x258be9(0x23a)]());}))),this['disposeWithMe']((0x0,i['toDisposable'])(_0x78324e['onPointerMove$']['subscribeEvent'](_0x43518c=>this[_0x28c08c(0x232)](_0x43518c)))),this['disposeWithMe']((0x0,i[_0x28c08c(0x191)])(_0x78324e[_0x28c08c(0x334)][_0x28c08c(0x296)]({'priority':0x4,'next':([_0x2f15bb,_0x3f0210])=>{const _0x174032=_0x28c08c;this[_0x174032(0x209)](_0x2f15bb)&&this[_0x174032(0x4e7)](_0x2f15bb,_0x3f0210);}}))),this[_0x28c08c(0x460)]((0x0,i[_0x28c08c(0x191)])(((_0x3cf8ed=_0x78324e[_0x28c08c(0x47c)])==null?void 0x0:_0x3cf8ed[_0x28c08c(0x296)]({'priority':0x4,'next':([_0x5e3ed4,_0x3a7b0b])=>{const _0x16eeeb=_0x28c08c;this[_0x16eeeb(0x168)](_0x5e3ed4)&&this['_consumeControlEvent'](_0x5e3ed4,_0x3a7b0b);}}))??{'dispose':()=>{}})),this[_0x28c08c(0x460)]((0x0,i['toDisposable'])(((_0x165723=_0x78324e[_0x28c08c(0x285)])==null?void 0x0:_0x165723['subscribeEvent']({'priority':0x4,'next':([_0x5b00aa,_0x2ceaf3])=>{const _0xd6e36e=_0x28c08c;this[_0xd6e36e(0x168)](_0x5b00aa)&&this[_0xd6e36e(0x4e7)](_0x5b00aa,_0x2ceaf3);}}))??{'dispose':()=>{}})),this['disposeWithMe']((0x0,i[_0x28c08c(0x191)])(()=>this[_0x28c08c(0x4ad)]())),this['_syncControls']();}['_ensureObject'](){const _0x4dc8a9=_0x18b7a6;return this['_object']||(this[_0x4dc8a9(0x473)]=new it(tt),this[_0x4dc8a9(0x3ff)](this['_object']),this['_renderContext']['scene'][_0x4dc8a9(0x3e6)](this[_0x4dc8a9(0x473)],nt)),this[_0x4dc8a9(0x473)];}[_0x18b7a6(0x3ff)](_0x53bb52){const _0x5ba2c2=_0x18b7a6;var _0x1e8101;(_0x1e8101=this['_objectEventDisposables'])==null||_0x1e8101[_0x5ba2c2(0x1a7)]();let _0x1d1409=new i[(_0x5ba2c2(0x24a))]();_0x1d1409[_0x5ba2c2(0x3f1)](_0x53bb52['onPointerDown$'][_0x5ba2c2(0x296)]({'priority':0x4,'next':([_0x5243ee,_0x1d9963])=>{const _0x5c6b8a=_0x5ba2c2;this[_0x5c6b8a(0x209)](_0x5243ee)&&this[_0x5c6b8a(0x4e7)](_0x5243ee,_0x1d9963);}})),_0x1d1409['add'](_0x53bb52[_0x5ba2c2(0x47c)][_0x5ba2c2(0x296)]({'priority':0x4,'next':([_0x592564,_0x12a947])=>{const _0x2e57da=_0x5ba2c2;this[_0x2e57da(0x168)](_0x592564)&&this[_0x2e57da(0x4e7)](_0x592564,_0x12a947);}})),_0x1d1409['add'](_0x53bb52[_0x5ba2c2(0x285)][_0x5ba2c2(0x296)]({'priority':0x4,'next':([_0x3e7e3e,_0x21bcb0])=>{const _0xf2e4b7=_0x5ba2c2;this[_0xf2e4b7(0x168)](_0x3e7e3e)&&this[_0xf2e4b7(0x4e7)](_0x3e7e3e,_0x21bcb0);}})),this[_0x5ba2c2(0x337)]=_0x1d1409;}[_0x18b7a6(0x4ad)](){const _0x2bfb08=_0x18b7a6;var _0x3ec136;this[_0x2bfb08(0x473)]&&(this['_renderContext'][_0x2bfb08(0x19e)][_0x2bfb08(0x32b)]([this[_0x2bfb08(0x473)]]),(_0x3ec136=this[_0x2bfb08(0x337)])==null||_0x3ec136[_0x2bfb08(0x1a7)](),this[_0x2bfb08(0x337)]=null,this[_0x2bfb08(0x473)]=null,this[_0x2bfb08(0x3e8)]=null,this[_0x2bfb08(0x4cb)]=null,this['_renderContext'][_0x2bfb08(0x19e)]['makeDirty'](!0x0));}[_0x18b7a6(0x23a)](_0x5ebb0c,_0x5d34a4){const _0xf5c2ec=_0x18b7a6;var _0x313823,_0x4c7f59;if(this[_0xf5c2ec(0x208)][_0xf5c2ec(0x4c8)]()['interactionMode']===_0xf5c2ec(0x1cc)){this[_0xf5c2ec(0x4ad)]();return;}let _0x301427=this[_0xf5c2ec(0x2a0)][_0xf5c2ec(0x138)](),_0x71f22e=_0x301427[_0xf5c2ec(0x2ab)],_0x544551=_0x301427[_0xf5c2ec(0x1e6)]??_0x301427['selectedIds'][0x0];if(!_0x71f22e||!_0x544551||_0x301427[_0xf5c2ec(0x29e)][_0xf5c2ec(0x2e5)]!==0x1){this[_0xf5c2ec(0x4ad)]();return;}let _0x517e32=this[_0xf5c2ec(0x25c)][_0xf5c2ec(0x290)](_0x71f22e[_0xf5c2ec(0x4bd)],_0x71f22e[_0xf5c2ec(0x159)]),_0x5b4612=_0x517e32[_0x544551],_0x15729e=(0x0,t[_0xf5c2ec(0x306)])(_0x5b4612==null?void 0x0:_0x5b4612['element']);if(!_0x5b4612||!_0x15729e){this[_0xf5c2ec(0x4ad)]();return;}let _0x270591=(0x0,n[_0xf5c2ec(0x36d)])(_0x71f22e[_0xf5c2ec(0x4bd)],_0x544551);if(_0x5d34a4!=null&&_0x5d34a4[_0xf5c2ec(0x328)]&&_0x15729e[_0xf5c2ec(0x43f)]==null&&_0x5ebb0c!=null&&_0x5ebb0c[_0xf5c2ec(0x15e)](_0x270591)){this['_removeObject']();return;}let _0x19a1ba=this['_resolveControlBounds'](_0x517e32,_0x71f22e[_0xf5c2ec(0x4bd)],_0x544551,_0x5ebb0c);if(!_0x19a1ba){this['_removeObject']();return;}let _0x33ac6f=Object[_0xf5c2ec(0x1a5)](_0x517e32)['filter'](_0xefd8ce=>{const _0x3b3110=_0xf5c2ec;var _0x1c6ca4;return((_0x1c6ca4=(0x0,t[_0x3b3110(0x306)])(_0xefd8ce['element']))==null?void 0x0:_0x1c6ca4[_0x3b3110(0x43f)])===_0x544551;}),_0x41f6a0=_0x15729e[_0xf5c2ec(0x1e9)]?this[_0xf5c2ec(0x20f)](_0x517e32,_0x544551):0x0;this[_0xf5c2ec(0x3e8)]=_0x544551,this[_0xf5c2ec(0x4cb)]=_0x15729e[_0xf5c2ec(0x166)];let _0xe260ac=(_0x313823=_0x517e32[_0x15729e[_0xf5c2ec(0x166)]])==null?void 0x0:_0x313823[_0xf5c2ec(0x27d)],_0x3982eb=(0x0,t[_0xf5c2ec(0x195)])(_0xe260ac),_0x59dfd1=_0xe260ac==null||(_0x4c7f59=_0xe260ac[_0xf5c2ec(0x14d)])==null||(_0x4c7f59=_0x4c7f59[_0xf5c2ec(0x3bc)])==null||(_0x4c7f59=_0x4c7f59[_0xf5c2ec(0x240)])==null?void 0x0:_0x4c7f59[_0xf5c2ec(0x28a)],_0x1bfc6b=(_0x3982eb==null?void 0x0:_0x3982eb['layout']['structureKind'])??_0x59dfd1,_0x149510=_0x15729e[_0xf5c2ec(0x43f)]==null,_0x329efe=this['_resolveControlSide'](_0x15729e[_0xf5c2ec(0x2d8)],_0x149510,_0x1bfc6b);this[_0xf5c2ec(0x2e0)]()[_0xf5c2ec(0x330)]({'controls':et({'bounds':_0x19a1ba,'isRoot':_0x149510,'side':_0x329efe,'rootChildSides':this['_resolveRootChildControlSides'](_0x149510,_0x1bfc6b),'hasChildren':_0x33ac6f['length']>0x0,'collapsedDescendantCount':_0x41f6a0})}),this[_0xf5c2ec(0x30b)][_0xf5c2ec(0x19e)][_0xf5c2ec(0x2cc)](!0x0);}['_resolveControlSide'](_0x48895e,_0x246005,_0x27b71a){const _0x7673b6=_0x18b7a6;return _0x27b71a===_0x7673b6(0x485)?!_0x246005&&(_0x48895e===_0x7673b6(0x3b5)||_0x48895e==='right')?_0x48895e:_0x7673b6(0x2c0):_0x27b71a==='mindmap-vertical'?!_0x246005&&(_0x48895e===_0x7673b6(0x257)||_0x48895e===_0x7673b6(0x2c0))?_0x48895e:_0x7673b6(0x2c0):_0x48895e===_0x7673b6(0x3b5)?'left':_0x7673b6(0x181);}[_0x18b7a6(0x38f)](_0x2c0898,_0x34abe8){const _0x539b52=_0x18b7a6;if(_0x2c0898){if(at(_0x34abe8))return[_0x539b52(0x2c0)];if(_0x34abe8===_0x539b52(0x4d7))return[_0x539b52(0x181)];if(_0x34abe8==='timeline-vertical')return[_0x539b52(0x2c0)];}}[_0x18b7a6(0x19d)](_0xe624bb){const _0x9518d3=_0x18b7a6;var _0x5dc9da,_0x5215e3;let _0x357279=this[_0x9518d3(0x2a0)][_0x9518d3(0x138)]()[_0x9518d3(0x2ab)];if(!_0x357279||!this['_activeNodeId'])return;let _0x1dd447=this[_0x9518d3(0x25c)][_0x9518d3(0x290)](_0x357279[_0x9518d3(0x4bd)],_0x357279[_0x9518d3(0x159)]),_0x3d78c5=(0x0,t[_0x9518d3(0x306)])((_0x5dc9da=_0x1dd447[this[_0x9518d3(0x3e8)]])==null?void 0x0:_0x5dc9da[_0x9518d3(0x27d)]),_0x2ab491=_0x3d78c5?(0x0,t[_0x9518d3(0x195)])((_0x5215e3=_0x1dd447[_0x3d78c5['structureScopeId']])==null?void 0x0:_0x5215e3[_0x9518d3(0x27d)]):null;if((_0x3d78c5==null?void 0x0:_0x3d78c5['parentNodeId'])!=null||!at(_0x2ab491==null?void 0x0:_0x2ab491[_0x9518d3(0x240)][_0x9518d3(0x28a)])&&!ot(_0x2ab491==null?void 0x0:_0x2ab491['layout'][_0x9518d3(0x28a)]))return _0xe624bb===_0x9518d3(0x39a)?_0x9518d3(0x3b5):_0xe624bb===_0x9518d3(0x2ec)?_0x9518d3(0x257):_0xe624bb===_0x9518d3(0x1bd)?_0x9518d3(0x2c0):_0x9518d3(0x181);}[_0x18b7a6(0x46a)](_0x9ed4fd,_0x43bf96,_0x40dc02,_0x372a05){const _0x793346=_0x18b7a6;var _0x57c08c,_0x3d5fd7;let _0x3fb17a=(0x0,n[_0x793346(0x36d)])(_0x43bf96,_0x40dc02),_0x207d94=_0x372a05==null?void 0x0:_0x372a05[_0x793346(0x16a)](_0x3fb17a),_0x531654=this[_0x793346(0x437)](_0x207d94);if(_0x531654)return _0x531654;let _0x4515bb=this[_0x793346(0x30b)]['scene'],_0x34fb2a=((_0x57c08c=_0x4515bb[_0x793346(0x4be)])==null?void 0x0:_0x57c08c[_0x793346(0x239)](_0x4515bb,_0x3fb17a))??((_0x3d5fd7=_0x4515bb['getObject'])==null?void 0x0:_0x3d5fd7['call'](_0x4515bb,_0x3fb17a));return this[_0x793346(0x437)](_0x34fb2a)||(0x0,e[_0x793346(0x29a)])(_0x9ed4fd,_0x40dc02);}['_toFiniteBounds'](_0x5caf95){const _0x2ddd4b=_0x18b7a6;return _0x5caf95&&Number['isFinite'](_0x5caf95[_0x2ddd4b(0x3b5)])&&Number[_0x2ddd4b(0x134)](_0x5caf95[_0x2ddd4b(0x257)])&&Number[_0x2ddd4b(0x134)](_0x5caf95[_0x2ddd4b(0x3c4)])&&Number[_0x2ddd4b(0x134)](_0x5caf95[_0x2ddd4b(0x19a)])?{'left':_0x5caf95[_0x2ddd4b(0x3b5)],'top':_0x5caf95['top'],'width':_0x5caf95[_0x2ddd4b(0x3c4)],'height':_0x5caf95['height']}:null;}['_countDescendants'](_0x5af886,_0x53b49c){const _0x6d50cd=_0x18b7a6;return Object['values'](_0x5af886)['filter'](_0xf78beb=>{const _0x14a928=_0x4d64;var _0x3bf849;return((_0x3bf849=(0x0,t[_0x14a928(0x306)])(_0xf78beb['element']))==null?void 0x0:_0x3bf849[_0x14a928(0x43f)])===_0x53b49c;})['reduce']((_0x13e05b,_0x193925)=>_0x13e05b+0x1+this[_0x6d50cd(0x20f)](_0x5af886,_0x193925['elementId']),0x0);}[_0x18b7a6(0x232)](_0x31e9eb){const _0x194d5b=_0x18b7a6;if(!this[_0x194d5b(0x473)])return;let _0x1c462b=this[_0x194d5b(0x208)][_0x194d5b(0x4c8)](),_0x3c76e0=st(_0x31e9eb,{'panOffset':_0x1c462b[_0x194d5b(0x25a)],'zoomRatio':_0x1c462b[_0x194d5b(0x4b8)]});this[_0x194d5b(0x473)][_0x194d5b(0x154)](this[_0x194d5b(0x473)][_0x194d5b(0x458)](_0x3c76e0,_0x31e9eb[_0x194d5b(0x3d8)]));}[_0x18b7a6(0x209)](_0x5ecea0){const _0x1f4214=_0x18b7a6;if(!this[_0x1f4214(0x473)]||!this[_0x1f4214(0x3e8)]||(_0x5ecea0[_0x1f4214(0x165)]??0x0)!==0x0)return!0x1;let _0x931918=this[_0x1f4214(0x2a0)][_0x1f4214(0x138)]()[_0x1f4214(0x2ab)];if(!_0x931918)return!0x1;let _0x3b5448=this[_0x1f4214(0x208)][_0x1f4214(0x4c8)](),_0xb574ea=st(_0x5ecea0,{'panOffset':_0x3b5448[_0x1f4214(0x25a)],'zoomRatio':_0x3b5448[_0x1f4214(0x4b8)]}),_0x967e89=this[_0x1f4214(0x473)][_0x1f4214(0x458)](_0xb574ea,_0x5ecea0[_0x1f4214(0x3d8)]);if(!_0x967e89)return!0x1;if(_0x967e89['kind']===_0x1f4214(0x16f))return this[_0x1f4214(0x4ac)](t[_0x1f4214(0x487)]['id'],{'unitId':_0x931918[_0x1f4214(0x4bd)],'subUnitId':_0x931918['subUnitId'],'nodeId':this['_activeNodeId']}),!0x0;if(_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x39a)||_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x16d)||_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x2ec)||_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x1bd)){let _0x2c73ad=(0x0,i['generateRandomId'])(0x6);return this[_0x1f4214(0x313)](t[_0x1f4214(0x283)]['id'],{'unitId':_0x931918['unitId'],'subUnitId':_0x931918[_0x1f4214(0x159)],'parentNodeId':this[_0x1f4214(0x3e8)],'side':this[_0x1f4214(0x19d)](_0x967e89[_0x1f4214(0x4ea)]),'nodeId':_0x2c73ad,'connectorId':(0x0,i[_0x1f4214(0x289)])(0x6),'text':this[_0x1f4214(0x408)]['t'](_0x1f4214(0x1c5))},_0x2c73ad),!0x0;}if(_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x2d0)||_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x2c1)){let _0x5ae5d4=(0x0,i[_0x1f4214(0x289)])(0x6);return this[_0x1f4214(0x313)](t[_0x1f4214(0x35d)]['id'],{'unitId':_0x931918[_0x1f4214(0x4bd)],'subUnitId':_0x931918['subUnitId'],'nodeId':this['_activeNodeId'],'placement':_0x967e89['placement']??(_0x967e89[_0x1f4214(0x4ea)]===_0x1f4214(0x2d0)?_0x1f4214(0x3b1):_0x1f4214(0x48c)),'siblingNodeId':_0x5ae5d4,'connectorId':(0x0,i[_0x1f4214(0x289)])(0x6),'text':this['_localeService']['t'](_0x1f4214(0x1c5))},_0x5ae5d4),!0x0;}return!0x0;}[_0x18b7a6(0x168)](_0x434797){const _0x17d8ff=_0x18b7a6;if(!this['_object']||(_0x434797[_0x17d8ff(0x165)]??0x0)!==0x0)return!0x1;let _0x335fa2=this[_0x17d8ff(0x208)][_0x17d8ff(0x4c8)](),_0x39e8d3=st(_0x434797,{'panOffset':_0x335fa2['viewportPanOffset'],'zoomRatio':_0x335fa2[_0x17d8ff(0x4b8)]});return!!this[_0x17d8ff(0x473)][_0x17d8ff(0x458)](_0x39e8d3,_0x434797[_0x17d8ff(0x3d8)]);}[_0x18b7a6(0x4e7)](_0x476430,_0x3e9e6e){const _0x2a5f12=_0x18b7a6;var _0x1dec77,_0x8c773f;_0x3e9e6e[_0x2a5f12(0x3de)](),(_0x1dec77=_0x476430[_0x2a5f12(0x36f)])==null||_0x1dec77[_0x2a5f12(0x239)](_0x476430),(_0x8c773f=_0x476430[_0x2a5f12(0x3de)])==null||_0x8c773f[_0x2a5f12(0x239)](_0x476430);}['_executeAndLayout'](_0x414c19,_0x15aacf){const _0x4cd890=_0x18b7a6;let _0x4062ae=this[_0x4cd890(0x4cb)];this[_0x4cd890(0x40c)][_0x4cd890(0x3da)](_0x15aacf[_0x4cd890(0x4bd)],()=>{const _0x1a8f6d=_0x4cd890;this[_0x1a8f6d(0x349)][_0x1a8f6d(0x2fc)](_0x414c19,_0x15aacf)&&_0x4062ae&&(this[_0x1a8f6d(0x349)][_0x1a8f6d(0x2fc)](t[_0x1a8f6d(0x246)]['id'],{'unitId':_0x15aacf[_0x1a8f6d(0x4bd)],'subUnitId':_0x15aacf[_0x1a8f6d(0x159)],'scopeId':_0x4062ae}),this[_0x1a8f6d(0x23a)]());});}[_0x18b7a6(0x313)](_0xd931fe,_0x197e2b,_0xdfdcd8){const _0x74ec3d=_0x18b7a6;let _0x3ac504={'unitId':_0x197e2b[_0x74ec3d(0x4bd)],'subUnitId':_0x197e2b['subUnitId']},_0x32ecc2=this[_0x74ec3d(0x349)][_0x74ec3d(0x486)](_0xd931fe,_0x197e2b);Promise['resolve'](_0x32ecc2)[_0x74ec3d(0x2d9)](_0x230a1b=>{const _0x360cc2=_0x74ec3d;_0x230a1b&&(this['_syncControls'](),this[_0x360cc2(0x2a0)]['selectElements'](_0x3ac504,[_0xdfdcd8],_0xdfdcd8),this[_0x360cc2(0x429)]['ignoreExternalFocusChanges'](),this[_0x360cc2(0x429)][_0x360cc2(0x363)]({..._0x3ac504,'shapeId':_0xdfdcd8,'shapeKey':(0x0,n[_0x360cc2(0x36d)])(_0x3ac504[_0x360cc2(0x4bd)],_0xdfdcd8),'visible':!0x0}));});}};ct=C([S(0x1,(0x0,i[_0x18b7a6(0x46d)])(e[_0x18b7a6(0x2a9)])),S(0x2,(0x0,i[_0x18b7a6(0x46d)])(n['IBoardElementStateService'])),S(0x3,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x468)])),S(0x4,i[_0x18b7a6(0x496)]),S(0x5,(0x0,i['Inject'])(n[_0x18b7a6(0x396)])),S(0x6,(0x0,i[_0x18b7a6(0x46d)])(i['LocaleService'])),S(0x7,(0x0,i[_0x18b7a6(0x46d)])(K)),S(0x8,(0x0,i[_0x18b7a6(0x46d)])(s[_0x18b7a6(0x1b6)]))],ct);const lt=_0x18b7a6(0x23d);let J=class extends i[_0x18b7a6(0x2f0)]{constructor(_0x3c64ad,_0x597136){const _0x5dea6e=_0x18b7a6;super(),this[_0x5dea6e(0x349)]=_0x3c64ad,this[_0x5dea6e(0x3e1)]=_0x597136,this[_0x5dea6e(0x250)]();}[_0x18b7a6(0x250)](){const _0x587efd=_0x18b7a6;this[_0x587efd(0x460)](this[_0x587efd(0x3e1)][_0x587efd(0x35b)](this[_0x587efd(0x146)]()));}['_createQuoteShortcut'](){const _0x15822c=_0x18b7a6;return{'id':c['SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID'],'binding':s[_0x15822c(0x3d6)][_0x15822c(0x1dc)]|s[_0x15822c(0x4c4)][_0x15822c(0x2e3)],'priority':0x3e8,'preconditions':_0x5634b0=>_0x5634b0[_0x15822c(0x220)]('FOCUSING_MIND_MAP_TEXT_EDITOR')&&this['_commandService'][_0x15822c(0x3ed)](c[_0x15822c(0x2ba)])};}};J=C([S(0x0,i[_0x18b7a6(0x496)]),S(0x1,s[_0x18b7a6(0x1e0)])],J);const ut=[me,he,lt];let dt=class extends i['RxDisposable']{constructor(_0x1f8f8a,_0x3f7468,_0x3f392d,_0x4cff0c,_0x313735){const _0x15519b=_0x18b7a6;super(),this[_0x15519b(0x30b)]=_0x1f8f8a,this[_0x15519b(0x25c)]=_0x3f7468,this[_0x15519b(0x2a0)]=_0x3f392d,this[_0x15519b(0x1aa)]=_0x4cff0c,this[_0x15519b(0x291)]=_0x313735,x(this,_0x15519b(0x131),!0x1),this['disposeWithMe']((0x0,i[_0x15519b(0x191)])(this['_renderContext'][_0x15519b(0x4cf)][_0x15519b(0x34b)]((0x0,o[_0x15519b(0x4e3)])(this['dispose$']))[_0x15519b(0x15f)](_0x35f8ed=>{const _0x354163=_0x15519b;this[_0x354163(0x131)]=_0x35f8ed,this['_syncContext']();}))),this['disposeWithMe']((0x0,i[_0x15519b(0x191)])(this[_0x15519b(0x2a0)]['state$'][_0x15519b(0x34b)]((0x0,o[_0x15519b(0x4e3)])(this[_0x15519b(0x26f)]))['subscribe'](()=>{const _0xf4185a=_0x15519b;this[_0xf4185a(0x13a)]();}))),this[_0x15519b(0x460)]((0x0,i[_0x15519b(0x191)])(this[_0x15519b(0x1aa)][_0x15519b(0x188)][_0x15519b(0x34b)]((0x0,o[_0x15519b(0x4e3)])(this[_0x15519b(0x26f)]))[_0x15519b(0x15f)](()=>{const _0x4a67c0=_0x15519b;this[_0x4a67c0(0x13a)]();}))),this['_syncContext']();}[_0x18b7a6(0x13a)](){const _0x585a43=_0x18b7a6;var _0x88860,_0x3294de;let _0x24d7d7=this[_0x585a43(0x2a0)][_0x585a43(0x138)](),_0x552a6e=this[_0x585a43(0x1aa)]['getEditing'](),_0x1c2d3a=_0x552a6e!=null&&_0x552a6e[_0x585a43(0x36a)]?_0x552a6e['shapeId']:_0x24d7d7[_0x585a43(0x417)],_0x1a55ce=_0x24d7d7[_0x585a43(0x1e6)]??_0x24d7d7[_0x585a43(0x29e)][0x0],_0x28ba0e=_0x24d7d7['context']??{'unitId':this[_0x585a43(0x30b)][_0x585a43(0x4bd)],'subUnitId':this['_renderContext'][_0x585a43(0x476)][_0x585a43(0x3e7)]()},_0x2ed728=this[_0x585a43(0x131)]&&!!_0x1a55ce&&_0x24d7d7[_0x585a43(0x29e)]['length']===0x1&&!_0x1c2d3a&&!_0x24d7d7['isTransforming'],_0x69fa9b=this[_0x585a43(0x131)]?this[_0x585a43(0x25c)][_0x585a43(0x290)](_0x28ba0e[_0x585a43(0x4bd)],_0x28ba0e[_0x585a43(0x159)]):{};this[_0x585a43(0x291)]['setContextValue'](me,_0x2ed728&&!!(0x0,t[_0x585a43(0x306)])((_0x88860=_0x69fa9b[_0x1a55ce])==null?void 0x0:_0x88860[_0x585a43(0x27d)])),this[_0x585a43(0x291)][_0x585a43(0x444)](he,this[_0x585a43(0x131)]&&_0x24d7d7[_0x585a43(0x29e)][_0x585a43(0x2e5)]===0x0&&!_0x24d7d7[_0x585a43(0x1e6)]&&!_0x1c2d3a&&!_0x24d7d7[_0x585a43(0x142)]),this[_0x585a43(0x291)][_0x585a43(0x444)](lt,!!_0x1c2d3a&&!!(0x0,t[_0x585a43(0x306)])((_0x3294de=_0x69fa9b[_0x1c2d3a])==null?void 0x0:_0x3294de[_0x585a43(0x27d)]));}[_0x18b7a6(0x1a7)](){const _0xe2ca=_0x18b7a6;this[_0xe2ca(0x33f)](),super['dispose']();}[_0x18b7a6(0x33f)](){const _0x3172e5=_0x18b7a6;ut[_0x3172e5(0x137)](_0xd324f7=>this['_contextService'][_0x3172e5(0x444)](_0xd324f7,!0x1));}};dt=C([S(0x1,(0x0,i[_0x18b7a6(0x46d)])(e[_0x18b7a6(0x2a9)])),S(0x2,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x3bf)])),S(0x3,(0x0,i[_0x18b7a6(0x46d)])(n[_0x18b7a6(0x396)])),S(0x4,i[_0x18b7a6(0x341)])],dt);var ft=class extends G{async[_0x18b7a6(0x209)](_0xa16c01,_0x54c5ad,_0x43c440){const _0x5594c8=_0x18b7a6;await this[_0x5594c8(0x2e2)](_0xa16c01,_0x54c5ad,_0x43c440);}};const pt={'id':_0x18b7a6(0x213),'type':i[_0x18b7a6(0x445)][_0x18b7a6(0x32f)],'handler':(_0x4713fb,_0x2b5af8)=>!!(_0x2b5af8!=null&&_0x2b5af8[_0x18b7a6(0x4bd)])&&!!_0x2b5af8[_0x18b7a6(0x159)]&&!!_0x2b5af8[_0x18b7a6(0x17c)]},Y=_0x18b7a6(0x374),mt=[_0x18b7a6(0x4cd),_0x18b7a6(0x240),_0x18b7a6(0x4ed)];t[_0x18b7a6(0x455)][_0x18b7a6(0x32e)],t[_0x18b7a6(0x455)]['siblingGap'],t[_0x18b7a6(0x455)][_0x18b7a6(0x34c)];const ht=[{'labelKey':_0x18b7a6(0x3c6),'key':_0x18b7a6(0x32e),...t['MIND_MAP_LAYOUT_SPACING_LIMITS'][_0x18b7a6(0x32e)]},{'labelKey':_0x18b7a6(0x4db),'key':_0x18b7a6(0x169),...t[_0x18b7a6(0x3d1)][_0x18b7a6(0x169)]},{'labelKey':_0x18b7a6(0x2c8),'key':'branchGap',...t[_0x18b7a6(0x3d1)][_0x18b7a6(0x34c)]}],gt=[{'labelKey':_0x18b7a6(0x310),'value':_0x18b7a6(0x181)},{'labelKey':_0x18b7a6(0x299),'value':_0x18b7a6(0x3b5)},{'labelKey':_0x18b7a6(0x456),'value':_0x18b7a6(0x4a9)}],_t=[{'labelKey':_0x18b7a6(0x3f8),'value':_0x18b7a6(0x2ae)},{'labelKey':_0x18b7a6(0x2df),'value':_0x18b7a6(0x3b9)},{'labelKey':_0x18b7a6(0x269),'value':_0x18b7a6(0x1c2)},{'labelKey':'boards-mind-ui.panel.structureKind.treeLeft','value':_0x18b7a6(0x307)},{'labelKey':_0x18b7a6(0x218),'value':_0x18b7a6(0x32a)},{'labelKey':'boards-mind-ui.panel.structureKind.timelineHorizontal','value':_0x18b7a6(0x4d7)},{'labelKey':_0x18b7a6(0x370),'value':'timeline-vertical'}],vt=[{'labelKey':_0x18b7a6(0x1c0),'value':_0x18b7a6(0x385)},{'labelKey':_0x18b7a6(0x199),'value':_0x18b7a6(0x325)},{'labelKey':'boards-mind-ui.panel.branchLineType.orthogonal','value':_0x18b7a6(0x158)}];function yt(_0x16f893){const _0x2a97c7=_0x18b7a6;let _0x5ee7ba=(_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x28a)])??t[_0x2a97c7(0x455)][_0x2a97c7(0x28a)];return{'spacing':{'horizontalGap':(_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x32e)])??t[_0x2a97c7(0x455)][_0x2a97c7(0x32e)],'siblingGap':(_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x169)])??t['MIND_MAP_DEFAULT_LAYOUT']['siblingGap'],'branchGap':(_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x34c)])??t[_0x2a97c7(0x455)][_0x2a97c7(0x34c)]},'direction':(_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x1a0)])??t['MIND_MAP_DEFAULT_LAYOUT']['direction'],'structureKind':_0x5ee7ba,'branchLineType':(0x0,t[_0x2a97c7(0x31b)])(_0x5ee7ba,_0x16f893==null?void 0x0:_0x16f893[_0x2a97c7(0x336)])};}async function bt(_0x46eab8,_0x22d765){const _0x4217c5=_0x18b7a6;return await Promise[_0x4217c5(0x398)](_0x46eab8[_0x4217c5(0x486)](t['ChangeMindMapLayoutOperation']['id'],_0x22d765))?(await Promise[_0x4217c5(0x398)](_0x46eab8['executeCommand'](t[_0x4217c5(0x246)]['id'],{'unitId':_0x22d765[_0x4217c5(0x4bd)],'subUnitId':_0x22d765[_0x4217c5(0x159)],'scopeId':_0x22d765[_0x4217c5(0x17c)]})),!0x0):!0x1;}async function xt(_0x503007,_0x4ab63a){const _0x50aa64=_0x18b7a6;return await Promise[_0x50aa64(0x398)](_0x503007[_0x50aa64(0x486)](t[_0x50aa64(0x45b)]['id'],_0x4ab63a))?(await Promise[_0x50aa64(0x398)](_0x503007[_0x50aa64(0x486)](t['LayoutMindMapOperation']['id'],{'unitId':_0x4ab63a['unitId'],'subUnitId':_0x4ab63a[_0x50aa64(0x159)],'scopeId':_0x4ab63a[_0x50aa64(0x17c)]})),!0x0):!0x1;}async function St(_0x201fe9,_0x4f180b){const _0x151107=_0x18b7a6;return await Promise[_0x151107(0x398)](_0x201fe9[_0x151107(0x486)](t[_0x151107(0x1b3)]['id'],{'unitId':_0x4f180b[_0x151107(0x4bd)],'subUnitId':_0x4f180b[_0x151107(0x159)],'scopeId':_0x4f180b['scopeId'],..._0x4f180b['horizontalGap']===void 0x0?{}:{'horizontalGap':_0x4f180b[_0x151107(0x32e)]},..._0x4f180b[_0x151107(0x169)]===void 0x0?{}:{'siblingGap':_0x4f180b['siblingGap']},..._0x4f180b[_0x151107(0x34c)]===void 0x0?{}:{'branchGap':_0x4f180b[_0x151107(0x34c)]}}))?(await Promise['resolve'](_0x201fe9['executeCommand'](t[_0x151107(0x246)]['id'],{'unitId':_0x4f180b[_0x151107(0x4bd)],'subUnitId':_0x4f180b[_0x151107(0x159)],'scopeId':_0x4f180b[_0x151107(0x17c)]})),!0x0):!0x1;}async function Ct(_0x3f4e64,_0x310bd4){const _0x293896=_0x18b7a6;return _0x310bd4[_0x293896(0x4b2)]===_0x310bd4[_0x293896(0x1ae)]||!await Promise[_0x293896(0x398)](_0x3f4e64['executeCommand'](t['ReparentMindMapNodeOperation']['id'],{'unitId':_0x310bd4[_0x293896(0x4bd)],'subUnitId':_0x310bd4[_0x293896(0x159)],'nodeId':_0x310bd4[_0x293896(0x4b2)],'targetNodeId':_0x310bd4[_0x293896(0x1ae)],'referenceNodeId':_0x310bd4[_0x293896(0x1ae)],'placement':_0x310bd4[_0x293896(0x4b9)]}))?!0x1:(await Promise[_0x293896(0x398)](_0x3f4e64['executeCommand'](t['LayoutMindMapOperation']['id'],{'unitId':_0x310bd4[_0x293896(0x4bd)],'subUnitId':_0x310bd4[_0x293896(0x159)],'scopeId':_0x310bd4[_0x293896(0x17c)]})),!0x0);}async function wt(_0x1e8ec5,_0x30d714){const _0x57f025=_0x18b7a6;let _0x3225ac=_0x30d714[_0x57f025(0x39b)][_0x57f025(0x13c)]();return!_0x3225ac||!await Promise[_0x57f025(0x398)](_0x1e8ec5[_0x57f025(0x486)](t[_0x57f025(0x136)]['id'],{'unitId':_0x30d714[_0x57f025(0x4bd)],'subUnitId':_0x30d714[_0x57f025(0x159)],'nodeId':_0x30d714[_0x57f025(0x4b2)],'text':_0x3225ac}))?!0x1:(await Promise[_0x57f025(0x398)](_0x1e8ec5[_0x57f025(0x486)](t[_0x57f025(0x246)]['id'],{'unitId':_0x30d714['unitId'],'subUnitId':_0x30d714[_0x57f025(0x159)],'scopeId':_0x30d714[_0x57f025(0x17c)]})),!0x0);}async function Tt(_0x3113b6){const _0x2ef24c=_0x18b7a6;var _0x3fe5be;let _0x5a709d=(_0x3fe5be=globalThis[_0x2ef24c(0x259)])==null?void 0x0:_0x3fe5be[_0x2ef24c(0x39c)];return _0x5a709d!=null&&_0x5a709d[_0x2ef24c(0x17d)]?(await _0x5a709d[_0x2ef24c(0x17d)](_0x3113b6),!0x0):!0x1;}async function Et(_0x32d579,_0x23b1c4,_0x24ad15=Tt){const _0x5640ef=_0x18b7a6;let _0xf4be6c=await Promise[_0x5640ef(0x398)](_0x32d579[_0x5640ef(0x486)](t['ExportMindMapOpmlOperation']['id'],_0x23b1c4));if(typeof _0xf4be6c!=_0x5640ef(0x3d3)||!_0xf4be6c)return!0x1;try{return await _0x24ad15(_0xf4be6c)!==!0x1;}catch{return!0x1;}}async function Dt(_0x10be75,_0x3f2ef0){const _0x51684a=_0x18b7a6;return _0x3f2ef0['opml'][_0x51684a(0x13c)]()?(await _0x10be75[_0x51684a(0x486)](t['ImportMindMapOpmlOperation']['id'],_0x3f2ef0))['success']:!0x1;}function Ot(_0x5b6b8c,_0x55b7e8){const _0x54c744=_0x18b7a6;let _0x182e10='shapeData'in _0x5b6b8c[_0x54c744(0x27d)]?_0x5b6b8c['element'][_0x54c744(0x46c)][_0x54c744(0x2d2)]:void 0x0;return(_0x182e10==null?void 0x0:_0x182e10[_0x54c744(0x39b)])||_0x55b7e8;}function kt(_0xf95f3,_0x59950c,_0xd39bd=t['MIND_MAP_DEFAULT_NODE_TEXT']){const _0x3bf9b2=_0x18b7a6;let _0x33e71a=Object[_0x3bf9b2(0x1a5)](_0xf95f3)['map'](_0x5d4ae4=>{const _0x5809af=_0x3bf9b2;let _0x480fca=(0x0,t[_0x5809af(0x306)])(_0x5d4ae4[_0x5809af(0x27d)]);return(_0x480fca==null?void 0x0:_0x480fca[_0x5809af(0x166)])===_0x59950c?{'data':_0x5d4ae4,'meta':_0x480fca}:null;})[_0x3bf9b2(0x2f5)](_0x320807=>!!_0x320807),_0x4524e2=new Map();_0x33e71a[_0x3bf9b2(0x137)](_0x567e9b=>{const _0x3255ba=_0x3bf9b2;let _0x5c2eaf=_0x567e9b[_0x3255ba(0x215)][_0x3255ba(0x43f)];_0x4524e2[_0x3255ba(0x270)](_0x5c2eaf,[..._0x4524e2[_0x3255ba(0x16a)](_0x5c2eaf)??[],_0x567e9b]);}),_0x4524e2['forEach'](_0x30aed8=>{const _0x199c7f=_0x3bf9b2;_0x30aed8[_0x199c7f(0x4e2)]((_0x521dd3,_0x4414b8)=>(0x0,t[_0x199c7f(0x356)])(_0x521dd3[_0x199c7f(0x215)]['orderKey'],_0x4414b8[_0x199c7f(0x215)][_0x199c7f(0x4ef)])||_0x521dd3[_0x199c7f(0x3eb)][_0x199c7f(0x194)][_0x199c7f(0x457)](_0x4414b8[_0x199c7f(0x3eb)]['elementId']));});let _0x4f8b83=[],_0x2a5db8=(_0xe4d1c7,_0x28c93a)=>{const _0x16a31e=_0x3bf9b2;(_0x4524e2[_0x16a31e(0x16a)](_0xe4d1c7)??[])[_0x16a31e(0x137)](_0x33a6ab=>{const _0x47ddeb=_0x16a31e;_0x4f8b83['push']({'nodeId':_0x33a6ab[_0x47ddeb(0x3eb)]['elementId'],'depth':_0x28c93a,'text':Ot(_0x33a6ab['data'],_0xd39bd)}),_0x2a5db8(_0x33a6ab[_0x47ddeb(0x3eb)]['elementId'],_0x28c93a+0x1);});};return _0x2a5db8(null,0x0),_0x4f8b83;}function At(_0x8da083,_0x455152){const _0xbe7974=_0x18b7a6;let _0x29e398=_0x455152[_0xbe7974(0x13c)]()[_0xbe7974(0x43c)]();return _0x29e398?_0x8da083[_0xbe7974(0x2f5)](_0x30dd19=>_0x30dd19[_0xbe7974(0x39b)][_0xbe7974(0x43c)]()['includes'](_0x29e398)):_0x8da083;}function jt(_0x25e1bf){const _0x1337c1=_0x18b7a6;return{'paddingInlineStart':0x8+(Number[_0x1337c1(0x134)](_0x25e1bf)&&_0x25e1bf>0x0?_0x25e1bf:0x0)*0x10};}function Mt(_0x4272e9){const _0x26e2a0=_0x18b7a6;return(0x0,p[_0x26e2a0(0x2f8)])(u[_0x26e2a0(0x133)],{'className':_0x26e2a0(0x3e2),..._0x4272e9});}function X(_0x802c52){const _0x36466d=_0x18b7a6;return(0x0,p[_0x36466d(0x1de)])(_0x36466d(0x1cf),{'className':_0x36466d(0x395),'data-board-mind-map-panel-section':_0x36466d(0x1e5),'children':[(0x0,p[_0x36466d(0x2f8)])('h3',{'className':_0x36466d(0x492),'children':_0x802c52[_0x36466d(0x436)]}),_0x802c52[_0x36466d(0x471)]]});}function Nt(_0x500ed5,_0x169182='structure'){const _0x2bd63b=_0x18b7a6;var _0x332ef4,_0x30e6f7,_0x307e7c;let _0x5d0d99=(0x0,s[_0x2bd63b(0x465)])(i[_0x2bd63b(0x496)]),_0x485c83=(0x0,s['useDependency'])(n['IBoardElementStateService']),_0x22460e=(0x0,s[_0x2bd63b(0x465)])(e[_0x2bd63b(0x2a9)]),_0x327cc2=(0x0,s[_0x2bd63b(0x465)])(i[_0x2bd63b(0x48a)]),[,_0x59c01d]=(0x0,f[_0x2bd63b(0x4e6)])(_0x58a7b2=>_0x58a7b2+0x1,0x0);(0x0,f[_0x2bd63b(0x482)])(()=>{const _0x9f81a8=_0x2bd63b;let _0x5139a7=(0x0,o[_0x9f81a8(0x28b)])(_0x22460e[_0x9f81a8(0x1e3)],_0x22460e[_0x9f81a8(0x1da)],_0x22460e['elementRemove$'])['subscribe'](_0x1ed4b4=>{const _0x4e2720=_0x9f81a8;_0x1ed4b4[_0x4e2720(0x3c1)](_0x444d15=>_0x444d15[_0x4e2720(0x4bd)]===_0x500ed5[_0x4e2720(0x4bd)]&&_0x444d15[_0x4e2720(0x159)]===_0x500ed5['subUnitId'])&&_0x59c01d();});return()=>_0x5139a7[_0x9f81a8(0x2a2)]();},[_0x22460e,_0x500ed5[_0x2bd63b(0x4bd)],_0x500ed5['subUnitId']]);let _0x454c1d=_0x22460e[_0x2bd63b(0x290)](_0x500ed5[_0x2bd63b(0x4bd)],_0x500ed5[_0x2bd63b(0x159)]),_0x159752=kt(_0x454c1d,_0x500ed5['scopeId'],_0x327cc2['t'](_0x2bd63b(0x1c5))),_0xb28914=(_0x332ef4=(0x0,t[_0x2bd63b(0x195)])((_0x30e6f7=_0x454c1d[_0x500ed5[_0x2bd63b(0x17c)]])==null?void 0x0:_0x30e6f7[_0x2bd63b(0x27d)]))==null?void 0x0:_0x332ef4[_0x2bd63b(0x240)],[_0x80d3a8,_0x66f426]=(0x0,f[_0x2bd63b(0x44d)])(''),[_0x417390,_0x4e8eb6]=(0x0,f[_0x2bd63b(0x44d)])(null),[_0x3d3cf6,_0x3c2792]=(0x0,f[_0x2bd63b(0x44d)])(''),{spacing:_0x42984d,direction:_0x284d19,structureKind:_0x17bc75,branchLineType:_0xa9fe43}=yt(_0xb28914),[_0xb9d5f2,_0x44ecd5]=(0x0,f[_0x2bd63b(0x44d)])(null),[_0x53d708,_0x16eb99]=(0x0,f[_0x2bd63b(0x44d)])(_0x169182),_0xc8161=At(_0x159752,_0x80d3a8),_0x3bf8c1={'unitId':_0x500ed5['unitId'],'subUnitId':_0x500ed5['subUnitId'],'scopeId':_0x500ed5['scopeId']};return{'commandService':_0x5d0d99,'elementStateService':_0x485c83,'localeService':_0x327cc2,'query':_0x80d3a8,'setQuery':_0x66f426,'editingOutlineNode':_0x417390,'setEditingOutlineNode':_0x4e8eb6,'opmlText':_0x3d3cf6,'setOpmlText':_0x3c2792,'spacing':_0x42984d,'layoutDirection':_0x284d19,'structureKind':_0x17bc75,'branchLineType':_0xa9fe43,'setDraggedOutlineNodeId':_0x44ecd5,'activeTab':_0x53d708,'setActiveTab':_0x16eb99,'visibleOutlineItems':_0xc8161,'baseParams':_0x3bf8c1,'tabItems':mt[_0x2bd63b(0x391)](_0x2c8490=>({'label':_0x327cc2['t'](_0x2bd63b(0x282)+_0x2c8490),'value':_0x2c8490})),'selectedNode':_0x500ed5[_0x2bd63b(0x4b2)]?(_0x307e7c=_0x454c1d[_0x500ed5[_0x2bd63b(0x4b2)]])==null?void 0x0:_0x307e7c[_0x2bd63b(0x27d)]:void 0x0,'branchLineItems':vt[_0x2bd63b(0x2f5)](_0x5e53ce=>_0x5e53ce[_0x2bd63b(0x4b4)]!=='curve'||(0x0,t[_0x2bd63b(0x3b4)])(_0x17bc75)),'changeLayout':_0x5d199f=>bt(_0x5d0d99,{..._0x3bf8c1,'direction':_0x5d199f}),'changeStructureKind':_0x13efc9=>{const _0x141150=_0x2bd63b;let _0x5cf416=(0x0,t[_0x141150(0x31b)])(_0x13efc9,_0xa9fe43);return bt(_0x5d0d99,{..._0x3bf8c1,'structureKind':_0x13efc9,..._0x5cf416===_0xa9fe43?null:{'branchLineType':_0x5cf416}});},'changeBranchLineType':_0x58964b=>{const _0x3b03e8=_0x2bd63b;let _0x56a670=(0x0,t[_0x3b03e8(0x31b)])(_0x17bc75,_0x58964b);return xt(_0x5d0d99,{..._0x3bf8c1,'branchLineType':_0x56a670});},'changeSpacing':(_0x37bbac,_0x4474f1)=>{let _0x2cc4c5={..._0x42984d,[_0x37bbac]:_0x4474f1};return St(_0x5d0d99,{..._0x3bf8c1,..._0x2cc4c5});},'importOpml':()=>{const _0x363f7b=_0x2bd63b;Dt(_0x5d0d99,{'unitId':_0x500ed5[_0x363f7b(0x4bd)],'subUnitId':_0x500ed5[_0x363f7b(0x159)],'left':0x78,'top':0x78,'opml':_0x3d3cf6})[_0x363f7b(0x2d9)](_0xf99cb1=>{_0xf99cb1&&_0x3c2792('');});},'exportOpml':()=>Et(_0x5d0d99,_0x3bf8c1),'startRenameNode':(_0x4db1c3,_0xc79cd6)=>{_0x4e8eb6({'nodeId':_0x4db1c3,'text':_0xc79cd6});},'commitRenameNode':()=>{const _0x2add77=_0x2bd63b;_0x417390&&wt(_0x5d0d99,{..._0x3bf8c1,'nodeId':_0x417390['nodeId'],'text':_0x417390[_0x2add77(0x39b)]})[_0x2add77(0x2d9)](_0x3e8217=>{_0x3e8217&&_0x4e8eb6(null);});},'reorderNode':(_0x170fd3,_0x11ddaf)=>{const _0x315a4b=_0x2bd63b;if(_0x170fd3['preventDefault'](),!_0xb9d5f2||_0xb9d5f2===_0x11ddaf)return;let _0x4853fe=_0x170fd3[_0x315a4b(0x4d1)][_0x315a4b(0x4a8)](),_0x3e1a48=_0x170fd3[_0x315a4b(0x1a2)]<_0x4853fe[_0x315a4b(0x257)]+_0x4853fe[_0x315a4b(0x19a)]/0x2?_0x315a4b(0x3b1):'after';_0x44ecd5(null),Ct(_0x5d0d99,{..._0x3bf8c1,'nodeId':_0xb9d5f2,'targetNodeId':_0x11ddaf,'placement':_0x3e1a48});}};}function Pt(_0x1d1d00){const _0x5cd59f=_0x18b7a6;let {elementStateService:_0x19ffe5,localeService:_0x5cee1c,query:_0x2161d3,setQuery:_0x555eef,editingOutlineNode:_0x32708f,setEditingOutlineNode:_0x2ff478,opmlText:_0x3e7cc2,setOpmlText:_0x10ac99,spacing:_0x5e4ae7,layoutDirection:_0x2a82e8,structureKind:_0x5cdd87,branchLineType:_0x2361c5,setDraggedOutlineNodeId:_0x145afe,activeTab:_0x20ceeb,setActiveTab:_0xadfa18,visibleOutlineItems:_0x13c559,tabItems:_0x3db63b,branchLineItems:_0x4c0206,changeLayout:_0x5d07ad,changeStructureKind:_0x1ade8d,changeBranchLineType:_0x4ec2e5,changeSpacing:_0x2eb97c,importOpml:_0x326097,exportOpml:_0x1cfec8,startRenameNode:_0x314d06,commitRenameNode:_0x1d73ae,reorderNode:_0x419315}=Nt(_0x1d1d00);return(0x0,p['jsxs'])('div',{'className':_0x5cd59f(0x49e),'data-board-mind-map-panel':_0x5cd59f(0x1e5),'children':[(0x0,p[_0x5cd59f(0x2f8)])('div',{'className':_0x5cd59f(0x33b),'data-board-mind-map-panel-tabs':'true','children':(0x0,p[_0x5cd59f(0x2f8)])(Mt,{'items':_0x3db63b,'value':_0x20ceeb,'onChange':_0x1b00dc=>_0xadfa18(_0x1b00dc)})}),_0x20ceeb===_0x5cd59f(0x4cd)&&(0x0,p[_0x5cd59f(0x2f8)])(X,{'title':_0x5cee1c['t']('boards-mind-ui.panel.tab.structure'),'children':(0x0,p['jsxs'])('div',{'children':[(0x0,p[_0x5cd59f(0x2f8)])(u['Input'],{'slot':(0x0,p[_0x5cd59f(0x2f8)])(d[_0x5cd59f(0x3e3)],{}),'value':_0x2161d3,'placeholder':_0x5cee1c['t'](_0x5cd59f(0x3d9)),'className':(0x0,u['clsx'])('univer-mb-3\x20univer-w-full',!0x1),'onChange':_0x555eef}),_0x13c559[_0x5cd59f(0x2e5)]?(0x0,p[_0x5cd59f(0x2f8)])('ol',{'className':'univer-space-y-1','children':_0x13c559[_0x5cd59f(0x391)](_0x5bafaa=>(0x0,p[_0x5cd59f(0x2f8)])('li',{'draggable':!0x0,'className':_0x5cd59f(0x20d),'style':jt(_0x5bafaa['depth']),'onDragStart':_0xb88067=>{const _0x48a943=_0x5cd59f;var _0x4eebc7;_0x145afe(_0x5bafaa[_0x48a943(0x4b2)]),(_0x4eebc7=_0xb88067[_0x48a943(0x48f)])==null||_0x4eebc7[_0x48a943(0x245)](_0x48a943(0x196),_0x5bafaa['nodeId']),_0xb88067['dataTransfer']&&(_0xb88067[_0x48a943(0x48f)][_0x48a943(0x21e)]=_0x48a943(0x463));},'onDragOver':_0x560db2=>{const _0x2c572c=_0x5cd59f;_0x560db2[_0x2c572c(0x36f)](),_0x560db2[_0x2c572c(0x48f)]&&(_0x560db2[_0x2c572c(0x48f)][_0x2c572c(0x361)]='move');},'onDrop':_0x5cae90=>_0x419315(_0x5cae90,_0x5bafaa['nodeId']),'onDragEnd':()=>_0x145afe(null),'children':(_0x32708f==null?void 0x0:_0x32708f[_0x5cd59f(0x4b2)])===_0x5bafaa[_0x5cd59f(0x4b2)]?(0x0,p[_0x5cd59f(0x1de)])(_0x5cd59f(0x312),{'className':(0x0,u[_0x5cd59f(0x37e)])(_0x5cd59f(0x3e5),_0x5cd59f(0x3bd)),'children':[(0x0,p[_0x5cd59f(0x2f8)])(u[_0x5cd59f(0x2e6)],{'autoFocus':!0x0,'size':'small','className':void 0x0,'value':_0x32708f[_0x5cd59f(0x39b)],'onChange':_0x1e6dc6=>_0x2ff478({'nodeId':_0x5bafaa[_0x5cd59f(0x4b2)],'text':_0x1e6dc6}),'onKeyDown':_0x243067=>{const _0x4c3aa4=_0x5cd59f;_0x243067['key']==='Enter'&&_0x1d73ae(),_0x243067[_0x4c3aa4(0x387)]===_0x4c3aa4(0x140)&&_0x2ff478(null);}}),(0x0,p['jsx'])(u[_0x5cd59f(0x1a8)],{'className':void 0x0,'size':_0x5cd59f(0x2db),'variant':_0x5cd59f(0x4d6),'disabled':!_0x32708f[_0x5cd59f(0x39b)][_0x5cd59f(0x13c)](),'onClick':_0x1d73ae,'children':_0x5cee1c['t'](_0x5cd59f(0x2b1))}),(0x0,p[_0x5cd59f(0x2f8)])(u['Button'],{'className':void 0x0,'size':_0x5cd59f(0x2db),'variant':'default','onClick':()=>_0x2ff478(null),'children':_0x5cee1c['t'](_0x5cd59f(0x156))})]}):(0x0,p[_0x5cd59f(0x1de)])(p[_0x5cd59f(0x293)],{'children':[(0x0,p[_0x5cd59f(0x2f8)])(u[_0x5cd59f(0x1a8)],{'size':_0x5cd59f(0x2db),'variant':_0x5cd59f(0x1f0),'className':(0x0,u[_0x5cd59f(0x37e)])('univer-min-w-0\x20univer-flex-1\x20univer-justify-start\x20univer-truncate\x20univer-text-left',!0x1),'onClick':()=>_0x19ffe5['selectElements']({'unitId':_0x1d1d00[_0x5cd59f(0x4bd)],'subUnitId':_0x1d1d00[_0x5cd59f(0x159)]},[_0x5bafaa[_0x5cd59f(0x4b2)]],_0x5bafaa[_0x5cd59f(0x4b2)]),'children':_0x5bafaa[_0x5cd59f(0x39b)]}),(0x0,p[_0x5cd59f(0x2f8)])(u['Button'],{'className':(0x0,u[_0x5cd59f(0x37e)])(_0x5cd59f(0x171),_0x5cd59f(0x399)),'size':_0x5cd59f(0x2db),'variant':_0x5cd59f(0x4ce),'onClick':()=>_0x314d06(_0x5bafaa[_0x5cd59f(0x4b2)],_0x5bafaa[_0x5cd59f(0x39b)]),'children':_0x5cee1c['t']('boards-mind-ui.panel.rename')})]})},_0x5bafaa[_0x5cd59f(0x4b2)]))}):(0x0,p[_0x5cd59f(0x2f8)])(_0x5cd59f(0x312),{'className':_0x5cd59f(0x420),'data-board-mind-map-panel-empty-state':'true','children':_0x5cee1c['t']('boards-mind-ui.panel.emptyNodes')})]})}),_0x20ceeb===_0x5cd59f(0x240)&&(0x0,p['jsx'])(X,{'title':_0x5cee1c['t']('boards-mind-ui.panel.tab.layout'),'children':(0x0,p['jsxs'])(_0x5cd59f(0x312),{'className':_0x5cd59f(0x4d0),'children':[(0x0,p[_0x5cd59f(0x2f8)])(_0x5cd59f(0x312),{'className':'univer-flex\x20univer-gap-2','children':(0x0,p[_0x5cd59f(0x2f8)])(u['Select'],{'className':'univer-w-full\x20univer-min-w-0','aria-label':_0x5cee1c['t'](_0x5cd59f(0x41d)),'options':_t[_0x5cd59f(0x391)](_0xebd1d3=>({'label':_0x5cee1c['t'](_0xebd1d3[_0x5cd59f(0x4d2)]),'value':_0xebd1d3[_0x5cd59f(0x4b4)]})),'value':_0x5cdd87,'onChange':_0x2d6810=>_0x1ade8d(_0x2d6810)})}),(0x0,p[_0x5cd59f(0x2f8)])(_0x5cd59f(0x312),{'className':_0x5cd59f(0x365),'children':(0x0,p[_0x5cd59f(0x2f8)])(Mt,{'items':gt[_0x5cd59f(0x391)](_0x1ce891=>({'label':_0x5cee1c['t'](_0x1ce891[_0x5cd59f(0x4d2)]),'value':_0x1ce891['value']})),'value':_0x2a82e8,'onChange':_0x154d52=>_0x5d07ad(_0x154d52)})}),(0x0,p[_0x5cd59f(0x2f8)])(_0x5cd59f(0x312),{'className':_0x5cd59f(0x365),'children':(0x0,p[_0x5cd59f(0x2f8)])(Mt,{'items':_0x4c0206['map'](_0x1b5e7d=>({'label':_0x5cee1c['t'](_0x1b5e7d['labelKey']),'value':_0x1b5e7d['value']})),'value':_0x2361c5,'onChange':_0x5e6113=>_0x4ec2e5(_0x5e6113)})}),(0x0,p[_0x5cd59f(0x2f8)])('div',{'className':_0x5cd59f(0x1fb),'children':ht['map'](({labelKey:_0x344d5a,key:_0x520570,min:_0x903c14,max:_0x542299})=>(0x0,p[_0x5cd59f(0x1de)])(_0x5cd59f(0x2fe),{'className':_0x5cd59f(0x411),'children':[(0x0,p[_0x5cd59f(0x2f8)])('span',{'className':'univer-w-20\x20univer-shrink-0','children':_0x5cee1c['t'](_0x344d5a)}),(0x0,p[_0x5cd59f(0x2f8)])(u[_0x5cd59f(0x311)],{'controls':!0x0,'inputClassName':void 0x0,'min':_0x903c14,'max':_0x542299,'step':0x4,'value':_0x5e4ae7[_0x520570],'precision':0x0,'className':_0x5cd59f(0x404),'onChange':_0x28550b=>_0x2eb97c(_0x520570,Number(_0x28550b??_0x903c14))})]},_0x520570))})]})}),_0x20ceeb===_0x5cd59f(0x4ed)&&(0x0,p[_0x5cd59f(0x2f8)])(X,{'title':_0x5cee1c['t'](_0x5cd59f(0x409)),'children':(0x0,p[_0x5cd59f(0x1de)])('div',{'className':_0x5cd59f(0x352),'children':[(0x0,p[_0x5cd59f(0x2f8)])(u[_0x5cd59f(0x1c4)],{'className':(0x0,u['clsx'])('univer-h-28\x20univer-resize-none','univer-text-xs'),'placeholder':_0x5cee1c['t'](_0x5cd59f(0x24f)),'value':_0x3e7cc2,'onValueChange':_0x10ac99}),(0x0,p[_0x5cd59f(0x1de)])(_0x5cd59f(0x312),{'className':_0x5cd59f(0x365),'children':[(0x0,p['jsx'])(u[_0x5cd59f(0x1a8)],{'className':void 0x0,'size':_0x5cd59f(0x2db),'variant':_0x5cd59f(0x4d6),'disabled':!_0x3e7cc2[_0x5cd59f(0x13c)](),'onClick':_0x326097,'children':_0x5cee1c['t'](_0x5cd59f(0x2c5))}),(0x0,p[_0x5cd59f(0x2f8)])(u[_0x5cd59f(0x1a8)],{'className':void 0x0,'size':_0x5cd59f(0x2db),'variant':_0x5cd59f(0x4ce),'onClick':_0x1cfec8,'children':_0x5cee1c['t'](_0x5cd59f(0x225))})]})]})})]});}let Ft=class extends i[_0x18b7a6(0x2a4)]{constructor(_0x14ee3,_0x2873cf,_0x1dc315){const _0x310d3d=_0x18b7a6;super(),this[_0x310d3d(0x349)]=_0x14ee3,this['_localeService']=_0x2873cf,this[_0x310d3d(0x1b4)]=_0x1dc315,x(this,_0x310d3d(0x180),null),this['disposeWithMe'](this['_commandService'][_0x310d3d(0x3f0)](pt)),this[_0x310d3d(0x460)](this[_0x310d3d(0x349)][_0x310d3d(0x2b0)](_0x30d536=>{const _0x560818=_0x310d3d;if(_0x30d536['id']!==pt['id'])return;let _0x2219e6=_0x30d536[_0x560818(0x162)];_0x2219e6&&_0x560818(0x4bd)in _0x2219e6&&typeof _0x2219e6[_0x560818(0x4bd)]==_0x560818(0x3d3)&&_0x560818(0x159)in _0x2219e6&&typeof _0x2219e6[_0x560818(0x159)]==_0x560818(0x3d3)&&_0x560818(0x17c)in _0x2219e6&&typeof _0x2219e6[_0x560818(0x17c)]==_0x560818(0x3d3)&&this[_0x560818(0x4a6)]({'unitId':_0x2219e6['unitId'],'subUnitId':_0x2219e6[_0x560818(0x159)],'scopeId':_0x2219e6['scopeId'],'nodeId':_0x560818(0x4b2)in _0x2219e6&&typeof _0x2219e6[_0x560818(0x4b2)]==_0x560818(0x3d3)?_0x2219e6[_0x560818(0x4b2)]:void 0x0});}));}[_0x18b7a6(0x1a7)](){const _0x3e1aa6=_0x18b7a6;var _0x1ec565;(_0x1ec565=this[_0x3e1aa6(0x180)])==null||_0x1ec565['dispose'](),this[_0x3e1aa6(0x180)]=null,super[_0x3e1aa6(0x1a7)]();}[_0x18b7a6(0x4a6)](_0x34bc64){const _0x21e1b0=_0x18b7a6;var _0x3a7118;let _0x57057c={'label':Y,..._0x34bc64},_0x37f287={'id':Y,'layout':_0x21e1b0(0x266),'header':{'title':this[_0x21e1b0(0x408)]['t'](_0x21e1b0(0x320))},'width':0x184,'children':_0x57057c,'onClose':()=>{const _0x3db2cf=_0x21e1b0;this[_0x3db2cf(0x180)]=null;}};(_0x3a7118=this[_0x21e1b0(0x180)])==null||_0x3a7118['dispose'](),this[_0x21e1b0(0x180)]=this['_sidebarService'][_0x21e1b0(0x4a6)](_0x37f287);}};Ft=C([S(0x0,i[_0x18b7a6(0x496)]),S(0x1,(0x0,i[_0x18b7a6(0x46d)])(i[_0x18b7a6(0x48a)])),S(0x2,(0x0,i['Inject'])(s[_0x18b7a6(0x4eb)]))],Ft);function It(_0xe29d49){const _0x5e4eba=_0x18b7a6;let _0xb3d5ef=(0x0,s[_0x5e4eba(0x465)])(i[_0x5e4eba(0x496)]),_0x2da5c3=_0xe29d49[_0x5e4eba(0x2d6)]['extraProps'];return _0x2da5c3?(0x0,p[_0x5e4eba(0x2f8)])(c[_0x5e4eba(0x155)],{'shapeRef':{'hostType':i[_0x5e4eba(0x152)][_0x5e4eba(0x2ca)],'unitId':_0x2da5c3['unitId'],'subUnitId':_0x2da5c3[_0x5e4eba(0x159)],'shapeId':_0x2da5c3[_0x5e4eba(0x194)]},'onText':()=>De(_0xb3d5ef,_0x5e4eba(0x2b9)),'onStyle':()=>_0xb3d5ef[_0x5e4eba(0x486)](pt['id'],{'unitId':_0x2da5c3[_0x5e4eba(0x4bd)],'subUnitId':_0x2da5c3[_0x5e4eba(0x159)],'scopeId':_0x2da5c3['scopeId'],'nodeId':_0x2da5c3[_0x5e4eba(0x194)]}),'onDelete':()=>De(_0xb3d5ef,'delete')}):null;}function Lt(_0x4d6942){const _0x1d9bc6=_0x18b7a6;var _0x4873d6,_0x1dc53b,_0x4931ae,_0x508eb0,_0x28cd93;let _0x561c80=(0x0,s['useDependency'])(i[_0x1d9bc6(0x496)]),_0xb92ac1=(0x0,s[_0x1d9bc6(0x465)])(i['LocaleService']),_0x3e9811=(0x0,s[_0x1d9bc6(0x465)])(s[_0x1d9bc6(0x1be)]),_0x40e364=(0x0,s['useObservable'])(_0x3e9811[_0x1d9bc6(0x45e)],_0x3e9811['getFonts']()),[_0x32d329,_0x5a7177]=(0x0,f[_0x1d9bc6(0x44d)])(null),_0x33b41e=(0x0,c[_0x1d9bc6(0x35f)])(_0x4d6942[_0x1d9bc6(0x46c)]),_0x25822e=_0x33b41e['ff']??l[_0x1d9bc6(0x1af)][_0x1d9bc6(0x2d2)][_0x1d9bc6(0x40d)],_0x618e9a=_0x33b41e['fs']??l['ShapeDefaultConfig'][_0x1d9bc6(0x2d2)]['fontSize'];function _0x3f2325(_0x2d492d){const _0x88c67c=_0x1d9bc6;return _0x561c80[_0x88c67c(0x486)](t['UpdateMindMapNodeOperation']['id'],{'unitId':_0x4d6942[_0x88c67c(0x4bd)],'subUnitId':_0x4d6942[_0x88c67c(0x159)],'nodeId':_0x4d6942[_0x88c67c(0x4b2)],..._0x2d492d});}let _0x513efb=[{'key':_0x1d9bc6(0x3e9),'value':((_0x4873d6=_0x4d6942[_0x1d9bc6(0x46c)][_0x1d9bc6(0x3e9)])==null?void 0x0:_0x4873d6[_0x1d9bc6(0x252)])??l['ShapeDefaultConfig'][_0x1d9bc6(0x3e9)]},{'key':_0x1d9bc6(0x177),'value':((_0x1dc53b=_0x4d6942[_0x1d9bc6(0x46c)][_0x1d9bc6(0x177)])==null?void 0x0:_0x1dc53b['color'])??l[_0x1d9bc6(0x1af)][_0x1d9bc6(0x177)]},{'key':_0x1d9bc6(0x49f),'value':((_0x4931ae=_0x33b41e['cl'])==null?void 0x0:_0x4931ae[_0x1d9bc6(0x132)])??l[_0x1d9bc6(0x1af)][_0x1d9bc6(0x2d2)][_0x1d9bc6(0x252)]}];if(_0x32d329){var _0x598c47;return(0x0,p[_0x1d9bc6(0x1de)])(_0x1d9bc6(0x312),{'className':_0x1d9bc6(0x2f7),'children':[(0x0,p['jsx'])(u[_0x1d9bc6(0x1a8)],{'className':'univer-w-full','onClick':()=>_0x5a7177(null),'size':_0x1d9bc6(0x1fc),'children':_0xb92ac1['t'](_0x1d9bc6(0x156))}),_0x32d329===_0x1d9bc6(0x40d)?_0x40e364==null?void 0x0:_0x40e364[_0x1d9bc6(0x391)](_0x540680=>(0x0,p[_0x1d9bc6(0x2f8)])(u[_0x1d9bc6(0x1a8)],{'className':'univer-w-full','aria-pressed':_0x25822e===_0x540680[_0x1d9bc6(0x4b4)],'variant':_0x25822e===_0x540680[_0x1d9bc6(0x4b4)]?_0x1d9bc6(0x4d6):_0x1d9bc6(0x4ce),'onClick':async()=>{await _0x3f2325({'textStyle':{'fontFamily':_0x540680['value']}}),_0x5a7177(null);},'size':'middle','children':_0x540680['label']},_0x540680[_0x1d9bc6(0x4b4)])):(0x0,p[_0x1d9bc6(0x2f8)])(u[_0x1d9bc6(0x360)],{'value':(_0x598c47=_0x513efb[_0x1d9bc6(0x3a5)](({key:_0x2aaaf2})=>_0x2aaaf2===_0x32d329))==null?void 0x0:_0x598c47[_0x1d9bc6(0x4b4)],'onSelect':async _0x4aaf1f=>{const _0x46cb82=_0x1d9bc6;_0x32d329===_0x46cb82(0x3e9)?await _0x3f2325({'fillColor':_0x4aaf1f}):_0x32d329===_0x46cb82(0x177)?await _0x3f2325({'strokeColor':_0x4aaf1f}):await _0x3f2325({'textStyle':{'color':_0x4aaf1f}}),_0x5a7177(null);}})]});}let _0x537407=[{'key':_0x1d9bc6(0x44a),'active':_0x33b41e['bl']===i[_0x1d9bc6(0x3ca)][_0x1d9bc6(0x452)],'icon':(0x0,p[_0x1d9bc6(0x2f8)])(d['BoldIcon'],{})},{'key':_0x1d9bc6(0x3ee),'active':_0x33b41e['it']===i[_0x1d9bc6(0x3ca)]['TRUE'],'icon':(0x0,p[_0x1d9bc6(0x2f8)])(d[_0x1d9bc6(0x1d9)],{})},{'key':_0x1d9bc6(0x205),'active':((_0x508eb0=_0x33b41e['ul'])==null?void 0x0:_0x508eb0['s'])===i[_0x1d9bc6(0x3ca)][_0x1d9bc6(0x452)],'icon':(0x0,p[_0x1d9bc6(0x2f8)])(d[_0x1d9bc6(0x1bf)],{})},{'key':'strikethrough','active':((_0x28cd93=_0x33b41e['st'])==null?void 0x0:_0x28cd93['s'])===i[_0x1d9bc6(0x3ca)]['TRUE'],'icon':(0x0,p[_0x1d9bc6(0x2f8)])(d[_0x1d9bc6(0x23c)],{})}];return(0x0,p[_0x1d9bc6(0x1de)])(_0x1d9bc6(0x312),{'className':_0x1d9bc6(0x2f7),'children':[(0x0,p[_0x1d9bc6(0x2f8)])(_0x1d9bc6(0x312),{'className':'univer-grid\x20univer-grid-cols-4\x20univer-gap-2','children':_0x537407[_0x1d9bc6(0x391)](({key:_0x35b93c,active:_0xfddb57,icon:_0x3fc96d})=>(0x0,p[_0x1d9bc6(0x2f8)])(u[_0x1d9bc6(0x1a8)],{'aria-label':_0xb92ac1['t'](_0x1d9bc6(0x22c)+_0x35b93c),'aria-pressed':_0xfddb57,'variant':_0xfddb57?_0x1d9bc6(0x4d6):_0x1d9bc6(0x4ce),'onClick':()=>_0x3f2325({'textStyle':{[_0x35b93c]:!_0xfddb57}}),'size':_0x1d9bc6(0x1fc),'children':_0x3fc96d},_0x35b93c))}),(0x0,p[_0x1d9bc6(0x1de)])(u[_0x1d9bc6(0x1a8)],{'className':_0x1d9bc6(0x308),'onClick':()=>_0x5a7177(_0x1d9bc6(0x40d)),'size':'middle','children':[(0x0,p['jsx'])('span',{'children':_0xb92ac1['t'](_0x1d9bc6(0x449))}),(0x0,p[_0x1d9bc6(0x2f8)])('span',{'children':_0x25822e})]}),(0x0,p[_0x1d9bc6(0x1de)])(_0x1d9bc6(0x2fe),{'className':_0x1d9bc6(0x4d9),'children':[(0x0,p[_0x1d9bc6(0x2f8)])(_0x1d9bc6(0x1ca),{'children':_0xb92ac1['t'](_0x1d9bc6(0x2a5))}),(0x0,p[_0x1d9bc6(0x2f8)])(u[_0x1d9bc6(0x311)],{'className':'univer-w-32','controls':!0x1,'min':0x1,'value':_0x618e9a,'onChange':_0x203a78=>{if(_0x203a78!=null)return _0x3f2325({'textStyle':{'fontSize':_0x203a78}});},'size':_0x1d9bc6(0x2db)})]}),_0x513efb[_0x1d9bc6(0x391)](({key:_0x1263f4,value:_0x482687})=>(0x0,p['jsxs'])(u[_0x1d9bc6(0x1a8)],{'className':_0x1d9bc6(0x308),'onClick':()=>_0x5a7177(_0x1263f4),'size':'middle','children':[(0x0,p[_0x1d9bc6(0x2f8)])('span',{'children':_0xb92ac1['t'](_0x1d9bc6(0x4b7)+_0x1263f4)}),(0x0,p[_0x1d9bc6(0x2f8)])(_0x1d9bc6(0x1ca),{'className':_0x1d9bc6(0x3ea),'style':{'backgroundColor':_0x482687}})]},_0x1263f4))]});}function Rt(_0x331a59){const _0x33be21=_0x18b7a6;return(0x0,p['jsx'])('div',{'className':(0x0,u[_0x33be21(0x37e)])(_0x33be21(0x300),_0x331a59[_0x33be21(0x1a9)][_0x33be21(0x2e5)]===0x4?'univer-grid-cols-[repeat(4,minmax(min-content,1fr))]\x20max-[359px]:univer-grid-cols-2':_0x33be21(0x354)),'children':_0x331a59[_0x33be21(0x1a9)][_0x33be21(0x391)](_0x46c447=>(0x0,p[_0x33be21(0x2f8)])(u['Button'],{'className':_0x33be21(0x42e),'variant':_0x331a59[_0x33be21(0x4b4)]===_0x46c447[_0x33be21(0x4b4)]?'primary':_0x33be21(0x4ce),'aria-pressed':_0x331a59['value']===_0x46c447[_0x33be21(0x4b4)],'onClick':()=>_0x331a59[_0x33be21(0x197)](_0x46c447['value']),'size':'middle','children':(0x0,p['jsx'])(_0x33be21(0x1ca),{'className':_0x33be21(0x355),'children':_0x46c447[_0x33be21(0x2fe)]})},_0x46c447['value']))});}function zt(_0xb331aa){const _0x42c06e=_0x18b7a6;let {commandService:_0xacfa2c,elementStateService:_0x4c6f30,localeService:_0x543623,query:_0x38c5a9,setQuery:_0x4decff,editingOutlineNode:_0x1c75e4,setEditingOutlineNode:_0x27f944,opmlText:_0x1350c5,setOpmlText:_0x467f34,spacing:_0x2d4293,layoutDirection:_0x12ed89,structureKind:_0x1543fd,branchLineType:_0x3e5f1f,activeTab:_0x408680,setActiveTab:_0xb8c39f,visibleOutlineItems:_0x4de85e,baseParams:_0xa5b011,tabItems:_0x4d1959,selectedNode:_0x25b64e,branchLineItems:_0x5b7c55,changeLayout:_0x372169,changeStructureKind:_0x139321,changeBranchLineType:_0x34d39d,changeSpacing:_0x48dc30,importOpml:_0x4a3b32,startRenameNode:_0xfda0b,commitRenameNode:_0x60b5c2}=Nt(_0xb331aa,_0xb331aa[_0x42c06e(0x4b2)]?_0x42c06e(0x421):_0x42c06e(0x4cd));return(_0x25b64e==null?void 0x0:_0x25b64e[_0x42c06e(0x464)])===e['BoardElementType'][_0x42c06e(0x38a)]&&_0x4d1959[_0x42c06e(0x20e)]({'label':_0x543623['t']('boards-mind-ui.panel.nodeStyle.style'),'value':'style'}),(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x312),{'className':_0x42c06e(0x49e),'data-board-mind-map-panel':_0x42c06e(0x1e5),'children':[(0x0,p[_0x42c06e(0x2f8)])('div',{'className':'univer-py-3','data-board-mind-map-panel-tabs':_0x42c06e(0x1e5),'children':(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x133)],{'className':_0x42c06e(0x366),'items':_0x4d1959,'value':_0x408680,'onChange':_0x562d65=>_0xb8c39f(_0x562d65)})}),_0x408680==='style'&&(_0x25b64e==null?void 0x0:_0x25b64e[_0x42c06e(0x464)])===e['BoardElementType'][_0x42c06e(0x38a)]&&(0x0,p[_0x42c06e(0x2f8)])(Lt,{'unitId':_0xb331aa[_0x42c06e(0x4bd)],'subUnitId':_0xb331aa[_0x42c06e(0x159)],'nodeId':_0x25b64e['id'],'shapeData':_0x25b64e[_0x42c06e(0x46c)]}),_0x408680==='structure'&&(0x0,p[_0x42c06e(0x2f8)])(X,{'title':_0x543623['t'](_0x42c06e(0x3c7)),'children':(0x0,p[_0x42c06e(0x1de)])('div',{'children':[(0x0,p[_0x42c06e(0x2f8)])(u['Input'],{'slot':(0x0,p['jsx'])(d[_0x42c06e(0x3e3)],{}),'value':_0x38c5a9,'placeholder':_0x543623['t'](_0x42c06e(0x3d9)),'className':(0x0,u[_0x42c06e(0x37e)])(_0x42c06e(0x459),''),'onChange':_0x4decff,'size':_0x42c06e(0x2db)}),_0x4de85e[_0x42c06e(0x2e5)]?(0x0,p['jsx'])('ol',{'className':'univer-space-y-1','children':_0x4de85e[_0x42c06e(0x391)](_0x11787f=>(0x0,p[_0x42c06e(0x2f8)])('li',{'className':_0x42c06e(0x20d),'style':jt(_0x11787f[_0x42c06e(0x1d6)]),'children':(_0x1c75e4==null?void 0x0:_0x1c75e4[_0x42c06e(0x4b2)])===_0x11787f[_0x42c06e(0x4b2)]?(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x312),{'className':(0x0,u[_0x42c06e(0x37e)])(_0x42c06e(0x3e5),'univer-flex-wrap'),'children':[(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x2e6)],{'autoFocus':!0x1,'size':_0x42c06e(0x2db),'className':_0x42c06e(0x3ef),'value':_0x1c75e4[_0x42c06e(0x39b)],'onChange':_0x1b2f29=>_0x27f944({'nodeId':_0x11787f[_0x42c06e(0x4b2)],'text':_0x1b2f29}),'onKeyDown':_0x54ba71=>{const _0x1658e2=_0x42c06e;_0x54ba71[_0x1658e2(0x387)]===_0x1658e2(0x494)&&_0x60b5c2(),_0x54ba71[_0x1658e2(0x387)]===_0x1658e2(0x140)&&_0x27f944(null);}}),(0x0,p['jsx'])(u[_0x42c06e(0x1a8)],{'className':_0x42c06e(0x185),'size':_0x42c06e(0x1fc),'variant':'primary','disabled':!_0x1c75e4[_0x42c06e(0x39b)][_0x42c06e(0x13c)](),'onClick':_0x60b5c2,'children':_0x543623['t'](_0x42c06e(0x2b1))}),(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x1a8)],{'className':'univer-flex-1','size':'middle','variant':_0x42c06e(0x4ce),'onClick':()=>_0x27f944(null),'children':_0x543623['t'](_0x42c06e(0x156))})]}):(0x0,p[_0x42c06e(0x1de)])(p[_0x42c06e(0x293)],{'children':[(0x0,p['jsx'])(u['Button'],{'size':_0x42c06e(0x1fc),'variant':_0x42c06e(0x1f0),'className':(0x0,u[_0x42c06e(0x37e)])(_0x42c06e(0x47d),''),'onClick':()=>_0x4c6f30['selectElements']({'unitId':_0xb331aa[_0x42c06e(0x4bd)],'subUnitId':_0xb331aa[_0x42c06e(0x159)]},[_0x11787f[_0x42c06e(0x4b2)]],_0x11787f[_0x42c06e(0x4b2)]),'children':_0x11787f['text']}),(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x1a8)],{'className':(0x0,u['clsx'])(_0x42c06e(0x171),'univer-px-3'),'size':_0x42c06e(0x1fc),'variant':_0x42c06e(0x4ce),'onClick':()=>_0xfda0b(_0x11787f[_0x42c06e(0x4b2)],_0x11787f[_0x42c06e(0x39b)]),'children':_0x543623['t']('boards-mind-ui.panel.rename')})]})},_0x11787f[_0x42c06e(0x4b2)]))}):(0x0,p[_0x42c06e(0x2f8)])(_0x42c06e(0x312),{'className':_0x42c06e(0x420),'data-board-mind-map-panel-empty-state':_0x42c06e(0x1e5),'children':_0x543623['t'](_0x42c06e(0x432))})]})}),_0x408680==='layout'&&(0x0,p[_0x42c06e(0x2f8)])(X,{'title':_0x543623['t']('boards-mind-ui.panel.tab.layout'),'children':(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x312),{'className':_0x42c06e(0x4d0),'children':[(0x0,p['jsx'])(_0x42c06e(0x312),{'className':'univer-flex\x20univer-gap-2','children':(0x0,p['jsx'])(Rt,{'items':_t[_0x42c06e(0x391)](_0x102533=>({'label':_0x543623['t'](_0x102533['labelKey']),'value':_0x102533[_0x42c06e(0x4b4)]})),'value':_0x1543fd,'onChange':_0x46751b=>_0x139321(_0x46751b)})}),(0x0,p[_0x42c06e(0x2f8)])('div',{'className':_0x42c06e(0x365),'children':(0x0,p[_0x42c06e(0x2f8)])(Rt,{'items':gt[_0x42c06e(0x391)](_0x1425b6=>({'label':_0x543623['t'](_0x1425b6[_0x42c06e(0x4d2)]),'value':_0x1425b6[_0x42c06e(0x4b4)]})),'value':_0x12ed89,'onChange':_0x367320=>_0x372169(_0x367320)})}),(0x0,p[_0x42c06e(0x2f8)])(_0x42c06e(0x312),{'className':_0x42c06e(0x365),'children':(0x0,p['jsx'])(Rt,{'items':_0x5b7c55[_0x42c06e(0x391)](_0x52b86b=>({'label':_0x543623['t'](_0x52b86b[_0x42c06e(0x4d2)]),'value':_0x52b86b[_0x42c06e(0x4b4)]})),'value':_0x3e5f1f,'onChange':_0x324a49=>_0x34d39d(_0x324a49)})}),(0x0,p[_0x42c06e(0x2f8)])(_0x42c06e(0x312),{'className':_0x42c06e(0x1fb),'children':ht[_0x42c06e(0x391)](({labelKey:_0x3a2f71,key:_0x562632,min:_0x3607f3,max:_0x4c6faa})=>(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x2fe),{'className':_0x42c06e(0x411),'children':[(0x0,p[_0x42c06e(0x2f8)])('span',{'className':'univer-flex-1\x20univer-text-sm','children':_0x543623['t'](_0x3a2f71)}),(0x0,p['jsx'])(u[_0x42c06e(0x311)],{'controls':!0x1,'min':_0x3607f3,'max':_0x4c6faa,'step':0x4,'value':_0x2d4293[_0x562632],'precision':0x0,'className':_0x42c06e(0x1d3),'onChange':_0x475955=>_0x48dc30(_0x562632,Number(_0x475955??_0x3607f3)),'size':_0x42c06e(0x2db)})]},_0x562632))})]})}),_0x408680===_0x42c06e(0x4ed)&&(0x0,p['jsx'])(X,{'title':_0x543623['t'](_0x42c06e(0x409)),'children':(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x312),{'className':_0x42c06e(0x352),'children':[(0x0,p['jsx'])(u[_0x42c06e(0x1c4)],{'className':(0x0,u[_0x42c06e(0x37e)])(_0x42c06e(0x333),''),'placeholder':_0x543623['t'](_0x42c06e(0x24f)),'value':_0x1350c5,'onValueChange':_0x467f34,'size':_0x42c06e(0x2db)}),(0x0,p[_0x42c06e(0x1de)])(_0x42c06e(0x312),{'className':_0x42c06e(0x365),'children':[(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x1a8)],{'className':_0x42c06e(0x185),'size':_0x42c06e(0x1fc),'variant':_0x42c06e(0x4d6),'disabled':!_0x1350c5[_0x42c06e(0x13c)](),'onClick':_0x4a3b32,'children':_0x543623['t']('boards-mind-ui.panel.importOPML')}),(0x0,p[_0x42c06e(0x2f8)])(u[_0x42c06e(0x1a8)],{'className':'univer-flex-1','size':_0x42c06e(0x1fc),'variant':_0x42c06e(0x4ce),'onClick':async()=>{const _0x218353=_0x42c06e;let _0x20a7e8=await _0xacfa2c[_0x218353(0x486)](t['ExportMindMapOpmlOperation']['id'],_0xa5b011);_0x20a7e8!==!0x1&&_0x467f34(_0x20a7e8);},'children':_0x543623['t'](_0x42c06e(0x225))})]})]})})]});}let Bt=class extends i[_0x18b7a6(0x2a4)]{constructor(_0x5d5f24){super(),this['_componentManager']=_0x5d5f24,this['_registerComponents']();}[_0x18b7a6(0x27a)](){const _0xbae8d0=_0x18b7a6;this['disposeWithMe'](this['_componentManager'][_0xbae8d0(0x33e)](de,pe)),this['disposeWithMe'](this[_0xbae8d0(0x45a)]['register'](Ee,It)),this['disposeWithMe'](this[_0xbae8d0(0x45a)][_0xbae8d0(0x33e)](Y,zt));}};Bt=C([S(0x0,(0x0,i['Inject'])(s[_0x18b7a6(0x17f)]))],Bt);let Vt=class extends i[_0x18b7a6(0x2a4)]{constructor(_0x1f0746,_0x47501f,_0x45667b){const _0x32bd71=_0x18b7a6;super(),this[_0x32bd71(0x349)]=_0x1f0746,this[_0x32bd71(0x408)]=_0x47501f,this[_0x32bd71(0x1b4)]=_0x45667b,x(this,_0x32bd71(0x180),null),this[_0x32bd71(0x460)](this['_commandService'][_0x32bd71(0x3f0)](pt)),this['disposeWithMe'](this['_commandService']['onCommandExecuted'](_0x9c5d7d=>{const _0x33ecdb=_0x32bd71;if(_0x9c5d7d['id']!==pt['id'])return;let _0x571299=_0x9c5d7d['params'];_0x571299&&'unitId'in _0x571299&&typeof _0x571299[_0x33ecdb(0x4bd)]==_0x33ecdb(0x3d3)&&_0x33ecdb(0x159)in _0x571299&&typeof _0x571299['subUnitId']==_0x33ecdb(0x3d3)&&'scopeId'in _0x571299&&typeof _0x571299[_0x33ecdb(0x17c)]==_0x33ecdb(0x3d3)&&this[_0x33ecdb(0x4a6)]({'unitId':_0x571299[_0x33ecdb(0x4bd)],'subUnitId':_0x571299['subUnitId'],'scopeId':_0x571299[_0x33ecdb(0x17c)],'nodeId':_0x33ecdb(0x4b2)in _0x571299&&typeof _0x571299[_0x33ecdb(0x4b2)]==_0x33ecdb(0x3d3)?_0x571299[_0x33ecdb(0x4b2)]:void 0x0});}));}[_0x18b7a6(0x1a7)](){const _0x332040=_0x18b7a6;var _0x593e2f;(_0x593e2f=this['_sidebarDisposable'])==null||_0x593e2f['dispose'](),this[_0x332040(0x180)]=null,super['dispose']();}[_0x18b7a6(0x4a6)](_0xecd845){const _0x4e89be=_0x18b7a6;var _0x59aade;let _0x2790c3={'label':Y,..._0xecd845};(_0x59aade=this[_0x4e89be(0x180)])==null||_0x59aade[_0x4e89be(0x1a7)](),this[_0x4e89be(0x180)]=this[_0x4e89be(0x1b4)][_0x4e89be(0x4a6)]({'id':Y,'header':{'title':this[_0x4e89be(0x408)]['t'](_0x4e89be(0x320))},'width':0x184,'children':_0x2790c3,'onClose':()=>{const _0x20e5f8=_0x4e89be;this[_0x20e5f8(0x180)]=null;}});}};Vt=C([S(0x0,i[_0x18b7a6(0x496)]),S(0x1,(0x0,i[_0x18b7a6(0x46d)])(i[_0x18b7a6(0x48a)])),S(0x2,(0x0,i[_0x18b7a6(0x46d)])(s['ISidebarService']))],Vt);let Ht=class extends i[_0x18b7a6(0x2a4)]{constructor(_0x5795c0){const _0x5ee4e9=_0x18b7a6;super(),this[_0x5ee4e9(0x45a)]=_0x5795c0,this[_0x5ee4e9(0x27a)]();}['_registerComponents'](){const _0x23d2de=_0x18b7a6;this[_0x23d2de(0x460)](this['_componentManager']['register'](de,pe)),this[_0x23d2de(0x460)](this[_0x23d2de(0x45a)][_0x23d2de(0x33e)](Ee,Ve)),this[_0x23d2de(0x460)](this['_componentManager'][_0x23d2de(0x33e)](Y,Pt));}};Ht=C([S(0x0,(0x0,i[_0x18b7a6(0x46d)])(s['ComponentManager']))],Ht);let Z=class{constructor(_0x7e9f85,_0x54bf8d,_0x1075c6){const _0x4ecfd4=_0x18b7a6;this[_0x4ecfd4(0x208)]=_0x7e9f85,this['_insertStateService']=_0x54bf8d,this[_0x4ecfd4(0x37f)]=_0x1075c6;}[_0x18b7a6(0x258)](_0x12c932){const _0xd5b2ac=_0x18b7a6;var _0x5f5886,_0x587e18;let _0x20db53=(_0x5f5886=this[_0xd5b2ac(0x37f)][_0xd5b2ac(0x2be)](_0x12c932['unitId']))==null||(_0x587e18=_0x5f5886[_0xd5b2ac(0x238)])==null?void 0x0:_0x587e18['call'](_0x5f5886),_0x5588eb=(_0x20db53==null?void 0x0:_0x20db53[_0xd5b2ac(0x16a)](n['IBoardUIStateService']))??this[_0xd5b2ac(0x208)];return((_0x20db53==null?void 0x0:_0x20db53['get'](W))??this[_0xd5b2ac(0x368)])[_0xd5b2ac(0x222)]({'rootText':_0x12c932['rootText'],'structureKind':_0x12c932[_0xd5b2ac(0x28a)],'branchLineType':_0x12c932[_0xd5b2ac(0x336)],'children':_0x12c932[_0xd5b2ac(0x471)],'blueprint':_0x12c932[_0xd5b2ac(0x47a)]}),_0x5588eb['setShapeSidebarOpen'](!0x1),_0x5588eb['clearPendingInsert'](),_0x5588eb[_0xd5b2ac(0x4d3)](e[_0xd5b2ac(0x332)][_0xd5b2ac(0x3a1)]),_0x5588eb[_0xd5b2ac(0x16b)]({'type':e[_0xd5b2ac(0x332)][_0xd5b2ac(0x3a1)]}),!0x0;}};Z=C([S(0x0,n[_0x18b7a6(0x468)]),S(0x1,(0x0,i[_0x18b7a6(0x46d)])(W)),S(0x2,a[_0x18b7a6(0x323)])],Z);const Ut='UNIVER_BOARDS_MIND_UI_PLUGIN',Wt=[z],Gt=[dt];let Q=class extends i[_0x18b7a6(0x170)]{constructor(_0x485427=_,_0x35ff10,_0xcee8a5,_0x31634e){const _0x45ebdf=_0x18b7a6;super(),this['_config']=_0x485427,this[_0x45ebdf(0x284)]=_0x35ff10,this[_0x45ebdf(0x292)]=_0xcee8a5,this['_renderManagerService']=_0x31634e;let {..._0x50ebcd}=(0x0,i[_0x45ebdf(0x28b)])({},_,this[_0x45ebdf(0x483)]);this[_0x45ebdf(0x292)][_0x45ebdf(0x18d)](g,_0x50ebcd);}[_0x18b7a6(0x2af)](){const _0x5eed1d=_0x18b7a6;n[_0x5eed1d(0x305)]['registerRuntimeScopedDependencies'](this[_0x5eed1d(0x284)],[[W],[K]]),this[_0x5eed1d(0x1cd)]()[_0x5eed1d(0x137)](_0x457a6b=>this[_0x5eed1d(0x284)][_0x5eed1d(0x3f1)](_0x457a6b));let _0xb80777=this[_0x5eed1d(0x284)][_0x5eed1d(0x16a)](Z),_0x56e9d0=this[_0x5eed1d(0x284)][_0x5eed1d(0x16a)](e['IBoardMindMapAdapterService']);this[_0x5eed1d(0x460)](_0x56e9d0[_0x5eed1d(0x294)](_0xb80777)),this[_0x5eed1d(0x460)](this[_0x5eed1d(0x284)][_0x5eed1d(0x16a)](V)),this[_0x5eed1d(0x460)](this[_0x5eed1d(0x284)]['get'](J)),this[_0x5eed1d(0x460)](this[_0x5eed1d(0x284)][_0x5eed1d(0x16a)](Vt)),this[_0x5eed1d(0x460)](this[_0x5eed1d(0x284)]['get'](Ht)),this['_enableMindMapToolbarTool']();}['_getDependencies'](){return[[W],[K],[Z],[V],[J],[Vt],[Ht]];}[_0x18b7a6(0x3fd)](){return[Wt,Gt,[G],[ct],[Ue],[ue],[w],[$e]];}[_0x18b7a6(0x3b0)](){const _0x481a59=_0x18b7a6;this[_0x481a59(0x3fd)]()[_0x481a59(0x137)](_0x1679ce=>{const _0x46d808=_0x481a59;this[_0x46d808(0x460)](this[_0x46d808(0x37f)]['registerRenderModule'](i[_0x46d808(0x152)][_0x46d808(0x2ca)],_0x1679ce));});}[_0x18b7a6(0x277)](){const _0x216a5c=_0x18b7a6;var _0x5ae7ba,_0x27fcc1;let _0x4a49ee=this['_getBoardsUIConfig']();this[_0x216a5c(0x292)]['setConfig'](n['BOARDS_UI_PLUGIN_CONFIG_KEY'],{..._0x4a49ee,'toolbar':{..._0x4a49ee[_0x216a5c(0x35a)],'tools':{...(_0x5ae7ba=_0x4a49ee[_0x216a5c(0x35a)])==null?void 0x0:_0x5ae7ba[_0x216a5c(0x3ba)],[e[_0x216a5c(0x332)][_0x216a5c(0x3a1)]]:Kt((_0x27fcc1=_0x4a49ee[_0x216a5c(0x35a)])==null||(_0x27fcc1=_0x27fcc1['tools'])==null?void 0x0:_0x27fcc1[e[_0x216a5c(0x332)]['MindMap']])}}});}[_0x18b7a6(0x210)](){const _0xc13a8=_0x18b7a6;return this[_0xc13a8(0x292)][_0xc13a8(0x34f)](n[_0xc13a8(0x1c7)])??{};}};x(Q,_0x18b7a6(0x202),Ut),x(Q,_0x18b7a6(0x281),m),x(Q,_0x18b7a6(0x390),h),x(Q,_0x18b7a6(0x464),i[_0x18b7a6(0x152)][_0x18b7a6(0x2ca)]),Q=C([(0x0,i[_0x18b7a6(0x193)])(r[_0x18b7a6(0x343)],a['UniverRenderEnginePlugin'],e['UniverBoardsPlugin'],t[_0x18b7a6(0x2b7)],n[_0x18b7a6(0x305)]),S(0x1,(0x0,i[_0x18b7a6(0x46d)])(i['Injector'])),S(0x2,i['IConfigService']),S(0x3,a['IRenderManagerService'])],Q);function Kt(_0x5d15d2){const _0x1f6de4=_0x18b7a6;return _0x5d15d2===!0x1?!0x1:typeof _0x5d15d2!=_0x1f6de4(0x401)||{..._0x5d15d2,'enabled':_0x5d15d2[_0x1f6de4(0x403)]??!0x0};}let $=class extends i[_0x18b7a6(0x170)]{constructor(_0x14897c=_,_0x14a71a,_0x317763,_0x20ed9f){const _0x5c56b9=_0x18b7a6;super(),this[_0x5c56b9(0x483)]=_0x14897c,this[_0x5c56b9(0x284)]=_0x14a71a,this['_configService']=_0x317763,this['_renderManagerService']=_0x20ed9f;let {..._0x170f18}=(0x0,i[_0x5c56b9(0x28b)])({},_,this['_config']);this['_configService']['setConfig'](g,_0x170f18);}[_0x18b7a6(0x2af)](){const _0x56bee9=_0x18b7a6;let _0x118070=[[W],[K]];n[_0x56bee9(0x3a8)][_0x56bee9(0x151)](this['_injector'],_0x118070),[..._0x118070,[Z],[V],[J],[Ft],[Bt]][_0x56bee9(0x137)](_0x589ea2=>this[_0x56bee9(0x284)][_0x56bee9(0x3f1)](_0x589ea2)),this[_0x56bee9(0x460)](this['_injector'][_0x56bee9(0x16a)](e[_0x56bee9(0x45c)])[_0x56bee9(0x294)](this[_0x56bee9(0x284)]['get'](Z))),this[_0x56bee9(0x460)](this[_0x56bee9(0x284)][_0x56bee9(0x16a)](V)),this[_0x56bee9(0x460)](this[_0x56bee9(0x284)]['get'](J)),this[_0x56bee9(0x460)](this[_0x56bee9(0x284)][_0x56bee9(0x16a)](Ft)),this[_0x56bee9(0x460)](this['_injector']['get'](Bt)),this[_0x56bee9(0x277)]();}[_0x18b7a6(0x3b0)](){const _0x4550be=_0x18b7a6;[[z],[dt],[G,{'useClass':ft}],[ct],[Ue],[ue],[w],[$e]][_0x4550be(0x137)](_0x4edaea=>{const _0x259577=_0x4550be;this[_0x259577(0x460)](this[_0x259577(0x37f)][_0x259577(0x24c)](i[_0x259577(0x152)][_0x259577(0x2ca)],_0x4edaea));});}[_0x18b7a6(0x277)](){const _0xb8d3d3=_0x18b7a6;var _0x7da54a,_0x2d1974;let _0x3a5153=this[_0xb8d3d3(0x210)]();this[_0xb8d3d3(0x292)][_0xb8d3d3(0x18d)](n[_0xb8d3d3(0x1c7)],{..._0x3a5153,'toolbar':{..._0x3a5153['toolbar'],'tools':{...(_0x7da54a=_0x3a5153[_0xb8d3d3(0x35a)])==null?void 0x0:_0x7da54a[_0xb8d3d3(0x3ba)],[e[_0xb8d3d3(0x332)][_0xb8d3d3(0x3a1)]]:qt((_0x2d1974=_0x3a5153[_0xb8d3d3(0x35a)])==null||(_0x2d1974=_0x2d1974[_0xb8d3d3(0x3ba)])==null?void 0x0:_0x2d1974[e[_0xb8d3d3(0x332)]['MindMap']])}}});}[_0x18b7a6(0x210)](){const _0x1a0a40=_0x18b7a6;return this[_0x1a0a40(0x292)][_0x1a0a40(0x34f)](n['BOARDS_UI_PLUGIN_CONFIG_KEY'])??{};}};x($,'pluginName',Ut),x($,_0x18b7a6(0x281),m),x($,_0x18b7a6(0x390),h),x($,_0x18b7a6(0x464),i[_0x18b7a6(0x152)][_0x18b7a6(0x2ca)]),$=C([(0x0,i[_0x18b7a6(0x193)])(r[_0x18b7a6(0x343)],a[_0x18b7a6(0x254)],e[_0x18b7a6(0x4c5)],t[_0x18b7a6(0x2b7)],n['UniverBoardsMobileUIPlugin']),S(0x1,(0x0,i[_0x18b7a6(0x46d)])(i[_0x18b7a6(0x392)])),S(0x2,i['IConfigService']),S(0x3,a[_0x18b7a6(0x323)])],$);function qt(_0x2f45a4){const _0x21c9bb=_0x18b7a6;return _0x2f45a4===!0x1?!0x1:typeof _0x2f45a4!=_0x21c9bb(0x401)||{..._0x2f45a4,'enabled':_0x2f45a4[_0x21c9bb(0x403)]??!0x0};}Object[_0x18b7a6(0x4a0)](exports,_0x18b7a6(0x47e),{'enumerable':!0x0,'get':function(){return $;}}),Object[_0x18b7a6(0x4a0)](exports,_0x18b7a6(0x2c2),{'enumerable':!0x0,'get':function(){return Q;}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@univerjs-pro/boards"),t=require("@univerjs-pro/boards-mind"),n=require("@univerjs-pro/boards-ui"),r=require("@univerjs-pro/license"),i=require("@univerjs/core"),a=require("@univerjs/engine-render"),o=require("rxjs"),s=require("@univerjs/ui"),c=require("@univerjs-pro/shape-editor-ui"),l=require("@univerjs-pro/engine-shape"),u=require("@univerjs/design"),d=require("@univerjs/icons"),f=require("react"),p=require("react/jsx-runtime");var m=`@univerjs-pro/boards-mind-ui`,h=`1.6.0`;const g=`boards-mind-ui.config`,_={};function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(n,r){t(n,r,e)}}function C(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let w=class extends i.RxDisposable{constructor(e,t,n){super(),this._renderContext=e,this._boardElementService=t,this._commandService=n,x(this,`_nodeSizeByKey`,/* @__PURE__ */ new Map),x(this,`_queuedLayouts`,/* @__PURE__ */ new Map),x(this,`_layoutFlushScheduled`,!1),this._init()}_init(){this._seedExistingNodeSizes(),this.disposeWithMe((0,i.toDisposable)(this._boardElementService.elementAdd$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{e.forEach(e=>{let t=this._boardElementService.getElementById(e.unitId,e.subUnitId,e.elementId);this._rememberNodeSize(e,t)})}))),this.disposeWithMe((0,i.toDisposable)(this._boardElementService.elementUpdate$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{e.forEach(e=>this._handleElementUpdate(e))})))}_seedExistingNodeSizes(){let e=this._renderContext.unitId,t=this._boardElementService.getElementDataForUnit(e);Object.entries(t).forEach(([t,n])=>{Object.values(n.data).forEach(n=>{this._rememberNodeSize({unitId:e,subUnitId:t,elementId:n.elementId},n)})})}_handleElementUpdate(e){if(e.unitId!==this._renderContext.unitId)return;let n=this._boardElementService.getElementById(e.unitId,e.subUnitId,e.elementId),r=(0,t.getMindMapNodeMeta)(n==null?void 0:n.element),i=this._resolveNodeSize(n);if(!r||!i){this._nodeSizeByKey.delete(this._getElementKey(e));return}let a=this._getElementKey(e),o=this._nodeSizeByKey.get(a);this._nodeSizeByKey.set(a,i),o&&o.width===i.width&&o.height===i.height||this._queueLayout({unitId:e.unitId,subUnitId:e.subUnitId,scopeId:r.structureScopeId})}_rememberNodeSize(e,n){if(e.unitId!==this._renderContext.unitId)return;let r=(0,t.getMindMapNodeMeta)(n==null?void 0:n.element),i=this._resolveNodeSize(n);r&&i&&this._nodeSizeByKey.set(this._getElementKey(e),i)}_resolveNodeSize(e){let t=(e==null?void 0:e.transform)??(e==null?void 0:e.element.transform),n=t==null?void 0:t.width,r=t==null?void 0:t.height;return!Number.isFinite(n)||!Number.isFinite(r)?null:{width:n,height:r}}_queueLayout(e){this._queuedLayouts.set(`${e.unitId}:${e.subUnitId}:${e.scopeId}`,e),this._layoutFlushScheduled||(this._layoutFlushScheduled=!0,Promise.resolve().then(()=>{this._layoutFlushScheduled=!1;let e=Array.from(this._queuedLayouts.values());this._queuedLayouts.clear(),e.forEach(e=>{this._executeRootAnchoredLayout(e)})}))}_executeRootAnchoredLayout(e){var n;let r=this._boardElementService.getElementById(e.unitId,e.subUnitId,e.scopeId),i=(n=(0,t.getMindMapContainerMeta)(r==null?void 0:r.element))==null?void 0:n.rootNodeId;this._commandService.executeCommand(t.LayoutMindMapOperation.id,{...e,skipUndo:!0,...i?{anchorNodeId:i}:null})}_getElementKey(e){return`${e.unitId}:${e.subUnitId}:${e.elementId}`}};w=C([S(1,(0,i.Inject)(e.IBoardElementService)),S(2,i.ICommandService)],w);const T={primaryColor:c.SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR,surfaceColor:c.SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_BACKGROUND_COLOR,textColor:c.SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR,fontFamily:i.DEFAULT_STYLES.ff};function E(e,t){let n=Math.min(1,Math.max(0,Number.isFinite(t)?t:1)),r=e.trim(),i=/^#([0-9a-fA-F]{6})$/.exec(r);if(!i)return e;let a=i[1];return`rgba(${Number.parseInt(a.slice(0,2),16)}, ${Number.parseInt(a.slice(2,4),16)}, ${Number.parseInt(a.slice(4,6),16)}, ${n})`}const D={primaryColor:T.primaryColor,ghostFillColor:E(T.surfaceColor,.72),ghostTextColor:E(T.textColor,.62),rootTextColor:E(T.surfaceColor,.86),sourceHighlightFillColor:E(T.primaryColor,.12),sourceHighlightStrokeColor:E(T.primaryColor,.9),objectAlpha:.72,dragObjectAlpha:.78,connectorAlpha:.64,lineWidthScreen:2,fallbackNodeWidth:t.MIND_MAP_DEFAULT_NODE_SIZE.nodeWidth,fallbackNodeHeight:t.MIND_MAP_DEFAULT_NODE_SIZE.nodeHeight,branchGap:t.MIND_MAP_DEFAULT_LAYOUT.branchGap,sourceHaloScreen:4,ghostRadius:8,rootRadius:10,fontFamily:T.fontFamily,ghostFontWeight:500,rootFontWeight:600,rootFontSize:18,textPaddingScreen:12,dirtyPaddingScreen:24,sourceDashScreen:[6,4]};function O(e,t,n,r,i,a){let o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}function k(e,t,n){return`${e} ${t/n}px ${D.fontFamily}`}const A=`board-mind-map-drag-preview-object`,j=n.BOARD_RENDER_LAYER_INDEX.preview;function M(e,t){return Number.isFinite(e)?e:t}function N(){return D.fallbackNodeWidth}function P(){return D.fallbackNodeHeight}function F(e){return e===1?`left`:e===3?`right`:`center`}function ee(e,t,n,r){return n===1?e+r:n===3?e+t-r:e+t/2}var te=class extends a.BaseObject{constructor(e=A,t){super(e),x(this,`_state`,{ghostBounds:null,parentBounds:null,side:`right`,zoomRatio:1}),this.evented=!1,this.zIndex=n.BOARD_RENDER_OBJECT_Z_INDEX.transientPreviewForeground,this.updateState(t)}updateState(e){if(this._state={...this._state,...e},this._state.ghostBounds){let e=this._resolveDirtyBounds();this.transformByState(e),this.show()}else this.hide();let t=this;typeof t.makeDirtyNoDebounce==`function`?t.makeDirtyNoDebounce(!0):this.makeDirty(!0)}isHit(e){return!1}render(e,n){let r=this._state.ghostBounds;if(!r||!this.visible)return this.makeDirty(!1),this;let i=Number.isFinite(this._state.zoomRatio)&&(this._state.zoomRatio??0)>0?this._state.zoomRatio:1,a=M(r.left,0),o=M(r.top,0),s=Math.max(1,M(r.width,N())),c=Math.max(1,M(r.height,P()));if(e.save(),e.globalAlpha=D.dragObjectAlpha,e.lineWidth=D.lineWidthScreen/i,e.strokeStyle=D.primaryColor,e.fillStyle=D.ghostFillColor,this._drawConnectorPreview(e,{left:a,top:o,width:s,height:c},i),this._drawSourceHighlight(e,i),this._state.renderGhostNode===!1)return e.restore(),this.makeDirty(!1),this;O(e,a,o,s,c,D.ghostRadius),e.fill(),e.stroke();let l=this._state.textStyle,u=Number.isFinite(l==null?void 0:l.fontSize)&&((l==null?void 0:l.fontSize)??0)>0?l.fontSize:16,d=D.textPaddingScreen/i;return e.fillStyle=(l==null?void 0:l.color)??D.ghostTextColor,e.font=k(D.ghostFontWeight,u,i),e.textAlign=F(l==null?void 0:l.horizontalAlign),e.textBaseline=`middle`,e.fillText((l==null?void 0:l.text)||t.MIND_MAP_DEFAULT_NODE_TEXT,ee(a,s,l==null?void 0:l.horizontalAlign,d),o+c/2,Math.max(1,s-d*2)),e.restore(),this.makeDirty(!1),this}_resolveDirtyBounds(){let e=this._state.ghostBounds,t=Number.isFinite(this._state.zoomRatio)&&(this._state.zoomRatio??0)>0?this._state.zoomRatio:1,n=D.dirtyPaddingScreen/t;if(!e)return{left:0,top:0,width:1,height:1};let r=M(e.left,0),i=M(e.top,0),a=Math.max(1,M(e.width,N())),o=Math.max(1,M(e.height,P())),s=this._state.sourceBounds,c=this._state.parentBounds,l=M(s==null?void 0:s.left,r),u=M(s==null?void 0:s.top,i),d=Math.max(1,M(s==null?void 0:s.width,a)),f=Math.max(1,M(s==null?void 0:s.height,o));if(!c){let e=Math.min(r,l)-n,t=Math.min(i,u)-n,s=Math.max(r+a,l+d)+n,c=Math.max(i+o,u+f)+n;return{left:e,top:t,width:s-e,height:c-t}}let p=M(c.left,r),m=M(c.top,i),h=Math.max(1,M(c.width,N())),g=Math.max(1,M(c.height,P())),_=Math.min(r,p,l)-n,v=Math.min(i,m,u)-n,y=Math.max(r+a,p+h,l+d)+n,b=Math.max(i+o,m+g,u+f)+n;return{left:_,top:v,width:y-_,height:b-v}}_drawSourceHighlight(e,t){var n;let r=this._state.sourceBounds;if(!r)return;let i=D.sourceHaloScreen/t,a=M(r.left,0)-i,o=M(r.top,0)-i,s=Math.max(1,M(r.width,N()))+i*2,c=Math.max(1,M(r.height,P()))+i*2;e.save(),e.globalAlpha=1,e.lineWidth=D.lineWidthScreen/t,e.strokeStyle=D.sourceHighlightStrokeColor,e.fillStyle=D.sourceHighlightFillColor,(n=e.setLineDash)==null||n.call(e,D.sourceDashScreen.map(e=>e/t)),O(e,a,o,s,c,D.rootRadius),e.fill(),e.stroke(),e.restore()}_drawConnectorPreview(e,t,n){let r=this._state.parentBounds;if(!r)return;let i=M(r.left,0),a=M(r.top,0),o=Math.max(1,M(r.width,N())),s=Math.max(1,M(r.height,P())),c=D.branchGap,l=this._state.side??`right`;if(e.save(),e.globalAlpha=D.connectorAlpha,e.strokeStyle=D.primaryColor,e.lineWidth=D.lineWidthScreen/n,e.lineCap=`round`,e.lineJoin=`round`,e.beginPath(),l===`top`||l===`bottom`){let n=i+o/2,r=t.left+t.width/2,u=l===`bottom`?a+s:a,d=l===`bottom`?t.top:t.top+t.height,f=l===`bottom`?Math.min(u+c,(u+d)/2):Math.max(u-c,(u+d)/2);e.moveTo(n,u),e.lineTo(n,f),e.lineTo(r,f),e.lineTo(r,d)}else{let n=a+s/2,r=t.top+t.height/2,u=l===`right`?i+o:i,d=l===`right`?t.left:t.left+t.width,f=l===`right`?Math.min(u+c,(u+d)/2):Math.max(u-c,(u+d)/2);e.moveTo(u,n),e.lineTo(f,n),e.lineTo(f,r),e.lineTo(d,r)}e.stroke(),e.restore()}};function I(e,t){return(t==null?void 0:t[e.elementId])??e.element.transform}function ne(e,t){let n=I(e,t);return{x:(n.left??0)+(n.width??0)/2,y:(n.top??0)+(n.height??0)/2}}function re(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function ie(e,t){let n=e.left??0,r=e.top??0,i=n+(e.width??0),a=r+(e.height??0),o=t.left??0,s=t.top??0,c=o+(t.width??0),l=s+(t.height??0),u=Math.max(o-i,n-c,0),d=Math.max(s-a,r-l,0);return Math.hypot(u,d)}function ae(e,n,r){var i;let a=(0,t.getMindMapNodeMeta)((i=e[n])==null?void 0:i.element);for(;a!=null&&a.parentNodeId;){var o;if(a.parentNodeId===r)return!0;a=(0,t.getMindMapNodeMeta)((o=e[a.parentNodeId])==null?void 0:o.element)}return!1}function oe(e,t,n){let r=I(e,n),i=r.top??0,a=r.height??0;return a<=0?null:t.y<=i+a/3?`before`:t.y>=i+a*2/3?`after`:null}function L(e,t){let n=t==null?void 0:t[e];return Number.isFinite(n==null?void 0:n.left)&&Number.isFinite(n==null?void 0:n.top)?{kind:`detach`,left:n.left,top:n.top}:{kind:`detach`}}function R(e,n,r){let i=e[n],a=(0,t.getMindMapNodeMeta)(i==null?void 0:i.element);if(!i||!a||!a.parentNodeId&&!(r!=null&&r.allowRootReparent))return{kind:`none`};let o=r==null?void 0:r.boundsByElementId,s=I(i,o),c=ne(i,o),l=Object.values(e).map(i=>{let c=(0,t.getMindMapNodeMeta)(i.element);return!c||i.elementId===n||i.elementId===a.parentNodeId||r!=null&&r.allowRootReparent&&!a.parentNodeId&&c.structureScopeId===a.structureScopeId||ae(e,i.elementId,n)?null:{item:i,snapDistance:ie(s,I(i,o)),center:ne(i,o)}}).filter(e=>!!e).sort((e,t)=>e.snapDistance-t.snapDistance||re(c,e.center)-re(c,t.center))[0];if(l&&l.snapDistance<=100){let e=(0,t.getMindMapNodeMeta)(l.item.element),n=e!=null&&e.parentNodeId?oe(l.item,c,o):null;return e!=null&&e.parentNodeId&&n?{kind:`reparent`,newParentNodeId:e.parentNodeId,side:e.side??`right`,referenceNodeId:l.item.elementId,placement:n}:{kind:`reparent`,newParentNodeId:l.item.elementId,side:c.x<l.center.x?`left`:`right`}}if(r!=null&&r.detachWhenNoSnap)return L(n,o);if(!a.parentNodeId)return{kind:`none`};let u=e[a.parentNodeId];return u&&re(c,ne(u,o))>560?L(n,o):{kind:`none`}}function se(e,n){var r,i;return e.elementId===n||((r=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:r.structureScopeId)===n||((i=(0,t.getMindMapConnectorMeta)(e.element))==null?void 0:i.structureScopeId)===n}function ce(e,t,n,r){let i=e[t];if(!i)return e;let a=i.transform??i.element.transform??{};return{...e,[t]:{...i,transform:{...a,left:(a.left??0)+n,top:(a.top??0)+r},element:{...i.element,transform:{...i.element.transform,left:(i.element.transform.left??0)+n,top:(i.element.transform.top??0)+r}}}}}function le(t){if(!Number.isFinite(t.liveRootBounds.left)||!Number.isFinite(t.liveRootBounds.top)||!Number.isFinite(t.rootStartBounds.left)||!Number.isFinite(t.rootStartBounds.top))return null;let n=t.liveRootBounds.left-t.rootStartBounds.left,r=t.liveRootBounds.top-t.rootStartBounds.top,i=ce(t.elementData,t.scopeId,n,r),a=[];return Object.values(i).forEach(o=>{if(o.elementId===t.rootNodeId||o.elementId===t.scopeId||!se(o,t.scopeId))return;if(`connectorData`in o.element){var s;let i=(s=t.elementData[o.elementId])==null?void 0:s.element;i&&`connectorData`in i&&a.push({kind:`connector`,elementId:o.elementId,element:(0,e.offsetBoardConnectorGeometry)(i,{x:n,y:r})});return}let c=(0,e.resolveBoardElementWorldBounds)(i,o.elementId);c&&a.push({kind:`bounds`,elementId:o.elementId,bounds:c})}),{deltaX:n,deltaY:r,elementData:i,items:a}}let z=class extends i.RxDisposable{constructor(e,t,n,r,i,a,o){super(),this._renderContext=e,this._boardElementService=t,this._elementStateService=n,this._commandService=r,this._uiStateService=i,this._instanceService=a,this._undoRedoGroupService=o,x(this,`_dragStart`,null),x(this,`_pointerDragStart`,null),x(this,`_dragPreviewObject`,null),x(this,`_childDragActivated`,!1),x(this,`_lastChildDragAction`,null),x(this,`_objectPointerDisposables`,null),x(this,`_attachObjectPointerScheduled`,!1),x(this,`_activePointerDragDisposables`,null),x(this,`_childDragSelectionHidden`,!1),this._init()}_init(){var e,t,n,r,a;let s=this._renderContext.scene.getTransformerByCreate();this.disposeWithMe((0,i.toDisposable)(s.changeStart$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>{this._captureDragStart()}))),this.disposeWithMe((0,i.toDisposable)(((e=s.changing$)==null?void 0:e.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{this._syncDragPreview(e==null?void 0:e.objects)}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(s.changeEnd$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{setTimeout(()=>this._applyDragTopologyAction(e==null?void 0:e.objects),0)}))),this.disposeWithMe((0,i.toDisposable)(((t=this._renderContext.scene.onPointerDown$)==null?void 0:t.subscribeEvent({priority:3,next:([e])=>this._capturePointerChildDragStart(e)}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(((n=this._renderContext.scene.onPointerMove$)==null?void 0:n.subscribeEvent({priority:3,next:([e,t])=>this._syncPointerChildDragPreview(e,t)}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(((r=this._renderContext.scene.onPointerUp$)==null?void 0:r.subscribeEvent({priority:3,next:([e,t])=>this._applyPointerChildDrag(e,t)}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(((a=this._renderContext.scene.onPointerCancel$)==null?void 0:a.subscribeEvent({priority:3,next:([,e])=>this._cancelPointerChildDrag(e)}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(()=>{var e;return(e=this._objectPointerDisposables)==null?void 0:e.dispose()})),this.disposeWithMe((0,i.toDisposable)(()=>this._disposeActivePointerDragListeners())),this._subscribeElementDataChanges(),this._scheduleAttachObjectPointerListeners(),this.disposeWithMe((0,i.toDisposable)(()=>this._removeDragPreviewObject()))}_subscribeElementDataChanges(){[this._boardElementService.elementAdd$,this._boardElementService.elementUpdate$,this._boardElementService.elementRemove$].forEach(e=>{this.disposeWithMe((0,i.toDisposable)(e.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>{this._scheduleAttachObjectPointerListeners()})))}),this._elementStateService.state$&&this.disposeWithMe((0,i.toDisposable)(this._elementStateService.state$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>{this._scheduleAttachObjectPointerListeners()})))}_scheduleAttachObjectPointerListeners(){this._attachObjectPointerScheduled||(this._attachObjectPointerScheduled=!0,Promise.resolve().then(()=>this._attachObjectPointerListeners()))}_attachObjectPointerListeners(){var e;this._attachObjectPointerScheduled=!1;let r=this._resolveCurrentBoardContext(),a=this._renderContext.scene;if(!r||typeof a.getObject!=`function`)return;let o=this._boardElementService.getElementData(r.unitId,r.subUnitId),s=new i.DisposableCollection;(e=this._objectPointerDisposables)==null||e.dispose(),this._objectPointerDisposables=s,Object.values(o).forEach(e=>{var i,o;let c=(0,t.getMindMapNodeMeta)(e.element);if(!(c!=null&&c.parentNodeId))return;let l=(0,n.getBoardElementRenderObjectKey)(r.unitId,e.elementId),u=((i=a.getObjectIncludeInGroup)==null?void 0:i.call(a,l))??((o=a.getObject)==null?void 0:o.call(a,l));u!=null&&u.onPointerDown$&&s.add(u.onPointerDown$.subscribeEvent({priority:-10,next:([t,n])=>this._capturePointerChildDragStart(t,{unitId:r.unitId,subUnitId:r.subUnitId,nodeId:e.elementId},n)}))})}_resolveCurrentBoardContext(){let e=this._elementStateService.getSnapshot().context;if(e)return e;let t=this._renderContext.unitId,n=t?this._instanceService.getUnit(t,i.UniverInstanceType.UNIVER_BOARD):null,r=n==null?void 0:n.getActivePageId();return!n||!r?null:{unitId:n.getUnitId(),subUnitId:r}}_captureDragStart(){let n=this._elementStateService.getSnapshot();this._childDragActivated=!1,this._childDragSelectionHidden=!1,this._lastChildDragAction=null;let r=n.context,i=n.focusedId??n.selectedIds[0];if(!r||!i){this._dragStart=null,this._removeDragPreviewObject();return}let a=this._boardElementService.getElementData(r.unitId,r.subUnitId);if(n.selectedIds.length>1){let t=this._resolveCompleteSelectedScope(a,n.selectedIds);if(!t){this._dragStart=null,this._removeDragPreviewObject();return}let i=a[t.rootNodeId],o=(0,e.resolveBoardElementWorldBounds)(a,t.rootNodeId),s=i.element.transform;this._dragStart={kind:`scope`,unitId:r.unitId,subUnitId:r.subUnitId,nodeId:t.rootNodeId,scopeId:t.scopeId,left:(o==null?void 0:o.left)??s.left??0,top:(o==null?void 0:o.top)??s.top??0,width:(o==null?void 0:o.width)??s.width??0,height:(o==null?void 0:o.height)??s.height??0,elementData:a};return}let o=a[i],s=(0,t.getMindMapNodeMeta)(o==null?void 0:o.element);if(!o||!s){this._dragStart=null,this._removeDragPreviewObject();return}let c=(0,e.resolveBoardElementWorldBounds)(a,i),l=o.element.transform;this._dragStart={kind:s.parentNodeId===null?`root`:`child`,unitId:r.unitId,subUnitId:r.subUnitId,nodeId:i,scopeId:s.structureScopeId,left:(c==null?void 0:c.left)??l.left??0,top:(c==null?void 0:c.top)??l.top??0,width:(c==null?void 0:c.width)??l.width??0,height:(c==null?void 0:c.height)??l.height??0,elementData:a}}_resolveCompleteSelectedScope(e,n){let r=new Set(n),i=n.map(n=>{var r,i,a,o;let s=(r=e[n])==null?void 0:r.element;return((i=(0,t.getMindMapNodeMeta)(s))==null?void 0:i.structureScopeId)??((a=(0,t.getMindMapConnectorMeta)(s))==null?void 0:a.structureScopeId)??((o=(0,t.getMindMapContainerMeta)(s))==null?void 0:o.structureScopeId)??null});if(i.some(e=>e===null)||new Set(i).size!==1)return null;let a=i[0];if(!a)return null;let o=Object.values(e).filter(e=>{var n;return e.element.visible!==!1&&((n=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:n.structureScopeId)===a});if(o.length===0||o.some(e=>!r.has(e.elementId)))return null;let s=o.filter(e=>{var n;return((n=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:n.parentNodeId)===null});return s.length===1?{rootNodeId:s[0].elementId,scopeId:a}:null}_capturePointerChildDragStart(n,r,i){var a,o,s,c,l;if(this._uiStateService.getState().interactionMode===`viewing`||(n.button??0)!==0)return;let u=this._elementStateService.getSnapshot();if(u.activeEditingId){this._pointerDragStart=null;return}let d=r?{unitId:r.unitId,subUnitId:r.subUnitId}:u.context??this._resolveCurrentBoardContext(),f=(r==null?void 0:r.nodeId)??(u.selectedIds.length===1?u.focusedId??u.selectedIds[0]:void 0);if(!d){this._pointerDragStart=null;return}let p=this._boardElementService.getElementData(d.unitId,d.subUnitId),m=this._getBoardPointFromEvent(n);if(!r){let n=f?p[f]:null,r=(0,t.getMindMapNodeMeta)(n==null?void 0:n.element),i=f?(0,e.resolveBoardElementWorldBounds)(p,f)??(n==null?void 0:n.element.transform):null;r!=null&&r.parentNodeId&&i&&this._isPointInBounds(m,{left:i.left??0,top:i.top??0,width:i.width??0,height:i.height??0})||(f=this._findChildNodeAtPoint(p,m))}if(!f){this._pointerDragStart=null;return}let h=p[f],g=(0,t.getMindMapNodeMeta)(h==null?void 0:h.element);if(!h||!(g!=null&&g.parentNodeId)){this._pointerDragStart=null;return}this._instanceService.focusUnit(d.unitId),(a=this._renderContext.engine)==null||(o=a.getCanvasElement)==null||(o=o.call(a))==null||(s=o.focus)==null||s.call(o,{preventScroll:!0}),(c=(l=this._elementStateService).selectElements)==null||c.call(l,d,[f],f),i==null||i.stopPropagation();let _=(0,e.resolveBoardElementWorldBounds)(p,f),v=h.element.transform,y={left:(_==null?void 0:_.left)??v.left??0,top:(_==null?void 0:_.top)??v.top??0,width:(_==null?void 0:_.width)??v.width??0,height:(_==null?void 0:_.height)??v.height??0};if(!r&&!this._isPointInBounds(m,y)){this._pointerDragStart=null;return}let b=this._getPointerScreenPoint(n);this._childDragActivated=!1,this._childDragSelectionHidden=!1,this._lastChildDragAction=null,this._pointerDragStart={kind:`child`,unitId:d.unitId,subUnitId:d.subUnitId,nodeId:f,scopeId:g.structureScopeId,...y,pointerStartX:b.x,pointerStartY:b.y,elementData:p},this._attachActivePointerDragListeners(),this._consumePointerEvent(n,i)}_syncPointerChildDragPreview(e,t){var n,r;let i=this._pointerDragStart;if(!i||e.buttons!==void 0&&e.buttons!==1)return;let a=this._getPointerLiveBounds(e,i);if(!this._isChildDragPastActivationThreshold(i,a))return;this._childDragActivated||this._hideSelectionForChildDrag(),this._childDragActivated=!0;let o=this._createTopologyBoundsByElementId(i.elementData,i.nodeId,a),s=R(i.elementData,i.nodeId,{boundsByElementId:o,detachWhenNoSnap:!0});this._lastChildDragAction=s,this._syncChildDragPreviewObject(a,s,o),this._consumePointerEvent(e,t),this._renderContext.scene.makeDirty(!0),(n=(r=this._renderContext.scene).requestRender)==null||n.call(r)}_applyPointerChildDrag(e,t){let n=this._pointerDragStart;if(!n)return;if(this._pointerDragStart=null,this._disposeActivePointerDragListeners(),this._removeDragPreviewObject(),!this._childDragActivated){this._lastChildDragAction=null;return}let r=this._boardElementService.getElementData(n.unitId,n.subUnitId),i=this._getPointerLiveBounds(e,n),a=this._createTopologyBoundsByElementId(r,n.nodeId,i),o=R(r,n.nodeId,{boundsByElementId:a,detachWhenNoSnap:!0});this._lastChildDragAction=null,this._executeChildDragAction(n.unitId,n.subUnitId,n.nodeId,r,o),this._childDragSelectionHidden=!1,this._consumePointerEvent(e,t)}_cancelPointerChildDrag(e){let t=this._pointerDragStart;if(t){if(this._pointerDragStart=null,this._disposeActivePointerDragListeners(),this._childDragActivated=!1,this._lastChildDragAction=null,this._removeDragPreviewObject(),this._childDragSelectionHidden){var n,r;(n=(r=this._elementStateService).selectElements)==null||n.call(r,{unitId:t.unitId,subUnitId:t.subUnitId},[t.nodeId],t.nodeId),this._childDragSelectionHidden=!1}e==null||e.stopPropagation()}}_attachActivePointerDragListeners(){this._disposeActivePointerDragListeners();let e=typeof window>`u`?null:window;if(!(e!=null&&e.addEventListener))return;let t=new i.DisposableCollection,n=e=>this._syncPointerChildDragPreview(e),r=e=>this._applyPointerChildDrag(e),a=()=>this._cancelPointerChildDrag();e.addEventListener(`pointermove`,n,{capture:!0}),e.addEventListener(`pointerup`,r,{capture:!0}),e.addEventListener(`pointercancel`,a,{capture:!0}),t.add((0,i.toDisposable)(()=>{e.removeEventListener(`pointermove`,n,{capture:!0}),e.removeEventListener(`pointerup`,r,{capture:!0}),e.removeEventListener(`pointercancel`,a,{capture:!0})})),this._activePointerDragDisposables=t}_findChildNodeAtPoint(n,r){let i=Object.values(n);for(let a=i.length-1;a>=0;--a){let o=i[a],s=(0,t.getMindMapNodeMeta)(o.element);if(!(s!=null&&s.parentNodeId))continue;let c=(0,e.resolveBoardElementWorldBounds)(n,o.elementId)??o.element.transform;if(this._isPointInBounds(r,{left:c.left??0,top:c.top??0,width:c.width??0,height:c.height??0}))return o.elementId}}_disposeActivePointerDragListeners(){var e;(e=this._activePointerDragDisposables)==null||e.dispose(),this._activePointerDragDisposables=null}_syncDragPreview(e){let t=this._dragStart;t&&((t.kind===`root`||t.kind===`scope`)&&this._syncRootScopePreview(e),t.kind===`root`?this._syncRootReparentPreview(e):this._syncChildDragPreview(e))}_syncRootScopePreview(e){let t=this._dragStart;if(!t||t.kind!==`root`&&t.kind!==`scope`)return;let r=e==null?void 0:e.get((0,n.getBoardElementRenderObjectKey)(t.unitId,t.nodeId));if(!r||!Number.isFinite(r.left)||!Number.isFinite(r.top))return;let i=le({elementData:t.elementData,rootNodeId:t.nodeId,scopeId:t.scopeId,rootStartBounds:{left:t.left,top:t.top},liveRootBounds:{left:r.left,top:r.top}});if(!i)return;let a=this._renderContext.scene,o=a,s=!1;i.items.forEach(e=>{var r;let c=(0,n.getBoardElementRenderObjectKey)(t.unitId,e.elementId),l=((r=o.getObjectIncludeInGroup)==null?void 0:r.call(o,c))??a.getObject(c);l&&(e.kind===`connector`&&typeof l.updateElement==`function`?(l.updateElement(e.element,i.elementData),s=!0):e.kind===`bounds`&&(l.transformByState(e.bounds),typeof l.makeDirtyNoDebounce==`function`?l.makeDirtyNoDebounce(!0):l.makeDirty(!0),s=!0))}),s&&a.makeDirty(!0)}_syncRootReparentPreview(e){var t,r;let i=this._dragStart;if(!i||i.kind!==`root`)return;let a=e==null?void 0:e.get((0,n.getBoardElementRenderObjectKey)(i.unitId,i.nodeId));if(!a||!Number.isFinite(a.left)||!Number.isFinite(a.top)){this._removeDragPreviewObject();return}let o=this._getLiveObjectBounds(a,i),s=this._createTopologyBoundsByElementId(i.elementData,i.nodeId,o),c=R(i.elementData,i.nodeId,{boundsByElementId:s,allowRootReparent:!0});if(c.kind!==`reparent`){this._removeDragPreviewObject();return}let l=this._ensureDragPreviewObject();l&&(l.updateState({ghostBounds:o,sourceBounds:null,parentBounds:s[c.newParentNodeId],side:c.side,textStyle:void 0,renderGhostNode:!1}),this._renderContext.scene.makeDirty(!0),(t=(r=this._renderContext.scene).requestRender)==null||t.call(r))}_syncChildDragPreview(e){var t,r;let i=this._dragStart;if(!i||i.kind!==`child`)return;let a=e==null?void 0:e.get((0,n.getBoardElementRenderObjectKey)(i.unitId,i.nodeId));if(!a){this._removeDragPreviewObject();return}let o=this._getLiveObjectBounds(a,i);if(!this._isChildDragPastActivationThreshold(i,o)){this._lastChildDragAction=null,this._removeDragPreviewObject(),this._restoreObjectToDragStart(a,i),this._renderContext.scene.makeDirty(!0);return}this._childDragActivated||this._hideSelectionForChildDrag(),this._childDragActivated=!0;let s=this._createTopologyBoundsByElementId(i.elementData,i.nodeId,o),c=R(i.elementData,i.nodeId,{boundsByElementId:s,detachWhenNoSnap:!0});this._lastChildDragAction=c,this._syncChildDragPreviewObject(o,c,s),this._restoreObjectToDragStart(a,i),this._renderContext.scene.makeDirty(!0),(t=(r=this._renderContext.scene).requestRender)==null||t.call(r)}_applyDragTopologyAction(e){var t;let n=this._elementStateService.getSnapshot(),r=n.context,i=n.focusedId??n.selectedIds[0];if(r&&((t=this._dragStart)==null?void 0:t.kind)===`scope`){this._removeDragPreviewObject(),this._applyScopeTranslation(r.unitId,r.subUnitId,e);return}if(!r||!i||n.selectedIds.length!==1){this._removeDragPreviewObject(),this._dragStart=null;return}this._removeDragPreviewObject();let a=this._boardElementService.getElementData(r.unitId,r.subUnitId);if(this._applyRootTranslation(r.unitId,r.subUnitId,i,a,e))return;let o=this._resolveChildDragTopologyAction(r.unitId,r.subUnitId,i,a,e);this._executeChildDragAction(r.unitId,r.subUnitId,i,a,o)}_applyScopeTranslation(e,r,i){let a=this._dragStart;if(this._dragStart=null,!a||a.kind!==`scope`||a.unitId!==e||a.subUnitId!==r)return;let o=i==null?void 0:i.get((0,n.getBoardElementRenderObjectKey)(e,a.nodeId)),s=o&&Number.isFinite(o.left)?o.left??a.left:a.left,c=o&&Number.isFinite(o.top)?o.top??a.top:a.top,l=s-a.left,u=c-a.top;(l!==0||u!==0)&&this._commandService.executeCommand(t.TranslateMindMapOperation.id,{unitId:e,subUnitId:r,scopeId:a.scopeId,deltaX:l,deltaY:u})}_executeChildDragAction(e,n,r,i,a){if(a.kind===`reparent`){var o,s;let c=(0,t.getMindMapNodeMeta)((o=i[r])==null?void 0:o.element),l=(0,t.getMindMapNodeMeta)((s=i[a.newParentNodeId])==null?void 0:s.element);this._executeAndLayout(t.ReparentMindMapNodeOperation.id,{unitId:e,subUnitId:n,nodeId:r,newParentNodeId:a.newParentNodeId,side:a.side,...a.referenceNodeId?{referenceNodeId:a.referenceNodeId}:null,...a.placement?{placement:a.placement}:null},[c==null?void 0:c.structureScopeId,l==null?void 0:l.structureScopeId],r)}else if(a.kind===`detach`){var c;let o=(0,t.getMindMapNodeMeta)((c=i[r])==null?void 0:c.element);this._executeAndLayout(t.DetachMindMapNodeOperation.id,{unitId:e,subUnitId:n,nodeId:r,...Number.isFinite(a.left)?{left:a.left}:null,...Number.isFinite(a.top)?{top:a.top}:null},[o==null?void 0:o.structureScopeId],r)}}_applyRootTranslation(r,i,a,o,s){let c=this._dragStart;if((c==null?void 0:c.kind)===`root`&&(this._dragStart=null),!c||c.unitId!==r||c.subUnitId!==i||c.nodeId!==a)return!1;let l=o[a],u=(0,t.getMindMapNodeMeta)(l==null?void 0:l.element);if(!l||!u||u.parentNodeId!==null)return!1;let d=s==null?void 0:s.get((0,n.getBoardElementRenderObjectKey)(r,a)),f=(0,e.resolveBoardElementWorldBounds)(o,a),p=Number.isFinite(d==null?void 0:d.left)?d.left:(f==null?void 0:f.left)??l.element.transform.left??0,m=Number.isFinite(d==null?void 0:d.top)?d.top:(f==null?void 0:f.top)??l.element.transform.top??0,h=p-c.left,g=m-c.top;if(h===0&&g===0)return!0;let _={left:p,top:m,width:Number.isFinite(d==null?void 0:d.width)?d.width:c.width,height:Number.isFinite(d==null?void 0:d.height)?d.height:c.height},v=R(o,a,{boundsByElementId:this._createTopologyBoundsByElementId(o,a,_),allowRootReparent:!0});if(v.kind===`reparent`)return this._executeChildDragAction(r,i,a,o,v),!0;let y=!!f&&Math.abs(f.left-p)<.001&&Math.abs(f.top-m)<.001;return this._commandService.executeCommand(t.TranslateMindMapOperation.id,{unitId:r,subUnitId:i,scopeId:c.scopeId,deltaX:h,deltaY:g,...y?{excludeElementIds:[a],preserveExcludedWorldTransforms:!0}:null}),!0}_resolveChildDragTopologyAction(e,t,r,i,a){let o=this._dragStart;if(!o||o.kind!==`child`||o.unitId!==e||o.subUnitId!==t||o.nodeId!==r)return{kind:`none`};this._dragStart=null;let s=a==null?void 0:a.get((0,n.getBoardElementRenderObjectKey)(e,r));if(!this._childDragActivated)return s&&this._restoreObjectToDragStart(s,o),this._lastChildDragAction=null,{kind:`none`};if(!s){let e=this._lastChildDragAction??{kind:`none`};return this._lastChildDragAction=null,e}let c=this._getLiveObjectBounds(s,o);if(this._restoreObjectToDragStart(s,o),!this._isChildDragPastActivationThreshold(o,c))return this._lastChildDragAction=null,{kind:`none`};let l=R(i,r,{boundsByElementId:this._createTopologyBoundsByElementId(i,r,c),detachWhenNoSnap:!0});return this._lastChildDragAction=null,l}_isChildDragPastActivationThreshold(e,t){let n=(t.left??e.left)-e.left,r=(t.top??e.top)-e.top;return Math.hypot(n,r)>=18}_getPointerLiveBounds(e,t){let n=this._getPointerScreenPoint(e),r=this._getZoomRatio();return{left:t.left+(n.x-t.pointerStartX)/r,top:t.top+(n.y-t.pointerStartY)/r,width:t.width,height:t.height}}_getBoardPointFromEvent(e){let t=this._uiStateService.getState(),n=(t==null?void 0:t.viewportPanOffset)??{x:0,y:0},r=this._getZoomRatio();return{x:Math.round(((e.offsetX??0)-n.x)/r),y:Math.round(((e.offsetY??0)-n.y)/r)}}_getPointerScreenPoint(e){return{x:Number.isFinite(e.clientX)?e.clientX:e.offsetX??0,y:Number.isFinite(e.clientY)?e.clientY:e.offsetY??0}}_getZoomRatio(){let e=this._uiStateService.getState().zoomRatio;return Number.isFinite(e)&&(e??0)>0?e:1}_isPointInBounds(e,t){return e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height}_consumePointerEvent(e,t){var n,r;t==null||t.stopPropagation(),t&&(t.skipNextObservers=!0),(n=e.preventDefault)==null||n.call(e),(r=e.stopPropagation)==null||r.call(e)}_hideSelectionForChildDrag(){var e,t;this._childDragSelectionHidden||=((e=(t=this._elementStateService).clearSelection)==null||e.call(t),!0)}_getLiveObjectBounds(e,t){return{left:Number.isFinite(e.left)?e.left:t.left,top:Number.isFinite(e.top)?e.top:t.top,width:Number.isFinite(e.width)?e.width:t.width,height:Number.isFinite(e.height)?e.height:t.height}}_restoreObjectToDragStart(e,t){typeof e.transformByState==`function`&&e.transformByState({left:t.left,top:t.top,width:t.width,height:t.height}),typeof e.makeDirtyNoDebounce==`function`?e.makeDirtyNoDebounce(!0):typeof e.makeDirty==`function`&&e.makeDirty(!0)}_createTopologyBoundsByElementId(t,n,r){return Object.fromEntries(Object.keys(t).map(i=>i===n?[i,r]:[i,(0,e.resolveBoardElementWorldBounds)(t,i)??t[i].element.transform]))}_ensureDragPreviewObject(){if(this._dragPreviewObject)return this._dragPreviewObject;let e=this._renderContext.scene;return typeof e.addObject==`function`?(this._dragPreviewObject=new te(A),e.addObject(this._dragPreviewObject,j),this._dragPreviewObject):null}_syncChildDragPreviewObject(e,t,n){let r=this._ensureDragPreviewObject();r&&r.updateState({ghostBounds:e,sourceBounds:this._resolvePreviewSourceBounds(),parentBounds:t.kind===`reparent`?n[t.newParentNodeId]:null,side:t.kind===`reparent`?t.side:`right`,textStyle:this._resolvePreviewTextStyle(),renderGhostNode:!0})}_resolvePreviewSourceBounds(){let e=this._pointerDragStart??this._dragStart;return e?{left:e.left,top:e.top,width:e.width,height:e.height}:null}_resolvePreviewTextStyle(){var e,t;let n=this._pointerDragStart??this._dragStart,r=n==null||(e=n.elementData[n.nodeId])==null?void 0:e.element,i=r==null||(t=r.shapeData)==null?void 0:t.shapeText;if(i)return{text:typeof i.text==`string`?i.text:void 0,fontSize:Number.isFinite(i.fontSize)?i.fontSize:void 0,color:typeof i.color==`string`?i.color:void 0,horizontalAlign:Number.isFinite(i.horizontalAlign)?i.horizontalAlign:void 0}}_removeDragPreviewObject(){var e,t,n;if(!this._dragPreviewObject)return;let r=this._renderContext.scene;(e=r.removeObjects)==null||e.call(r,[this._dragPreviewObject]),this._dragPreviewObject=null,(t=(n=this._renderContext.scene).makeDirty)==null||t.call(n,!0)}_executeAndLayout(e,n,r,i){let a=[...new Set(r.filter(e=>!!e))],o=typeof n.unitId==`string`?n.unitId:this._renderContext.unitId,s=this._undoRedoGroupService.createRunner(o),c=s(()=>this._commandService.executeCommand(e,n));Promise.resolve(c).then(e=>{var r,o,c,l;if(e){if(a.forEach(e=>{s(()=>this._commandService.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:e}))}),i&&typeof n.unitId==`string`&&typeof n.subUnitId==`string`){var u,d;(u=(d=this._elementStateService).selectElements)==null||u.call(d,{unitId:n.unitId,subUnitId:n.subUnitId},[i],i)}(r=(o=this._renderContext.scene).makeDirty)==null||r.call(o,!0),(c=(l=this._renderContext.scene).requestRender)==null||c.call(l)}})}};z=C([S(1,(0,i.Inject)(e.IBoardElementService)),S(2,(0,i.Inject)(n.IBoardElementStateService)),S(3,i.ICommandService),S(4,n.IBoardUIStateService),S(5,i.IUniverInstanceService),S(6,(0,i.Inject)(s.UndoRedoGroupService))],z);let B=class extends i.Disposable{constructor(e,t,n,r,i,a,o,s,c){super(),this.renderContext=e,this.commandService=t,this.elementService=n,this.elementStateService=r,this.uiStateService=i,this.clipboardService=a,this.dialogService=o,this.localeService=s,this.textEditingService=c}};B=C([S(1,i.ICommandService),S(2,e.IBoardElementService),S(3,n.IBoardElementStateService),S(4,n.IBoardUIStateService),S(5,t.IMindMapClipboardService),S(6,s.IDialogService),S(7,(0,i.Inject)(i.LocaleService)),S(8,(0,i.Inject)(n.BoardTextEditingService))],B);const ue=`board.mind-map.description-dialog`,de=`board-mind-map-description-dialog`;function fe(e){let{unitId:n,subUnitId:r,nodeId:a,initialDescription:o=``}=e,c=(0,s.useDependency)(i.ICommandService),l=(0,s.useDependency)(s.IDialogService),d=(0,s.useDependency)(i.LocaleService),[m,h]=(0,f.useState)(o),g=()=>l.close(de);return/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-w-full univer-flex-col univer-gap-4`,"data-board-mind-map-description-dialog":`true`,children:[/* @__PURE__ */ (0,p.jsxs)(`label`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{className:`univer-text-sm univer-font-medium univer-text-gray-900 dark:!univer-text-gray-0`,children:d.t(`boards-mind-ui.description`)}),/* @__PURE__ */ (0,p.jsx)(u.Textarea,{autoFocus:!0,className:`univer-h-32 univer-resize-none univer-text-sm`,placeholder:d.t(`boards-mind-ui.descriptionPlaceholder`),value:m,onValueChange:h})]}),/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{size:`small`,variant:`default`,onClick:g,children:d.t(`boards-mind-ui.cancel`)}),/* @__PURE__ */ (0,p.jsx)(u.Button,{size:`small`,variant:`primary`,onClick:()=>{c.executeCommand(t.UpdateMindMapNodeOperation.id,{unitId:n,subUnitId:r,nodeId:a,foreignAttributes:{_note:m.trim()?m:null}}),g()},children:d.t(`boards-mind-ui.saveDescription`)})]})]})}const V=`board.operation.mind-map.keyboard-shortcut`,pe=`FOCUSING_MIND_MAP_NODE`,me=`FOCUSING_MIND_MAP_BLANK_BOARD`,he={copy:n.BOARD_SHORTCUT_BINDINGS.copy,paste:n.BOARD_SHORTCUT_BINDINGS.paste,"paste-as-new":n.BOARD_SHORTCUT_BINDINGS.paste,"add-child":n.BOARD_SHORTCUT_BINDINGS.addChildNode,"add-sibling-or-child":n.BOARD_SHORTCUT_BINDINGS.addSiblingNode,promote:n.BOARD_SHORTCUT_BINDINGS.addParentNode,"toggle-collapse":n.BOARD_SHORTCUT_BINDINGS.foldChildNodes,"collapse-all":n.BOARD_SHORTCUT_BINDINGS.collapseAllNodes,"edit-text":n.BOARD_SHORTCUT_BINDINGS.editCurrentNode,"open-description":n.BOARD_SHORTCUT_BINDINGS.addDescription,delete:s.KeyCode.DELETE,"arrow-left":s.KeyCode.ARROW_LEFT,"arrow-right":s.KeyCode.ARROW_RIGHT,"arrow-up":s.KeyCode.ARROW_UP,"arrow-down":s.KeyCode.ARROW_DOWN},ge={delete:[s.KeyCode.BACKSPACE]};function _e(e){return[he[e],...ge[e]??[]]}let H=class extends i.RxDisposable{constructor(e,t,n,r){super(),this._mindMapClipboardService=e,this._commandService=t,this._shortcutService=n,this._undoRedoGroupService=r,this._init()}_init(){this.disposeWithMe(this._commandService.registerCommand(this._createKeyboardShortcutOperation())),this._createShortcutItems().forEach(e=>{this.disposeWithMe(this._shortcutService.registerShortcut(e))})}_createKeyboardShortcutOperation(){return{id:V,type:i.CommandType.OPERATION,handler:(e,t,n)=>{let r=ve(e,n);return r?this.handleShortcut(r,t==null?void 0:t.action):!1}}}_createShortcutItems(){let e=(e,t)=>({id:V,binding:e,priority:160,preconditions:e=>(0,n.isBoardShortcutAvailable)(e)&&!!e.getContextValue(`FOCUSING_MIND_MAP_NODE`),staticParameters:{action:t}}),t=t=>_e(t).map(n=>e(n,t));return[...t(`copy`),{id:V,binding:he.paste,priority:160,preconditions:e=>(0,n.isBoardShortcutAvailable)(e)&&!!this._mindMapClipboardService.getPayload()&&!!e.getContextValue(`FOCUSING_MIND_MAP_NODE`),staticParameters:{action:`paste`}},{id:V,binding:he[`paste-as-new`],priority:150,preconditions:e=>(0,n.isBoardShortcutAvailable)(e)&&!!this._mindMapClipboardService.getPayload()&&!!e.getContextValue(`FOCUSING_MIND_MAP_BLANK_BOARD`),staticParameters:{action:`paste-as-new`}},...t(`add-child`),...t(`add-sibling-or-child`),...t(`promote`),...t(`toggle-collapse`),...t(`collapse-all`),...t(`edit-text`),...t(`open-description`),...t(`delete`),...t(`arrow-left`),...t(`arrow-right`),...t(`arrow-up`),...t(`arrow-down`)]}handleShortcut(e,n){return e.uiStateService.getState().interactionMode===`viewing`&&n!==`copy`?!1:n===`copy`?this._copySelectedNode(e):n===`paste`?this._pasteUnderSelectedNode(e):n===`paste-as-new`?this._pasteAsNewMindMap(e):n===`add-child`?this._addChild(e):n===`add-sibling-or-child`?this._addSiblingOrChild(e):n===`promote`?this._executeNodeOperation(e,t.PromoteMindMapNodeOperation.id):n===`toggle-collapse`?this._executeNodeOperation(e,t.ToggleMindMapNodeCollapseOperation.id):n===`collapse-all`?this._collapseAll(e):n===`edit-text`?this._openSelectedTextEditing(e):n===`open-description`?this._openDescriptionDialog(e):n===`delete`?this._deleteSelectedNode(e):n&&ye(n)?this._navigateByTopology(e,n):!1}_copySelectedNode(e){let n=this._getSelectedMindMapContext(e);return n?(e.commandService.executeCommand(t.CopyMindMapNodeOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:n.nodeId}),!0):!1}_pasteUnderSelectedNode(e){let n=this._getSelectedMindMapContext(e);return!n||!e.clipboardService.getPayload()?!1:(this._executeAndLayout(e,t.PasteMindMapNodeOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,targetNodeId:n.nodeId},n.scopeId),!0)}_pasteAsNewMindMap(e){let n=this._getBlankBoardContext(e);if(!n||!e.clipboardService.getPayload())return!1;let r=e.uiStateService.getState(),i=Number.isFinite(r.zoomRatio)&&r.zoomRatio>0?r.zoomRatio:1,a=Math.round((64-r.viewportPanOffset.x)/i),o=Math.round((64-r.viewportPanOffset.y)/i);return e.commandService.executeCommand(t.PasteMindMapAsNewMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,left:a,top:o}),!0}_addChild(e){let n=this._getSelectedMindMapContext(e);if(!n)return!1;let r=(0,i.generateRandomId)(6);return this._executeCreateAndEdit(e,t.AddMindMapChildOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,parentNodeId:n.nodeId,nodeId:r,connectorId:(0,i.generateRandomId)(6),text:e.localeService.t(`boards-mind-ui.panel.addText`)},n.scopeId,r),!0}_addSiblingOrChild(e){let n=this._getSelectedMindMapContext(e);if(!n)return!1;let r=(0,i.generateRandomId)(6);return this._executeCreateAndEdit(e,n.isRoot?t.AddMindMapChildOperation.id:t.AddMindMapSiblingOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,...n.isRoot?{parentNodeId:n.nodeId,nodeId:r}:{nodeId:n.nodeId,siblingNodeId:r},connectorId:(0,i.generateRandomId)(6),text:e.localeService.t(`boards-mind-ui.panel.addText`)},n.scopeId,r),!0}_executeNodeOperation(e,t){let n=this._getSelectedMindMapContext(e);return n?(this._executeAndLayout(e,t,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:n.nodeId},n.scopeId),!0):!1}_deleteSelectedNode(e){let n=this._getSelectedMindMapContext(e);if(!n)return!1;let r=e.commandService.syncExecuteCommand(t.DeleteMindMapNodeOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:n.nodeId});return r&&e.elementStateService.clearSelection(),r}_collapseAll(e){let n=this._getSelectedMindMapContext(e);if(!n)return!1;let r=e.elementService.getElementData(n.unitId,n.subUnitId),i=Object.values(r).map(e=>{let i=(0,t.getMindMapNodeMeta)(e.element);return(i==null?void 0:i.structureScopeId)===n.scopeId&&this._getMindMapChildren(r,n.scopeId,e.elementId).length>0?{nodeId:e.elementId,collapsed:i.collapsed}:null}).filter(e=>!!e);if(i.length===0)return!1;let a=i.some(e=>!e.collapsed),o=e.commandService,s=this._undoRedoGroupService.createRunner(n.unitId),c=i.map(e=>s(()=>o.executeCommand(t.ToggleMindMapNodeCollapseOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:e.nodeId,collapsed:a})));return Promise.all(c.map(e=>Promise.resolve(e))).then(e=>{e.some(Boolean)&&s(()=>o.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId}))}),!0}_openSelectedTextEditing(e){let t=this._getSelectedMindMapContext(e);if(!t)return!1;e.elementStateService.selectElements({unitId:t.unitId,subUnitId:t.subUnitId},[t.nodeId],t.nodeId);let r=e.textEditingService;return r.ignoreExternalFocusChanges(),r.setEditing({unitId:t.unitId,subUnitId:t.subUnitId,shapeId:t.nodeId,shapeKey:(0,n.getBoardElementRenderObjectKey)(t.unitId,t.nodeId),visible:!0}),!0}_openDescriptionDialog(e){let t=this._getSelectedMindMapContext(e);return t?(e.dialogService.open({id:de,title:{title:`boards-mind-ui.description`},width:420,draggable:!0,mask:!1,maskClosable:!0,children:{label:ue,unitId:t.unitId,subUnitId:t.subUnitId,nodeId:t.nodeId,initialDescription:t.description}}),!0):!1}_navigateByTopology(e,n){let r=this._getSelectedMindMapContext(e);if(!r)return!1;let i=e.elementService.getElementData(r.unitId,r.subUnitId),a=i[r.nodeId],o=(0,t.getMindMapNodeMeta)(a==null?void 0:a.element);if(!a||!o)return!1;let s={"arrow-left":`ArrowLeft`,"arrow-right":`ArrowRight`,"arrow-up":`ArrowUp`,"arrow-down":`ArrowDown`}[n];if(!s)return!1;let c=this._resolveArrowNavigationTarget(i,r.nodeId,o,s);return c?(e.elementStateService.selectElements({unitId:r.unitId,subUnitId:r.subUnitId},[c],c),!0):!1}_resolveArrowNavigationTarget(e,n,r,i){let a=this._getMindMapChildren(e,r.structureScopeId,n);if(r.parentNodeId===null){if(i===`ArrowLeft`){var o;return((o=a.find(e=>{var n;return((n=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:n.side)===`left`}))==null?void 0:o.elementId)??null}if(i===`ArrowRight`){var s;return((s=a.find(e=>{var n;return(((n=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:n.side)??`right`)===`right`}))==null?void 0:s.elementId)??null}return null}let c=r.side??`right`,l=c===`right`?`ArrowLeft`:`ArrowRight`,u=c===`right`?`ArrowRight`:`ArrowLeft`;if(i===l)return r.parentNodeId;if(i===u){var d;return((d=a[0])==null?void 0:d.elementId)??null}if(i===`ArrowUp`||i===`ArrowDown`){let t=this._getMindMapChildren(e,r.structureScopeId,r.parentNodeId),a=t.findIndex(e=>e.elementId===n),o=i===`ArrowUp`?t[a-1]:t[a+1];return(o==null?void 0:o.elementId)??null}return null}_getMindMapChildren(e,n,r){return Object.values(e).filter(e=>{let i=(0,t.getMindMapNodeMeta)(e.element);return(i==null?void 0:i.structureScopeId)===n&&i.parentNodeId===r&&e.element.visible!==!1}).sort((e,n)=>{let r=(0,t.getMindMapNodeMeta)(e.element),i=(0,t.getMindMapNodeMeta)(n.element);return(0,t.compareMindMapOrderKey)(r==null?void 0:r.orderKey,i==null?void 0:i.orderKey)||e.elementId.localeCompare(n.elementId)})}_getSelectedMindMapContext(e){var n;let r=e.elementStateService.getSnapshot(),i=r.focusedId??r.selectedIds[0];if(!i||r.selectedIds.length!==1||r.activeEditingId||r.isTransforming)return null;let a=r.context??{unitId:e.renderContext.unitId,subUnitId:e.renderContext.unit.getActivePageId()},o=e.elementService.getElementData(a.unitId,a.subUnitId)[i],s=(0,t.getMindMapNodeMeta)(o==null?void 0:o.element);return!o||!s?null:{unitId:a.unitId,subUnitId:a.subUnitId,nodeId:i,scopeId:s.structureScopeId,isRoot:s.parentNodeId===null,description:((n=s.foreignAttributes)==null?void 0:n._note)??``}}_getBlankBoardContext(e){var t,n;let r=e.elementStateService.getSnapshot();return r.activeEditingId||r.isTransforming||r.selectedIds.length>0||r.focusedId?null:{unitId:((t=r.context)==null?void 0:t.unitId)??e.renderContext.unitId,subUnitId:((n=r.context)==null?void 0:n.subUnitId)??e.renderContext.unit.getActivePageId()}}_executeAndLayout(e,n,r,i){let a=e.commandService,o=this._undoRedoGroupService.createRunner(r.unitId),s=o(()=>a.executeCommand(n,r));Promise.resolve(s).then(e=>{e&&o(()=>a.executeCommand(t.LayoutMindMapOperation.id,{unitId:r.unitId,subUnitId:r.subUnitId,scopeId:i}))})}_executeCreateAndEdit(e,r,i,a,o){let s={unitId:i.unitId,subUnitId:i.subUnitId},c=e.commandService,l=this._undoRedoGroupService.createRunner(i.unitId),u=l(()=>c.executeCommand(r,i));Promise.resolve(u).then(r=>{if(!r)return;l(()=>c.executeCommand(t.LayoutMindMapOperation.id,{...s,scopeId:a})),e.elementStateService.selectElements(s,[o],o);let i=e.textEditingService;i.ignoreExternalFocusChanges(),i.setEditing({...s,shapeId:o,shapeKey:(0,n.getBoardElementRenderObjectKey)(s.unitId,o),visible:!0})})}};H=C([S(0,t.IMindMapClipboardService),S(1,i.ICommandService),S(2,s.IShortcutService),S(3,(0,i.Inject)(s.UndoRedoGroupService))],H);function ve(e,t){var n,r;let o=typeof(t==null?void 0:t.unitId)==`string`?t.unitId:(n=e.get(i.IUniverInstanceService).getCurrentUnitOfType(i.UniverInstanceType.UNIVER_BOARD))==null?void 0:n.getUnitId();return o?((r=e.get(a.IRenderManagerService).getRenderUnitById(o))==null?void 0:r.with(B))??null:null}function ye(e){return e===`arrow-left`||e===`arrow-right`||e===`arrow-up`||e===`arrow-down`}const be={min:1,max:5,defaultValue:3},xe={min:0,max:100,defaultValue:100},Se=[{kind:`dropdown`,titleKey:`boards-mind-ui.toolbar.primary.line`,panel:`line`},{kind:`fontColor`,titleKey:`boards-mind-ui.toolbar.primary.fontColor`},{kind:`typography`,titleKey:`boards-mind-ui.toolbar.primary.typography`},{kind:`dropdown`,titleKey:`boards-mind-ui.toolbar.primary.more`,panel:`more`,dividerBefore:!0}],U={addSibling:`add-sibling-or-child`,addChild:`add-child`,copy:`copy`,paste:`paste`,delete:`delete`},Ce=[{key:`mind-map`,title:`Mind map`,items:[{value:`mindmap-horizontal`,icon:`mindmap-horizontal`,labelKey:`boards-mind-ui.panel.structureKind.mindmapHorizontal`},{value:`mindmap-vertical`,icon:`mindmap-vertical`,labelKey:`boards-mind-ui.panel.structureKind.mindmapVertical`}]},{key:`tree-diagram`,title:`Tree diagram`,items:[{value:`tree-right`,icon:`tree-right`,labelKey:`boards-mind-ui.panel.structureKind.treeRight`},{value:`tree-left`,icon:`tree-left`,labelKey:`boards-mind-ui.panel.structureKind.treeLeft`},{value:`tree-alternate`,icon:`tree-alternate`,labelKey:`boards-mind-ui.panel.structureKind.treeAlternate`}]},{key:`timeline`,title:`Timeline`,items:[{value:`timeline-horizontal`,icon:`timeline-horizontal`,labelKey:`boards-mind-ui.panel.structureKind.timelineHorizontal`},{value:`timeline-vertical`,icon:`timeline-vertical`,labelKey:`boards-mind-ui.panel.structureKind.timelineVertical`}]}],we={key:`branch`,title:`Branch`,items:[{value:`curve`,icon:`branch-curve`,labelKey:`boards-mind-ui.panel.branchLineType.curve`},{value:`rounded-orthogonal`,icon:`branch-rounded-orthogonal`,labelKey:`boards-mind-ui.panel.branchLineType.roundedOrthogonal`},{value:`orthogonal`,icon:`branch-orthogonal`,labelKey:`boards-mind-ui.panel.branchLineType.orthogonal`}]},Te=`board.mind-map.floating-toolbar`;function Ee(e,t){e.executeCommand(V,{action:t})}const De={line:d.ShapeLineIcon,more:d.MoreHorizontalIcon};function W(e){e.stopPropagation(),e.preventDefault()}function Oe(e,t=`univer-size-5`,n){return/* @__PURE__ */ (0,p.jsx)(s.EditorToolbarIcon,{children:/* @__PURE__ */ (0,p.jsx)(e,{className:t,extend:n})})}function ke(e){var t,n;let r=(e==null?void 0:e.shapeText)??{},a=r.dataModel&&typeof r.dataModel==`object`?r.dataModel:{},o=(t=a.doc)==null||(t=t.documentStyle)==null?void 0:t.textStyle;return{color:typeof r.color==`string`?r.color:(o==null||(n=o.cl)==null?void 0:n.rgb)??c.SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR,fontFamily:typeof r.fontFamily==`string`?r.fontFamily:(o==null?void 0:o.ff)??i.DEFAULT_STYLES.ff,fontSize:typeof r.fontSize==`number`?r.fontSize:typeof(o==null?void 0:o.fs)==`number`?o.fs:i.DEFAULT_STYLES.fs,horizontalAlign:r.horizontalAlign??a.ha??i.HorizontalAlign.LEFT,textFill:r.textFill&&typeof r.textFill==`object`?r.textFill:o==null?void 0:o.textFill,verticalAlign:r.verticalAlign??a.va??i.VerticalAlign.MIDDLE}}function Ae(e,t){if(!t)return;let n=_e(t);if(!n.length)return;let r=n.map(n=>e.getShortcutDisplay({id:`board.operation.mind-map.keyboard-shortcut`,binding:n,staticParameters:{action:t}})??void 0).filter(e=>!!e);return r.length?[...new Set(r)].join(`/`):void 0}async function je(e,n,r){return await Promise.resolve(n(()=>e.executeCommand(t.ChangeMindMapLayoutOperation.id,r)))?(await Promise.resolve(n(()=>e.executeCommand(t.LayoutMindMapOperation.id,{unitId:r.unitId,subUnitId:r.subUnitId,scopeId:r.scopeId}))),!0):!1}async function Me(e,n,r){return await Promise.resolve(n(()=>e.executeCommand(t.ChangeMindMapBranchLineTypeOperation.id,r)))?(await Promise.resolve(n(()=>e.executeCommand(t.LayoutMindMapOperation.id,{unitId:r.unitId,subUnitId:r.subUnitId,scopeId:r.scopeId}))),!0):!1}const Ne={"mindmap-horizontal":d.MindLayoutHorizontalIcon,"mindmap-vertical":d.MindLayoutVerticalIcon,"tree-right":d.MindTreeRightIcon,"tree-left":d.MindTreeLeftIcon,"tree-alternate":d.MindTreeAlternateIcon,"timeline-horizontal":d.MindTimelineHorizontalIcon,"timeline-vertical":d.MindTimelineVerticalIcon,"branch-curve":d.MindBranchCurveIcon,"branch-rounded-orthogonal":d.MindBranchRoundedOrthogonalIcon,"branch-orthogonal":d.MindBranchOrthogonalIcon};function Pe(t,n){let r=t.textStyle,i=(0,e.documentTextStyleToBoardShapeTextStyle)(r),a={...i.color===void 0?null:{color:i.color},...i.fontFamily===void 0?null:{fontFamily:i.fontFamily},...i.fontSize===void 0?null:{fontSize:i.fontSize},...i.bold===void 0?null:{bold:i.bold},...i.italic===void 0?null:{italic:i.italic},...i.underline===void 0?null:{underline:i.underline},...i.strikethrough===void 0?null:{strikethrough:i.strikethrough},...i.textFill===void 0?null:{textFill:i.textFill}};t.horizontalAlign!==void 0&&(a.horizontalAlign=t.horizontalAlign),t.verticalAlign!==void 0&&(a.verticalAlign=t.verticalAlign),Object.keys(a).length>0&&n({textStyle:a})}function Fe(e,t,n){let r=e??{},i=(0,c.buildShapeTextDataUpdate)(r,t),a=i.shapeText??r.shapeText??{};return{...r,...i,shapeText:{...a,...n.color===void 0?null:{color:n.color},...n.fontSize===void 0?null:{fontSize:n.fontSize},...n.bold===void 0?null:{bold:n.bold},...n.italic===void 0?null:{italic:n.italic},...n.underline===void 0?null:{underline:n.underline},...n.strikethrough===void 0?null:{strikethrough:n.strikethrough},...n.horizontalAlign===void 0?null:{horizontalAlign:n.horizontalAlign},...n.verticalAlign===void 0?null:{verticalAlign:n.verticalAlign},...n.textFill===void 0?null:{textFill:n.textFill}}}}function Ie(e,t){let n=e==null?void 0:e.stroke;n&&t({lineType:n.dashType===l.ShapeLineDashEnum.RoundDot||n.dashType===l.ShapeLineDashEnum.SquareDot?`dot`:n.dashType===l.ShapeLineDashEnum.Dash?`dash`:`solid`,...typeof n.width==`number`?{strokeWidth:n.width}:null,...typeof n.color==`string`?{stroke:n.color}:null,...typeof n.opacity==`number`?{opacity:n.opacity}:null})}function Le(e){return e!=null&&e.length?e[0]<=2?l.ShapeLineDashEnum.RoundDot:l.ShapeLineDashEnum.Dash:l.ShapeLineDashEnum.Solid}function Re(e){return{stroke:{lineStrokeType:l.ShapeLineTypeEnum.SolidLine,dashType:Le(e==null?void 0:e.dash),color:(e==null?void 0:e.stroke)??c.SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR,width:(e==null?void 0:e.strokeWidth)??be.defaultValue,opacity:(e==null?void 0:e.opacity)??xe.defaultValue/100}}}function ze(n){var r;let a=(0,s.useDependency)(i.ICommandService),l=(0,s.useDependency)(s.IShortcutService),m=(0,s.useDependency)(i.LocaleService),h=(0,s.useDependency)(s.UndoRedoGroupService),[g,_]=(0,f.useState)(null),[v,y]=(0,f.useState)((r=n.popup.extraProps)==null?void 0:r.shapeData),b=n.popup.extraProps,x=(0,s.useDependency)(e.IBoardElementService),{unitId:S,subUnitId:C,scopeId:w}=b??{},T=(0,s.useObservable)(()=>!S||!C||!w?(0,o.of)(void 0):x.elementUpdate$.pipe((0,o.filter)(e=>e.some(e=>e.unitId===S&&e.subUnitId===C&&e.elementId===w)),(0,o.startWith)(null),(0,o.map)(()=>{var e,n;return(e=(0,t.getMindMapContainerMeta)((n=x.getElementById(S,C,w))==null?void 0:n.element))==null?void 0:e.layout})),void 0,!0,[x,S,C,w]);if(!b)return null;let E={unitId:b.unitId,subUnitId:b.subUnitId},D=e=>{a.executeCommand(t.UpdateMindMapNodeOperation.id,{...E,nodeId:b.elementId,...e})},O=(e,t)=>{let n=t??{};y(e=>({...e??{},...n})),D({...n.fill===void 0?null:{fill:n.fill},...n.stroke===void 0?null:{stroke:n.stroke}})},k=e=>{a.executeCommand(t.UpdateMindMapIncomingConnectorOperation.id,{...E,nodeId:b.elementId,style:e})},A=Re(b.incomingConnectorStyle),j=e=>Ae(l,e),M=e=>{Ee(a,e)},N=(v==null?void 0:v.shapeText)??{},P=ke(v),F=e=>{Pe(e,t=>{y(n=>Fe(n,e,t.textStyle)),D(t)})},ee=[{label:m.t(`boards-mind-ui.alignLeft`),value:i.HorizontalAlign.LEFT,icon:/* @__PURE__ */ (0,p.jsx)(d.LeftJustifyingIcon,{})},{label:m.t(`boards-mind-ui.alignCenter`),value:i.HorizontalAlign.CENTER,icon:/* @__PURE__ */ (0,p.jsx)(d.HorizontallyIcon,{})},{label:m.t(`boards-mind-ui.alignRight`),value:i.HorizontalAlign.RIGHT,icon:/* @__PURE__ */ (0,p.jsx)(d.RightJustifyingIcon,{})},{label:m.t(`boards-mind-ui.alignJustify`),value:i.HorizontalAlign.JUSTIFIED,icon:/* @__PURE__ */ (0,p.jsx)(d.AlignTextBothIcon,{})}],te=[{label:m.t(`boards-mind-ui.alignTop`),value:i.VerticalAlign.TOP,icon:/* @__PURE__ */ (0,p.jsx)(d.AlignTopIcon,{})},{label:m.t(`boards-mind-ui.alignMiddle`),value:i.VerticalAlign.MIDDLE,icon:/* @__PURE__ */ (0,p.jsx)(d.VerticalCenterIcon,{})},{label:m.t(`boards-mind-ui.alignBottom`),value:i.VerticalAlign.BOTTOM,icon:/* @__PURE__ */ (0,p.jsx)(d.AlignBottomIcon,{})}],I=()=>{M(`add-sibling-or-child`)},ne=()=>{M(`add-child`)},re=()=>{M(`copy`)},ie=()=>{M(`paste`)},ae=()=>{M(`delete`)},oe=(T==null?void 0:T.structureKind)??t.MIND_MAP_DEFAULT_LAYOUT.structureKind,L=(0,t.resolveMindMapBranchLineTypeForStructure)(oe,T==null?void 0:T.branchLineType),R=e=>{let n=(0,t.resolveMindMapBranchLineTypeForStructure)(e,L);je(a,h.createRunner(b.unitId),{...E,scopeId:b.scopeId,structureKind:e,...n===L?null:{branchLineType:n}}),_(null)},se=e=>{Me(a,h.createRunner(b.unitId),{...E,scopeId:b.scopeId,branchLineType:e}),_(null)},ce=(e,t,n,r=!1)=>{let i=Ne[e.icon];return/* @__PURE__ */ (0,p.jsx)(`button`,{type:`button`,"aria-label":m.t(e.labelKey),disabled:r,className:(0,u.clsx)(`univer-flex univer-h-12 univer-min-w-0 univer-items-center univer-justify-center univer-rounded-lg univer-border-0 univer-bg-transparent univer-p-0 univer-text-gray-900 univer-outline-none univer-transition-colors hover:univer-bg-gray-0 dark:hover:!univer-bg-gray-700`,!t&&!r&&`dark:!univer-text-gray-200`,t&&`univer-bg-primary-50 univer-text-primary-600 hover:univer-bg-primary-50 dark:!univer-bg-primary-900 dark:!univer-text-primary-200 dark:hover:!univer-bg-primary-900`,r&&`univer-cursor-not-allowed univer-text-gray-300 hover:univer-bg-transparent dark:!univer-text-gray-500 dark:hover:!univer-bg-transparent`),onMouseDown:W,onPointerDown:W,onClick:e=>{e.stopPropagation(),r||n()},children:/* @__PURE__ */ (0,p.jsx)(i,{className:`univer-size-7`,"aria-hidden":`true`})},e.value)},le=()=>/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-w-[202px] univer-rounded-xl univer-border univer-border-gray-200 univer-bg-gray-0 univer-px-4 univer-py-4 univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-900`,onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[Ce.map(e=>/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-mb-4`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-mb-2 univer-text-lg univer-text-gray-900 dark:!univer-text-gray-200`,children:e.title}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-grid univer-h-14 univer-overflow-hidden univer-rounded-xl univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800`,style:{gridTemplateColumns:`repeat(${e.items.length}, minmax(0, 1fr))`},children:e.items.map(e=>ce(e,e.value===oe,()=>R(e.value)))})]},e.key)),/* @__PURE__ */ (0,p.jsx)(u.Separator,{}),/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-mb-0`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-mb-2 univer-text-lg univer-text-gray-900 dark:!univer-text-gray-200`,children:we.title}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-grid univer-h-14 univer-overflow-hidden univer-rounded-xl univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800`,style:{gridTemplateColumns:`repeat(${we.items.length}, minmax(0, 1fr))`},children:we.items.map(e=>ce(e,e.value===L,()=>se(e.value),e.value===`curve`&&!(0,t.isMindMapPlainStructureKind)(oe)))})]})]}),z=e=>{switch(e){case`line`:return/* @__PURE__ */ (0,p.jsx)(c.ShapeStrokePanelContent,{title:m.t(`boards-mind-ui.toolbar.panel.line`),shapeData:A,modeOptions:[`solid`,`dash`,`dot`],showDashDropdown:!1,widthRange:{min:be.min,max:be.max,step:1},onUpdateShapeData:(e,t)=>{Ie(t,k)}});case`more`:return/* @__PURE__ */ (0,p.jsx)(s.EditorMenuPanel,{title:m.t(`boards-mind-ui.toolbar.panel.more`),minWidthClassName:`univer-min-w-[240px]`,children:/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-1`,children:[/* @__PURE__ */ (0,p.jsx)(s.EditorMenuItem,{label:m.t(`boards-mind-ui.toolbar.action.addSibling`),shortcut:j(U.addSibling),onClick:I}),/* @__PURE__ */ (0,p.jsx)(s.EditorMenuItem,{label:m.t(`boards-mind-ui.toolbar.action.addChild`),shortcut:j(U.addChild),onClick:ne}),/* @__PURE__ */ (0,p.jsx)(u.Separator,{}),/* @__PURE__ */ (0,p.jsx)(s.EditorMenuItem,{label:m.t(`boards-mind-ui.toolbar.action.copy`),shortcut:j(U.copy),onClick:re}),/* @__PURE__ */ (0,p.jsx)(s.EditorMenuItem,{label:m.t(`boards-mind-ui.toolbar.action.paste`),shortcut:j(U.paste),onClick:ie}),/* @__PURE__ */ (0,p.jsx)(s.EditorMenuItem,{label:m.t(`boards-mind-ui.toolbar.action.delete`),shortcut:j(U.delete),onClick:ae})]})});default:return null}},B=Se.flatMap(e=>{let t=[];if(e.dividerBefore&&t.push(/* @__PURE__ */ (0,p.jsx)(u.Separator,{orientation:`vertical`},`divider-${e.kind}`)),e.kind===`typography`)return t.push(/* @__PURE__ */ (0,p.jsx)(c.TypographyPanelButton,{title:m.t(`boards-mind-ui.toolbar.panel.typography`),fontFamily:P.fontFamily,textStyle:{isBold:N.bold===!0,isItalic:N.italic===!0,isUnderline:N.underline===!0,isStrike:N.strikethrough===!0},horizontalAlign:P.horizontalAlign,verticalAlign:P.verticalAlign,horizontalAlignOptions:ee,verticalAlignOptions:te,onUpdateText:F},e.kind)),t;if(e.kind===`fontColor`){let n={fs:P.fontSize,cl:{rgb:P.color},...P.textFill===void 0?null:{textFill:P.textFill}};return t.push(/* @__PURE__ */ (0,p.jsx)(c.TextFillButton,{title:m.t(`boards-mind-ui.toolbar.action.fontColor`),textStyle:n,fallbackColor:P.color,onChange:e=>F({textStyle:e})},e.kind)),t.push(/* @__PURE__ */ (0,p.jsx)(c.ShapeFloatingToolbarFontSizeSelect,{value:String(P.fontSize),onChange:e=>{F({textStyle:{fs:e}})}},`mind-map-font-size`)),t}return t.push(/* @__PURE__ */ (0,p.jsx)(u.Dropdown,{open:g===e.panel,overlay:z(e.panel),onOpenChange:t=>_(t?e.panel:null),children:/* @__PURE__ */ (0,p.jsx)(`span`,{children:/* @__PURE__ */ (0,p.jsx)(s.EditorDropdownTrigger,{title:m.t(e.titleKey),active:g===e.panel,icon:Oe(De[e.panel]),className:`[&>svg:last-child_*]:[vector-effect:non-scaling-stroke]`,sizeClassName:`univer-h-7 univer-min-w-9 univer-w-auto univer-gap-1 univer-px-1.5`,onMouseDown:W,onPointerDown:W})})},e.panel)),t}),ue=[...b.isRootNode?[/* @__PURE__ */ (0,p.jsx)(u.Dropdown,{open:g===`layout`,overlay:le(),onOpenChange:e=>_(e?`layout`:null),children:/* @__PURE__ */ (0,p.jsx)(`span`,{children:/* @__PURE__ */ (0,p.jsx)(s.EditorDropdownTrigger,{title:m.t(`boards-mind-ui.toolbar.action.layout`),active:g===`layout`,icon:Oe(Ne[oe]),className:`[&>svg:last-child_*]:[vector-effect:non-scaling-stroke]`,sizeClassName:`univer-h-7 univer-min-w-9 univer-w-auto univer-gap-1 univer-px-1.5`,onMouseDown:W,onPointerDown:W})})},`mind-map-layout-dropdown`),/* @__PURE__ */ (0,p.jsx)(u.Separator,{orientation:`vertical`},`layout-panel-divider`)]:[],/* @__PURE__ */ (0,p.jsx)(c.ShapeFillButton,{title:m.t(`boards-mind-ui.toolbar.action.fill`),shapeData:v??{},onUpdateShapeData:O},`mind-map-fill`),/* @__PURE__ */ (0,p.jsx)(c.ShapeStrokePanelButton,{title:m.t(`boards-mind-ui.toolbar.action.stroke`),shapeData:v??{},onUpdateShapeData:O},`mind-map-stroke`),/* @__PURE__ */ (0,p.jsx)(u.Separator,{orientation:`vertical`},`style-divider`)];return/* @__PURE__ */ (0,p.jsxs)(s.EditorFloatingToolbar,{maxWidthClassName:`univer-max-w-[min(760px,calc(100vw-32px))]`,onMouseDown:e=>e.stopPropagation(),children:[ue,B]})}function Be(e){let{left:t,top:n,width:r,height:i}=e;return{left:t,right:t+r,top:n-56,bottom:n+i}}let Ve=class extends i.RxDisposable{constructor(e,t,n,r,i,a){super(),this._renderContext=e,this._boardCanvasPopManagerService=t,this._boardElementService=n,this._elementStateService=r,this._boardTextEditingService=i,this._interactionSurfaceService=a,x(this,`_popupDisposable`,null),x(this,`_popupSelectionKey`,null),this._init()}dispose(){this._clearPopup(),super.dispose()}_init(){let e=this._renderContext.scene.getTransformerByCreate();this.disposeWithMe((0,i.toDisposable)(e.createControl$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>this._showPopupForSelection()))),this.disposeWithMe((0,i.toDisposable)(e.clearControl$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>this._clearPopupIfSelectionChanged()))),this.disposeWithMe((0,i.toDisposable)(e.changeStart$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>this._clearPopup()))),this.disposeWithMe((0,i.toDisposable)(e.changeEnd$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>setTimeout(()=>this._showPopupForSelection(),0)))),this.disposeWithMe((0,i.toDisposable)(this._elementStateService.state$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>setTimeout(()=>this._showPopupForSelection(),0)))),this.disposeWithMe((0,i.toDisposable)(this._interactionSurfaceService.interactionSurfaceActive$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{e?this._clearPopup():setTimeout(()=>this._showPopupForSelection(),0)}))),this.disposeWithMe((0,i.toDisposable)(this._boardTextEditingService.editingParams$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{(e==null?void 0:e.unitId)===this._renderContext.unitId&&(e.visible?this._clearPopup():setTimeout(()=>this._showPopupForSelection(),0))})))}_clearPopup(){var e;(e=this._popupDisposable)==null||e.dispose(),this._popupDisposable=null,this._popupSelectionKey=null}_clearPopupIfSelectionChanged(){setTimeout(()=>{this._isPopupSelectionStillActive()||this._clearPopup()},0)}_isPopupSelectionStillActive(){let e=this._elementStateService.getSnapshot();return!!e.context&&e.selectedIds.length>0&&this._popupSelectionKey===this._buildPopupSelectionKey(e.context.unitId,e.context.subUnitId,e.selectedIds)}_buildPopupSelectionKey(e,t,n){return`${e}:${t}:${n.join(`,`)}`}_resolveIncomingConnectorStyle(e,n,r,i){let a=this._boardElementService.getElementData(e,n),o=Object.values(a).find(e=>{let n=(0,t.getMindMapConnectorMeta)(e.element);return(n==null?void 0:n.structureScopeId)===r&&n.childNodeId===i});if(o&&`connectorData`in o.element)return o.element.connectorData.style}_showPopupForSelection(){var r,i,a;if(this._interactionSurfaceService.isInteractionSurfaceActive){this._clearPopup();return}let o=this._boardTextEditingService.getEditing();if((o==null?void 0:o.visible)===!0&&o.unitId===this._renderContext.unitId){this._clearPopup();return}let s=this._elementStateService.getSnapshot();if(s.isTransforming||(0,n.resolveBoardFloatingToolbarSelection)({context:s.context,selectedIds:s.selectedIds,getElementById:(e,t,n)=>this._boardElementService.getElementById(e,t,n)}).owner!==`mind-map`){this._clearPopup();return}let c=this._renderContext.scene.getTransformerByCreate().getSelectedObjectMap(),l=Array.from(c.values()).map(e=>this._resolveSelectedEntry(e)).filter(e=>!!e).filter(e=>!!(0,t.getMindMapNodeMeta)(e.elementData.element)),u=l.find(e=>e.elementData.elementId===s.focusedId)??l[0]??this._resolveSelectedMindMapEntryFromState();if(!u){this._clearPopup();return}let d=(0,t.getMindMapNodeMeta)(u.elementData.element);if(!d){this._clearPopup();return}let f=(r=this._boardElementService.getElementData(u.elementData.unitId,u.elementData.subUnitId)[d.structureScopeId])==null?void 0:r.element,p=(0,t.getMindMapContainerMeta)(f),m=f==null||(i=f.custom)==null||(i=i.mindmap)==null||(i=i.layout)==null?void 0:i.structureKind,h=((p==null?void 0:p.layout.structureKind)??m)===`mindmap-vertical`&&(d.parentNodeId===null||d.side===`top`),g=d.parentNodeId!==null&&d.side!==`top`&&d.side!==`bottom`,_=h||g,v=((a=s.context)==null?void 0:a.unitId)===u.elementData.unitId&&s.context.subUnitId===u.elementData.subUnitId&&s.selectedIds.length?s.selectedIds:[u.elementData.elementId],y=this._buildPopupSelectionKey(u.elementData.unitId,u.elementData.subUnitId,v);this._popupDisposable&&this._popupSelectionKey===y||(this._clearPopup(),this._popupDisposable=this.disposeWithMe(this._boardCanvasPopManagerService.attachPopupToObject(u.elementData.unitId,u.elementData.subUnitId,u.object,{componentKey:Te,direction:`top-center`,offset:[0,8],..._?{anchorBoundResolver:Be}:null,extraProps:{unitId:u.elementData.unitId,subUnitId:u.elementData.subUnitId,elementId:u.elementData.elementId,scopeId:d.structureScopeId,isRootNode:d.parentNodeId===null,left:u.elementData.element.transform.left??0,top:u.elementData.element.transform.top??0,shapeData:u.elementData.element.type===e.BoardElementType.Shape?u.elementData.element.shapeData:void 0,incomingConnectorStyle:this._resolveIncomingConnectorStyle(u.elementData.unitId,u.elementData.subUnitId,d.structureScopeId,u.elementData.elementId)}})),this._popupSelectionKey=y)}_resolveSelectedMindMapEntryFromState(){var e;let r=this._elementStateService.getSnapshot(),i=r.context,a=r.focusedId??r.selectedIds[0];if(!i||!a)return null;let o=this._boardElementService.getElementById(i.unitId,i.subUnitId,a);if(!o||!(0,t.getMindMapNodeMeta)(o.element))return null;let s=(0,n.getBoardElementRenderObjectKey)(i.unitId,a),c=this._renderContext.scene,l=((e=c.getObjectIncludeInGroup)==null?void 0:e.call(c,s))??this._renderContext.scene.getObject(s);return l?{object:l,elementData:o}:null}_resolveSelectedEntry(e){var t;if(!e)return null;let r=(0,n.parseBoardElementRenderObjectKey)(e.oKey);if(!r)return null;let i=this._elementStateService.getSnapshot(),a=((t=i.context)==null?void 0:t.unitId)===r.unitId?i.context.subUnitId:void 0;if(!a)return null;let o=this._boardElementService.getElementById(r.unitId,a,r.elementId);return o?{object:e,elementData:o}:null}};Ve=C([S(1,(0,i.Inject)(n.BoardCanvasPopManagerService)),S(2,(0,i.Inject)(e.IBoardElementService)),S(3,(0,i.Inject)(n.IBoardElementStateService)),S(4,(0,i.Inject)(n.BoardTextEditingService)),S(5,(0,i.Inject)(n.BoardInteractionSurfaceService))],Ve);const He=`board-mind-map-pending-insert-object`,Ue=n.BOARD_RENDER_LAYER_INDEX.preview;var We=class extends a.BaseObject{constructor(e=He,t){super(e),x(this,`_state`,{point:null,children:[]}),x(this,`_preview`,null),this.evented=!1,this.zIndex=n.BOARD_RENDER_OBJECT_Z_INDEX.transientPreview,this.updateState(t)}updateState(e){let n=this._state;if(this._state={...n,...e},!this._preview||n.structureKind!==this._state.structureKind||n.rootText!==this._state.rootText||n.branchLineType!==this._state.branchLineType||!i.Tools.diffValue(n.children,this._state.children)||!i.Tools.diffValue(n.blueprint,this._state.blueprint)){let e={left:0,top:0,structureKind:this._state.structureKind,branchLineType:this._state.branchLineType},n=this._state.blueprint;n&&this._state.rootText&&(n={...n,root:{...n.root,text:this._state.rootText}}),this._preview=n?(0,t.createMindMapElementsFromBlueprint)({...e,blueprint:n}):(0,t.createMindMapElements)({...e,rootText:this._state.rootText,children:this._state.children})}this._state.point?this.show():this.hide(),this.makeDirty(!0)}isHit(e){return!1}getRootTopLeft(e){var n,r;return{left:Math.round(e.x-(((n=this._preview)==null?void 0:n.rootNode.transform.width)??t.MIND_MAP_DEFAULT_NODE_SIZE.rootWidth)/2),top:Math.round(e.y-(((r=this._preview)==null?void 0:r.rootNode.transform.height)??t.MIND_MAP_DEFAULT_NODE_SIZE.rootHeight)/2)}}render(e,n){var r;let i=this._state.point,a=this._preview;if(!i||!a||!this.visible)return this.makeDirty(!1),this;let o=Number.isFinite(this._state.zoomRatio)&&(this._state.zoomRatio??0)>0?this._state.zoomRatio:1,s=a.rootNode.transform.width??t.MIND_MAP_DEFAULT_NODE_SIZE.rootWidth,c=a.rootNode.transform.height??t.MIND_MAP_DEFAULT_NODE_SIZE.rootHeight,l=this.getRootTopLeft(i),u=l.left-(a.rootNode.transform.left??0),d=l.top-(a.rootNode.transform.top??0),f=u-(a.container.transform.left??0),p=d-(a.container.transform.top??0);e.save(),e.globalAlpha=D.objectAlpha,e.lineWidth=D.lineWidthScreen/o,e.strokeStyle=D.primaryColor,e.beginPath();for(let t of((r=a.container.containerData.shapeData.customGeometry)==null?void 0:r.pathLst)??[])for(let n of t.dataArray??[]){let t=Number(n.points[0])+u,r=Number(n.points[1])+d;n.command===`M`?e.moveTo(t,r):n.command===`L`&&e.lineTo(t,r)}for(let t of a.connectors){var m;if(t.visible===!1)continue;let n=t.connectorData,r=n.start.kind===`free`?n.start:n.start.fallbackPoint,i=n.end.kind===`free`?n.end:n.end.fallbackPoint;if(!r||!i)continue;e.moveTo(r.x+f,r.y+p);let a=(m=n.curveData)==null?void 0:m.controls;if(n.routing===`curve`&&a&&a.length>=2)e.bezierCurveTo(a[0].x+f,a[0].y+p,a[1].x+f,a[1].y+p,i.x+f,i.y+p);else{var h;for(let t of((h=n.orthogonalData)==null?void 0:h.routePoints)??[])e.lineTo(t.x+f,t.y+p);e.lineTo(i.x+f,i.y+p)}}e.stroke();for(let n of a.nodes)n.id!==a.rootNode.id&&n.visible!==!1&&(O(e,u+(n.transform.left??0),d+(n.transform.top??0),n.transform.width??t.MIND_MAP_DEFAULT_NODE_SIZE.nodeWidth,n.transform.height??t.MIND_MAP_DEFAULT_NODE_SIZE.nodeHeight,D.ghostRadius),e.fillStyle=D.ghostFillColor,e.fill(),e.stroke());O(e,l.left,l.top,s,c,D.rootRadius),e.fillStyle=D.primaryColor,e.fill(),e.stroke(),e.fillStyle=D.rootTextColor,e.font=k(D.rootFontWeight,D.rootFontSize,o),e.textAlign=`center`,e.textBaseline=`middle`;let g=D.textPaddingScreen/o;return e.fillText(t.MIND_MAP_DEFAULT_NODE_TEXT,l.left+s/2,l.top+c/2,Math.max(1,s-g*2)),e.restore(),this.makeDirty(!1),this}};const Ge={children:[{text:t.MIND_MAP_DEFAULT_NODE_TEXT,orderKey:(0,t.getMindMapDefaultChildOrderKey)(0),side:`right`},{text:t.MIND_MAP_DEFAULT_NODE_TEXT,orderKey:(0,t.getMindMapDefaultChildOrderKey)(1),side:`right`},{text:t.MIND_MAP_DEFAULT_NODE_TEXT,orderKey:(0,t.getMindMapDefaultChildOrderKey)(2),side:`right`}]};var G=class extends i.Disposable{constructor(...e){super(...e),x(this,`_template`,Ge)}setTemplate(e){var t;let n=(e==null?void 0:e.children)??(e==null||(t=e.blueprint)==null?void 0:t.root.children);this._template={rootText:e==null?void 0:e.rootText,structureKind:e==null?void 0:e.structureKind,branchLineType:e==null?void 0:e.branchLineType,children:this._normalizeChildren(n,e==null?void 0:e.structureKind),blueprint:e!=null&&e.blueprint?this._cloneBlueprint(e.blueprint):void 0}}getTemplate(){var e;return{rootText:this._template.rootText,structureKind:this._template.structureKind,branchLineType:this._template.branchLineType,children:(e=this._template.children)==null?void 0:e.map(e=>({...e})),blueprint:this._template.blueprint?this._cloneBlueprint(this._template.blueprint):void 0}}_cloneBlueprint(e){return{title:e.title,root:this._cloneBlueprintNode(e.root)}}_cloneBlueprintNode(e){return{...e,foreignAttributes:e.foreignAttributes?{...e.foreignAttributes}:void 0,children:e.children.map(e=>this._cloneBlueprintNode(e))}}_normalizeChildren(e,n){let r=!e,i=e??Ge.children;return i==null?void 0:i.map((e,i)=>({...e,text:e.text??t.MIND_MAP_DEFAULT_NODE_TEXT,side:this._resolveChildSide(e.side,i,n,r)}))}_resolveChildSide(e,t,n,r){return n===`mindmap-vertical`?r?`bottom`:e??`bottom`:n===`tree-left`?r?`left`:e??`left`:n===`tree-right`?r?`right`:e??`right`:n===`tree-alternate`?r?t%2==0?`left`:`right`:e??(t%2==0?`left`:`right`):n===`timeline-horizontal`?r?t%2==0?`top`:`bottom`:e??(t%2==0?`top`:`bottom`):n===`timeline-vertical`?r?t%2==0?`left`:`right`:e??(t%2==0?`left`:`right`):e}};function Ke(e,t){let n=Number.isFinite(t.zoomRatio)&&t.zoomRatio>0?t.zoomRatio:1;return{x:Math.round((e.offsetX-t.panOffset.x)/n),y:Math.round((e.offsetY-t.panOffset.y)/n)}}function qe(e){var t;e!=null&&e.dispose?e.dispose():e==null||(t=e.unsubscribe)==null||t.call(e)}function Je(t){var n;return t.activeTool===e.BoardToolType.MindMap&&((n=t.pendingInsert)==null?void 0:n.type)===e.BoardToolType.MindMap}let K=class extends i.RxDisposable{constructor(e,t,n,r,i,a,o){super(),this._renderContext=e,this._instanceSrv=t,this._stateService=n,this._commandService=r,this._insertStateService=i,this._elementStateService=a,this._boardTextEditingService=o,x(this,`_previewObject`,null),x(this,`_lastPoint`,null),this._init()}_init(){var e;let{scene:t,unitId:n}=this._renderContext,r=this._instanceSrv.getUnit(n,i.UniverInstanceType.UNIVER_BOARD);if(!r)return;let a=(e=t.onPointerMove$)==null?void 0:e.subscribeEvent({priority:4,next:([e,t])=>this._handlePointerMove(e,t)}),o=t.onPointerDown$.subscribeEvent({priority:4,next:([e,t])=>this._handlePointerDown(r,e,t)});this.disposeWithMe((0,i.toDisposable)(()=>qe(a))),this.disposeWithMe((0,i.toDisposable)(()=>qe(o)));let s=this._stateService.state$.subscribe(()=>this._syncPreviewObject());this.disposeWithMe((0,i.toDisposable)(()=>qe(s))),this.disposeWithMe((0,i.toDisposable)(()=>{this._removePreviewObject()})),this._syncPreviewObject()}_syncPreviewObject(){var e,t;let n=this._stateService.getState();if(!Je(n)){this._removePreviewObject();return}let r=this._ensurePreviewObject(),i=this._insertStateService.getTemplate();r.updateState({point:this._lastPoint,structureKind:i.structureKind,rootText:i.rootText,branchLineType:i.branchLineType,children:i.children,blueprint:i.blueprint,zoomRatio:n.zoomRatio}),(e=(t=this._renderContext.scene).makeDirty)==null||e.call(t,!0)}_ensurePreviewObject(){var e,t;if(this._previewObject)return this._previewObject;let n=this._insertStateService.getTemplate(),r=new We(He,{point:this._lastPoint,structureKind:n.structureKind,rootText:n.rootText,branchLineType:n.branchLineType,children:n.children,blueprint:n.blueprint,zoomRatio:this._stateService.getState().zoomRatio});return this._previewObject=r,(e=(t=this._renderContext.scene).addObject)==null||e.call(t,r,Ue),r}_removePreviewObject(){var e,t,n,r;this._previewObject?((e=(t=this._renderContext.scene).removeObjects)==null||e.call(t,[this._previewObject]),this._previewObject=null,this._lastPoint=null,(n=(r=this._renderContext.scene).makeDirty)==null||n.call(r,!0)):this._lastPoint=null}_getPointFromEvent(e){let t=this._stateService.getState();return Ke(e,{panOffset:t.viewportPanOffset,zoomRatio:t.zoomRatio})}_handlePointerMove(e,t){Je(this._stateService.getState())&&(this._lastPoint=this._getPointFromEvent(e),this._syncPreviewObject(),t.stopPropagation())}async _handlePointerDown(e,t,r){let i=await this._insertMindMap(e,t,r);if(!i)return;let a={unitId:this._renderContext.unitId,subUnitId:i.subUnitId};this._boardTextEditingService.ignoreExternalFocusChanges(),this._boardTextEditingService.setEditing({...a,shapeId:i.rootNodeId,shapeKey:(0,n.getBoardElementRenderObjectKey)(a.unitId,i.rootNodeId),visible:!0})}async _insertMindMap(n,r,a){var o;let s=this._stateService.getState(),c=r.button??0;if(!Je(s)||c!==0)return null;let l=this._getPointFromEvent(r);this._lastPoint=l,this._syncPreviewObject();let u=this._ensurePreviewObject().getRootTopLeft(l),d=this._insertStateService.getTemplate(),f=(0,i.generateRandomId)(6),p=n.getActivePageId(),m=this._commandService.executeCommand(t.InsertBoardMindMapOperation.id,{unitId:this._renderContext.unitId,subUnitId:p,left:u.left,top:u.top,rootNodeId:f,rootText:d.rootText,structureKind:d.structureKind,branchLineType:d.branchLineType,children:d.children,blueprint:d.blueprint});if(this._stateService.setActiveTool(e.BoardToolType.Select),a.stopPropagation(),(o=r.preventDefault)==null||o.call(r),!await m||this._disposed)return null;let h={unitId:this._renderContext.unitId,subUnitId:p};return this._elementStateService.selectElements(h,[f],f),{rootNodeId:f,subUnitId:p}}};K=C([S(1,i.IUniverInstanceService),S(2,n.IBoardUIStateService),S(3,i.ICommandService),S(4,(0,i.Inject)(G)),S(5,n.IBoardElementStateService),S(6,(0,i.Inject)(n.BoardTextEditingService))],K);var Ye=class extends i.Disposable{constructor(...e){super(...e),x(this,`_refresh$`,new o.Subject),x(this,`refresh$`,this._refresh$.asObservable())}notify(e){this._refresh$.next(e)}dispose(){this._refresh$.complete(),super.dispose()}};function Xe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0}function Ze(e,n,r){let i=e[n],a=(0,t.getMindMapNodeMeta)(i==null?void 0:i.element);if(!i||!a)return null;let o=(0,t.resolveMindMapNodeHostSize)(i,r);if(!o)return null;let s=i.transform??i.element.transform,c={...e,[n]:{...i,transform:{...s,width:o.width,height:o.height},element:{...i.element,transform:{...i.element.transform,width:o.width,height:o.height}}}};return(0,t.resolveMindMapLayoutPreview)(c,a.structureScopeId)}let Qe=class extends i.RxDisposable{constructor(e,n,r,a,o,s){super(),this._renderContext=e,this._intrinsicSizeService=n,this._boardElementService=r,this._textEditingService=a,this._previewRefreshService=o,this._commandService=s,x(this,`_activePreview`,null),x(this,`_provider`,{match:e=>e.unitId===this._renderContext.unitId&&!!(0,t.getMindMapNodeMeta)(e.element),resolveHostSize:e=>this._resolveHostSize(e),previewHostSize:e=>this._previewHostSize(e),updateHostSize:e=>this._updateHostSize(e),updateShapeText:e=>this._updateShapeText(e)}),this.disposeWithMe(this._intrinsicSizeService.registerProvider(this._provider)),this._initEditingRestore(),this.disposeWithMe((0,i.toDisposable)(()=>this._restoreActivePreview()))}_updateHostSize(e){return this._previewHostSize(e)}_updateShapeText(e){let r=e.params.hostSize?this._resolveHostSize({elementData:e.elementData,params:e.params.hostSize}):null,i=e.elementData.transform??e.elementData.element.transform;return(!r||r.width===i.width&&r.height===i.height)&&(0,n.areBoardShapeTextValuesEquivalent)(e.params.shapeText,e.params.oldShapeText)?!0:this._commandService.syncExecuteCommand(t.UpdateMindMapNodeOperation.id,{unitId:e.params.unitId,subUnitId:e.params.subUnitId,nodeId:e.params.shapeId,shapeText:e.params.shapeText,...r?{hostSize:{width:r.width,height:r.height}}:null})}_previewHostSize(e){let t=this._resolveHostSize(e);if(!t)return!1;let n=e.elementData.transform??e.elementData.element.transform;return!this._activePreview&&n.width===t.width&&n.height===t.height||this._syncLayoutPreview(e,t),!0}_resolveHostSize(e){return!Xe(e.params.width)||!Xe(e.params.height)?null:(0,t.resolveMindMapNodeHostSize)(e.elementData,{width:e.params.width,height:e.params.height})}_initEditingRestore(){this.disposeWithMe((0,i.toDisposable)(this._textEditingService.editingParams$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{e||this._restoreActivePreview()})))}_syncLayoutPreview(e,n){var r;let i=this._boardElementService.getElementData(e.params.unitId,e.params.subUnitId),a=Ze(i,e.params.shapeId,n),o=(0,t.getMindMapNodeMeta)((r=i[e.params.shapeId])==null?void 0:r.element);a&&o&&(this._activePreview={unitId:e.params.unitId,subUnitId:e.params.subUnitId,scopeId:o.structureScopeId},this._syncElementDataToScene(a,o.structureScopeId)&&this._previewRefreshService.notify({unitId:e.params.unitId,subUnitId:e.params.subUnitId,nodeId:e.params.shapeId,scopeId:o.structureScopeId}))}_restoreActivePreview(){let e=this._activePreview;if(!e)return;this._activePreview=null;let t=this._boardElementService.getElementData(e.unitId,e.subUnitId);this._syncElementDataToScene(t,e.scopeId)&&this._previewRefreshService.notify({unitId:e.unitId,subUnitId:e.subUnitId,nodeId:e.scopeId,scopeId:e.scopeId})}_syncElementDataToScene(e,r){let i=!1;if(Object.values(e).forEach(a=>{var o;let s=(0,t.getMindMapNodeMeta)(a.element),c=(o=a.element.custom)==null?void 0:o.structured;if(a.elementId!==r&&(s==null?void 0:s.structureScopeId)!==r&&(c==null?void 0:c.structureScopeId)!==r)return;let l=this._getSceneObject(a.elementId);l&&(i=(0,n.syncBoardElementRenderObject)(l,a,{elementData:e,unitId:this._renderContext.unitId})||i)}),i){var a,o;this._renderContext.scene.makeDirty(!0),(a=(o=this._renderContext.scene).requestRender)==null||a.call(o)}return i}_getSceneObject(e){var t;let r=(0,n.getBoardElementRenderObjectKey)(this._renderContext.unitId,e),i=this._renderContext.scene;return((t=i.getObjectIncludeInGroup)==null?void 0:t.call(i,r))??this._renderContext.scene.getObject(r)??null}};Qe=C([S(1,(0,i.Inject)(n.BoardShapeIntrinsicSizeService)),S(2,(0,i.Inject)(e.IBoardElementService)),S(3,(0,i.Inject)(n.BoardTextEditingService)),S(4,(0,i.Inject)(Ye)),S(5,i.ICommandService)],Qe);const q={touchHitRadius:22,radius:18,addChildRadius:14,siblingHoverRadius:10,siblingDotRadius:5,siblingDotGap:3,gap:10,collapsePlusMinDistance:44,primaryColor:T.primaryColor,surfaceColor:T.surfaceColor,borderWidth:2,glyphSize:8,addChildGlyphSize:6,siblingGlyphSize:5.5,glyphWidth:2.4,glyphHoverWidth:3,badgeFontWeight:600,badgeFontSize:18,fontFamily:T.fontFamily};function $e(e){let t=q.radius,n=q.addChildRadius,r=q.siblingHoverRadius,i=q.gap,a=q.siblingDotRadius,o=a+q.siblingDotGap,s=q.collapsePlusMinDistance,c=e.bounds.top+e.bounds.height/2,l=e.bounds.left+e.bounds.width/2,u=e.bounds.left-t-i,d=e.bounds.left+e.bounds.width+t+i,f=e.bounds.top-t-i,p=e.bounds.top+e.bounds.height+t+i,m=e.bounds.left-n-i,h=e.bounds.left+e.bounds.width+n+i,g=e.bounds.top-n-i,_=e.bounds.top+e.bounds.height+n+i,v=[],y=e.side===`top`||e.side===`bottom`,b=y?l:e.side===`left`?u:d,x=y?e.side===`top`?f:p:c;if(e.hasChildren&&e.collapsedDescendantCount>0)return v.push({kind:`toggle-collapse`,x:b,y:x,radius:t,badgeCount:e.collapsedDescendantCount}),v;if(e.isRoot?(e.rootChildSides??(y?[`top`,`bottom`]:[`left`,`right`])).forEach(e=>{e===`top`?v.push({kind:`add-child-top`,x:l,y:g,radius:n}):e===`bottom`?v.push({kind:`add-child-bottom`,x:l,y:_,radius:n}):e===`left`?v.push({kind:`add-child-left`,x:m,y:c,radius:n}):v.push({kind:`add-child-right`,x:h,y:c,radius:n})}):(v.push({kind:e.side===`left`?`add-child-left`:e.side===`top`?`add-child-top`:e.side===`bottom`?`add-child-bottom`:`add-child-right`,x:y?l:e.side===`left`?m:h,y:y?e.side===`top`?g:_:c,radius:n}),y?(v.push({kind:`add-sibling-before`,placement:`before`,x:e.bounds.left-o,y:c,radius:r,visualRadius:a}),v.push({kind:`add-sibling-after`,placement:`after`,x:e.bounds.left+e.bounds.width+o,y:c,radius:r,visualRadius:a})):(v.push({kind:`add-sibling-before`,placement:`before`,x:l,y:e.bounds.top-o,radius:r,visualRadius:a}),v.push({kind:`add-sibling-after`,placement:`after`,x:l,y:e.bounds.top+e.bounds.height+o,radius:r,visualRadius:a}))),e.hasChildren){let n={kind:`toggle-collapse`,x:b,y:x,radius:t};v.push(n);let r=v.find(t=>t.kind===(e.side===`left`?`add-child-left`:e.side===`top`?`add-child-top`:e.side===`bottom`?`add-child-bottom`:`add-child-right`));r&&Math.hypot(r.x-n.x,r.y-n.y)<s&&(e.side===`top`||e.side===`bottom`?r.y=n.y+(e.side===`top`?-s:s):r.x=n.x+(e.side===`left`?-s:s))}return v}const et=`board-mind-map-node-controls-object`,tt=n.BOARD_RENDER_LAYER_INDEX.connectorAffordance;function nt(e,t){return!!e&&e.kind===t.kind&&e.x===t.x&&e.y===t.y}var rt=class extends a.Control{constructor(e=et,t){super(e),x(this,`_state`,{controls:[]}),this.evented=!0,this.zIndex=n.BOARD_RENDER_OBJECT_Z_INDEX.transientControl,this.updateState(t)}updateState(e){this._state={...this._state,...e},this._state.controls.length>0?this.show():this.hide(),this.makeDirty(!0)}setHoveredControl(e){!e&&!this._state.hoveredControl||e&&nt(this._state.hoveredControl,e)||(this._state={...this._state,hoveredControl:e},this.makeDirty(!0))}getHitControl(e,t){var n;let r=(n=this.getScene())==null?void 0:n.getAncestorScale(),i=null,o=1/0;for(let n=this._state.controls.length-1;n>=0;--n){let s=this._state.controls[n],c=Math.hypot(e.x-s.x,e.y-s.y);if(t!==a.DeviceType.Touch){if(c<=s.radius)return s;continue}let l=Math.hypot((e.x-s.x)*((r==null?void 0:r.scaleX)??1),(e.y-s.y)*((r==null?void 0:r.scaleY)??1));(c<=s.radius||l<=q.touchHitRadius)&&l<o&&(i=s,o=l)}return i}getTouchHitDistance(e){var t;let n=this.getHitControl(e,a.DeviceType.Touch),r=(t=this.getScene())==null?void 0:t.getAncestorScale();return n?Math.hypot((e.x-n.x)*((r==null?void 0:r.scaleX)??1),(e.y-n.y)*((r==null?void 0:r.scaleY)??1)):1/0}isHit(e){return!!this.getHitControl({x:e.x,y:e.y})}render(e,t){return!this.visible||this._state.controls.length===0?(this.makeDirty(!1),this):(e.save(),this._state.controls.forEach(t=>{let n=nt(this._state.hoveredControl,t),r=t.badgeCount!==void 0,i=t.kind===`add-child-left`||t.kind===`add-child-right`||t.kind===`add-child-top`||t.kind===`add-child-bottom`,a=t.kind===`add-sibling-before`||t.kind===`add-sibling-after`,o=a&&!n?t.visualRadius??t.radius:t.radius;if(e.beginPath(),e.fillStyle=t.kind===`toggle-collapse`?q.surfaceColor:q.primaryColor,e.strokeStyle=q.primaryColor,e.lineWidth=q.borderWidth,e.arc(t.x,t.y,o,0,Math.PI*2),e.fill(),(!a||n)&&e.stroke(),!r&&(!a||n)){if(e.beginPath(),e.strokeStyle=t.kind===`toggle-collapse`?q.primaryColor:q.surfaceColor,e.lineWidth=a?q.glyphWidth:n?q.glyphHoverWidth:q.glyphWidth,e.lineCap=`round`,t.kind===`toggle-collapse`){let n=q.glyphSize;e.moveTo(t.x+n/2,t.y-n),e.lineTo(t.x-n/2,t.y),e.lineTo(t.x+n/2,t.y+n)}else{let n=a?q.siblingGlyphSize:i?q.addChildGlyphSize:q.glyphSize;e.moveTo(t.x-n,t.y),e.lineTo(t.x+n,t.y),e.moveTo(t.x,t.y-n),e.lineTo(t.x,t.y+n)}e.stroke()}r&&(e.fillStyle=q.primaryColor,e.font=`${q.badgeFontWeight} ${q.badgeFontSize}px ${q.fontFamily}`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(String(t.badgeCount),t.x,t.y))}),e.restore(),this.makeDirty(!1),this)}};function it(e){return e===`tree-left`||e===`tree-right`||e===`tree-alternate`}function at(e){return e===`timeline-horizontal`||e===`timeline-vertical`}function ot(e,t){let n=Number.isFinite(t.zoomRatio)&&t.zoomRatio>0?t.zoomRatio:1;return{x:Math.round((e.offsetX-t.panOffset.x)/n),y:Math.round((e.offsetY-t.panOffset.y)/n)}}let st=class extends i.RxDisposable{constructor(e,t,n,r,i,a,o,s,c){super(),this._renderContext=e,this._boardElementService=t,this._elementStateService=n,this._stateService=r,this._commandService=i,this._boardTextEditingService=a,this._localeService=o,this._previewRefreshService=s,this._undoRedoGroupService=c,x(this,`_object`,null),x(this,`_objectEventDisposables`,null),x(this,`_activeNodeId`,null),x(this,`_activeScopeId`,null),this._init()}_init(){var e,t,n;let{scene:r}=this._renderContext,a=(e=r.getTransformerByCreate)==null?void 0:e.call(r);a&&(this.disposeWithMe((0,i.toDisposable)(a.changing$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(({objects:e})=>{this._syncControls(e,{hideRootControls:!0})}))),this.disposeWithMe((0,i.toDisposable)(a.changeEnd$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{let t=e==null?void 0:e.objects;this._syncControls(t),setTimeout(()=>this._syncControls(t),0)})))),this.disposeWithMe((0,i.toDisposable)(this._elementStateService.state$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>this._syncControls()))),this.disposeWithMe((0,i.toDisposable)(this._stateService.state$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>this._syncControls()))),this.disposeWithMe((0,i.toDisposable)(this._boardElementService.elementUpdate$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{let t=this._elementStateService.getSnapshot().context;t&&e.some(e=>e.unitId===t.unitId&&e.subUnitId===t.subUnitId&&(e.elementId===this._activeNodeId||e.elementId===this._activeScopeId))&&this._syncControls()}))),this.disposeWithMe((0,i.toDisposable)(this._previewRefreshService.refresh$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{let t=this._elementStateService.getSnapshot().context;t&&t.unitId===e.unitId&&t.subUnitId===e.subUnitId&&(this._activeScopeId&&this._activeScopeId!==e.scopeId||this._syncControls())}))),this.disposeWithMe((0,i.toDisposable)(r.onPointerMove$.subscribeEvent(e=>this._handlePointerMove(e)))),this.disposeWithMe((0,i.toDisposable)(r.onPointerDown$.subscribeEvent({priority:4,next:([e,t])=>{this._handlePointerDown(e)&&this._consumeControlEvent(e,t)}}))),this.disposeWithMe((0,i.toDisposable)(((t=r.onPointerUp$)==null?void 0:t.subscribeEvent({priority:4,next:([e,t])=>{this._isControlEvent(e)&&this._consumeControlEvent(e,t)}}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(((n=r.onDblclick$)==null?void 0:n.subscribeEvent({priority:4,next:([e,t])=>{this._isControlEvent(e)&&this._consumeControlEvent(e,t)}}))??{dispose:()=>{}})),this.disposeWithMe((0,i.toDisposable)(()=>this._removeObject())),this._syncControls()}_ensureObject(){return this._object||(this._object=new rt(et),this._attachObjectEvents(this._object),this._renderContext.scene.addObject(this._object,tt)),this._object}_attachObjectEvents(e){var t;(t=this._objectEventDisposables)==null||t.dispose();let n=new i.DisposableCollection;n.add(e.onPointerDown$.subscribeEvent({priority:4,next:([e,t])=>{this._handlePointerDown(e)&&this._consumeControlEvent(e,t)}})),n.add(e.onPointerUp$.subscribeEvent({priority:4,next:([e,t])=>{this._isControlEvent(e)&&this._consumeControlEvent(e,t)}})),n.add(e.onDblclick$.subscribeEvent({priority:4,next:([e,t])=>{this._isControlEvent(e)&&this._consumeControlEvent(e,t)}})),this._objectEventDisposables=n}_removeObject(){var e;this._object&&(this._renderContext.scene.removeObjects([this._object]),(e=this._objectEventDisposables)==null||e.dispose(),this._objectEventDisposables=null,this._object=null,this._activeNodeId=null,this._activeScopeId=null,this._renderContext.scene.makeDirty(!0))}_syncControls(e,r){var i,a;if(this._stateService.getState().interactionMode===`viewing`){this._removeObject();return}let o=this._elementStateService.getSnapshot(),s=o.context,c=o.focusedId??o.selectedIds[0];if(!s||!c||o.selectedIds.length!==1){this._removeObject();return}let l=this._boardElementService.getElementData(s.unitId,s.subUnitId),u=l[c],d=(0,t.getMindMapNodeMeta)(u==null?void 0:u.element);if(!u||!d){this._removeObject();return}let f=(0,n.getBoardElementRenderObjectKey)(s.unitId,c);if(r!=null&&r.hideRootControls&&d.parentNodeId==null&&e!=null&&e.has(f)){this._removeObject();return}let p=this._resolveControlBounds(l,s.unitId,c,e);if(!p){this._removeObject();return}let m=Object.values(l).filter(e=>{var n;return((n=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:n.parentNodeId)===c}),h=d.collapsed?this._countDescendants(l,c):0;this._activeNodeId=c,this._activeScopeId=d.structureScopeId;let g=(i=l[d.structureScopeId])==null?void 0:i.element,_=(0,t.getMindMapContainerMeta)(g),v=g==null||(a=g.custom)==null||(a=a.mindmap)==null||(a=a.layout)==null?void 0:a.structureKind,y=(_==null?void 0:_.layout.structureKind)??v,b=d.parentNodeId==null,x=this._resolveControlSide(d.side,b,y);this._ensureObject().updateState({controls:$e({bounds:p,isRoot:b,side:x,rootChildSides:this._resolveRootChildControlSides(b,y),hasChildren:m.length>0,collapsedDescendantCount:h})}),this._renderContext.scene.makeDirty(!0)}_resolveControlSide(e,t,n){return n===`timeline-vertical`?!t&&(e===`left`||e===`right`)?e:`bottom`:n===`mindmap-vertical`?!t&&(e===`top`||e===`bottom`)?e:`bottom`:e===`left`?`left`:`right`}_resolveRootChildControlSides(e,t){if(e){if(it(t))return[`bottom`];if(t===`timeline-horizontal`)return[`right`];if(t===`timeline-vertical`)return[`bottom`]}}_resolveCreateChildSide(e){var n,r;let i=this._elementStateService.getSnapshot().context;if(!i||!this._activeNodeId)return;let a=this._boardElementService.getElementData(i.unitId,i.subUnitId),o=(0,t.getMindMapNodeMeta)((n=a[this._activeNodeId])==null?void 0:n.element),s=o?(0,t.getMindMapContainerMeta)((r=a[o.structureScopeId])==null?void 0:r.element):null;if((o==null?void 0:o.parentNodeId)!=null||!it(s==null?void 0:s.layout.structureKind)&&!at(s==null?void 0:s.layout.structureKind))return e===`add-child-left`?`left`:e===`add-child-top`?`top`:e===`add-child-bottom`?`bottom`:`right`}_resolveControlBounds(t,r,i,a){var o,s;let c=(0,n.getBoardElementRenderObjectKey)(r,i),l=a==null?void 0:a.get(c),u=this._toFiniteBounds(l);if(u)return u;let d=this._renderContext.scene,f=((o=d.getObjectIncludeInGroup)==null?void 0:o.call(d,c))??((s=d.getObject)==null?void 0:s.call(d,c));return this._toFiniteBounds(f)||(0,e.resolveBoardElementWorldBounds)(t,i)}_toFiniteBounds(e){return e&&Number.isFinite(e.left)&&Number.isFinite(e.top)&&Number.isFinite(e.width)&&Number.isFinite(e.height)?{left:e.left,top:e.top,width:e.width,height:e.height}:null}_countDescendants(e,n){return Object.values(e).filter(e=>{var r;return((r=(0,t.getMindMapNodeMeta)(e.element))==null?void 0:r.parentNodeId)===n}).reduce((t,n)=>t+1+this._countDescendants(e,n.elementId),0)}_handlePointerMove(e){if(!this._object)return;let t=this._stateService.getState(),n=ot(e,{panOffset:t.viewportPanOffset,zoomRatio:t.zoomRatio});this._object.setHoveredControl(this._object.getHitControl(n,e.deviceType))}_handlePointerDown(e){if(!this._object||!this._activeNodeId||(e.button??0)!==0)return!1;let n=this._elementStateService.getSnapshot().context;if(!n)return!1;let r=this._stateService.getState(),a=ot(e,{panOffset:r.viewportPanOffset,zoomRatio:r.zoomRatio}),o=this._object.getHitControl(a,e.deviceType);if(!o)return!1;if(o.kind===`toggle-collapse`)return this._executeAndLayout(t.ToggleMindMapNodeCollapseOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:this._activeNodeId}),!0;if(o.kind===`add-child-left`||o.kind===`add-child-right`||o.kind===`add-child-top`||o.kind===`add-child-bottom`){let e=(0,i.generateRandomId)(6);return this._executeCreateAndEdit(t.AddMindMapChildOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,parentNodeId:this._activeNodeId,side:this._resolveCreateChildSide(o.kind),nodeId:e,connectorId:(0,i.generateRandomId)(6),text:this._localeService.t(`boards-mind-ui.panel.addText`)},e),!0}if(o.kind===`add-sibling-before`||o.kind===`add-sibling-after`){let e=(0,i.generateRandomId)(6);return this._executeCreateAndEdit(t.AddMindMapSiblingOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:this._activeNodeId,placement:o.placement??(o.kind===`add-sibling-before`?`before`:`after`),siblingNodeId:e,connectorId:(0,i.generateRandomId)(6),text:this._localeService.t(`boards-mind-ui.panel.addText`)},e),!0}return!0}_isControlEvent(e){if(!this._object||(e.button??0)!==0)return!1;let t=this._stateService.getState(),n=ot(e,{panOffset:t.viewportPanOffset,zoomRatio:t.zoomRatio});return!!this._object.getHitControl(n,e.deviceType)}_consumeControlEvent(e,t){var n,r;t.stopPropagation(),(n=e.preventDefault)==null||n.call(e),(r=e.stopPropagation)==null||r.call(e)}_executeAndLayout(e,n){let r=this._activeScopeId;this._undoRedoGroupService.run(n.unitId,()=>{this._commandService.syncExecuteCommand(e,n)&&r&&(this._commandService.syncExecuteCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:r}),this._syncControls())})}_executeCreateAndEdit(e,t,r){let i={unitId:t.unitId,subUnitId:t.subUnitId},a=this._commandService.executeCommand(e,t);Promise.resolve(a).then(e=>{e&&(this._syncControls(),this._elementStateService.selectElements(i,[r],r),this._boardTextEditingService.ignoreExternalFocusChanges(),this._boardTextEditingService.setEditing({...i,shapeId:r,shapeKey:(0,n.getBoardElementRenderObjectKey)(i.unitId,r),visible:!0}))})}};st=C([S(1,(0,i.Inject)(e.IBoardElementService)),S(2,(0,i.Inject)(n.IBoardElementStateService)),S(3,(0,i.Inject)(n.IBoardUIStateService)),S(4,i.ICommandService),S(5,(0,i.Inject)(n.BoardTextEditingService)),S(6,(0,i.Inject)(i.LocaleService)),S(7,(0,i.Inject)(Ye)),S(8,(0,i.Inject)(s.UndoRedoGroupService))],st);const ct=`FOCUSING_MIND_MAP_TEXT_EDITOR`;let J=class extends i.RxDisposable{constructor(e,t){super(),this._commandService=e,this._shortcutService=t,this._init()}_init(){this.disposeWithMe(this._shortcutService.registerShortcut(this._createQuoteShortcut()))}_createQuoteShortcut(){return{id:c.SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID,binding:s.KeyCode.ENTER|s.MetaKeys.SHIFT,priority:1e3,preconditions:e=>e.getContextValue(`FOCUSING_MIND_MAP_TEXT_EDITOR`)&&this._commandService.hasCommand(c.SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID)}}};J=C([S(0,i.ICommandService),S(1,s.IShortcutService)],J);const lt=[pe,me,ct];let ut=class extends i.RxDisposable{constructor(e,t,n,r,a){super(),this._renderContext=e,this._boardElementService=t,this._elementStateService=n,this._textEditingService=r,this._contextService=a,x(this,`_isActive`,!1),this.disposeWithMe((0,i.toDisposable)(this._renderContext.activated$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(e=>{this._isActive=e,this._syncContext()}))),this.disposeWithMe((0,i.toDisposable)(this._elementStateService.state$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>{this._syncContext()}))),this.disposeWithMe((0,i.toDisposable)(this._textEditingService.editingParams$.pipe((0,o.takeUntil)(this.dispose$)).subscribe(()=>{this._syncContext()}))),this._syncContext()}_syncContext(){var e,n;let r=this._elementStateService.getSnapshot(),i=this._textEditingService.getEditing(),a=i!=null&&i.visible?i.shapeId:r.activeEditingId,o=r.focusedId??r.selectedIds[0],s=r.context??{unitId:this._renderContext.unitId,subUnitId:this._renderContext.unit.getActivePageId()},c=this._isActive&&!!o&&r.selectedIds.length===1&&!a&&!r.isTransforming,l=this._isActive?this._boardElementService.getElementData(s.unitId,s.subUnitId):{};this._contextService.setContextValue(pe,c&&!!(0,t.getMindMapNodeMeta)((e=l[o])==null?void 0:e.element)),this._contextService.setContextValue(me,this._isActive&&r.selectedIds.length===0&&!r.focusedId&&!a&&!r.isTransforming),this._contextService.setContextValue(ct,!!a&&!!(0,t.getMindMapNodeMeta)((n=l[a])==null?void 0:n.element))}dispose(){this._resetContext(),super.dispose()}_resetContext(){lt.forEach(e=>this._contextService.setContextValue(e,!1))}};ut=C([S(1,(0,i.Inject)(e.IBoardElementService)),S(2,(0,i.Inject)(n.IBoardElementStateService)),S(3,(0,i.Inject)(n.BoardTextEditingService)),S(4,i.IContextService)],ut);var dt=class extends K{async _handlePointerDown(e,t,n){await this._insertMindMap(e,t,n)}};const ft={id:`board.operation.mind-map.open-panel`,type:i.CommandType.OPERATION,handler:(e,t)=>!!(t!=null&&t.unitId)&&!!t.subUnitId&&!!t.scopeId},Y=`board.mind-map.panel`,pt=[`structure`,`layout`,`importExport`];t.MIND_MAP_DEFAULT_LAYOUT.horizontalGap,t.MIND_MAP_DEFAULT_LAYOUT.siblingGap,t.MIND_MAP_DEFAULT_LAYOUT.branchGap;const mt=[{labelKey:`boards-mind-ui.panel.spacing.parentGap`,key:`horizontalGap`,...t.MIND_MAP_LAYOUT_SPACING_LIMITS.horizontalGap},{labelKey:`boards-mind-ui.panel.spacing.siblingGap`,key:`siblingGap`,...t.MIND_MAP_LAYOUT_SPACING_LIMITS.siblingGap},{labelKey:`boards-mind-ui.panel.spacing.branchGap`,key:`branchGap`,...t.MIND_MAP_LAYOUT_SPACING_LIMITS.branchGap}],ht=[{labelKey:`boards-mind-ui.panel.layout.right`,value:`right`},{labelKey:`boards-mind-ui.panel.layout.left`,value:`left`},{labelKey:`boards-mind-ui.panel.layout.both`,value:`both`}],gt=[{labelKey:`boards-mind-ui.panel.structureKind.mindmapHorizontal`,value:`mindmap-horizontal`},{labelKey:`boards-mind-ui.panel.structureKind.mindmapVertical`,value:`mindmap-vertical`},{labelKey:`boards-mind-ui.panel.structureKind.treeRight`,value:`tree-right`},{labelKey:`boards-mind-ui.panel.structureKind.treeLeft`,value:`tree-left`},{labelKey:`boards-mind-ui.panel.structureKind.treeAlternate`,value:`tree-alternate`},{labelKey:`boards-mind-ui.panel.structureKind.timelineHorizontal`,value:`timeline-horizontal`},{labelKey:`boards-mind-ui.panel.structureKind.timelineVertical`,value:`timeline-vertical`}],_t=[{labelKey:`boards-mind-ui.panel.branchLineType.curve`,value:`curve`},{labelKey:`boards-mind-ui.panel.branchLineType.roundedOrthogonal`,value:`rounded-orthogonal`},{labelKey:`boards-mind-ui.panel.branchLineType.orthogonal`,value:`orthogonal`}];function vt(e){let n=(e==null?void 0:e.structureKind)??t.MIND_MAP_DEFAULT_LAYOUT.structureKind;return{spacing:{horizontalGap:(e==null?void 0:e.horizontalGap)??t.MIND_MAP_DEFAULT_LAYOUT.horizontalGap,siblingGap:(e==null?void 0:e.siblingGap)??t.MIND_MAP_DEFAULT_LAYOUT.siblingGap,branchGap:(e==null?void 0:e.branchGap)??t.MIND_MAP_DEFAULT_LAYOUT.branchGap},direction:(e==null?void 0:e.direction)??t.MIND_MAP_DEFAULT_LAYOUT.direction,structureKind:n,branchLineType:(0,t.resolveMindMapBranchLineTypeForStructure)(n,e==null?void 0:e.branchLineType)}}async function yt(e,n){return await Promise.resolve(e.executeCommand(t.ChangeMindMapLayoutOperation.id,n))?(await Promise.resolve(e.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId})),!0):!1}async function bt(e,n){return await Promise.resolve(e.executeCommand(t.ChangeMindMapBranchLineTypeOperation.id,n))?(await Promise.resolve(e.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId})),!0):!1}async function xt(e,n){return await Promise.resolve(e.executeCommand(t.ChangeMindMapLayoutOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId,...n.horizontalGap===void 0?{}:{horizontalGap:n.horizontalGap},...n.siblingGap===void 0?{}:{siblingGap:n.siblingGap},...n.branchGap===void 0?{}:{branchGap:n.branchGap}}))?(await Promise.resolve(e.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId})),!0):!1}async function St(e,n){return n.nodeId===n.targetNodeId||!await Promise.resolve(e.executeCommand(t.ReparentMindMapNodeOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:n.nodeId,targetNodeId:n.targetNodeId,referenceNodeId:n.targetNodeId,placement:n.placement}))?!1:(await Promise.resolve(e.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId})),!0)}async function Ct(e,n){let r=n.text.trim();return!r||!await Promise.resolve(e.executeCommand(t.UpdateMindMapNodeOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:n.nodeId,text:r}))?!1:(await Promise.resolve(e.executeCommand(t.LayoutMindMapOperation.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId})),!0)}async function wt(e){var t;let n=(t=globalThis.navigator)==null?void 0:t.clipboard;return n!=null&&n.writeText?(await n.writeText(e),!0):!1}async function Tt(e,n,r=wt){let i=await Promise.resolve(e.executeCommand(t.ExportMindMapOpmlOperation.id,n));if(typeof i!=`string`||!i)return!1;try{return await r(i)!==!1}catch{return!1}}async function Et(e,n){return n.opml.trim()?(await e.executeCommand(t.ImportMindMapOpmlOperation.id,n)).success:!1}function Dt(e,t){let n=`shapeData`in e.element?e.element.shapeData.shapeText:void 0;return(n==null?void 0:n.text)||t}function Ot(e,n,r=t.MIND_MAP_DEFAULT_NODE_TEXT){let i=Object.values(e).map(e=>{let r=(0,t.getMindMapNodeMeta)(e.element);return(r==null?void 0:r.structureScopeId)===n?{data:e,meta:r}:null}).filter(e=>!!e),a=/* @__PURE__ */ new Map;i.forEach(e=>{let t=e.meta.parentNodeId;a.set(t,[...a.get(t)??[],e])}),a.forEach(e=>{e.sort((e,n)=>(0,t.compareMindMapOrderKey)(e.meta.orderKey,n.meta.orderKey)||e.data.elementId.localeCompare(n.data.elementId))});let o=[],s=(e,t)=>{(a.get(e)??[]).forEach(e=>{o.push({nodeId:e.data.elementId,depth:t,text:Dt(e.data,r)}),s(e.data.elementId,t+1)})};return s(null,0),o}function kt(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.text.toLowerCase().includes(n)):e}function At(e){return{paddingInlineStart:8+(Number.isFinite(e)&&e>0?e:0)*16}}function jt(e){return/* @__PURE__ */ (0,p.jsx)(u.Segmented,{className:`univer-w-full univer-text-xs`,...e})}function X(e){return/* @__PURE__ */ (0,p.jsxs)(`section`,{className:`univer-py-4`,"data-board-mind-map-panel-section":`true`,children:[/* @__PURE__ */ (0,p.jsx)(`h3`,{className:`univer-mb-3 univer-text-sm univer-font-semibold univer-text-gray-900 dark:!univer-text-gray-100`,children:e.title}),e.children]})}function Mt(r,a=`structure`){var c,l,u;let d=(0,s.useDependency)(i.ICommandService),p=(0,s.useDependency)(n.IBoardElementStateService),m=(0,s.useDependency)(e.IBoardElementService),h=(0,s.useDependency)(i.LocaleService),[,g]=(0,f.useReducer)(e=>e+1,0);(0,f.useEffect)(()=>{let e=(0,o.merge)(m.elementAdd$,m.elementUpdate$,m.elementRemove$).subscribe(e=>{e.some(e=>e.unitId===r.unitId&&e.subUnitId===r.subUnitId)&&g()});return()=>e.unsubscribe()},[m,r.unitId,r.subUnitId]);let _=m.getElementData(r.unitId,r.subUnitId),v=Ot(_,r.scopeId,h.t(`boards-mind-ui.panel.addText`)),y=(c=(0,t.getMindMapContainerMeta)((l=_[r.scopeId])==null?void 0:l.element))==null?void 0:c.layout,[b,x]=(0,f.useState)(``),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(``),{spacing:E,direction:D,structureKind:O,branchLineType:k}=vt(y),[A,j]=(0,f.useState)(null),[M,N]=(0,f.useState)(a),P=kt(v,b),F={unitId:r.unitId,subUnitId:r.subUnitId,scopeId:r.scopeId};return{commandService:d,elementStateService:p,localeService:h,query:b,setQuery:x,editingOutlineNode:S,setEditingOutlineNode:C,opmlText:w,setOpmlText:T,spacing:E,layoutDirection:D,structureKind:O,branchLineType:k,setDraggedOutlineNodeId:j,activeTab:M,setActiveTab:N,visibleOutlineItems:P,baseParams:F,tabItems:pt.map(e=>({label:h.t(`boards-mind-ui.panel.tab.${e}`),value:e})),selectedNode:r.nodeId?(u=_[r.nodeId])==null?void 0:u.element:void 0,branchLineItems:_t.filter(e=>e.value!==`curve`||(0,t.isMindMapPlainStructureKind)(O)),changeLayout:e=>yt(d,{...F,direction:e}),changeStructureKind:e=>{let n=(0,t.resolveMindMapBranchLineTypeForStructure)(e,k);return yt(d,{...F,structureKind:e,...n===k?null:{branchLineType:n}})},changeBranchLineType:e=>{let n=(0,t.resolveMindMapBranchLineTypeForStructure)(O,e);return bt(d,{...F,branchLineType:n})},changeSpacing:(e,t)=>{let n={...E,[e]:t};return xt(d,{...F,...n})},importOpml:()=>{Et(d,{unitId:r.unitId,subUnitId:r.subUnitId,left:120,top:120,opml:w}).then(e=>{e&&T(``)})},exportOpml:()=>Tt(d,F),startRenameNode:(e,t)=>{C({nodeId:e,text:t})},commitRenameNode:()=>{S&&Ct(d,{...F,nodeId:S.nodeId,text:S.text}).then(e=>{e&&C(null)})},reorderNode:(e,t)=>{if(e.preventDefault(),!A||A===t)return;let n=e.currentTarget.getBoundingClientRect(),r=e.clientY<n.top+n.height/2?`before`:`after`;j(null),St(d,{...F,nodeId:A,targetNodeId:t,placement:r})}}}function Nt(e){let{elementStateService:t,localeService:n,query:r,setQuery:i,editingOutlineNode:a,setEditingOutlineNode:o,opmlText:s,setOpmlText:c,spacing:l,layoutDirection:f,structureKind:m,branchLineType:h,setDraggedOutlineNodeId:g,activeTab:_,setActiveTab:v,visibleOutlineItems:y,tabItems:b,branchLineItems:x,changeLayout:S,changeStructureKind:C,changeBranchLineType:w,changeSpacing:T,importOpml:E,exportOpml:D,startRenameNode:O,commitRenameNode:k,reorderNode:A}=Mt(e);return/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-size-full univer-bg-gray-0 univer-text-sm univer-text-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-gray-200`,"data-board-mind-map-panel":`true`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-py-3`,"data-board-mind-map-panel-tabs":`true`,children:/* @__PURE__ */ (0,p.jsx)(jt,{items:b,value:_,onChange:e=>v(e)})}),_===`structure`&&/* @__PURE__ */ (0,p.jsx)(X,{title:n.t(`boards-mind-ui.panel.tab.structure`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{children:[/* @__PURE__ */ (0,p.jsx)(u.Input,{slot:/* @__PURE__ */ (0,p.jsx)(d.SearchIcon,{}),value:r,placeholder:n.t(`boards-mind-ui.panel.searchNodes`),className:(0,u.clsx)(`univer-mb-3 univer-w-full`,!1),onChange:i}),y.length?/* @__PURE__ */ (0,p.jsx)(`ol`,{className:`univer-space-y-1`,children:y.map(r=>/* @__PURE__ */ (0,p.jsx)(`li`,{draggable:!0,className:`univer-flex univer-items-center univer-gap-1 univer-truncate univer-rounded univer-py-1 univer-text-left univer-text-gray-800`,style:At(r.depth),onDragStart:e=>{var t;g(r.nodeId),(t=e.dataTransfer)==null||t.setData(`text/plain`,r.nodeId),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`)},onDragOver:e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)},onDrop:e=>A(e,r.nodeId),onDragEnd:()=>g(null),children:(a==null?void 0:a.nodeId)===r.nodeId?/* @__PURE__ */ (0,p.jsxs)(`div`,{className:(0,u.clsx)(`univer-flex univer-min-w-0 univer-flex-1 univer-gap-2`,`univer-items-center`),children:[/* @__PURE__ */ (0,p.jsx)(u.Input,{autoFocus:!0,size:`small`,className:void 0,value:a.text,onChange:e=>o({nodeId:r.nodeId,text:e}),onKeyDown:e=>{e.key===`Enter`&&k(),e.key===`Escape`&&o(null)}}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:void 0,size:`small`,variant:`primary`,disabled:!a.text.trim(),onClick:k,children:n.t(`boards-mind-ui.panel.rename`)}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:void 0,size:`small`,variant:`default`,onClick:()=>o(null),children:n.t(`boards-mind-ui.panel.cancel`)})]}):/* @__PURE__ */ (0,p.jsxs)(p.Fragment,{children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{size:`small`,variant:`ghost`,className:(0,u.clsx)(`univer-min-w-0 univer-flex-1 univer-justify-start univer-truncate univer-text-left`,!1),onClick:()=>t.selectElements({unitId:e.unitId,subUnitId:e.subUnitId},[r.nodeId],r.nodeId),children:r.text}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:(0,u.clsx)(`univer-text-gray-500`,`univer-text-xs`),size:`small`,variant:`default`,onClick:()=>O(r.nodeId,r.text),children:n.t(`boards-mind-ui.panel.rename`)})]})},r.nodeId))}):/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-text-xs univer-text-gray-400 dark:!univer-text-gray-500`,"data-board-mind-map-panel-empty-state":`true`,children:n.t(`boards-mind-ui.panel.emptyNodes`)})]})}),_===`layout`&&/* @__PURE__ */ (0,p.jsx)(X,{title:n.t(`boards-mind-ui.panel.tab.layout`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-space-y-3`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(u.Select,{className:`univer-w-full univer-min-w-0`,"aria-label":n.t(`boards-mind-ui.panel.tab.layout`),options:gt.map(e=>({label:n.t(e.labelKey),value:e.value})),value:m,onChange:e=>C(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(jt,{items:ht.map(e=>({label:n.t(e.labelKey),value:e.value})),value:f,onChange:e=>S(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(jt,{items:x.map(e=>({label:n.t(e.labelKey),value:e.value})),value:h,onChange:e=>w(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-space-y-2`,children:mt.map(({labelKey:e,key:t,min:r,max:i})=>/* @__PURE__ */ (0,p.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2 univer-text-xs univer-text-gray-600`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{className:`univer-w-20 univer-shrink-0`,children:n.t(e)}),/* @__PURE__ */ (0,p.jsx)(u.InputNumber,{controls:!0,inputClassName:void 0,min:r,max:i,step:4,value:l[t],precision:0,className:`univer-w-24`,onChange:e=>T(t,Number(e??r))})]},t))})]})}),_===`importExport`&&/* @__PURE__ */ (0,p.jsx)(X,{title:n.t(`boards-mind-ui.panel.tab.importExport`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(u.Textarea,{className:(0,u.clsx)(`univer-h-28 univer-resize-none`,`univer-text-xs`),placeholder:n.t(`boards-mind-ui.panel.pasteOPML`),value:s,onValueChange:c}),/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{className:void 0,size:`small`,variant:`primary`,disabled:!s.trim(),onClick:E,children:n.t(`boards-mind-ui.panel.importOPML`)}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:void 0,size:`small`,variant:`default`,onClick:D,children:n.t(`boards-mind-ui.panel.exportOPML`)})]})]})})]})}let Pt=class extends i.Disposable{constructor(e,t,n){super(),this._commandService=e,this._localeService=t,this._sidebarService=n,x(this,`_sidebarDisposable`,null),this.disposeWithMe(this._commandService.registerCommand(ft)),this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id!==ft.id)return;let t=e.params;t&&`unitId`in t&&typeof t.unitId==`string`&&`subUnitId`in t&&typeof t.subUnitId==`string`&&`scopeId`in t&&typeof t.scopeId==`string`&&this.open({unitId:t.unitId,subUnitId:t.subUnitId,scopeId:t.scopeId,nodeId:`nodeId`in t&&typeof t.nodeId==`string`?t.nodeId:void 0})}))}dispose(){var e;(e=this._sidebarDisposable)==null||e.dispose(),this._sidebarDisposable=null,super.dispose()}open(e){var t;let n={label:Y,...e},r={id:Y,layout:`canvas`,header:{title:this._localeService.t(`boards-mind-ui.panel.title`)},width:388,children:n,onClose:()=>{this._sidebarDisposable=null}};(t=this._sidebarDisposable)==null||t.dispose(),this._sidebarDisposable=this._sidebarService.open(r)}};Pt=C([S(0,i.ICommandService),S(1,(0,i.Inject)(i.LocaleService)),S(2,(0,i.Inject)(s.ISidebarService))],Pt);function Ft(e){let t=(0,s.useDependency)(i.ICommandService),n=e.popup.extraProps;return n?/* @__PURE__ */ (0,p.jsx)(c.MobileShapeMenu,{shapeRef:{hostType:i.UniverInstanceType.UNIVER_BOARD,unitId:n.unitId,subUnitId:n.subUnitId,shapeId:n.elementId},onText:()=>Ee(t,`edit-text`),onStyle:()=>t.executeCommand(ft.id,{unitId:n.unitId,subUnitId:n.subUnitId,scopeId:n.scopeId,nodeId:n.elementId}),onDelete:()=>Ee(t,`delete`)}):null}function It(e){var n,r,a,o,m;let h=(0,s.useDependency)(i.ICommandService),g=(0,s.useDependency)(i.LocaleService),_=(0,s.useDependency)(s.IFontService),v=(0,s.useObservable)(_.fonts$,_.getFonts()),[y,b]=(0,f.useState)(null),x=(0,c.getTextStyle)(e.shapeData),S=x.ff??l.ShapeDefaultConfig.shapeText.fontFamily,C=x.fs??l.ShapeDefaultConfig.shapeText.fontSize;function w(n){return h.executeCommand(t.UpdateMindMapNodeOperation.id,{unitId:e.unitId,subUnitId:e.subUnitId,nodeId:e.nodeId,...n})}let T=[{key:`fill`,value:((n=e.shapeData.fill)==null?void 0:n.color)??l.ShapeDefaultConfig.fill},{key:`stroke`,value:((r=e.shapeData.stroke)==null?void 0:r.color)??l.ShapeDefaultConfig.stroke},{key:`fontColor`,value:((a=x.cl)==null?void 0:a.rgb)??l.ShapeDefaultConfig.shapeText.color}];if(y){var E;return/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4 univer-py-4`,children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-w-full`,onClick:()=>b(null),size:`middle`,children:g.t(`boards-mind-ui.panel.cancel`)}),y===`fontFamily`?v==null?void 0:v.map(e=>/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-w-full`,"aria-pressed":S===e.value,variant:S===e.value?`primary`:`default`,onClick:async()=>{await w({textStyle:{fontFamily:e.value}}),b(null)},size:`middle`,children:e.label},e.value)):/* @__PURE__ */ (0,p.jsx)(u.MobileColorPresets,{value:(E=T.find(({key:e})=>e===y))==null?void 0:E.value,onSelect:async e=>{y===`fill`?await w({fillColor:e}):y===`stroke`?await w({strokeColor:e}):await w({textStyle:{color:e}}),b(null)}})]})}let D=[{key:`bold`,active:x.bl===i.BooleanNumber.TRUE,icon:/* @__PURE__ */ (0,p.jsx)(d.BoldIcon,{})},{key:`italic`,active:x.it===i.BooleanNumber.TRUE,icon:/* @__PURE__ */ (0,p.jsx)(d.ItalicIcon,{})},{key:`underline`,active:((o=x.ul)==null?void 0:o.s)===i.BooleanNumber.TRUE,icon:/* @__PURE__ */ (0,p.jsx)(d.UnderlineIcon,{})},{key:`strikethrough`,active:((m=x.st)==null?void 0:m.s)===i.BooleanNumber.TRUE,icon:/* @__PURE__ */ (0,p.jsx)(d.StrikethroughIcon,{})}];return/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4 univer-py-4`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-grid univer-grid-cols-4 univer-gap-2`,children:D.map(({key:e,active:t,icon:n})=>/* @__PURE__ */ (0,p.jsx)(u.Button,{"aria-label":g.t(`boards-mind-ui.panel.nodeStyle.${e}`),"aria-pressed":t,variant:t?`primary`:`default`,onClick:()=>w({textStyle:{[e]:!t}}),size:`middle`,children:n},e))}),/* @__PURE__ */ (0,p.jsxs)(u.Button,{className:`univer-w-full univer-justify-between`,onClick:()=>b(`fontFamily`),size:`middle`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{children:g.t(`boards-mind-ui.panel.nodeStyle.fontFamily`)}),/* @__PURE__ */ (0,p.jsx)(`span`,{children:S})]}),/* @__PURE__ */ (0,p.jsxs)(`label`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-4`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{children:g.t(`boards-mind-ui.panel.nodeStyle.fontSize`)}),/* @__PURE__ */ (0,p.jsx)(u.InputNumber,{className:`univer-w-32`,controls:!1,min:1,value:C,onChange:e=>{if(e!=null)return w({textStyle:{fontSize:e}})},size:`small`})]}),T.map(({key:e,value:t})=>/* @__PURE__ */ (0,p.jsxs)(u.Button,{className:`univer-w-full univer-justify-between`,onClick:()=>b(e),size:`middle`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{children:g.t(`boards-mind-ui.toolbar.action.${e}`)}),/* @__PURE__ */ (0,p.jsx)(`span`,{className:`univer-size-6 univer-rounded univer-border univer-border-solid univer-border-gray-200`,style:{backgroundColor:t}})]},e))]})}function Lt(e){return/* @__PURE__ */ (0,p.jsx)(`div`,{className:(0,u.clsx)(`univer-grid univer-w-full univer-gap-2`,e.items.length===4?`univer-grid-cols-[repeat(4,minmax(min-content,1fr))] max-[359px]:univer-grid-cols-2`:`univer-grid-cols-3`),children:e.items.map(t=>/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-min-w-0 univer-whitespace-normal univer-px-2`,variant:e.value===t.value?`primary`:`default`,"aria-pressed":e.value===t.value,onClick:()=>e.onChange(t.value),size:`middle`,children:/* @__PURE__ */ (0,p.jsx)(`span`,{className:`univer-min-w-0 univer-break-words`,children:t.label})},t.value))})}function Rt(n){let{commandService:r,elementStateService:i,localeService:a,query:o,setQuery:s,editingOutlineNode:c,setEditingOutlineNode:l,opmlText:f,setOpmlText:m,spacing:h,layoutDirection:g,structureKind:_,branchLineType:v,activeTab:y,setActiveTab:b,visibleOutlineItems:x,baseParams:S,tabItems:C,selectedNode:w,branchLineItems:T,changeLayout:E,changeStructureKind:D,changeBranchLineType:O,changeSpacing:k,importOpml:A,startRenameNode:j,commitRenameNode:M}=Mt(n,n.nodeId?`style`:`structure`);return(w==null?void 0:w.type)===e.BoardElementType.Shape&&C.unshift({label:a.t(`boards-mind-ui.panel.nodeStyle.style`),value:`style`}),/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-size-full univer-bg-gray-0 univer-text-sm univer-text-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-gray-200`,"data-board-mind-map-panel":`true`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-py-3`,"data-board-mind-map-panel-tabs":`true`,children:/* @__PURE__ */ (0,p.jsx)(u.Segmented,{className:`univer-w-full [&_button]:univer-whitespace-normal [&_button]:univer-break-words [&_button]:univer-px-1`,items:C,value:y,onChange:e=>b(e)})}),y===`style`&&(w==null?void 0:w.type)===e.BoardElementType.Shape&&/* @__PURE__ */ (0,p.jsx)(It,{unitId:n.unitId,subUnitId:n.subUnitId,nodeId:w.id,shapeData:w.shapeData}),y===`structure`&&/* @__PURE__ */ (0,p.jsx)(X,{title:a.t(`boards-mind-ui.panel.tab.structure`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{children:[/* @__PURE__ */ (0,p.jsx)(u.Input,{slot:/* @__PURE__ */ (0,p.jsx)(d.SearchIcon,{}),value:o,placeholder:a.t(`boards-mind-ui.panel.searchNodes`),className:(0,u.clsx)(`univer-mb-3 univer-w-full`,``),onChange:s,size:`small`}),x.length?/* @__PURE__ */ (0,p.jsx)(`ol`,{className:`univer-space-y-1`,children:x.map(e=>/* @__PURE__ */ (0,p.jsx)(`li`,{className:`univer-flex univer-items-center univer-gap-1 univer-truncate univer-rounded univer-py-1 univer-text-left univer-text-gray-800`,style:At(e.depth),children:(c==null?void 0:c.nodeId)===e.nodeId?/* @__PURE__ */ (0,p.jsxs)(`div`,{className:(0,u.clsx)(`univer-flex univer-min-w-0 univer-flex-1 univer-gap-2`,`univer-flex-wrap`),children:[/* @__PURE__ */ (0,p.jsx)(u.Input,{autoFocus:!1,size:`small`,className:`univer-w-full`,value:c.text,onChange:t=>l({nodeId:e.nodeId,text:t}),onKeyDown:e=>{e.key===`Enter`&&M(),e.key===`Escape`&&l(null)}}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-flex-1`,size:`middle`,variant:`primary`,disabled:!c.text.trim(),onClick:M,children:a.t(`boards-mind-ui.panel.rename`)}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-flex-1`,size:`middle`,variant:`default`,onClick:()=>l(null),children:a.t(`boards-mind-ui.panel.cancel`)})]}):/* @__PURE__ */ (0,p.jsxs)(p.Fragment,{children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{size:`middle`,variant:`ghost`,className:(0,u.clsx)(`univer-min-w-0 univer-flex-1 univer-justify-start univer-truncate univer-text-left`,``),onClick:()=>i.selectElements({unitId:n.unitId,subUnitId:n.subUnitId},[e.nodeId],e.nodeId),children:e.text}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:(0,u.clsx)(`univer-text-gray-500`,`univer-px-3`),size:`middle`,variant:`default`,onClick:()=>j(e.nodeId,e.text),children:a.t(`boards-mind-ui.panel.rename`)})]})},e.nodeId))}):/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-text-xs univer-text-gray-400 dark:!univer-text-gray-500`,"data-board-mind-map-panel-empty-state":`true`,children:a.t(`boards-mind-ui.panel.emptyNodes`)})]})}),y===`layout`&&/* @__PURE__ */ (0,p.jsx)(X,{title:a.t(`boards-mind-ui.panel.tab.layout`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-space-y-3`,children:[/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(Lt,{items:gt.map(e=>({label:a.t(e.labelKey),value:e.value})),value:_,onChange:e=>D(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(Lt,{items:ht.map(e=>({label:a.t(e.labelKey),value:e.value})),value:g,onChange:e=>E(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-flex univer-gap-2`,children:/* @__PURE__ */ (0,p.jsx)(Lt,{items:T.map(e=>({label:a.t(e.labelKey),value:e.value})),value:v,onChange:e=>O(e)})}),/* @__PURE__ */ (0,p.jsx)(`div`,{className:`univer-space-y-2`,children:mt.map(({labelKey:e,key:t,min:n,max:r})=>/* @__PURE__ */ (0,p.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2 univer-text-xs univer-text-gray-600`,children:[/* @__PURE__ */ (0,p.jsx)(`span`,{className:`univer-flex-1 univer-text-sm`,children:a.t(e)}),/* @__PURE__ */ (0,p.jsx)(u.InputNumber,{controls:!1,min:n,max:r,step:4,value:h[t],precision:0,className:`univer-w-32`,onChange:e=>k(t,Number(e??n)),size:`small`})]},t))})]})}),y===`importExport`&&/* @__PURE__ */ (0,p.jsx)(X,{title:a.t(`boards-mind-ui.panel.tab.importExport`),children:/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(u.Textarea,{className:(0,u.clsx)(`univer-h-28 univer-resize-none`,``),placeholder:a.t(`boards-mind-ui.panel.pasteOPML`),value:f,onValueChange:m,size:`small`}),/* @__PURE__ */ (0,p.jsxs)(`div`,{className:`univer-flex univer-gap-2`,children:[/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-flex-1`,size:`middle`,variant:`primary`,disabled:!f.trim(),onClick:A,children:a.t(`boards-mind-ui.panel.importOPML`)}),/* @__PURE__ */ (0,p.jsx)(u.Button,{className:`univer-flex-1`,size:`middle`,variant:`default`,onClick:async()=>{let e=await r.executeCommand(t.ExportMindMapOpmlOperation.id,S);e!==!1&&m(e)},children:a.t(`boards-mind-ui.panel.exportOPML`)})]})]})})]})}let zt=class extends i.Disposable{constructor(e){super(),this._componentManager=e,this._registerComponents()}_registerComponents(){this.disposeWithMe(this._componentManager.register(ue,fe)),this.disposeWithMe(this._componentManager.register(Te,Ft)),this.disposeWithMe(this._componentManager.register(Y,Rt))}};zt=C([S(0,(0,i.Inject)(s.ComponentManager))],zt);let Bt=class extends i.Disposable{constructor(e,t,n){super(),this._commandService=e,this._localeService=t,this._sidebarService=n,x(this,`_sidebarDisposable`,null),this.disposeWithMe(this._commandService.registerCommand(ft)),this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id!==ft.id)return;let t=e.params;t&&`unitId`in t&&typeof t.unitId==`string`&&`subUnitId`in t&&typeof t.subUnitId==`string`&&`scopeId`in t&&typeof t.scopeId==`string`&&this.open({unitId:t.unitId,subUnitId:t.subUnitId,scopeId:t.scopeId,nodeId:`nodeId`in t&&typeof t.nodeId==`string`?t.nodeId:void 0})}))}dispose(){var e;(e=this._sidebarDisposable)==null||e.dispose(),this._sidebarDisposable=null,super.dispose()}open(e){var t;let n={label:Y,...e};(t=this._sidebarDisposable)==null||t.dispose(),this._sidebarDisposable=this._sidebarService.open({id:Y,header:{title:this._localeService.t(`boards-mind-ui.panel.title`)},width:388,children:n,onClose:()=>{this._sidebarDisposable=null}})}};Bt=C([S(0,i.ICommandService),S(1,(0,i.Inject)(i.LocaleService)),S(2,(0,i.Inject)(s.ISidebarService))],Bt);let Vt=class extends i.Disposable{constructor(e){super(),this._componentManager=e,this._registerComponents()}_registerComponents(){this.disposeWithMe(this._componentManager.register(ue,fe)),this.disposeWithMe(this._componentManager.register(Te,ze)),this.disposeWithMe(this._componentManager.register(Y,Nt))}};Vt=C([S(0,(0,i.Inject)(s.ComponentManager))],Vt);let Z=class{constructor(e,t,n){this._stateService=e,this._insertStateService=t,this._renderManagerService=n}beginMindMapMode(t){var r,i;let a=(r=this._renderManagerService.getRenderUnitById(t.unitId))==null||(i=r.getInjector)==null?void 0:i.call(r),o=(a==null?void 0:a.get(n.IBoardUIStateService))??this._stateService;return((a==null?void 0:a.get(G))??this._insertStateService).setTemplate({rootText:t.rootText,structureKind:t.structureKind,branchLineType:t.branchLineType,children:t.children,blueprint:t.blueprint}),o.setShapeSidebarOpen(!1),o.clearPendingInsert(),o.setActiveTool(e.BoardToolType.MindMap),o.setPendingInsert({type:e.BoardToolType.MindMap}),!0}};Z=C([S(0,n.IBoardUIStateService),S(1,(0,i.Inject)(G)),S(2,a.IRenderManagerService)],Z);const Ht=`UNIVER_BOARDS_MIND_UI_PLUGIN`,Ut=[B],Wt=[ut];let Q=class extends i.Plugin{constructor(e=_,t,n,r){super(),this._config=e,this._injector=t,this._configService=n,this._renderManagerService=r;let{...a}=(0,i.merge)({},_,this._config);this._configService.setConfig(g,a)}onStarting(){n.UniverBoardsUIPlugin.registerRuntimeScopedDependencies(this._injector,[[G],[Ye]]),this._getDependencies().forEach(e=>this._injector.add(e));let t=this._injector.get(Z),r=this._injector.get(e.IBoardMindMapAdapterService);this.disposeWithMe(r.registerAdapter(t)),this.disposeWithMe(this._injector.get(H)),this.disposeWithMe(this._injector.get(J)),this.disposeWithMe(this._injector.get(Bt)),this.disposeWithMe(this._injector.get(Vt)),this._enableMindMapToolbarTool()}_getDependencies(){return[[G],[Ye],[Z],[H],[J],[Bt],[Vt]]}_getRenderModules(){return[Ut,Wt,[K],[st],[Ve],[z],[w],[Qe]]}onReady(){this._getRenderModules().forEach(e=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(i.UniverInstanceType.UNIVER_BOARD,e))})}_enableMindMapToolbarTool(){var t,r;let i=this._getBoardsUIConfig();this._configService.setConfig(n.BOARDS_UI_PLUGIN_CONFIG_KEY,{...i,toolbar:{...i.toolbar,tools:{...(t=i.toolbar)==null?void 0:t.tools,[e.BoardToolType.MindMap]:Gt((r=i.toolbar)==null||(r=r.tools)==null?void 0:r[e.BoardToolType.MindMap])}}})}_getBoardsUIConfig(){return this._configService.getConfig(n.BOARDS_UI_PLUGIN_CONFIG_KEY)??{}}};x(Q,`pluginName`,Ht),x(Q,`packageName`,m),x(Q,`version`,h),x(Q,`type`,i.UniverInstanceType.UNIVER_BOARD),Q=C([(0,i.DependentOn)(r.UniverLicensePlugin,a.UniverRenderEnginePlugin,e.UniverBoardsPlugin,t.UniverBoardsMindPlugin,n.UniverBoardsUIPlugin),S(1,(0,i.Inject)(i.Injector)),S(2,i.IConfigService),S(3,a.IRenderManagerService)],Q);function Gt(e){return e===!1?!1:typeof e!=`object`||{...e,enabled:e.enabled??!0}}let $=class extends i.Plugin{constructor(e=_,t,n,r){super(),this._config=e,this._injector=t,this._configService=n,this._renderManagerService=r;let{...a}=(0,i.merge)({},_,this._config);this._configService.setConfig(g,a)}onStarting(){let t=[[G],[Ye]];n.UniverBoardsMobileUIPlugin.registerRuntimeScopedDependencies(this._injector,t),[...t,[Z],[H],[J],[Pt],[zt]].forEach(e=>this._injector.add(e)),this.disposeWithMe(this._injector.get(e.IBoardMindMapAdapterService).registerAdapter(this._injector.get(Z))),this.disposeWithMe(this._injector.get(H)),this.disposeWithMe(this._injector.get(J)),this.disposeWithMe(this._injector.get(Pt)),this.disposeWithMe(this._injector.get(zt)),this._enableMindMapToolbarTool()}onReady(){[[B],[ut],[K,{useClass:dt}],[st],[Ve],[z],[w],[Qe]].forEach(e=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(i.UniverInstanceType.UNIVER_BOARD,e))})}_enableMindMapToolbarTool(){var t,r;let i=this._getBoardsUIConfig();this._configService.setConfig(n.BOARDS_UI_PLUGIN_CONFIG_KEY,{...i,toolbar:{...i.toolbar,tools:{...(t=i.toolbar)==null?void 0:t.tools,[e.BoardToolType.MindMap]:Kt((r=i.toolbar)==null||(r=r.tools)==null?void 0:r[e.BoardToolType.MindMap])}}})}_getBoardsUIConfig(){return this._configService.getConfig(n.BOARDS_UI_PLUGIN_CONFIG_KEY)??{}}};x($,`pluginName`,Ht),x($,`packageName`,m),x($,`version`,h),x($,`type`,i.UniverInstanceType.UNIVER_BOARD),$=C([(0,i.DependentOn)(r.UniverLicensePlugin,a.UniverRenderEnginePlugin,e.UniverBoardsPlugin,t.UniverBoardsMindPlugin,n.UniverBoardsMobileUIPlugin),S(1,(0,i.Inject)(i.Injector)),S(2,i.IConfigService),S(3,a.IRenderManagerService)],$);function Kt(e){return e===!1?!1:typeof e!=`object`||{...e,enabled:e.enabled??!0}}Object.defineProperty(exports,"UniverBoardsMindMobileUIPlugin",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"UniverBoardsMindUIPlugin",{enumerable:!0,get:function(){return Q}});