@deephaven/golden-layout 0.17.1-beta.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LayoutManager.js +1140 -0
- package/dist/LayoutManager.js.map +1 -0
- package/dist/base.js +16 -0
- package/dist/base.js.map +1 -0
- package/dist/config/ItemDefaultConfig.js +8 -0
- package/dist/config/ItemDefaultConfig.js.map +1 -0
- package/dist/config/defaultConfig.js +42 -0
- package/dist/config/defaultConfig.js.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/container/ItemContainer.js +192 -0
- package/dist/container/ItemContainer.js.map +1 -0
- package/dist/container/index.js +5 -0
- package/dist/container/index.js.map +1 -0
- package/dist/controls/BrowserPopout.js +260 -0
- package/dist/controls/BrowserPopout.js.map +1 -0
- package/dist/controls/DragProxy.js +236 -0
- package/dist/controls/DragProxy.js.map +1 -0
- package/dist/controls/DragSource.js +60 -0
- package/dist/controls/DragSource.js.map +1 -0
- package/dist/controls/DragSourceFromEvent.js +75 -0
- package/dist/controls/DragSourceFromEvent.js.map +1 -0
- package/dist/controls/DropTargetIndicator.js +28 -0
- package/dist/controls/DropTargetIndicator.js.map +1 -0
- package/dist/controls/Header.js +698 -0
- package/dist/controls/Header.js.map +1 -0
- package/dist/controls/HeaderButton.js +23 -0
- package/dist/controls/HeaderButton.js.map +1 -0
- package/dist/controls/Splitter.js +45 -0
- package/dist/controls/Splitter.js.map +1 -0
- package/dist/controls/Tab.js +259 -0
- package/dist/controls/Tab.js.map +1 -0
- package/dist/controls/TransitionIndicator.js +64 -0
- package/dist/controls/TransitionIndicator.js.map +1 -0
- package/dist/controls/index.js +23 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/errors/ConfigurationError.js +10 -0
- package/dist/errors/ConfigurationError.js.map +1 -0
- package/dist/errors/index.js +5 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/items/AbstractContentItem.js +617 -0
- package/dist/items/AbstractContentItem.js.map +1 -0
- package/dist/items/Component.js +84 -0
- package/dist/items/Component.js.map +1 -0
- package/dist/items/Root.js +93 -0
- package/dist/items/Root.js.map +1 -0
- package/dist/items/RowOrColumn.js +550 -0
- package/dist/items/RowOrColumn.js.map +1 -0
- package/dist/items/Stack.js +498 -0
- package/dist/items/Stack.js.map +1 -0
- package/dist/items/index.js +13 -0
- package/dist/items/index.js.map +1 -0
- package/dist/utils/BubblingEvent.js +12 -0
- package/dist/utils/BubblingEvent.js.map +1 -0
- package/dist/utils/ConfigMinifier.js +160 -0
- package/dist/utils/ConfigMinifier.js.map +1 -0
- package/dist/utils/DragListener.js +128 -0
- package/dist/utils/DragListener.js.map +1 -0
- package/dist/utils/EventEmitter.js +133 -0
- package/dist/utils/EventEmitter.js.map +1 -0
- package/dist/utils/EventHub.js +147 -0
- package/dist/utils/EventHub.js.map +1 -0
- package/dist/utils/ReactComponentHandler.js +135 -0
- package/dist/utils/ReactComponentHandler.js.map +1 -0
- package/dist/utils/index.js +22 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/utils.js +195 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +20 -47
- package/dist/goldenlayout.js +0 -6314
- package/dist/goldenlayout.min.js +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import $ from 'jquery';
|
|
2
|
+
import AbstractContentItem from './AbstractContentItem.js';
|
|
3
|
+
import utils from '../utils/index.js';
|
|
4
|
+
import errors from '../errors/index.js';
|
|
5
|
+
import container from '../container/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* @param {[type]} layoutManager [description]
|
|
8
|
+
* @param {[type]} config [description]
|
|
9
|
+
* @param {[type]} parent [description]
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var Component = function Component(layoutManager, config, parent) {
|
|
13
|
+
AbstractContentItem.call(this, layoutManager, config, parent);
|
|
14
|
+
var ComponentConstructor = layoutManager.getComponent(this.config.componentName) || layoutManager.getFallbackComponent(),
|
|
15
|
+
componentConfig = $.extend(true, {}, this.config.componentState || {});
|
|
16
|
+
|
|
17
|
+
if (ComponentConstructor == null) {
|
|
18
|
+
throw new errors.ConfigurationError('Unknown component "' + this.config.componentName + '"');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
componentConfig.componentName = this.config.componentName;
|
|
22
|
+
this.componentName = this.config.componentName;
|
|
23
|
+
|
|
24
|
+
if (this.config.title === '') {
|
|
25
|
+
this.config.title = this.config.componentName;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
this.isComponent = true;
|
|
29
|
+
this.container = new container.ItemContainer(this.config, this, layoutManager);
|
|
30
|
+
this.instance = new ComponentConstructor(this.container, componentConfig);
|
|
31
|
+
this.element = this.container._element;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
utils.extend(Component, AbstractContentItem);
|
|
35
|
+
utils.copy(Component.prototype, {
|
|
36
|
+
close: function close() {
|
|
37
|
+
this.parent.removeChild(this);
|
|
38
|
+
},
|
|
39
|
+
setSize: function setSize() {
|
|
40
|
+
if (this.element.is(':visible')) {
|
|
41
|
+
// Do not update size of hidden components to prevent unwanted reflows
|
|
42
|
+
this.container._$setSize(this.element.width(), this.element.height());
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
_$init: function _$init() {
|
|
46
|
+
AbstractContentItem.prototype._$init.call(this);
|
|
47
|
+
|
|
48
|
+
this.container.emit('open');
|
|
49
|
+
},
|
|
50
|
+
_$hide: function _$hide() {
|
|
51
|
+
this.container.hide();
|
|
52
|
+
|
|
53
|
+
AbstractContentItem.prototype._$hide.call(this);
|
|
54
|
+
},
|
|
55
|
+
_$show: function _$show() {
|
|
56
|
+
this.container.show();
|
|
57
|
+
|
|
58
|
+
if (this.container._config.isFocusOnShow) {
|
|
59
|
+
// focus the shown container element on show
|
|
60
|
+
// preventScroll isn't supported in safari, but also doesn't matter for illumon when 100% window
|
|
61
|
+
this.container._contentElement[0].focus({
|
|
62
|
+
preventScroll: true
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
AbstractContentItem.prototype._$show.call(this);
|
|
67
|
+
},
|
|
68
|
+
_$destroy: function _$destroy() {
|
|
69
|
+
this.container.emit('destroy', this);
|
|
70
|
+
|
|
71
|
+
AbstractContentItem.prototype._$destroy.call(this);
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Dragging onto a component directly is not an option
|
|
76
|
+
*
|
|
77
|
+
* @returns null
|
|
78
|
+
*/
|
|
79
|
+
_$getArea: function _$getArea() {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export default Component;
|
|
84
|
+
//# sourceMappingURL=Component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.js","names":["$","AbstractContentItem","utils","errors","container","Component","layoutManager","config","parent","call","ComponentConstructor","getComponent","componentName","getFallbackComponent","componentConfig","extend","componentState","ConfigurationError","title","isComponent","ItemContainer","instance","element","_element","copy","prototype","close","removeChild","setSize","is","_$setSize","width","height","_$init","emit","_$hide","hide","_$show","show","_config","isFocusOnShow","_contentElement","focus","preventScroll","_$destroy","_$getArea"],"sources":["../../src/items/Component.js"],"sourcesContent":["import $ from 'jquery';\nimport AbstractContentItem from './AbstractContentItem.js';\nimport utils from '../utils/index.js';\nimport errors from '../errors/index.js';\nimport container from '../container/index.js';\n\n/**\n * @param {[type]} layoutManager [description]\n * @param {[type]} config [description]\n * @param {[type]} parent [description]\n */\nconst Component = function (layoutManager, config, parent) {\n AbstractContentItem.call(this, layoutManager, config, parent);\n\n var ComponentConstructor =\n layoutManager.getComponent(this.config.componentName) ||\n layoutManager.getFallbackComponent(),\n componentConfig = $.extend(true, {}, this.config.componentState || {});\n\n if (ComponentConstructor == null) {\n throw new errors.ConfigurationError(\n 'Unknown component \"' + this.config.componentName + '\"'\n );\n }\n componentConfig.componentName = this.config.componentName;\n this.componentName = this.config.componentName;\n\n if (this.config.title === '') {\n this.config.title = this.config.componentName;\n }\n\n this.isComponent = true;\n this.container = new container.ItemContainer(\n this.config,\n this,\n layoutManager\n );\n this.instance = new ComponentConstructor(this.container, componentConfig);\n this.element = this.container._element;\n};\n\nutils.extend(Component, AbstractContentItem);\n\nutils.copy(Component.prototype, {\n close: function () {\n this.parent.removeChild(this);\n },\n\n setSize: function () {\n if (this.element.is(':visible')) {\n // Do not update size of hidden components to prevent unwanted reflows\n this.container._$setSize(this.element.width(), this.element.height());\n }\n },\n\n _$init: function () {\n AbstractContentItem.prototype._$init.call(this);\n this.container.emit('open');\n },\n\n _$hide: function () {\n this.container.hide();\n AbstractContentItem.prototype._$hide.call(this);\n },\n\n _$show: function () {\n this.container.show();\n if (this.container._config.isFocusOnShow) {\n // focus the shown container element on show\n // preventScroll isn't supported in safari, but also doesn't matter for illumon when 100% window\n this.container._contentElement[0].focus({ preventScroll: true });\n }\n AbstractContentItem.prototype._$show.call(this);\n },\n\n _$destroy: function () {\n this.container.emit('destroy', this);\n AbstractContentItem.prototype._$destroy.call(this);\n },\n\n /**\n * Dragging onto a component directly is not an option\n *\n * @returns null\n */\n _$getArea: function () {\n return null;\n },\n});\n\nexport default Component;\n"],"mappings":"AAAA,OAAOA,CAAP,MAAc,QAAd;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,KAAP,MAAkB,mBAAlB;AACA,OAAOC,MAAP,MAAmB,oBAAnB;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AAEA;AACA;AACA;AACA;AACA;;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAUC,aAAV,EAAyBC,MAAzB,EAAiCC,MAAjC,EAAyC;EACzDP,mBAAmB,CAACQ,IAApB,CAAyB,IAAzB,EAA+BH,aAA/B,EAA8CC,MAA9C,EAAsDC,MAAtD;EAEA,IAAIE,oBAAoB,GACpBJ,aAAa,CAACK,YAAd,CAA2B,KAAKJ,MAAL,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,KAAb,EAAzB,EAA+C,KAAKT,OAAL,CAAaU,MAAb,EAA/C;IACD;EACF,CAV6B;EAY9BC,MAAM,EAAE,kBAAY;IAClBhC,mBAAmB,CAACwB,SAApB,CAA8BQ,MAA9B,CAAqCxB,IAArC,CAA0C,IAA1C;;IACA,KAAKL,SAAL,CAAe8B,IAAf,CAAoB,MAApB;EACD,CAf6B;EAiB9BC,MAAM,EAAE,kBAAY;IAClB,KAAK/B,SAAL,CAAegC,IAAf;;IACAnC,mBAAmB,CAACwB,SAApB,CAA8BU,MAA9B,CAAqC1B,IAArC,CAA0C,IAA1C;EACD,CApB6B;EAsB9B4B,MAAM,EAAE,kBAAY;IAClB,KAAKjC,SAAL,CAAekC,IAAf;;IACA,IAAI,KAAKlC,SAAL,CAAemC,OAAf,CAAuBC,aAA3B,EAA0C;MACxC;MACA;MACA,KAAKpC,SAAL,CAAeqC,eAAf,CAA+B,CAA/B,EAAkCC,KAAlC,CAAwC;QAAEC,aAAa,EAAE;MAAjB,CAAxC;IACD;;IACD1C,mBAAmB,CAACwB,SAApB,CAA8BY,MAA9B,CAAqC5B,IAArC,CAA0C,IAA1C;EACD,CA9B6B;EAgC9BmC,SAAS,EAAE,qBAAY;IACrB,KAAKxC,SAAL,CAAe8B,IAAf,CAAoB,SAApB,EAA+B,IAA/B;;IACAjC,mBAAmB,CAACwB,SAApB,CAA8BmB,SAA9B,CAAwCnC,IAAxC,CAA6C,IAA7C;EACD,CAnC6B;;EAqC9B;AACF;AACA;AACA;AACA;EACEoC,SAAS,EAAE,qBAAY;IACrB,OAAO,IAAP;EACD;AA5C6B,CAAhC;AA+CA,eAAexC,SAAf"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import $ from 'jquery';
|
|
2
|
+
import utils from '../utils/index.js';
|
|
3
|
+
import AbstractContentItem from './AbstractContentItem.js';
|
|
4
|
+
import RowOrColumn from './RowOrColumn.js';
|
|
5
|
+
|
|
6
|
+
var Root = function Root(layoutManager, config, containerElement) {
|
|
7
|
+
AbstractContentItem.call(this, layoutManager, config, null);
|
|
8
|
+
this.isRoot = true;
|
|
9
|
+
this.type = 'root';
|
|
10
|
+
this.element = $('<div class="lm_goldenlayout lm_item lm_root"></div>');
|
|
11
|
+
this.childElementContainer = this.element;
|
|
12
|
+
this._containerElement = containerElement;
|
|
13
|
+
|
|
14
|
+
this._containerElement.append(this.element);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
utils.extend(Root, AbstractContentItem);
|
|
18
|
+
utils.copy(Root.prototype, {
|
|
19
|
+
addChild: function addChild(contentItem) {
|
|
20
|
+
if (this.contentItems.length > 0) {
|
|
21
|
+
throw new Error('Root node can only have a single child');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);
|
|
25
|
+
this.childElementContainer.append(contentItem.element);
|
|
26
|
+
AbstractContentItem.prototype.addChild.call(this, contentItem);
|
|
27
|
+
this.callDownwards('setSize');
|
|
28
|
+
this.emitBubblingEvent('stateChanged');
|
|
29
|
+
},
|
|
30
|
+
setSize: function setSize(width, height) {
|
|
31
|
+
width = typeof width === 'undefined' ? this._containerElement.width() : width;
|
|
32
|
+
height = typeof height === 'undefined' ? this._containerElement.height() : height;
|
|
33
|
+
this.element.width(width);
|
|
34
|
+
this.element.height(height);
|
|
35
|
+
/*
|
|
36
|
+
* Root can be empty
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
if (this.contentItems[0]) {
|
|
40
|
+
this.contentItems[0].element.width(width);
|
|
41
|
+
this.contentItems[0].element.height(height);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
_$highlightDropZone: function _$highlightDropZone(x, y, area) {
|
|
45
|
+
this.layoutManager.tabDropPlaceholder.remove();
|
|
46
|
+
|
|
47
|
+
AbstractContentItem.prototype._$highlightDropZone.apply(this, arguments);
|
|
48
|
+
},
|
|
49
|
+
_$onDrop: function _$onDrop(contentItem, area) {
|
|
50
|
+
var stack;
|
|
51
|
+
|
|
52
|
+
if (contentItem.isComponent) {
|
|
53
|
+
stack = this.layoutManager.createContentItem({
|
|
54
|
+
type: 'stack',
|
|
55
|
+
header: contentItem.config.header || {}
|
|
56
|
+
}, this);
|
|
57
|
+
|
|
58
|
+
stack._$init();
|
|
59
|
+
|
|
60
|
+
stack.addChild(contentItem);
|
|
61
|
+
contentItem = stack;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!this.contentItems.length) {
|
|
65
|
+
this.addChild(contentItem);
|
|
66
|
+
} else {
|
|
67
|
+
var type = area.side[0] == 'x' ? 'row' : 'column';
|
|
68
|
+
var dimension = area.side[0] == 'x' ? 'width' : 'height';
|
|
69
|
+
var insertBefore = area.side[1] == '2';
|
|
70
|
+
var column = this.contentItems[0];
|
|
71
|
+
|
|
72
|
+
if (!column instanceof RowOrColumn || column.type != type) {
|
|
73
|
+
var rowOrColumn = this.layoutManager.createContentItem({
|
|
74
|
+
type: type
|
|
75
|
+
}, this);
|
|
76
|
+
this.replaceChild(column, rowOrColumn);
|
|
77
|
+
rowOrColumn.addChild(contentItem, insertBefore ? 0 : undefined, true);
|
|
78
|
+
rowOrColumn.addChild(column, insertBefore ? undefined : 0, true);
|
|
79
|
+
column.config[dimension] = 50;
|
|
80
|
+
contentItem.config[dimension] = 50;
|
|
81
|
+
rowOrColumn.callDownwards('setSize');
|
|
82
|
+
} else {
|
|
83
|
+
var sibbling = column.contentItems[insertBefore ? 0 : column.contentItems.length - 1];
|
|
84
|
+
column.addChild(contentItem, insertBefore ? 0 : undefined, true);
|
|
85
|
+
sibbling.config[dimension] *= 0.5;
|
|
86
|
+
contentItem.config[dimension] = sibbling.config[dimension];
|
|
87
|
+
column.callDownwards('setSize');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export default Root;
|
|
93
|
+
//# sourceMappingURL=Root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Root.js","names":["$","utils","AbstractContentItem","RowOrColumn","Root","layoutManager","config","containerElement","call","isRoot","type","element","childElementContainer","_containerElement","append","extend","copy","prototype","addChild","contentItem","contentItems","length","Error","_$normalizeContentItem","callDownwards","emitBubblingEvent","setSize","width","height","_$highlightDropZone","x","y","area","tabDropPlaceholder","remove","apply","arguments","_$onDrop","stack","isComponent","createContentItem","header","_$init","side","dimension","insertBefore","column","rowOrColumn","replaceChild","undefined","sibbling"],"sources":["../../src/items/Root.js"],"sourcesContent":["import $ from 'jquery';\nimport utils from '../utils/index.js';\nimport AbstractContentItem from './AbstractContentItem.js';\nimport RowOrColumn from './RowOrColumn.js';\n\nconst Root = function (layoutManager, config, containerElement) {\n AbstractContentItem.call(this, layoutManager, config, null);\n this.isRoot = true;\n this.type = 'root';\n this.element = $('<div class=\"lm_goldenlayout lm_item lm_root\"></div>');\n this.childElementContainer = this.element;\n this._containerElement = containerElement;\n this._containerElement.append(this.element);\n};\n\nutils.extend(Root, AbstractContentItem);\n\nutils.copy(Root.prototype, {\n addChild: function (contentItem) {\n if (this.contentItems.length > 0) {\n throw new Error('Root node can only have a single child');\n }\n\n contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);\n this.childElementContainer.append(contentItem.element);\n AbstractContentItem.prototype.addChild.call(this, contentItem);\n\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n },\n\n setSize: function (width, height) {\n width =\n typeof width === 'undefined' ? this._containerElement.width() : width;\n height =\n typeof height === 'undefined' ? this._containerElement.height() : height;\n\n this.element.width(width);\n this.element.height(height);\n\n /*\n * Root can be empty\n */\n if (this.contentItems[0]) {\n this.contentItems[0].element.width(width);\n this.contentItems[0].element.height(height);\n }\n },\n\n _$highlightDropZone: function (x, y, area) {\n this.layoutManager.tabDropPlaceholder.remove();\n AbstractContentItem.prototype._$highlightDropZone.apply(this, arguments);\n },\n\n _$onDrop: function (contentItem, area) {\n var stack;\n\n if (contentItem.isComponent) {\n stack = this.layoutManager.createContentItem(\n {\n type: 'stack',\n header: contentItem.config.header || {},\n },\n this\n );\n stack._$init();\n stack.addChild(contentItem);\n contentItem = stack;\n }\n\n if (!this.contentItems.length) {\n this.addChild(contentItem);\n } else {\n var type = area.side[0] == 'x' ? 'row' : 'column';\n var dimension = area.side[0] == 'x' ? 'width' : 'height';\n var insertBefore = area.side[1] == '2';\n var column = this.contentItems[0];\n if (!column instanceof RowOrColumn || column.type != type) {\n var rowOrColumn = this.layoutManager.createContentItem(\n { type: type },\n this\n );\n this.replaceChild(column, rowOrColumn);\n rowOrColumn.addChild(contentItem, insertBefore ? 0 : undefined, true);\n rowOrColumn.addChild(column, insertBefore ? undefined : 0, true);\n column.config[dimension] = 50;\n contentItem.config[dimension] = 50;\n rowOrColumn.callDownwards('setSize');\n } else {\n var sibbling =\n column.contentItems[\n insertBefore ? 0 : column.contentItems.length - 1\n ];\n column.addChild(contentItem, insertBefore ? 0 : undefined, true);\n sibbling.config[dimension] *= 0.5;\n contentItem.config[dimension] = sibbling.config[dimension];\n column.callDownwards('setSize');\n }\n }\n },\n});\n\nexport default Root;\n"],"mappings":"AAAA,OAAOA,CAAP,MAAc,QAAd;AACA,OAAOC,KAAP,MAAkB,mBAAlB;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,WAAP,MAAwB,kBAAxB;;AAEA,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAAUC,aAAV,EAAyBC,MAAzB,EAAiCC,gBAAjC,EAAmD;EAC9DL,mBAAmB,CAACM,IAApB,CAAyB,IAAzB,EAA+BH,aAA/B,EAA8CC,MAA9C,EAAsD,IAAtD;EACA,KAAKG,MAAL,GAAc,IAAd;EACA,KAAKC,IAAL,GAAY,MAAZ;EACA,KAAKC,OAAL,GAAeX,CAAC,CAAC,qDAAD,CAAhB;EACA,KAAKY,qBAAL,GAA6B,KAAKD,OAAlC;EACA,KAAKE,iBAAL,GAAyBN,gBAAzB;;EACA,KAAKM,iBAAL,CAAuBC,MAAvB,CAA8B,KA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