flexlayout-react 0.7.13 → 0.7.14

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.
package/ChangeLog.txt CHANGED
@@ -1,3 +1,7 @@
1
+ 0.7.14
2
+ Added attribute tabsetClassName to tab nodes, this will add the classname to the parent
3
+ tabset when there is a single stretched tab. Updated mosaic layout in demo to use this to color headers.
4
+
1
5
  0.7.13
2
6
  New attribute on tabset: enableSingleTabStretch will stretch a single tab to take up
3
7
  all the remaining space and change the style to look like a header, combined with enableDrop
package/README.md CHANGED
@@ -272,49 +272,50 @@ for example see the getDocument() callback in agGrid at https://www.ag-grid.com/
272
272
  Attributes allowed in the 'global' element
273
273
 
274
274
 
275
- | Attribute | Default | Description |
276
- | ------------- |:-------------:| -----|
277
- | splitterSize | 8 | width in pixels of all splitters between tabsets/borders |
278
- | splitterExtra | 0 | additional width in pixels of the splitter hit test area |
279
- | legacyOverflowMenu | false | use the legacy text only overflow menu |
280
- | enableEdgeDock | true | |
281
- | enableRotateBorderIcons | true | boolean indicating if tab icons should rotate with the text in the left and right borders |
282
- | tabEnableClose | true | allow user to close all tabs via close button |
283
- | tabCloseType | 1 | see values in ICloseType |
284
- | tabEnableDrag | true | allow user to drag all tabs to new location |
285
- | tabEnableRename | true | allow user to rename all tabs by double clicking |
286
- | tabEnableFloat | false | enable popouts in all tabs (in popout capable browser) |
287
- | tabClassName | null | |
288
- | tabContentClassName | null | |
289
- | tabIcon | null | |
290
- | tabEnableRenderOnDemand | true | whether to avoid rendering component until tab is visible |
291
- | tabDragSpeed | 0.3 | CSS transition speed of drag outlines (in seconds) |
292
- | tabBorderWidth | -1 | width when added to border, -1 will use border size |
293
- | tabBorderHeight | -1 | height when added to border, -1 will use border size |
294
- | tabSetEnableDeleteWhenEmpty | true | |
295
- | tabSetEnableDrop | true | allow user to drag tabs into all tabsets |
296
- | tabSetEnableDrag | true | allow user to drag tabs out of all tabsets |
297
- | tabSetEnableDivide | true | allow user to drag tabs to region of all tabsets, splitting into new tabset |
298
- | tabSetEnableMaximize | true | allow user to maximize all tabsets to fill view via maximize button |
299
- | tabSetEnableClose | false | allow user to close all tabsets via close button |
300
- | tabSetAutoSelectTab | true | whether to select new/moved tabs in all tabsets |
301
- | tabSetClassNameTabStrip | null | height in pixels of tab strips in all tabsets |
302
- | tabSetClassNameHeader | null | |
303
- | tabSetEnableTabStrip | true | enable tab strip and allow multiple tabs in all tabsets |
304
- | tabSetHeaderHeight | 0 | height of tabset header in pixels; if left as 0 then the value will be calculated from the current fontSize |
305
- | tabSetTabStripHeight | 0 | height of tabset tab bar in pixels; if left as 0 then the value will be calculated from the current fontSize |
306
- | borderBarSize | 0 | size of the border bars in pixels; if left as 0 then the value will be calculated from the current fontSize |
307
- | borderEnableAutoHide | false | hide border if it has zero tabs |
308
- | borderEnableDrop | true | allow user to drag tabs into this border |
309
- | borderAutoSelectTabWhenOpen | true | whether to select new/moved tabs in border when the border is already open |
310
- | borderAutoSelectTabWhenClosed | false | whether to select new/moved tabs in border when the border is curently closed |
311
- | borderClassName | null | |
312
- | borderSize | 200 | initial width in pixels for left/right borders, height for top/bottom borders |
313
- | borderMinSize | 0 | minimum width in pixels for left/right borders, height for top/bottom borders |
314
- | tabSetMinHeight | 0 | minimum width (in px) for all tabsets |
315
- | tabSetMinWidth | 0 | minimum height (in px) for all tabsets |
316
- | tabSetTabLocation | top | show tabs in location top or bottom |
317
- | rootOrientationVertical | false | the top level 'row' will layout horizontally by default, set this option true to make it layout vertically |
275
+ | Attribute | Default | Description |
276
+ |-------------------------------|:-------:|--------------------------------------------------------------------------------------------------------------|
277
+ | splitterSize | 8 | width in pixels of all splitters between tabsets/borders |
278
+ | splitterExtra | 0 | additional width in pixels of the splitter hit test area |
279
+ | legacyOverflowMenu | false | use the legacy text only overflow menu |
280
+ | enableEdgeDock | true | |
281
+ | enableRotateBorderIcons | true | boolean indicating if tab icons should rotate with the text in the left and right borders |
282
+ | tabEnableClose | true | allow user to close all tabs via close button |
283
+ | tabCloseType | 1 | see values in ICloseType |
284
+ | tabEnableDrag | true | allow user to drag all tabs to new location |
285
+ | tabEnableRename | true | allow user to rename all tabs by double clicking |
286
+ | tabEnableFloat | false | enable popouts in all tabs (in popout capable browser) |
287
+ | tabClassName | null | |
288
+ | tabContentClassName | null | |
289
+ | tabIcon | null | |
290
+ | tabEnableRenderOnDemand | true | whether to avoid rendering component until tab is visible |
291
+ | tabDragSpeed | 0.3 | CSS transition speed of drag outlines (in seconds) |
292
+ | tabBorderWidth | -1 | width when added to border, -1 will use border size |
293
+ | tabBorderHeight | -1 | height when added to border, -1 will use border size |
294
+ | tabSetEnableDeleteWhenEmpty | true | |
295
+ | tabSetEnableDrop | true | allow user to drag tabs into all tabsets |
296
+ | tabSetEnableDrag | true | allow user to drag tabs out of all tabsets |
297
+ | tabSetEnableDivide | true | allow user to drag tabs to region of all tabsets, splitting into new tabset |
298
+ | tabSetEnableMaximize | true | allow user to maximize all tabsets to fill view via maximize button |
299
+ | tabSetEnableClose | false | allow user to close all tabsets via close button |
300
+ | tabSetAutoSelectTab | true | whether to select new/moved tabs in all tabsets |
301
+ | tabSetClassNameTabStrip | null | height in pixels of tab strips in all tabsets |
302
+ | tabSetEnableSingleTabStretch | false | if a tabset has only a single tab then stretch the single tab to fill area and display in a header style |
303
+ | tabSetClassNameHeader | null | |
304
+ | tabSetEnableTabStrip | true | enable tab strip and allow multiple tabs in all tabsets |
305
+ | tabSetHeaderHeight | 0 | height of tabset header in pixels; if left as 0 then the value will be calculated from the current fontSize |
306
+ | tabSetTabStripHeight | 0 | height of tabset tab bar in pixels; if left as 0 then the value will be calculated from the current fontSize |
307
+ | borderBarSize | 0 | size of the border bars in pixels; if left as 0 then the value will be calculated from the current fontSize |
308
+ | borderEnableAutoHide | false | hide border if it has zero tabs |
309
+ | borderEnableDrop | true | allow user to drag tabs into this border |
310
+ | borderAutoSelectTabWhenOpen | true | whether to select new/moved tabs in border when the border is already open |
311
+ | borderAutoSelectTabWhenClosed | false | whether to select new/moved tabs in border when the border is curently closed |
312
+ | borderClassName | null | |
313
+ | borderSize | 200 | initial width in pixels for left/right borders, height for top/bottom borders |
314
+ | borderMinSize | 0 | minimum width in pixels for left/right borders, height for top/bottom borders |
315
+ | tabSetMinHeight | 0 | minimum width (in px) for all tabsets |
316
+ | tabSetMinWidth | 0 | minimum height (in px) for all tabsets |
317
+ | tabSetTabLocation | top | show tabs in location top or bottom |
318
+ | rootOrientationVertical | false | the top level 'row' will layout horizontally by default, set this option true to make it layout vertically |
318
319
 
319
320
 
320
321
  ## Row Attributes
@@ -353,6 +354,7 @@ Inherited defaults will take their value from the associated global attributes (
353
354
  | floating | false | |
354
355
  | className | *inherited* | class applied to tab button |
355
356
  | contentClassName | *inherited* | class applied to tab content |
357
+ | tabsetClassName | undefined | class applied to parent tabset when this is the only tab and it is stretched to fill the tabset |
356
358
  | icon | *inherited* | |
357
359
  | enableRenderOnDemand | *inherited* | whether to avoid rendering component until tab is visible |
358
360
  | borderWidth | *inherited* | width when added to border, -1 will use border size |
@@ -370,34 +372,35 @@ Inherited defaults will take their value from the associated global attributes (
370
372
 
371
373
  Note: tabsets can be dynamically created as tabs are moved and deleted when all their tabs are removed (unless enableDeleteWhenEmpty is false).
372
374
 
373
- | Attribute | Default | Description |
374
- | ------------- |:-------------:| -----|
375
- | type | tabset | |
376
- | weight | 100 | relative weight for sizing of this tabset in parent row |
377
- | width | null | preferred pixel width |
378
- | height | null | preferred pixel height |
379
- | name | null | named tabsets will show a header bar above the tabs |
380
- | config | null | a place to hold json config used in your own code |
381
- | selected | 0 | index of selected/visible tab in tabset |
382
- | active | false | whether tabset is currently active; this attribute can only be used in the initial configuration, to change the active tabset you should use the `setActiveTabset` action on the model |
383
- | maximized | false | whether tabset is currently maximized to fill view |
384
- | enableClose | false | allow user to close tabset via a close button |
385
- | id | auto generated | |
386
- | children | *required* | a list of tab nodes |
387
- | enableDeleteWhenEmpty | *inherited* | |
388
- | enableDrop | *inherited* | allow user to drag tabs into this tabset |
389
- | enableDrag | *inherited* | allow user to drag tabs out this tabset |
390
- | enableDivide | *inherited* | allow user to drag tabs to region of this tabset, splitting into new tabset |
391
- | enableMaximize | *inherited* | allow user to maximize tabset to fill view via maximize button |
392
- | autoSelectTab | *inherited* | whether to select new/moved tabs in tabset |
393
- | classNameTabStrip | *inherited* | |
394
- | classNameHeader | *inherited* | |
395
- | enableTabStrip | *inherited* | enable tab strip and allow multiple tabs in this tabset |
396
- | headerHeight | *inherited* | |
397
- | tabStripHeight | *inherited* | height in pixels of tab strip |
398
- | tabLocation | *inherited* | show tabs in location top or bottom |
399
- | minHeight | *inherited* | minimum height (in px) for this tabset |
400
- | minWidth | *inherited* | minimum width (in px) for this tabset |
375
+ | Attribute | Default | Description |
376
+ |-------------------------|:-------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
377
+ | type | tabset | |
378
+ | weight | 100 | relative weight for sizing of this tabset in parent row |
379
+ | width | null | preferred pixel width |
380
+ | height | null | preferred pixel height |
381
+ | name | null | named tabsets will show a header bar above the tabs |
382
+ | config | null | a place to hold json config used in your own code |
383
+ | selected | 0 | index of selected/visible tab in tabset |
384
+ | active | false | whether tabset is currently active; this attribute can only be used in the initial configuration, to change the active tabset you should use the `setActiveTabset` action on the model |
385
+ | maximized | false | whether tabset is currently maximized to fill view |
386
+ | enableClose | false | allow user to close tabset via a close button |
387
+ | id | auto generated | |
388
+ | children | *required* | a list of tab nodes |
389
+ | enableDeleteWhenEmpty | *inherited* | |
390
+ | enableDrop | *inherited* | allow user to drag tabs into this tabset |
391
+ | enableDrag | *inherited* | allow user to drag tabs out this tabset |
392
+ | enableDivide | *inherited* | allow user to drag tabs to region of this tabset, splitting into new tabset |
393
+ | enableMaximize | *inherited* | allow user to maximize tabset to fill view via maximize button |
394
+ | enableSingleTabStretch | *inherited* | if the tabset has only a single tab then stretch the single tab to fill area and display in a header style |
395
+ | autoSelectTab | *inherited* | whether to select new/moved tabs in tabset |
396
+ | classNameTabStrip | *inherited* | |
397
+ | classNameHeader | *inherited* | |
398
+ | enableTabStrip | *inherited* | enable tab strip and allow multiple tabs in this tabset |
399
+ | headerHeight | *inherited* | |
400
+ | tabStripHeight | *inherited* | height in pixels of tab strip |
401
+ | tabLocation | *inherited* | show tabs in location top or bottom |
402
+ | minHeight | *inherited* | minimum height (in px) for this tabset |
403
+ | minWidth | *inherited* | minimum width (in px) for this tabset |
401
404
 
402
405
  ## Border Attributes
403
406
 
@@ -120,6 +120,7 @@ export interface ITabAttributes {
120
120
  component?: string;
121
121
  config?: any;
122
122
  contentClassName?: string;
123
+ tabsetClassName?: string;
123
124
  enableClose?: boolean;
124
125
  enableDrag?: boolean;
125
126
  enableFloat?: boolean;
@@ -31,6 +31,7 @@ export declare class TabNode extends Node implements IDraggable {
31
31
  isEnableRename(): boolean;
32
32
  getClassName(): string | undefined;
33
33
  getContentClassName(): string | undefined;
34
+ getTabSetClassName(): string | undefined;
34
35
  isEnableRenderOnDemand(): boolean;
35
36
  toJson(): IJsonTabNode;
36
37
  }
@@ -256,7 +256,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
256
256
  \******************************/
257
257
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
258
258
 
259
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TabNode\": () => (/* binding */ TabNode)\n/* harmony export */ });\n/* harmony import */ var _Attribute__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Attribute */ \"./src/Attribute.ts\");\n/* harmony import */ var _AttributeDefinitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AttributeDefinitions */ \"./src/AttributeDefinitions.ts\");\n/* harmony import */ var _Node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Node */ \"./src/model/Node.ts\");\n\r\n\r\n\r\nclass TabNode extends _Node__WEBPACK_IMPORTED_MODULE_2__.Node {\r\n /** @internal */\r\n static _fromJson(json, model, addToModel = true) {\r\n const newLayoutNode = new TabNode(model, json, addToModel);\r\n return newLayoutNode;\r\n }\r\n /** @internal */\r\n static _createAttributeDefinitions() {\r\n const attributeDefinitions = new _AttributeDefinitions__WEBPACK_IMPORTED_MODULE_1__.AttributeDefinitions();\r\n attributeDefinitions.add(\"type\", TabNode.TYPE, true).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"id\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"name\", \"[Unnamed Tab]\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"altName\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"helpText\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"component\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"config\", undefined).setType(\"any\");\r\n attributeDefinitions.add(\"floating\", false).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"enableClose\", \"tabEnableClose\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"closeType\", \"tabCloseType\").setType(\"ICloseType\");\r\n attributeDefinitions.addInherited(\"enableDrag\", \"tabEnableDrag\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"enableRename\", \"tabEnableRename\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"className\", \"tabClassName\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"contentClassName\", \"tabContentClassName\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"icon\", \"tabIcon\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"enableRenderOnDemand\", \"tabEnableRenderOnDemand\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"enableFloat\", \"tabEnableFloat\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"borderWidth\", \"tabBorderWidth\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.NUMBER);\r\n attributeDefinitions.addInherited(\"borderHeight\", \"tabBorderHeight\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.NUMBER);\r\n return attributeDefinitions;\r\n }\r\n /** @internal */\r\n constructor(model, json, addToModel = true) {\r\n super(model);\r\n this._extra = {}; // extra data added to node not saved in json\r\n TabNode._attributeDefinitions.fromJson(json, this._attributes);\r\n if (addToModel === true) {\r\n model._addNode(this);\r\n }\r\n }\r\n getWindow() {\r\n return this._window;\r\n }\r\n getTabRect() {\r\n return this._tabRect;\r\n }\r\n /** @internal */\r\n _setTabRect(rect) {\r\n this._tabRect = rect;\r\n }\r\n /** @internal */\r\n _setRenderedName(name) {\r\n this._renderedName = name;\r\n }\r\n /** @internal */\r\n _getNameForOverflowMenu() {\r\n const altName = this._getAttr(\"altName\");\r\n if (altName !== undefined) {\r\n return altName;\r\n }\r\n return this._renderedName;\r\n }\r\n getName() {\r\n return this._getAttr(\"name\");\r\n }\r\n getHelpText() {\r\n return this._getAttr(\"helpText\");\r\n }\r\n getComponent() {\r\n return this._getAttr(\"component\");\r\n }\r\n /**\r\n * Returns the config attribute that can be used to store node specific data that\r\n * WILL be saved to the json. The config attribute should be changed via the action Actions.updateNodeAttributes rather\r\n * than directly, for example:\r\n * this.state.model.doAction(\r\n * FlexLayout.Actions.updateNodeAttributes(node.getId(), {config:myConfigObject}));\r\n */\r\n getConfig() {\r\n return this._attributes.config;\r\n }\r\n /**\r\n * Returns an object that can be used to store transient node specific data that will\r\n * NOT be saved in the json.\r\n */\r\n getExtraData() {\r\n return this._extra;\r\n }\r\n isFloating() {\r\n return this._getAttr(\"floating\");\r\n }\r\n getIcon() {\r\n return this._getAttr(\"icon\");\r\n }\r\n isEnableClose() {\r\n return this._getAttr(\"enableClose\");\r\n }\r\n getCloseType() {\r\n return this._getAttr(\"closeType\");\r\n }\r\n isEnableFloat() {\r\n return this._getAttr(\"enableFloat\");\r\n }\r\n isEnableDrag() {\r\n return this._getAttr(\"enableDrag\");\r\n }\r\n isEnableRename() {\r\n return this._getAttr(\"enableRename\");\r\n }\r\n getClassName() {\r\n return this._getAttr(\"className\");\r\n }\r\n getContentClassName() {\r\n return this._getAttr(\"contentClassName\");\r\n }\r\n isEnableRenderOnDemand() {\r\n return this._getAttr(\"enableRenderOnDemand\");\r\n }\r\n /** @internal */\r\n _setName(name) {\r\n this._attributes.name = name;\r\n if (this._window && this._window.document) {\r\n this._window.document.title = name;\r\n }\r\n }\r\n /** @internal */\r\n _setFloating(float) {\r\n this._attributes.floating = float;\r\n }\r\n /** @internal */\r\n _layout(rect, metrics) {\r\n if (!rect.equals(this._rect)) {\r\n this._fireEvent(\"resize\", { rect });\r\n }\r\n this._rect = rect;\r\n }\r\n /** @internal */\r\n _delete() {\r\n this._parent._remove(this);\r\n this._fireEvent(\"close\", {});\r\n }\r\n toJson() {\r\n const json = {};\r\n TabNode._attributeDefinitions.toJson(json, this._attributes);\r\n return json;\r\n }\r\n /** @internal */\r\n _updateAttrs(json) {\r\n TabNode._attributeDefinitions.update(json, this._attributes);\r\n }\r\n /** @internal */\r\n _getAttributeDefinitions() {\r\n return TabNode._attributeDefinitions;\r\n }\r\n /** @internal */\r\n _setWindow(window) {\r\n this._window = window;\r\n }\r\n /** @internal */\r\n _setBorderWidth(width) {\r\n this._attributes.borderWidth = width;\r\n }\r\n /** @internal */\r\n _setBorderHeight(height) {\r\n this._attributes.borderHeight = height;\r\n }\r\n /** @internal */\r\n static getAttributeDefinitions() {\r\n return TabNode._attributeDefinitions;\r\n }\r\n}\r\nTabNode.TYPE = \"tab\";\r\n/** @internal */\r\nTabNode._attributeDefinitions = TabNode._createAttributeDefinitions();\r\n\n\n//# sourceURL=webpack://FlexLayout/./src/model/TabNode.ts?");
259
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TabNode\": () => (/* binding */ TabNode)\n/* harmony export */ });\n/* harmony import */ var _Attribute__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Attribute */ \"./src/Attribute.ts\");\n/* harmony import */ var _AttributeDefinitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AttributeDefinitions */ \"./src/AttributeDefinitions.ts\");\n/* harmony import */ var _Node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Node */ \"./src/model/Node.ts\");\n\r\n\r\n\r\nclass TabNode extends _Node__WEBPACK_IMPORTED_MODULE_2__.Node {\r\n /** @internal */\r\n static _fromJson(json, model, addToModel = true) {\r\n const newLayoutNode = new TabNode(model, json, addToModel);\r\n return newLayoutNode;\r\n }\r\n /** @internal */\r\n static _createAttributeDefinitions() {\r\n const attributeDefinitions = new _AttributeDefinitions__WEBPACK_IMPORTED_MODULE_1__.AttributeDefinitions();\r\n attributeDefinitions.add(\"type\", TabNode.TYPE, true).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"id\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"name\", \"[Unnamed Tab]\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"altName\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"helpText\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"component\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.add(\"config\", undefined).setType(\"any\");\r\n attributeDefinitions.add(\"floating\", false).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.add(\"tabsetClassName\", undefined).setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"enableClose\", \"tabEnableClose\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"closeType\", \"tabCloseType\").setType(\"ICloseType\");\r\n attributeDefinitions.addInherited(\"enableDrag\", \"tabEnableDrag\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"enableRename\", \"tabEnableRename\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"className\", \"tabClassName\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"contentClassName\", \"tabContentClassName\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"icon\", \"tabIcon\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.STRING);\r\n attributeDefinitions.addInherited(\"enableRenderOnDemand\", \"tabEnableRenderOnDemand\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"enableFloat\", \"tabEnableFloat\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.BOOLEAN);\r\n attributeDefinitions.addInherited(\"borderWidth\", \"tabBorderWidth\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.NUMBER);\r\n attributeDefinitions.addInherited(\"borderHeight\", \"tabBorderHeight\").setType(_Attribute__WEBPACK_IMPORTED_MODULE_0__.Attribute.NUMBER);\r\n return attributeDefinitions;\r\n }\r\n /** @internal */\r\n constructor(model, json, addToModel = true) {\r\n super(model);\r\n this._extra = {}; // extra data added to node not saved in json\r\n TabNode._attributeDefinitions.fromJson(json, this._attributes);\r\n if (addToModel === true) {\r\n model._addNode(this);\r\n }\r\n }\r\n getWindow() {\r\n return this._window;\r\n }\r\n getTabRect() {\r\n return this._tabRect;\r\n }\r\n /** @internal */\r\n _setTabRect(rect) {\r\n this._tabRect = rect;\r\n }\r\n /** @internal */\r\n _setRenderedName(name) {\r\n this._renderedName = name;\r\n }\r\n /** @internal */\r\n _getNameForOverflowMenu() {\r\n const altName = this._getAttr(\"altName\");\r\n if (altName !== undefined) {\r\n return altName;\r\n }\r\n return this._renderedName;\r\n }\r\n getName() {\r\n return this._getAttr(\"name\");\r\n }\r\n getHelpText() {\r\n return this._getAttr(\"helpText\");\r\n }\r\n getComponent() {\r\n return this._getAttr(\"component\");\r\n }\r\n /**\r\n * Returns the config attribute that can be used to store node specific data that\r\n * WILL be saved to the json. The config attribute should be changed via the action Actions.updateNodeAttributes rather\r\n * than directly, for example:\r\n * this.state.model.doAction(\r\n * FlexLayout.Actions.updateNodeAttributes(node.getId(), {config:myConfigObject}));\r\n */\r\n getConfig() {\r\n return this._attributes.config;\r\n }\r\n /**\r\n * Returns an object that can be used to store transient node specific data that will\r\n * NOT be saved in the json.\r\n */\r\n getExtraData() {\r\n return this._extra;\r\n }\r\n isFloating() {\r\n return this._getAttr(\"floating\");\r\n }\r\n getIcon() {\r\n return this._getAttr(\"icon\");\r\n }\r\n isEnableClose() {\r\n return this._getAttr(\"enableClose\");\r\n }\r\n getCloseType() {\r\n return this._getAttr(\"closeType\");\r\n }\r\n isEnableFloat() {\r\n return this._getAttr(\"enableFloat\");\r\n }\r\n isEnableDrag() {\r\n return this._getAttr(\"enableDrag\");\r\n }\r\n isEnableRename() {\r\n return this._getAttr(\"enableRename\");\r\n }\r\n getClassName() {\r\n return this._getAttr(\"className\");\r\n }\r\n getContentClassName() {\r\n return this._getAttr(\"contentClassName\");\r\n }\r\n getTabSetClassName() {\r\n return this._getAttr(\"tabsetClassName\");\r\n }\r\n isEnableRenderOnDemand() {\r\n return this._getAttr(\"enableRenderOnDemand\");\r\n }\r\n /** @internal */\r\n _setName(name) {\r\n this._attributes.name = name;\r\n if (this._window && this._window.document) {\r\n this._window.document.title = name;\r\n }\r\n }\r\n /** @internal */\r\n _setFloating(float) {\r\n this._attributes.floating = float;\r\n }\r\n /** @internal */\r\n _layout(rect, metrics) {\r\n if (!rect.equals(this._rect)) {\r\n this._fireEvent(\"resize\", { rect });\r\n }\r\n this._rect = rect;\r\n }\r\n /** @internal */\r\n _delete() {\r\n this._parent._remove(this);\r\n this._fireEvent(\"close\", {});\r\n }\r\n toJson() {\r\n const json = {};\r\n TabNode._attributeDefinitions.toJson(json, this._attributes);\r\n return json;\r\n }\r\n /** @internal */\r\n _updateAttrs(json) {\r\n TabNode._attributeDefinitions.update(json, this._attributes);\r\n }\r\n /** @internal */\r\n _getAttributeDefinitions() {\r\n return TabNode._attributeDefinitions;\r\n }\r\n /** @internal */\r\n _setWindow(window) {\r\n this._window = window;\r\n }\r\n /** @internal */\r\n _setBorderWidth(width) {\r\n this._attributes.borderWidth = width;\r\n }\r\n /** @internal */\r\n _setBorderHeight(height) {\r\n this._attributes.borderHeight = height;\r\n }\r\n /** @internal */\r\n static getAttributeDefinitions() {\r\n return TabNode._attributeDefinitions;\r\n }\r\n}\r\nTabNode.TYPE = \"tab\";\r\n/** @internal */\r\nTabNode._attributeDefinitions = TabNode._createAttributeDefinitions();\r\n\n\n//# sourceURL=webpack://FlexLayout/./src/model/TabNode.ts?");
260
260
 
261
261
  /***/ }),
262
262
 
@@ -416,7 +416,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
416
416
  \*****************************/
417
417
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
418
418
 
419
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TabSet\": () => (/* binding */ TabSet)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _I18nLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../I18nLabel */ \"./src/I18nLabel.ts\");\n/* harmony import */ var _model_Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/Actions */ \"./src/model/Actions.ts\");\n/* harmony import */ var _PopupMenu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../PopupMenu */ \"./src/PopupMenu.tsx\");\n/* harmony import */ var _TabButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TabButton */ \"./src/view/TabButton.tsx\");\n/* harmony import */ var _TabOverflowHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TabOverflowHook */ \"./src/view/TabOverflowHook.tsx\");\n/* harmony import */ var _Orientation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Orientation */ \"./src/Orientation.ts\");\n/* harmony import */ var _Types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Types */ \"./src/Types.ts\");\n/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Utils */ \"./src/view/Utils.tsx\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/** @internal */\r\nconst TabSet = (props) => {\r\n const { node, layout, iconFactory, titleFactory, icons, path } = props;\r\n const toolbarRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const overflowbuttonRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const tabbarInnerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const stickyButtonsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const { selfRef, position, userControlledLeft, hiddenTabs, onMouseWheel, tabsTruncated } = (0,_TabOverflowHook__WEBPACK_IMPORTED_MODULE_5__.useTabOverflow)(node, _Orientation__WEBPACK_IMPORTED_MODULE_6__.Orientation.HORZ, toolbarRef, stickyButtonsRef);\r\n const onOverflowClick = (event) => {\r\n const callback = layout.getShowOverflowMenu();\r\n if (callback !== undefined) {\r\n callback(node, event, hiddenTabs, onOverflowItemSelect);\r\n }\r\n else {\r\n const element = overflowbuttonRef.current;\r\n (0,_PopupMenu__WEBPACK_IMPORTED_MODULE_3__.showPopup)(element, hiddenTabs, onOverflowItemSelect, layout, iconFactory, titleFactory);\r\n }\r\n event.stopPropagation();\r\n };\r\n const onOverflowItemSelect = (item) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.selectTab(item.node.getId()));\r\n userControlledLeft.current = false;\r\n };\r\n const onMouseDown = (event) => {\r\n if (!(0,_Utils__WEBPACK_IMPORTED_MODULE_8__.isAuxMouseEvent)(event)) {\r\n let name = node.getName();\r\n if (name === undefined) {\r\n name = \"\";\r\n }\r\n else {\r\n name = \": \" + name;\r\n }\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.setActiveTabset(node.getId()));\r\n if (!layout.getEditingTab()) {\r\n const message = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Move_Tabset, name);\r\n if (node.getModel().getMaximizedTabset() !== undefined) {\r\n layout.dragStart(event, message, node, false, (event2) => undefined, onDoubleClick);\r\n }\r\n else {\r\n layout.dragStart(event, message, node, node.isEnableDrag(), (event2) => undefined, onDoubleClick);\r\n }\r\n }\r\n }\r\n };\r\n const onAuxMouseClick = (event) => {\r\n if ((0,_Utils__WEBPACK_IMPORTED_MODULE_8__.isAuxMouseEvent)(event)) {\r\n layout.auxMouseClick(node, event);\r\n }\r\n };\r\n const onContextMenu = (event) => {\r\n layout.showContextMenu(node, event);\r\n };\r\n const onInterceptMouseDown = (event) => {\r\n event.stopPropagation();\r\n };\r\n const onMaximizeToggle = (event) => {\r\n if (node.canMaximize()) {\r\n layout.maximize(node);\r\n }\r\n event.stopPropagation();\r\n };\r\n const onClose = (event) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.deleteTabset(node.getId()));\r\n event.stopPropagation();\r\n };\r\n const onCloseTab = (event) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.deleteTab(node.getChildren()[0].getId()));\r\n event.stopPropagation();\r\n };\r\n const onFloatTab = (event) => {\r\n if (selectedTabNode !== undefined) {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.floatTab(selectedTabNode.getId()));\r\n }\r\n event.stopPropagation();\r\n };\r\n const onDoubleClick = (event) => {\r\n if (node.canMaximize()) {\r\n layout.maximize(node);\r\n }\r\n };\r\n // Start Render\r\n const cm = layout.getClassName;\r\n // tabbar inner can get shifted left via tab rename, this resets scrollleft to 0\r\n if (tabbarInnerRef.current !== null && tabbarInnerRef.current.scrollLeft !== 0) {\r\n tabbarInnerRef.current.scrollLeft = 0;\r\n }\r\n const selectedTabNode = node.getSelectedNode();\r\n let style = node._styleWithPosition();\r\n if (node.getModel().getMaximizedTabset() !== undefined && !node.isMaximized()) {\r\n (0,_Utils__WEBPACK_IMPORTED_MODULE_8__.hideElement)(style, node.getModel().isUseVisibility());\r\n }\r\n const tabs = [];\r\n if (node.isEnableTabStrip()) {\r\n for (let i = 0; i < node.getChildren().length; i++) {\r\n const child = node.getChildren()[i];\r\n let isSelected = node.getSelected() === i;\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(_TabButton__WEBPACK_IMPORTED_MODULE_4__.TabButton, { layout: layout, node: child, path: path + \"/tb\" + i, key: child.getId(), selected: isSelected, iconFactory: iconFactory, titleFactory: titleFactory, icons: icons }));\r\n if (i < node.getChildren().length - 1) {\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"divider\" + i, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TAB_DIVIDER) }));\r\n }\r\n }\r\n }\r\n const showHeader = node.getName() !== undefined;\r\n let stickyButtons = [];\r\n let buttons = [];\r\n let headerButtons = [];\r\n // allow customization of header contents and buttons\r\n const renderState = { headerContent: node.getName(), stickyButtons, buttons, headerButtons, overflowPosition: undefined };\r\n layout.customizeTabSet(node, renderState);\r\n const headerContent = renderState.headerContent;\r\n stickyButtons = renderState.stickyButtons;\r\n buttons = renderState.buttons;\r\n headerButtons = renderState.headerButtons;\r\n const isTabStretch = node.isEnableSingleTabStretch() && node.getChildren().length === 1;\r\n const showClose = (isTabStretch && (node.getChildren()[0].isEnableClose())) || node.isEnableClose();\r\n if (renderState.overflowPosition === undefined) {\r\n renderState.overflowPosition = stickyButtons.length;\r\n }\r\n if (stickyButtons.length > 0) {\r\n if (tabsTruncated || isTabStretch) {\r\n buttons = [...stickyButtons, ...buttons];\r\n }\r\n else {\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: stickyButtonsRef, key: \"sticky_buttons_container\", onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); }, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER) }, stickyButtons));\r\n }\r\n }\r\n if (hiddenTabs.length > 0) {\r\n const overflowTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Overflow_Menu_Tooltip);\r\n let overflowContent;\r\n if (typeof icons.more === \"function\") {\r\n overflowContent = icons.more(node, hiddenTabs);\r\n }\r\n else {\r\n overflowContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n icons.more,\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT) }, hiddenTabs.length)));\r\n }\r\n buttons.splice(Math.min(renderState.overflowPosition, buttons.length), 0, react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"overflowbutton\", \"data-layout-path\": path + \"/button/overflow\", ref: overflowbuttonRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW), title: overflowTitle, onClick: onOverflowClick, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, overflowContent));\r\n }\r\n if (selectedTabNode !== undefined && layout.isSupportsPopout() && selectedTabNode.isEnableFloat() && !selectedTabNode.isFloating()) {\r\n const floatTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Float_Tab);\r\n buttons.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"float\", \"data-layout-path\": path + \"/button/float\", title: floatTitle, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT), onClick: onFloatTab, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, (typeof icons.popout === \"function\") ? icons.popout(selectedTabNode) : icons.popout));\r\n }\r\n if (node.canMaximize()) {\r\n const minTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Restore);\r\n const maxTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Maximize);\r\n const btns = showHeader ? headerButtons : buttons;\r\n btns.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"max\", \"data-layout-path\": path + \"/button/max\", title: node.isMaximized() ? minTitle : maxTitle, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ + (node.isMaximized() ? \"max\" : \"min\")), onClick: onMaximizeToggle, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, node.isMaximized() ?\r\n (typeof icons.restore === \"function\") ? icons.restore(node) : icons.restore :\r\n (typeof icons.maximize === \"function\") ? icons.maximize(node) : icons.maximize));\r\n }\r\n if (!node.isMaximized() && showClose) {\r\n const title = isTabStretch ? layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Close_Tab) : layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Close_Tabset);\r\n const btns = showHeader ? headerButtons : buttons;\r\n btns.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"close\", \"data-layout-path\": path + \"/button/close\", title: title, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE), onClick: isTabStretch ? onCloseTab : onClose, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, (typeof icons.closeTabset === \"function\") ? icons.closeTabset(node) : icons.closeTabset));\r\n }\r\n const toolbar = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"toolbar\", ref: toolbarRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR), onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); } }, buttons));\r\n let header;\r\n let tabStrip;\r\n let tabStripClasses = cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_OUTER);\r\n if (node.getClassNameTabStrip() !== undefined) {\r\n tabStripClasses += \" \" + node.getClassNameTabStrip();\r\n }\r\n tabStripClasses += \" \" + _Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_OUTER_ + node.getTabLocation();\r\n if (node.isActive() && !showHeader) {\r\n tabStripClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_SELECTED);\r\n }\r\n if (node.isMaximized() && !showHeader) {\r\n tabStripClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);\r\n }\r\n if (showHeader) {\r\n const headerToolbar = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"toolbar\", ref: toolbarRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR), onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); } }, headerButtons));\r\n let tabHeaderClasses = cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_HEADER);\r\n if (node.isActive()) {\r\n tabHeaderClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_SELECTED);\r\n }\r\n if (node.isMaximized()) {\r\n tabHeaderClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);\r\n }\r\n if (node.getClassNameHeader() !== undefined) {\r\n tabHeaderClasses += \" \" + node.getClassNameHeader();\r\n }\r\n header = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: tabHeaderClasses, style: { height: node.getHeaderHeight() + \"px\" }, \"data-layout-path\": path + \"/header\", onMouseDown: onMouseDown, onContextMenu: onContextMenu, onClick: onAuxMouseClick, onAuxClick: onAuxMouseClick, onTouchStart: onMouseDown },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_HEADER_CONTENT) }, headerContent),\r\n headerToolbar));\r\n }\r\n const tabStripStyle = { height: node.getTabStripHeight() + \"px\" };\r\n tabStrip = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: tabStripClasses, style: tabStripStyle, \"data-layout-path\": path + \"/tabstrip\", onMouseDown: onMouseDown, onContextMenu: onContextMenu, onClick: onAuxMouseClick, onAuxClick: onAuxMouseClick, onTouchStart: onMouseDown },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: tabbarInnerRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_ + node.getTabLocation()) },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { style: { left: position, width: (isTabStretch ? \"100%\" : \"10000px\") }, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_ + node.getTabLocation()) }, tabs)),\r\n toolbar));\r\n style = layout.styleFont(style);\r\n var placeHolder = undefined;\r\n if (node.getChildren().length === 0) {\r\n const placeHolderCallback = layout.getTabSetPlaceHolderCallback();\r\n if (placeHolderCallback) {\r\n placeHolder = placeHolderCallback(node);\r\n }\r\n }\r\n const center = react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_CONTENT) }, placeHolder);\r\n var content;\r\n if (node.getTabLocation() === \"top\") {\r\n content = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n header,\r\n tabStrip,\r\n center);\r\n }\r\n else {\r\n content = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n header,\r\n center,\r\n tabStrip);\r\n }\r\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: selfRef, dir: \"ltr\", \"data-layout-path\": path, style: style, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET), onWheel: onMouseWheel }, content));\r\n};\r\n\n\n//# sourceURL=webpack://FlexLayout/./src/view/TabSet.tsx?");
419
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TabSet\": () => (/* binding */ TabSet)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _I18nLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../I18nLabel */ \"./src/I18nLabel.ts\");\n/* harmony import */ var _model_Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/Actions */ \"./src/model/Actions.ts\");\n/* harmony import */ var _PopupMenu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../PopupMenu */ \"./src/PopupMenu.tsx\");\n/* harmony import */ var _TabButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TabButton */ \"./src/view/TabButton.tsx\");\n/* harmony import */ var _TabOverflowHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TabOverflowHook */ \"./src/view/TabOverflowHook.tsx\");\n/* harmony import */ var _Orientation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Orientation */ \"./src/Orientation.ts\");\n/* harmony import */ var _Types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Types */ \"./src/Types.ts\");\n/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Utils */ \"./src/view/Utils.tsx\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/** @internal */\r\nconst TabSet = (props) => {\r\n const { node, layout, iconFactory, titleFactory, icons, path } = props;\r\n const toolbarRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const overflowbuttonRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const tabbarInnerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const stickyButtonsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\r\n const { selfRef, position, userControlledLeft, hiddenTabs, onMouseWheel, tabsTruncated } = (0,_TabOverflowHook__WEBPACK_IMPORTED_MODULE_5__.useTabOverflow)(node, _Orientation__WEBPACK_IMPORTED_MODULE_6__.Orientation.HORZ, toolbarRef, stickyButtonsRef);\r\n const onOverflowClick = (event) => {\r\n const callback = layout.getShowOverflowMenu();\r\n if (callback !== undefined) {\r\n callback(node, event, hiddenTabs, onOverflowItemSelect);\r\n }\r\n else {\r\n const element = overflowbuttonRef.current;\r\n (0,_PopupMenu__WEBPACK_IMPORTED_MODULE_3__.showPopup)(element, hiddenTabs, onOverflowItemSelect, layout, iconFactory, titleFactory);\r\n }\r\n event.stopPropagation();\r\n };\r\n const onOverflowItemSelect = (item) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.selectTab(item.node.getId()));\r\n userControlledLeft.current = false;\r\n };\r\n const onMouseDown = (event) => {\r\n if (!(0,_Utils__WEBPACK_IMPORTED_MODULE_8__.isAuxMouseEvent)(event)) {\r\n let name = node.getName();\r\n if (name === undefined) {\r\n name = \"\";\r\n }\r\n else {\r\n name = \": \" + name;\r\n }\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.setActiveTabset(node.getId()));\r\n if (!layout.getEditingTab()) {\r\n const message = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Move_Tabset, name);\r\n if (node.getModel().getMaximizedTabset() !== undefined) {\r\n layout.dragStart(event, message, node, false, (event2) => undefined, onDoubleClick);\r\n }\r\n else {\r\n layout.dragStart(event, message, node, node.isEnableDrag(), (event2) => undefined, onDoubleClick);\r\n }\r\n }\r\n }\r\n };\r\n const onAuxMouseClick = (event) => {\r\n if ((0,_Utils__WEBPACK_IMPORTED_MODULE_8__.isAuxMouseEvent)(event)) {\r\n layout.auxMouseClick(node, event);\r\n }\r\n };\r\n const onContextMenu = (event) => {\r\n layout.showContextMenu(node, event);\r\n };\r\n const onInterceptMouseDown = (event) => {\r\n event.stopPropagation();\r\n };\r\n const onMaximizeToggle = (event) => {\r\n if (node.canMaximize()) {\r\n layout.maximize(node);\r\n }\r\n event.stopPropagation();\r\n };\r\n const onClose = (event) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.deleteTabset(node.getId()));\r\n event.stopPropagation();\r\n };\r\n const onCloseTab = (event) => {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.deleteTab(node.getChildren()[0].getId()));\r\n event.stopPropagation();\r\n };\r\n const onFloatTab = (event) => {\r\n if (selectedTabNode !== undefined) {\r\n layout.doAction(_model_Actions__WEBPACK_IMPORTED_MODULE_2__.Actions.floatTab(selectedTabNode.getId()));\r\n }\r\n event.stopPropagation();\r\n };\r\n const onDoubleClick = (event) => {\r\n if (node.canMaximize()) {\r\n layout.maximize(node);\r\n }\r\n };\r\n // Start Render\r\n const cm = layout.getClassName;\r\n // tabbar inner can get shifted left via tab rename, this resets scrollleft to 0\r\n if (tabbarInnerRef.current !== null && tabbarInnerRef.current.scrollLeft !== 0) {\r\n tabbarInnerRef.current.scrollLeft = 0;\r\n }\r\n const selectedTabNode = node.getSelectedNode();\r\n let style = node._styleWithPosition();\r\n if (node.getModel().getMaximizedTabset() !== undefined && !node.isMaximized()) {\r\n (0,_Utils__WEBPACK_IMPORTED_MODULE_8__.hideElement)(style, node.getModel().isUseVisibility());\r\n }\r\n const tabs = [];\r\n if (node.isEnableTabStrip()) {\r\n for (let i = 0; i < node.getChildren().length; i++) {\r\n const child = node.getChildren()[i];\r\n let isSelected = node.getSelected() === i;\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(_TabButton__WEBPACK_IMPORTED_MODULE_4__.TabButton, { layout: layout, node: child, path: path + \"/tb\" + i, key: child.getId(), selected: isSelected, iconFactory: iconFactory, titleFactory: titleFactory, icons: icons }));\r\n if (i < node.getChildren().length - 1) {\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"divider\" + i, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TAB_DIVIDER) }));\r\n }\r\n }\r\n }\r\n const showHeader = node.getName() !== undefined;\r\n let stickyButtons = [];\r\n let buttons = [];\r\n let headerButtons = [];\r\n // allow customization of header contents and buttons\r\n const renderState = { headerContent: node.getName(), stickyButtons, buttons, headerButtons, overflowPosition: undefined };\r\n layout.customizeTabSet(node, renderState);\r\n const headerContent = renderState.headerContent;\r\n stickyButtons = renderState.stickyButtons;\r\n buttons = renderState.buttons;\r\n headerButtons = renderState.headerButtons;\r\n const isTabStretch = node.isEnableSingleTabStretch() && node.getChildren().length === 1;\r\n const showClose = (isTabStretch && (node.getChildren()[0].isEnableClose())) || node.isEnableClose();\r\n if (renderState.overflowPosition === undefined) {\r\n renderState.overflowPosition = stickyButtons.length;\r\n }\r\n if (stickyButtons.length > 0) {\r\n if (tabsTruncated || isTabStretch) {\r\n buttons = [...stickyButtons, ...buttons];\r\n }\r\n else {\r\n tabs.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: stickyButtonsRef, key: \"sticky_buttons_container\", onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); }, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER) }, stickyButtons));\r\n }\r\n }\r\n if (hiddenTabs.length > 0) {\r\n const overflowTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Overflow_Menu_Tooltip);\r\n let overflowContent;\r\n if (typeof icons.more === \"function\") {\r\n overflowContent = icons.more(node, hiddenTabs);\r\n }\r\n else {\r\n overflowContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n icons.more,\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT) }, hiddenTabs.length)));\r\n }\r\n buttons.splice(Math.min(renderState.overflowPosition, buttons.length), 0, react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"overflowbutton\", \"data-layout-path\": path + \"/button/overflow\", ref: overflowbuttonRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_BUTTON_OVERFLOW), title: overflowTitle, onClick: onOverflowClick, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, overflowContent));\r\n }\r\n if (selectedTabNode !== undefined && layout.isSupportsPopout() && selectedTabNode.isEnableFloat() && !selectedTabNode.isFloating()) {\r\n const floatTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Float_Tab);\r\n buttons.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"float\", \"data-layout-path\": path + \"/button/float\", title: floatTitle, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT), onClick: onFloatTab, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, (typeof icons.popout === \"function\") ? icons.popout(selectedTabNode) : icons.popout));\r\n }\r\n if (node.canMaximize()) {\r\n const minTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Restore);\r\n const maxTitle = layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Maximize);\r\n const btns = showHeader ? headerButtons : buttons;\r\n btns.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"max\", \"data-layout-path\": path + \"/button/max\", title: node.isMaximized() ? minTitle : maxTitle, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ + (node.isMaximized() ? \"max\" : \"min\")), onClick: onMaximizeToggle, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, node.isMaximized() ?\r\n (typeof icons.restore === \"function\") ? icons.restore(node) : icons.restore :\r\n (typeof icons.maximize === \"function\") ? icons.maximize(node) : icons.maximize));\r\n }\r\n if (!node.isMaximized() && showClose) {\r\n const title = isTabStretch ? layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Close_Tab) : layout.i18nName(_I18nLabel__WEBPACK_IMPORTED_MODULE_1__.I18nLabel.Close_Tabset);\r\n const btns = showHeader ? headerButtons : buttons;\r\n btns.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"button\", { key: \"close\", \"data-layout-path\": path + \"/button/close\", title: title, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE), onClick: isTabStretch ? onCloseTab : onClose, onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown }, (typeof icons.closeTabset === \"function\") ? icons.closeTabset(node) : icons.closeTabset));\r\n }\r\n const toolbar = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"toolbar\", ref: toolbarRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR), onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); } }, buttons));\r\n let header;\r\n let tabStrip;\r\n let tabStripClasses = cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_OUTER);\r\n if (node.getClassNameTabStrip() !== undefined) {\r\n tabStripClasses += \" \" + node.getClassNameTabStrip();\r\n }\r\n tabStripClasses += \" \" + _Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_OUTER_ + node.getTabLocation();\r\n if (node.isActive() && !showHeader) {\r\n tabStripClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_SELECTED);\r\n }\r\n if (node.isMaximized() && !showHeader) {\r\n tabStripClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);\r\n }\r\n if (isTabStretch) {\r\n const tabNode = node.getChildren()[0];\r\n if (tabNode.getTabSetClassName() !== undefined) {\r\n tabStripClasses += \" \" + tabNode.getTabSetClassName();\r\n }\r\n }\r\n if (showHeader) {\r\n const headerToolbar = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { key: \"toolbar\", ref: toolbarRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TAB_TOOLBAR), onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); } }, headerButtons));\r\n let tabHeaderClasses = cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_HEADER);\r\n if (node.isActive()) {\r\n tabHeaderClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_SELECTED);\r\n }\r\n if (node.isMaximized()) {\r\n tabHeaderClasses += \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);\r\n }\r\n if (node.getClassNameHeader() !== undefined) {\r\n tabHeaderClasses += \" \" + node.getClassNameHeader();\r\n }\r\n header = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: tabHeaderClasses, style: { height: node.getHeaderHeight() + \"px\" }, \"data-layout-path\": path + \"/header\", onMouseDown: onMouseDown, onContextMenu: onContextMenu, onClick: onAuxMouseClick, onAuxClick: onAuxMouseClick, onTouchStart: onMouseDown },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_HEADER_CONTENT) }, headerContent),\r\n headerToolbar));\r\n }\r\n const tabStripStyle = { height: node.getTabStripHeight() + \"px\" };\r\n tabStrip = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: tabStripClasses, style: tabStripStyle, \"data-layout-path\": path + \"/tabstrip\", onMouseDown: onMouseDown, onContextMenu: onContextMenu, onClick: onAuxMouseClick, onAuxClick: onAuxMouseClick, onTouchStart: onMouseDown },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: tabbarInnerRef, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_ + node.getTabLocation()) },\r\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { style: { left: position, width: (isTabStretch ? \"100%\" : \"10000px\") }, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER) + \" \" + cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_ + node.getTabLocation()) }, tabs)),\r\n toolbar));\r\n style = layout.styleFont(style);\r\n var placeHolder = undefined;\r\n if (node.getChildren().length === 0) {\r\n const placeHolderCallback = layout.getTabSetPlaceHolderCallback();\r\n if (placeHolderCallback) {\r\n placeHolder = placeHolderCallback(node);\r\n }\r\n }\r\n const center = react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET_CONTENT) }, placeHolder);\r\n var content;\r\n if (node.getTabLocation() === \"top\") {\r\n content = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n header,\r\n tabStrip,\r\n center);\r\n }\r\n else {\r\n content = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\r\n header,\r\n center,\r\n tabStrip);\r\n }\r\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", { ref: selfRef, dir: \"ltr\", \"data-layout-path\": path, style: style, className: cm(_Types__WEBPACK_IMPORTED_MODULE_7__.CLASSES.FLEXLAYOUT__TABSET), onWheel: onMouseWheel }, content));\r\n};\r\n\n\n//# sourceURL=webpack://FlexLayout/./src/view/TabSet.tsx?");
420
420
 
421
421
  /***/ }),
422
422
 
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.FlexLayout=e(require("react"),require("react-dom")):t.FlexLayout=e(t.React,t.ReactDOM)}(self,((t,e)=>(()=>{"use strict";var i={899:e=>{e.exports=t},994:t=>{t.exports=e}},s={};function n(t){var e=s[t];if(void 0!==e)return e.exports;var o=s[t]={exports:{}};return i[t](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{Action:()=>l,Actions:()=>h,BorderNode:()=>R,BorderSet:()=>Z,CLASSES:()=>g,DockLocation:()=>r,DragDrop:()=>d,DropInfo:()=>u,I18nLabel:()=>T,ICloseType:()=>E,Layout:()=>V,Model:()=>j,Node:()=>p,Orientation:()=>i,Rect:()=>s,RowNode:()=>f,SplitterNode:()=>m,TabNode:()=>b,TabSetNode:()=>v});var t=n(899),e=n(994);class i{static flip(t){return t===i.HORZ?i.VERT:i.HORZ}constructor(t){this._name=t}getName(){return this._name}toString(){return this._name}}i.HORZ=new i("horz"),i.VERT=new i("vert");class s{static empty(){return new s(0,0,0,0)}constructor(t,e,i,s){this.x=t,this.y=e,this.width=i,this.height=s}static fromElement(t){let{x:e,y:i,width:n,height:o}=t.getBoundingClientRect();return new s(e,i,n,o)}clone(){return new s(this.x,this.y,this.width,this.height)}equals(t){return this.x===(null==t?void 0:t.x)&&this.y===(null==t?void 0:t.y)&&this.width===(null==t?void 0:t.width)&&this.height===(null==t?void 0:t.height)}getBottom(){return this.y+this.height}getRight(){return this.x+this.width}getCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}positionElement(t,e){this.styleWithPosition(t.style,e)}styleWithPosition(t,e="absolute"){return t.left=this.x+"px",t.top=this.y+"px",t.width=Math.max(0,this.width)+"px",t.height=Math.max(0,this.height)+"px",t.position=e,t}contains(t,e){return this.x<=t&&t<=this.getRight()&&this.y<=e&&e<=this.getBottom()}removeInsets(t){return new s(this.x+t.left,this.y+t.top,Math.max(0,this.width-t.left-t.right),Math.max(0,this.height-t.top-t.bottom))}centerInRect(t){this.x=(t.width-this.width)/2,this.y=(t.height-this.height)/2}_getSize(t){let e=this.width;return t===i.VERT&&(e=this.height),e}toString(){return"(Rect: x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"}}class r{static getByName(t){return r.values[t]}static getLocation(t,e,i){if(e=(e-t.x)/t.width,i=(i-t.y)/t.height,e>=.25&&e<.75&&i>=.25&&i<.75)return r.CENTER;const s=i>=1-e;return i>=e?s?r.BOTTOM:r.LEFT:s?r.RIGHT:r.TOP}constructor(t,e,i){this._name=t,this._orientation=e,this._indexPlus=i,r.values[this._name]=this}getName(){return this._name}getOrientation(){return this._orientation}getDockRect(t){return this===r.TOP?new s(t.x,t.y,t.width,t.height/2):this===r.BOTTOM?new s(t.x,t.getBottom()-t.height/2,t.width,t.height/2):this===r.LEFT?new s(t.x,t.y,t.width/2,t.height):this===r.RIGHT?new s(t.getRight()-t.width/2,t.y,t.width/2,t.height):t.clone()}split(t,e){return this===r.TOP?{start:new s(t.x,t.y,t.width,e),end:new s(t.x,t.y+e,t.width,t.height-e)}:this===r.LEFT?{start:new s(t.x,t.y,e,t.height),end:new s(t.x+e,t.y,t.width-e,t.height)}:this===r.RIGHT?{start:new s(t.getRight()-e,t.y,e,t.height),end:new s(t.x,t.y,t.width-e,t.height)}:{start:new s(t.x,t.getBottom()-e,t.width,e),end:new s(t.x,t.y,t.width,t.height-e)}}reflect(){return this===r.TOP?r.BOTTOM:this===r.LEFT?r.RIGHT:this===r.RIGHT?r.LEFT:r.TOP}toString(){return"(DockLocation: name="+this._name+", orientation="+this._orientation+")"}}r.values={},r.TOP=new r("top",i.VERT,0),r.BOTTOM=new r("bottom",i.VERT,1),r.LEFT=new r("left",i.HORZ,0),r.RIGHT=new r("right",i.HORZ,1),r.CENTER=new r("center",i.VERT,0);const a=!("undefined"==typeof window||!window.document||!window.document.createElement);class d{constructor(){this._manualGlassManagement=!1,this._startX=0,this._startY=0,this._dragDepth=0,this._glassShowing=!1,this._dragging=!1,this._active=!1,a&&(this._glass=document.createElement("div"),this._glass.style.zIndex="998",this._glass.style.backgroundColor="transparent",this._glass.style.outline="none"),this._defaultGlassCursor="default",this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onKeyPress=this._onKeyPress.bind(this),this._onDragCancel=this._onDragCancel.bind(this),this._onDragEnter=this._onDragEnter.bind(this),this._onDragLeave=this._onDragLeave.bind(this),this.resizeGlass=this.resizeGlass.bind(this),this._lastClick=0,this._clickX=0,this._clickY=0}addGlass(t){var e;this._glassShowing?this._manualGlassManagement=!0:(this._document||(this._document=window.document),this._rootElement||(this._rootElement=this._document.body),this.resizeGlass(),null===(e=this._document.defaultView)||void 0===e||e.addEventListener("resize",this.resizeGlass),this._document.body.appendChild(this._glass),this._glass.tabIndex=-1,this._glass.focus(),this._glass.addEventListener("keydown",this._onKeyPress),this._glass.addEventListener("dragenter",this._onDragEnter,{passive:!1}),this._glass.addEventListener("dragover",this._onMouseMove,{passive:!1}),this._glass.addEventListener("dragleave",this._onDragLeave,{passive:!1}),this._glassShowing=!0,this._fDragCancel=t,this._manualGlassManagement=!1)}resizeGlass(){s.fromElement(this._rootElement).positionElement(this._glass,"fixed")}hideGlass(){var t;this._glassShowing&&(this._document.body.removeChild(this._glass),null===(t=this._document.defaultView)||void 0===t||t.removeEventListener("resize",this.resizeGlass),this._glassShowing=!1,this._document=void 0,this._rootElement=void 0,this.setGlassCursorOverride(void 0))}_updateGlassCursor(){var t;this._glass.style.cursor=null!==(t=this._glassCursorOverride)&&void 0!==t?t:this._defaultGlassCursor}_setDefaultGlassCursor(t){this._defaultGlassCursor=t,this._updateGlassCursor()}setGlassCursorOverride(t){this._glassCursorOverride=t,this._updateGlassCursor()}startDrag(t,e,i,s,n,o,r,a,d){if(t&&this._lastEvent&&this._lastEvent.type.startsWith("touch")&&t.type.startsWith("mouse")&&t.timeStamp-this._lastEvent.timeStamp<500)return;if(this._dragging)return;this._lastEvent=t,this._document=a||window.document,this._rootElement=d||this._document.body;const l=this._getLocationEvent(t);this.addGlass(n),t?(this._startX=l.clientX,this._startY=l.clientY,window.matchMedia&&!window.matchMedia("(pointer: fine)").matches||this._setDefaultGlassCursor(getComputedStyle(t.target).cursor),this._stopPropagation(t),this._preventDefault(t)):(this._startX=0,this._startY=0,this._setDefaultGlassCursor("default")),this._dragging=!1,this._fDragStart=e,this._fDragMove=i,this._fDragEnd=s,this._fDragCancel=n,this._fClick=o,this._fDblClick=r,this._active=!0,"dragenter"===(null==t?void 0:t.type)?(this._dragDepth=1,this._rootElement.addEventListener("dragenter",this._onDragEnter,{passive:!1}),this._rootElement.addEventListener("dragover",this._onMouseMove,{passive:!1}),this._rootElement.addEventListener("dragleave",this._onDragLeave,{passive:!1}),this._document.addEventListener("dragend",this._onDragCancel,{passive:!1}),this._document.addEventListener("drop",this._onMouseUp,{passive:!1})):(this._document.addEventListener("mouseup",this._onMouseUp,{passive:!1}),this._document.addEventListener("mousemove",this._onMouseMove,{passive:!1}),this._document.addEventListener("touchend",this._onMouseUp,{passive:!1}),this._document.addEventListener("touchmove",this._onMouseMove,{passive:!1}))}isDragging(){return this._dragging}isActive(){return this._active}toString(){return"(DragDrop: startX="+this._startX+", startY="+this._startY+", dragging="+this._dragging+")"}_onKeyPress(t){"Escape"===t.code&&this._onDragCancel()}_onDragCancel(){this._rootElement.removeEventListener("dragenter",this._onDragEnter),this._rootElement.removeEventListener("dragover",this._onMouseMove),this._rootElement.removeEventListener("dragleave",this._onDragLeave),this._document.removeEventListener("dragend",this._onDragCancel),this._document.removeEventListener("drop",this._onMouseUp),this._document.removeEventListener("mousemove",this._onMouseMove),this._document.removeEventListener("mouseup",this._onMouseUp),this._document.removeEventListener("touchend",this._onMouseUp),this._document.removeEventListener("touchmove",this._onMouseMove),this.hideGlass(),void 0!==this._fDragCancel&&this._fDragCancel(this._dragging),this._dragging=!1,this._active=!1}_getLocationEvent(t){let e=t;return t&&t.touches&&(e=t.touches[0]),e}_getLocationEventEnd(t){let e=t;return t.changedTouches&&(e=t.changedTouches[0]),e}_stopPropagation(t){t.stopPropagation&&t.stopPropagation()}_preventDefault(t){return t.preventDefault&&t.cancelable&&t.preventDefault(),t}_onMouseMove(t){this._lastEvent=t;const e=this._getLocationEvent(t);return this._stopPropagation(t),this._preventDefault(t),!this._dragging&&(Math.abs(this._startX-e.clientX)>5||Math.abs(this._startY-e.clientY)>5)&&(this._dragging=!0,this._fDragStart&&(this._setDefaultGlassCursor("move"),this._dragging=this._fDragStart({clientX:this._startX,clientY:this._startY}))),this._dragging&&this._fDragMove&&this._fDragMove(e),!1}_onMouseUp(t){this._lastEvent=t;const e=this._getLocationEventEnd(t);if(this._stopPropagation(t),this._preventDefault(t),this._active=!1,this._rootElement.removeEventListener("dragenter",this._onDragEnter),this._rootElement.removeEventListener("dragover",this._onMouseMove),this._rootElement.removeEventListener("dragleave",this._onDragLeave),this._document.removeEventListener("dragend",this._onDragCancel),this._document.removeEventListener("drop",this._onMouseUp),this._document.removeEventListener("mousemove",this._onMouseMove),this._document.removeEventListener("mouseup",this._onMouseUp),this._document.removeEventListener("touchend",this._onMouseUp),this._document.removeEventListener("touchmove",this._onMouseMove),this._manualGlassManagement||this.hideGlass(),this._dragging)this._dragging=!1,this._fDragEnd&&this._fDragEnd(t);else if(this._fDragCancel&&this._fDragCancel(this._dragging),Math.abs(this._startX-e.clientX)<=5&&Math.abs(this._startY-e.clientY)<=5){let i=!1;const s=(new Date).getTime();Math.abs(this._clickX-e.clientX)<=5&&Math.abs(this._clickY-e.clientY)<=5&&s-this._lastClick<500&&this._fDblClick&&(this._fDblClick(t),i=!0),!i&&this._fClick&&this._fClick(t),this._lastClick=s,this._clickX=e.clientX,this._clickY=e.clientY}return!1}_onDragEnter(t){return this._preventDefault(t),this._stopPropagation(t),this._dragDepth++,!1}_onDragLeave(t){return this._preventDefault(t),this._stopPropagation(t),this._dragDepth--,this._dragDepth<=0&&this._onDragCancel(),!1}}d.instance=new d;class l{constructor(t,e){this.type=t,this.data=e}}class h{static addNode(t,e,i,s,n){return new l(h.ADD_NODE,{json:t,toNode:e,location:i.getName(),index:s,select:n})}static moveNode(t,e,i,s,n){return new l(h.MOVE_NODE,{fromNode:t,toNode:e,location:i.getName(),index:s,select:n})}static deleteTab(t){return new l(h.DELETE_TAB,{node:t})}static deleteTabset(t){return new l(h.DELETE_TABSET,{node:t})}static renameTab(t,e){return new l(h.RENAME_TAB,{node:t,text:e})}static selectTab(t){return new l(h.SELECT_TAB,{tabNode:t})}static setActiveTabset(t){return new l(h.SET_ACTIVE_TABSET,{tabsetNode:t})}static adjustSplit(t){const e=t.node1Id,i=t.node2Id;return new l(h.ADJUST_SPLIT,{node1:e,weight1:t.weight1,pixelWidth1:t.pixelWidth1,node2:i,weight2:t.weight2,pixelWidth2:t.pixelWidth2})}static adjustBorderSplit(t,e){return new l(h.ADJUST_BORDER_SPLIT,{node:t,pos:e})}static maximizeToggle(t){return new l(h.MAXIMIZE_TOGGLE,{node:t})}static updateModelAttributes(t){return new l(h.UPDATE_MODEL_ATTRIBUTES,{json:t})}static updateNodeAttributes(t,e){return new l(h.UPDATE_NODE_ATTRIBUTES,{node:t,json:e})}static floatTab(t){return new l(h.FLOAT_TAB,{node:t})}static unFloatTab(t){return new l(h.UNFLOAT_TAB,{node:t})}}h.ADD_NODE="FlexLayout_AddNode",h.MOVE_NODE="FlexLayout_MoveNode",h.DELETE_TAB="FlexLayout_DeleteTab",h.DELETE_TABSET="FlexLayout_DeleteTabset",h.RENAME_TAB="FlexLayout_RenameTab",h.SELECT_TAB="FlexLayout_SelectTab",h.SET_ACTIVE_TABSET="FlexLayout_SetActiveTabset",h.ADJUST_SPLIT="FlexLayout_AdjustSplit",h.ADJUST_BORDER_SPLIT="FlexLayout_AdjustBorderSplit",h.MAXIMIZE_TOGGLE="FlexLayout_MaximizeToggle",h.UPDATE_MODEL_ATTRIBUTES="FlexLayout_UpdateModelAttributes",h.UPDATE_NODE_ATTRIBUTES="FlexLayout_UpdateNodeAttributes",h.FLOAT_TAB="FlexLayout_FloatTab",h.UNFLOAT_TAB="FlexLayout_UnFloatTab";class _{constructor(t,e,i,s){this.name=t,this.modelName=e,this.defaultValue=i,this.alwaysWriteJson=s,this.required=!1,this.fixed=!1,this.type="any"}setType(t){return this.type=t,this}setRequired(){return this.required=!0,this}setFixed(){return this.fixed=!0,this}}_.NUMBER="number",_.STRING="string",_.BOOLEAN="boolean";class c{constructor(){this.attributes=[],this.nameToAttribute={}}addWithAll(t,e,i,s){const n=new _(t,e,i,s);return this.attributes.push(n),this.nameToAttribute[t]=n,n}addInherited(t,e){return this.addWithAll(t,e,void 0,!1)}add(t,e,i){return this.addWithAll(t,void 0,e,i)}getAttributes(){return this.attributes}getModelName(t){const e=this.nameToAttribute[t];if(void 0!==e)return e.modelName}toJson(t,e){for(const i of this.attributes){const s=e[i.name];(i.alwaysWriteJson||s!==i.defaultValue)&&(t[i.name]=s)}}fromJson(t,e){for(const i of this.attributes){const s=t[i.name];e[i.name]=void 0===s?i.defaultValue:s}}update(t,e){for(const i of this.attributes)if(t.hasOwnProperty(i.name)){const s=t[i.name];void 0===s?delete e[i.name]:e[i.name]=s}}setDefaults(t){for(const e of this.attributes)t[e.name]=e.defaultValue}toTypescriptInterface(t,e){const i=[],s=this.attributes.sort(((t,e)=>t.name.localeCompare(e.name)));i.push("export interface I"+t+"Attributes {");for(let t=0;t<s.length;t++){const n=s[t];let o,r,a=n.type,d=n;void 0!==d.defaultValue?o=d.defaultValue:void 0!==d.modelName&&void 0!==e&&void 0!==e.nameToAttribute[d.modelName]&&(r=d.modelName,d=e.nameToAttribute[d.modelName],o=d.defaultValue,a=d.type);let l=JSON.stringify(o);const h=d.required||d.fixed?"":"?";if(n.fixed)i.push("\t"+n.name+": "+l+";");else{const t=(void 0!==o?"default: "+l:"")+(void 0!==r?" - inherited from global "+r:"");i.push("\t"+n.name+h+": "+a+";"+(t.length>0?" // "+t:""))}}return i.push("}"),i.join("\n")}}class u{constructor(t,e,i,s,n){this.node=t,this.rect=e,this.location=i,this.index=s,this.className=n}}var g,T,E;!function(t){t.FLEXLAYOUT__BORDER="flexlayout__border",t.FLEXLAYOUT__BORDER_="flexlayout__border_",t.FLEXLAYOUT__BORDER_BUTTON="flexlayout__border_button",t.FLEXLAYOUT__BORDER_BUTTON_="flexlayout__border_button_",t.FLEXLAYOUT__BORDER_BUTTON_CONTENT="flexlayout__border_button_content",t.FLEXLAYOUT__BORDER_BUTTON_LEADING="flexlayout__border_button_leading",t.FLEXLAYOUT__BORDER_BUTTON_TRAILING="flexlayout__border_button_trailing",t.FLEXLAYOUT__BORDER_BUTTON__SELECTED="flexlayout__border_button--selected",t.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED="flexlayout__border_button--unselected",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW="flexlayout__border_toolbar_button_overflow",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_="flexlayout__border_toolbar_button_overflow_",t.FLEXLAYOUT__BORDER_INNER="flexlayout__border_inner",t.FLEXLAYOUT__BORDER_INNER_="flexlayout__border_inner_",t.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER="flexlayout__border_inner_tab_container",t.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_="flexlayout__border_inner_tab_container_",t.FLEXLAYOUT__BORDER_TAB_DIVIDER="flexlayout__border_tab_divider",t.FLEXLAYOUT__BORDER_SIZER="flexlayout__border_sizer",t.FLEXLAYOUT__BORDER_TOOLBAR="flexlayout__border_toolbar",t.FLEXLAYOUT__BORDER_TOOLBAR_="flexlayout__border_toolbar_",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON="flexlayout__border_toolbar_button",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT="flexlayout__border_toolbar_button-float",t.FLEXLAYOUT__DRAG_RECT="flexlayout__drag_rect",t.FLEXLAYOUT__EDGE_RECT="flexlayout__edge_rect",t.FLEXLAYOUT__EDGE_RECT_TOP="flexlayout__edge_rect_top",t.FLEXLAYOUT__EDGE_RECT_LEFT="flexlayout__edge_rect_left",t.FLEXLAYOUT__EDGE_RECT_BOTTOM="flexlayout__edge_rect_bottom",t.FLEXLAYOUT__EDGE_RECT_RIGHT="flexlayout__edge_rect_right",t.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER="flexlayout__error_boundary_container",t.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT="flexlayout__error_boundary_content",t.FLEXLAYOUT__FLOATING_WINDOW_CONTENT="flexlayout__floating_window_content",t.FLEXLAYOUT__FLOATING_WINDOW_TAB="flexlayout__floating_window_tab",t.FLEXLAYOUT__LAYOUT="flexlayout__layout",t.FLEXLAYOUT__OUTLINE_RECT="flexlayout__outline_rect",t.FLEXLAYOUT__OUTLINE_RECT_EDGE="flexlayout__outline_rect_edge",t.FLEXLAYOUT__SPLITTER="flexlayout__splitter",t.FLEXLAYOUT__SPLITTER_EXTRA="flexlayout__splitter_extra",t.FLEXLAYOUT__SPLITTER_="flexlayout__splitter_",t.FLEXLAYOUT__SPLITTER_BORDER="flexlayout__splitter_border",t.FLEXLAYOUT__SPLITTER_DRAG="flexlayout__splitter_drag",t.FLEXLAYOUT__TAB="flexlayout__tab",t.FLEXLAYOUT__TABSET="flexlayout__tabset",t.FLEXLAYOUT__TABSET_HEADER="flexlayout__tabset_header",t.FLEXLAYOUT__TABSET_HEADER_SIZER="flexlayout__tabset_header_sizer",t.FLEXLAYOUT__TABSET_HEADER_CONTENT="flexlayout__tabset_header_content",t.FLEXLAYOUT__TABSET_MAXIMIZED="flexlayout__tabset-maximized",t.FLEXLAYOUT__TABSET_SELECTED="flexlayout__tabset-selected",t.FLEXLAYOUT__TABSET_SIZER="flexlayout__tabset_sizer",t.FLEXLAYOUT__TABSET_TAB_DIVIDER="flexlayout__tabset_tab_divider",t.FLEXLAYOUT__TABSET_CONTENT="flexlayout__tabset_content",t.FLEXLAYOUT__TABSET_TABBAR_INNER="flexlayout__tabset_tabbar_inner",t.FLEXLAYOUT__TABSET_TABBAR_INNER_="flexlayout__tabset_tabbar_inner_",t.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER="flexlayout__tabset_tabbar_inner_tab_container",t.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_="flexlayout__tabset_tabbar_inner_tab_container_",t.FLEXLAYOUT__TABSET_TABBAR_OUTER="flexlayout__tabset_tabbar_outer",t.FLEXLAYOUT__TABSET_TABBAR_OUTER_="flexlayout__tabset_tabbar_outer_",t.FLEXLAYOUT__TAB_BORDER="flexlayout__tab_border",t.FLEXLAYOUT__TAB_BORDER_="flexlayout__tab_border_",t.FLEXLAYOUT__TAB_BUTTON="flexlayout__tab_button",t.FLEXLAYOUT__TAB_BUTTON_STRETCH="flexlayout__tab_button_stretch",t.FLEXLAYOUT__TAB_BUTTON_CONTENT="flexlayout__tab_button_content",t.FLEXLAYOUT__TAB_BUTTON_LEADING="flexlayout__tab_button_leading",t.FLEXLAYOUT__TAB_BUTTON_OVERFLOW="flexlayout__tab_button_overflow",t.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT="flexlayout__tab_button_overflow_count",t.FLEXLAYOUT__TAB_BUTTON_TEXTBOX="flexlayout__tab_button_textbox",t.FLEXLAYOUT__TAB_BUTTON_TRAILING="flexlayout__tab_button_trailing",t.FLEXLAYOUT__TAB_BUTTON_STAMP="flexlayout__tab_button_stamp",t.FLEXLAYOUT__TAB_FLOATING="flexlayout__tab_floating",t.FLEXLAYOUT__TAB_FLOATING_INNER="flexlayout__tab_floating_inner",t.FLEXLAYOUT__TAB_TOOLBAR="flexlayout__tab_toolbar",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON="flexlayout__tab_toolbar_button",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_="flexlayout__tab_toolbar_button-",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT="flexlayout__tab_toolbar_button-float",t.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER="flexlayout__tab_toolbar_sticky_buttons_container",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE="flexlayout__tab_toolbar_button-close",t.FLEXLAYOUT__POPUP_MENU_CONTAINER="flexlayout__popup_menu_container",t.FLEXLAYOUT__POPUP_MENU_ITEM="flexlayout__popup_menu_item",t.FLEXLAYOUT__POPUP_MENU="flexlayout__popup_menu"}(g||(g={}));class p{constructor(t){this._dirty=!1,this._tempSize=0,this._model=t,this._attributes={},this._children=[],this._fixed=!1,this._rect=s.empty(),this._visible=!1,this._listeners={}}getId(){let t=this._attributes.id;return void 0!==t||(t=this._model._nextUniqueId(),this._setId(t)),t}getModel(){return this._model}getType(){return this._attributes.type}getParent(){return this._parent}getChildren(){return this._children}getRect(){return this._rect}isVisible(){return this._visible}getOrientation(){return void 0===this._parent?this._model.isRootOrientationVertical()?i.VERT:i.HORZ:i.flip(this._parent.getOrientation())}setEventListener(t,e){this._listeners[t]=e}removeEventListener(t){delete this._listeners[t]}_setId(t){this._attributes.id=t}_fireEvent(t,e){void 0!==this._listeners[t]&&this._listeners[t](e)}_getAttr(t){let e=this._attributes[t];if(void 0===e){const i=this._getAttributeDefinitions().getModelName(t);void 0!==i&&(e=this._model._getAttribute(i))}return e}_forEachNode(t,e){t(this,e),e++;for(const i of this._children)i._forEachNode(t,e)}_setVisible(t){t!==this._visible&&(this._fireEvent("visibility",{visible:t}),this._visible=t)}_getDrawChildren(){return this._children}_setParent(t){this._parent=t}_setRect(t){this._rect=t}_setWeight(t){this._attributes.weight=t}_setSelected(t){this._attributes.selected=t}_isFixed(){return this._fixed}_layout(t,e){this._rect=t}_findDropTargetNode(t,e,i){let s;if(this._rect.contains(e,i))if(void 0!==this._model.getMaximizedTabset())s=this._model.getMaximizedTabset().canDrop(t,e,i);else if(s=this.canDrop(t,e,i),void 0===s&&0!==this._children.length)for(const n of this._children)if(s=n._findDropTargetNode(t,e,i),void 0!==s)break;return s}canDrop(t,e,i){}_canDockInto(t,e){if(null!=e){if(e.location===r.CENTER&&!1===e.node.isEnableDrop())return!1;if(e.location===r.CENTER&&"tabset"===t.getType()&&void 0!==t.getName())return!1;if(e.location!==r.CENTER&&!1===e.node.isEnableDivide())return!1;if(this._model._getOnAllowDrop())return this._model._getOnAllowDrop()(t,e)}return!0}_removeChild(t){const e=this._children.indexOf(t);return-1!==e&&this._children.splice(e,1),this._dirty=!0,e}_addChild(t,e){return null!=e?this._children.splice(e,0,t):(this._children.push(t),e=this._children.length-1),t._parent=this,this._dirty=!0,e}_removeAll(){this._children=[],this._dirty=!0}_styleWithPosition(t){return null==t&&(t={}),this._rect.styleWithPosition(t)}_getTempSize(){return this._tempSize}_setTempSize(t){this._tempSize=t}isEnableDivide(){return!0}_toAttributeString(){return JSON.stringify(this._attributes,void 0,"\t")}}class m extends p{constructor(t){super(t),this._fixed=!0,this._attributes.type=m.TYPE,t._addNode(this)}getWidth(){return this._model.getSplitterSize()}getMinWidth(){return this.getOrientation()===i.VERT?this._model.getSplitterSize():0}getHeight(){return this._model.getSplitterSize()}getMinHeight(){return this.getOrientation()===i.HORZ?this._model.getSplitterSize():0}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getWeight(){return 0}_setWeight(t){}_getPrefSize(t){return this._model.getSplitterSize()}_updateAttrs(t){}_getAttributeDefinitions(){return new c}toJson(){}}m.TYPE="splitter";class b extends p{static _fromJson(t,e,i=!0){return new b(e,t,i)}static _createAttributeDefinitions(){const t=new c;return t.add("type",b.TYPE,!0).setType(_.STRING),t.add("id",void 0).setType(_.STRING),t.add("name","[Unnamed Tab]").setType(_.STRING),t.add("altName",void 0).setType(_.STRING),t.add("helpText",void 0).setType(_.STRING),t.add("component",void 0).setType(_.STRING),t.add("config",void 0).setType("any"),t.add("floating",!1).setType(_.BOOLEAN),t.addInherited("enableClose","tabEnableClose").setType(_.BOOLEAN),t.addInherited("closeType","tabCloseType").setType("ICloseType"),t.addInherited("enableDrag","tabEnableDrag").setType(_.BOOLEAN),t.addInherited("enableRename","tabEnableRename").setType(_.BOOLEAN),t.addInherited("className","tabClassName").setType(_.STRING),t.addInherited("contentClassName","tabContentClassName").setType(_.STRING),t.addInherited("icon","tabIcon").setType(_.STRING),t.addInherited("enableRenderOnDemand","tabEnableRenderOnDemand").setType(_.BOOLEAN),t.addInherited("enableFloat","tabEnableFloat").setType(_.BOOLEAN),t.addInherited("borderWidth","tabBorderWidth").setType(_.NUMBER),t.addInherited("borderHeight","tabBorderHeight").setType(_.NUMBER),t}constructor(t,e,i=!0){super(t),this._extra={},b._attributeDefinitions.fromJson(e,this._attributes),!0===i&&t._addNode(this)}getWindow(){return this._window}getTabRect(){return this._tabRect}_setTabRect(t){this._tabRect=t}_setRenderedName(t){this._renderedName=t}_getNameForOverflowMenu(){const t=this._getAttr("altName");return void 0!==t?t:this._renderedName}getName(){return this._getAttr("name")}getHelpText(){return this._getAttr("helpText")}getComponent(){return this._getAttr("component")}getConfig(){return this._attributes.config}getExtraData(){return this._extra}isFloating(){return this._getAttr("floating")}getIcon(){return this._getAttr("icon")}isEnableClose(){return this._getAttr("enableClose")}getCloseType(){return this._getAttr("closeType")}isEnableFloat(){return this._getAttr("enableFloat")}isEnableDrag(){return this._getAttr("enableDrag")}isEnableRename(){return this._getAttr("enableRename")}getClassName(){return this._getAttr("className")}getContentClassName(){return this._getAttr("contentClassName")}isEnableRenderOnDemand(){return this._getAttr("enableRenderOnDemand")}_setName(t){this._attributes.name=t,this._window&&this._window.document&&(this._window.document.title=t)}_setFloating(t){this._attributes.floating=t}_layout(t,e){t.equals(this._rect)||this._fireEvent("resize",{rect:t}),this._rect=t}_delete(){this._parent._remove(this),this._fireEvent("close",{})}toJson(){const t={};return b._attributeDefinitions.toJson(t,this._attributes),t}_updateAttrs(t){b._attributeDefinitions.update(t,this._attributes)}_getAttributeDefinitions(){return b._attributeDefinitions}_setWindow(t){this._window=t}_setBorderWidth(t){this._attributes.borderWidth=t}_setBorderHeight(t){this._attributes.borderHeight=t}static getAttributeDefinitions(){return b._attributeDefinitions}}b.TYPE="tab",b._attributeDefinitions=b._createAttributeDefinitions();class f extends p{static _fromJson(t,e){const i=new f(e,t);if(null!=t.children)for(const s of t.children)if(s.type===v.TYPE){const t=v._fromJson(s,e);i._addChild(t)}else{const t=f._fromJson(s,e);i._addChild(t)}return i}static _createAttributeDefinitions(){const t=new c;return t.add("type",f.TYPE,!0).setType(_.STRING).setFixed(),t.add("id",void 0).setType(_.STRING),t.add("weight",100).setType(_.NUMBER),t.add("width",void 0).setType(_.NUMBER),t.add("height",void 0).setType(_.NUMBER),t}constructor(t,e){super(t),this._dirty=!0,this._drawChildren=[],this._minHeight=0,this._minWidth=0,f._attributeDefinitions.fromJson(e,this._attributes),t._addNode(this)}getWeight(){return this._attributes.weight}getWidth(){return this._getAttr("width")}getHeight(){return this._getAttr("height")}_setWeight(t){this._attributes.weight=t}_layout(t,e){super._layout(t,e);const n=this._rect._getSize(this.getOrientation());let o=0,r=0,a=0,d=0;const l=this._getDrawChildren();for(const t of l){const e=t._getPrefSize(this.getOrientation());t._isFixed()?void 0!==e&&(r+=e):void 0===e?o+=t.getWeight():(a+=e,d+=t.getWeight())}let h=!1,_=n-r-a;_<0&&(_=n-r,h=!0,o+=d);let c=0,u=0;for(const t of l){const e=t._getPrefSize(this.getOrientation());if(t._isFixed())void 0!==e&&t._setTempSize(e);else if(null==e||h){if(0===o)t._setTempSize(0);else{const e=t.getMinSize(this.getOrientation()),i=Math.floor(_*(t.getWeight()/o));t._setTempSize(Math.max(e,i))}u+=t._getTempSize()}else t._setTempSize(e);c+=t._getTempSize()}if(u>0){for(;c<n;)for(const t of l)if(!(t instanceof m)){const e=t._getPrefSize(this.getOrientation());!t._isFixed()&&(void 0===e||h)&&c<n&&(t._setTempSize(t._getTempSize()+1),c++)}for(;c>n;){let t=!1;for(const e of l)if(!(e instanceof m)){const i=e.getMinSize(this.getOrientation());e._getTempSize()>i&&c>n&&(e._setTempSize(e._getTempSize()-1),c--,t=!0)}if(!t)break}for(;c>n;){let t=!1;for(const e of l)e instanceof m||e._getTempSize()>0&&c>n&&(e._setTempSize(e._getTempSize()-1),c--,t=!0);if(!t)break}}let g=0;for(const t of l)this.getOrientation()===i.HORZ?t._layout(new s(this._rect.x+g,this._rect.y,t._getTempSize(),this._rect.height),e):t._layout(new s(this._rect.x,this._rect.y+g,this._rect.width,t._getTempSize()),e),g+=t._getTempSize();return!0}_getSplitterBounds(t,e=!1){const s=[0,0],n=this._getDrawChildren(),o=n.indexOf(t),r=n[o-1],a=n[o+1];if(this.getOrientation()===i.HORZ){const i=e?r.getMinWidth():0,n=e?a.getMinWidth():0;s[0]=r.getRect().x+i,s[1]=a.getRect().getRight()-t.getWidth()-n}else{const i=e?r.getMinHeight():0,n=e?a.getMinHeight():0;s[0]=r.getRect().y+i,s[1]=a.getRect().getBottom()-t.getHeight()-n}return s}_calculateSplit(t,e){let i;const s=this._getDrawChildren(),n=s.indexOf(t),o=this._getSplitterBounds(t),r=s[n-1].getWeight()+s[n+1].getWeight(),a=Math.max(0,e-o[0]),d=Math.max(0,o[1]-e);if(a+d>0){const t=a*r/(a+d),e=d*r/(a+d);i={node1Id:s[n-1].getId(),weight1:t,pixelWidth1:a,node2Id:s[n+1].getId(),weight2:e,pixelWidth2:d}}return i}_getDrawChildren(){if(this._dirty){this._drawChildren=[];for(let t=0;t<this._children.length;t++){const e=this._children[t];if(0!==t){const t=new m(this._model);t._setParent(this),this._drawChildren.push(t)}this._drawChildren.push(e)}this._dirty=!1}return this._drawChildren}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getMinWidth(){return this._minWidth}getMinHeight(){return this._minHeight}calcMinSize(){this._minHeight=0,this._minWidth=0;let t=!0;for(const e of this._children){const s=e;s instanceof f&&s.calcMinSize(),this.getOrientation()===i.VERT?(this._minHeight+=s.getMinHeight(),t||(this._minHeight+=this._model.getSplitterSize()),this._minWidth=Math.max(this._minWidth,s.getMinWidth())):(this._minWidth+=s.getMinWidth(),t||(this._minWidth+=this._model.getSplitterSize()),this._minHeight=Math.max(this._minHeight,s.getMinHeight())),t=!1}}_tidy(){let t=0;for(;t<this._children.length;){const e=this._children[t];if(e instanceof f){e._tidy();const i=e.getChildren();if(0===i.length)this._removeChild(e);else if(1===i.length){const s=i[0];if(this._removeChild(e),s instanceof f){let i=0;const n=s.getChildren();for(const t of n)i+=t.getWeight();for(let s=0;s<n.length;s++){const o=n[s];o._setWeight(e.getWeight()*o.getWeight()/i),this._addChild(o,t+s)}}else s._setWeight(e.getWeight()),this._addChild(s,t)}else t++}else e instanceof v&&0===e.getChildren().length&&e.isEnableDeleteWhenEmpty()?(this._removeChild(e),e===this._model.getMaximizedTabset()&&this._model._setMaximizedTabset(void 0)):t++}if(this===this._model.getRoot()&&0===this._children.length){const t=this._model._getOnCreateTabSet();let e=t?t():{};e=Object.assign(Object.assign({},e),{selected:-1});const i=new v(this._model,e);this._model._setActiveTabset(i),this._addChild(i)}}canDrop(t,e,i){const s=i-this._rect.y,n=e-this._rect.x,o=this._rect.width,a=this._rect.height,d=50;let l;if(this._model.isEnableEdgeDock()&&void 0===this._parent){if(e<this._rect.x+10&&s>a/2-d&&s<a/2+d){const t=r.LEFT,e=t.getDockRect(this._rect);e.width=e.width/2,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(e>this._rect.getRight()-10&&s>a/2-d&&s<a/2+d){const t=r.RIGHT,e=t.getDockRect(this._rect);e.width=e.width/2,e.x+=e.width,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(i<this._rect.y+10&&n>o/2-d&&n<o/2+d){const t=r.TOP,e=t.getDockRect(this._rect);e.height=e.height/2,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(i>this._rect.getBottom()-10&&n>o/2-d&&n<o/2+d){const t=r.BOTTOM,e=t.getDockRect(this._rect);e.height=e.height/2,e.y+=e.height,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}if(void 0!==l&&!t._canDockInto(t,l))return}return l}drop(t,e,i){const s=e,n=t.getParent();let o;if(n&&n._removeChild(t),void 0!==n&&n.getType()===v.TYPE&&n._setSelected(0),void 0!==n&&n.getType()===R.TYPE&&n._setSelected(-1),t instanceof v)o=t;else{const e=this._model._getOnCreateTabSet();o=new v(this._model,e?e(t):{}),o._addChild(t)}let a=this._children.reduce(((t,e)=>t+e.getWeight()),0);0===a&&(a=100),o._setWeight(a/3);const d=!this._model.isRootOrientationVertical();if(d&&s===r.LEFT||!d&&s===r.TOP)this._addChild(o,0);else if(d&&s===r.RIGHT||!d&&s===r.BOTTOM)this._addChild(o);else if(d&&s===r.TOP||!d&&s===r.LEFT){const t=new f(this._model,{}),e=new f(this._model,{});e._setWeight(75),o._setWeight(25);for(const t of this._children)e._addChild(t);this._removeAll(),t._addChild(o),t._addChild(e),this._addChild(t)}else if(d&&s===r.BOTTOM||!d&&s===r.RIGHT){const t=new f(this._model,{}),e=new f(this._model,{});e._setWeight(75),o._setWeight(25);for(const t of this._children)e._addChild(t);this._removeAll(),t._addChild(e),t._addChild(o),this._addChild(t)}this._model._setActiveTabset(o),this._model._tidy()}toJson(){const t={};f._attributeDefinitions.toJson(t,this._attributes),t.children=[];for(const e of this._children)t.children.push(e.toJson());return t}isEnableDrop(){return!0}_getPrefSize(t){let e=this.getWidth();return t===i.VERT&&(e=this.getHeight()),e}_getAttributeDefinitions(){return f._attributeDefinitions}_updateAttrs(t){f._attributeDefinitions.update(t,this._attributes)}static getAttributeDefinitions(){return f._attributeDefinitions}}f.TYPE="row",f._attributeDefinitions=f._createAttributeDefinitions();class v extends p{static _fromJson(t,e){const i=new v(e,t);if(null!=t.children)for(const s of t.children){const t=b._fromJson(s,e);i._addChild(t)}return 0===i._children.length&&i._setSelected(-1),t.maximized&&!0===t.maximized&&e._setMaximizedTabset(i),t.active&&!0===t.active&&e._setActiveTabset(i),i}static _createAttributeDefinitions(){const t=new c;return t.add("type",v.TYPE,!0).setType(_.STRING).setFixed(),t.add("id",void 0).setType(_.STRING),t.add("weight",100).setType(_.NUMBER),t.add("width",void 0).setType(_.NUMBER),t.add("height",void 0).setType(_.NUMBER),t.add("selected",0).setType(_.NUMBER),t.add("name",void 0).setType(_.STRING),t.add("config",void 0).setType("any"),t.addInherited("enableDeleteWhenEmpty","tabSetEnableDeleteWhenEmpty"),t.addInherited("enableDrop","tabSetEnableDrop"),t.addInherited("enableDrag","tabSetEnableDrag"),t.addInherited("enableDivide","tabSetEnableDivide"),t.addInherited("enableMaximize","tabSetEnableMaximize"),t.addInherited("enableClose","tabSetEnableClose"),t.addInherited("enableSingleTabStretch","tabSetEnableSingleTabStretch"),t.addInherited("classNameTabStrip","tabSetClassNameTabStrip"),t.addInherited("classNameHeader","tabSetClassNameHeader"),t.addInherited("enableTabStrip","tabSetEnableTabStrip"),t.addInherited("borderInsets","tabSetBorderInsets"),t.addInherited("marginInsets","tabSetMarginInsets"),t.addInherited("minWidth","tabSetMinWidth"),t.addInherited("minHeight","tabSetMinHeight"),t.addInherited("headerHeight","tabSetHeaderHeight"),t.addInherited("tabStripHeight","tabSetTabStripHeight"),t.addInherited("tabLocation","tabSetTabLocation"),t.addInherited("autoSelectTab","tabSetAutoSelectTab").setType(_.BOOLEAN),t}constructor(t,e){super(t),v._attributeDefinitions.fromJson(e,this._attributes),t._addNode(this),this._calculatedTabBarHeight=0,this._calculatedHeaderBarHeight=0}getName(){return this._getAttr("name")}getSelected(){const t=this._attributes.selected;return void 0!==t?t:-1}getSelectedNode(){const t=this.getSelected();if(-1!==t)return this._children[t]}getWeight(){return this._getAttr("weight")}getWidth(){return this._getAttr("width")}getMinWidth(){return this._getAttr("minWidth")}getHeight(){return this._getAttr("height")}getMinHeight(){return this._getAttr("minHeight")}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getConfig(){return this._attributes.config}isMaximized(){return this._model.getMaximizedTabset()===this}isActive(){return this._model.getActiveTabset()===this}isEnableDeleteWhenEmpty(){return this._getAttr("enableDeleteWhenEmpty")}isEnableDrop(){return this._getAttr("enableDrop")}isEnableDrag(){return this._getAttr("enableDrag")}isEnableDivide(){return this._getAttr("enableDivide")}isEnableMaximize(){return this._getAttr("enableMaximize")}isEnableClose(){return this._getAttr("enableClose")}isEnableSingleTabStretch(){return this._getAttr("enableSingleTabStretch")}canMaximize(){return!!this.isEnableMaximize()&&(this.getModel().getMaximizedTabset()===this||this.getParent()!==this.getModel().getRoot()||1!==this.getModel().getRoot().getChildren().length)}isEnableTabStrip(){return this._getAttr("enableTabStrip")}isAutoSelectTab(){return this._getAttr("autoSelectTab")}getClassNameTabStrip(){return this._getAttr("classNameTabStrip")}getClassNameHeader(){return this._getAttr("classNameHeader")}calculateHeaderBarHeight(t){const e=this._getAttr("headerHeight");this._calculatedHeaderBarHeight=0!==e?e:t.headerBarSize}calculateTabBarHeight(t){const e=this._getAttr("tabStripHeight");this._calculatedTabBarHeight=0!==e?e:t.tabBarSize}getHeaderHeight(){return this._calculatedHeaderBarHeight}getTabStripHeight(){return this._calculatedTabBarHeight}getTabLocation(){return this._getAttr("tabLocation")}_setWeight(t){this._attributes.weight=t}_setSelected(t){this._attributes.selected=t}canDrop(t,e,i){let n;if(t===this){const t=r.CENTER,e=this._tabHeaderRect;n=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT)}else if(this._contentRect.contains(e,i)){let t=r.CENTER;void 0===this._model.getMaximizedTabset()&&(t=r.getLocation(this._contentRect,e,i));const s=t.getDockRect(this._rect);n=new u(this,s,t,-1,g.FLEXLAYOUT__OUTLINE_RECT)}else if(null!=this._tabHeaderRect&&this._tabHeaderRect.contains(e,i)){let t,i,o;if(0===this._children.length)t=this._tabHeaderRect.clone(),i=t.y+3,o=t.height-4,t.width=2;else{let a=this._children[0];t=a.getTabRect(),i=t.y,o=t.height;let d=this._tabHeaderRect.x,l=0;for(let h=0;h<this._children.length;h++){if(a=this._children[h],t=a.getTabRect(),l=t.x+t.width/2,e>=d&&e<l){const e=r.CENTER,a=new s(t.x-2,i,3,o);n=new u(this,a,e,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}}if(null==n){const e=r.CENTER,a=new s(t.getRight()-2,i,3,o);n=new u(this,a,e,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}if(t._canDockInto(t,n))return n}_layout(t,e){this.calculateHeaderBarHeight(e),this.calculateTabBarHeight(e),this.isMaximized()&&(t=this._model.getRoot().getRect()),t=t.removeInsets(this._getAttr("marginInsets")),this._rect=t,t=t.removeInsets(this._getAttr("borderInsets"));let i=0,n=0;void 0!==this.getName()&&(i+=this._calculatedHeaderBarHeight,n+=this._calculatedHeaderBarHeight),this.isEnableTabStrip()&&("top"===this.getTabLocation()?this._tabHeaderRect=new s(t.x,t.y+i,t.width,this._calculatedTabBarHeight):this._tabHeaderRect=new s(t.x,t.y+t.height-this._calculatedTabBarHeight,t.width,this._calculatedTabBarHeight),n+=this._calculatedTabBarHeight,"top"===this.getTabLocation()&&(i+=this._calculatedTabBarHeight)),this._contentRect=new s(t.x,t.y+i,t.width,t.height-n);for(let t=0;t<this._children.length;t++){const i=this._children[t];i._layout(this._contentRect,e),i._setVisible(t===this.getSelected())}}_delete(){this._parent._removeChild(this)}_remove(t){const e=this._removeChild(t);this._model._tidy(),O(this,e)}drop(t,e,i,s){const n=e;if(this===t)return;let o=t.getParent(),a=0;if(void 0!==o&&(a=o._removeChild(t),o instanceof R&&o.getSelected()===a?o._setSelected(-1):O(o,a)),t.getType()===b.TYPE&&o===this&&a<i&&i>0&&i--,n===r.CENTER){let e=i;if(-1===e&&(e=this._children.length),t.getType()===b.TYPE)this._addChild(t,e),(s||!1!==s&&this.isAutoSelectTab())&&this._setSelected(e);else{for(let i=0;i<t.getChildren().length;i++){const s=t.getChildren()[i];this._addChild(s,e),e++}-1===this.getSelected()&&this._children.length>0&&this._setSelected(0)}this._model._setActiveTabset(this)}else{let e;if(t instanceof b){const i=this._model._getOnCreateTabSet();e=new v(this._model,i?i(t):{}),e._addChild(t),o=e}else e=t;const i=this._parent,s=i.getChildren().indexOf(this);if(i.getOrientation()===n._orientation)e._setWeight(this.getWeight()/2),this._setWeight(this.getWeight()/2),i._addChild(e,s+n._indexPlus);else{const t=new f(this._model,{});t._setWeight(this.getWeight()),t._addChild(this),this._setWeight(50),e._setWeight(50),t._addChild(e,n._indexPlus),i._removeChild(this),i._addChild(t,s)}this._model._setActiveTabset(e)}this._model._tidy()}toJson(){const t={};return v._attributeDefinitions.toJson(t,this._attributes),t.children=this._children.map((t=>t.toJson())),this.isActive()&&(t.active=!0),this.isMaximized()&&(t.maximized=!0),t}_updateAttrs(t){v._attributeDefinitions.update(t,this._attributes)}_getAttributeDefinitions(){return v._attributeDefinitions}_getPrefSize(t){let e=this.getWidth();return t===i.VERT&&(e=this.getHeight()),e}static getAttributeDefinitions(){return v._attributeDefinitions}}function O(t,e){if(void 0!==t&&(t.getType()===v.TYPE||t.getType()===R.TYPE)){const i=t.getSelected();-1!==i&&(e===i&&t.getChildren().length>0?e>=t.getChildren().length&&t._setSelected(t.getChildren().length-1):e<i?t._setSelected(i-1):e>i||t._setSelected(-1))}}v.TYPE="tabset",v._attributeDefinitions=v._createAttributeDefinitions();class R extends p{static _fromJson(t,e){const i=r.getByName(t.location),s=new R(i,t,e);return t.children&&(s._children=t.children.map((t=>{const i=b._fromJson(t,e);return i._setParent(s),i}))),s}static _createAttributeDefinitions(){const t=new c;return t.add("type",R.TYPE,!0).setType(_.STRING).setFixed(),t.add("selected",-1).setType(_.NUMBER),t.add("show",!0).setType(_.BOOLEAN),t.add("config",void 0).setType("any"),t.addInherited("barSize","borderBarSize").setType(_.NUMBER),t.addInherited("enableDrop","borderEnableDrop").setType(_.BOOLEAN),t.addInherited("className","borderClassName").setType(_.STRING),t.addInherited("autoSelectTabWhenOpen","borderAutoSelectTabWhenOpen").setType(_.BOOLEAN),t.addInherited("autoSelectTabWhenClosed","borderAutoSelectTabWhenClosed").setType(_.BOOLEAN),t.addInherited("size","borderSize").setType(_.NUMBER),t.addInherited("minSize","borderMinSize").setType(_.NUMBER),t.addInherited("enableAutoHide","borderEnableAutoHide").setType(_.BOOLEAN),t}constructor(t,e,i){super(i),this._adjustedSize=0,this._calculatedBorderBarSize=0,this._location=t,this._drawChildren=[],this._attributes.id=`border_${t.getName()}`,R._attributeDefinitions.fromJson(e,this._attributes),i._addNode(this)}getLocation(){return this._location}getTabHeaderRect(){return this._tabHeaderRect}getRect(){return this._tabHeaderRect}getContentRect(){return this._contentRect}isEnableDrop(){return this._getAttr("enableDrop")}isAutoSelectTab(t){return null==t&&(t=-1!==this.getSelected()),t?this._getAttr("autoSelectTabWhenOpen"):this._getAttr("autoSelectTabWhenClosed")}getClassName(){return this._getAttr("className")}calcBorderBarSize(t){const e=this._getAttr("barSize");this._calculatedBorderBarSize=0!==e?e:t.borderBarSize}getBorderBarSize(){return this._calculatedBorderBarSize}getSize(){const t=this._getAttr("size"),e=this.getSelected();if(-1===e)return t;{const s=this._children[e],n=this._location._orientation===i.HORZ?s._getAttr("borderWidth"):s._getAttr("borderHeight");return-1===n?t:n}}getMinSize(){return this._getAttr("minSize")}getSelected(){return this._attributes.selected}getSelectedNode(){if(-1!==this.getSelected())return this._children[this.getSelected()]}getOrientation(){return this._location.getOrientation()}getConfig(){return this._attributes.config}isMaximized(){return!1}isShowing(){return!(!this._attributes.show||this._model._getShowHiddenBorder()!==this._location&&this.isAutoHide()&&0===this._children.length)}isAutoHide(){return this._getAttr("enableAutoHide")}_setSelected(t){this._attributes.selected=t}_setSize(t){const e=this.getSelected();if(-1===e)this._attributes.size=t;else{const s=this._children[e];-1===(this._location._orientation===i.HORZ?s._getAttr("borderWidth"):s._getAttr("borderHeight"))?this._attributes.size=t:this._location._orientation===i.HORZ?s._setBorderWidth(t):s._setBorderHeight(t)}}_updateAttrs(t){R._attributeDefinitions.update(t,this._attributes)}_getDrawChildren(){return this._drawChildren}_setAdjustedSize(t){this._adjustedSize=t}_getAdjustedSize(){return this._adjustedSize}_layoutBorderOuter(t,e){this.calcBorderBarSize(e);const i=this._location.split(t,this.getBorderBarSize());return this._tabHeaderRect=i.start,i.end}_layoutBorderInner(t,e){this._drawChildren=[];const i=this._location,s=i.split(t,this._adjustedSize+this._model.getSplitterSize()),n=i.reflect().split(s.start,this._model.getSplitterSize());this._contentRect=n.end;for(let t=0;t<this._children.length;t++){const i=this._children[t];i._layout(this._contentRect,e),i._setVisible(t===this.getSelected()),this._drawChildren.push(i)}if(-1===this.getSelected())return t;{const t=new m(this._model);return t._setParent(this),t._setRect(n.start),this._drawChildren.push(t),s.end}}_remove(t){const e=this._removeChild(t);-1!==this.getSelected()&&O(this,e)}canDrop(t,e,n){if(t.getType()!==b.TYPE)return;let o;const a=r.CENTER;if(this._tabHeaderRect.contains(e,n)){if(this._location._orientation===i.VERT)if(this._children.length>0){let t=this._children[0],i=t.getTabRect();const n=i.y,r=i.height;let d=this._tabHeaderRect.x,l=0;for(let h=0;h<this._children.length;h++){if(t=this._children[h],i=t.getTabRect(),l=i.x+i.width/2,e>=d&&e<l){const t=new s(i.x-2,n,3,r);o=new u(this,t,a,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}if(null==o){const t=new s(i.getRight()-2,n,3,r);o=new u(this,t,a,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}else{const t=new s(this._tabHeaderRect.x+1,this._tabHeaderRect.y+2,3,18);o=new u(this,t,a,0,g.FLEXLAYOUT__OUTLINE_RECT)}else if(this._children.length>0){let t=this._children[0],e=t.getTabRect();const i=e.x,r=e.width;let d=this._tabHeaderRect.y,l=0;for(let h=0;h<this._children.length;h++){if(t=this._children[h],e=t.getTabRect(),l=e.y+e.height/2,n>=d&&n<l){const t=new s(i,e.y-2,r,3);o=new u(this,t,a,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}if(null==o){const t=new s(i,e.getBottom()-2,r,3);o=new u(this,t,a,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}else{const t=new s(this._tabHeaderRect.x+2,this._tabHeaderRect.y+1,18,3);o=new u(this,t,a,0,g.FLEXLAYOUT__OUTLINE_RECT)}if(!t._canDockInto(t,o))return}else if(-1!==this.getSelected()&&this._contentRect.contains(e,n)){const e=this._contentRect;if(o=new u(this,e,a,-1,g.FLEXLAYOUT__OUTLINE_RECT),!t._canDockInto(t,o))return}return o}drop(t,e,i,s){let n=0;const o=t.getParent();void 0!==o&&(n=o._removeChild(t),o!==this&&o instanceof R&&o.getSelected()===n?o._setSelected(-1):O(o,n)),t.getType()===b.TYPE&&o===this&&n<i&&i>0&&i--;let r=i;-1===r&&(r=this._children.length),t.getType()===b.TYPE&&this._addChild(t,r),(s||!1!==s&&this.isAutoSelectTab())&&this._setSelected(r),this._model._tidy()}toJson(){const t={};return R._attributeDefinitions.toJson(t,this._attributes),t.location=this._location.getName(),t.children=this._children.map((t=>t.toJson())),t}_getSplitterBounds(t,e=!1){const i=[0,0],s=e?this.getMinSize():0,n=this._model._getOuterInnerRects().outer,o=this._model._getOuterInnerRects().inner,a=this._model.getRoot();return this._location===r.TOP?(i[0]=n.y+s,i[1]=Math.max(i[0],o.getBottom()-t.getHeight()-a.getMinHeight())):this._location===r.LEFT?(i[0]=n.x+s,i[1]=Math.max(i[0],o.getRight()-t.getWidth()-a.getMinWidth())):this._location===r.BOTTOM?(i[1]=n.getBottom()-t.getHeight()-s,i[0]=Math.min(i[1],o.y+a.getMinHeight())):this._location===r.RIGHT&&(i[1]=n.getRight()-t.getWidth()-s,i[0]=Math.min(i[1],o.x+a.getMinWidth())),i}_calculateSplit(t,e){const i=this._getSplitterBounds(t);return this._location===r.BOTTOM||this._location===r.RIGHT?Math.max(0,i[1]-e):Math.max(0,e-i[0])}_getAttributeDefinitions(){return R._attributeDefinitions}static getAttributeDefinitions(){return R._attributeDefinitions}}function A(e,i,s,n,o){let r=s?s(i):void 0,a=i.getName(),d=i.getName();if(void 0===o&&(o=0),void 0!==n){const t=n(i);void 0!==t&&("string"==typeof t?(a=t,d=t):void 0!==t.titleContent?(a=t.titleContent,d=t.name):a=t)}void 0===r&&void 0!==i.getIcon()&&(r=0!==o?t.createElement("img",{style:{width:"1em",height:"1em",transform:"rotate("+o+"deg)"},src:i.getIcon(),alt:"leadingContent"}):t.createElement("img",{style:{width:"1em",height:"1em"},src:i.getIcon(),alt:"leadingContent"}));const l={leading:r,content:a,name:d,buttons:[]};return e.customizeTab(i,l),i._setRenderedName(l.name),l}function L(t,e){e?t.visibility="hidden":t.display="none"}function y(t){let e=!1;return t.nativeEvent instanceof MouseEvent&&(0!==t.nativeEvent.button||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(e=!0),e}R.TYPE="border",R._attributeDefinitions=R._createAttributeDefinitions(),function(t){t.Close_Tab="Close",t.Close_Tabset="Close tabset",t.Move_Tab="Move: ",t.Move_Tabset="Move tabset",t.Maximize="Maximize tabset",t.Restore="Restore tabset",t.Float_Tab="Show selected tab in floating window",t.Overflow_Menu_Tooltip="Hidden tabs",t.Floating_Window_Message="This panel is shown in a floating window",t.Floating_Window_Show_Window="Show window",t.Floating_Window_Dock_Window="Dock window",t.Error_rendering_component="Error rendering component"}(T||(T={})),function(t){t[t.Visible=1]="Visible",t[t.Always=2]="Always",t[t.Selected=3]="Selected"}(E||(E={}));const N=e=>{const{layout:i,node:n,selected:o,border:r,iconFactory:a,titleFactory:d,icons:l,path:_}=e,c=t.useRef(null),u=t.useRef(null),p=t=>{y(t)||i.getEditingTab()||i.dragStart(t,void 0,n,n.isEnableDrag(),b,f)},m=t=>{y(t)&&i.auxMouseClick(n,t)},b=()=>{i.doAction(h.selectTab(n.getId()))},f=t=>{},v=t=>{(()=>{const t=n.getCloseType();return!!(o||t===E.Always||t===E.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?i.doAction(h.deleteTab(n.getId())):b()},O=t=>{t.stopPropagation()};t.useLayoutEffect((()=>{R(),i.getEditingTab()===n&&u.current.select()}));const R=()=>{var t;const e=i.getDomRect(),o=null===(t=c.current)||void 0===t?void 0:t.getBoundingClientRect();o&&e&&n._setTabRect(new s(o.left-e.left,o.top-e.top,o.width,o.height))},L=t=>{t.stopPropagation()},N=i.getClassName;let S=N(g.FLEXLAYOUT__BORDER_BUTTON)+" "+N(g.FLEXLAYOUT__BORDER_BUTTON_+r);S+=o?" "+N(g.FLEXLAYOUT__BORDER_BUTTON__SELECTED):" "+N(g.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED),void 0!==n.getClassName()&&(S+=" "+n.getClassName());let D=0;!1===n.getModel().isEnableRotateBorderIcons()&&("left"===r?D=90:"right"===r&&(D=-90));const B=A(i,n,a,d,D);let w=B.content?t.createElement("div",{className:N(g.FLEXLAYOUT__BORDER_BUTTON_CONTENT)},B.content):null;const C=B.leading?t.createElement("div",{className:N(g.FLEXLAYOUT__BORDER_BUTTON_LEADING)},B.leading):null;if(i.getEditingTab()===n&&(w=t.createElement("input",{ref:u,className:N(g.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":_+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:t=>{"Escape"===t.code?i.setEditingTab(void 0):"Enter"===t.code&&(i.setEditingTab(void 0),i.doAction(h.renameTab(n.getId(),t.target.value)))},onMouseDown:L,onTouchStart:L})),n.isEnableClose()){const e=i.i18nName(T.Close_Tab);B.buttons.push(t.createElement("div",{key:"close","data-layout-path":_+"/button/close",title:e,className:N(g.FLEXLAYOUT__BORDER_BUTTON_TRAILING),onMouseDown:O,onClick:v,onTouchStart:O},"function"==typeof l.close?l.close(n):l.close))}return t.createElement("div",{ref:c,"data-layout-path":_,className:S,onMouseDown:p,onClick:m,onAuxClick:m,onContextMenu:t=>{i.showContextMenu(n,t)},onTouchStart:p,title:n.getHelpText()},C,w,B.buttons)},S=e=>{const{layout:i,node:s,iconFactory:n,titleFactory:o}=e,r=t.useRef(null),a=i.getClassName;let d=a(g.FLEXLAYOUT__TAB_BUTTON_STAMP);const l=A(i,s,n,o);let h=l.content?t.createElement("div",{className:a(g.FLEXLAYOUT__TAB_BUTTON_CONTENT)},l.content):s._getNameForOverflowMenu();const _=l.leading?t.createElement("div",{className:a(g.FLEXLAYOUT__TAB_BUTTON_LEADING)},l.leading):null;return t.createElement("div",{ref:r,className:d,title:s.getHelpText()},_,h)};function D(e,i,s,n,o,r){var a;const l=n.getRootDiv(),h=n.getClassName,_=e.ownerDocument,c=e.getBoundingClientRect(),u=null!==(a=null==l?void 0:l.getBoundingClientRect())&&void 0!==a?a:new DOMRect(0,0,100,100),T=_.createElement("div");T.className=h(g.FLEXLAYOUT__POPUP_MENU_CONTAINER),c.left<u.left+u.width/2?T.style.left=c.left-u.left+"px":T.style.right=u.right-c.right+"px",c.top<u.top+u.height/2?T.style.top=c.top-u.top+"px":T.style.bottom=u.bottom-c.bottom+"px",d.instance.addGlass((()=>E())),d.instance.setGlassCursorOverride("default"),l&&l.appendChild(T);const E=()=>{n.hidePortal(),d.instance.hideGlass(),l&&l.removeChild(T),T.removeEventListener("mousedown",p),_.removeEventListener("mousedown",m)},p=t=>{t.stopPropagation()},m=t=>{E()};T.addEventListener("mousedown",p),_.addEventListener("mousedown",m),n.showPortal(t.createElement(B,{currentDocument:_,onSelect:s,onHide:E,items:i,classNameMapper:h,layout:n,iconFactory:o,titleFactory:r}),T)}const B=e=>{const{items:i,onHide:s,onSelect:n,classNameMapper:o,layout:r,iconFactory:a,titleFactory:d}=e,l=i.map(((e,i)=>t.createElement("div",{key:e.index,className:o(g.FLEXLAYOUT__POPUP_MENU_ITEM),"data-layout-path":"/popup-menu/tb"+i,onClick:t=>((t,e)=>{n(t),s(),e.stopPropagation()})(e,t),title:e.node.getHelpText()},e.node.getModel().isLegacyOverflowMenu()?e.node._getNameForOverflowMenu():t.createElement(S,{node:e.node,layout:r,iconFactory:a,titleFactory:d}))));return t.createElement("div",{className:o(g.FLEXLAYOUT__POPUP_MENU),"data-layout-path":"/popup-menu"},l)},w=(e,n,o,r)=>{const a=t.useRef(!0),d=t.useRef(!1),l=t.useRef(new s(0,0,0,0)),h=t.useRef(null),[_,c]=t.useState(0),u=t.useRef(!1),[g,T]=t.useState([]),E=t.useRef(0);t.useLayoutEffect((()=>{u.current=!1}),[e.getSelectedNode(),e.getRect().width,e.getRect().height]),t.useLayoutEffect((()=>{R()}));const p=h.current;t.useEffect((()=>{if(p)return p.addEventListener("wheel",m,{passive:!1}),()=>{p.removeEventListener("wheel",m)}}),[p]);const m=t=>{t.preventDefault()},b=t=>n===i.HORZ?t.x:t.y,f=t=>n===i.HORZ?t.getRight():t.getBottom(),O=t=>n===i.HORZ?t.width:t.height,R=()=>{!0===a.current&&(d.current=!1);const t=e instanceof v?e.getRect():e.getTabHeaderRect();let i=e.getChildren()[e.getChildren().length-1];const s=null===r.current?0:O(r.current.getBoundingClientRect());if(!0===a.current||0===E.current&&0!==g.length||t.width!==l.current.width||t.height!==l.current.height){E.current=g.length,l.current=t;const n=!(e instanceof v)||!0===e.isEnableTabStrip();let r=f(t)-s;if(null!==o.current&&(r-=O(o.current.getBoundingClientRect())),n&&e.getChildren().length>0){if(0===g.length&&0===_&&f(i.getTabRect())+2<r)return;let s=0;const n=e.getSelectedNode();if(n&&!u.current){const e=n.getTabRect(),i=b(e)-2,o=f(e)+2;O(e)+4>=r-b(t)?s=b(t)-i:(o>r||i<b(t))&&(i<b(t)&&(s=b(t)-i),o+s>r&&(s=r-o))}const o=Math.max(0,r-(f(i.getTabRect())+2+s)),l=Math.min(0,_+s+o),h=l-_,E=[];for(let i=0;i<e.getChildren().length;i++){const s=e.getChildren()[i];(b(s.getTabRect())+h<b(t)||f(s.getTabRect())+h>r)&&E.push({node:s,index:i})}E.length>0&&(d.current=!0),a.current=!1,T(E),c(l)}}else a.current=!0};return{selfRef:h,position:_,userControlledLeft:u,hiddenTabs:g,onMouseWheel:t=>{let e=0;e=Math.abs(t.deltaX)>Math.abs(t.deltaY)?-t.deltaX:-t.deltaY,1===t.deltaMode&&(e*=40),c(_+e),u.current=!0,t.stopPropagation()},tabsTruncated:d.current}},C=e=>{const{border:s,layout:n,iconFactory:o,titleFactory:a,icons:d,path:l}=e,_=t.useRef(null),c=t.useRef(null),u=t.useRef(null),{selfRef:E,position:p,userControlledLeft:m,hiddenTabs:b,onMouseWheel:f,tabsTruncated:v}=w(s,i.flip(s.getOrientation()),_,u),O=t=>{y(t)&&n.auxMouseClick(s,t)},R=t=>{t.stopPropagation()},A=t=>{const e=n.getShowOverflowMenu();void 0!==e?e(s,t,b,L):D(c.current,b,L,n,o,a),t.stopPropagation()},L=t=>{n.doAction(h.selectTab(t.node.getId())),m.current=!1},S=t=>{const e=s.getChildren()[s.getSelected()];void 0!==e&&n.doAction(h.floatTab(e.getId())),t.stopPropagation()},B=n.getClassName;let C=s.getTabHeaderRect().styleWithPosition({});const M=[],x=e=>{let i=s.getSelected()===e,r=s.getChildren()[e];M.push(t.createElement(N,{layout:n,border:s.getLocation().getName(),node:r,path:l+"/tb"+e,key:r.getId(),selected:i,iconFactory:o,titleFactory:a,icons:d})),e<s.getChildren().length-1&&M.push(t.createElement("div",{key:"divider"+e,className:B(g.FLEXLAYOUT__BORDER_TAB_DIVIDER)}))};for(let t=0;t<s.getChildren().length;t++)x(t);let U=B(g.FLEXLAYOUT__BORDER)+" "+B(g.FLEXLAYOUT__BORDER_+s.getLocation().getName());void 0!==s.getClassName()&&(U+=" "+s.getClassName());let F=[],I=[];const z={headerContent:void 0,buttons:F,stickyButtons:I,headerButtons:[],overflowPosition:void 0};if(n.customizeTabSet(s,z),F=z.buttons,void 0===z.overflowPosition&&(z.overflowPosition=I.length),I.length>0&&(v?F=[...I,...F]:M.push(t.createElement("div",{ref:u,key:"sticky_buttons_container",onMouseDown:R,onTouchStart:R,onDragStart:t=>{t.preventDefault()},className:B(g.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},I))),b.length>0){const e=n.i18nName(T.Overflow_Menu_Tooltip);let i;i="function"==typeof d.more?d.more(s,b):t.createElement(t.Fragment,null,d.more,t.createElement("div",{className:B(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},b.length)),F.splice(Math.min(z.overflowPosition,F.length),0,t.createElement("button",{key:"overflowbutton",ref:c,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_+s.getLocation().getName()),title:e,onClick:A,onMouseDown:R,onTouchStart:R},i))}const Y=s.getSelected();if(-1!==Y){const e=s.getChildren()[Y];if(void 0!==e&&n.isSupportsPopout()&&e.isEnableFloat()&&!e.isFloating()){const i=n.i18nName(T.Float_Tab);F.push(t.createElement("button",{key:"float",title:i,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:S,onMouseDown:R,onTouchStart:R},"function"==typeof d.popout?d.popout(e):d.popout))}}const X=t.createElement("div",{key:"toolbar",ref:_,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_+s.getLocation().getName())},F);C=n.styleFont(C);let H={};const P=s.getBorderBarSize()-1;return H=s.getLocation()===r.LEFT?{right:P,height:P,top:p}:s.getLocation()===r.RIGHT?{left:P,height:P,top:p}:{height:P,left:p},t.createElement("div",{ref:E,dir:"ltr",style:C,className:U,"data-layout-path":l,onClick:O,onAuxClick:O,onContextMenu:t=>{n.showContextMenu(s,t)},onWheel:f},t.createElement("div",{style:{height:P},className:B(g.FLEXLAYOUT__BORDER_INNER)+" "+B(g.FLEXLAYOUT__BORDER_INNER_+s.getLocation().getName())},t.createElement("div",{style:H,className:B(g.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER)+" "+B(g.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_+s.getLocation().getName())},M)),X)},M=e=>{const{layout:s,node:n,path:o}=e,r=t.useRef([]),a=t.useRef(void 0),l=n.getParent(),_=t=>{var e;d.instance.setGlassCursorOverride(n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"),d.instance.startDrag(t,u,T,p,c,void 0,void 0,s.getCurrentDocument(),null!==(e=s.getRootDiv())&&void 0!==e?e:void 0),r.current=l._getSplitterBounds(n,!0);const o=s.getRootDiv();a.current=s.getCurrentDocument().createElement("div"),a.current.style.position="absolute",a.current.className=s.getClassName(g.FLEXLAYOUT__SPLITTER_DRAG),a.current.style.cursor=n.getOrientation()===i.HORZ?"ns-resize":"ew-resize";const h=n.getRect();n.getOrientation()===i.VERT&&h.width<2?h.width=2:n.getOrientation()===i.HORZ&&h.height<2&&(h.height=2),h.positionElement(a.current),o&&o.appendChild(a.current)},c=t=>{const e=s.getRootDiv();e&&e.removeChild(a.current)},u=()=>!0,T=t=>{const e=s.getDomRect();if(!e)return;const o=t.clientX-e.left,r=t.clientY-e.top;a&&(n.getOrientation()===i.HORZ?a.current.style.top=m(r-4)+"px":a.current.style.left=m(o-4)+"px"),s.isRealtimeResize()&&E()},E=()=>{let t=0;if(a&&(t=n.getOrientation()===i.HORZ?a.current.offsetTop:a.current.offsetLeft),l instanceof R){const e=l._calculateSplit(n,t);s.doAction(h.adjustBorderSplit(n.getParent().getId(),e))}else{const e=l._calculateSplit(n,t);void 0!==e&&s.doAction(h.adjustSplit(e))}},p=()=>{E();const t=s.getRootDiv();t&&t.removeChild(a.current)},m=t=>{const e=r.current;let i=t;return t<e[0]&&(i=e[0]),t>e[1]&&(i=e[1]),i},b=s.getClassName;let f=n.getRect();const v=f.styleWithPosition({cursor:n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"});let O=b(g.FLEXLAYOUT__SPLITTER)+" "+b(g.FLEXLAYOUT__SPLITTER_+n.getOrientation().getName());l instanceof R?O+=" "+b(g.FLEXLAYOUT__SPLITTER_BORDER):void 0!==n.getModel().getMaximizedTabset()&&(v.display="none");const A=n.getModel().getSplitterExtra();if(0===A)return t.createElement("div",{style:v,"data-layout-path":o,className:O,onTouchStart:_,onMouseDown:_});{let e=f.clone();e.x=0,e.y=0,n.getOrientation()===i.VERT?e.width+=A:e.height+=A;const s=e.styleWithPosition({cursor:n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"}),r=b(g.FLEXLAYOUT__SPLITTER_EXTRA);return t.createElement("div",{style:v,"data-layout-path":o,className:O},t.createElement("div",{style:s,className:r,onTouchStart:_,onMouseDown:_}))}};class x extends t.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,e){console.debug(t),console.debug(e)}render(){return this.state.hasError?t.createElement("div",{className:g.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER},t.createElement("div",{className:g.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT},this.props.message)):this.props.children}}const U=e=>{const{layout:i,selected:s,node:n,factory:o,path:r}=e,[a,d]=t.useState(!e.node.isEnableRenderOnDemand()||e.selected);t.useLayoutEffect((()=>{!a&&s&&d(!0)}));const l=()=>{const t=n.getParent();t.getType()===v.TYPE&&(t.isActive()||i.doAction(h.setActiveTabset(t.getId())))},_=i.getClassName,c=n.getModel().isUseVisibility(),u=n.getParent(),E=n._styleWithPosition();let p;s||L(E,c),u instanceof v&&(void 0===n.getModel().getMaximizedTabset()||u.isMaximized()||L(E,c)),a&&(p=o(n));let m=_(g.FLEXLAYOUT__TAB);return u instanceof R&&(m+=" "+_(g.FLEXLAYOUT__TAB_BORDER),m+=" "+_(g.FLEXLAYOUT__TAB_BORDER_+u.getLocation().getName())),void 0!==n.getContentClassName()&&(m+=" "+n.getContentClassName()),t.createElement("div",{className:m,"data-layout-path":r,onMouseDown:l,onTouchStart:l,style:E},t.createElement(x,{message:e.layout.i18nName(T.Error_rendering_component)},t.createElement(t.Fragment,null,p)))},F=e=>{const{layout:i,node:n,selected:o,iconFactory:r,titleFactory:a,icons:d,path:l}=e,_=t.useRef(null),c=t.useRef(null),u=t=>{y(t)||i.getEditingTab()||i.dragStart(t,void 0,n,n.isEnableDrag(),m,b)},p=t=>{y(t)&&i.auxMouseClick(n,t)},m=()=>{i.doAction(h.selectTab(n.getId()))},b=t=>{n.isEnableRename()&&f()},f=()=>{i.setEditingTab(n),i.getCurrentDocument().body.addEventListener("mousedown",v),i.getCurrentDocument().body.addEventListener("touchstart",v)},v=t=>{t.target!==c.current&&(i.getCurrentDocument().body.removeEventListener("mousedown",v),i.getCurrentDocument().body.removeEventListener("touchstart",v),i.setEditingTab(void 0))},O=t=>{(()=>{const t=n.getCloseType();return!!(o||t===E.Always||t===E.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?i.doAction(h.deleteTab(n.getId())):m()},R=t=>{t.stopPropagation()};t.useLayoutEffect((()=>{L(),i.getEditingTab()===n&&c.current.select()}));const L=()=>{var t;const e=i.getDomRect(),o=null===(t=_.current)||void 0===t?void 0:t.getBoundingClientRect();o&&e&&n._setTabRect(new s(o.left-e.left,o.top-e.top,o.width,o.height))},N=t=>{t.stopPropagation()},S=i.getClassName,D=n.getParent(),B=D.isEnableSingleTabStretch()&&1===D.getChildren().length;let w=B?g.FLEXLAYOUT__TAB_BUTTON_STRETCH:g.FLEXLAYOUT__TAB_BUTTON,C=S(w);C+=" "+S(w+"_"+D.getTabLocation()),B||(C+=o?" "+S(w+"--selected"):" "+S(w+"--unselected")),void 0!==n.getClassName()&&(C+=" "+n.getClassName());const M=A(i,n,r,a);let x=M.content?t.createElement("div",{className:S(g.FLEXLAYOUT__TAB_BUTTON_CONTENT)},M.content):null;const U=M.leading?t.createElement("div",{className:S(g.FLEXLAYOUT__TAB_BUTTON_LEADING)},M.leading):null;if(i.getEditingTab()===n&&(x=t.createElement("input",{ref:c,className:S(g.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":l+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:t=>{"Escape"===t.code?i.setEditingTab(void 0):"Enter"===t.code&&(i.setEditingTab(void 0),i.doAction(h.renameTab(n.getId(),t.target.value)))},onMouseDown:N,onTouchStart:N})),n.isEnableClose()&&!B){const e=i.i18nName(T.Close_Tab);M.buttons.push(t.createElement("div",{key:"close","data-layout-path":l+"/button/close",title:e,className:S(g.FLEXLAYOUT__TAB_BUTTON_TRAILING),onMouseDown:R,onClick:O,onTouchStart:R},"function"==typeof d.close?d.close(n):d.close))}return t.createElement("div",{ref:_,"data-layout-path":l,className:C,onMouseDown:u,onClick:p,onAuxClick:p,onContextMenu:t=>{i.showContextMenu(n,t)},onTouchStart:u,title:n.getHelpText()},U,x,M.buttons)},I=e=>{const{node:s,layout:n,iconFactory:o,titleFactory:r,icons:a,path:d}=e,l=t.useRef(null),_=t.useRef(null),c=t.useRef(null),u=t.useRef(null),{selfRef:E,position:p,userControlledLeft:m,hiddenTabs:b,onMouseWheel:f,tabsTruncated:v}=w(s,i.HORZ,l,u),O=t=>{const e=n.getShowOverflowMenu();void 0!==e?e(s,t,b,R):D(_.current,b,R,n,o,r),t.stopPropagation()},R=t=>{n.doAction(h.selectTab(t.node.getId())),m.current=!1},A=t=>{if(!y(t)){let e=s.getName();if(e=void 0===e?"":": "+e,n.doAction(h.setActiveTabset(s.getId())),!n.getEditingTab()){const i=n.i18nName(T.Move_Tabset,e);void 0!==s.getModel().getMaximizedTabset()?n.dragStart(t,i,s,!1,(t=>{}),I):n.dragStart(t,i,s,s.isEnableDrag(),(t=>{}),I)}}},N=t=>{y(t)&&n.auxMouseClick(s,t)},S=t=>{n.showContextMenu(s,t)},B=t=>{t.stopPropagation()},C=t=>{s.canMaximize()&&n.maximize(s),t.stopPropagation()},M=t=>{n.doAction(h.deleteTabset(s.getId())),t.stopPropagation()},x=t=>{n.doAction(h.deleteTab(s.getChildren()[0].getId())),t.stopPropagation()},U=t=>{void 0!==Y&&n.doAction(h.floatTab(Y.getId())),t.stopPropagation()},I=t=>{s.canMaximize()&&n.maximize(s)},z=n.getClassName;null!==c.current&&0!==c.current.scrollLeft&&(c.current.scrollLeft=0);const Y=s.getSelectedNode();let X=s._styleWithPosition();void 0===s.getModel().getMaximizedTabset()||s.isMaximized()||L(X,s.getModel().isUseVisibility());const H=[];if(s.isEnableTabStrip())for(let e=0;e<s.getChildren().length;e++){const i=s.getChildren()[e];let l=s.getSelected()===e;H.push(t.createElement(F,{layout:n,node:i,path:d+"/tb"+e,key:i.getId(),selected:l,iconFactory:o,titleFactory:r,icons:a})),e<s.getChildren().length-1&&H.push(t.createElement("div",{key:"divider"+e,className:z(g.FLEXLAYOUT__TABSET_TAB_DIVIDER)}))}const P=void 0!==s.getName();let W=[],k=[],G=[];const V={headerContent:s.getName(),stickyButtons:W,buttons:k,headerButtons:G,overflowPosition:void 0};n.customizeTabSet(s,V);const J=V.headerContent;W=V.stickyButtons,k=V.buttons,G=V.headerButtons;const Z=s.isEnableSingleTabStretch()&&1===s.getChildren().length,j=Z&&s.getChildren()[0].isEnableClose()||s.isEnableClose();if(void 0===V.overflowPosition&&(V.overflowPosition=W.length),W.length>0&&(v||Z?k=[...W,...k]:H.push(t.createElement("div",{ref:u,key:"sticky_buttons_container",onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()},className:z(g.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},W))),b.length>0){const e=n.i18nName(T.Overflow_Menu_Tooltip);let i;i="function"==typeof a.more?a.more(s,b):t.createElement(t.Fragment,null,a.more,t.createElement("div",{className:z(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},b.length)),k.splice(Math.min(V.overflowPosition,k.length),0,t.createElement("button",{key:"overflowbutton","data-layout-path":d+"/button/overflow",ref:_,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW),title:e,onClick:O,onMouseDown:B,onTouchStart:B},i))}if(void 0!==Y&&n.isSupportsPopout()&&Y.isEnableFloat()&&!Y.isFloating()){const e=n.i18nName(T.Float_Tab);k.push(t.createElement("button",{key:"float","data-layout-path":d+"/button/float",title:e,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:U,onMouseDown:B,onTouchStart:B},"function"==typeof a.popout?a.popout(Y):a.popout))}if(s.canMaximize()){const e=n.i18nName(T.Restore),i=n.i18nName(T.Maximize);(P?G:k).push(t.createElement("button",{key:"max","data-layout-path":d+"/button/max",title:s.isMaximized()?e:i,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_+(s.isMaximized()?"max":"min")),onClick:C,onMouseDown:B,onTouchStart:B},s.isMaximized()?"function"==typeof a.restore?a.restore(s):a.restore:"function"==typeof a.maximize?a.maximize(s):a.maximize))}if(!s.isMaximized()&&j){const e=Z?n.i18nName(T.Close_Tab):n.i18nName(T.Close_Tabset);(P?G:k).push(t.createElement("button",{key:"close","data-layout-path":d+"/button/close",title:e,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE),onClick:Z?x:M,onMouseDown:B,onTouchStart:B},"function"==typeof a.closeTabset?a.closeTabset(s):a.closeTabset))}const q=t.createElement("div",{key:"toolbar",ref:l,className:z(g.FLEXLAYOUT__TAB_TOOLBAR),onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()}},k);let K,$,Q=z(g.FLEXLAYOUT__TABSET_TABBAR_OUTER);if(void 0!==s.getClassNameTabStrip()&&(Q+=" "+s.getClassNameTabStrip()),Q+=" "+g.FLEXLAYOUT__TABSET_TABBAR_OUTER_+s.getTabLocation(),s.isActive()&&!P&&(Q+=" "+z(g.FLEXLAYOUT__TABSET_SELECTED)),s.isMaximized()&&!P&&(Q+=" "+z(g.FLEXLAYOUT__TABSET_MAXIMIZED)),P){const e=t.createElement("div",{key:"toolbar",ref:l,className:z(g.FLEXLAYOUT__TAB_TOOLBAR),onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()}},G);let i=z(g.FLEXLAYOUT__TABSET_HEADER);s.isActive()&&(i+=" "+z(g.FLEXLAYOUT__TABSET_SELECTED)),s.isMaximized()&&(i+=" "+z(g.FLEXLAYOUT__TABSET_MAXIMIZED)),void 0!==s.getClassNameHeader()&&(i+=" "+s.getClassNameHeader()),K=t.createElement("div",{className:i,style:{height:s.getHeaderHeight()+"px"},"data-layout-path":d+"/header",onMouseDown:A,onContextMenu:S,onClick:N,onAuxClick:N,onTouchStart:A},t.createElement("div",{className:z(g.FLEXLAYOUT__TABSET_HEADER_CONTENT)},J),e)}const tt={height:s.getTabStripHeight()+"px"};$=t.createElement("div",{className:Q,style:tt,"data-layout-path":d+"/tabstrip",onMouseDown:A,onContextMenu:S,onClick:N,onAuxClick:N,onTouchStart:A},t.createElement("div",{ref:c,className:z(g.FLEXLAYOUT__TABSET_TABBAR_INNER)+" "+z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_+s.getTabLocation())},t.createElement("div",{style:{left:p,width:Z?"100%":"10000px"},className:z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER)+" "+z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_+s.getTabLocation())},H)),q),X=n.styleFont(X);var et=void 0;if(0===s.getChildren().length){const t=n.getTabSetPlaceHolderCallback();t&&(et=t(s))}const it=t.createElement("div",{className:z(g.FLEXLAYOUT__TABSET_CONTENT)},et);var st;return st="top"===s.getTabLocation()?t.createElement(t.Fragment,null,K,$,it):t.createElement(t.Fragment,null,K,it,$),t.createElement("div",{ref:E,dir:"ltr","data-layout-path":d,style:X,className:z(g.FLEXLAYOUT__TABSET),onWheel:f},st)},z=i=>{const{title:n,id:o,url:r,rect:a,onCloseWindow:d,onSetWindow:l,children:h}=i,_=t.useRef(null),c=t.useRef(null),[u,T]=t.useState(void 0);return t.useLayoutEffect((()=>{c.current&&clearTimeout(c.current);let t=!0;const e=a||new s(0,0,100,100),i=Array.from(window.document.styleSheets).reduce(((t,e)=>{let i;try{i=e.cssRules}catch(t){}try{return[...t,{href:e.href,type:e.type,rules:i?Array.from(i).map((t=>t.cssText)):null}]}catch(e){return t}}),[]);return _.current=window.open(r,o,`left=${e.x},top=${e.y},width=${e.width},height=${e.height}`),null!==_.current?(l(o,_.current),window.addEventListener("beforeunload",(()=>{_.current&&(_.current.close(),_.current=null)})),_.current.addEventListener("load",(()=>{if(t){const t=_.current.document;t.title=n;const e=t.createElement("div");e.className=g.FLEXLAYOUT__FLOATING_WINDOW_CONTENT,t.body.appendChild(e),function(t,e){const i=t.head,s=[];for(const n of e)if(n.href){const e=t.createElement("link");e.type=n.type,e.rel="stylesheet",e.href=n.href,i.appendChild(e),s.push(new Promise((t=>{e.onload=()=>t(!0)})))}else if(n.rules){const e=t.createElement("style");for(const i of n.rules)e.appendChild(t.createTextNode(i));i.appendChild(e)}return Promise.all(s)}(t,i).then((()=>{T(e)})),_.current.addEventListener("beforeunload",(()=>{d(o)}))}}))):(console.warn(`Unable to open window ${r}`),d(o)),()=>{t=!1,c.current=setTimeout((()=>{_.current&&(_.current.close(),_.current=null)}),0)}}),[]),void 0!==u?(0,e.createPortal)(h,u):null},Y=e=>{const{layout:i,node:s,factory:n}=e,o=i.getClassName,r=n(s);return t.createElement("div",{className:o(g.FLEXLAYOUT__FLOATING_WINDOW_TAB)},t.createElement(x,{message:e.layout.i18nName(T.Error_rendering_component)},t.createElement(t.Fragment,null,r)))},X=e=>{const{layout:i,selected:s,node:n,path:o}=e,r=()=>{n.getWindow()&&n.getWindow().focus()},a=()=>{i.doAction(h.unFloatTab(n.getId()))},d=()=>{const t=n.getParent();t.getType()===v.TYPE&&(t.isActive()||i.doAction(h.setActiveTabset(t.getId())))},l=i.getClassName,_=n.getParent(),c=n._styleWithPosition();s||L(c,n.getModel().isUseVisibility()),_ instanceof v&&(void 0===n.getModel().getMaximizedTabset()||_.isMaximized()||L(c,n.getModel().isUseVisibility()));const u=i.i18nName(T.Floating_Window_Message),E=i.i18nName(T.Floating_Window_Show_Window),p=i.i18nName(T.Floating_Window_Dock_Window),m=i.getOnRenderFloatingTabPlaceholder();return m?t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING),onMouseDown:d,onTouchStart:d,style:c},m(a,r)):t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING),"data-layout-path":o,onMouseDown:d,onTouchStart:d,style:c},t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING_INNER)},t.createElement("div",null,u),t.createElement("div",null,t.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),r()}},E)),t.createElement("div",null,t.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),a()}},p))))},H={width:"1em",height:"1em",display:"flex",alignItems:"center"},P=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24"},t.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),t.createElement("path",{stroke:"var(--color-icon)",fill:"var(--color-icon)",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),W={close:t.createElement(P,null),closeTabset:t.createElement(P,null),popout:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 20 20",fill:"var(--color-icon)"},t.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),t.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))),null),maximize:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))),null),restore:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))),null),more:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M7 10l5 5 5-5z"}))),null)},k="undefined"!=typeof window&&(window.document.documentMode||/Edge\//.test(window.navigator.userAgent)),G="undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches&&!k;class V extends t.Component{constructor(i){super(i),this.firstMove=!1,this.dragRectRendered=!0,this.dragDivText=void 0,this.edgeRectLength=100,this.edgeRectWidth=10,this.onModelChange=t=>{this.forceUpdate(),this.props.onModelChange&&this.props.onModelChange(this.props.model,t)},this.updateRect=t=>{if(t||(t=this.getDomRect()),!t)return;const e=new s(0,0,t.width,t.height);e.equals(this.state.rect)||0===e.width||0===e.height||this.setState({rect:e})},this.updateLayoutMetrics=()=>{if(this.findHeaderBarSizeRef.current){const t=this.findHeaderBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedHeaderBarSize&&this.setState({calculatedHeaderBarSize:t})}if(this.findTabBarSizeRef.current){const t=this.findTabBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedTabBarSize&&this.setState({calculatedTabBarSize:t})}if(this.findBorderBarSizeRef.current){const t=this.findBorderBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedBorderBarSize&&this.setState({calculatedBorderBarSize:t})}},this.getClassName=t=>void 0===this.props.classNameMapper?t:this.props.classNameMapper(t),this.onCloseWindow=t=>{this.doAction(h.unFloatTab(t));try{this.props.model.getNodeById(t)._setWindow(void 0)}catch(t){}},this.onSetWindow=(t,e)=>{this.props.model.getNodeById(t)._setWindow(e)},this.onCancelAdd=()=>{var t,e;const i=this.selfRef.current;i&&this.dragDiv&&i.removeChild(this.dragDiv),this.dragDiv=void 0,this.hidePortal(),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0);try{null===(e=null===(t=this.customDrop)||void 0===t?void 0:t.invalidated)||void 0===e||e.call(t)}catch(t){console.error(t)}d.instance.hideGlass(),this.newTabJson=void 0,this.customDrop=void 0},this.onCancelDrag=t=>{var e,i;if(t){const t=this.selfRef.current,s=this.outlineDiv;if(t&&s)try{t.removeChild(s)}catch(t){}const n=this.dragDiv;if(t&&n)try{t.removeChild(n)}catch(t){}this.dragDiv=void 0,this.hidePortal(),this.setState({showEdges:!1}),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0);try{null===(i=null===(e=this.customDrop)||void 0===e?void 0:e.invalidated)||void 0===i||i.call(e)}catch(t){console.error(t)}d.instance.hideGlass(),this.newTabJson=void 0,this.customDrop=void 0}this.setState({showHiddenBorder:r.CENTER})},this.onDragDivMouseDown=t=>{t.preventDefault(),this.dragStart(t,this.dragDivText,b._fromJson(this.newTabJson,this.props.model,!1),!0,void 0,void 0)},this.dragStart=(t,e,i,s,n,o)=>{var r,a;s?(this.dragNode=i,this.dragDivText=e,d.instance.startDrag(t,this.onDragStart,this.onDragMove,this.onDragEnd,this.onCancelDrag,n,o,this.currentDocument,null!==(a=this.selfRef.current)&&void 0!==a?a:void 0)):d.instance.startDrag(t,void 0,void 0,void 0,void 0,n,o,this.currentDocument,null!==(r=this.selfRef.current)&&void 0!==r?r:void 0)},this.dragRectRender=(e,i,s,n)=>{let o;if(void 0!==e?o=t.createElement("div",{style:{whiteSpace:"pre"}},e.replace("<br>","\n")):i&&i instanceof b&&(o=t.createElement(S,{node:i,layout:this,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory})),void 0!==this.props.onRenderDragRect){const t=this.props.onRenderDragRect(o,i,s);void 0!==t&&(o=t)}this.dragRectRendered=!1;const r=this.dragDiv;r&&(r.style.visibility="hidden",this.showPortal(t.createElement(J,{onRendered:()=>{this.dragRectRendered=!0,null==n||n()}},o),r))},this.showPortal=(t,i)=>{const s=(0,e.createPortal)(t,i);this.setState({portal:s})},this.hidePortal=()=>{this.setState({portal:void 0})},this.onDragStart=()=>{var t;this.dropInfo=void 0,this.customDrop=void 0;const e=this.selfRef.current;return this.outlineDiv=this.currentDocument.createElement("div"),this.outlineDiv.className=this.getClassName(g.FLEXLAYOUT__OUTLINE_RECT),this.outlineDiv.style.visibility="hidden",e&&e.appendChild(this.outlineDiv),null==this.dragDiv&&(this.dragDiv=this.currentDocument.createElement("div"),this.dragDiv.className=this.getClassName(g.FLEXLAYOUT__DRAG_RECT),this.dragDiv.setAttribute("data-layout-path","/drag-rectangle"),this.dragRectRender(this.dragDivText,this.dragNode,this.newTabJson),e&&e.appendChild(this.dragDiv)),void 0===this.props.model.getMaximizedTabset()&&this.setState({showEdges:this.props.model.isEnableEdgeDock()}),this.dragNode&&this.outlineDiv&&this.dragNode instanceof b&&void 0!==this.dragNode.getTabRect()&&(null===(t=this.dragNode.getTabRect())||void 0===t||t.positionElement(this.outlineDiv)),this.firstMove=!0,!0},this.onDragMove=t=>{var e,i,s,n,o,r,a;if(!1===this.firstMove){const t=this.props.model._getAttribute("tabDragSpeed");this.outlineDiv&&(this.outlineDiv.style.transition=`top ${t}s, left ${t}s, width ${t}s, height ${t}s`)}this.firstMove=!1;const d=null===(e=this.selfRef.current)||void 0===e?void 0:e.getBoundingClientRect(),l={x:t.clientX-(null!==(i=null==d?void 0:d.left)&&void 0!==i?i:0),y:t.clientY-(null!==(s=null==d?void 0:d.top)&&void 0!==s?s:0)};this.checkForBorderToShow(l.x,l.y);const h=null!==(o=null===(n=this.dragDiv)||void 0===n?void 0:n.getBoundingClientRect())&&void 0!==o?o:new DOMRect(0,0,100,100);let _=l.x-h.width/2;_+h.width>(null!==(r=null==d?void 0:d.width)&&void 0!==r?r:0)&&(_=(null!==(a=null==d?void 0:d.width)&&void 0!==a?a:0)-h.width),_=Math.max(0,_),this.dragDiv&&(this.dragDiv.style.left=_+"px",this.dragDiv.style.top=l.y+5+"px",this.dragRectRendered&&"hidden"===this.dragDiv.style.visibility&&(this.dragDiv.style.visibility="visible"));let c=this.props.model._findDropTargetNode(this.dragNode,l.x,l.y);c&&(this.props.onTabDrag?this.handleCustomTabDrag(c,l,t):(this.dropInfo=c,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(c.className),c.rect.positionElement(this.outlineDiv),this.outlineDiv.style.visibility="visible")))},this.onDragEnd=t=>{const e=this.selfRef.current;if(e&&(this.outlineDiv&&e.removeChild(this.outlineDiv),this.dragDiv&&e.removeChild(this.dragDiv)),this.dragDiv=void 0,this.hidePortal(),this.setState({showEdges:!1}),d.instance.hideGlass(),this.dropInfo)if(this.customDrop){this.newTabJson=void 0;try{const{callback:t,dragging:e,over:i,x:s,y:n,location:o}=this.customDrop;t(e,i,s,n,o),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0)}catch(t){console.error(t)}}else if(void 0!==this.newTabJson){const e=this.doAction(h.addNode(this.newTabJson,this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(e,t),this.fnNewNodeDropped=void 0),this.newTabJson=void 0}else void 0!==this.dragNode&&this.doAction(h.moveNode(this.dragNode.getId(),this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));this.setState({showHiddenBorder:r.CENTER})},this.props.model._setChangeListener(this.onModelChange),this.tabIds=[],this.selfRef=t.createRef(),this.findHeaderBarSizeRef=t.createRef(),this.findTabBarSizeRef=t.createRef(),this.findBorderBarSizeRef=t.createRef(),this.supportsPopout=void 0!==i.supportsPopout?i.supportsPopout:G,this.popoutURL=i.popoutURL?i.popoutURL:"popout.html",this.icons=Object.assign(Object.assign({},W),i.icons),this.state={rect:new s(0,0,0,0),calculatedHeaderBarSize:25,calculatedTabBarSize:26,calculatedBorderBarSize:30,editingTab:void 0,showHiddenBorder:r.CENTER,showEdges:!1},this.onDragEnter=this.onDragEnter.bind(this)}styleFont(t){return this.props.font&&(this.selfRef.current&&(this.props.font.size&&this.selfRef.current.style.setProperty("--font-size",this.props.font.size),this.props.font.family&&this.selfRef.current.style.setProperty("--font-family",this.props.font.family)),this.props.font.style&&(t.fontStyle=this.props.font.style),this.props.font.weight&&(t.fontWeight=this.props.font.weight)),t}doAction(t){if(void 0!==this.props.onAction){const e=this.props.onAction(t);return void 0!==e?this.props.model.doAction(e):void 0}return this.props.model.doAction(t)}componentDidMount(){this.updateRect(),this.updateLayoutMetrics(),this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.resizeObserver=new ResizeObserver((t=>{this.updateRect(t[0].contentRect)}));const t=this.selfRef.current;t&&this.resizeObserver.observe(t)}componentDidUpdate(){this.updateLayoutMetrics(),this.props.model!==this.previousModel&&(void 0!==this.previousModel&&this.previousModel._setChangeListener(void 0),this.props.model._setChangeListener(this.onModelChange),this.previousModel=this.props.model)}getCurrentDocument(){return this.currentDocument}getDomRect(){var t;return null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect()}getRootDiv(){return this.selfRef.current}isSupportsPopout(){return this.supportsPopout}isRealtimeResize(){var t;return null!==(t=this.props.realtimeResize)&&void 0!==t&&t}onTabDrag(...t){var e,i;return null===(i=(e=this.props).onTabDrag)||void 0===i?void 0:i.call(e,...t)}getPopoutURL(){return this.popoutURL}componentWillUnmount(){var t;const e=this.selfRef.current;e&&(null===(t=this.resizeObserver)||void 0===t||t.unobserve(e))}setEditingTab(t){this.setState({editingTab:t})}getEditingTab(){return this.state.editingTab}render(){if(!this.selfRef.current)return t.createElement("div",{ref:this.selfRef,className:this.getClassName(g.FLEXLAYOUT__LAYOUT)},this.metricsElements());this.props.model._setPointerFine(window&&window.matchMedia&&window.matchMedia("(pointer: fine)").matches);const e=[],i=[],s=[],n={},o=[],r={headerBarSize:this.state.calculatedHeaderBarSize,tabBarSize:this.state.calculatedTabBarSize,borderBarSize:this.state.calculatedBorderBarSize};this.props.model._setShowHiddenBorder(this.state.showHiddenBorder),this.centerRect=this.props.model._layout(this.state.rect,r),this.renderBorder(this.props.model.getBorderSet(),e,n,s,o),this.renderChildren("",this.props.model.getRoot(),i,n,s,o);const a=[],d={};for(const t of this.tabIds)n[t]&&(a.push(t),d[t]=t);this.tabIds=a;for(const t of Object.keys(n))d[t]||this.tabIds.push(t);const l=[];if(this.state.showEdges){const e=this.centerRect,i=this.edgeRectLength,s=this.edgeRectWidth,n=this.edgeRectLength/2,o=this.getClassName(g.FLEXLAYOUT__EDGE_RECT),r=50;l.push(t.createElement("div",{key:"North",style:{top:e.y,left:e.x+e.width/2-n,width:i,height:s,borderBottomLeftRadius:r,borderBottomRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_TOP)})),l.push(t.createElement("div",{key:"West",style:{top:e.y+e.height/2-n,left:e.x,width:s,height:i,borderTopRightRadius:r,borderBottomRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_LEFT)})),l.push(t.createElement("div",{key:"South",style:{top:e.y+e.height-s,left:e.x+e.width/2-n,width:i,height:s,borderTopLeftRadius:r,borderTopRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_BOTTOM)})),l.push(t.createElement("div",{key:"East",style:{top:e.y+e.height/2-n,left:e.x+e.width-s,width:s,height:i,borderTopLeftRadius:r,borderBottomLeftRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_RIGHT)}))}return t.createElement("div",{ref:this.selfRef,className:this.getClassName(g.FLEXLAYOUT__LAYOUT),onDragEnter:this.props.onExternalDrag?this.onDragEnter:void 0},i,this.tabIds.map((t=>n[t])),e,o,l,s,this.metricsElements(),this.state.portal)}metricsElements(){const e=this.styleFont({visibility:"hidden"});return t.createElement(t.Fragment,null,t.createElement("div",{key:"findHeaderBarSize",ref:this.findHeaderBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__TABSET_HEADER_SIZER)},"FindHeaderBarSize"),t.createElement("div",{key:"findTabBarSize",ref:this.findTabBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__TABSET_SIZER)},"FindTabBarSize"),t.createElement("div",{key:"findBorderBarSize",ref:this.findBorderBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__BORDER_SIZER)},"FindBorderBarSize"))}renderBorder(e,s,n,o,r){for(const a of e.getBorders()){const e=`/border/${a.getLocation().getName()}`;if(a.isShowing()){s.push(t.createElement(C,{key:`border_${a.getLocation().getName()}`,path:e,border:a,layout:this,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory,icons:this.icons}));const d=a._getDrawChildren();let l=0,h=0;for(const s of d){if(s instanceof m){let i=e+"/s";r.push(t.createElement(M,{key:s.getId(),layout:this,node:s,path:i}))}else if(s instanceof b){let r=e+"/t"+h++;if(this.supportsPopout&&s.isFloating()){const e=this._getScreenRect(s),d=s._getAttr("borderWidth"),h=s._getAttr("borderHeight");e&&(-1!==d&&a.getLocation().getOrientation()===i.HORZ?e.width=d:-1!==h&&a.getLocation().getOrientation()===i.VERT&&(e.height=h)),o.push(t.createElement(z,{key:s.getId(),url:this.popoutURL,rect:e,title:s.getName(),id:s.getId(),onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},t.createElement(Y,{layout:this,node:s,factory:this.props.factory}))),n[s.getId()]=t.createElement(X,{key:s.getId(),layout:this,path:r,node:s,selected:l===a.getSelected()})}else n[s.getId()]=t.createElement(U,{key:s.getId(),layout:this,path:r,node:s,selected:l===a.getSelected(),factory:this.props.factory})}l++}}}}renderChildren(e,s,n,o,r,a){const d=s._getDrawChildren();let l=0,h=0,_=0;for(const s of d)if(s instanceof m){const i=e+"/s"+l++;a.push(t.createElement(M,{key:s.getId(),layout:this,path:i,node:s}))}else if(s instanceof v){const i=e+"/ts"+_++;n.push(t.createElement(I,{key:s.getId(),layout:this,path:i,node:s,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory,icons:this.icons})),this.renderChildren(i,s,n,o,r,a)}else if(s instanceof b){const i=e+"/t"+h++,n=s.getParent().getChildren()[s.getParent().getSelected()];if(void 0===n&&console.warn("undefined selectedTab should not happen"),this.supportsPopout&&s.isFloating()){const e=this._getScreenRect(s);r.push(t.createElement(z,{key:s.getId(),url:this.popoutURL,rect:e,title:s.getName(),id:s.getId(),onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},t.createElement(Y,{layout:this,node:s,factory:this.props.factory}))),o[s.getId()]=t.createElement(X,{key:s.getId(),layout:this,path:i,node:s,selected:s===n})}else o[s.getId()]=t.createElement(U,{key:s.getId(),layout:this,path:i,node:s,selected:s===n,factory:this.props.factory})}else{const t=e+(s.getOrientation()===i.HORZ?"/r":"/c")+_++;this.renderChildren(t,s,n,o,r,a)}}_getScreenRect(t){var e;const i=t.getRect().clone(),s=null===(e=this.selfRef.current)||void 0===e?void 0:e.getBoundingClientRect();if(!s)return null;const n=Math.min(80,this.currentWindow.outerHeight-this.currentWindow.innerHeight),o=Math.min(80,this.currentWindow.outerWidth-this.currentWindow.innerWidth);return i.x=i.x+s.x+this.currentWindow.screenX+o,i.y=i.y+s.y+this.currentWindow.screenY+n,i}addTabToTabSet(t,e){if(void 0!==this.props.model.getNodeById(t))return this.doAction(h.addNode(e,t,r.CENTER,-1))}addTabToActiveTabSet(t){const e=this.props.model.getActiveTabset();if(void 0!==e)return this.doAction(h.addNode(t,e.getId(),r.CENTER,-1))}addTabWithDragAndDrop(t,e,i){this.fnNewNodeDropped=i,this.newTabJson=e,this.dragStart(void 0,t,b._fromJson(e,this.props.model,!1),!0,void 0,void 0)}moveTabWithDragAndDrop(t,e){this.dragStart(void 0,e,t,!0,void 0,void 0)}addTabWithDragAndDropIndirect(t,e,i){this.fnNewNodeDropped=i,this.newTabJson=e,d.instance.addGlass(this.onCancelAdd),this.dragDivText=t,this.dragDiv=this.currentDocument.createElement("div"),this.dragDiv.className=this.getClassName(g.FLEXLAYOUT__DRAG_RECT),this.dragDiv.addEventListener("mousedown",this.onDragDivMouseDown),this.dragDiv.addEventListener("touchstart",this.onDragDivMouseDown,{passive:!1}),this.dragRectRender(this.dragDivText,void 0,this.newTabJson,(()=>{if(this.dragDiv){this.dragDiv.style.visibility="visible";const t=this.dragDiv.getBoundingClientRect(),e=new s(0,0,null==t?void 0:t.width,null==t?void 0:t.height);e.centerInRect(this.state.rect),this.dragDiv.setAttribute("data-layout-path","/drag-rectangle"),this.dragDiv.style.left=e.x+"px",this.dragDiv.style.top=e.y+"px"}})),this.selfRef.current.appendChild(this.dragDiv)}handleCustomTabDrag(t,e,i){var n,o,r;let a=null===(n=this.customDrop)||void 0===n?void 0:n.invalidated;const l=null===(o=this.customDrop)||void 0===o?void 0:o.callback;this.customDrop=void 0;const h=this.newTabJson||(this.dragNode instanceof b?this.dragNode:void 0);if(h&&(t.node instanceof v||t.node instanceof R)&&-1===t.index){const n=t.node.getSelectedNode(),o=null==n?void 0:n.getRect();if(n&&(null==o?void 0:o.contains(e.x,e.y))){let r;try{const a=this.onTabDrag(h,n,e.x-o.x,e.y-o.y,t.location,(()=>this.onDragMove(i)));a&&(r={rect:new s(a.x+o.x,a.y+o.y,a.width,a.height),callback:a.callback,invalidated:a.invalidated,dragging:h,over:n,x:e.x-o.x,y:e.y-o.y,location:t.location,cursor:a.cursor})}catch(t){console.error(t)}(null==r?void 0:r.callback)===l&&(a=void 0),this.customDrop=r}}this.dropInfo=t,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(this.customDrop?g.FLEXLAYOUT__OUTLINE_RECT:t.className),this.customDrop?this.customDrop.rect.positionElement(this.outlineDiv):t.rect.positionElement(this.outlineDiv)),d.instance.setGlassCursorOverride(null===(r=this.customDrop)||void 0===r?void 0:r.cursor),this.outlineDiv&&(this.outlineDiv.style.visibility="visible");try{null==a||a()}catch(t){console.error(t)}}onDragEnter(t){if(d.instance.isDragging())return;const e=this.props.onExternalDrag(t);e&&(this.fnNewNodeDropped=e.onDrop,this.newTabJson=e.json,this.dragStart(t,e.dragText,b._fromJson(e.json,this.props.model,!1),!0,void 0,void 0))}checkForBorderToShow(t,e){const i=this.props.model._getOuterInnerRects().outer,s=i.getCenter(),n=this.edgeRectWidth,o=this.edgeRectLength/2;let a=!1;this.props.model.isEnableEdgeDock()&&this.state.showHiddenBorder===r.CENTER&&(e>s.y-o&&e<s.y+o||t>s.x-o&&t<s.x+o)&&(a=!0);let d=r.CENTER;a||(t<=i.x+n?d=r.LEFT:t>=i.getRight()-n?d=r.RIGHT:e<=i.y+n?d=r.TOP:e>=i.getBottom()-n&&(d=r.BOTTOM)),d!==this.state.showHiddenBorder&&this.setState({showHiddenBorder:d})}maximize(t){this.doAction(h.maximizeToggle(t.getId()))}customizeTab(t,e){this.props.onRenderTab&&this.props.onRenderTab(t,e)}customizeTabSet(t,e){this.props.onRenderTabSet&&this.props.onRenderTabSet(t,e)}i18nName(t,e){let i;return this.props.i18nMapper&&(i=this.props.i18nMapper(t,e)),void 0===i&&(i=t+(void 0===e?"":e)),i}getOnRenderFloatingTabPlaceholder(){return this.props.onRenderFloatingTabPlaceholder}getShowOverflowMenu(){return this.props.onShowOverflowMenu}getTabSetPlaceHolderCallback(){return this.props.onTabSetPlaceHolder}showContextMenu(t,e){this.props.onContextMenu&&this.props.onContextMenu(t,e)}auxMouseClick(t,e){this.props.onAuxMouseClick&&this.props.onAuxMouseClick(t,e)}}const J=e=>(t.useEffect((()=>{var t;null===(t=e.onRendered)||void 0===t||t.call(e)}),[e]),t.createElement(t.Fragment,null,e.children));class Z{static _fromJson(t,e){const i=new Z(e);return i._borders=t.map((t=>R._fromJson(t,e))),i}constructor(t){this._model=t,this._borders=[]}getBorders(){return this._borders}_forEachNode(t){for(const e of this._borders){t(e,0);for(const i of e.getChildren())i._forEachNode(t,1)}}_toJson(){return this._borders.map((t=>t.toJson()))}_layoutBorder(t,e){const s=t.outer,n=this._model.getRoot();let o=Math.max(0,s.height-n.getMinHeight()),r=Math.max(0,s.width-n.getMinWidth()),a=0,d=0,l=0,h=0;const _=this._borders.filter((t=>t.isShowing()));for(const t of _){t._setAdjustedSize(t.getSize());const e=-1!==t.getSelected();t.getLocation().getOrientation()===i.HORZ?(d+=t.getBorderBarSize(),e&&(r-=this._model.getSplitterSize(),d+=t.getSize(),h+=t.getSize())):(a+=t.getBorderBarSize(),e&&(o-=this._model.getSplitterSize(),a+=t.getSize(),l+=t.getSize()))}let c=0,u=!1;for(;d>r&&h>0||a>o&&l>0;){const t=_[c];if(-1!==t.getSelected()){const e=t._getAdjustedSize();d>r&&h>0&&t.getLocation().getOrientation()===i.HORZ&&e>0&&e>t.getMinSize()?(t._setAdjustedSize(e-1),d--,h--,u=!0):a>o&&l>0&&t.getLocation().getOrientation()===i.VERT&&e>0&&e>t.getMinSize()&&(t._setAdjustedSize(e-1),a--,l--,u=!0)}if(c=(c+1)%_.length,0===c){if(!u)break;u=!1}}for(const i of _)t.outer=i._layoutBorderOuter(t.outer,e);t.inner=t.outer;for(const i of _)t.inner=i._layoutBorderInner(t.inner,e);return t}_findDropTargetNode(t,e,i){for(const s of this._borders)if(s.isShowing()){const n=s.canDrop(t,e,i);if(void 0!==n)return n}}}class j{static fromJson(t){const e=new j;return j._attributeDefinitions.fromJson(t.global,e._attributes),t.borders&&(e._borders=Z._fromJson(t.borders,e)),e._root=f._fromJson(t.layout,e),e._tidy(),e}static _createAttributeDefinitions(){const t=new c;return t.add("legacyOverflowMenu",!1).setType(_.BOOLEAN),t.add("enableEdgeDock",!0).setType(_.BOOLEAN),t.add("rootOrientationVertical",!1).setType(_.BOOLEAN),t.add("marginInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("enableUseVisibility",!1).setType(_.BOOLEAN),t.add("enableRotateBorderIcons",!0).setType(_.BOOLEAN),t.add("splitterSize",-1).setType(_.NUMBER),t.add("splitterExtra",0).setType(_.NUMBER),t.add("tabEnableClose",!0).setType(_.BOOLEAN),t.add("tabCloseType",1).setType("ICloseType"),t.add("tabEnableFloat",!1).setType(_.BOOLEAN),t.add("tabEnableDrag",!0).setType(_.BOOLEAN),t.add("tabEnableRename",!0).setType(_.BOOLEAN),t.add("tabContentClassName",void 0).setType(_.STRING),t.add("tabClassName",void 0).setType(_.STRING),t.add("tabIcon",void 0).setType(_.STRING),t.add("tabEnableRenderOnDemand",!0).setType(_.BOOLEAN),t.add("tabDragSpeed",.3).setType(_.NUMBER),t.add("tabBorderWidth",-1).setType(_.NUMBER),t.add("tabBorderHeight",-1).setType(_.NUMBER),t.add("tabSetEnableDeleteWhenEmpty",!0).setType(_.BOOLEAN),t.add("tabSetEnableDrop",!0).setType(_.BOOLEAN),t.add("tabSetEnableDrag",!0).setType(_.BOOLEAN),t.add("tabSetEnableDivide",!0).setType(_.BOOLEAN),t.add("tabSetEnableMaximize",!0).setType(_.BOOLEAN),t.add("tabSetEnableClose",!1).setType(_.BOOLEAN),t.add("tabSetEnableSingleTabStretch",!1).setType(_.BOOLEAN),t.add("tabSetAutoSelectTab",!0).setType(_.BOOLEAN),t.add("tabSetClassNameTabStrip",void 0).setType(_.STRING),t.add("tabSetClassNameHeader",void 0).setType(_.STRING),t.add("tabSetEnableTabStrip",!0).setType(_.BOOLEAN),t.add("tabSetHeaderHeight",0).setType(_.NUMBER),t.add("tabSetTabStripHeight",0).setType(_.NUMBER),t.add("tabSetMarginInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("tabSetBorderInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("tabSetTabLocation","top").setType("ITabLocation"),t.add("tabSetMinWidth",0).setType(_.NUMBER),t.add("tabSetMinHeight",0).setType(_.NUMBER),t.add("borderSize",200).setType(_.NUMBER),t.add("borderMinSize",0).setType(_.NUMBER),t.add("borderBarSize",0).setType(_.NUMBER),t.add("borderEnableDrop",!0).setType(_.BOOLEAN),t.add("borderAutoSelectTabWhenOpen",!0).setType(_.BOOLEAN),t.add("borderAutoSelectTabWhenClosed",!1).setType(_.BOOLEAN),t.add("borderClassName",void 0).setType(_.STRING),t.add("borderEnableAutoHide",!1).setType(_.BOOLEAN),t}constructor(){this._borderRects={inner:s.empty(),outer:s.empty()},this._attributes={},this._idMap={},this._borders=new Z(this),this._pointerFine=!0,this._showHiddenBorder=r.CENTER}_setChangeListener(t){this._changeListener=t}getActiveTabset(){return this._activeTabSet&&this.getNodeById(this._activeTabSet.getId())?this._activeTabSet:void 0}_getShowHiddenBorder(){return this._showHiddenBorder}_setShowHiddenBorder(t){this._showHiddenBorder=t}_setActiveTabset(t){this._activeTabSet=t}getMaximizedTabset(){return this._maximizedTabSet}_setMaximizedTabset(t){this._maximizedTabSet=t}getRoot(){return this._root}isRootOrientationVertical(){return this._attributes.rootOrientationVertical}isUseVisibility(){return this._attributes.enableUseVisibility}isEnableRotateBorderIcons(){return this._attributes.enableRotateBorderIcons}getBorderSet(){return this._borders}_getOuterInnerRects(){return this._borderRects}_getPointerFine(){return this._pointerFine}_setPointerFine(t){this._pointerFine=t}visitNodes(t){this._borders._forEachNode(t),this._root._forEachNode(t,0)}getNodeById(t){return this._idMap[t]}getFirstTabSet(t=this._root){const e=t.getChildren()[0];return e instanceof v?e:this.getFirstTabSet(e)}doAction(t){let e;switch(t.type){case h.ADD_NODE:{const i=new b(this,t.data.json,!0),s=this._idMap[t.data.toNode];(s instanceof v||s instanceof R||s instanceof f)&&(s.drop(i,r.getByName(t.data.location),t.data.index,t.data.select),e=i);break}case h.MOVE_NODE:{const e=this._idMap[t.data.fromNode];if(e instanceof b||e instanceof v){const i=this._idMap[t.data.toNode];(i instanceof v||i instanceof R||i instanceof f)&&i.drop(e,r.getByName(t.data.location),t.data.index,t.data.select)}break}case h.DELETE_TAB:{const e=this._idMap[t.data.node];e instanceof b&&e._delete();break}case h.DELETE_TABSET:{const e=this._idMap[t.data.node];if(e instanceof v){const t=[...e.getChildren()];for(let e=0;e<t.length;e++){const i=t[e];i.isEnableClose()&&i._delete()}0===e.getChildren().length&&e._delete(),this._tidy()}break}case h.FLOAT_TAB:{const e=this._idMap[t.data.node];e instanceof b&&(e._setFloating(!0),function(t){const e=t.getParent();if(null!==e)if(e instanceof v){let i=!1,s=0;const n=e.getChildren();for(let e=0;e<n.length;e++){const o=n[e];if(o===t)i=!0;else if(!o.isFloating()&&(s=e,i))break}e._setSelected(s)}else e instanceof R&&e._setSelected(-1)}(e));break}case h.UNFLOAT_TAB:{const e=this._idMap[t.data.node];e instanceof b&&(e._setFloating(!1),function(t){const e=t.getParent();if(null!==e&&(e instanceof v||e instanceof R)){const i=e.getChildren();for(let s=0;s<i.length;s++)if(i[s]===t)return void e._setSelected(s)}}(e));break}case h.RENAME_TAB:{const e=this._idMap[t.data.node];e instanceof b&&e._setName(t.data.text);break}case h.SELECT_TAB:{const e=this._idMap[t.data.tabNode];if(e instanceof b){const t=e.getParent(),i=t.getChildren().indexOf(e);t instanceof R?t.getSelected()===i?t._setSelected(-1):t._setSelected(i):t instanceof v&&(t.getSelected()!==i&&t._setSelected(i),this._activeTabSet=t)}break}case h.SET_ACTIVE_TABSET:if(void 0===t.data.tabsetNode)this._activeTabSet=void 0;else{const e=this._idMap[t.data.tabsetNode];e instanceof v&&(this._activeTabSet=e)}break;case h.ADJUST_SPLIT:{const e=this._idMap[t.data.node1],i=this._idMap[t.data.node2];(e instanceof v||e instanceof f)&&(i instanceof v||i instanceof f)&&(this._adjustSplitSide(e,t.data.weight1,t.data.pixelWidth1),this._adjustSplitSide(i,t.data.weight2,t.data.pixelWidth2));break}case h.ADJUST_BORDER_SPLIT:{const e=this._idMap[t.data.node];e instanceof R&&e._setSize(t.data.pos);break}case h.MAXIMIZE_TOGGLE:{const e=this._idMap[t.data.node];e instanceof v&&(e===this._maximizedTabSet?this._maximizedTabSet=void 0:(this._maximizedTabSet=e,this._activeTabSet=e));break}case h.UPDATE_MODEL_ATTRIBUTES:this._updateAttrs(t.data.json);break;case h.UPDATE_NODE_ATTRIBUTES:this._idMap[t.data.node]._updateAttrs(t.data.json)}return this._updateIdMap(),void 0!==this._changeListener&&this._changeListener(t),e}_updateIdMap(){this._idMap={},this.visitNodes((t=>this._idMap[t.getId()]=t))}_adjustSplitSide(t,e,s){t._setWeight(e),null!=t.getWidth()&&t.getOrientation()===i.VERT?t._updateAttrs({width:s}):null!=t.getHeight()&&t.getOrientation()===i.HORZ&&t._updateAttrs({height:s})}toJson(){const t={};return j._attributeDefinitions.toJson(t,this._attributes),this.visitNodes((t=>{t._fireEvent("save",void 0)})),{global:t,borders:this._borders._toJson(),layout:this._root.toJson()}}getSplitterSize(){let t=this._attributes.splitterSize;return-1===t&&(t=this._pointerFine?8:12),t}isLegacyOverflowMenu(){return this._attributes.legacyOverflowMenu}getSplitterExtra(){return this._attributes.splitterExtra}isEnableEdgeDock(){return this._attributes.enableEdgeDock}_addNode(t){const e=t.getId();if(void 0!==this._idMap[e])throw new Error(`Error: each node must have a unique id, duplicate id:${t.getId()}`);"splitter"!==t.getType()&&(this._idMap[e]=t)}_layout(t,e){var i;return this._borderRects=this._borders._layoutBorder({outer:t,inner:t},e),t=this._borderRects.inner.removeInsets(this._getAttribute("marginInsets")),null===(i=this._root)||void 0===i||i.calcMinSize(),this._root._layout(t,e),t}_findDropTargetNode(t,e,i){let s=this._root._findDropTargetNode(t,e,i);return void 0===s&&(s=this._borders._findDropTargetNode(t,e,i)),s}_tidy(){this._root._tidy()}_updateAttrs(t){j._attributeDefinitions.update(t,this._attributes)}_nextUniqueId(){return"#"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)))}_getAttribute(t){return this._attributes[t]}setOnAllowDrop(t){this._onAllowDrop=t}_getOnAllowDrop(){return this._onAllowDrop}setOnCreateTabSet(t){this._onCreateTabSet=t}_getOnCreateTabSet(){return this._onCreateTabSet}static toTypescriptInterfaces(){console.log(j._attributeDefinitions.toTypescriptInterface("Global",void 0)),console.log(f.getAttributeDefinitions().toTypescriptInterface("Row",j._attributeDefinitions)),console.log(v.getAttributeDefinitions().toTypescriptInterface("TabSet",j._attributeDefinitions)),console.log(b.getAttributeDefinitions().toTypescriptInterface("Tab",j._attributeDefinitions)),console.log(R.getAttributeDefinitions().toTypescriptInterface("Border",j._attributeDefinitions))}toString(){return JSON.stringify(this.toJson())}}j._attributeDefinitions=j._createAttributeDefinitions()})(),o})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.FlexLayout=e(require("react"),require("react-dom")):t.FlexLayout=e(t.React,t.ReactDOM)}(self,((t,e)=>(()=>{"use strict";var i={899:e=>{e.exports=t},994:t=>{t.exports=e}},s={};function n(t){var e=s[t];if(void 0!==e)return e.exports;var o=s[t]={exports:{}};return i[t](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{Action:()=>l,Actions:()=>h,BorderNode:()=>R,BorderSet:()=>Z,CLASSES:()=>g,DockLocation:()=>r,DragDrop:()=>d,DropInfo:()=>u,I18nLabel:()=>T,ICloseType:()=>E,Layout:()=>V,Model:()=>j,Node:()=>p,Orientation:()=>i,Rect:()=>s,RowNode:()=>f,SplitterNode:()=>m,TabNode:()=>b,TabSetNode:()=>v});var t=n(899),e=n(994);class i{static flip(t){return t===i.HORZ?i.VERT:i.HORZ}constructor(t){this._name=t}getName(){return this._name}toString(){return this._name}}i.HORZ=new i("horz"),i.VERT=new i("vert");class s{static empty(){return new s(0,0,0,0)}constructor(t,e,i,s){this.x=t,this.y=e,this.width=i,this.height=s}static fromElement(t){let{x:e,y:i,width:n,height:o}=t.getBoundingClientRect();return new s(e,i,n,o)}clone(){return new s(this.x,this.y,this.width,this.height)}equals(t){return this.x===(null==t?void 0:t.x)&&this.y===(null==t?void 0:t.y)&&this.width===(null==t?void 0:t.width)&&this.height===(null==t?void 0:t.height)}getBottom(){return this.y+this.height}getRight(){return this.x+this.width}getCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}positionElement(t,e){this.styleWithPosition(t.style,e)}styleWithPosition(t,e="absolute"){return t.left=this.x+"px",t.top=this.y+"px",t.width=Math.max(0,this.width)+"px",t.height=Math.max(0,this.height)+"px",t.position=e,t}contains(t,e){return this.x<=t&&t<=this.getRight()&&this.y<=e&&e<=this.getBottom()}removeInsets(t){return new s(this.x+t.left,this.y+t.top,Math.max(0,this.width-t.left-t.right),Math.max(0,this.height-t.top-t.bottom))}centerInRect(t){this.x=(t.width-this.width)/2,this.y=(t.height-this.height)/2}_getSize(t){let e=this.width;return t===i.VERT&&(e=this.height),e}toString(){return"(Rect: x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"}}class r{static getByName(t){return r.values[t]}static getLocation(t,e,i){if(e=(e-t.x)/t.width,i=(i-t.y)/t.height,e>=.25&&e<.75&&i>=.25&&i<.75)return r.CENTER;const s=i>=1-e;return i>=e?s?r.BOTTOM:r.LEFT:s?r.RIGHT:r.TOP}constructor(t,e,i){this._name=t,this._orientation=e,this._indexPlus=i,r.values[this._name]=this}getName(){return this._name}getOrientation(){return this._orientation}getDockRect(t){return this===r.TOP?new s(t.x,t.y,t.width,t.height/2):this===r.BOTTOM?new s(t.x,t.getBottom()-t.height/2,t.width,t.height/2):this===r.LEFT?new s(t.x,t.y,t.width/2,t.height):this===r.RIGHT?new s(t.getRight()-t.width/2,t.y,t.width/2,t.height):t.clone()}split(t,e){return this===r.TOP?{start:new s(t.x,t.y,t.width,e),end:new s(t.x,t.y+e,t.width,t.height-e)}:this===r.LEFT?{start:new s(t.x,t.y,e,t.height),end:new s(t.x+e,t.y,t.width-e,t.height)}:this===r.RIGHT?{start:new s(t.getRight()-e,t.y,e,t.height),end:new s(t.x,t.y,t.width-e,t.height)}:{start:new s(t.x,t.getBottom()-e,t.width,e),end:new s(t.x,t.y,t.width,t.height-e)}}reflect(){return this===r.TOP?r.BOTTOM:this===r.LEFT?r.RIGHT:this===r.RIGHT?r.LEFT:r.TOP}toString(){return"(DockLocation: name="+this._name+", orientation="+this._orientation+")"}}r.values={},r.TOP=new r("top",i.VERT,0),r.BOTTOM=new r("bottom",i.VERT,1),r.LEFT=new r("left",i.HORZ,0),r.RIGHT=new r("right",i.HORZ,1),r.CENTER=new r("center",i.VERT,0);const a=!("undefined"==typeof window||!window.document||!window.document.createElement);class d{constructor(){this._manualGlassManagement=!1,this._startX=0,this._startY=0,this._dragDepth=0,this._glassShowing=!1,this._dragging=!1,this._active=!1,a&&(this._glass=document.createElement("div"),this._glass.style.zIndex="998",this._glass.style.backgroundColor="transparent",this._glass.style.outline="none"),this._defaultGlassCursor="default",this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onKeyPress=this._onKeyPress.bind(this),this._onDragCancel=this._onDragCancel.bind(this),this._onDragEnter=this._onDragEnter.bind(this),this._onDragLeave=this._onDragLeave.bind(this),this.resizeGlass=this.resizeGlass.bind(this),this._lastClick=0,this._clickX=0,this._clickY=0}addGlass(t){var e;this._glassShowing?this._manualGlassManagement=!0:(this._document||(this._document=window.document),this._rootElement||(this._rootElement=this._document.body),this.resizeGlass(),null===(e=this._document.defaultView)||void 0===e||e.addEventListener("resize",this.resizeGlass),this._document.body.appendChild(this._glass),this._glass.tabIndex=-1,this._glass.focus(),this._glass.addEventListener("keydown",this._onKeyPress),this._glass.addEventListener("dragenter",this._onDragEnter,{passive:!1}),this._glass.addEventListener("dragover",this._onMouseMove,{passive:!1}),this._glass.addEventListener("dragleave",this._onDragLeave,{passive:!1}),this._glassShowing=!0,this._fDragCancel=t,this._manualGlassManagement=!1)}resizeGlass(){s.fromElement(this._rootElement).positionElement(this._glass,"fixed")}hideGlass(){var t;this._glassShowing&&(this._document.body.removeChild(this._glass),null===(t=this._document.defaultView)||void 0===t||t.removeEventListener("resize",this.resizeGlass),this._glassShowing=!1,this._document=void 0,this._rootElement=void 0,this.setGlassCursorOverride(void 0))}_updateGlassCursor(){var t;this._glass.style.cursor=null!==(t=this._glassCursorOverride)&&void 0!==t?t:this._defaultGlassCursor}_setDefaultGlassCursor(t){this._defaultGlassCursor=t,this._updateGlassCursor()}setGlassCursorOverride(t){this._glassCursorOverride=t,this._updateGlassCursor()}startDrag(t,e,i,s,n,o,r,a,d){if(t&&this._lastEvent&&this._lastEvent.type.startsWith("touch")&&t.type.startsWith("mouse")&&t.timeStamp-this._lastEvent.timeStamp<500)return;if(this._dragging)return;this._lastEvent=t,this._document=a||window.document,this._rootElement=d||this._document.body;const l=this._getLocationEvent(t);this.addGlass(n),t?(this._startX=l.clientX,this._startY=l.clientY,window.matchMedia&&!window.matchMedia("(pointer: fine)").matches||this._setDefaultGlassCursor(getComputedStyle(t.target).cursor),this._stopPropagation(t),this._preventDefault(t)):(this._startX=0,this._startY=0,this._setDefaultGlassCursor("default")),this._dragging=!1,this._fDragStart=e,this._fDragMove=i,this._fDragEnd=s,this._fDragCancel=n,this._fClick=o,this._fDblClick=r,this._active=!0,"dragenter"===(null==t?void 0:t.type)?(this._dragDepth=1,this._rootElement.addEventListener("dragenter",this._onDragEnter,{passive:!1}),this._rootElement.addEventListener("dragover",this._onMouseMove,{passive:!1}),this._rootElement.addEventListener("dragleave",this._onDragLeave,{passive:!1}),this._document.addEventListener("dragend",this._onDragCancel,{passive:!1}),this._document.addEventListener("drop",this._onMouseUp,{passive:!1})):(this._document.addEventListener("mouseup",this._onMouseUp,{passive:!1}),this._document.addEventListener("mousemove",this._onMouseMove,{passive:!1}),this._document.addEventListener("touchend",this._onMouseUp,{passive:!1}),this._document.addEventListener("touchmove",this._onMouseMove,{passive:!1}))}isDragging(){return this._dragging}isActive(){return this._active}toString(){return"(DragDrop: startX="+this._startX+", startY="+this._startY+", dragging="+this._dragging+")"}_onKeyPress(t){"Escape"===t.code&&this._onDragCancel()}_onDragCancel(){this._rootElement.removeEventListener("dragenter",this._onDragEnter),this._rootElement.removeEventListener("dragover",this._onMouseMove),this._rootElement.removeEventListener("dragleave",this._onDragLeave),this._document.removeEventListener("dragend",this._onDragCancel),this._document.removeEventListener("drop",this._onMouseUp),this._document.removeEventListener("mousemove",this._onMouseMove),this._document.removeEventListener("mouseup",this._onMouseUp),this._document.removeEventListener("touchend",this._onMouseUp),this._document.removeEventListener("touchmove",this._onMouseMove),this.hideGlass(),void 0!==this._fDragCancel&&this._fDragCancel(this._dragging),this._dragging=!1,this._active=!1}_getLocationEvent(t){let e=t;return t&&t.touches&&(e=t.touches[0]),e}_getLocationEventEnd(t){let e=t;return t.changedTouches&&(e=t.changedTouches[0]),e}_stopPropagation(t){t.stopPropagation&&t.stopPropagation()}_preventDefault(t){return t.preventDefault&&t.cancelable&&t.preventDefault(),t}_onMouseMove(t){this._lastEvent=t;const e=this._getLocationEvent(t);return this._stopPropagation(t),this._preventDefault(t),!this._dragging&&(Math.abs(this._startX-e.clientX)>5||Math.abs(this._startY-e.clientY)>5)&&(this._dragging=!0,this._fDragStart&&(this._setDefaultGlassCursor("move"),this._dragging=this._fDragStart({clientX:this._startX,clientY:this._startY}))),this._dragging&&this._fDragMove&&this._fDragMove(e),!1}_onMouseUp(t){this._lastEvent=t;const e=this._getLocationEventEnd(t);if(this._stopPropagation(t),this._preventDefault(t),this._active=!1,this._rootElement.removeEventListener("dragenter",this._onDragEnter),this._rootElement.removeEventListener("dragover",this._onMouseMove),this._rootElement.removeEventListener("dragleave",this._onDragLeave),this._document.removeEventListener("dragend",this._onDragCancel),this._document.removeEventListener("drop",this._onMouseUp),this._document.removeEventListener("mousemove",this._onMouseMove),this._document.removeEventListener("mouseup",this._onMouseUp),this._document.removeEventListener("touchend",this._onMouseUp),this._document.removeEventListener("touchmove",this._onMouseMove),this._manualGlassManagement||this.hideGlass(),this._dragging)this._dragging=!1,this._fDragEnd&&this._fDragEnd(t);else if(this._fDragCancel&&this._fDragCancel(this._dragging),Math.abs(this._startX-e.clientX)<=5&&Math.abs(this._startY-e.clientY)<=5){let i=!1;const s=(new Date).getTime();Math.abs(this._clickX-e.clientX)<=5&&Math.abs(this._clickY-e.clientY)<=5&&s-this._lastClick<500&&this._fDblClick&&(this._fDblClick(t),i=!0),!i&&this._fClick&&this._fClick(t),this._lastClick=s,this._clickX=e.clientX,this._clickY=e.clientY}return!1}_onDragEnter(t){return this._preventDefault(t),this._stopPropagation(t),this._dragDepth++,!1}_onDragLeave(t){return this._preventDefault(t),this._stopPropagation(t),this._dragDepth--,this._dragDepth<=0&&this._onDragCancel(),!1}}d.instance=new d;class l{constructor(t,e){this.type=t,this.data=e}}class h{static addNode(t,e,i,s,n){return new l(h.ADD_NODE,{json:t,toNode:e,location:i.getName(),index:s,select:n})}static moveNode(t,e,i,s,n){return new l(h.MOVE_NODE,{fromNode:t,toNode:e,location:i.getName(),index:s,select:n})}static deleteTab(t){return new l(h.DELETE_TAB,{node:t})}static deleteTabset(t){return new l(h.DELETE_TABSET,{node:t})}static renameTab(t,e){return new l(h.RENAME_TAB,{node:t,text:e})}static selectTab(t){return new l(h.SELECT_TAB,{tabNode:t})}static setActiveTabset(t){return new l(h.SET_ACTIVE_TABSET,{tabsetNode:t})}static adjustSplit(t){const e=t.node1Id,i=t.node2Id;return new l(h.ADJUST_SPLIT,{node1:e,weight1:t.weight1,pixelWidth1:t.pixelWidth1,node2:i,weight2:t.weight2,pixelWidth2:t.pixelWidth2})}static adjustBorderSplit(t,e){return new l(h.ADJUST_BORDER_SPLIT,{node:t,pos:e})}static maximizeToggle(t){return new l(h.MAXIMIZE_TOGGLE,{node:t})}static updateModelAttributes(t){return new l(h.UPDATE_MODEL_ATTRIBUTES,{json:t})}static updateNodeAttributes(t,e){return new l(h.UPDATE_NODE_ATTRIBUTES,{node:t,json:e})}static floatTab(t){return new l(h.FLOAT_TAB,{node:t})}static unFloatTab(t){return new l(h.UNFLOAT_TAB,{node:t})}}h.ADD_NODE="FlexLayout_AddNode",h.MOVE_NODE="FlexLayout_MoveNode",h.DELETE_TAB="FlexLayout_DeleteTab",h.DELETE_TABSET="FlexLayout_DeleteTabset",h.RENAME_TAB="FlexLayout_RenameTab",h.SELECT_TAB="FlexLayout_SelectTab",h.SET_ACTIVE_TABSET="FlexLayout_SetActiveTabset",h.ADJUST_SPLIT="FlexLayout_AdjustSplit",h.ADJUST_BORDER_SPLIT="FlexLayout_AdjustBorderSplit",h.MAXIMIZE_TOGGLE="FlexLayout_MaximizeToggle",h.UPDATE_MODEL_ATTRIBUTES="FlexLayout_UpdateModelAttributes",h.UPDATE_NODE_ATTRIBUTES="FlexLayout_UpdateNodeAttributes",h.FLOAT_TAB="FlexLayout_FloatTab",h.UNFLOAT_TAB="FlexLayout_UnFloatTab";class _{constructor(t,e,i,s){this.name=t,this.modelName=e,this.defaultValue=i,this.alwaysWriteJson=s,this.required=!1,this.fixed=!1,this.type="any"}setType(t){return this.type=t,this}setRequired(){return this.required=!0,this}setFixed(){return this.fixed=!0,this}}_.NUMBER="number",_.STRING="string",_.BOOLEAN="boolean";class c{constructor(){this.attributes=[],this.nameToAttribute={}}addWithAll(t,e,i,s){const n=new _(t,e,i,s);return this.attributes.push(n),this.nameToAttribute[t]=n,n}addInherited(t,e){return this.addWithAll(t,e,void 0,!1)}add(t,e,i){return this.addWithAll(t,void 0,e,i)}getAttributes(){return this.attributes}getModelName(t){const e=this.nameToAttribute[t];if(void 0!==e)return e.modelName}toJson(t,e){for(const i of this.attributes){const s=e[i.name];(i.alwaysWriteJson||s!==i.defaultValue)&&(t[i.name]=s)}}fromJson(t,e){for(const i of this.attributes){const s=t[i.name];e[i.name]=void 0===s?i.defaultValue:s}}update(t,e){for(const i of this.attributes)if(t.hasOwnProperty(i.name)){const s=t[i.name];void 0===s?delete e[i.name]:e[i.name]=s}}setDefaults(t){for(const e of this.attributes)t[e.name]=e.defaultValue}toTypescriptInterface(t,e){const i=[],s=this.attributes.sort(((t,e)=>t.name.localeCompare(e.name)));i.push("export interface I"+t+"Attributes {");for(let t=0;t<s.length;t++){const n=s[t];let o,r,a=n.type,d=n;void 0!==d.defaultValue?o=d.defaultValue:void 0!==d.modelName&&void 0!==e&&void 0!==e.nameToAttribute[d.modelName]&&(r=d.modelName,d=e.nameToAttribute[d.modelName],o=d.defaultValue,a=d.type);let l=JSON.stringify(o);const h=d.required||d.fixed?"":"?";if(n.fixed)i.push("\t"+n.name+": "+l+";");else{const t=(void 0!==o?"default: "+l:"")+(void 0!==r?" - inherited from global "+r:"");i.push("\t"+n.name+h+": "+a+";"+(t.length>0?" // "+t:""))}}return i.push("}"),i.join("\n")}}class u{constructor(t,e,i,s,n){this.node=t,this.rect=e,this.location=i,this.index=s,this.className=n}}var g,T,E;!function(t){t.FLEXLAYOUT__BORDER="flexlayout__border",t.FLEXLAYOUT__BORDER_="flexlayout__border_",t.FLEXLAYOUT__BORDER_BUTTON="flexlayout__border_button",t.FLEXLAYOUT__BORDER_BUTTON_="flexlayout__border_button_",t.FLEXLAYOUT__BORDER_BUTTON_CONTENT="flexlayout__border_button_content",t.FLEXLAYOUT__BORDER_BUTTON_LEADING="flexlayout__border_button_leading",t.FLEXLAYOUT__BORDER_BUTTON_TRAILING="flexlayout__border_button_trailing",t.FLEXLAYOUT__BORDER_BUTTON__SELECTED="flexlayout__border_button--selected",t.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED="flexlayout__border_button--unselected",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW="flexlayout__border_toolbar_button_overflow",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_="flexlayout__border_toolbar_button_overflow_",t.FLEXLAYOUT__BORDER_INNER="flexlayout__border_inner",t.FLEXLAYOUT__BORDER_INNER_="flexlayout__border_inner_",t.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER="flexlayout__border_inner_tab_container",t.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_="flexlayout__border_inner_tab_container_",t.FLEXLAYOUT__BORDER_TAB_DIVIDER="flexlayout__border_tab_divider",t.FLEXLAYOUT__BORDER_SIZER="flexlayout__border_sizer",t.FLEXLAYOUT__BORDER_TOOLBAR="flexlayout__border_toolbar",t.FLEXLAYOUT__BORDER_TOOLBAR_="flexlayout__border_toolbar_",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON="flexlayout__border_toolbar_button",t.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT="flexlayout__border_toolbar_button-float",t.FLEXLAYOUT__DRAG_RECT="flexlayout__drag_rect",t.FLEXLAYOUT__EDGE_RECT="flexlayout__edge_rect",t.FLEXLAYOUT__EDGE_RECT_TOP="flexlayout__edge_rect_top",t.FLEXLAYOUT__EDGE_RECT_LEFT="flexlayout__edge_rect_left",t.FLEXLAYOUT__EDGE_RECT_BOTTOM="flexlayout__edge_rect_bottom",t.FLEXLAYOUT__EDGE_RECT_RIGHT="flexlayout__edge_rect_right",t.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER="flexlayout__error_boundary_container",t.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT="flexlayout__error_boundary_content",t.FLEXLAYOUT__FLOATING_WINDOW_CONTENT="flexlayout__floating_window_content",t.FLEXLAYOUT__FLOATING_WINDOW_TAB="flexlayout__floating_window_tab",t.FLEXLAYOUT__LAYOUT="flexlayout__layout",t.FLEXLAYOUT__OUTLINE_RECT="flexlayout__outline_rect",t.FLEXLAYOUT__OUTLINE_RECT_EDGE="flexlayout__outline_rect_edge",t.FLEXLAYOUT__SPLITTER="flexlayout__splitter",t.FLEXLAYOUT__SPLITTER_EXTRA="flexlayout__splitter_extra",t.FLEXLAYOUT__SPLITTER_="flexlayout__splitter_",t.FLEXLAYOUT__SPLITTER_BORDER="flexlayout__splitter_border",t.FLEXLAYOUT__SPLITTER_DRAG="flexlayout__splitter_drag",t.FLEXLAYOUT__TAB="flexlayout__tab",t.FLEXLAYOUT__TABSET="flexlayout__tabset",t.FLEXLAYOUT__TABSET_HEADER="flexlayout__tabset_header",t.FLEXLAYOUT__TABSET_HEADER_SIZER="flexlayout__tabset_header_sizer",t.FLEXLAYOUT__TABSET_HEADER_CONTENT="flexlayout__tabset_header_content",t.FLEXLAYOUT__TABSET_MAXIMIZED="flexlayout__tabset-maximized",t.FLEXLAYOUT__TABSET_SELECTED="flexlayout__tabset-selected",t.FLEXLAYOUT__TABSET_SIZER="flexlayout__tabset_sizer",t.FLEXLAYOUT__TABSET_TAB_DIVIDER="flexlayout__tabset_tab_divider",t.FLEXLAYOUT__TABSET_CONTENT="flexlayout__tabset_content",t.FLEXLAYOUT__TABSET_TABBAR_INNER="flexlayout__tabset_tabbar_inner",t.FLEXLAYOUT__TABSET_TABBAR_INNER_="flexlayout__tabset_tabbar_inner_",t.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER="flexlayout__tabset_tabbar_inner_tab_container",t.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_="flexlayout__tabset_tabbar_inner_tab_container_",t.FLEXLAYOUT__TABSET_TABBAR_OUTER="flexlayout__tabset_tabbar_outer",t.FLEXLAYOUT__TABSET_TABBAR_OUTER_="flexlayout__tabset_tabbar_outer_",t.FLEXLAYOUT__TAB_BORDER="flexlayout__tab_border",t.FLEXLAYOUT__TAB_BORDER_="flexlayout__tab_border_",t.FLEXLAYOUT__TAB_BUTTON="flexlayout__tab_button",t.FLEXLAYOUT__TAB_BUTTON_STRETCH="flexlayout__tab_button_stretch",t.FLEXLAYOUT__TAB_BUTTON_CONTENT="flexlayout__tab_button_content",t.FLEXLAYOUT__TAB_BUTTON_LEADING="flexlayout__tab_button_leading",t.FLEXLAYOUT__TAB_BUTTON_OVERFLOW="flexlayout__tab_button_overflow",t.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT="flexlayout__tab_button_overflow_count",t.FLEXLAYOUT__TAB_BUTTON_TEXTBOX="flexlayout__tab_button_textbox",t.FLEXLAYOUT__TAB_BUTTON_TRAILING="flexlayout__tab_button_trailing",t.FLEXLAYOUT__TAB_BUTTON_STAMP="flexlayout__tab_button_stamp",t.FLEXLAYOUT__TAB_FLOATING="flexlayout__tab_floating",t.FLEXLAYOUT__TAB_FLOATING_INNER="flexlayout__tab_floating_inner",t.FLEXLAYOUT__TAB_TOOLBAR="flexlayout__tab_toolbar",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON="flexlayout__tab_toolbar_button",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_="flexlayout__tab_toolbar_button-",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT="flexlayout__tab_toolbar_button-float",t.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER="flexlayout__tab_toolbar_sticky_buttons_container",t.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE="flexlayout__tab_toolbar_button-close",t.FLEXLAYOUT__POPUP_MENU_CONTAINER="flexlayout__popup_menu_container",t.FLEXLAYOUT__POPUP_MENU_ITEM="flexlayout__popup_menu_item",t.FLEXLAYOUT__POPUP_MENU="flexlayout__popup_menu"}(g||(g={}));class p{constructor(t){this._dirty=!1,this._tempSize=0,this._model=t,this._attributes={},this._children=[],this._fixed=!1,this._rect=s.empty(),this._visible=!1,this._listeners={}}getId(){let t=this._attributes.id;return void 0!==t||(t=this._model._nextUniqueId(),this._setId(t)),t}getModel(){return this._model}getType(){return this._attributes.type}getParent(){return this._parent}getChildren(){return this._children}getRect(){return this._rect}isVisible(){return this._visible}getOrientation(){return void 0===this._parent?this._model.isRootOrientationVertical()?i.VERT:i.HORZ:i.flip(this._parent.getOrientation())}setEventListener(t,e){this._listeners[t]=e}removeEventListener(t){delete this._listeners[t]}_setId(t){this._attributes.id=t}_fireEvent(t,e){void 0!==this._listeners[t]&&this._listeners[t](e)}_getAttr(t){let e=this._attributes[t];if(void 0===e){const i=this._getAttributeDefinitions().getModelName(t);void 0!==i&&(e=this._model._getAttribute(i))}return e}_forEachNode(t,e){t(this,e),e++;for(const i of this._children)i._forEachNode(t,e)}_setVisible(t){t!==this._visible&&(this._fireEvent("visibility",{visible:t}),this._visible=t)}_getDrawChildren(){return this._children}_setParent(t){this._parent=t}_setRect(t){this._rect=t}_setWeight(t){this._attributes.weight=t}_setSelected(t){this._attributes.selected=t}_isFixed(){return this._fixed}_layout(t,e){this._rect=t}_findDropTargetNode(t,e,i){let s;if(this._rect.contains(e,i))if(void 0!==this._model.getMaximizedTabset())s=this._model.getMaximizedTabset().canDrop(t,e,i);else if(s=this.canDrop(t,e,i),void 0===s&&0!==this._children.length)for(const n of this._children)if(s=n._findDropTargetNode(t,e,i),void 0!==s)break;return s}canDrop(t,e,i){}_canDockInto(t,e){if(null!=e){if(e.location===r.CENTER&&!1===e.node.isEnableDrop())return!1;if(e.location===r.CENTER&&"tabset"===t.getType()&&void 0!==t.getName())return!1;if(e.location!==r.CENTER&&!1===e.node.isEnableDivide())return!1;if(this._model._getOnAllowDrop())return this._model._getOnAllowDrop()(t,e)}return!0}_removeChild(t){const e=this._children.indexOf(t);return-1!==e&&this._children.splice(e,1),this._dirty=!0,e}_addChild(t,e){return null!=e?this._children.splice(e,0,t):(this._children.push(t),e=this._children.length-1),t._parent=this,this._dirty=!0,e}_removeAll(){this._children=[],this._dirty=!0}_styleWithPosition(t){return null==t&&(t={}),this._rect.styleWithPosition(t)}_getTempSize(){return this._tempSize}_setTempSize(t){this._tempSize=t}isEnableDivide(){return!0}_toAttributeString(){return JSON.stringify(this._attributes,void 0,"\t")}}class m extends p{constructor(t){super(t),this._fixed=!0,this._attributes.type=m.TYPE,t._addNode(this)}getWidth(){return this._model.getSplitterSize()}getMinWidth(){return this.getOrientation()===i.VERT?this._model.getSplitterSize():0}getHeight(){return this._model.getSplitterSize()}getMinHeight(){return this.getOrientation()===i.HORZ?this._model.getSplitterSize():0}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getWeight(){return 0}_setWeight(t){}_getPrefSize(t){return this._model.getSplitterSize()}_updateAttrs(t){}_getAttributeDefinitions(){return new c}toJson(){}}m.TYPE="splitter";class b extends p{static _fromJson(t,e,i=!0){return new b(e,t,i)}static _createAttributeDefinitions(){const t=new c;return t.add("type",b.TYPE,!0).setType(_.STRING),t.add("id",void 0).setType(_.STRING),t.add("name","[Unnamed Tab]").setType(_.STRING),t.add("altName",void 0).setType(_.STRING),t.add("helpText",void 0).setType(_.STRING),t.add("component",void 0).setType(_.STRING),t.add("config",void 0).setType("any"),t.add("floating",!1).setType(_.BOOLEAN),t.add("tabsetClassName",void 0).setType(_.STRING),t.addInherited("enableClose","tabEnableClose").setType(_.BOOLEAN),t.addInherited("closeType","tabCloseType").setType("ICloseType"),t.addInherited("enableDrag","tabEnableDrag").setType(_.BOOLEAN),t.addInherited("enableRename","tabEnableRename").setType(_.BOOLEAN),t.addInherited("className","tabClassName").setType(_.STRING),t.addInherited("contentClassName","tabContentClassName").setType(_.STRING),t.addInherited("icon","tabIcon").setType(_.STRING),t.addInherited("enableRenderOnDemand","tabEnableRenderOnDemand").setType(_.BOOLEAN),t.addInherited("enableFloat","tabEnableFloat").setType(_.BOOLEAN),t.addInherited("borderWidth","tabBorderWidth").setType(_.NUMBER),t.addInherited("borderHeight","tabBorderHeight").setType(_.NUMBER),t}constructor(t,e,i=!0){super(t),this._extra={},b._attributeDefinitions.fromJson(e,this._attributes),!0===i&&t._addNode(this)}getWindow(){return this._window}getTabRect(){return this._tabRect}_setTabRect(t){this._tabRect=t}_setRenderedName(t){this._renderedName=t}_getNameForOverflowMenu(){const t=this._getAttr("altName");return void 0!==t?t:this._renderedName}getName(){return this._getAttr("name")}getHelpText(){return this._getAttr("helpText")}getComponent(){return this._getAttr("component")}getConfig(){return this._attributes.config}getExtraData(){return this._extra}isFloating(){return this._getAttr("floating")}getIcon(){return this._getAttr("icon")}isEnableClose(){return this._getAttr("enableClose")}getCloseType(){return this._getAttr("closeType")}isEnableFloat(){return this._getAttr("enableFloat")}isEnableDrag(){return this._getAttr("enableDrag")}isEnableRename(){return this._getAttr("enableRename")}getClassName(){return this._getAttr("className")}getContentClassName(){return this._getAttr("contentClassName")}getTabSetClassName(){return this._getAttr("tabsetClassName")}isEnableRenderOnDemand(){return this._getAttr("enableRenderOnDemand")}_setName(t){this._attributes.name=t,this._window&&this._window.document&&(this._window.document.title=t)}_setFloating(t){this._attributes.floating=t}_layout(t,e){t.equals(this._rect)||this._fireEvent("resize",{rect:t}),this._rect=t}_delete(){this._parent._remove(this),this._fireEvent("close",{})}toJson(){const t={};return b._attributeDefinitions.toJson(t,this._attributes),t}_updateAttrs(t){b._attributeDefinitions.update(t,this._attributes)}_getAttributeDefinitions(){return b._attributeDefinitions}_setWindow(t){this._window=t}_setBorderWidth(t){this._attributes.borderWidth=t}_setBorderHeight(t){this._attributes.borderHeight=t}static getAttributeDefinitions(){return b._attributeDefinitions}}b.TYPE="tab",b._attributeDefinitions=b._createAttributeDefinitions();class f extends p{static _fromJson(t,e){const i=new f(e,t);if(null!=t.children)for(const s of t.children)if(s.type===v.TYPE){const t=v._fromJson(s,e);i._addChild(t)}else{const t=f._fromJson(s,e);i._addChild(t)}return i}static _createAttributeDefinitions(){const t=new c;return t.add("type",f.TYPE,!0).setType(_.STRING).setFixed(),t.add("id",void 0).setType(_.STRING),t.add("weight",100).setType(_.NUMBER),t.add("width",void 0).setType(_.NUMBER),t.add("height",void 0).setType(_.NUMBER),t}constructor(t,e){super(t),this._dirty=!0,this._drawChildren=[],this._minHeight=0,this._minWidth=0,f._attributeDefinitions.fromJson(e,this._attributes),t._addNode(this)}getWeight(){return this._attributes.weight}getWidth(){return this._getAttr("width")}getHeight(){return this._getAttr("height")}_setWeight(t){this._attributes.weight=t}_layout(t,e){super._layout(t,e);const n=this._rect._getSize(this.getOrientation());let o=0,r=0,a=0,d=0;const l=this._getDrawChildren();for(const t of l){const e=t._getPrefSize(this.getOrientation());t._isFixed()?void 0!==e&&(r+=e):void 0===e?o+=t.getWeight():(a+=e,d+=t.getWeight())}let h=!1,_=n-r-a;_<0&&(_=n-r,h=!0,o+=d);let c=0,u=0;for(const t of l){const e=t._getPrefSize(this.getOrientation());if(t._isFixed())void 0!==e&&t._setTempSize(e);else if(null==e||h){if(0===o)t._setTempSize(0);else{const e=t.getMinSize(this.getOrientation()),i=Math.floor(_*(t.getWeight()/o));t._setTempSize(Math.max(e,i))}u+=t._getTempSize()}else t._setTempSize(e);c+=t._getTempSize()}if(u>0){for(;c<n;)for(const t of l)if(!(t instanceof m)){const e=t._getPrefSize(this.getOrientation());!t._isFixed()&&(void 0===e||h)&&c<n&&(t._setTempSize(t._getTempSize()+1),c++)}for(;c>n;){let t=!1;for(const e of l)if(!(e instanceof m)){const i=e.getMinSize(this.getOrientation());e._getTempSize()>i&&c>n&&(e._setTempSize(e._getTempSize()-1),c--,t=!0)}if(!t)break}for(;c>n;){let t=!1;for(const e of l)e instanceof m||e._getTempSize()>0&&c>n&&(e._setTempSize(e._getTempSize()-1),c--,t=!0);if(!t)break}}let g=0;for(const t of l)this.getOrientation()===i.HORZ?t._layout(new s(this._rect.x+g,this._rect.y,t._getTempSize(),this._rect.height),e):t._layout(new s(this._rect.x,this._rect.y+g,this._rect.width,t._getTempSize()),e),g+=t._getTempSize();return!0}_getSplitterBounds(t,e=!1){const s=[0,0],n=this._getDrawChildren(),o=n.indexOf(t),r=n[o-1],a=n[o+1];if(this.getOrientation()===i.HORZ){const i=e?r.getMinWidth():0,n=e?a.getMinWidth():0;s[0]=r.getRect().x+i,s[1]=a.getRect().getRight()-t.getWidth()-n}else{const i=e?r.getMinHeight():0,n=e?a.getMinHeight():0;s[0]=r.getRect().y+i,s[1]=a.getRect().getBottom()-t.getHeight()-n}return s}_calculateSplit(t,e){let i;const s=this._getDrawChildren(),n=s.indexOf(t),o=this._getSplitterBounds(t),r=s[n-1].getWeight()+s[n+1].getWeight(),a=Math.max(0,e-o[0]),d=Math.max(0,o[1]-e);if(a+d>0){const t=a*r/(a+d),e=d*r/(a+d);i={node1Id:s[n-1].getId(),weight1:t,pixelWidth1:a,node2Id:s[n+1].getId(),weight2:e,pixelWidth2:d}}return i}_getDrawChildren(){if(this._dirty){this._drawChildren=[];for(let t=0;t<this._children.length;t++){const e=this._children[t];if(0!==t){const t=new m(this._model);t._setParent(this),this._drawChildren.push(t)}this._drawChildren.push(e)}this._dirty=!1}return this._drawChildren}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getMinWidth(){return this._minWidth}getMinHeight(){return this._minHeight}calcMinSize(){this._minHeight=0,this._minWidth=0;let t=!0;for(const e of this._children){const s=e;s instanceof f&&s.calcMinSize(),this.getOrientation()===i.VERT?(this._minHeight+=s.getMinHeight(),t||(this._minHeight+=this._model.getSplitterSize()),this._minWidth=Math.max(this._minWidth,s.getMinWidth())):(this._minWidth+=s.getMinWidth(),t||(this._minWidth+=this._model.getSplitterSize()),this._minHeight=Math.max(this._minHeight,s.getMinHeight())),t=!1}}_tidy(){let t=0;for(;t<this._children.length;){const e=this._children[t];if(e instanceof f){e._tidy();const i=e.getChildren();if(0===i.length)this._removeChild(e);else if(1===i.length){const s=i[0];if(this._removeChild(e),s instanceof f){let i=0;const n=s.getChildren();for(const t of n)i+=t.getWeight();for(let s=0;s<n.length;s++){const o=n[s];o._setWeight(e.getWeight()*o.getWeight()/i),this._addChild(o,t+s)}}else s._setWeight(e.getWeight()),this._addChild(s,t)}else t++}else e instanceof v&&0===e.getChildren().length&&e.isEnableDeleteWhenEmpty()?(this._removeChild(e),e===this._model.getMaximizedTabset()&&this._model._setMaximizedTabset(void 0)):t++}if(this===this._model.getRoot()&&0===this._children.length){const t=this._model._getOnCreateTabSet();let e=t?t():{};e=Object.assign(Object.assign({},e),{selected:-1});const i=new v(this._model,e);this._model._setActiveTabset(i),this._addChild(i)}}canDrop(t,e,i){const s=i-this._rect.y,n=e-this._rect.x,o=this._rect.width,a=this._rect.height,d=50;let l;if(this._model.isEnableEdgeDock()&&void 0===this._parent){if(e<this._rect.x+10&&s>a/2-d&&s<a/2+d){const t=r.LEFT,e=t.getDockRect(this._rect);e.width=e.width/2,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(e>this._rect.getRight()-10&&s>a/2-d&&s<a/2+d){const t=r.RIGHT,e=t.getDockRect(this._rect);e.width=e.width/2,e.x+=e.width,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(i<this._rect.y+10&&n>o/2-d&&n<o/2+d){const t=r.TOP,e=t.getDockRect(this._rect);e.height=e.height/2,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(i>this._rect.getBottom()-10&&n>o/2-d&&n<o/2+d){const t=r.BOTTOM,e=t.getDockRect(this._rect);e.height=e.height/2,e.y+=e.height,l=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT_EDGE)}if(void 0!==l&&!t._canDockInto(t,l))return}return l}drop(t,e,i){const s=e,n=t.getParent();let o;if(n&&n._removeChild(t),void 0!==n&&n.getType()===v.TYPE&&n._setSelected(0),void 0!==n&&n.getType()===R.TYPE&&n._setSelected(-1),t instanceof v)o=t;else{const e=this._model._getOnCreateTabSet();o=new v(this._model,e?e(t):{}),o._addChild(t)}let a=this._children.reduce(((t,e)=>t+e.getWeight()),0);0===a&&(a=100),o._setWeight(a/3);const d=!this._model.isRootOrientationVertical();if(d&&s===r.LEFT||!d&&s===r.TOP)this._addChild(o,0);else if(d&&s===r.RIGHT||!d&&s===r.BOTTOM)this._addChild(o);else if(d&&s===r.TOP||!d&&s===r.LEFT){const t=new f(this._model,{}),e=new f(this._model,{});e._setWeight(75),o._setWeight(25);for(const t of this._children)e._addChild(t);this._removeAll(),t._addChild(o),t._addChild(e),this._addChild(t)}else if(d&&s===r.BOTTOM||!d&&s===r.RIGHT){const t=new f(this._model,{}),e=new f(this._model,{});e._setWeight(75),o._setWeight(25);for(const t of this._children)e._addChild(t);this._removeAll(),t._addChild(e),t._addChild(o),this._addChild(t)}this._model._setActiveTabset(o),this._model._tidy()}toJson(){const t={};f._attributeDefinitions.toJson(t,this._attributes),t.children=[];for(const e of this._children)t.children.push(e.toJson());return t}isEnableDrop(){return!0}_getPrefSize(t){let e=this.getWidth();return t===i.VERT&&(e=this.getHeight()),e}_getAttributeDefinitions(){return f._attributeDefinitions}_updateAttrs(t){f._attributeDefinitions.update(t,this._attributes)}static getAttributeDefinitions(){return f._attributeDefinitions}}f.TYPE="row",f._attributeDefinitions=f._createAttributeDefinitions();class v extends p{static _fromJson(t,e){const i=new v(e,t);if(null!=t.children)for(const s of t.children){const t=b._fromJson(s,e);i._addChild(t)}return 0===i._children.length&&i._setSelected(-1),t.maximized&&!0===t.maximized&&e._setMaximizedTabset(i),t.active&&!0===t.active&&e._setActiveTabset(i),i}static _createAttributeDefinitions(){const t=new c;return t.add("type",v.TYPE,!0).setType(_.STRING).setFixed(),t.add("id",void 0).setType(_.STRING),t.add("weight",100).setType(_.NUMBER),t.add("width",void 0).setType(_.NUMBER),t.add("height",void 0).setType(_.NUMBER),t.add("selected",0).setType(_.NUMBER),t.add("name",void 0).setType(_.STRING),t.add("config",void 0).setType("any"),t.addInherited("enableDeleteWhenEmpty","tabSetEnableDeleteWhenEmpty"),t.addInherited("enableDrop","tabSetEnableDrop"),t.addInherited("enableDrag","tabSetEnableDrag"),t.addInherited("enableDivide","tabSetEnableDivide"),t.addInherited("enableMaximize","tabSetEnableMaximize"),t.addInherited("enableClose","tabSetEnableClose"),t.addInherited("enableSingleTabStretch","tabSetEnableSingleTabStretch"),t.addInherited("classNameTabStrip","tabSetClassNameTabStrip"),t.addInherited("classNameHeader","tabSetClassNameHeader"),t.addInherited("enableTabStrip","tabSetEnableTabStrip"),t.addInherited("borderInsets","tabSetBorderInsets"),t.addInherited("marginInsets","tabSetMarginInsets"),t.addInherited("minWidth","tabSetMinWidth"),t.addInherited("minHeight","tabSetMinHeight"),t.addInherited("headerHeight","tabSetHeaderHeight"),t.addInherited("tabStripHeight","tabSetTabStripHeight"),t.addInherited("tabLocation","tabSetTabLocation"),t.addInherited("autoSelectTab","tabSetAutoSelectTab").setType(_.BOOLEAN),t}constructor(t,e){super(t),v._attributeDefinitions.fromJson(e,this._attributes),t._addNode(this),this._calculatedTabBarHeight=0,this._calculatedHeaderBarHeight=0}getName(){return this._getAttr("name")}getSelected(){const t=this._attributes.selected;return void 0!==t?t:-1}getSelectedNode(){const t=this.getSelected();if(-1!==t)return this._children[t]}getWeight(){return this._getAttr("weight")}getWidth(){return this._getAttr("width")}getMinWidth(){return this._getAttr("minWidth")}getHeight(){return this._getAttr("height")}getMinHeight(){return this._getAttr("minHeight")}getMinSize(t){return t===i.HORZ?this.getMinWidth():this.getMinHeight()}getConfig(){return this._attributes.config}isMaximized(){return this._model.getMaximizedTabset()===this}isActive(){return this._model.getActiveTabset()===this}isEnableDeleteWhenEmpty(){return this._getAttr("enableDeleteWhenEmpty")}isEnableDrop(){return this._getAttr("enableDrop")}isEnableDrag(){return this._getAttr("enableDrag")}isEnableDivide(){return this._getAttr("enableDivide")}isEnableMaximize(){return this._getAttr("enableMaximize")}isEnableClose(){return this._getAttr("enableClose")}isEnableSingleTabStretch(){return this._getAttr("enableSingleTabStretch")}canMaximize(){return!!this.isEnableMaximize()&&(this.getModel().getMaximizedTabset()===this||this.getParent()!==this.getModel().getRoot()||1!==this.getModel().getRoot().getChildren().length)}isEnableTabStrip(){return this._getAttr("enableTabStrip")}isAutoSelectTab(){return this._getAttr("autoSelectTab")}getClassNameTabStrip(){return this._getAttr("classNameTabStrip")}getClassNameHeader(){return this._getAttr("classNameHeader")}calculateHeaderBarHeight(t){const e=this._getAttr("headerHeight");this._calculatedHeaderBarHeight=0!==e?e:t.headerBarSize}calculateTabBarHeight(t){const e=this._getAttr("tabStripHeight");this._calculatedTabBarHeight=0!==e?e:t.tabBarSize}getHeaderHeight(){return this._calculatedHeaderBarHeight}getTabStripHeight(){return this._calculatedTabBarHeight}getTabLocation(){return this._getAttr("tabLocation")}_setWeight(t){this._attributes.weight=t}_setSelected(t){this._attributes.selected=t}canDrop(t,e,i){let n;if(t===this){const t=r.CENTER,e=this._tabHeaderRect;n=new u(this,e,t,-1,g.FLEXLAYOUT__OUTLINE_RECT)}else if(this._contentRect.contains(e,i)){let t=r.CENTER;void 0===this._model.getMaximizedTabset()&&(t=r.getLocation(this._contentRect,e,i));const s=t.getDockRect(this._rect);n=new u(this,s,t,-1,g.FLEXLAYOUT__OUTLINE_RECT)}else if(null!=this._tabHeaderRect&&this._tabHeaderRect.contains(e,i)){let t,i,o;if(0===this._children.length)t=this._tabHeaderRect.clone(),i=t.y+3,o=t.height-4,t.width=2;else{let a=this._children[0];t=a.getTabRect(),i=t.y,o=t.height;let d=this._tabHeaderRect.x,l=0;for(let h=0;h<this._children.length;h++){if(a=this._children[h],t=a.getTabRect(),l=t.x+t.width/2,e>=d&&e<l){const e=r.CENTER,a=new s(t.x-2,i,3,o);n=new u(this,a,e,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}}if(null==n){const e=r.CENTER,a=new s(t.getRight()-2,i,3,o);n=new u(this,a,e,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}if(t._canDockInto(t,n))return n}_layout(t,e){this.calculateHeaderBarHeight(e),this.calculateTabBarHeight(e),this.isMaximized()&&(t=this._model.getRoot().getRect()),t=t.removeInsets(this._getAttr("marginInsets")),this._rect=t,t=t.removeInsets(this._getAttr("borderInsets"));let i=0,n=0;void 0!==this.getName()&&(i+=this._calculatedHeaderBarHeight,n+=this._calculatedHeaderBarHeight),this.isEnableTabStrip()&&("top"===this.getTabLocation()?this._tabHeaderRect=new s(t.x,t.y+i,t.width,this._calculatedTabBarHeight):this._tabHeaderRect=new s(t.x,t.y+t.height-this._calculatedTabBarHeight,t.width,this._calculatedTabBarHeight),n+=this._calculatedTabBarHeight,"top"===this.getTabLocation()&&(i+=this._calculatedTabBarHeight)),this._contentRect=new s(t.x,t.y+i,t.width,t.height-n);for(let t=0;t<this._children.length;t++){const i=this._children[t];i._layout(this._contentRect,e),i._setVisible(t===this.getSelected())}}_delete(){this._parent._removeChild(this)}_remove(t){const e=this._removeChild(t);this._model._tidy(),O(this,e)}drop(t,e,i,s){const n=e;if(this===t)return;let o=t.getParent(),a=0;if(void 0!==o&&(a=o._removeChild(t),o instanceof R&&o.getSelected()===a?o._setSelected(-1):O(o,a)),t.getType()===b.TYPE&&o===this&&a<i&&i>0&&i--,n===r.CENTER){let e=i;if(-1===e&&(e=this._children.length),t.getType()===b.TYPE)this._addChild(t,e),(s||!1!==s&&this.isAutoSelectTab())&&this._setSelected(e);else{for(let i=0;i<t.getChildren().length;i++){const s=t.getChildren()[i];this._addChild(s,e),e++}-1===this.getSelected()&&this._children.length>0&&this._setSelected(0)}this._model._setActiveTabset(this)}else{let e;if(t instanceof b){const i=this._model._getOnCreateTabSet();e=new v(this._model,i?i(t):{}),e._addChild(t),o=e}else e=t;const i=this._parent,s=i.getChildren().indexOf(this);if(i.getOrientation()===n._orientation)e._setWeight(this.getWeight()/2),this._setWeight(this.getWeight()/2),i._addChild(e,s+n._indexPlus);else{const t=new f(this._model,{});t._setWeight(this.getWeight()),t._addChild(this),this._setWeight(50),e._setWeight(50),t._addChild(e,n._indexPlus),i._removeChild(this),i._addChild(t,s)}this._model._setActiveTabset(e)}this._model._tidy()}toJson(){const t={};return v._attributeDefinitions.toJson(t,this._attributes),t.children=this._children.map((t=>t.toJson())),this.isActive()&&(t.active=!0),this.isMaximized()&&(t.maximized=!0),t}_updateAttrs(t){v._attributeDefinitions.update(t,this._attributes)}_getAttributeDefinitions(){return v._attributeDefinitions}_getPrefSize(t){let e=this.getWidth();return t===i.VERT&&(e=this.getHeight()),e}static getAttributeDefinitions(){return v._attributeDefinitions}}function O(t,e){if(void 0!==t&&(t.getType()===v.TYPE||t.getType()===R.TYPE)){const i=t.getSelected();-1!==i&&(e===i&&t.getChildren().length>0?e>=t.getChildren().length&&t._setSelected(t.getChildren().length-1):e<i?t._setSelected(i-1):e>i||t._setSelected(-1))}}v.TYPE="tabset",v._attributeDefinitions=v._createAttributeDefinitions();class R extends p{static _fromJson(t,e){const i=r.getByName(t.location),s=new R(i,t,e);return t.children&&(s._children=t.children.map((t=>{const i=b._fromJson(t,e);return i._setParent(s),i}))),s}static _createAttributeDefinitions(){const t=new c;return t.add("type",R.TYPE,!0).setType(_.STRING).setFixed(),t.add("selected",-1).setType(_.NUMBER),t.add("show",!0).setType(_.BOOLEAN),t.add("config",void 0).setType("any"),t.addInherited("barSize","borderBarSize").setType(_.NUMBER),t.addInherited("enableDrop","borderEnableDrop").setType(_.BOOLEAN),t.addInherited("className","borderClassName").setType(_.STRING),t.addInherited("autoSelectTabWhenOpen","borderAutoSelectTabWhenOpen").setType(_.BOOLEAN),t.addInherited("autoSelectTabWhenClosed","borderAutoSelectTabWhenClosed").setType(_.BOOLEAN),t.addInherited("size","borderSize").setType(_.NUMBER),t.addInherited("minSize","borderMinSize").setType(_.NUMBER),t.addInherited("enableAutoHide","borderEnableAutoHide").setType(_.BOOLEAN),t}constructor(t,e,i){super(i),this._adjustedSize=0,this._calculatedBorderBarSize=0,this._location=t,this._drawChildren=[],this._attributes.id=`border_${t.getName()}`,R._attributeDefinitions.fromJson(e,this._attributes),i._addNode(this)}getLocation(){return this._location}getTabHeaderRect(){return this._tabHeaderRect}getRect(){return this._tabHeaderRect}getContentRect(){return this._contentRect}isEnableDrop(){return this._getAttr("enableDrop")}isAutoSelectTab(t){return null==t&&(t=-1!==this.getSelected()),t?this._getAttr("autoSelectTabWhenOpen"):this._getAttr("autoSelectTabWhenClosed")}getClassName(){return this._getAttr("className")}calcBorderBarSize(t){const e=this._getAttr("barSize");this._calculatedBorderBarSize=0!==e?e:t.borderBarSize}getBorderBarSize(){return this._calculatedBorderBarSize}getSize(){const t=this._getAttr("size"),e=this.getSelected();if(-1===e)return t;{const s=this._children[e],n=this._location._orientation===i.HORZ?s._getAttr("borderWidth"):s._getAttr("borderHeight");return-1===n?t:n}}getMinSize(){return this._getAttr("minSize")}getSelected(){return this._attributes.selected}getSelectedNode(){if(-1!==this.getSelected())return this._children[this.getSelected()]}getOrientation(){return this._location.getOrientation()}getConfig(){return this._attributes.config}isMaximized(){return!1}isShowing(){return!(!this._attributes.show||this._model._getShowHiddenBorder()!==this._location&&this.isAutoHide()&&0===this._children.length)}isAutoHide(){return this._getAttr("enableAutoHide")}_setSelected(t){this._attributes.selected=t}_setSize(t){const e=this.getSelected();if(-1===e)this._attributes.size=t;else{const s=this._children[e];-1===(this._location._orientation===i.HORZ?s._getAttr("borderWidth"):s._getAttr("borderHeight"))?this._attributes.size=t:this._location._orientation===i.HORZ?s._setBorderWidth(t):s._setBorderHeight(t)}}_updateAttrs(t){R._attributeDefinitions.update(t,this._attributes)}_getDrawChildren(){return this._drawChildren}_setAdjustedSize(t){this._adjustedSize=t}_getAdjustedSize(){return this._adjustedSize}_layoutBorderOuter(t,e){this.calcBorderBarSize(e);const i=this._location.split(t,this.getBorderBarSize());return this._tabHeaderRect=i.start,i.end}_layoutBorderInner(t,e){this._drawChildren=[];const i=this._location,s=i.split(t,this._adjustedSize+this._model.getSplitterSize()),n=i.reflect().split(s.start,this._model.getSplitterSize());this._contentRect=n.end;for(let t=0;t<this._children.length;t++){const i=this._children[t];i._layout(this._contentRect,e),i._setVisible(t===this.getSelected()),this._drawChildren.push(i)}if(-1===this.getSelected())return t;{const t=new m(this._model);return t._setParent(this),t._setRect(n.start),this._drawChildren.push(t),s.end}}_remove(t){const e=this._removeChild(t);-1!==this.getSelected()&&O(this,e)}canDrop(t,e,n){if(t.getType()!==b.TYPE)return;let o;const a=r.CENTER;if(this._tabHeaderRect.contains(e,n)){if(this._location._orientation===i.VERT)if(this._children.length>0){let t=this._children[0],i=t.getTabRect();const n=i.y,r=i.height;let d=this._tabHeaderRect.x,l=0;for(let h=0;h<this._children.length;h++){if(t=this._children[h],i=t.getTabRect(),l=i.x+i.width/2,e>=d&&e<l){const t=new s(i.x-2,n,3,r);o=new u(this,t,a,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}if(null==o){const t=new s(i.getRight()-2,n,3,r);o=new u(this,t,a,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}else{const t=new s(this._tabHeaderRect.x+1,this._tabHeaderRect.y+2,3,18);o=new u(this,t,a,0,g.FLEXLAYOUT__OUTLINE_RECT)}else if(this._children.length>0){let t=this._children[0],e=t.getTabRect();const i=e.x,r=e.width;let d=this._tabHeaderRect.y,l=0;for(let h=0;h<this._children.length;h++){if(t=this._children[h],e=t.getTabRect(),l=e.y+e.height/2,n>=d&&n<l){const t=new s(i,e.y-2,r,3);o=new u(this,t,a,h,g.FLEXLAYOUT__OUTLINE_RECT);break}d=l}if(null==o){const t=new s(i,e.getBottom()-2,r,3);o=new u(this,t,a,this._children.length,g.FLEXLAYOUT__OUTLINE_RECT)}}else{const t=new s(this._tabHeaderRect.x+2,this._tabHeaderRect.y+1,18,3);o=new u(this,t,a,0,g.FLEXLAYOUT__OUTLINE_RECT)}if(!t._canDockInto(t,o))return}else if(-1!==this.getSelected()&&this._contentRect.contains(e,n)){const e=this._contentRect;if(o=new u(this,e,a,-1,g.FLEXLAYOUT__OUTLINE_RECT),!t._canDockInto(t,o))return}return o}drop(t,e,i,s){let n=0;const o=t.getParent();void 0!==o&&(n=o._removeChild(t),o!==this&&o instanceof R&&o.getSelected()===n?o._setSelected(-1):O(o,n)),t.getType()===b.TYPE&&o===this&&n<i&&i>0&&i--;let r=i;-1===r&&(r=this._children.length),t.getType()===b.TYPE&&this._addChild(t,r),(s||!1!==s&&this.isAutoSelectTab())&&this._setSelected(r),this._model._tidy()}toJson(){const t={};return R._attributeDefinitions.toJson(t,this._attributes),t.location=this._location.getName(),t.children=this._children.map((t=>t.toJson())),t}_getSplitterBounds(t,e=!1){const i=[0,0],s=e?this.getMinSize():0,n=this._model._getOuterInnerRects().outer,o=this._model._getOuterInnerRects().inner,a=this._model.getRoot();return this._location===r.TOP?(i[0]=n.y+s,i[1]=Math.max(i[0],o.getBottom()-t.getHeight()-a.getMinHeight())):this._location===r.LEFT?(i[0]=n.x+s,i[1]=Math.max(i[0],o.getRight()-t.getWidth()-a.getMinWidth())):this._location===r.BOTTOM?(i[1]=n.getBottom()-t.getHeight()-s,i[0]=Math.min(i[1],o.y+a.getMinHeight())):this._location===r.RIGHT&&(i[1]=n.getRight()-t.getWidth()-s,i[0]=Math.min(i[1],o.x+a.getMinWidth())),i}_calculateSplit(t,e){const i=this._getSplitterBounds(t);return this._location===r.BOTTOM||this._location===r.RIGHT?Math.max(0,i[1]-e):Math.max(0,e-i[0])}_getAttributeDefinitions(){return R._attributeDefinitions}static getAttributeDefinitions(){return R._attributeDefinitions}}function A(e,i,s,n,o){let r=s?s(i):void 0,a=i.getName(),d=i.getName();if(void 0===o&&(o=0),void 0!==n){const t=n(i);void 0!==t&&("string"==typeof t?(a=t,d=t):void 0!==t.titleContent?(a=t.titleContent,d=t.name):a=t)}void 0===r&&void 0!==i.getIcon()&&(r=0!==o?t.createElement("img",{style:{width:"1em",height:"1em",transform:"rotate("+o+"deg)"},src:i.getIcon(),alt:"leadingContent"}):t.createElement("img",{style:{width:"1em",height:"1em"},src:i.getIcon(),alt:"leadingContent"}));const l={leading:r,content:a,name:d,buttons:[]};return e.customizeTab(i,l),i._setRenderedName(l.name),l}function L(t,e){e?t.visibility="hidden":t.display="none"}function y(t){let e=!1;return t.nativeEvent instanceof MouseEvent&&(0!==t.nativeEvent.button||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(e=!0),e}R.TYPE="border",R._attributeDefinitions=R._createAttributeDefinitions(),function(t){t.Close_Tab="Close",t.Close_Tabset="Close tabset",t.Move_Tab="Move: ",t.Move_Tabset="Move tabset",t.Maximize="Maximize tabset",t.Restore="Restore tabset",t.Float_Tab="Show selected tab in floating window",t.Overflow_Menu_Tooltip="Hidden tabs",t.Floating_Window_Message="This panel is shown in a floating window",t.Floating_Window_Show_Window="Show window",t.Floating_Window_Dock_Window="Dock window",t.Error_rendering_component="Error rendering component"}(T||(T={})),function(t){t[t.Visible=1]="Visible",t[t.Always=2]="Always",t[t.Selected=3]="Selected"}(E||(E={}));const N=e=>{const{layout:i,node:n,selected:o,border:r,iconFactory:a,titleFactory:d,icons:l,path:_}=e,c=t.useRef(null),u=t.useRef(null),p=t=>{y(t)||i.getEditingTab()||i.dragStart(t,void 0,n,n.isEnableDrag(),b,f)},m=t=>{y(t)&&i.auxMouseClick(n,t)},b=()=>{i.doAction(h.selectTab(n.getId()))},f=t=>{},v=t=>{(()=>{const t=n.getCloseType();return!!(o||t===E.Always||t===E.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?i.doAction(h.deleteTab(n.getId())):b()},O=t=>{t.stopPropagation()};t.useLayoutEffect((()=>{R(),i.getEditingTab()===n&&u.current.select()}));const R=()=>{var t;const e=i.getDomRect(),o=null===(t=c.current)||void 0===t?void 0:t.getBoundingClientRect();o&&e&&n._setTabRect(new s(o.left-e.left,o.top-e.top,o.width,o.height))},L=t=>{t.stopPropagation()},N=i.getClassName;let S=N(g.FLEXLAYOUT__BORDER_BUTTON)+" "+N(g.FLEXLAYOUT__BORDER_BUTTON_+r);S+=o?" "+N(g.FLEXLAYOUT__BORDER_BUTTON__SELECTED):" "+N(g.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED),void 0!==n.getClassName()&&(S+=" "+n.getClassName());let D=0;!1===n.getModel().isEnableRotateBorderIcons()&&("left"===r?D=90:"right"===r&&(D=-90));const B=A(i,n,a,d,D);let w=B.content?t.createElement("div",{className:N(g.FLEXLAYOUT__BORDER_BUTTON_CONTENT)},B.content):null;const C=B.leading?t.createElement("div",{className:N(g.FLEXLAYOUT__BORDER_BUTTON_LEADING)},B.leading):null;if(i.getEditingTab()===n&&(w=t.createElement("input",{ref:u,className:N(g.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":_+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:t=>{"Escape"===t.code?i.setEditingTab(void 0):"Enter"===t.code&&(i.setEditingTab(void 0),i.doAction(h.renameTab(n.getId(),t.target.value)))},onMouseDown:L,onTouchStart:L})),n.isEnableClose()){const e=i.i18nName(T.Close_Tab);B.buttons.push(t.createElement("div",{key:"close","data-layout-path":_+"/button/close",title:e,className:N(g.FLEXLAYOUT__BORDER_BUTTON_TRAILING),onMouseDown:O,onClick:v,onTouchStart:O},"function"==typeof l.close?l.close(n):l.close))}return t.createElement("div",{ref:c,"data-layout-path":_,className:S,onMouseDown:p,onClick:m,onAuxClick:m,onContextMenu:t=>{i.showContextMenu(n,t)},onTouchStart:p,title:n.getHelpText()},C,w,B.buttons)},S=e=>{const{layout:i,node:s,iconFactory:n,titleFactory:o}=e,r=t.useRef(null),a=i.getClassName;let d=a(g.FLEXLAYOUT__TAB_BUTTON_STAMP);const l=A(i,s,n,o);let h=l.content?t.createElement("div",{className:a(g.FLEXLAYOUT__TAB_BUTTON_CONTENT)},l.content):s._getNameForOverflowMenu();const _=l.leading?t.createElement("div",{className:a(g.FLEXLAYOUT__TAB_BUTTON_LEADING)},l.leading):null;return t.createElement("div",{ref:r,className:d,title:s.getHelpText()},_,h)};function D(e,i,s,n,o,r){var a;const l=n.getRootDiv(),h=n.getClassName,_=e.ownerDocument,c=e.getBoundingClientRect(),u=null!==(a=null==l?void 0:l.getBoundingClientRect())&&void 0!==a?a:new DOMRect(0,0,100,100),T=_.createElement("div");T.className=h(g.FLEXLAYOUT__POPUP_MENU_CONTAINER),c.left<u.left+u.width/2?T.style.left=c.left-u.left+"px":T.style.right=u.right-c.right+"px",c.top<u.top+u.height/2?T.style.top=c.top-u.top+"px":T.style.bottom=u.bottom-c.bottom+"px",d.instance.addGlass((()=>E())),d.instance.setGlassCursorOverride("default"),l&&l.appendChild(T);const E=()=>{n.hidePortal(),d.instance.hideGlass(),l&&l.removeChild(T),T.removeEventListener("mousedown",p),_.removeEventListener("mousedown",m)},p=t=>{t.stopPropagation()},m=t=>{E()};T.addEventListener("mousedown",p),_.addEventListener("mousedown",m),n.showPortal(t.createElement(B,{currentDocument:_,onSelect:s,onHide:E,items:i,classNameMapper:h,layout:n,iconFactory:o,titleFactory:r}),T)}const B=e=>{const{items:i,onHide:s,onSelect:n,classNameMapper:o,layout:r,iconFactory:a,titleFactory:d}=e,l=i.map(((e,i)=>t.createElement("div",{key:e.index,className:o(g.FLEXLAYOUT__POPUP_MENU_ITEM),"data-layout-path":"/popup-menu/tb"+i,onClick:t=>((t,e)=>{n(t),s(),e.stopPropagation()})(e,t),title:e.node.getHelpText()},e.node.getModel().isLegacyOverflowMenu()?e.node._getNameForOverflowMenu():t.createElement(S,{node:e.node,layout:r,iconFactory:a,titleFactory:d}))));return t.createElement("div",{className:o(g.FLEXLAYOUT__POPUP_MENU),"data-layout-path":"/popup-menu"},l)},w=(e,n,o,r)=>{const a=t.useRef(!0),d=t.useRef(!1),l=t.useRef(new s(0,0,0,0)),h=t.useRef(null),[_,c]=t.useState(0),u=t.useRef(!1),[g,T]=t.useState([]),E=t.useRef(0);t.useLayoutEffect((()=>{u.current=!1}),[e.getSelectedNode(),e.getRect().width,e.getRect().height]),t.useLayoutEffect((()=>{R()}));const p=h.current;t.useEffect((()=>{if(p)return p.addEventListener("wheel",m,{passive:!1}),()=>{p.removeEventListener("wheel",m)}}),[p]);const m=t=>{t.preventDefault()},b=t=>n===i.HORZ?t.x:t.y,f=t=>n===i.HORZ?t.getRight():t.getBottom(),O=t=>n===i.HORZ?t.width:t.height,R=()=>{!0===a.current&&(d.current=!1);const t=e instanceof v?e.getRect():e.getTabHeaderRect();let i=e.getChildren()[e.getChildren().length-1];const s=null===r.current?0:O(r.current.getBoundingClientRect());if(!0===a.current||0===E.current&&0!==g.length||t.width!==l.current.width||t.height!==l.current.height){E.current=g.length,l.current=t;const n=!(e instanceof v)||!0===e.isEnableTabStrip();let r=f(t)-s;if(null!==o.current&&(r-=O(o.current.getBoundingClientRect())),n&&e.getChildren().length>0){if(0===g.length&&0===_&&f(i.getTabRect())+2<r)return;let s=0;const n=e.getSelectedNode();if(n&&!u.current){const e=n.getTabRect(),i=b(e)-2,o=f(e)+2;O(e)+4>=r-b(t)?s=b(t)-i:(o>r||i<b(t))&&(i<b(t)&&(s=b(t)-i),o+s>r&&(s=r-o))}const o=Math.max(0,r-(f(i.getTabRect())+2+s)),l=Math.min(0,_+s+o),h=l-_,E=[];for(let i=0;i<e.getChildren().length;i++){const s=e.getChildren()[i];(b(s.getTabRect())+h<b(t)||f(s.getTabRect())+h>r)&&E.push({node:s,index:i})}E.length>0&&(d.current=!0),a.current=!1,T(E),c(l)}}else a.current=!0};return{selfRef:h,position:_,userControlledLeft:u,hiddenTabs:g,onMouseWheel:t=>{let e=0;e=Math.abs(t.deltaX)>Math.abs(t.deltaY)?-t.deltaX:-t.deltaY,1===t.deltaMode&&(e*=40),c(_+e),u.current=!0,t.stopPropagation()},tabsTruncated:d.current}},C=e=>{const{border:s,layout:n,iconFactory:o,titleFactory:a,icons:d,path:l}=e,_=t.useRef(null),c=t.useRef(null),u=t.useRef(null),{selfRef:E,position:p,userControlledLeft:m,hiddenTabs:b,onMouseWheel:f,tabsTruncated:v}=w(s,i.flip(s.getOrientation()),_,u),O=t=>{y(t)&&n.auxMouseClick(s,t)},R=t=>{t.stopPropagation()},A=t=>{const e=n.getShowOverflowMenu();void 0!==e?e(s,t,b,L):D(c.current,b,L,n,o,a),t.stopPropagation()},L=t=>{n.doAction(h.selectTab(t.node.getId())),m.current=!1},S=t=>{const e=s.getChildren()[s.getSelected()];void 0!==e&&n.doAction(h.floatTab(e.getId())),t.stopPropagation()},B=n.getClassName;let C=s.getTabHeaderRect().styleWithPosition({});const M=[],x=e=>{let i=s.getSelected()===e,r=s.getChildren()[e];M.push(t.createElement(N,{layout:n,border:s.getLocation().getName(),node:r,path:l+"/tb"+e,key:r.getId(),selected:i,iconFactory:o,titleFactory:a,icons:d})),e<s.getChildren().length-1&&M.push(t.createElement("div",{key:"divider"+e,className:B(g.FLEXLAYOUT__BORDER_TAB_DIVIDER)}))};for(let t=0;t<s.getChildren().length;t++)x(t);let U=B(g.FLEXLAYOUT__BORDER)+" "+B(g.FLEXLAYOUT__BORDER_+s.getLocation().getName());void 0!==s.getClassName()&&(U+=" "+s.getClassName());let I=[],F=[];const z={headerContent:void 0,buttons:I,stickyButtons:F,headerButtons:[],overflowPosition:void 0};if(n.customizeTabSet(s,z),I=z.buttons,void 0===z.overflowPosition&&(z.overflowPosition=F.length),F.length>0&&(v?I=[...F,...I]:M.push(t.createElement("div",{ref:u,key:"sticky_buttons_container",onMouseDown:R,onTouchStart:R,onDragStart:t=>{t.preventDefault()},className:B(g.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},F))),b.length>0){const e=n.i18nName(T.Overflow_Menu_Tooltip);let i;i="function"==typeof d.more?d.more(s,b):t.createElement(t.Fragment,null,d.more,t.createElement("div",{className:B(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},b.length)),I.splice(Math.min(z.overflowPosition,I.length),0,t.createElement("button",{key:"overflowbutton",ref:c,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_+s.getLocation().getName()),title:e,onClick:A,onMouseDown:R,onTouchStart:R},i))}const Y=s.getSelected();if(-1!==Y){const e=s.getChildren()[Y];if(void 0!==e&&n.isSupportsPopout()&&e.isEnableFloat()&&!e.isFloating()){const i=n.i18nName(T.Float_Tab);I.push(t.createElement("button",{key:"float",title:i,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:S,onMouseDown:R,onTouchStart:R},"function"==typeof d.popout?d.popout(e):d.popout))}}const X=t.createElement("div",{key:"toolbar",ref:_,className:B(g.FLEXLAYOUT__BORDER_TOOLBAR)+" "+B(g.FLEXLAYOUT__BORDER_TOOLBAR_+s.getLocation().getName())},I);C=n.styleFont(C);let H={};const P=s.getBorderBarSize()-1;return H=s.getLocation()===r.LEFT?{right:P,height:P,top:p}:s.getLocation()===r.RIGHT?{left:P,height:P,top:p}:{height:P,left:p},t.createElement("div",{ref:E,dir:"ltr",style:C,className:U,"data-layout-path":l,onClick:O,onAuxClick:O,onContextMenu:t=>{n.showContextMenu(s,t)},onWheel:f},t.createElement("div",{style:{height:P},className:B(g.FLEXLAYOUT__BORDER_INNER)+" "+B(g.FLEXLAYOUT__BORDER_INNER_+s.getLocation().getName())},t.createElement("div",{style:H,className:B(g.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER)+" "+B(g.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_+s.getLocation().getName())},M)),X)},M=e=>{const{layout:s,node:n,path:o}=e,r=t.useRef([]),a=t.useRef(void 0),l=n.getParent(),_=t=>{var e;d.instance.setGlassCursorOverride(n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"),d.instance.startDrag(t,u,T,p,c,void 0,void 0,s.getCurrentDocument(),null!==(e=s.getRootDiv())&&void 0!==e?e:void 0),r.current=l._getSplitterBounds(n,!0);const o=s.getRootDiv();a.current=s.getCurrentDocument().createElement("div"),a.current.style.position="absolute",a.current.className=s.getClassName(g.FLEXLAYOUT__SPLITTER_DRAG),a.current.style.cursor=n.getOrientation()===i.HORZ?"ns-resize":"ew-resize";const h=n.getRect();n.getOrientation()===i.VERT&&h.width<2?h.width=2:n.getOrientation()===i.HORZ&&h.height<2&&(h.height=2),h.positionElement(a.current),o&&o.appendChild(a.current)},c=t=>{const e=s.getRootDiv();e&&e.removeChild(a.current)},u=()=>!0,T=t=>{const e=s.getDomRect();if(!e)return;const o=t.clientX-e.left,r=t.clientY-e.top;a&&(n.getOrientation()===i.HORZ?a.current.style.top=m(r-4)+"px":a.current.style.left=m(o-4)+"px"),s.isRealtimeResize()&&E()},E=()=>{let t=0;if(a&&(t=n.getOrientation()===i.HORZ?a.current.offsetTop:a.current.offsetLeft),l instanceof R){const e=l._calculateSplit(n,t);s.doAction(h.adjustBorderSplit(n.getParent().getId(),e))}else{const e=l._calculateSplit(n,t);void 0!==e&&s.doAction(h.adjustSplit(e))}},p=()=>{E();const t=s.getRootDiv();t&&t.removeChild(a.current)},m=t=>{const e=r.current;let i=t;return t<e[0]&&(i=e[0]),t>e[1]&&(i=e[1]),i},b=s.getClassName;let f=n.getRect();const v=f.styleWithPosition({cursor:n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"});let O=b(g.FLEXLAYOUT__SPLITTER)+" "+b(g.FLEXLAYOUT__SPLITTER_+n.getOrientation().getName());l instanceof R?O+=" "+b(g.FLEXLAYOUT__SPLITTER_BORDER):void 0!==n.getModel().getMaximizedTabset()&&(v.display="none");const A=n.getModel().getSplitterExtra();if(0===A)return t.createElement("div",{style:v,"data-layout-path":o,className:O,onTouchStart:_,onMouseDown:_});{let e=f.clone();e.x=0,e.y=0,n.getOrientation()===i.VERT?e.width+=A:e.height+=A;const s=e.styleWithPosition({cursor:n.getOrientation()===i.HORZ?"ns-resize":"ew-resize"}),r=b(g.FLEXLAYOUT__SPLITTER_EXTRA);return t.createElement("div",{style:v,"data-layout-path":o,className:O},t.createElement("div",{style:s,className:r,onTouchStart:_,onMouseDown:_}))}};class x extends t.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,e){console.debug(t),console.debug(e)}render(){return this.state.hasError?t.createElement("div",{className:g.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER},t.createElement("div",{className:g.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT},this.props.message)):this.props.children}}const U=e=>{const{layout:i,selected:s,node:n,factory:o,path:r}=e,[a,d]=t.useState(!e.node.isEnableRenderOnDemand()||e.selected);t.useLayoutEffect((()=>{!a&&s&&d(!0)}));const l=()=>{const t=n.getParent();t.getType()===v.TYPE&&(t.isActive()||i.doAction(h.setActiveTabset(t.getId())))},_=i.getClassName,c=n.getModel().isUseVisibility(),u=n.getParent(),E=n._styleWithPosition();let p;s||L(E,c),u instanceof v&&(void 0===n.getModel().getMaximizedTabset()||u.isMaximized()||L(E,c)),a&&(p=o(n));let m=_(g.FLEXLAYOUT__TAB);return u instanceof R&&(m+=" "+_(g.FLEXLAYOUT__TAB_BORDER),m+=" "+_(g.FLEXLAYOUT__TAB_BORDER_+u.getLocation().getName())),void 0!==n.getContentClassName()&&(m+=" "+n.getContentClassName()),t.createElement("div",{className:m,"data-layout-path":r,onMouseDown:l,onTouchStart:l,style:E},t.createElement(x,{message:e.layout.i18nName(T.Error_rendering_component)},t.createElement(t.Fragment,null,p)))},I=e=>{const{layout:i,node:n,selected:o,iconFactory:r,titleFactory:a,icons:d,path:l}=e,_=t.useRef(null),c=t.useRef(null),u=t=>{y(t)||i.getEditingTab()||i.dragStart(t,void 0,n,n.isEnableDrag(),m,b)},p=t=>{y(t)&&i.auxMouseClick(n,t)},m=()=>{i.doAction(h.selectTab(n.getId()))},b=t=>{n.isEnableRename()&&f()},f=()=>{i.setEditingTab(n),i.getCurrentDocument().body.addEventListener("mousedown",v),i.getCurrentDocument().body.addEventListener("touchstart",v)},v=t=>{t.target!==c.current&&(i.getCurrentDocument().body.removeEventListener("mousedown",v),i.getCurrentDocument().body.removeEventListener("touchstart",v),i.setEditingTab(void 0))},O=t=>{(()=>{const t=n.getCloseType();return!!(o||t===E.Always||t===E.Visible&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches)})()?i.doAction(h.deleteTab(n.getId())):m()},R=t=>{t.stopPropagation()};t.useLayoutEffect((()=>{L(),i.getEditingTab()===n&&c.current.select()}));const L=()=>{var t;const e=i.getDomRect(),o=null===(t=_.current)||void 0===t?void 0:t.getBoundingClientRect();o&&e&&n._setTabRect(new s(o.left-e.left,o.top-e.top,o.width,o.height))},N=t=>{t.stopPropagation()},S=i.getClassName,D=n.getParent(),B=D.isEnableSingleTabStretch()&&1===D.getChildren().length;let w=B?g.FLEXLAYOUT__TAB_BUTTON_STRETCH:g.FLEXLAYOUT__TAB_BUTTON,C=S(w);C+=" "+S(w+"_"+D.getTabLocation()),B||(C+=o?" "+S(w+"--selected"):" "+S(w+"--unselected")),void 0!==n.getClassName()&&(C+=" "+n.getClassName());const M=A(i,n,r,a);let x=M.content?t.createElement("div",{className:S(g.FLEXLAYOUT__TAB_BUTTON_CONTENT)},M.content):null;const U=M.leading?t.createElement("div",{className:S(g.FLEXLAYOUT__TAB_BUTTON_LEADING)},M.leading):null;if(i.getEditingTab()===n&&(x=t.createElement("input",{ref:c,className:S(g.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":l+"/textbox",type:"text",autoFocus:!0,defaultValue:n.getName(),onKeyDown:t=>{"Escape"===t.code?i.setEditingTab(void 0):"Enter"===t.code&&(i.setEditingTab(void 0),i.doAction(h.renameTab(n.getId(),t.target.value)))},onMouseDown:N,onTouchStart:N})),n.isEnableClose()&&!B){const e=i.i18nName(T.Close_Tab);M.buttons.push(t.createElement("div",{key:"close","data-layout-path":l+"/button/close",title:e,className:S(g.FLEXLAYOUT__TAB_BUTTON_TRAILING),onMouseDown:R,onClick:O,onTouchStart:R},"function"==typeof d.close?d.close(n):d.close))}return t.createElement("div",{ref:_,"data-layout-path":l,className:C,onMouseDown:u,onClick:p,onAuxClick:p,onContextMenu:t=>{i.showContextMenu(n,t)},onTouchStart:u,title:n.getHelpText()},U,x,M.buttons)},F=e=>{const{node:s,layout:n,iconFactory:o,titleFactory:r,icons:a,path:d}=e,l=t.useRef(null),_=t.useRef(null),c=t.useRef(null),u=t.useRef(null),{selfRef:E,position:p,userControlledLeft:m,hiddenTabs:b,onMouseWheel:f,tabsTruncated:v}=w(s,i.HORZ,l,u),O=t=>{const e=n.getShowOverflowMenu();void 0!==e?e(s,t,b,R):D(_.current,b,R,n,o,r),t.stopPropagation()},R=t=>{n.doAction(h.selectTab(t.node.getId())),m.current=!1},A=t=>{if(!y(t)){let e=s.getName();if(e=void 0===e?"":": "+e,n.doAction(h.setActiveTabset(s.getId())),!n.getEditingTab()){const i=n.i18nName(T.Move_Tabset,e);void 0!==s.getModel().getMaximizedTabset()?n.dragStart(t,i,s,!1,(t=>{}),F):n.dragStart(t,i,s,s.isEnableDrag(),(t=>{}),F)}}},N=t=>{y(t)&&n.auxMouseClick(s,t)},S=t=>{n.showContextMenu(s,t)},B=t=>{t.stopPropagation()},C=t=>{s.canMaximize()&&n.maximize(s),t.stopPropagation()},M=t=>{n.doAction(h.deleteTabset(s.getId())),t.stopPropagation()},x=t=>{n.doAction(h.deleteTab(s.getChildren()[0].getId())),t.stopPropagation()},U=t=>{void 0!==Y&&n.doAction(h.floatTab(Y.getId())),t.stopPropagation()},F=t=>{s.canMaximize()&&n.maximize(s)},z=n.getClassName;null!==c.current&&0!==c.current.scrollLeft&&(c.current.scrollLeft=0);const Y=s.getSelectedNode();let X=s._styleWithPosition();void 0===s.getModel().getMaximizedTabset()||s.isMaximized()||L(X,s.getModel().isUseVisibility());const H=[];if(s.isEnableTabStrip())for(let e=0;e<s.getChildren().length;e++){const i=s.getChildren()[e];let l=s.getSelected()===e;H.push(t.createElement(I,{layout:n,node:i,path:d+"/tb"+e,key:i.getId(),selected:l,iconFactory:o,titleFactory:r,icons:a})),e<s.getChildren().length-1&&H.push(t.createElement("div",{key:"divider"+e,className:z(g.FLEXLAYOUT__TABSET_TAB_DIVIDER)}))}const P=void 0!==s.getName();let W=[],k=[],G=[];const V={headerContent:s.getName(),stickyButtons:W,buttons:k,headerButtons:G,overflowPosition:void 0};n.customizeTabSet(s,V);const J=V.headerContent;W=V.stickyButtons,k=V.buttons,G=V.headerButtons;const Z=s.isEnableSingleTabStretch()&&1===s.getChildren().length,j=Z&&s.getChildren()[0].isEnableClose()||s.isEnableClose();if(void 0===V.overflowPosition&&(V.overflowPosition=W.length),W.length>0&&(v||Z?k=[...W,...k]:H.push(t.createElement("div",{ref:u,key:"sticky_buttons_container",onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()},className:z(g.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER)},W))),b.length>0){const e=n.i18nName(T.Overflow_Menu_Tooltip);let i;i="function"==typeof a.more?a.more(s,b):t.createElement(t.Fragment,null,a.more,t.createElement("div",{className:z(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT)},b.length)),k.splice(Math.min(V.overflowPosition,k.length),0,t.createElement("button",{key:"overflowbutton","data-layout-path":d+"/button/overflow",ref:_,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_BUTTON_OVERFLOW),title:e,onClick:O,onMouseDown:B,onTouchStart:B},i))}if(void 0!==Y&&n.isSupportsPopout()&&Y.isEnableFloat()&&!Y.isFloating()){const e=n.i18nName(T.Float_Tab);k.push(t.createElement("button",{key:"float","data-layout-path":d+"/button/float",title:e,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:U,onMouseDown:B,onTouchStart:B},"function"==typeof a.popout?a.popout(Y):a.popout))}if(s.canMaximize()){const e=n.i18nName(T.Restore),i=n.i18nName(T.Maximize);(P?G:k).push(t.createElement("button",{key:"max","data-layout-path":d+"/button/max",title:s.isMaximized()?e:i,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_+(s.isMaximized()?"max":"min")),onClick:C,onMouseDown:B,onTouchStart:B},s.isMaximized()?"function"==typeof a.restore?a.restore(s):a.restore:"function"==typeof a.maximize?a.maximize(s):a.maximize))}if(!s.isMaximized()&&j){const e=Z?n.i18nName(T.Close_Tab):n.i18nName(T.Close_Tabset);(P?G:k).push(t.createElement("button",{key:"close","data-layout-path":d+"/button/close",title:e,className:z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+" "+z(g.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE),onClick:Z?x:M,onMouseDown:B,onTouchStart:B},"function"==typeof a.closeTabset?a.closeTabset(s):a.closeTabset))}const q=t.createElement("div",{key:"toolbar",ref:l,className:z(g.FLEXLAYOUT__TAB_TOOLBAR),onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()}},k);let K,$,Q=z(g.FLEXLAYOUT__TABSET_TABBAR_OUTER);if(void 0!==s.getClassNameTabStrip()&&(Q+=" "+s.getClassNameTabStrip()),Q+=" "+g.FLEXLAYOUT__TABSET_TABBAR_OUTER_+s.getTabLocation(),s.isActive()&&!P&&(Q+=" "+z(g.FLEXLAYOUT__TABSET_SELECTED)),s.isMaximized()&&!P&&(Q+=" "+z(g.FLEXLAYOUT__TABSET_MAXIMIZED)),Z){const t=s.getChildren()[0];void 0!==t.getTabSetClassName()&&(Q+=" "+t.getTabSetClassName())}if(P){const e=t.createElement("div",{key:"toolbar",ref:l,className:z(g.FLEXLAYOUT__TAB_TOOLBAR),onMouseDown:B,onTouchStart:B,onDragStart:t=>{t.preventDefault()}},G);let i=z(g.FLEXLAYOUT__TABSET_HEADER);s.isActive()&&(i+=" "+z(g.FLEXLAYOUT__TABSET_SELECTED)),s.isMaximized()&&(i+=" "+z(g.FLEXLAYOUT__TABSET_MAXIMIZED)),void 0!==s.getClassNameHeader()&&(i+=" "+s.getClassNameHeader()),K=t.createElement("div",{className:i,style:{height:s.getHeaderHeight()+"px"},"data-layout-path":d+"/header",onMouseDown:A,onContextMenu:S,onClick:N,onAuxClick:N,onTouchStart:A},t.createElement("div",{className:z(g.FLEXLAYOUT__TABSET_HEADER_CONTENT)},J),e)}const tt={height:s.getTabStripHeight()+"px"};$=t.createElement("div",{className:Q,style:tt,"data-layout-path":d+"/tabstrip",onMouseDown:A,onContextMenu:S,onClick:N,onAuxClick:N,onTouchStart:A},t.createElement("div",{ref:c,className:z(g.FLEXLAYOUT__TABSET_TABBAR_INNER)+" "+z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_+s.getTabLocation())},t.createElement("div",{style:{left:p,width:Z?"100%":"10000px"},className:z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER)+" "+z(g.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_+s.getTabLocation())},H)),q),X=n.styleFont(X);var et=void 0;if(0===s.getChildren().length){const t=n.getTabSetPlaceHolderCallback();t&&(et=t(s))}const it=t.createElement("div",{className:z(g.FLEXLAYOUT__TABSET_CONTENT)},et);var st;return st="top"===s.getTabLocation()?t.createElement(t.Fragment,null,K,$,it):t.createElement(t.Fragment,null,K,it,$),t.createElement("div",{ref:E,dir:"ltr","data-layout-path":d,style:X,className:z(g.FLEXLAYOUT__TABSET),onWheel:f},st)},z=i=>{const{title:n,id:o,url:r,rect:a,onCloseWindow:d,onSetWindow:l,children:h}=i,_=t.useRef(null),c=t.useRef(null),[u,T]=t.useState(void 0);return t.useLayoutEffect((()=>{c.current&&clearTimeout(c.current);let t=!0;const e=a||new s(0,0,100,100),i=Array.from(window.document.styleSheets).reduce(((t,e)=>{let i;try{i=e.cssRules}catch(t){}try{return[...t,{href:e.href,type:e.type,rules:i?Array.from(i).map((t=>t.cssText)):null}]}catch(e){return t}}),[]);return _.current=window.open(r,o,`left=${e.x},top=${e.y},width=${e.width},height=${e.height}`),null!==_.current?(l(o,_.current),window.addEventListener("beforeunload",(()=>{_.current&&(_.current.close(),_.current=null)})),_.current.addEventListener("load",(()=>{if(t){const t=_.current.document;t.title=n;const e=t.createElement("div");e.className=g.FLEXLAYOUT__FLOATING_WINDOW_CONTENT,t.body.appendChild(e),function(t,e){const i=t.head,s=[];for(const n of e)if(n.href){const e=t.createElement("link");e.type=n.type,e.rel="stylesheet",e.href=n.href,i.appendChild(e),s.push(new Promise((t=>{e.onload=()=>t(!0)})))}else if(n.rules){const e=t.createElement("style");for(const i of n.rules)e.appendChild(t.createTextNode(i));i.appendChild(e)}return Promise.all(s)}(t,i).then((()=>{T(e)})),_.current.addEventListener("beforeunload",(()=>{d(o)}))}}))):(console.warn(`Unable to open window ${r}`),d(o)),()=>{t=!1,c.current=setTimeout((()=>{_.current&&(_.current.close(),_.current=null)}),0)}}),[]),void 0!==u?(0,e.createPortal)(h,u):null},Y=e=>{const{layout:i,node:s,factory:n}=e,o=i.getClassName,r=n(s);return t.createElement("div",{className:o(g.FLEXLAYOUT__FLOATING_WINDOW_TAB)},t.createElement(x,{message:e.layout.i18nName(T.Error_rendering_component)},t.createElement(t.Fragment,null,r)))},X=e=>{const{layout:i,selected:s,node:n,path:o}=e,r=()=>{n.getWindow()&&n.getWindow().focus()},a=()=>{i.doAction(h.unFloatTab(n.getId()))},d=()=>{const t=n.getParent();t.getType()===v.TYPE&&(t.isActive()||i.doAction(h.setActiveTabset(t.getId())))},l=i.getClassName,_=n.getParent(),c=n._styleWithPosition();s||L(c,n.getModel().isUseVisibility()),_ instanceof v&&(void 0===n.getModel().getMaximizedTabset()||_.isMaximized()||L(c,n.getModel().isUseVisibility()));const u=i.i18nName(T.Floating_Window_Message),E=i.i18nName(T.Floating_Window_Show_Window),p=i.i18nName(T.Floating_Window_Dock_Window),m=i.getOnRenderFloatingTabPlaceholder();return m?t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING),onMouseDown:d,onTouchStart:d,style:c},m(a,r)):t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING),"data-layout-path":o,onMouseDown:d,onTouchStart:d,style:c},t.createElement("div",{className:l(g.FLEXLAYOUT__TAB_FLOATING_INNER)},t.createElement("div",null,u),t.createElement("div",null,t.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),r()}},E)),t.createElement("div",null,t.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),a()}},p))))},H={width:"1em",height:"1em",display:"flex",alignItems:"center"},P=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24"},t.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),t.createElement("path",{stroke:"var(--color-icon)",fill:"var(--color-icon)",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),W={close:t.createElement(P,null),closeTabset:t.createElement(P,null),popout:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 20 20",fill:"var(--color-icon)"},t.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),t.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))),null),maximize:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))),null),restore:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))),null),more:t.createElement((()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:H,viewBox:"0 0 24 24",fill:"var(--color-icon)"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{stroke:"var(--color-icon)",d:"M7 10l5 5 5-5z"}))),null)},k="undefined"!=typeof window&&(window.document.documentMode||/Edge\//.test(window.navigator.userAgent)),G="undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(hover: hover) and (pointer: fine)").matches&&!k;class V extends t.Component{constructor(i){super(i),this.firstMove=!1,this.dragRectRendered=!0,this.dragDivText=void 0,this.edgeRectLength=100,this.edgeRectWidth=10,this.onModelChange=t=>{this.forceUpdate(),this.props.onModelChange&&this.props.onModelChange(this.props.model,t)},this.updateRect=t=>{if(t||(t=this.getDomRect()),!t)return;const e=new s(0,0,t.width,t.height);e.equals(this.state.rect)||0===e.width||0===e.height||this.setState({rect:e})},this.updateLayoutMetrics=()=>{if(this.findHeaderBarSizeRef.current){const t=this.findHeaderBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedHeaderBarSize&&this.setState({calculatedHeaderBarSize:t})}if(this.findTabBarSizeRef.current){const t=this.findTabBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedTabBarSize&&this.setState({calculatedTabBarSize:t})}if(this.findBorderBarSizeRef.current){const t=this.findBorderBarSizeRef.current.getBoundingClientRect().height;t!==this.state.calculatedBorderBarSize&&this.setState({calculatedBorderBarSize:t})}},this.getClassName=t=>void 0===this.props.classNameMapper?t:this.props.classNameMapper(t),this.onCloseWindow=t=>{this.doAction(h.unFloatTab(t));try{this.props.model.getNodeById(t)._setWindow(void 0)}catch(t){}},this.onSetWindow=(t,e)=>{this.props.model.getNodeById(t)._setWindow(e)},this.onCancelAdd=()=>{var t,e;const i=this.selfRef.current;i&&this.dragDiv&&i.removeChild(this.dragDiv),this.dragDiv=void 0,this.hidePortal(),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0);try{null===(e=null===(t=this.customDrop)||void 0===t?void 0:t.invalidated)||void 0===e||e.call(t)}catch(t){console.error(t)}d.instance.hideGlass(),this.newTabJson=void 0,this.customDrop=void 0},this.onCancelDrag=t=>{var e,i;if(t){const t=this.selfRef.current,s=this.outlineDiv;if(t&&s)try{t.removeChild(s)}catch(t){}const n=this.dragDiv;if(t&&n)try{t.removeChild(n)}catch(t){}this.dragDiv=void 0,this.hidePortal(),this.setState({showEdges:!1}),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0);try{null===(i=null===(e=this.customDrop)||void 0===e?void 0:e.invalidated)||void 0===i||i.call(e)}catch(t){console.error(t)}d.instance.hideGlass(),this.newTabJson=void 0,this.customDrop=void 0}this.setState({showHiddenBorder:r.CENTER})},this.onDragDivMouseDown=t=>{t.preventDefault(),this.dragStart(t,this.dragDivText,b._fromJson(this.newTabJson,this.props.model,!1),!0,void 0,void 0)},this.dragStart=(t,e,i,s,n,o)=>{var r,a;s?(this.dragNode=i,this.dragDivText=e,d.instance.startDrag(t,this.onDragStart,this.onDragMove,this.onDragEnd,this.onCancelDrag,n,o,this.currentDocument,null!==(a=this.selfRef.current)&&void 0!==a?a:void 0)):d.instance.startDrag(t,void 0,void 0,void 0,void 0,n,o,this.currentDocument,null!==(r=this.selfRef.current)&&void 0!==r?r:void 0)},this.dragRectRender=(e,i,s,n)=>{let o;if(void 0!==e?o=t.createElement("div",{style:{whiteSpace:"pre"}},e.replace("<br>","\n")):i&&i instanceof b&&(o=t.createElement(S,{node:i,layout:this,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory})),void 0!==this.props.onRenderDragRect){const t=this.props.onRenderDragRect(o,i,s);void 0!==t&&(o=t)}this.dragRectRendered=!1;const r=this.dragDiv;r&&(r.style.visibility="hidden",this.showPortal(t.createElement(J,{onRendered:()=>{this.dragRectRendered=!0,null==n||n()}},o),r))},this.showPortal=(t,i)=>{const s=(0,e.createPortal)(t,i);this.setState({portal:s})},this.hidePortal=()=>{this.setState({portal:void 0})},this.onDragStart=()=>{var t;this.dropInfo=void 0,this.customDrop=void 0;const e=this.selfRef.current;return this.outlineDiv=this.currentDocument.createElement("div"),this.outlineDiv.className=this.getClassName(g.FLEXLAYOUT__OUTLINE_RECT),this.outlineDiv.style.visibility="hidden",e&&e.appendChild(this.outlineDiv),null==this.dragDiv&&(this.dragDiv=this.currentDocument.createElement("div"),this.dragDiv.className=this.getClassName(g.FLEXLAYOUT__DRAG_RECT),this.dragDiv.setAttribute("data-layout-path","/drag-rectangle"),this.dragRectRender(this.dragDivText,this.dragNode,this.newTabJson),e&&e.appendChild(this.dragDiv)),void 0===this.props.model.getMaximizedTabset()&&this.setState({showEdges:this.props.model.isEnableEdgeDock()}),this.dragNode&&this.outlineDiv&&this.dragNode instanceof b&&void 0!==this.dragNode.getTabRect()&&(null===(t=this.dragNode.getTabRect())||void 0===t||t.positionElement(this.outlineDiv)),this.firstMove=!0,!0},this.onDragMove=t=>{var e,i,s,n,o,r,a;if(!1===this.firstMove){const t=this.props.model._getAttribute("tabDragSpeed");this.outlineDiv&&(this.outlineDiv.style.transition=`top ${t}s, left ${t}s, width ${t}s, height ${t}s`)}this.firstMove=!1;const d=null===(e=this.selfRef.current)||void 0===e?void 0:e.getBoundingClientRect(),l={x:t.clientX-(null!==(i=null==d?void 0:d.left)&&void 0!==i?i:0),y:t.clientY-(null!==(s=null==d?void 0:d.top)&&void 0!==s?s:0)};this.checkForBorderToShow(l.x,l.y);const h=null!==(o=null===(n=this.dragDiv)||void 0===n?void 0:n.getBoundingClientRect())&&void 0!==o?o:new DOMRect(0,0,100,100);let _=l.x-h.width/2;_+h.width>(null!==(r=null==d?void 0:d.width)&&void 0!==r?r:0)&&(_=(null!==(a=null==d?void 0:d.width)&&void 0!==a?a:0)-h.width),_=Math.max(0,_),this.dragDiv&&(this.dragDiv.style.left=_+"px",this.dragDiv.style.top=l.y+5+"px",this.dragRectRendered&&"hidden"===this.dragDiv.style.visibility&&(this.dragDiv.style.visibility="visible"));let c=this.props.model._findDropTargetNode(this.dragNode,l.x,l.y);c&&(this.props.onTabDrag?this.handleCustomTabDrag(c,l,t):(this.dropInfo=c,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(c.className),c.rect.positionElement(this.outlineDiv),this.outlineDiv.style.visibility="visible")))},this.onDragEnd=t=>{const e=this.selfRef.current;if(e&&(this.outlineDiv&&e.removeChild(this.outlineDiv),this.dragDiv&&e.removeChild(this.dragDiv)),this.dragDiv=void 0,this.hidePortal(),this.setState({showEdges:!1}),d.instance.hideGlass(),this.dropInfo)if(this.customDrop){this.newTabJson=void 0;try{const{callback:t,dragging:e,over:i,x:s,y:n,location:o}=this.customDrop;t(e,i,s,n,o),null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(),this.fnNewNodeDropped=void 0)}catch(t){console.error(t)}}else if(void 0!==this.newTabJson){const e=this.doAction(h.addNode(this.newTabJson,this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));null!=this.fnNewNodeDropped&&(this.fnNewNodeDropped(e,t),this.fnNewNodeDropped=void 0),this.newTabJson=void 0}else void 0!==this.dragNode&&this.doAction(h.moveNode(this.dragNode.getId(),this.dropInfo.node.getId(),this.dropInfo.location,this.dropInfo.index));this.setState({showHiddenBorder:r.CENTER})},this.props.model._setChangeListener(this.onModelChange),this.tabIds=[],this.selfRef=t.createRef(),this.findHeaderBarSizeRef=t.createRef(),this.findTabBarSizeRef=t.createRef(),this.findBorderBarSizeRef=t.createRef(),this.supportsPopout=void 0!==i.supportsPopout?i.supportsPopout:G,this.popoutURL=i.popoutURL?i.popoutURL:"popout.html",this.icons=Object.assign(Object.assign({},W),i.icons),this.state={rect:new s(0,0,0,0),calculatedHeaderBarSize:25,calculatedTabBarSize:26,calculatedBorderBarSize:30,editingTab:void 0,showHiddenBorder:r.CENTER,showEdges:!1},this.onDragEnter=this.onDragEnter.bind(this)}styleFont(t){return this.props.font&&(this.selfRef.current&&(this.props.font.size&&this.selfRef.current.style.setProperty("--font-size",this.props.font.size),this.props.font.family&&this.selfRef.current.style.setProperty("--font-family",this.props.font.family)),this.props.font.style&&(t.fontStyle=this.props.font.style),this.props.font.weight&&(t.fontWeight=this.props.font.weight)),t}doAction(t){if(void 0!==this.props.onAction){const e=this.props.onAction(t);return void 0!==e?this.props.model.doAction(e):void 0}return this.props.model.doAction(t)}componentDidMount(){this.updateRect(),this.updateLayoutMetrics(),this.currentDocument=this.selfRef.current.ownerDocument,this.currentWindow=this.currentDocument.defaultView,this.resizeObserver=new ResizeObserver((t=>{this.updateRect(t[0].contentRect)}));const t=this.selfRef.current;t&&this.resizeObserver.observe(t)}componentDidUpdate(){this.updateLayoutMetrics(),this.props.model!==this.previousModel&&(void 0!==this.previousModel&&this.previousModel._setChangeListener(void 0),this.props.model._setChangeListener(this.onModelChange),this.previousModel=this.props.model)}getCurrentDocument(){return this.currentDocument}getDomRect(){var t;return null===(t=this.selfRef.current)||void 0===t?void 0:t.getBoundingClientRect()}getRootDiv(){return this.selfRef.current}isSupportsPopout(){return this.supportsPopout}isRealtimeResize(){var t;return null!==(t=this.props.realtimeResize)&&void 0!==t&&t}onTabDrag(...t){var e,i;return null===(i=(e=this.props).onTabDrag)||void 0===i?void 0:i.call(e,...t)}getPopoutURL(){return this.popoutURL}componentWillUnmount(){var t;const e=this.selfRef.current;e&&(null===(t=this.resizeObserver)||void 0===t||t.unobserve(e))}setEditingTab(t){this.setState({editingTab:t})}getEditingTab(){return this.state.editingTab}render(){if(!this.selfRef.current)return t.createElement("div",{ref:this.selfRef,className:this.getClassName(g.FLEXLAYOUT__LAYOUT)},this.metricsElements());this.props.model._setPointerFine(window&&window.matchMedia&&window.matchMedia("(pointer: fine)").matches);const e=[],i=[],s=[],n={},o=[],r={headerBarSize:this.state.calculatedHeaderBarSize,tabBarSize:this.state.calculatedTabBarSize,borderBarSize:this.state.calculatedBorderBarSize};this.props.model._setShowHiddenBorder(this.state.showHiddenBorder),this.centerRect=this.props.model._layout(this.state.rect,r),this.renderBorder(this.props.model.getBorderSet(),e,n,s,o),this.renderChildren("",this.props.model.getRoot(),i,n,s,o);const a=[],d={};for(const t of this.tabIds)n[t]&&(a.push(t),d[t]=t);this.tabIds=a;for(const t of Object.keys(n))d[t]||this.tabIds.push(t);const l=[];if(this.state.showEdges){const e=this.centerRect,i=this.edgeRectLength,s=this.edgeRectWidth,n=this.edgeRectLength/2,o=this.getClassName(g.FLEXLAYOUT__EDGE_RECT),r=50;l.push(t.createElement("div",{key:"North",style:{top:e.y,left:e.x+e.width/2-n,width:i,height:s,borderBottomLeftRadius:r,borderBottomRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_TOP)})),l.push(t.createElement("div",{key:"West",style:{top:e.y+e.height/2-n,left:e.x,width:s,height:i,borderTopRightRadius:r,borderBottomRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_LEFT)})),l.push(t.createElement("div",{key:"South",style:{top:e.y+e.height-s,left:e.x+e.width/2-n,width:i,height:s,borderTopLeftRadius:r,borderTopRightRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_BOTTOM)})),l.push(t.createElement("div",{key:"East",style:{top:e.y+e.height/2-n,left:e.x+e.width-s,width:s,height:i,borderTopLeftRadius:r,borderBottomLeftRadius:r},className:o+" "+this.getClassName(g.FLEXLAYOUT__EDGE_RECT_RIGHT)}))}return t.createElement("div",{ref:this.selfRef,className:this.getClassName(g.FLEXLAYOUT__LAYOUT),onDragEnter:this.props.onExternalDrag?this.onDragEnter:void 0},i,this.tabIds.map((t=>n[t])),e,o,l,s,this.metricsElements(),this.state.portal)}metricsElements(){const e=this.styleFont({visibility:"hidden"});return t.createElement(t.Fragment,null,t.createElement("div",{key:"findHeaderBarSize",ref:this.findHeaderBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__TABSET_HEADER_SIZER)},"FindHeaderBarSize"),t.createElement("div",{key:"findTabBarSize",ref:this.findTabBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__TABSET_SIZER)},"FindTabBarSize"),t.createElement("div",{key:"findBorderBarSize",ref:this.findBorderBarSizeRef,style:e,className:this.getClassName(g.FLEXLAYOUT__BORDER_SIZER)},"FindBorderBarSize"))}renderBorder(e,s,n,o,r){for(const a of e.getBorders()){const e=`/border/${a.getLocation().getName()}`;if(a.isShowing()){s.push(t.createElement(C,{key:`border_${a.getLocation().getName()}`,path:e,border:a,layout:this,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory,icons:this.icons}));const d=a._getDrawChildren();let l=0,h=0;for(const s of d){if(s instanceof m){let i=e+"/s";r.push(t.createElement(M,{key:s.getId(),layout:this,node:s,path:i}))}else if(s instanceof b){let r=e+"/t"+h++;if(this.supportsPopout&&s.isFloating()){const e=this._getScreenRect(s),d=s._getAttr("borderWidth"),h=s._getAttr("borderHeight");e&&(-1!==d&&a.getLocation().getOrientation()===i.HORZ?e.width=d:-1!==h&&a.getLocation().getOrientation()===i.VERT&&(e.height=h)),o.push(t.createElement(z,{key:s.getId(),url:this.popoutURL,rect:e,title:s.getName(),id:s.getId(),onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},t.createElement(Y,{layout:this,node:s,factory:this.props.factory}))),n[s.getId()]=t.createElement(X,{key:s.getId(),layout:this,path:r,node:s,selected:l===a.getSelected()})}else n[s.getId()]=t.createElement(U,{key:s.getId(),layout:this,path:r,node:s,selected:l===a.getSelected(),factory:this.props.factory})}l++}}}}renderChildren(e,s,n,o,r,a){const d=s._getDrawChildren();let l=0,h=0,_=0;for(const s of d)if(s instanceof m){const i=e+"/s"+l++;a.push(t.createElement(M,{key:s.getId(),layout:this,path:i,node:s}))}else if(s instanceof v){const i=e+"/ts"+_++;n.push(t.createElement(F,{key:s.getId(),layout:this,path:i,node:s,iconFactory:this.props.iconFactory,titleFactory:this.props.titleFactory,icons:this.icons})),this.renderChildren(i,s,n,o,r,a)}else if(s instanceof b){const i=e+"/t"+h++,n=s.getParent().getChildren()[s.getParent().getSelected()];if(void 0===n&&console.warn("undefined selectedTab should not happen"),this.supportsPopout&&s.isFloating()){const e=this._getScreenRect(s);r.push(t.createElement(z,{key:s.getId(),url:this.popoutURL,rect:e,title:s.getName(),id:s.getId(),onSetWindow:this.onSetWindow,onCloseWindow:this.onCloseWindow},t.createElement(Y,{layout:this,node:s,factory:this.props.factory}))),o[s.getId()]=t.createElement(X,{key:s.getId(),layout:this,path:i,node:s,selected:s===n})}else o[s.getId()]=t.createElement(U,{key:s.getId(),layout:this,path:i,node:s,selected:s===n,factory:this.props.factory})}else{const t=e+(s.getOrientation()===i.HORZ?"/r":"/c")+_++;this.renderChildren(t,s,n,o,r,a)}}_getScreenRect(t){var e;const i=t.getRect().clone(),s=null===(e=this.selfRef.current)||void 0===e?void 0:e.getBoundingClientRect();if(!s)return null;const n=Math.min(80,this.currentWindow.outerHeight-this.currentWindow.innerHeight),o=Math.min(80,this.currentWindow.outerWidth-this.currentWindow.innerWidth);return i.x=i.x+s.x+this.currentWindow.screenX+o,i.y=i.y+s.y+this.currentWindow.screenY+n,i}addTabToTabSet(t,e){if(void 0!==this.props.model.getNodeById(t))return this.doAction(h.addNode(e,t,r.CENTER,-1))}addTabToActiveTabSet(t){const e=this.props.model.getActiveTabset();if(void 0!==e)return this.doAction(h.addNode(t,e.getId(),r.CENTER,-1))}addTabWithDragAndDrop(t,e,i){this.fnNewNodeDropped=i,this.newTabJson=e,this.dragStart(void 0,t,b._fromJson(e,this.props.model,!1),!0,void 0,void 0)}moveTabWithDragAndDrop(t,e){this.dragStart(void 0,e,t,!0,void 0,void 0)}addTabWithDragAndDropIndirect(t,e,i){this.fnNewNodeDropped=i,this.newTabJson=e,d.instance.addGlass(this.onCancelAdd),this.dragDivText=t,this.dragDiv=this.currentDocument.createElement("div"),this.dragDiv.className=this.getClassName(g.FLEXLAYOUT__DRAG_RECT),this.dragDiv.addEventListener("mousedown",this.onDragDivMouseDown),this.dragDiv.addEventListener("touchstart",this.onDragDivMouseDown,{passive:!1}),this.dragRectRender(this.dragDivText,void 0,this.newTabJson,(()=>{if(this.dragDiv){this.dragDiv.style.visibility="visible";const t=this.dragDiv.getBoundingClientRect(),e=new s(0,0,null==t?void 0:t.width,null==t?void 0:t.height);e.centerInRect(this.state.rect),this.dragDiv.setAttribute("data-layout-path","/drag-rectangle"),this.dragDiv.style.left=e.x+"px",this.dragDiv.style.top=e.y+"px"}})),this.selfRef.current.appendChild(this.dragDiv)}handleCustomTabDrag(t,e,i){var n,o,r;let a=null===(n=this.customDrop)||void 0===n?void 0:n.invalidated;const l=null===(o=this.customDrop)||void 0===o?void 0:o.callback;this.customDrop=void 0;const h=this.newTabJson||(this.dragNode instanceof b?this.dragNode:void 0);if(h&&(t.node instanceof v||t.node instanceof R)&&-1===t.index){const n=t.node.getSelectedNode(),o=null==n?void 0:n.getRect();if(n&&(null==o?void 0:o.contains(e.x,e.y))){let r;try{const a=this.onTabDrag(h,n,e.x-o.x,e.y-o.y,t.location,(()=>this.onDragMove(i)));a&&(r={rect:new s(a.x+o.x,a.y+o.y,a.width,a.height),callback:a.callback,invalidated:a.invalidated,dragging:h,over:n,x:e.x-o.x,y:e.y-o.y,location:t.location,cursor:a.cursor})}catch(t){console.error(t)}(null==r?void 0:r.callback)===l&&(a=void 0),this.customDrop=r}}this.dropInfo=t,this.outlineDiv&&(this.outlineDiv.className=this.getClassName(this.customDrop?g.FLEXLAYOUT__OUTLINE_RECT:t.className),this.customDrop?this.customDrop.rect.positionElement(this.outlineDiv):t.rect.positionElement(this.outlineDiv)),d.instance.setGlassCursorOverride(null===(r=this.customDrop)||void 0===r?void 0:r.cursor),this.outlineDiv&&(this.outlineDiv.style.visibility="visible");try{null==a||a()}catch(t){console.error(t)}}onDragEnter(t){if(d.instance.isDragging())return;const e=this.props.onExternalDrag(t);e&&(this.fnNewNodeDropped=e.onDrop,this.newTabJson=e.json,this.dragStart(t,e.dragText,b._fromJson(e.json,this.props.model,!1),!0,void 0,void 0))}checkForBorderToShow(t,e){const i=this.props.model._getOuterInnerRects().outer,s=i.getCenter(),n=this.edgeRectWidth,o=this.edgeRectLength/2;let a=!1;this.props.model.isEnableEdgeDock()&&this.state.showHiddenBorder===r.CENTER&&(e>s.y-o&&e<s.y+o||t>s.x-o&&t<s.x+o)&&(a=!0);let d=r.CENTER;a||(t<=i.x+n?d=r.LEFT:t>=i.getRight()-n?d=r.RIGHT:e<=i.y+n?d=r.TOP:e>=i.getBottom()-n&&(d=r.BOTTOM)),d!==this.state.showHiddenBorder&&this.setState({showHiddenBorder:d})}maximize(t){this.doAction(h.maximizeToggle(t.getId()))}customizeTab(t,e){this.props.onRenderTab&&this.props.onRenderTab(t,e)}customizeTabSet(t,e){this.props.onRenderTabSet&&this.props.onRenderTabSet(t,e)}i18nName(t,e){let i;return this.props.i18nMapper&&(i=this.props.i18nMapper(t,e)),void 0===i&&(i=t+(void 0===e?"":e)),i}getOnRenderFloatingTabPlaceholder(){return this.props.onRenderFloatingTabPlaceholder}getShowOverflowMenu(){return this.props.onShowOverflowMenu}getTabSetPlaceHolderCallback(){return this.props.onTabSetPlaceHolder}showContextMenu(t,e){this.props.onContextMenu&&this.props.onContextMenu(t,e)}auxMouseClick(t,e){this.props.onAuxMouseClick&&this.props.onAuxMouseClick(t,e)}}const J=e=>(t.useEffect((()=>{var t;null===(t=e.onRendered)||void 0===t||t.call(e)}),[e]),t.createElement(t.Fragment,null,e.children));class Z{static _fromJson(t,e){const i=new Z(e);return i._borders=t.map((t=>R._fromJson(t,e))),i}constructor(t){this._model=t,this._borders=[]}getBorders(){return this._borders}_forEachNode(t){for(const e of this._borders){t(e,0);for(const i of e.getChildren())i._forEachNode(t,1)}}_toJson(){return this._borders.map((t=>t.toJson()))}_layoutBorder(t,e){const s=t.outer,n=this._model.getRoot();let o=Math.max(0,s.height-n.getMinHeight()),r=Math.max(0,s.width-n.getMinWidth()),a=0,d=0,l=0,h=0;const _=this._borders.filter((t=>t.isShowing()));for(const t of _){t._setAdjustedSize(t.getSize());const e=-1!==t.getSelected();t.getLocation().getOrientation()===i.HORZ?(d+=t.getBorderBarSize(),e&&(r-=this._model.getSplitterSize(),d+=t.getSize(),h+=t.getSize())):(a+=t.getBorderBarSize(),e&&(o-=this._model.getSplitterSize(),a+=t.getSize(),l+=t.getSize()))}let c=0,u=!1;for(;d>r&&h>0||a>o&&l>0;){const t=_[c];if(-1!==t.getSelected()){const e=t._getAdjustedSize();d>r&&h>0&&t.getLocation().getOrientation()===i.HORZ&&e>0&&e>t.getMinSize()?(t._setAdjustedSize(e-1),d--,h--,u=!0):a>o&&l>0&&t.getLocation().getOrientation()===i.VERT&&e>0&&e>t.getMinSize()&&(t._setAdjustedSize(e-1),a--,l--,u=!0)}if(c=(c+1)%_.length,0===c){if(!u)break;u=!1}}for(const i of _)t.outer=i._layoutBorderOuter(t.outer,e);t.inner=t.outer;for(const i of _)t.inner=i._layoutBorderInner(t.inner,e);return t}_findDropTargetNode(t,e,i){for(const s of this._borders)if(s.isShowing()){const n=s.canDrop(t,e,i);if(void 0!==n)return n}}}class j{static fromJson(t){const e=new j;return j._attributeDefinitions.fromJson(t.global,e._attributes),t.borders&&(e._borders=Z._fromJson(t.borders,e)),e._root=f._fromJson(t.layout,e),e._tidy(),e}static _createAttributeDefinitions(){const t=new c;return t.add("legacyOverflowMenu",!1).setType(_.BOOLEAN),t.add("enableEdgeDock",!0).setType(_.BOOLEAN),t.add("rootOrientationVertical",!1).setType(_.BOOLEAN),t.add("marginInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("enableUseVisibility",!1).setType(_.BOOLEAN),t.add("enableRotateBorderIcons",!0).setType(_.BOOLEAN),t.add("splitterSize",-1).setType(_.NUMBER),t.add("splitterExtra",0).setType(_.NUMBER),t.add("tabEnableClose",!0).setType(_.BOOLEAN),t.add("tabCloseType",1).setType("ICloseType"),t.add("tabEnableFloat",!1).setType(_.BOOLEAN),t.add("tabEnableDrag",!0).setType(_.BOOLEAN),t.add("tabEnableRename",!0).setType(_.BOOLEAN),t.add("tabContentClassName",void 0).setType(_.STRING),t.add("tabClassName",void 0).setType(_.STRING),t.add("tabIcon",void 0).setType(_.STRING),t.add("tabEnableRenderOnDemand",!0).setType(_.BOOLEAN),t.add("tabDragSpeed",.3).setType(_.NUMBER),t.add("tabBorderWidth",-1).setType(_.NUMBER),t.add("tabBorderHeight",-1).setType(_.NUMBER),t.add("tabSetEnableDeleteWhenEmpty",!0).setType(_.BOOLEAN),t.add("tabSetEnableDrop",!0).setType(_.BOOLEAN),t.add("tabSetEnableDrag",!0).setType(_.BOOLEAN),t.add("tabSetEnableDivide",!0).setType(_.BOOLEAN),t.add("tabSetEnableMaximize",!0).setType(_.BOOLEAN),t.add("tabSetEnableClose",!1).setType(_.BOOLEAN),t.add("tabSetEnableSingleTabStretch",!1).setType(_.BOOLEAN),t.add("tabSetAutoSelectTab",!0).setType(_.BOOLEAN),t.add("tabSetClassNameTabStrip",void 0).setType(_.STRING),t.add("tabSetClassNameHeader",void 0).setType(_.STRING),t.add("tabSetEnableTabStrip",!0).setType(_.BOOLEAN),t.add("tabSetHeaderHeight",0).setType(_.NUMBER),t.add("tabSetTabStripHeight",0).setType(_.NUMBER),t.add("tabSetMarginInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("tabSetBorderInsets",{top:0,right:0,bottom:0,left:0}).setType("IInsets"),t.add("tabSetTabLocation","top").setType("ITabLocation"),t.add("tabSetMinWidth",0).setType(_.NUMBER),t.add("tabSetMinHeight",0).setType(_.NUMBER),t.add("borderSize",200).setType(_.NUMBER),t.add("borderMinSize",0).setType(_.NUMBER),t.add("borderBarSize",0).setType(_.NUMBER),t.add("borderEnableDrop",!0).setType(_.BOOLEAN),t.add("borderAutoSelectTabWhenOpen",!0).setType(_.BOOLEAN),t.add("borderAutoSelectTabWhenClosed",!1).setType(_.BOOLEAN),t.add("borderClassName",void 0).setType(_.STRING),t.add("borderEnableAutoHide",!1).setType(_.BOOLEAN),t}constructor(){this._borderRects={inner:s.empty(),outer:s.empty()},this._attributes={},this._idMap={},this._borders=new Z(this),this._pointerFine=!0,this._showHiddenBorder=r.CENTER}_setChangeListener(t){this._changeListener=t}getActiveTabset(){return this._activeTabSet&&this.getNodeById(this._activeTabSet.getId())?this._activeTabSet:void 0}_getShowHiddenBorder(){return this._showHiddenBorder}_setShowHiddenBorder(t){this._showHiddenBorder=t}_setActiveTabset(t){this._activeTabSet=t}getMaximizedTabset(){return this._maximizedTabSet}_setMaximizedTabset(t){this._maximizedTabSet=t}getRoot(){return this._root}isRootOrientationVertical(){return this._attributes.rootOrientationVertical}isUseVisibility(){return this._attributes.enableUseVisibility}isEnableRotateBorderIcons(){return this._attributes.enableRotateBorderIcons}getBorderSet(){return this._borders}_getOuterInnerRects(){return this._borderRects}_getPointerFine(){return this._pointerFine}_setPointerFine(t){this._pointerFine=t}visitNodes(t){this._borders._forEachNode(t),this._root._forEachNode(t,0)}getNodeById(t){return this._idMap[t]}getFirstTabSet(t=this._root){const e=t.getChildren()[0];return e instanceof v?e:this.getFirstTabSet(e)}doAction(t){let e;switch(t.type){case h.ADD_NODE:{const i=new b(this,t.data.json,!0),s=this._idMap[t.data.toNode];(s instanceof v||s instanceof R||s instanceof f)&&(s.drop(i,r.getByName(t.data.location),t.data.index,t.data.select),e=i);break}case h.MOVE_NODE:{const e=this._idMap[t.data.fromNode];if(e instanceof b||e instanceof v){const i=this._idMap[t.data.toNode];(i instanceof v||i instanceof R||i instanceof f)&&i.drop(e,r.getByName(t.data.location),t.data.index,t.data.select)}break}case h.DELETE_TAB:{const e=this._idMap[t.data.node];e instanceof b&&e._delete();break}case h.DELETE_TABSET:{const e=this._idMap[t.data.node];if(e instanceof v){const t=[...e.getChildren()];for(let e=0;e<t.length;e++){const i=t[e];i.isEnableClose()&&i._delete()}0===e.getChildren().length&&e._delete(),this._tidy()}break}case h.FLOAT_TAB:{const e=this._idMap[t.data.node];e instanceof b&&(e._setFloating(!0),function(t){const e=t.getParent();if(null!==e)if(e instanceof v){let i=!1,s=0;const n=e.getChildren();for(let e=0;e<n.length;e++){const o=n[e];if(o===t)i=!0;else if(!o.isFloating()&&(s=e,i))break}e._setSelected(s)}else e instanceof R&&e._setSelected(-1)}(e));break}case h.UNFLOAT_TAB:{const e=this._idMap[t.data.node];e instanceof b&&(e._setFloating(!1),function(t){const e=t.getParent();if(null!==e&&(e instanceof v||e instanceof R)){const i=e.getChildren();for(let s=0;s<i.length;s++)if(i[s]===t)return void e._setSelected(s)}}(e));break}case h.RENAME_TAB:{const e=this._idMap[t.data.node];e instanceof b&&e._setName(t.data.text);break}case h.SELECT_TAB:{const e=this._idMap[t.data.tabNode];if(e instanceof b){const t=e.getParent(),i=t.getChildren().indexOf(e);t instanceof R?t.getSelected()===i?t._setSelected(-1):t._setSelected(i):t instanceof v&&(t.getSelected()!==i&&t._setSelected(i),this._activeTabSet=t)}break}case h.SET_ACTIVE_TABSET:if(void 0===t.data.tabsetNode)this._activeTabSet=void 0;else{const e=this._idMap[t.data.tabsetNode];e instanceof v&&(this._activeTabSet=e)}break;case h.ADJUST_SPLIT:{const e=this._idMap[t.data.node1],i=this._idMap[t.data.node2];(e instanceof v||e instanceof f)&&(i instanceof v||i instanceof f)&&(this._adjustSplitSide(e,t.data.weight1,t.data.pixelWidth1),this._adjustSplitSide(i,t.data.weight2,t.data.pixelWidth2));break}case h.ADJUST_BORDER_SPLIT:{const e=this._idMap[t.data.node];e instanceof R&&e._setSize(t.data.pos);break}case h.MAXIMIZE_TOGGLE:{const e=this._idMap[t.data.node];e instanceof v&&(e===this._maximizedTabSet?this._maximizedTabSet=void 0:(this._maximizedTabSet=e,this._activeTabSet=e));break}case h.UPDATE_MODEL_ATTRIBUTES:this._updateAttrs(t.data.json);break;case h.UPDATE_NODE_ATTRIBUTES:this._idMap[t.data.node]._updateAttrs(t.data.json)}return this._updateIdMap(),void 0!==this._changeListener&&this._changeListener(t),e}_updateIdMap(){this._idMap={},this.visitNodes((t=>this._idMap[t.getId()]=t))}_adjustSplitSide(t,e,s){t._setWeight(e),null!=t.getWidth()&&t.getOrientation()===i.VERT?t._updateAttrs({width:s}):null!=t.getHeight()&&t.getOrientation()===i.HORZ&&t._updateAttrs({height:s})}toJson(){const t={};return j._attributeDefinitions.toJson(t,this._attributes),this.visitNodes((t=>{t._fireEvent("save",void 0)})),{global:t,borders:this._borders._toJson(),layout:this._root.toJson()}}getSplitterSize(){let t=this._attributes.splitterSize;return-1===t&&(t=this._pointerFine?8:12),t}isLegacyOverflowMenu(){return this._attributes.legacyOverflowMenu}getSplitterExtra(){return this._attributes.splitterExtra}isEnableEdgeDock(){return this._attributes.enableEdgeDock}_addNode(t){const e=t.getId();if(void 0!==this._idMap[e])throw new Error(`Error: each node must have a unique id, duplicate id:${t.getId()}`);"splitter"!==t.getType()&&(this._idMap[e]=t)}_layout(t,e){var i;return this._borderRects=this._borders._layoutBorder({outer:t,inner:t},e),t=this._borderRects.inner.removeInsets(this._getAttribute("marginInsets")),null===(i=this._root)||void 0===i||i.calcMinSize(),this._root._layout(t,e),t}_findDropTargetNode(t,e,i){let s=this._root._findDropTargetNode(t,e,i);return void 0===s&&(s=this._borders._findDropTargetNode(t,e,i)),s}_tidy(){this._root._tidy()}_updateAttrs(t){j._attributeDefinitions.update(t,this._attributes)}_nextUniqueId(){return"#"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)))}_getAttribute(t){return this._attributes[t]}setOnAllowDrop(t){this._onAllowDrop=t}_getOnAllowDrop(){return this._onAllowDrop}setOnCreateTabSet(t){this._onCreateTabSet=t}_getOnCreateTabSet(){return this._onCreateTabSet}static toTypescriptInterfaces(){console.log(j._attributeDefinitions.toTypescriptInterface("Global",void 0)),console.log(f.getAttributeDefinitions().toTypescriptInterface("Row",j._attributeDefinitions)),console.log(v.getAttributeDefinitions().toTypescriptInterface("TabSet",j._attributeDefinitions)),console.log(b.getAttributeDefinitions().toTypescriptInterface("Tab",j._attributeDefinitions)),console.log(R.getAttributeDefinitions().toTypescriptInterface("Border",j._attributeDefinitions))}toString(){return JSON.stringify(this.toJson())}}j._attributeDefinitions=j._createAttributeDefinitions()})(),o})()));
@@ -21,6 +21,7 @@ class TabNode extends Node_1.Node {
21
21
  attributeDefinitions.add("component", undefined).setType(Attribute_1.Attribute.STRING);
22
22
  attributeDefinitions.add("config", undefined).setType("any");
23
23
  attributeDefinitions.add("floating", false).setType(Attribute_1.Attribute.BOOLEAN);
24
+ attributeDefinitions.add("tabsetClassName", undefined).setType(Attribute_1.Attribute.STRING);
24
25
  attributeDefinitions.addInherited("enableClose", "tabEnableClose").setType(Attribute_1.Attribute.BOOLEAN);
25
26
  attributeDefinitions.addInherited("closeType", "tabCloseType").setType("ICloseType");
26
27
  attributeDefinitions.addInherited("enableDrag", "tabEnableDrag").setType(Attribute_1.Attribute.BOOLEAN);
@@ -118,6 +119,9 @@ class TabNode extends Node_1.Node {
118
119
  getContentClassName() {
119
120
  return this._getAttr("contentClassName");
120
121
  }
122
+ getTabSetClassName() {
123
+ return this._getAttr("tabsetClassName");
124
+ }
121
125
  isEnableRenderOnDemand() {
122
126
  return this._getAttr("enableRenderOnDemand");
123
127
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TabNode.js","sourceRoot":"","sources":["../../src/model/TabNode.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AACzC,kEAA+D;AAM/D,iCAA8B;AAG9B,MAAa,OAAQ,SAAQ,WAAI;IAG7B,gBAAgB;IAChB,MAAM,CAAC,SAAS,CAAC,IAAS,EAAE,KAAY,EAAE,aAAsB,IAAI;QAChE,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC3D,OAAO,aAAa,CAAC;IACzB,CAAC;IAID,gBAAgB;IACR,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@ -180,6 +180,12 @@ const TabSet = (props) => {
180
180
  if (node.isMaximized() && !showHeader) {
181
181
  tabStripClasses += " " + cm(Types_1.CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);
182
182
  }
183
+ if (isTabStretch) {
184
+ const tabNode = node.getChildren()[0];
185
+ if (tabNode.getTabSetClassName() !== undefined) {
186
+ tabStripClasses += " " + tabNode.getTabSetClassName();
187
+ }
188
+ }
183
189
  if (showHeader) {
184
190
  const headerToolbar = (React.createElement("div", { key: "toolbar", ref: toolbarRef, className: cm(Types_1.CLASSES.FLEXLAYOUT__TAB_TOOLBAR), onMouseDown: onInterceptMouseDown, onTouchStart: onInterceptMouseDown, onDragStart: (e) => { e.preventDefault(); } }, headerButtons));
185
191
  let tabHeaderClasses = cm(Types_1.CLASSES.FLEXLAYOUT__TABSET_HEADER);
@@ -1 +1 @@
1
- {"version":3,"file":"TabSet.js","sourceRoot":"","sources":["../../src/view/TabSet.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,4CAAyC;AACzC,8CAA2C;AAG3C,4CAAyC;AAEzC,2CAAwC;AACxC,uDAAmD;AACnD,gDAA6C;AAC7C,oCAAmC;AACnC,mCAAuD;AAavD,gBAAgB;AACT,MAAM,MAAM,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1C,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvE,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAC7D,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAA2B,IAAI,CAAC,CAAC;IACvE,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IACjE,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAEnE,MAAM,EAAE,OAAO,EAAE,QAAQ,E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AC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;QACjC,MAAM,mBAAmB,GAAG,MAAM,CAAC,4BAA4B,EAAE,CAAC;QAClE,IAAI,mBAAmB,EAAE;YACrB,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAC3C;KACJ;IAED,MAAM,MAAM,GAAG,6BAAK,SAAS,EAAE,EAAE,CAAC,eAAO,CAAC,0BAA0B,CAAC,IAChE,WAAW,CACV,CAAA;IAEN,IAAI,OAAO,CAAC;IACZ,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,KAAK,EAAE;QACjC,OAAO,GAAG;YAAG,MAAM;YAAE,QAAQ;YAAE,MAAM,CAAI,CAAC;KAC7C;SAAM;QACH,OAAO,GAAG;YAAG,MAAM;YAAE,MAAM;YAAE,QAAQ,CAAI,CAAC;KAC7C;IAED,OAAO,CACH,6BAAK,GAAG,EAAE,OAAO,EACb,GAAG,EAAC,KAAK,sBACS,IAAI,EACtB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,eAAO,CAAC,kBAAkB,CAAC,EACzC,OAAO,EAAE,YAAY,IACpB,OAAO,CACN,CACT,CAAC;AACN,CAAC,CAAC;AA7XW,QAAA,MAAM,UA6XjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexlayout-react",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "A multi-tab docking layout manager",
5
5
  "main": "lib/index.js",
6
6
  "types": "./declarations/index.d.ts",
@@ -10,13 +10,18 @@
10
10
  "dock",
11
11
  "popout",
12
12
  "tabs",
13
- "drag-and-drop",
14
13
  "tabset",
15
14
  "splitter",
16
15
  "drag",
17
16
  "drop",
18
17
  "reactjs",
19
- "react-dom"
18
+ "flexlayout",
19
+ "flex layout",
20
+ "layout manager",
21
+ "drag and drop",
22
+ "split view",
23
+ "docking library",
24
+ "docking layout"
20
25
  ],
21
26
  "scripts": {
22
27
  "start": "webpack serve",
@@ -126,6 +126,7 @@ export interface ITabAttributes {
126
126
  component?: string;
127
127
  config?: any;
128
128
  contentClassName?: string; // - inherited from global tabContentClassName
129
+ tabsetClassName?: string; // default undefined
129
130
  enableClose?: boolean; // default: true - inherited from global tabEnableClose
130
131
  enableDrag?: boolean; // default: true - inherited from global tabEnableDrag
131
132
  enableFloat?: boolean; // default: false - inherited from global tabEnableFloat
@@ -31,6 +31,7 @@ export class TabNode extends Node implements IDraggable {
31
31
  attributeDefinitions.add("component", undefined).setType(Attribute.STRING);
32
32
  attributeDefinitions.add("config", undefined).setType("any");
33
33
  attributeDefinitions.add("floating", false).setType(Attribute.BOOLEAN);
34
+ attributeDefinitions.add("tabsetClassName", undefined).setType(Attribute.STRING);
34
35
 
35
36
  attributeDefinitions.addInherited("enableClose", "tabEnableClose").setType(Attribute.BOOLEAN);
36
37
  attributeDefinitions.addInherited("closeType", "tabCloseType").setType("ICloseType");
@@ -161,6 +162,10 @@ export class TabNode extends Node implements IDraggable {
161
162
  return this._getAttr("contentClassName") as string | undefined;
162
163
  }
163
164
 
165
+ getTabSetClassName() {
166
+ return this._getAttr("tabsetClassName") as string | undefined;
167
+ }
168
+
164
169
  isEnableRenderOnDemand() {
165
170
  return this._getAttr("enableRenderOnDemand") as boolean;
166
171
  }
@@ -307,6 +307,13 @@ export const TabSet = (props: ITabSetProps) => {
307
307
  tabStripClasses += " " + cm(CLASSES.FLEXLAYOUT__TABSET_MAXIMIZED);
308
308
  }
309
309
 
310
+ if (isTabStretch) {
311
+ const tabNode = node.getChildren()[0] as TabNode;
312
+ if (tabNode.getTabSetClassName() !== undefined) {
313
+ tabStripClasses += " " + tabNode.getTabSetClassName();
314
+ }
315
+ }
316
+
310
317
  if (showHeader) {
311
318
 
312
319
  const headerToolbar = (