@reltio/graph 1.4.1585 → 1.4.1586-mui5
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/index.ts +1 -0
- package/package.json +26 -9
- package/public/bundle.js +205 -0
- package/public/bundle.js.LICENSE.txt +88 -0
- package/public/package.json +29 -0
- package/scripts/build/index.js +20 -0
- package/src/__tests__/GraphView.test.tsx +25 -0
- package/src/components/CircleLayout/CircleLayout.tsx +76 -0
- package/src/components/CircleLayout/__tests__/CircleLayout.test.tsx +194 -0
- package/src/components/GotoButton/GotoButton.tsx +23 -0
- package/src/components/GotoButton/__tests__/GotoButton.test.tsx +33 -0
- package/src/components/GotoButton/styles.ts +15 -0
- package/src/components/GraphArea/GraphArea.tsx +113 -0
- package/src/components/GraphArea/__tests__/GraphArea.test.tsx +202 -0
- package/src/components/GraphArea/styles.ts +30 -0
- package/src/components/GraphLayoutSelector/GraphLayoutSelector.tsx +43 -0
- package/src/components/GraphLayoutSelector/__tests__/GraphLayoutSelector.spec.tsx +44 -0
- package/src/components/GraphLayoutSelector/styles.ts +15 -0
- package/src/components/GraphPerspectiveView/GraphPerspectiveView.tsx +58 -0
- package/src/components/GraphPerspectiveView/__tests__/GraphPerspectiveView.test.tsx +115 -0
- package/src/components/GraphPerspectiveView/__tests__/useGraphLoader.test.tsx +1519 -0
- package/src/components/GraphPerspectiveView/__tests__/useRelationshipTable.test.tsx +1003 -0
- package/src/components/GraphPerspectiveView/__tests__/useSelectedEntity.test.tsx +373 -0
- package/src/components/GraphPerspectiveView/styles.ts +34 -0
- package/src/components/GraphRightSidePanel/GraphRightSidePanel.tsx +27 -0
- package/src/components/GraphRightSidePanel/__tests__/GraphRightSidePanel.test.tsx +18 -0
- package/src/components/GraphRightSidePanel/icons/relationship-icon.svg +3 -0
- package/src/components/GraphRightSidePanel/styles.ts +8 -0
- package/src/components/GraphTypeSelector/GraphTypeSelector.tsx +56 -0
- package/src/components/GraphTypeSelector/__tests__/GraphTypeSelector.test.tsx +109 -0
- package/src/components/GraphTypeSelector/styles.ts +17 -0
- package/src/components/HierarchyLayout/HierarchyLayout.ts +102 -0
- package/src/components/HierarchyLayout/__tests__/HierarchyLayout.spec.tsx +241 -0
- package/src/components/HierarchyLayout/__tests__/buildHierarchy.spec.ts +130 -0
- package/src/components/HierarchyLayout/__tests__/calculations.spec.ts +230 -0
- package/src/components/HierarchyLayout/buildHierarchy.ts +109 -0
- package/src/components/HierarchyLayout/calculations.ts +86 -0
- package/src/components/RightPanelEntityDetails/RightPanelEntityDetails.tsx +33 -0
- package/src/components/RightPanelEntityDetails/__tests__/RightPanelEntityDetails.test.tsx +39 -0
- package/src/components/RightPanelEntityDetails/styles.ts +12 -0
- package/src/components/RightPanelProfileBand/RightPanelProfileBand.tsx +33 -0
- package/src/components/RightPanelProfileBand/__tests__/RightPanelProfileBand.test.tsx +67 -0
- package/src/components/RightPanelProfileBand/styles.ts +8 -0
- package/src/components/RightPanelRelationship/RightPanelRelationship.tsx +25 -0
- package/src/components/RightPanelRelationship/__tests__/RightPanelRelationship.test.tsx +18 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/CollapsibleTable.tsx +100 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/TableHead.tsx +38 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/__tests__/CollapsibleTable.test.tsx +169 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/__tests__/TableHead.test.tsx +107 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/styles.ts +38 -0
- package/src/components/RightPanelRelationship/components/CollapsibleTable/types.ts +20 -0
- package/src/components/RightPanelRelationship/components/DeleteRelationDialog/DeleteRelationDialog.tsx +34 -0
- package/src/components/RightPanelRelationship/components/DeleteRelationDialog/__tests__/DeleteRelationDialog.test.tsx +46 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/GraphAddRelationButton.tsx +43 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/GraphAddRelationDialog.tsx +121 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/__tests__/GraphAddRelationButton.test.tsx +80 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/__tests__/GraphAddRelationDialog.test.tsx +262 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/__tests__/mockdata.ts +75 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/styles.ts +25 -0
- package/src/components/RightPanelRelationship/components/GraphAddRelationDialog/useCreatableInOutRelationTypes.ts +13 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/RelationshipTable.tsx +126 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/__tests__/RelationshipTable.test.tsx +176 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/ControlsCellRenderer.tsx +59 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/DefaultCellRenderer.tsx +29 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/ExpandedRowRenderer.tsx +94 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/HeadCellRenderer.tsx +34 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/ProfileCellRenderer.tsx +41 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/__tests__/ControlsCellRenderer.test.tsx +80 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/__tests__/DefaultCellRenderer.test.tsx +47 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/__tests__/ExpandedRowRenderer.test.tsx +166 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/__tests__/HeadCellRenderer.test.tsx +23 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/__tests__/ProfileCellRenderer.test.tsx +47 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/components/DeleteRelationButton.tsx +32 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/components/__tests__/DeleteRelationButton.test.tsx +28 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/cell-renderers/styles.ts +113 -0
- package/src/components/RightPanelRelationship/components/RelationshipTable/styles.ts +36 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsFilters.tsx +41 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsFiltersDialog/RelationshipsFiltersDialog.tsx +91 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsFiltersDialog/__tests__/RelationshipsFilterDialog.test.tsx +192 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsFiltersDialog/styles.ts +34 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsSearchTextField/RelationshipsSearchTextField.tsx +31 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsSearchTextField/__tests__/RelationshipsSearchTextField.test.tsx +43 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/RelationshipsSearchTextField/styles.ts +17 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/__tests__/RelationshipsFilters.test.tsx +76 -0
- package/src/components/RightPanelRelationship/components/RelationshipsFilters/styles.ts +19 -0
- package/src/components/RightPanelRelationship/styles.ts +20 -0
- package/src/components/SigmaCustomRenderers/SigmaCustomRenderersContainer.tsx +16 -0
- package/src/components/SigmaGraphContainer/SigmaGraphContainer.tsx +55 -0
- package/src/components/SigmaGraphContainer/__tests__/SigmaGraphContainer.test.tsx +25 -0
- package/src/components/SigmaGraphResizer/SigmaGraphResizer.tsx +13 -0
- package/src/components/SigmaGraphResizer/__tests__/SigmaGraphResizer.test.tsx +28 -0
- package/src/components/TreeLayout/TreeLayout.tsx +33 -0
- package/src/components/TreeLayout/__tests__/TreeLayout.test.tsx +42 -0
- package/src/components/TreeLayout/styles.ts +10 -0
- package/src/components/ZoomSlider/ZoomSlider.tsx +90 -0
- package/src/components/ZoomSlider/__tests__/ZoomSlider.test.tsx +84 -0
- package/src/components/ZoomSlider/styles.ts +57 -0
- package/src/constants/index.ts +1 -0
- package/src/contexts/GraphStateContext.tsx +19 -0
- package/src/contexts/SigmaCustomRenderersContext.ts +20 -0
- package/src/helpers/relationsHelpers.ts +9 -0
- package/src/hooks/__tests__/useGraphLayout.test.tsx +825 -0
- package/src/hooks/__tests__/useGraphLayoutSelector.test.tsx +19 -0
- package/src/hooks/__tests__/useSelfRelationLoopsRenderer.test.ts +198 -0
- package/src/hooks/__tests__/useSigmaCustomRenderers.test.ts +273 -0
- package/src/hooks/__tests__/useTooltipRenderer.test.ts +289 -0
- package/src/hooks/useGraphLayout.ts +308 -0
- package/src/hooks/useGraphLayoutSelector.ts +19 -0
- package/src/hooks/useGraphLoader.ts +279 -0
- package/src/hooks/useGraphRightSidePanelElements.tsx +36 -0
- package/src/hooks/useGraphState.ts +40 -0
- package/src/hooks/useGraphType.ts +32 -0
- package/src/hooks/useRelationshipTable.ts +212 -0
- package/src/hooks/useRelationshipTableFilters.ts +43 -0
- package/src/hooks/useSelectedEntity.ts +89 -0
- package/src/hooks/useSelfRelationLoopsRenderer.ts +52 -0
- package/src/hooks/useSigmaCustomRenderers.ts +112 -0
- package/src/hooks/useTooltipRenderer.ts +80 -0
- package/src/index.tsx +37 -0
- package/src/rendering/canvas/__tests__/hover.spec.ts +31 -0
- package/src/rendering/canvas/__tests__/label.spec.ts +64 -0
- package/src/rendering/canvas/__tests__/nodeBackground.spec.ts +99 -0
- package/src/rendering/canvas/__tests__/selfRelationLoop.spec.ts +88 -0
- package/src/rendering/canvas/__tests__/tooltip.spec.ts +33 -0
- package/src/rendering/canvas/hover.ts +13 -0
- package/src/rendering/canvas/label.ts +33 -0
- package/src/rendering/canvas/nodeBackground.ts +61 -0
- package/src/rendering/canvas/selfRelationLoop.ts +108 -0
- package/src/rendering/canvas/tooltip.ts +38 -0
- package/src/rendering/icons/collapseIcon.inline.svg.ts +6 -0
- package/src/rendering/icons/expandIcon.inline.svg.ts +5 -0
- package/src/rendering/icons/no_photo.inline.svg.ts +13 -0
- package/src/rendering/webgl/edge.arrowHead.ts +87 -0
- package/src/rendering/webgl/edge.clamped.ts +246 -0
- package/src/rendering/webgl/edge.reversedArrowHead.ts +14 -0
- package/src/rendering/webgl/helpers/__tests__/imageHelper.spec.ts +36 -0
- package/src/rendering/webgl/helpers/imageHelper.ts +13 -0
- package/src/rendering/webgl/image.ts +115 -0
- package/src/rendering/webgl/node.border.ts +78 -0
- package/src/rendering/webgl/node.buttons.ts +241 -0
- package/src/rendering/webgl/node.image.ts +169 -0
- package/src/rendering/webgl/shaders/edge.clamped.vert.glsl.ts +55 -0
- package/src/rendering/webgl/shaders/node.border.frag.glsl.ts +30 -0
- package/src/rendering/webgl/shaders/node.border.vert.glsl.ts +37 -0
- package/src/rendering/webgl/shaders/node.buttons.frag.glsl.ts +32 -0
- package/src/rendering/webgl/shaders/node.buttons.vert.glsl.ts +49 -0
- package/src/rendering/webgl/shaders/node.image.frag.glsl.ts +46 -0
- package/src/rendering/webgl/shaders/node.image.vert.glsl.ts +42 -0
- package/src/types/graphDataTypes.ts +143 -0
- package/src/types/sigmaCustomRenderersTypes.ts +13 -0
- package/src/utils/__tests__/graph.spec.ts +152 -0
- package/src/utils/__tests__/graphLayout.spec.ts +125 -0
- package/src/utils/__tests__/hopsData.spec.ts +456 -0
- package/src/utils/__tests__/processResponceToGraph.spec.ts +165 -0
- package/src/utils/graph.ts +83 -0
- package/src/utils/graphLayout.ts +70 -0
- package/src/utils/hopsData.ts +198 -0
- package/src/utils/processResponseToGraph.ts +32 -0
- package/tsconfig.json +4 -0
- package/webpack.config.js +10 -0
- package/bundle.js +0 -2
- package/bundle.js.LICENSE.txt +0 -54
- /package/{5271a9e7b6651c852e93.png → public/5271a9e7b6651c852e93.png} +0 -0
- /package/{main.css → public/main.css} +0 -0
package/bundle.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see bundle.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dnd"),require("react-dom"),require("react-redux"),require("ui-i18n"));else if("function"==typeof define&&define.amd)define(["classnames","mdm-module","mdm-sdk","moment","prop-types","ramda","react","react-dnd","react-dom","react-redux","ui-i18n"],t);else{var n="object"==typeof exports?t(require("classnames"),require("mdm-module"),require("mdm-sdk"),require("moment"),require("prop-types"),require("ramda"),require("react"),require("react-dnd"),require("react-dom"),require("react-redux"),require("ui-i18n")):t(e.classnames,e["mdm-module"],e["mdm-sdk"],e.moment,e["prop-types"],e.ramda,e.react,e["react-dnd"],e["react-dom"],e["react-redux"],e["ui-i18n"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(e,t,n,r,o,i,a,l,s,c,u){return(()=>{var d={9998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"}},5549:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=i},4443:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");t.Z=i},595:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");t.Z=i},3543:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");t.Z=i},8989:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{d:"M10 17l5-5-5-5v10z"}),o.default.createElement("path",{fill:"none",d:"M0 24V0h24v24H0z"})),"ArrowRight");t.Z=i},324:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");t.Z=i},79:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm21 19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2"}),o.default.createElement("path",{d:"M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"})),"BrokenImage");t.Z=i},7224:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"}),"Business");t.default=i},9166:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");t.Z=i},8281:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=i},1556:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");t.Z=i},3375:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{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"}),"Clear");t.Z=i},7685:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{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"}),"Close");t.default=i},4438:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"}),"CloudUpload");t.Z=i},2771:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");t.Z=i},2983:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=i},7291:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=i},4940:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"DragIndicator");t.Z=i},7604:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=i},6444:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList");t.Z=i},1039:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"HighlightOff");t.Z=i},2726:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.Z=i},6602:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"}),"InfoRounded");t.Z=i},4426:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");t.Z=i},7766:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=i},2767:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=i},6971:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");t.Z=i},5292:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");t.Z=i},404:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}),"LocalOffer");t.Z=i},3054:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");t.Z=i},5156:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}),"MyLocation");t.Z=i},5203:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore");t.Z=i},5762:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");t.Z=i},2669:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked");t.Z=i},7373:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M19 13H5v-2h14v2z"}),"Remove");t.Z=i},1853:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.Z=i},3115:(e,t,n)=>{"use strict";var r=n(1600);t.Z=void 0;var o=r(n(8156)),i=(0,r(n(175)).default)(o.default.createElement("path",{d:"M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z"}),"ViewComfy");t.Z=i},175:(e,t,n)=>{"use strict";var r=n(1600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=i.default.memo(i.default.forwardRef((function(t,n){return i.default.createElement(a.default,(0,o.default)({ref:n},t),e)})));return n.muiName=a.default.muiName,n};var o=r(n(7028)),i=r(n(8156)),a=r(n(2298))},6898:(e,t)=>{"use strict";t.sb=function(e,t){return e.replace(/[a-z]/gi,t)},t.Pk=function(e,t,n){return function(r){if(""===r)return r;for(var o="",i=r.replace(n,""),a=0,l=0;a<e.length;){var s=e[a];s===t&&l<i.length?(o+=i[l],l+=1):o+=s,a+=1}return o}}},8884:e=>{e.exports=function(e,t){var n=t.length;if(0!==n){var r=e.length;e.length+=n;for(var o=0;o<n;o++)e[r+o]=t[o]}}},8994:e=>{e.exports=function(){for(var e=arguments.length,t=[],n=0;n<e;n++)t[n]=arguments[n];if(0!==(t=t.filter((function(e){return null!=e}))).length)return 1===t.length?t[0]:t.reduce((function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}))}},2196:(e,t,n)=>{"use strict";var r=n(1600);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(7218));e.exports=t.default},7218:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},4812:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},4596:(e,t,n)=>{"use strict";var r=n(1600);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var o,i,a,l,s,c,u,d,p,h,f,g=r(n(6892)),m="transform";if(t.transform=m,t.animationEnd=a,t.transitionEnd=i,t.transitionDelay=u,t.transitionTiming=c,t.transitionDuration=s,t.transitionProperty=l,t.animationDelay=f,t.animationTiming=h,t.animationDuration=p,t.animationName=d,g.default){var y=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},o=Object.keys(r),i="",a=0;a<o.length;a++){var l=o[a];if(l+"TransitionProperty"in n){i="-"+l.toLowerCase(),e=r[l]("TransitionEnd"),t=r[l]("AnimationEnd");break}}return!e&&"transitionProperty"in n&&(e="transitionend"),!t&&"animationName"in n&&(t="animationend"),n=null,{animationEnd:t,transitionEnd:e,prefix:i}}();o=y.prefix,t.transitionEnd=i=y.transitionEnd,t.animationEnd=a=y.animationEnd,t.transform=m=o+"-"+m,t.transitionProperty=l=o+"-transition-property",t.transitionDuration=s=o+"-transition-duration",t.transitionDelay=u=o+"-transition-delay",t.transitionTiming=c=o+"-transition-timing-function",t.animationName=d=o+"-animation-name",t.animationDuration=p=o+"-animation-duration",t.animationTiming=h=o+"-animation-delay",t.animationDelay=f=o+"-animation-timing-function"}var v={transform:m,end:i,property:l,timing:c,delay:u,duration:s};t.default=v},6892:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=n,e.exports=t.default},6463:(e,t,n)=>{"use strict";var r=n(1600);t.__esModule=!0,t.default=void 0;var o,i=r(n(6892)),a="clearTimeout",l=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-c)),r=setTimeout(e,n);return c=t,r},s=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};i.default&&["","webkit","moz","o","ms"].some((function(e){var t=s(e,"request");if(t in window)return a=s(e,"cancel"),l=function(e){return window[t](e)}}));var c=(new Date).getTime();(o=function(e){return l(e)}).cancel=function(e){window[a]&&"function"==typeof window[a]&&window[a](e)};var u=o;t.default=u,e.exports=t.default},2699:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,i,a,c;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=s(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function p(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):f(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)r(s,this,t);else{var c=s.length,u=f(s,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7121:(e,t,n)=>{"use strict";t.v7=x,t.Kx=w,t._t=O,t.ZP=function(e){var t=O(e);return function(e){return r.default.createElement(c.DragDropContextConsumer,null,(function(n){var o=n.dragDropManager;return void 0===o?null:r.default.createElement(t,f({},e,{dragDropManager:o}))}))}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(8156)),o=p(n(5099)),i=n(7111),a=p(n(8357)),l=p(n(3493)),s=p(n(6017)),c=n(5680),u=p(n(3463)),d=n(9314);function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return function(t,n){var r=t.x,o=t.w,i=t.y,a=t.h,l=Math.min(o/2,e);if(n.x>=r&&n.x<=r+o&&n.y>=i&&n.y<=i+a){if(n.x<r+l)return(n.x-r-l)/l;if(n.x>r+o-l)return-(r+o-n.x-l)/l}return 0}}function w(e){return function(t,n){var r=t.y,o=t.h,i=t.x,a=t.w,l=Math.min(o/2,e);if(n.y>=r&&n.y<=r+o&&n.x>=i&&n.x<=i+a){if(n.y<r+l)return(n.y-r-l)/l;if(n.y>r+o-l)return-(r+o-n.y-l)/l}return 0}}var S=x(150),E=w(150);function O(e){var t=function(t){function n(e,t){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),o=function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?v(e):t}(this,m(n).call(this,e,t)),b(v(v(o)),"updateScrolling",(0,a.default)((function(e){var t=o.container.getBoundingClientRect(),n={x:t.left,y:t.top,w:t.width,h:t.height},r=(0,d.getCoords)(e),i=o.props,a=i.horizontalStrength,l=i.verticalStrength;o.scaleX=a(n,r),o.scaleY=l(n,r),o.frame||!o.scaleX&&!o.scaleY||o.startScrolling()}),100,{trailing:!1})),b(v(v(o)),"handleEvent",(function(e){o.dragging&&!o.attached&&(o.attach(),o.updateScrolling(e))})),o.wrappedInstance=r.default.createRef(),o.scaleX=0,o.scaleY=0,o.frame=null,o.attached=!1,o.dragging=!1,o}var o,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(n,t),o=n,(s=[{key:"componentDidMount",value:function(){var e=this;this.container=(0,i.findDOMNode)(this.wrappedInstance.current),this.container&&"function"==typeof this.container.addEventListener&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var t=this.props.dragDropManager;this.clearMonitorSubscription=t.getMonitor().subscribeToStateChange((function(){return e.handleMonitorChange()}))}},{key:"componentWillUnmount",value:function(){this.container&&"function"==typeof this.container.removeEventListener&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var e=this.props.dragDropManager.getMonitor().isDragging();!this.dragging&&e?this.dragging=!0:this.dragging&&!e&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var e=this,t=0;!function n(){var r=e.scaleX,o=e.scaleY,i=e.container,a=e.props,s=a.strengthMultiplier,c=a.onScrollChange;if(0!==s&&r+o!==0){if((t+=1)%2){var u=i.scrollLeft,p=i.scrollTop,h=i.scrollWidth,f=i.scrollHeight,g=i.clientWidth,m=i.clientHeight;c(r?i.scrollLeft=(0,d.intBetween)(0,h-g,u+r*s):u,o?i.scrollTop=(0,d.intBetween)(0,f-m,p+o*s):p)}e.frame=(0,l.default)(n)}else e.stopScrolling()}()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(l.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var t=this.props,n=(t.strengthMultiplier,t.verticalStrength,t.horizontalStrength,t.onScrollChange,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]));return r.default.createElement(e,f({ref:this.wrappedInstance},n))}}])&&g(o.prototype,s),n}(r.Component);return b(t,"displayName","Scrolling(".concat((0,s.default)(e),")")),b(t,"propTypes",{dragDropManager:o.default.object.isRequired,onScrollChange:o.default.func,verticalStrength:o.default.func,horizontalStrength:o.default.func,strengthMultiplier:o.default.number}),b(t,"defaultProps",{onScrollChange:d.noop,verticalStrength:E,horizontalStrength:S,strengthMultiplier:30}),(0,u.default)(t,e)}},9314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){},t.intBetween=function(e,t,n){return Math.floor(Math.min(t,Math.max(e,n)))},t.getCoords=function(e){return"touchmove"===e.type?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}},9869:e=>{e.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},6061:(e,t)=>{t.assign=function(e){e=e||{};var t,n,r,o=Array.prototype.slice.call(arguments).slice(1);for(t=0,r=o.length;t<r;t++)if(o[t])for(n in o[t])e[n]=o[t][n];return e},t.validateSettings=function(e){return"linLogMode"in e&&"boolean"!=typeof e.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in e&&"boolean"!=typeof e.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in e&&"boolean"!=typeof e.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in e&&"number"!=typeof e.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in e)||"number"==typeof e.scalingRatio&&e.scalingRatio>=0?"strongGravityMode"in e&&"boolean"!=typeof e.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in e)||"number"==typeof e.gravity&&e.gravity>=0?"slowDown"in e&&!("number"==typeof e.slowDown||e.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in e&&"boolean"!=typeof e.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in e)||"number"==typeof e.barnesHutTheta&&e.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},t.graphToByteArrays=function(e,t){var n,r=e.order,o=e.size,i={},a=new Float32Array(10*r),l=new Float32Array(3*o);return n=0,e.forEachNode((function(e,t){i[e]=n,a[n]=t.x,a[n+1]=t.y,a[n+2]=0,a[n+3]=0,a[n+4]=0,a[n+5]=0,a[n+6]=1,a[n+7]=1,a[n+8]=t.size||1,a[n+9]=t.fixed?1:0,n+=10})),n=0,e.forEachEdge((function(e,r,o,s,c,u,d){var p=i[o],h=i[s],f=t(e,r,o,s,c,u,d);a[p+6]+=f,a[h+6]+=f,l[n]=p,l[n+1]=h,l[n+2]=f,n+=3})),{nodes:a,edges:l}},t.assignLayoutChanges=function(e,t,n){var r=0;e.updateEachNodeAttributes((function(e,o){return o.x=t[r],o.y=t[r+1],r+=10,n?n(e,o):o}))},t.readGraphPositions=function(e,t){var n=0;e.forEachNode((function(e,r){t[n]=r.x,t[n+1]=r.y,n+=10}))},t.collectLayoutChanges=function(e,t,n){for(var r=e.nodes(),o={},i=0,a=0,l=t.length;i<l;i+=10){if(n){var s=Object.assign({},e.getNodeAttributes(r[a]));s.x=t[i],s.y=t[i+1],s=n(r[a],s),o[r[a]]={x:s.x,y:s.y}}else o[r[a]]={x:t[i],y:t[i+1]};a++}return o},t.createWorker=function(e){var t=window.URL||window.webkitURL,n=e.toString(),r=t.createObjectURL(new Blob(["("+n+").call(this);"],{type:"text/javascript"})),o=new Worker(r);return t.revokeObjectURL(r),o}},3660:(e,t,n)=>{var r=n(1880),o=n(4363).Q6,i=n(8725),a=n(6061),l=n(9869);function s(e,t,n){if(!r(t))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"==typeof n&&(n={iterations:n});var s=n.iterations;if("number"!=typeof s)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(s<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var c=o("getEdgeWeight"in n?n.getEdgeWeight:"weight").fromEntry,u="function"==typeof n.outputReducer?n.outputReducer:null,d=a.assign({},l,n.settings),p=a.validateSettings(d);if(p)throw new Error("graphology-layout-forceatlas2: "+p.message);var h,f=a.graphToByteArrays(t,c);for(h=0;h<s;h++)i(d,f.nodes,f.edges);if(!e)return a.collectLayoutChanges(t,f.nodes);a.assignLayoutChanges(t,f.nodes,u)}var c=s.bind(null,!1);c.assign=s.bind(null,!0),c.inferSettings=function(e){var t="number"==typeof e?e:e.order;return{barnesHutOptimize:t>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(t)}},e.exports=c},8725:e=>{var t=10;e.exports=function(e,n,r){var o,i,a,l,s,c,u,d,p,h,f,g,m,y,v,b,x,w,S,E,O,C,_,k=n.length,T=r.length,P=e.adjustSizes,M=e.barnesHutTheta*e.barnesHutTheta,R=[];for(a=0;a<k;a+=t)n[a+4]=n[a+2],n[a+5]=n[a+3],n[a+2]=0,n[a+3]=0;if(e.outboundAttractionDistribution){for(f=0,a=0;a<k;a+=t)f+=n[a+6];f/=k/t}if(e.barnesHutOptimize){var I,D,A,L=1/0,N=-1/0,j=1/0,z=-1/0;for(a=0;a<k;a+=t)L=Math.min(L,n[a+0]),N=Math.max(N,n[a+0]),j=Math.min(j,n[a+1]),z=Math.max(z,n[a+1]);var F=N-L,B=z-j;for(F>B?z=(j-=(F-B)/2)+F:N=(L-=(B-F)/2)+B,R[0]=-1,R[1]=(L+N)/2,R[2]=(j+z)/2,R[3]=Math.max(N-L,z-j),R[4]=-1,R[5]=-1,R[6]=0,R[7]=0,R[8]=0,o=1,a=0;a<k;a+=t)for(i=0,A=3;;){if(!(R[i+5]>=0)){if(R[i+0]<0){R[i+0]=a;break}if(R[i+5]=9*o,d=R[i+3]/2,R[(p=R[i+5])+0]=-1,R[p+1]=R[i+1]-d,R[p+2]=R[i+2]-d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]-d,R[p+2]=R[i+2]+d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]+d,R[p+2]=R[i+2]-d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]+d,R[p+2]=R[i+2]+d,R[p+3]=d,R[p+4]=R[i+4],R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,o+=4,I=n[R[i+0]+0]<R[i+1]?n[R[i+0]+1]<R[i+2]?R[i+5]:R[i+5]+9:n[R[i+0]+1]<R[i+2]?R[i+5]+18:R[i+5]+27,R[i+6]=n[R[i+0]+6],R[i+7]=n[R[i+0]+0],R[i+8]=n[R[i+0]+1],R[I+0]=R[i+0],R[i+0]=-1,I===(D=n[a+0]<R[i+1]?n[a+1]<R[i+2]?R[i+5]:R[i+5]+9:n[a+1]<R[i+2]?R[i+5]+18:R[i+5]+27)){if(A--){i=I;continue}A=3;break}R[D+0]=a;break}I=n[a+0]<R[i+1]?n[a+1]<R[i+2]?R[i+5]:R[i+5]+9:n[a+1]<R[i+2]?R[i+5]+18:R[i+5]+27,R[i+7]=(R[i+7]*R[i+6]+n[a+0]*n[a+6])/(R[i+6]+n[a+6]),R[i+8]=(R[i+8]*R[i+6]+n[a+1]*n[a+6])/(R[i+6]+n[a+6]),R[i+6]+=n[a+6],i=I}}if(e.barnesHutOptimize){for(g=e.scalingRatio,a=0;a<k;a+=t)for(i=0;;)if(R[i+5]>=0){if(b=Math.pow(n[a+0]-R[i+7],2)+Math.pow(n[a+1]-R[i+8],2),4*(h=R[i+3])*h/b<M){if(m=n[a+0]-R[i+7],y=n[a+1]-R[i+8],!0===P?b>0?(x=g*n[a+6]*R[i+6]/b,n[a+2]+=m*x,n[a+3]+=y*x):b<0&&(x=-g*n[a+6]*R[i+6]/Math.sqrt(b),n[a+2]+=m*x,n[a+3]+=y*x):b>0&&(x=g*n[a+6]*R[i+6]/b,n[a+2]+=m*x,n[a+3]+=y*x),(i=R[i+4])<0)break;continue}i=R[i+5]}else if((c=R[i+0])>=0&&c!==a&&(b=(m=n[a+0]-n[c+0])*m+(y=n[a+1]-n[c+1])*y,!0===P?b>0?(x=g*n[a+6]*n[c+6]/b,n[a+2]+=m*x,n[a+3]+=y*x):b<0&&(x=-g*n[a+6]*n[c+6]/Math.sqrt(b),n[a+2]+=m*x,n[a+3]+=y*x):b>0&&(x=g*n[a+6]*n[c+6]/b,n[a+2]+=m*x,n[a+3]+=y*x)),(i=R[i+4])<0)break}else for(g=e.scalingRatio,l=0;l<k;l+=t)for(s=0;s<l;s+=t)m=n[l+0]-n[s+0],y=n[l+1]-n[s+1],!0===P?(b=Math.sqrt(m*m+y*y)-n[l+8]-n[s+8])>0?(x=g*n[l+6]*n[s+6]/b/b,n[l+2]+=m*x,n[l+3]+=y*x,n[s+2]-=m*x,n[s+3]-=y*x):b<0&&(x=100*g*n[l+6]*n[s+6],n[l+2]+=m*x,n[l+3]+=y*x,n[s+2]-=m*x,n[s+3]-=y*x):(b=Math.sqrt(m*m+y*y))>0&&(x=g*n[l+6]*n[s+6]/b/b,n[l+2]+=m*x,n[l+3]+=y*x,n[s+2]-=m*x,n[s+3]-=y*x);for(p=e.gravity/e.scalingRatio,g=e.scalingRatio,a=0;a<k;a+=t)x=0,m=n[a+0],y=n[a+1],b=Math.sqrt(Math.pow(m,2)+Math.pow(y,2)),e.strongGravityMode?b>0&&(x=g*n[a+6]*p):b>0&&(x=g*n[a+6]*p/b),n[a+2]-=m*x,n[a+3]-=y*x;for(g=1*(e.outboundAttractionDistribution?f:1),u=0;u<T;u+=3)l=r[u+0],s=r[u+1],d=r[u+2],v=Math.pow(d,e.edgeWeightInfluence),m=n[l+0]-n[s+0],y=n[l+1]-n[s+1],!0===P?(b=Math.sqrt(m*m+y*y)-n[l+8]-n[s+8],e.linLogMode?e.outboundAttractionDistribution?b>0&&(x=-g*v*Math.log(1+b)/b/n[l+6]):b>0&&(x=-g*v*Math.log(1+b)/b):e.outboundAttractionDistribution?b>0&&(x=-g*v/n[l+6]):b>0&&(x=-g*v)):(b=Math.sqrt(Math.pow(m,2)+Math.pow(y,2)),e.linLogMode?e.outboundAttractionDistribution?b>0&&(x=-g*v*Math.log(1+b)/b/n[l+6]):b>0&&(x=-g*v*Math.log(1+b)/b):e.outboundAttractionDistribution?(b=1,x=-g*v/n[l+6]):(b=1,x=-g*v)),b>0&&(n[l+2]+=m*x,n[l+3]+=y*x,n[s+2]-=m*x,n[s+3]-=y*x);if(!0===P)for(a=0;a<k;a+=t)1!==n[a+9]&&((w=Math.sqrt(Math.pow(n[a+2],2)+Math.pow(n[a+3],2)))>10&&(n[a+2]=10*n[a+2]/w,n[a+3]=10*n[a+3]/w),S=n[a+6]*Math.sqrt((n[a+4]-n[a+2])*(n[a+4]-n[a+2])+(n[a+5]-n[a+3])*(n[a+5]-n[a+3])),E=Math.sqrt((n[a+4]+n[a+2])*(n[a+4]+n[a+2])+(n[a+5]+n[a+3])*(n[a+5]+n[a+3]))/2,O=.1*Math.log(1+E)/(1+Math.sqrt(S)),C=n[a+0]+n[a+2]*(O/e.slowDown),n[a+0]=C,_=n[a+1]+n[a+3]*(O/e.slowDown),n[a+1]=_);else for(a=0;a<k;a+=t)1!==n[a+9]&&(S=n[a+6]*Math.sqrt((n[a+4]-n[a+2])*(n[a+4]-n[a+2])+(n[a+5]-n[a+3])*(n[a+5]-n[a+3])),E=Math.sqrt((n[a+4]+n[a+2])*(n[a+4]+n[a+2])+(n[a+5]+n[a+3])*(n[a+5]+n[a+3]))/2,O=n[a+7]*Math.log(1+E)/(1+Math.sqrt(S)),n[a+7]=Math.min(1,Math.sqrt(O*(Math.pow(n[a+2],2)+Math.pow(n[a+3],2))/(1+Math.sqrt(S)))),C=n[a+0]+n[a+2]*(O/e.slowDown),n[a+0]=C,_=n[a+1]+n[a+3]*(O/e.slowDown),n[a+1]=_);return{}}},1026:e=>{e.exports=function(){var e,t,n,r={};n=10,r.exports=function(e,t,r){var o,i,a,l,s,c,u,d,p,h,f,g,m,y,v,b,x,w,S,E,O,C,_,k=t.length,T=r.length,P=e.adjustSizes,M=e.barnesHutTheta*e.barnesHutTheta,R=[];for(a=0;a<k;a+=n)t[a+4]=t[a+2],t[a+5]=t[a+3],t[a+2]=0,t[a+3]=0;if(e.outboundAttractionDistribution){for(f=0,a=0;a<k;a+=n)f+=t[a+6];f/=k/n}if(e.barnesHutOptimize){var I,D,A,L=1/0,N=-1/0,j=1/0,z=-1/0;for(a=0;a<k;a+=n)L=Math.min(L,t[a+0]),N=Math.max(N,t[a+0]),j=Math.min(j,t[a+1]),z=Math.max(z,t[a+1]);var F=N-L,B=z-j;for(F>B?z=(j-=(F-B)/2)+F:N=(L-=(B-F)/2)+B,R[0]=-1,R[1]=(L+N)/2,R[2]=(j+z)/2,R[3]=Math.max(N-L,z-j),R[4]=-1,R[5]=-1,R[6]=0,R[7]=0,R[8]=0,o=1,a=0;a<k;a+=n)for(i=0,A=3;;){if(!(R[i+5]>=0)){if(R[i+0]<0){R[i+0]=a;break}if(R[i+5]=9*o,d=R[i+3]/2,R[(p=R[i+5])+0]=-1,R[p+1]=R[i+1]-d,R[p+2]=R[i+2]-d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]-d,R[p+2]=R[i+2]+d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]+d,R[p+2]=R[i+2]-d,R[p+3]=d,R[p+4]=p+9,R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,R[(p+=9)+0]=-1,R[p+1]=R[i+1]+d,R[p+2]=R[i+2]+d,R[p+3]=d,R[p+4]=R[i+4],R[p+5]=-1,R[p+6]=0,R[p+7]=0,R[p+8]=0,o+=4,I=t[R[i+0]+0]<R[i+1]?t[R[i+0]+1]<R[i+2]?R[i+5]:R[i+5]+9:t[R[i+0]+1]<R[i+2]?R[i+5]+18:R[i+5]+27,R[i+6]=t[R[i+0]+6],R[i+7]=t[R[i+0]+0],R[i+8]=t[R[i+0]+1],R[I+0]=R[i+0],R[i+0]=-1,I===(D=t[a+0]<R[i+1]?t[a+1]<R[i+2]?R[i+5]:R[i+5]+9:t[a+1]<R[i+2]?R[i+5]+18:R[i+5]+27)){if(A--){i=I;continue}A=3;break}R[D+0]=a;break}I=t[a+0]<R[i+1]?t[a+1]<R[i+2]?R[i+5]:R[i+5]+9:t[a+1]<R[i+2]?R[i+5]+18:R[i+5]+27,R[i+7]=(R[i+7]*R[i+6]+t[a+0]*t[a+6])/(R[i+6]+t[a+6]),R[i+8]=(R[i+8]*R[i+6]+t[a+1]*t[a+6])/(R[i+6]+t[a+6]),R[i+6]+=t[a+6],i=I}}if(e.barnesHutOptimize){for(g=e.scalingRatio,a=0;a<k;a+=n)for(i=0;;)if(R[i+5]>=0){if(b=Math.pow(t[a+0]-R[i+7],2)+Math.pow(t[a+1]-R[i+8],2),4*(h=R[i+3])*h/b<M){if(m=t[a+0]-R[i+7],y=t[a+1]-R[i+8],!0===P?b>0?(x=g*t[a+6]*R[i+6]/b,t[a+2]+=m*x,t[a+3]+=y*x):b<0&&(x=-g*t[a+6]*R[i+6]/Math.sqrt(b),t[a+2]+=m*x,t[a+3]+=y*x):b>0&&(x=g*t[a+6]*R[i+6]/b,t[a+2]+=m*x,t[a+3]+=y*x),(i=R[i+4])<0)break;continue}i=R[i+5]}else if((c=R[i+0])>=0&&c!==a&&(b=(m=t[a+0]-t[c+0])*m+(y=t[a+1]-t[c+1])*y,!0===P?b>0?(x=g*t[a+6]*t[c+6]/b,t[a+2]+=m*x,t[a+3]+=y*x):b<0&&(x=-g*t[a+6]*t[c+6]/Math.sqrt(b),t[a+2]+=m*x,t[a+3]+=y*x):b>0&&(x=g*t[a+6]*t[c+6]/b,t[a+2]+=m*x,t[a+3]+=y*x)),(i=R[i+4])<0)break}else for(g=e.scalingRatio,l=0;l<k;l+=n)for(s=0;s<l;s+=n)m=t[l+0]-t[s+0],y=t[l+1]-t[s+1],!0===P?(b=Math.sqrt(m*m+y*y)-t[l+8]-t[s+8])>0?(x=g*t[l+6]*t[s+6]/b/b,t[l+2]+=m*x,t[l+3]+=y*x,t[s+2]-=m*x,t[s+3]-=y*x):b<0&&(x=100*g*t[l+6]*t[s+6],t[l+2]+=m*x,t[l+3]+=y*x,t[s+2]-=m*x,t[s+3]-=y*x):(b=Math.sqrt(m*m+y*y))>0&&(x=g*t[l+6]*t[s+6]/b/b,t[l+2]+=m*x,t[l+3]+=y*x,t[s+2]-=m*x,t[s+3]-=y*x);for(p=e.gravity/e.scalingRatio,g=e.scalingRatio,a=0;a<k;a+=n)x=0,m=t[a+0],y=t[a+1],b=Math.sqrt(Math.pow(m,2)+Math.pow(y,2)),e.strongGravityMode?b>0&&(x=g*t[a+6]*p):b>0&&(x=g*t[a+6]*p/b),t[a+2]-=m*x,t[a+3]-=y*x;for(g=1*(e.outboundAttractionDistribution?f:1),u=0;u<T;u+=3)l=r[u+0],s=r[u+1],d=r[u+2],v=Math.pow(d,e.edgeWeightInfluence),m=t[l+0]-t[s+0],y=t[l+1]-t[s+1],!0===P?(b=Math.sqrt(m*m+y*y)-t[l+8]-t[s+8],e.linLogMode?e.outboundAttractionDistribution?b>0&&(x=-g*v*Math.log(1+b)/b/t[l+6]):b>0&&(x=-g*v*Math.log(1+b)/b):e.outboundAttractionDistribution?b>0&&(x=-g*v/t[l+6]):b>0&&(x=-g*v)):(b=Math.sqrt(Math.pow(m,2)+Math.pow(y,2)),e.linLogMode?e.outboundAttractionDistribution?b>0&&(x=-g*v*Math.log(1+b)/b/t[l+6]):b>0&&(x=-g*v*Math.log(1+b)/b):e.outboundAttractionDistribution?(b=1,x=-g*v/t[l+6]):(b=1,x=-g*v)),b>0&&(t[l+2]+=m*x,t[l+3]+=y*x,t[s+2]-=m*x,t[s+3]-=y*x);if(!0===P)for(a=0;a<k;a+=n)1!==t[a+9]&&((w=Math.sqrt(Math.pow(t[a+2],2)+Math.pow(t[a+3],2)))>10&&(t[a+2]=10*t[a+2]/w,t[a+3]=10*t[a+3]/w),S=t[a+6]*Math.sqrt((t[a+4]-t[a+2])*(t[a+4]-t[a+2])+(t[a+5]-t[a+3])*(t[a+5]-t[a+3])),E=Math.sqrt((t[a+4]+t[a+2])*(t[a+4]+t[a+2])+(t[a+5]+t[a+3])*(t[a+5]+t[a+3]))/2,O=.1*Math.log(1+E)/(1+Math.sqrt(S)),C=t[a+0]+t[a+2]*(O/e.slowDown),t[a+0]=C,_=t[a+1]+t[a+3]*(O/e.slowDown),t[a+1]=_);else for(a=0;a<k;a+=n)1!==t[a+9]&&(S=t[a+6]*Math.sqrt((t[a+4]-t[a+2])*(t[a+4]-t[a+2])+(t[a+5]-t[a+3])*(t[a+5]-t[a+3])),E=Math.sqrt((t[a+4]+t[a+2])*(t[a+4]+t[a+2])+(t[a+5]+t[a+3])*(t[a+5]+t[a+3]))/2,O=t[a+7]*Math.log(1+E)/(1+Math.sqrt(S)),t[a+7]=Math.min(1,Math.sqrt(O*(Math.pow(t[a+2],2)+Math.pow(t[a+3],2))/(1+Math.sqrt(S)))),C=t[a+0]+t[a+2]*(O/e.slowDown),t[a+0]=C,_=t[a+1]+t[a+3]*(O/e.slowDown),t[a+1]=_);return{}};var o=r.exports;self.addEventListener("message",(function(n){var r=n.data;e=new Float32Array(r.nodes),r.edges&&(t=new Float32Array(r.edges)),o(r.settings,e,t),self.postMessage({nodes:e.buffer},[e.buffer])}))}},8301:(e,t,n)=>{var r=n(1026),o=n(1880),i=n(4363).Q6,a=n(6061),l=n(9869);function s(e,t){if(t=t||{},!o(e))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var n=i("getEdgeWeight"in t?t.getEdgeWeight:"weight").fromEntry,r=a.assign({},l,t.settings),s=a.validateSettings(r);if(s)throw new Error("graphology-layout-forceatlas2/worker: "+s.message);this.worker=null,this.graph=e,this.settings=r,this.getEdgeWeight=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"==typeof t.outputReducer?t.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var c=void 0,u=this;this.handleGraphUpdate=function(){u.worker&&u.worker.terminate(),c&&clearTimeout(c),c=setTimeout((function(){c=void 0,u.spawnWorker()}),0)},e.on("nodeAdded",this.handleGraphUpdate),e.on("edgeAdded",this.handleGraphUpdate),e.on("nodeDropped",this.handleGraphUpdate),e.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(r),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(e){if(this.running){var t=new Float32Array(e.data.nodes);a.assignLayoutChanges(this.graph,t,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,t),this.matrices.nodes=t,this.askForIterations()}},s.prototype.askForIterations=function(e){var t=this.matrices,n={settings:this.settings,nodes:t.nodes.buffer},r=[t.nodes.buffer];return e&&(n.edges=t.edges.buffer,r.push(t.edges.buffer)),this.worker.postMessage(n,r),this},s.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0)),this},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},e.exports=s},1155:(e,t,n)=>{var r=n(6586),o=n(1880),i=n(4341),a={attributes:{x:"x",y:"y"},center:0,hierarchyAttributes:[],rng:Math.random,scale:1};function l(e,t,n,r,o){this.wrappedCircle=o||null,this.children={},this.countChildren=0,this.id=e||null,this.next=null,this.previous=null,this.x=t||null,this.y=n||null,this.r=o?1010101:r||999}function s(e,t,n){for(var r in t.children){var o=t.children[r];o.hasChildren()?s(e,o,n):n[o.id]={x:o.x,y:o.y}}}function c(e,t){var n=e.r-t.r,r=t.x-e.x,o=t.y-e.y;return n<0||n*n<r*r+o*o}function u(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,o=t.y-e.y;return n>0&&n*n>r*r+o*o}function d(e,t){for(var n=0;n<t.length;++n)if(!u(e,t[n]))return!1;return!0}function p(e,t){var n=e.x,r=e.y,o=e.r,i=t.x,a=t.y,s=t.r,c=i-n,u=a-r,d=s-o,p=Math.sqrt(c*c+u*u);return new l(null,(n+i+c/p*d)/2,(r+a+u/p*d)/2,(p+o+s)/2)}function h(e,t,n){var r=e.x,o=e.y,i=e.r,a=t.x,s=t.y,c=t.r,u=n.x,d=n.y,p=n.r,h=r-a,f=r-u,g=o-s,m=o-d,y=c-i,v=p-i,b=r*r+o*o-i*i,x=b-a*a-s*s+c*c,w=b-u*u-d*d+p*p,S=f*g-h*m,E=(g*w-m*x)/(2*S)-r,O=(m*y-g*v)/S,C=(f*x-h*w)/(2*S)-o,_=(h*v-f*y)/S,k=O*O+_*_-1,T=2*(i+E*O+C*_),P=E*E+C*C-i*i,M=-(k?(T+Math.sqrt(T*T-4*k*P))/(2*k):P/T);return new l(null,r+E+O*M,o+C+_*M,M)}function f(e){switch(e.length){case 1:return new l(null,(t=e[0]).x,t.y,t.r);case 2:return p(e[0],e[1]);case 3:return h(e[0],e[1],e[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+e.length)}var t}function g(e,t){var n,r;if(d(t,e))return[t];for(n=0;n<e.length;++n)if(c(t,e[n])&&d(p(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(c(p(e[n],e[r]),t)&&c(p(e[n],t),e[r])&&c(p(e[r],t),e[n])&&d(h(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error("graphology-layout/circlepack: extendBasis failure !")}function m(e){var t=e.wrappedCircle,n=e.next.wrappedCircle,r=t.r+n.r,o=(t.x*n.r+n.x*t.r)/r,i=(t.y*n.r+n.y*t.r)/r;return o*o+i*i}function y(e,t,n){var r,o,i,a,l=e.x-t.x,s=e.y-t.y,c=l*l+s*s;c?(o=t.r+n.r,o*=o,a=e.r+n.r,o>(a*=a)?(r=(c+a-o)/(2*c),i=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*l-i*s,n.y=e.y-r*s+i*l):(r=(c+o-a)/(2*c),i=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x+r*l-i*s,n.y=t.y+r*s+i*l)):(n.x=t.x+n.r,n.y=t.y)}function v(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,o=t.y-e.y;return n>0&&n*n>r*r+o*o}function b(e,t){var n=0;if(e.hasChildren()){for(var r in e.children){var o=e.children[r];o.hasChildren()&&(o.r=b(o,t))}n=function(e,t){var n,r,o,i,a,s,c,d,p,h,b=e.length;if(0===b)return 0;if((n=e[0]).x=0,n.y=0,b<=1)return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,b<=2)return n.r+r.r;y(r,n,o=e[2]),n=new l(null,null,null,null,n),r=new l(null,null,null,null,r),o=new l(null,null,null,null,o),n.next=o.previous=r,r.next=n.previous=o,o.next=r.previous=n;e:for(s=3;s<b;++s){o=e[s],y(n.wrappedCircle,r.wrappedCircle,o),o=new l(null,null,null,null,o),c=r.next,d=n.previous,p=r.wrappedCircle.r,h=n.wrappedCircle.r;do{if(p<=h){if(v(c.wrappedCircle,o.wrappedCircle)){r=c,n.next=r,r.previous=n,--s;continue e}p+=c.wrappedCircle.r,c=c.next}else{if(v(d.wrappedCircle,o.wrappedCircle)){(n=d).next=r,r.previous=n,--s;continue e}h+=d.wrappedCircle.r,d=d.previous}}while(c!==d.next);for(o.previous=n,o.next=r,n.next=r.previous=r=o,i=m(n);(o=o.next)!==r;)(a=m(o))<i&&(n=o,i=a);r=n.next}n=[r.wrappedCircle],o=r;for(var x=1e4;(o=o.next)!==r&&0!=--x;)n.push(o.wrappedCircle);for(o=function(e,t){var n,r,o=0,i=e.slice(),a=e.length,l=[];for(t(i);o<a;)n=i[o],r&&u(r,n)?++o:(r=f(l=g(l,n)),o=0);return r}(n,t),s=0;s<b;++s)(n=e[s]).x-=o.x,n.y-=o.y;return o.r}(Object.values(e.children),t)}return n}function x(e,t,n){if(!o(t))throw new Error("graphology-layout/circlepack: the given graph is not a valid graphology instance.");n=r(n,a);var c={},u={},d=t.nodes(),p=n.center,h=n.hierarchyAttributes,f=i.createShuffleInPlace(n.rng),g=n.scale,m=new l;t.forEachNode((function(e,t){var n=new l(e,null,null,t.size?t.size:1),r=m;h.forEach((function(e){var n=t[e];r=r.getChild(n)})),r.addChild(e,n)})),function(e,t){for(var n in b(e,t),e.children)e.children[n].applyPositionToChildren()}(m,f),s(t,m,c);var y,v,x,w=d.length;for(x=0;x<w;x++){var S=d[x];y=p+g*c[S].x,v=p+g*c[S].y,u[S]={x:y,y:v},e&&(t.setNodeAttribute(S,n.attributes.x,y),t.setNodeAttribute(S,n.attributes.y,v))}return u}l.prototype.hasChildren=function(){return this.countChildren>0},l.prototype.addChild=function(e,t){this.children[e]=t,++this.countChildren},l.prototype.getChild=function(e){if(!this.children.hasOwnProperty(e)){var t=new l;this.children[e]=t,++this.countChildren}return this.children[e]},l.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var e=this;for(var t in e.children){var n=e.children[t];n.x+=e.x,n.y+=e.y,n.applyPositionToChildren()}}};var w=x.bind(null,!1);w.assign=x.bind(null,!0),e.exports=w},8833:(e,t,n)=>{var r=n(6586),o=n(1880),i={dimensions:["x","y"],center:.5,scale:1};function a(e,t,n){if(!o(t))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(n=r(n,i)).dimensions;if(!Array.isArray(a)||2!==a.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var l=n.center,s=n.scale,c=2*Math.PI,u=(l-.5)*s,d=t.order,p=a[0],h=a[1];function f(e,t){return t[p]=s*Math.cos(e*c/d)+u,t[h]=s*Math.sin(e*c/d)+u,t}var g=0;if(!e){var m={};return t.forEachNode((function(e){m[e]=f(g++,{})})),m}t.updateEachNodeAttributes((function(e,t){return f(g++,t),t}),{attributes:a})}var l=a.bind(null,!1);l.assign=a.bind(null,!0),e.exports=l},6039:(e,t,n)=>{n(1155),n(8833),n(8645),t.rotation=n(7621)},8645:(e,t,n)=>{var r=n(6586),o=n(1880),i={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function a(e,t,n){if(!o(t))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(n=r(n,i)).dimensions;if(!Array.isArray(a)||a.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var l=a.length,s=n.center,c=n.rng,u=n.scale,d=(s-.5)*u;function p(e){for(var t=0;t<l;t++)e[a[t]]=c()*u+d;return e}if(!e){var h={};return t.forEachNode((function(e){h[e]=p({})})),h}t.updateEachNodeAttributes((function(e,t){return p(t),t}),{attributes:a})}var l=a.bind(null,!1);l.assign=a.bind(null,!0),e.exports=l},7621:(e,t,n)=>{var r=n(6586),o=n(1880),i=Math.PI/180,a={dimensions:["x","y"],centeredOnZero:!1,degrees:!1};function l(e,t,n,l){if(!o(t))throw new Error("graphology-layout/rotation: the given graph is not a valid graphology instance.");(l=r(l,a)).degrees&&(n*=i);var s=l.dimensions;if(!Array.isArray(s)||2!==s.length)throw new Error("graphology-layout/random: given dimensions are invalid.");if(0===t.order){if(e)return;return{}}var c=s[0],u=s[1],d=0,p=0;if(!l.centeredOnZero){var h=1/0,f=-1/0,g=1/0,m=-1/0;t.forEachNode((function(e,t){var n=t[c],r=t[u];n<h&&(h=n),n>f&&(f=n),r<g&&(g=r),r>m&&(m=r)})),d=(h+f)/2,p=(g+m)/2}var y=Math.cos(n),v=Math.sin(n);function b(e){var t=e[c],n=e[u];return e[c]=d+(t-d)*y-(n-p)*v,e[u]=p+(t-d)*v+(n-p)*y,e}if(!e){var x={};return t.forEachNode((function(e,t){var n={};n[c]=t[c],n[u]=t[u],x[e]=b(n)})),x}t.updateEachNodeAttributes((function(e,t){return b(t),t}),{attributes:s})}var s=l.bind(null,!1);s.assign=l.bind(null,!0),e.exports=s},1359:(e,t,n)=>{var r=n(1880),o=n(7052).B,i=n(7155).De;e.exports=function(e,t){if(!r(e)||!r(t))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var n=e.nullCopy();n.mergeAttributes(e.getAttributes());var a={},l={},s=0;return e.forEachNode((function(e,t){a[e]=s,o(n,s,t),s++})),t.forEachNode((function(e,t){l[e]=s,o(n,s,t),s++})),s=0,e.forEachEdge((function(e,t,r,o,l,c,u){i(n,u,s++,a[r],a[o],o,t)})),t.forEachEdge((function(e,t,r,o,a,c,u){i(n,u,s++,l[r],l[o],o,t)})),n}},5174:(e,t,n)=>{n(1359),n(9484),n(1499),n(6458),n(8947),n(2971),n(4230),t.toUndirected=n(1624),n(9106)},9484:(e,t,n)=>{var r=n(1880),o=n(7155).De;e.exports=function(e){if(!r(e))throw new Error("graphology-operators/reverse: invalid graph.");var t=e.emptyCopy();return e.forEachUndirectedEdge((function(e,n,r,i){o(t,!0,e,r,i,n)})),e.forEachDirectedEdge((function(e,n,r,i){o(t,!1,e,i,r,n)})),t}},1499:(e,t,n)=>{var r=n(1880),o=n(7052).B,i=n(7155).De;e.exports=function(e,t){if(!r(e))throw new Error("graphology-operators/subgraph: invalid graph instance.");var n=e.nullCopy(),a=t;if(Array.isArray(t)){if(0===t.length)return n;t=new Set(t)}if(t instanceof Set){if(0===t.size)return n;a=function(e){return t.has(e)};var l=t;t=new Set,l.forEach((function(e){t.add(""+e)}))}if("function"!=typeof a)throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if("function"==typeof t){if(e.forEachNode((function(e,t){a(e,t)&&o(n,e,t)})),0===n.order)return n}else t.forEach((function(t){if(!e.hasNode(t))throw new Error('graphology-operators/subgraph: the "'+t+'" node was not found in the graph.');o(n,t,e.getNodeAttributes(t))}));return e.forEachEdge((function(e,t,r,o,l,s,c){a(r,l)&&(o===r||a(o,s))&&i(n,c,e,r,o,t)})),n}},6458:(e,t,n)=>{var r=n(1880),o=n(7155).De;e.exports=function(e,t){if(!r(e))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");"function"==typeof t&&(t={mergeEdge:t});var n="function"==typeof(t=t||{}).mergeEdge?t.mergeEdge:null;if("directed"===e.type)return e.copy();var i=e.emptyCopy({type:"directed"});return e.forEachDirectedEdge((function(e,t,n,r){o(i,!1,e,n,r,t)})),e.forEachUndirectedEdge((function(t,r,a,l){var s=!e.multi&&"mixed"===e.type&&i.edge(a,l),c=!e.multi&&"mixed"===e.type&&i.edge(l,a);s?i.replaceEdgeAttributes(s,n(i.getEdgeAttributes(s),r)):o(i,!1,null,a,l,r),a!==l&&(c?i.replaceEdgeAttributes(c,n(i.getEdgeAttributes(c),r)):o(i,!1,null,l,a,r))})),i}},8947:(e,t,n)=>{var r=n(1880);e.exports=function(e){if(!r(e))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return e.copy({type:"mixed"})}},2971:(e,t,n)=>{var r=n(1880);e.exports=function(e){if(!r(e))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return e.copy({multi:!0})}},4230:(e,t,n)=>{var r=n(1880),o=n(7155).De;e.exports=function(e,t){if(!r(e))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");"function"==typeof t&&(t={mergeEdge:t});var n="function"==typeof(t=t||{}).mergeEdge?t.mergeEdge:null;if(!e.multi)return e.copy();var i=e.emptyCopy({multi:!1});return e.forEachEdge((function(e,t,r,a,l,s,c){var u=c?i.undirectedEdge(r,a):i.directedEdge(r,a);u?n&&i.replaceEdgeAttributes(u,n(i.getEdgeAttributes(u),t)):o(i,c,e,r,a,t)})),i}},1624:(e,t,n)=>{var r=n(1880),o=n(7155).De;e.exports=function(e,t){if(!r(e))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");"function"==typeof t&&(t={mergeEdge:t});var n="function"==typeof(t=t||{}).mergeEdge?t.mergeEdge:null;if("undirected"===e.type)return e.copy();var i=e.emptyCopy({type:"undirected"});return e.forEachUndirectedEdge((function(e,t,n,r){o(i,!0,e,n,r,t)})),e.forEachDirectedEdge((function(t,r,a,l){if(!e.multi){var s=i.edge(a,l);if(s)return void(n&&i.replaceEdgeAttributes(s,n(i.getEdgeAttributes(s),r)))}o(i,!0,null,a,l,r)})),i}},9106:(e,t,n)=>{var r=n(1880);e.exports=function(e,t){if(!r(e)||!r(t))throw new Error("graphology-operators/union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var n=e.copy();return n.import(t,!0),n}},9260:(e,t,n)=>{n(1880),n(4363).Q6,n(4231)},715:(e,t,n)=>{var r=n(5129),o=n(7672);n(9260),t.Ar=r.bidirectional,r.singleSource,r.singleSourceLength,r.undirectedSingleSourceLength,r.brandes,o.edgePathFromNodePath},5129:(e,t,n)=>{var r=n(1880),o=n(4034),i=n(8884);function a(e,t,n){if(!r(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!t.hasNode(n))throw new Error('graphology-shortest-path: the "'+n+'" source node does not exist in the given graph.');n=""+n;var o=new Set,a={},l=0;a[n]=0;for(var s,c,u,d=[n];0!==d.length;){var p=[];for(s=0,c=d.length;s<c;s++)u=d[s],o.has(u)||(o.add(u),i(p,t[e](u)),a[u]=l);l++,d=p}return a}var l=a.bind(null,"outboundNeighbors"),s=a.bind(null,"neighbors");t.bidirectional=function(e,t,n){if(!r(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!e.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" source node does not exist in the given graph.');if(!e.hasNode(n))throw new Error('graphology-shortest-path: the "'+n+'" target node does not exist in the given graph.');if((t=""+t)==(n=""+n))return[t];var o=e.inboundNeighbors.bind(e),i=e.outboundNeighbors.bind(e),a={},l={};a[t]=null,l[n]=null;var s,c,u,d,p,h,f,g,m=[t],y=[n],v=!1;e:for(;m.length&&y.length;)if(m.length<=y.length){for(s=m,m=[],p=0,f=s.length;p<f;p++)for(h=0,g=(u=i(c=s[p])).length;h<g;h++)if((d=u[h])in a||(m.push(d),a[d]=c),d in l){v=!0;break e}}else for(s=y,y=[],p=0,f=s.length;p<f;p++)for(h=0,g=(u=o(c=s[p])).length;h<g;h++)if((d=u[h])in l||(y.push(d),l[d]=c),d in a){v=!0;break e}if(!v)return null;for(var b=[];d;)b.unshift(d),d=a[d];for(d=l[b[b.length-1]];d;)b.push(d),d=l[d];return b.length?b:null},t.singleSource=function(e,t){if(!r(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!e.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" source node does not exist in the given graph.');var n,o,i,a,l,s,c={},u={};for(c[t=""+t]=!0,u[t]=[t];Object.keys(c).length;)for(i in n=c,c={},n)for(l=0,s=(o=e.outboundNeighbors(i)).length;l<s;l++)u[a=o[l]]||(u[a]=u[i].concat(a),c[a]=!0);return u},t.singleSourceLength=l,t.undirectedSingleSourceLength=s,t.brandes=function(e,t){t=""+t;var n,r,i,a,l,s,c,u,d,p=[],h={},f={},g=e.nodes();for(s=0,u=g.length;s<u;s++)h[a=g[s]]=[],f[a]=0;var m={};f[t]=1,m[t]=0;for(var y=o.of(t);y.size;)for(a=y.dequeue(),p.push(a),n=m[a],r=f[a],c=0,d=(i=e.outboundNeighbors(a)).length;c<d;c++)(l=i[c])in m||(y.enqueue(l),m[l]=n+1),m[l]===n+1&&(f[l]+=r,h[l].push(a));return[p,h,f]}},7672:(e,t)=>{var n=function(){return!0};t.edgePathFromNodePath=function(e,t){var r,o,i,a,l=t.length;if(l<2)return o=t[0],(a=e.multi?e.findEdge(o,o,n):e.edge(o,o))?[a]:[];l--;var s=new Array(l);for(r=0;r<l;r++){if(o=t[r],i=t[r+1],void 0===(a=e.multi?e.findOutboundEdge(o,i,n):e.edge(o,i)))throw new Error("graphology-shortest-path: given path is impossible in given graph.");s[r]=a}return s}},7155:(e,t)=>{t.De=function(e,t,n,r,o,i){return i=Object.assign({},i),t?null==n?e.addUndirectedEdge(r,o,i):e.addUndirectedEdgeWithKey(n,r,o,i):null==n?e.addDirectedEdge(r,o,i):e.addDirectedEdgeWithKey(n,r,o,i)}},7052:(e,t)=>{t.B=function(e,t,n){return n=Object.assign({},n),e.addNode(t,n)}},6586:e=>{e.exports=function e(t,n){t=t||{};var r,o={};for(var i in n){var a=t[i],l=n[i];!(r=l)||"object"!=typeof r||"function"==typeof r||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date?o[i]=void 0===a?l:a:o[i]=e(a,l)}return o}},4363:(e,t)=>{function n(e){return"number"!=typeof e||isNaN(e)?1:e}t.Q6=function(e){return function(e,t){var n={},r=function(e){return void 0===e?t:e};"function"==typeof t&&(r=t);var o=function(t){return r(t[e])},i=function(){return r(void 0)};return"string"==typeof e?(n.fromAttributes=o,n.fromGraph=function(e,t){return o(e.getEdgeAttributes(t))},n.fromEntry=function(e,t){return o(t)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):"function"==typeof e?(n.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},n.fromGraph=function(t,n){var o=t.extremities(n);return r(e(n,t.getEdgeAttributes(n),o[0],o[1],t.getNodeAttributes(o[0]),t.getNodeAttributes(o[1]),t.isUndirected(n)))},n.fromEntry=function(t,n,o,i,a,l,s){return r(e(t,n,o,i,a,l,s))},n.fromPartialEntry=function(t,n,o,i){return r(e(t,n,o,i))},n.fromMinimalEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=i,n.fromGraph=i,n.fromEntry=i,n.fromMinimalEntry=i),n}(e,n)}},1880:e=>{e.exports=function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.addUndirectedEdgeWithKey&&"function"==typeof e.dropNode&&"boolean"==typeof e.multi}},8996:function(e){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return i=o()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(o=e,-1===Function.toString.call(o).indexOf("[native code]")))return e;var o;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return i(e,arguments,n(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,e)},a(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=function(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++)if(arguments[t])for(var r in arguments[t])e[r]=arguments[t][r];return e};function c(e,t,n,r){var o=e._nodes.get(t),i=null;return o?i="mixed"===r?o.out&&o.out[n]||o.undirected&&o.undirected[n]:"directed"===r?o.out&&o.out[n]:o.undirected&&o.undirected[n]:i}function u(t){return"object"===e(t)&&null!==t&&t.constructor===Object}function d(e){var t;for(t in e)return!1;return!0}function p(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function h(e,t,n){var r={enumerable:!0,configurable:!0};"function"==typeof n?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function f(e){return!(!u(e)||e.attributes&&!Array.isArray(e.attributes))}"function"==typeof Object.assign&&(s=Object.assign);var g,m={exports:{}},y="object"==typeof Reflect?Reflect:null,v=y&&"function"==typeof y.apply?y.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};g=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var b=Number.isNaN||function(e){return e!=e};function x(){x.init.call(this)}m.exports=x,m.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}M(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&M(e,"error",t,{once:!0})}(e,o)}))},x.EventEmitter=x,x.prototype._events=void 0,x.prototype._eventsCount=0,x.prototype._maxListeners=void 0;var w=10;function S(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function E(e){return void 0===e._maxListeners?x.defaultMaxListeners:e._maxListeners}function O(e,t,n,r){var o,i,a,l;if(S(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=E(e))>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,l=s,console&&console.warn&&console.warn(l)}return e}function C(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=C.bind(r);return o.listener=n,r.wrapFn=o,o}function k(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):P(o,o.length)}function T(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function P(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function M(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}function R(e){if("function"!=typeof e)throw new Error("obliterator/iterator: expecting a function!");this.next=e}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(e){if("number"!=typeof e||e<0||b(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");w=e}}),x.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},x.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||b(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},x.prototype.getMaxListeners=function(){return E(this)},x.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)v(l,this,t);else{var s=l.length,c=P(l,s);for(n=0;n<s;++n)v(c[n],this,t)}return!0},x.prototype.addListener=function(e,t){return O(this,e,t,!1)},x.prototype.on=x.prototype.addListener,x.prototype.prependListener=function(e,t){return O(this,e,t,!0)},x.prototype.once=function(e,t){return S(t),this.on(e,_(this,e,t)),this},x.prototype.prependOnceListener=function(e,t){return S(t),this.prependListener(e,_(this,e,t)),this},x.prototype.removeListener=function(e,t){var n,r,o,i,a;if(S(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},x.prototype.off=x.prototype.removeListener,x.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},x.prototype.listeners=function(e){return k(this,e,!0)},x.prototype.rawListeners=function(e){return k(this,e,!1)},x.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):T.call(e,t)},x.prototype.listenerCount=T,x.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]},"undefined"!=typeof Symbol&&(R.prototype[Symbol.iterator]=function(){return this}),R.of=function(){var e=arguments,t=e.length,n=0;return new R((function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}}))},R.empty=function(){return new R((function(){return{done:!0}}))},R.fromSequence=function(e){var t=0,n=e.length;return new R((function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}}))},R.is=function(e){return e instanceof R||"object"==typeof e&&null!==e&&"function"==typeof e.next};var I=R,D={};D.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,D.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var A=I,L=D,N=L.ARRAY_BUFFER_SUPPORT,j=L.SYMBOL_SUPPORT,z=function(e){var t=function(e){return"string"==typeof e||Array.isArray(e)||N&&ArrayBuffer.isView(e)?A.fromSequence(e):"object"!=typeof e||null===e?null:j&&"function"==typeof e[Symbol.iterator]?e[Symbol.iterator]():"function"==typeof e.next?e:null}(e);if(!t)throw new Error("obliterator: target is not iterable nor a valid iterator.");return t},F=z,B=function(e,t){for(var n,r=arguments.length>1?t:1/0,o=r!==1/0?new Array(r):[],i=0,a=F(e);;){if(i===r)return o;if((n=a.next()).done)return i!==t&&(o.length=i),o;o[i++]=n.value}},W=function(e){function n(t){var n;return(n=e.call(this)||this).name="GraphError",n.message=t,n}return t(n,e),n}(a(Error)),U=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(l(r),n.prototype.constructor),r}return t(n,e),n}(W),H=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(l(r),n.prototype.constructor),r}return t(n,e),n}(W),V=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(l(r),n.prototype.constructor),r}return t(n,e),n}(W);function G(e,t){this.key=e,this.attributes=t,this.clear()}function q(e,t){this.key=e,this.attributes=t,this.clear()}function Y(e,t){this.key=e,this.attributes=t,this.clear()}function K(e,t,n,r,o){this.key=t,this.attributes=o,this.undirected=e,this.source=n,this.target=r}function $(e,t,n,r,o,i,a){var l,s,c,u;if(r=""+r,0===n){if(!(l=e._nodes.get(r)))throw new H("Graph.".concat(t,': could not find the "').concat(r,'" node in the graph.'));c=o,u=i}else if(3===n){if(o=""+o,!(s=e._edges.get(o)))throw new H("Graph.".concat(t,': could not find the "').concat(o,'" edge in the graph.'));var d=s.source.key,p=s.target.key;if(r===d)l=s.target;else{if(r!==p)throw new H("Graph.".concat(t,': the "').concat(r,'" node is not attached to the "').concat(o,'" edge (').concat(d,", ").concat(p,")."));l=s.source}c=i,u=a}else{if(!(s=e._edges.get(r)))throw new H("Graph.".concat(t,': could not find the "').concat(r,'" edge in the graph.'));l=1===n?s.source:s.target,c=o,u=i}return[l,c,u]}G.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},q.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},Y.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},K.prototype.attach=function(){var e="out",t="in";this.undirected&&(e=t="undirected");var n=this.source.key,r=this.target.key;this.source[e][r]=this,this.undirected&&n===r||(this.target[t][n]=this)},K.prototype.attachMulti=function(){var e="out",t="in",n=this.source.key,r=this.target.key;this.undirected&&(e=t="undirected");var o=this.source[e],i=o[r];if(void 0===i)return o[r]=this,void(this.undirected&&n===r||(this.target[t][n]=this));i.previous=this,this.next=i,o[r]=this,this.target[t][n]=this},K.prototype.detach=function(){var e=this.source.key,t=this.target.key,n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][t],delete this.target[r][e]},K.prototype.detachMulti=function(){var e=this.source.key,t=this.target.key,n="out",r="in";this.undirected&&(n=r="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var Z=[{name:function(e){return"get".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];return a.attributes[l]}}},{name:function(e){return"get".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){return $(this,t,n,e,r)[0].attributes}}},{name:function(e){return"has".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];return a.attributes.hasOwnProperty(l)}}},{name:function(e){return"set".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o,i){var a=$(this,t,n,e,r,o,i),l=a[0],s=a[1],c=a[2];return l.attributes[s]=c,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:s}),this}}},{name:function(e){return"update".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o,i){var a=$(this,t,n,e,r,o,i),l=a[0],s=a[1],c=a[2];if("function"!=typeof c)throw new U("Graph.".concat(t,": updater should be a function."));var u=l.attributes,d=c(u[s]);return u[s]=d,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:s}),this}}},{name:function(e){return"remove".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];return delete a.attributes[l],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:l}),this}}},{name:function(e){return"replace".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];if(!u(l))throw new U("Graph.".concat(t,": provided attributes are not a plain object."));return a.attributes=l,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(e){return"merge".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];if(!u(l))throw new U("Graph.".concat(t,": provided attributes are not a plain object."));return s(a.attributes,l),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:l}),this}}},{name:function(e){return"update".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i=$(this,t,n,e,r,o),a=i[0],l=i[1];if("function"!=typeof l)throw new U("Graph.".concat(t,": provided updater is not a function."));return a.attributes=l(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],X=[{name:function(e){return"get".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return o.attributes[r]}}},{name:function(e){return"get".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e){var r;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+e,i=""+arguments[1];if(!(r=c(this,o,i,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(o,'" - "').concat(i,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(r=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return r.attributes}}},{name:function(e){return"has".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return o.attributes.hasOwnProperty(r)}}},{name:function(e){return"set".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,l=""+r;if(r=arguments[2],o=arguments[3],!(i=c(this,a,l,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(l,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return i.attributes[r]=o,this.emit("edgeAttributesUpdated",{key:i.key,type:"set",attributes:i.attributes,name:r}),this}}},{name:function(e){return"update".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,o){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,l=""+r;if(r=arguments[2],o=arguments[3],!(i=c(this,a,l,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(l,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if("function"!=typeof o)throw new U("Graph.".concat(t,": updater should be a function."));return i.attributes[r]=o(i.attributes[r]),this.emit("edgeAttributesUpdated",{key:i.key,type:"set",attributes:i.attributes,name:r}),this}}},{name:function(e){return"remove".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return delete o.attributes[r],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:r}),this}}},{name:function(e){return"replace".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if(!u(r))throw new U("Graph.".concat(t,": provided attributes are not a plain object."));return o.attributes=r,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}},{name:function(e){return"merge".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if(!u(r))throw new U("Graph.".concat(t,": provided attributes are not a plain object."));return s(o.attributes,r),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:r}),this}}},{name:function(e){return"update".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new V("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new V("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+r;if(r=arguments[2],!(o=c(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new V("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(o=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if("function"!=typeof r)throw new U("Graph.".concat(t,": provided updater is not a function."));return o.attributes=r(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}}],Q=I,J=z,ee=function(){var e=arguments,t=null,n=-1;return new Q((function(){for(var r=null;;){if(null===t){if(++n>=e.length)return{done:!0};t=J(e[n])}if(!0!==(r=t.next()).done)break;t=null}return r}))},te=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function ne(e,t,n,r){var o=!1;for(var i in t)if(i!==r){var a=t[i];if(o=n(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),e&&o)return a.key}}function re(e,t,n,r){var o,i,a,l=!1;for(var s in t)if(s!==r){o=t[s];do{if(i=o.source,a=o.target,l=n(o.key,o.attributes,i.key,a.key,i.attributes,a.attributes,o.undirected),e&&l)return o.key;o=o.next}while(void 0!==o)}}function oe(e,t){var n,r=Object.keys(e),o=r.length,i=0;return new I((function(){do{if(n)n=n.next;else{if(i>=o)return{done:!0};var a=r[i++];if(a===t){n=void 0;continue}n=e[a]}}while(!n);return{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}}}))}function ie(e,t,n,r){var o=t[n];if(o){var i=o.source,a=o.target;return r(o.key,o.attributes,i.key,a.key,i.attributes,a.attributes,o.undirected)&&e?o.key:void 0}}function ae(e,t,n,r){var o=t[n];if(o){var i=!1;do{if(i=r(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key;o=o.next}while(void 0!==o)}}function le(e,t){var n=e[t];return void 0!==n.next?new I((function(){if(!n)return{done:!0};var e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}})):I.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function se(e,t){if(0===e.size)return[];if("mixed"===t||t===e.type)return"function"==typeof Array.from?Array.from(e._edges.keys()):B(e._edges.keys(),e._edges.size);for(var n,r,o="undirected"===t?e.undirectedSize:e.directedSize,i=new Array(o),a="undirected"===t,l=e._edges.values(),s=0;!0!==(n=l.next()).done;)(r=n.value).undirected===a&&(i[s++]=r.key);return i}function ce(e,t,n,r){if(0!==t.size)for(var o,i,a="mixed"!==n&&n!==t.type,l="undirected"===n,s=!1,c=t._edges.values();!0!==(o=c.next()).done;)if(i=o.value,!a||i.undirected===l){var u=i,d=u.key,p=u.attributes,h=u.source,f=u.target;if(s=r(d,p,h.key,f.key,h.attributes,f.attributes,i.undirected),e&&s)return d}}function ue(e,t){if(0===e.size)return I.empty();var n="mixed"!==t&&t!==e.type,r="undirected"===t,o=e._edges.values();return new I((function(){for(var e,t;;){if((e=o.next()).done)return e;if(t=e.value,!n||t.undirected===r)break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}))}function de(e,t,n,r,o,i){var a,l=t?re:ne;if("undirected"!==n){if("out"!==r&&(a=l(e,o.in,i),e&&a))return a;if("in"!==r&&(a=l(e,o.out,i,r?void 0:o.key),e&&a))return a}if("directed"!==n&&(a=l(e,o.undirected,i),e&&a))return a}function pe(e,t,n,r){var o=[];return de(!1,e,t,n,r,(function(e){o.push(e)})),o}function he(e,t,n){var r=I.empty();return"undirected"!==e&&("out"!==t&&void 0!==n.in&&(r=ee(r,oe(n.in))),"in"!==t&&void 0!==n.out&&(r=ee(r,oe(n.out,t?void 0:n.key)))),"directed"!==e&&void 0!==n.undirected&&(r=ee(r,oe(n.undirected))),r}function fe(e,t,n,r,o,i,a){var l,s=n?ae:ie;if("undirected"!==t){if(void 0!==o.in&&"out"!==r&&(l=s(e,o.in,i,a),e&&l))return l;if(void 0!==o.out&&"in"!==r&&(r||o.key!==i)&&(l=s(e,o.out,i,a),e&&l))return l}if("directed"!==t&&void 0!==o.undirected&&(l=s(e,o.undirected,i,a),e&&l))return l}function ge(e,t,n,r,o){var i=[];return fe(!1,e,t,n,r,o,(function(e){i.push(e)})),i}function me(e,t,n,r){var o=I.empty();return"undirected"!==e&&(void 0!==n.in&&"out"!==t&&r in n.in&&(o=ee(o,le(n.in,r))),void 0!==n.out&&"in"!==t&&r in n.out&&(t||n.key!==r)&&(o=ee(o,le(n.out,r)))),"directed"!==e&&void 0!==n.undirected&&r in n.undirected&&(o=ee(o,le(n.undirected,r))),o}var ye=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function ve(){this.A=null,this.B=null}function be(e,t,n,r,o){for(var i in r){var a=r[i],l=a.source,s=a.target,c=l===n?s:l;if(!t||!t.has(c.key)){var u=o(c.key,c.attributes);if(e&&u)return c.key}}}function xe(e,t,n,r,o){if("mixed"!==t){if("undirected"===t)return be(e,null,r,r.undirected,o);if("string"==typeof n)return be(e,null,r,r[n],o)}var i,a=new ve;if("undirected"!==t){if("out"!==n){if(i=be(e,null,r,r.in,o),e&&i)return i;a.wrap(r.in)}if("in"!==n){if(i=be(e,a,r,r.out,o),e&&i)return i;a.wrap(r.out)}}if("directed"!==t&&(i=be(e,a,r,r.undirected,o),e&&i))return i}function we(e,t,n){var r=Object.keys(n),o=r.length,i=0;return new I((function(){var a=null;do{if(i>=o)return e&&e.wrap(n),{done:!0};var l=n[r[i++]],s=l.source,c=l.target;a=s===t?c:s,e&&e.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function Se(e,t,n,r,o){for(var i,a,l,s,c,u,d,p=r._nodes.values(),h=r.type;!0!==(i=p.next()).done;){var f=!1;if(a=i.value,"undirected"!==h)for(l in s=a.out){c=s[l];do{if(u=c.target,f=!0,d=o(a.key,u.key,a.attributes,u.attributes,c.key,c.attributes,c.undirected),e&&d)return c;c=c.next}while(c)}if("directed"!==h)for(l in s=a.undirected)if(!(t&&a.key>l)){c=s[l];do{if((u=c.target).key!==l&&(u=c.source),f=!0,d=o(a.key,u.key,a.attributes,u.attributes,c.key,c.attributes,c.undirected),e&&d)return c;c=c.next}while(c)}if(n&&!f&&(d=o(a.key,null,a.attributes,null,null,null,null),e&&d))return null}}function Ee(e){if(!u(e))throw new U('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new U("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!u(e.attributes)||null===e.attributes))throw new U("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Oe(e){if(!u(e))throw new U('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new U("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new U("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!u(e.attributes)||null===e.attributes))throw new U("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&"boolean"!=typeof e.undirected)throw new U("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}ve.prototype.wrap=function(e){null===this.A?this.A=e:null===this.B&&(this.B=e)},ve.prototype.has=function(e){return null!==this.A&&e in this.A||null!==this.B&&e in this.B};var Ce,_e=(Ce=255&Math.floor(256*Math.random()),function(){return Ce++}),ke=new Set(["directed","undirected","mixed"]),Te=new Set(["domain","_events","_eventsCount","_maxListeners"]),Pe={allowSelfLoops:!0,multi:!1,type:"mixed"};function Me(e,t,n){var r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function Re(e,t,n,r,o,i,a,l){if(!r&&"undirected"===e.type)throw new V("Graph.".concat(t,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(r&&"directed"===e.type)throw new V("Graph.".concat(t,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(l&&!u(l))throw new U("Graph.".concat(t,': invalid attributes. Expecting an object but got "').concat(l,'"'));if(i=""+i,a=""+a,l=l||{},!e.allowSelfLoops&&i===a)throw new V("Graph.".concat(t,': source & target are the same ("').concat(i,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var s=e._nodes.get(i),c=e._nodes.get(a);if(!s)throw new H("Graph.".concat(t,': source node "').concat(i,'" not found.'));if(!c)throw new H("Graph.".concat(t,': target node "').concat(a,'" not found.'));var d={key:null,undirected:r,source:i,target:a,attributes:l};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new V("Graph.".concat(t,': the "').concat(o,'" edge already exists in the graph.'));if(!e.multi&&(r?void 0!==s.undirected[a]:void 0!==s.out[a]))throw new V("Graph.".concat(t,': an edge linking "').concat(i,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var p=new K(r,o,s,c,l);e._edges.set(o,p);var h=i===a;return r?(s.undirectedDegree++,c.undirectedDegree++,h&&(s.undirectedLoops++,e._undirectedSelfLoopCount++)):(s.outDegree++,c.inDegree++,h&&(s.directedLoops++,e._directedSelfLoopCount++)),e.multi?p.attachMulti():p.attach(),r?e._undirectedSize++:e._directedSize++,d.key=o,e.emit("edgeAdded",d),o}function Ie(e,t,n,r,o,i,a,l,c){if(!r&&"undirected"===e.type)throw new V("Graph.".concat(t,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(r&&"directed"===e.type)throw new V("Graph.".concat(t,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(l)if(c){if("function"!=typeof l)throw new U("Graph.".concat(t,': invalid updater function. Expecting a function but got "').concat(l,'"'))}else if(!u(l))throw new U("Graph.".concat(t,': invalid attributes. Expecting an object but got "').concat(l,'"'));var d;if(i=""+i,a=""+a,c&&(d=l,l=void 0),!e.allowSelfLoops&&i===a)throw new V("Graph.".concat(t,': source & target are the same ("').concat(i,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var p,h,f=e._nodes.get(i),g=e._nodes.get(a);if(!n&&(p=e._edges.get(o))){if(!(p.source.key===i&&p.target.key===a||r&&p.source.key===a&&p.target.key===i))throw new V("Graph.".concat(t,': inconsistency detected when attempting to merge the "').concat(o,'" edge with "').concat(i,'" source & "').concat(a,'" target vs. ("').concat(p.source.key,'", "').concat(p.target.key,'").'));h=p}if(h||e.multi||!f||(h=r?f.undirected[a]:f.out[a]),h){var m=[h.key,!1,!1,!1];if(c?!d:!l)return m;if(c){var y=h.attributes;h.attributes=d(y),e.emit("edgeAttributesUpdated",{type:"replace",key:h.key,attributes:h.attributes})}else s(h.attributes,l),e.emit("edgeAttributesUpdated",{type:"merge",key:h.key,attributes:h.attributes,data:l});return m}l=l||{},c&&d&&(l=d(l));var v={key:null,undirected:r,source:i,target:a,attributes:l};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new V("Graph.".concat(t,': the "').concat(o,'" edge already exists in the graph.'));var b=!1,x=!1;f||(f=Me(e,i,{}),b=!0,i===a&&(g=f,x=!0)),g||(g=Me(e,a,{}),x=!0),p=new K(r,o,f,g,l),e._edges.set(o,p);var w=i===a;return r?(f.undirectedDegree++,g.undirectedDegree++,w&&(f.undirectedLoops++,e._undirectedSelfLoopCount++)):(f.outDegree++,g.inDegree++,w&&(f.directedLoops++,e._directedSelfLoopCount++)),e.multi?p.attachMulti():p.attach(),r?e._undirectedSize++:e._directedSize++,v.key=o,e.emit("edgeAdded",v),[o,!0,b,x]}function De(e,t){e._edges.delete(t.key);var n=t.source,r=t.target,o=t.attributes,i=t.undirected,a=n===r;i?(n.undirectedDegree--,r.undirectedDegree--,a&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,a&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),i?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:o,source:n.key,target:r.key,undirected:i})}var Ae=function(n){function r(e){var t;if(t=n.call(this)||this,"boolean"!=typeof(e=s({},Pe,e)).multi)throw new U("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(e.multi,'".'));if(!ke.has(e.type))throw new U('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(e.type,'".'));if("boolean"!=typeof e.allowSelfLoops)throw new U("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(e.allowSelfLoops,'".'));var r="mixed"===e.type?G:"directed"===e.type?q:Y;p(l(t),"NodeDataClass",r);var o="geid_"+_e()+"_",i=0;return p(l(t),"_attributes",{}),p(l(t),"_nodes",new Map),p(l(t),"_edges",new Map),p(l(t),"_directedSize",0),p(l(t),"_undirectedSize",0),p(l(t),"_directedSelfLoopCount",0),p(l(t),"_undirectedSelfLoopCount",0),p(l(t),"_edgeKeyGenerator",(function(){var e;do{e=o+i++}while(t._edges.has(e));return e})),p(l(t),"_options",e),Te.forEach((function(e){return p(l(t),e,t[e])})),h(l(t),"order",(function(){return t._nodes.size})),h(l(t),"size",(function(){return t._edges.size})),h(l(t),"directedSize",(function(){return t._directedSize})),h(l(t),"undirectedSize",(function(){return t._undirectedSize})),h(l(t),"selfLoopCount",(function(){return t._directedSelfLoopCount+t._undirectedSelfLoopCount})),h(l(t),"directedSelfLoopCount",(function(){return t._directedSelfLoopCount})),h(l(t),"undirectedSelfLoopCount",(function(){return t._undirectedSelfLoopCount})),h(l(t),"multi",t._options.multi),h(l(t),"type",t._options.type),h(l(t),"allowSelfLoops",t._options.allowSelfLoops),h(l(t),"implementation",(function(){return"graphology"})),t}t(r,n);var o=r.prototype;return o._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},o.hasNode=function(e){return this._nodes.has(""+e)},o.hasDirectedEdge=function(e,t){if("undirected"===this.type)return!1;if(1===arguments.length){var n=""+e,r=this._edges.get(n);return!!r&&!r.undirected}if(2===arguments.length){e=""+e,t=""+t;var o=this._nodes.get(e);return!!o&&o.out.hasOwnProperty(t)}throw new U("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},o.hasUndirectedEdge=function(e,t){if("directed"===this.type)return!1;if(1===arguments.length){var n=""+e,r=this._edges.get(n);return!!r&&r.undirected}if(2===arguments.length){e=""+e,t=""+t;var o=this._nodes.get(e);return!!o&&o.undirected.hasOwnProperty(t)}throw new U("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},o.hasEdge=function(e,t){if(1===arguments.length){var n=""+e;return this._edges.has(n)}if(2===arguments.length){e=""+e,t=""+t;var r=this._nodes.get(e);return!!r&&(void 0!==r.out&&r.out.hasOwnProperty(t)||void 0!==r.undirected&&r.undirected.hasOwnProperty(t))}throw new U("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},o.directedEdge=function(e,t){if("undirected"!==this.type){if(e=""+e,t=""+t,this.multi)throw new V("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var n=this._nodes.get(e);if(!n)throw new H('Graph.directedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.directedEdge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.out&&n.out[t]||void 0;return r?r.key:void 0}},o.undirectedEdge=function(e,t){if("directed"!==this.type){if(e=""+e,t=""+t,this.multi)throw new V("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var n=this._nodes.get(e);if(!n)throw new H('Graph.undirectedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.undirectedEdge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.undirected&&n.undirected[t]||void 0;return r?r.key:void 0}},o.edge=function(e,t){if(this.multi)throw new V("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.edge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.edge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key},o.areDirectedNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areDirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&(t in n.in||t in n.out)},o.areOutNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areOutNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.out},o.areInNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areInNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.in},o.areUndirectedNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areUndirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"directed"!==this.type&&t in n.undirected},o.areNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&(t in n.in||t in n.out)||"directed"!==this.type&&t in n.undirected},o.areInboundNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areInboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.in||"directed"!==this.type&&t in n.undirected},o.areOutboundNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areOutboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.out||"directed"!==this.type&&t in n.undirected},o.inDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree},o.outDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.outDegree},o.directedDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.directedDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree+t.outDegree},o.undirectedDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.undirectedDegree: could not find the "'.concat(e,'" node in the graph.'));return"directed"===this.type?0:t.undirectedDegree},o.inboundDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inboundDegree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree),n},o.outboundDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outboundDegree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.outDegree),n},o.degree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.degree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree),n},o.inDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree-t.directedLoops},o.outDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.outDegree-t.directedLoops},o.directedDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree+t.outDegree-2*t.directedLoops},o.undirectedDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"directed"===this.type?0:t.undirectedDegree-2*t.undirectedLoops},o.inboundDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree,r+=t.directedLoops),n-r},o.outboundDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.outDegree,r+=t.directedLoops),n-r},o.degreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.degreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree,r+=2*t.directedLoops),n-r},o.source=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.source: could not find the "'.concat(e,'" edge in the graph.'));return t.source.key},o.target=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.target: could not find the "'.concat(e,'" edge in the graph.'));return t.target.key},o.extremities=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.extremities: could not find the "'.concat(e,'" edge in the graph.'));return[t.source.key,t.target.key]},o.opposite=function(e,t){e=""+e,t=""+t;var n=this._edges.get(t);if(!n)throw new H('Graph.opposite: could not find the "'.concat(t,'" edge in the graph.'));var r=n.source.key,o=n.target.key;if(e===r)return o;if(e===o)return r;throw new H('Graph.opposite: the "'.concat(e,'" node is not attached to the "').concat(t,'" edge (').concat(r,", ").concat(o,")."))},o.hasExtremity=function(e,t){e=""+e,t=""+t;var n=this._edges.get(e);if(!n)throw new H('Graph.hasExtremity: could not find the "'.concat(e,'" edge in the graph.'));return n.source.key===t||n.target.key===t},o.isUndirected=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isUndirected: could not find the "'.concat(e,'" edge in the graph.'));return t.undirected},o.isDirected=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isDirected: could not find the "'.concat(e,'" edge in the graph.'));return!t.undirected},o.isSelfLoop=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isSelfLoop: could not find the "'.concat(e,'" edge in the graph.'));return t.source===t.target},o.addNode=function(e,t){var n=function(e,t,n){if(n&&!u(n))throw new U('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(n,'"'));if(t=""+t,n=n||{},e._nodes.has(t))throw new V('Graph.addNode: the "'.concat(t,'" node already exist in the graph.'));var r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}(this,e,t);return n.key},o.mergeNode=function(e,t){if(t&&!u(t))throw new U('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(t,'"'));e=""+e,t=t||{};var n=this._nodes.get(e);return n?(t&&(s(n.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])},o.updateNode=function(e,t){if(t&&"function"!=typeof t)throw new U('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(t,'"'));e=""+e;var n=this._nodes.get(e);if(n){if(t){var r=n.attributes;n.attributes=t(r),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}var o=t?t({}):{};return n=new this.NodeDataClass(e,o),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:o}),[e,!0]},o.dropNode=function(e){e=""+e;var t,n=this._nodes.get(e);if(!n)throw new H('Graph.dropNode: could not find the "'.concat(e,'" node in the graph.'));if("undirected"!==this.type){for(var r in n.out){t=n.out[r];do{De(this,t),t=t.next}while(t)}for(var o in n.in){t=n.in[o];do{De(this,t),t=t.next}while(t)}}if("directed"!==this.type)for(var i in n.undirected){t=n.undirected[i];do{De(this,t),t=t.next}while(t)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:n.attributes})},o.dropEdge=function(e){var t;if(arguments.length>1){var n=""+arguments[0],r=""+arguments[1];if(!(t=c(this,n,r,this.type)))throw new H('Graph.dropEdge: could not find the "'.concat(n,'" -> "').concat(r,'" edge in the graph.'))}else if(e=""+e,!(t=this._edges.get(e)))throw new H('Graph.dropEdge: could not find the "'.concat(e,'" edge in the graph.'));return De(this,t),this},o.dropDirectedEdge=function(e,t){if(arguments.length<2)throw new V("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new V("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var n=c(this,e=""+e,t=""+t,"directed");if(!n)throw new H('Graph.dropDirectedEdge: could not find a "'.concat(e,'" -> "').concat(t,'" edge in the graph.'));return De(this,n),this},o.dropUndirectedEdge=function(e,t){if(arguments.length<2)throw new V("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new V("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var n=c(this,e,t,"undirected");if(!n)throw new H('Graph.dropUndirectedEdge: could not find a "'.concat(e,'" -> "').concat(t,'" edge in the graph.'));return De(this,n),this},o.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},o.clearEdges=function(){for(var e,t=this._nodes.values();!0!==(e=t.next()).done;)e.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},o.getAttribute=function(e){return this._attributes[e]},o.getAttributes=function(){return this._attributes},o.hasAttribute=function(e){return this._attributes.hasOwnProperty(e)},o.setAttribute=function(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this},o.updateAttribute=function(e,t){if("function"!=typeof t)throw new U("Graph.updateAttribute: updater should be a function.");var n=this._attributes[e];return this._attributes[e]=t(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this},o.removeAttribute=function(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this},o.replaceAttributes=function(e){if(!u(e))throw new U("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},o.mergeAttributes=function(e){if(!u(e))throw new U("Graph.mergeAttributes: provided attributes are not a plain object.");return s(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this},o.updateAttributes=function(e){if("function"!=typeof e)throw new U("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},o.updateEachNodeAttributes=function(e,t){if("function"!=typeof e)throw new U("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!f(t))throw new U("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var n,r,o=this._nodes.values();!0!==(n=o.next()).done;)(r=n.value).attributes=e(r.key,r.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})},o.updateEachEdgeAttributes=function(e,t){if("function"!=typeof e)throw new U("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!f(t))throw new U("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var n,r,o,i,a=this._edges.values();!0!==(n=a.next()).done;)o=(r=n.value).source,i=r.target,r.attributes=e(r.key,r.attributes,o.key,i.key,o.attributes,i.attributes,r.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})},o.forEachAdjacencyEntry=function(e){if("function"!=typeof e)throw new U("Graph.forEachAdjacencyEntry: expecting a callback.");Se(!1,!1,!1,this,e)},o.forEachAdjacencyEntryWithOrphans=function(e){if("function"!=typeof e)throw new U("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!1,!0,this,e)},o.forEachAssymetricAdjacencyEntry=function(e){if("function"!=typeof e)throw new U("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Se(!1,!0,!1,this,e)},o.forEachAssymetricAdjacencyEntryWithOrphans=function(e){if("function"!=typeof e)throw new U("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!0,!0,this,e)},o.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):B(this._nodes.keys(),this._nodes.size)},o.forEachNode=function(e){if("function"!=typeof e)throw new U("Graph.forEachNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)e((n=t.value).key,n.attributes)},o.findNode=function(e){if("function"!=typeof e)throw new U("Graph.findNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(e((n=t.value).key,n.attributes))return n.key},o.mapNodes=function(e){if("function"!=typeof e)throw new U("Graph.mapNode: expecting a callback.");for(var t,n,r=this._nodes.values(),o=new Array(this.order),i=0;!0!==(t=r.next()).done;)n=t.value,o[i++]=e(n.key,n.attributes);return o},o.someNode=function(e){if("function"!=typeof e)throw new U("Graph.someNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(e((n=t.value).key,n.attributes))return!0;return!1},o.everyNode=function(e){if("function"!=typeof e)throw new U("Graph.everyNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(!e((n=t.value).key,n.attributes))return!1;return!0},o.filterNodes=function(e){if("function"!=typeof e)throw new U("Graph.filterNodes: expecting a callback.");for(var t,n,r=this._nodes.values(),o=[];!0!==(t=r.next()).done;)e((n=t.value).key,n.attributes)&&o.push(n.key);return o},o.reduceNodes=function(e,t){if("function"!=typeof e)throw new U("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new U("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var n,r,o=t,i=this._nodes.values();!0!==(n=i.next()).done;)o=e(o,(r=n.value).key,r.attributes);return o},o.nodeEntries=function(){var e=this._nodes.values();return new I((function(){var t=e.next();if(t.done)return t;var n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}))},o.export=function(){var e=this,t=new Array(this._nodes.size),n=0;this._nodes.forEach((function(e,r){t[n++]=function(e,t){var n={key:e};return d(t.attributes)||(n.attributes=s({},t.attributes)),n}(r,e)}));var r=new Array(this._edges.size);return n=0,this._edges.forEach((function(t,o){r[n++]=function(e,t,n){var r={key:t,source:n.source.key,target:n.target.key};return d(n.attributes)||(r.attributes=s({},n.attributes)),"mixed"===e&&n.undirected&&(r.undirected=!0),r}(e.type,o,t)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}},o.import=function(e){var t,n,o,i,a,l=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e instanceof r)return e.forEachNode((function(e,t){s?l.mergeNode(e,t):l.addNode(e,t)})),e.forEachEdge((function(e,t,n,r,o,i,a){s?a?l.mergeUndirectedEdgeWithKey(e,n,r,t):l.mergeDirectedEdgeWithKey(e,n,r,t):a?l.addUndirectedEdgeWithKey(e,n,r,t):l.addDirectedEdgeWithKey(e,n,r,t)})),this;if(!u(e))throw new U("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!u(e.attributes))throw new U("Graph.import: invalid attributes. Expecting a plain object.");s?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}if(e.nodes){if(o=e.nodes,!Array.isArray(o))throw new U("Graph.import: invalid nodes. Expecting an array.");for(t=0,n=o.length;t<n;t++){Ee(i=o[t]);var c=i,d=c.key,p=c.attributes;s?this.mergeNode(d,p):this.addNode(d,p)}}if(e.edges){var h=!1;if("undirected"===this.type&&(h=!0),o=e.edges,!Array.isArray(o))throw new U("Graph.import: invalid edges. Expecting an array.");for(t=0,n=o.length;t<n;t++){Oe(a=o[t]);var f=a,g=f.source,m=f.target,y=f.attributes,v=f.undirected,b=void 0===v?h:v;"key"in a?(s?b?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:b?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,a.key,g,m,y):(s?b?this.mergeUndirectedEdge:this.mergeDirectedEdge:b?this.addUndirectedEdge:this.addDirectedEdge).call(this,g,m,y)}}return this},o.nullCopy=function(e){var t=new r(s({},this._options,e));return t.replaceAttributes(s({},this.getAttributes())),t},o.emptyCopy=function(e){var t=this.nullCopy(e);return this._nodes.forEach((function(e,n){var r=s({},e.attributes);e=new t.NodeDataClass(n,r),t._nodes.set(n,e)})),t},o.copy=function(e){if("string"==typeof(e=e||{}).type&&e.type!==this.type&&"mixed"!==e.type)throw new V('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(e.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof e.multi&&e.multi!==this.multi&&!0!==e.multi)throw new V("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof e.allowSelfLoops&&e.allowSelfLoops!==this.allowSelfLoops&&!0!==e.allowSelfLoops)throw new V("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var t,n,r=this.emptyCopy(e),o=this._edges.values();!0!==(t=o.next()).done;)Re(r,"copy",!1,(n=t.value).undirected,n.key,n.source.key,n.target.key,s({},n.attributes));return r},o.toJSON=function(){return this.export()},o.toString=function(){return"[object Graph]"},o.inspect=function(){var t=this,n={};this._nodes.forEach((function(e,t){n[t]=e.attributes}));var r={},o={};this._edges.forEach((function(e,n){var i,a=e.undirected?"--":"->",l="",s=e.source.key,c=e.target.key;e.undirected&&s>c&&(i=s,s=c,c=i);var u="(".concat(s,")").concat(a,"(").concat(c,")");n.startsWith("geid_")?t.multi&&(void 0===o[u]?o[u]=0:o[u]++,l+="".concat(o[u],". ")):l+="[".concat(n,"]: "),r[l+=u]=e.attributes}));var i={};for(var a in this)this.hasOwnProperty(a)&&!Te.has(a)&&"function"!=typeof this[a]&&"symbol"!==e(a)&&(i[a]=this[a]);return i.attributes=this._attributes,i.nodes=n,i.edges=r,p(i,"constructor",this.constructor),i},r}(m.exports.EventEmitter);"undefined"!=typeof Symbol&&(Ae.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ae.prototype.inspect),[{name:function(e){return"".concat(e,"Edge")},generateKey:!0},{name:function(e){return"".concat(e,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(e){return"".concat(e,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(e){return"".concat(e,"EdgeWithKey")}},{name:function(e){return"".concat(e,"DirectedEdgeWithKey")},type:"directed"},{name:function(e){return"".concat(e,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(e){["add","merge","update"].forEach((function(t){var n=e.name(t),r="add"===t?Re:Ie;e.generateKey?Ae.prototype[n]=function(o,i,a){return r(this,n,!0,"undirected"===(e.type||this.type),null,o,i,a,"update"===t)}:Ae.prototype[n]=function(o,i,a,l){return r(this,n,!1,"undirected"===(e.type||this.type),o,i,a,l,"update"===t)}}))})),function(e){Z.forEach((function(t){var n=t.name,r=t.attacher;r(e,n("Node"),0),r(e,n("Source"),1),r(e,n("Target"),2),r(e,n("Opposite"),3)}))}(Ae),function(e){X.forEach((function(t){var n=t.name,r=t.attacher;r(e,n("Edge"),"mixed"),r(e,n("DirectedEdge"),"directed"),r(e,n("UndirectedEdge"),"undirected")}))}(Ae),function(e){te.forEach((function(t){!function(e,t){var n=t.name,r=t.type,o=t.direction;e.prototype[n]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];if(!arguments.length)return se(this,r);if(1===arguments.length){e=""+e;var i=this._nodes.get(e);if(void 0===i)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" node in the graph.'));return pe(this.multi,"mixed"===r?this.type:r,o,i)}if(2===arguments.length){e=""+e,t=""+t;var a=this._nodes.get(e);if(!a)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(n,': could not find the "').concat(t,'" target node in the graph.'));return ge(r,this.multi,o,a,t)}throw new U("Graph.".concat(n,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t,n){if("mixed"===r||"mixed"===this.type||r===this.type){if(1===arguments.length)return ce(!1,this,r,n=e);if(2===arguments.length){e=""+e,n=t;var a=this._nodes.get(e);if(void 0===a)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" node in the graph.'));return de(!1,this.multi,"mixed"===r?this.type:r,o,a,n)}if(3===arguments.length){e=""+e,t=""+t;var l=this._nodes.get(e);if(!l)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(i,': could not find the "').concat(t,'" target node in the graph.'));return fe(!1,r,this.multi,o,l,t,n)}throw new U("Graph.".concat(i,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(){var e,t=Array.prototype.slice.call(arguments),n=t.pop();if(0===t.length){var o=0;"directed"!==r&&(o+=this.undirectedSize),"undirected"!==r&&(o+=this.directedSize),e=new Array(o);var a=0;t.push((function(t,r,o,i,l,s,c){e[a++]=n(t,r,o,i,l,s,c)}))}else e=[],t.push((function(t,r,o,i,a,l,s){e.push(n(t,r,o,i,a,l,s))}));return this[i].apply(this,t),e};var l="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((function(e,r,o,i,a,l,s){t(e,r,o,i,a,l,s)&&n.push(e)})),this[i].apply(this,e),n};var s="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){var e,t,n=Array.prototype.slice.call(arguments);if(n.length<2||n.length>4)throw new U("Graph.".concat(s,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(n.length,")."));if("function"==typeof n[n.length-1]&&"function"!=typeof n[n.length-2])throw new U("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));2===n.length?(e=n[0],t=n[1],n=[]):3===n.length?(e=n[1],t=n[2],n=[n[0]]):4===n.length&&(e=n[2],t=n[3],n=[n[0],n[1]]);var r=t;return n.push((function(t,n,o,i,a,l,s){r=e(r,t,n,o,i,a,l,s)})),this[i].apply(this,n),r}}(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t,n){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return!1;if(1===arguments.length)return ce(!0,this,r,n=e);if(2===arguments.length){e=""+e,n=t;var a=this._nodes.get(e);if(void 0===a)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" node in the graph.'));return de(!0,this.multi,"mixed"===r?this.type:r,o,a,n)}if(3===arguments.length){e=""+e,t=""+t;var l=this._nodes.get(e);if(!l)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(i,': could not find the "').concat(t,'" target node in the graph.'));return fe(!0,r,this.multi,o,l,t,n)}throw new U("Graph.".concat(i,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((function(e,n,r,o,i,a,l){return t(e,n,r,o,i,a,l)})),!!this[i].apply(this,e)};var l="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[l]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((function(e,n,r,o,i,a,l){return!t(e,n,r,o,i,a,l)})),!this[i].apply(this,e)}}(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i=n.slice(0,-1)+"Entries";e.prototype[i]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return I.empty();if(!arguments.length)return ue(this,r);if(1===arguments.length){e=""+e;var n=this._nodes.get(e);if(!n)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" node in the graph.'));return he(r,o,n)}if(2===arguments.length){e=""+e,t=""+t;var a=this._nodes.get(e);if(!a)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(i,': could not find the "').concat(t,'" target node in the graph.'));return me(r,o,a,t)}throw new U("Graph.".concat(i,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(e,t)}))}(Ae),function(e){ye.forEach((function(t){(function(e,t){var n=t.name,r=t.type,o=t.direction;e.prototype[n]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];e=""+e;var t=this._nodes.get(e);if(void 0===t)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" node in the graph.'));return function(e,t,n){if("mixed"!==e){if("undirected"===e)return Object.keys(n.undirected);if("string"==typeof t)return Object.keys(n[t])}var r=[];return xe(!1,e,t,n,(function(e){r.push(e)})),r}("mixed"===r?this.type:r,o,t)}})(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t){if("mixed"===r||"mixed"===this.type||r===this.type){e=""+e;var n=this._nodes.get(e);if(void 0===n)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" node in the graph.'));xe(!1,"mixed"===r?this.type:r,o,n,t)}};var a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(e,t){var n=[];return this[i](e,(function(e,r){n.push(t(e,r))})),n};var l="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(e,t){var n=[];return this[i](e,(function(e,r){t(e,r)&&n.push(e)})),n};var s="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t,n){if(arguments.length<3)throw new U("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var r=n;return this[i](e,(function(e,n){r=t(r,e,n)})),r}}(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i=n[0].toUpperCase()+n.slice(1,-1),a="find"+i;e.prototype[a]=function(e,t){if("mixed"===r||"mixed"===this.type||r===this.type){e=""+e;var n=this._nodes.get(e);if(void 0===n)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));return xe(!0,"mixed"===r?this.type:r,o,n,t)}};var l="some"+i;e.prototype[l]=function(e,t){return!!this[a](e,t)};var s="every"+i;e.prototype[s]=function(e,t){return!this[a](e,(function(e,n){return!t(e,n)}))}}(e,t),function(e,t){var n=t.name,r=t.type,o=t.direction,i=n.slice(0,-1)+"Entries";e.prototype[i]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return I.empty();e=""+e;var t=this._nodes.get(e);if(void 0===t)throw new H("Graph.".concat(i,': could not find the "').concat(e,'" node in the graph.'));return function(e,t,n){if("mixed"!==e){if("undirected"===e)return we(null,n,n.undirected);if("string"==typeof t)return we(null,n,n[t])}var r=I.empty(),o=new ve;return"undirected"!==e&&("out"!==t&&(r=ee(r,we(o,n,n.in))),"in"!==t&&(r=ee(r,we(o,n,n.out)))),"directed"!==e&&(r=ee(r,we(o,n,n.undirected))),r}("mixed"===r?this.type:r,o,t)}}(e,t)}))}(Ae);var Le=function(e){function n(t){var n=s({type:"directed"},t);if("multi"in n&&!1!==n.multi)throw new U("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==n.type)throw new U('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ae),Ne=function(e){function n(t){var n=s({type:"undirected"},t);if("multi"in n&&!1!==n.multi)throw new U("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==n.type)throw new U('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ae),je=function(e){function n(t){var n=s({multi:!0},t);if("multi"in n&&!0!==n.multi)throw new U("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return e.call(this,n)||this}return t(n,e),n}(Ae),ze=function(e){function n(t){var n=s({type:"directed",multi:!0},t);if("multi"in n&&!0!==n.multi)throw new U("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==n.type)throw new U('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ae),Fe=function(e){function n(t){var n=s({type:"undirected",multi:!0},t);if("multi"in n&&!0!==n.multi)throw new U("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==n.type)throw new U('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ae);function Be(e){e.from=function(t,n){var r=s({},t.options,n),o=new e(r);return o.import(t),o}}return Be(Ae),Be(Le),Be(Ne),Be(je),Be(ze),Be(Fe),Ae.Graph=Ae,Ae.DirectedGraph=Le,Ae.UndirectedGraph=Ne,Ae.MultiGraph=je,Ae.MultiDirectedGraph=ze,Ae.MultiUndirectedGraph=Fe,Ae.InvalidArgumentsGraphError=U,Ae.NotFoundGraphError=H,Ae.UsageGraphError=V,Ae}()},3463:(e,t,n)=>{"use strict";var r=n(8570),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var o=h(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var l=s(t),g=s(n),m=0;m<a.length;++m){var y=a[m];if(!(i[y]||r&&r[y]||g&&g[y]||l&&l[y])){var v=p(n,y);try{c(t,y,v)}catch(e){}}}}return t}},7677:e=>{"use strict";e.exports=function(e,t,n,r,o,i,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},8357:(e,t,n)=>{var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype.toString,h=Math.max,f=Math.min,g=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return m(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,a,l,s,c,u=0,d=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,u=t,l=e.apply(r,n)}function x(e){return u=e,s=setTimeout(S,t),d?b(e):l}function w(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-u>=a}function S(){var e=g();if(w(e))return E(e);s=setTimeout(S,function(e){var n=t-(e-c);return p?f(n,a-(e-u)):n}(e))}function E(e){return s=void 0,v&&o?b(e):(o=i=void 0,l)}function O(){var e=g(),n=w(e);if(o=arguments,i=this,c=e,n){if(void 0===s)return x(c);if(p)return s=setTimeout(S,t),b(c)}return void 0===s&&(s=setTimeout(S,t)),l}return t=y(t)||0,m(n)&&(d=!!n.leading,a=(p="maxWait"in n)?h(y(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),O.cancel=function(){void 0!==s&&clearTimeout(s),u=0,o=c=i=s=void 0},O.flush=function(){return void 0===s?l:E(g())},O}(e,t,{leading:o,maxWait:t,trailing:i})}},9612:(e,t,n)=>{var r=n(2118),o=n(6909),i=n(8138),a=n(4174),l=n(7942);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},235:(e,t,n)=>{var r=n(3945),o=n(1846),i=n(8028),a=n(2344),l=n(4769);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},326:(e,t,n)=>{var r=n(8761)(n(7772),"Map");e.exports=r},6738:(e,t,n)=>{var r=n(2411),o=n(6417),i=n(6928),a=n(9493),l=n(4150);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},857:(e,t,n)=>{var r=n(7772).Symbol;e.exports=r},343:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},2218:(e,t,n)=>{var r=n(1225);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3324:(e,t,n)=>{var r=n(7297),o=n(3812);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},3366:(e,t,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},6840:(e,t,n)=>{var r=n(1049),o=n(7394),i=n(9259),a=n(7035),l=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,u=s.toString,d=c.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:l).test(a(e))}},1054:(e,t,n)=>{var r=n(857),o=n(343),i=n(6152),a=n(4795),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7297:(e,t,n)=>{var r=n(6152),o=n(1401),i=n(4452),a=n(6188);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},4019:(e,t,n)=>{var r=n(7772)["__core-js_shared__"];e.exports=r},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7937:(e,t,n)=>{var r=n(8304);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},8761:(e,t,n)=>{var r=n(6840),o=n(8109);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},8109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},2118:(e,t,n)=>{var r=n(9191);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},6909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8138:(e,t,n)=>{var r=n(9191),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},4174:(e,t,n)=>{var r=n(9191),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},7942:(e,t,n)=>{var r=n(9191);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},1401:(e,t,n)=>{var r=n(6152),o=n(4795),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},8304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7394:(e,t,n)=>{var r,o=n(4019),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},1846:(e,t,n)=>{var r=n(2218),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},8028:(e,t,n)=>{var r=n(2218);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},2344:(e,t,n)=>{var r=n(2218);e.exports=function(e){return r(this.__data__,e)>-1}},4769:(e,t,n)=>{var r=n(2218);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},2411:(e,t,n)=>{var r=n(9612),o=n(235),i=n(326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},6417:(e,t,n)=>{var r=n(7937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6928:(e,t,n)=>{var r=n(7937);e.exports=function(e){return r(this,e).get(e)}},9493:(e,t,n)=>{var r=n(7937);e.exports=function(e){return r(this,e).has(e)}},4150:(e,t,n)=>{var r=n(7937);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},7777:(e,t,n)=>{var r=n(733);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},9191:(e,t,n)=>{var r=n(8761)(Object,"create");e.exports=r},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},4452:(e,t,n)=>{var r=n(7777),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},3812:(e,t,n)=>{var r=n(4795);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2579:(e,t,n)=>{var r=n(3324);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},6152:e=>{var t=Array.isArray;e.exports=t},1049:(e,t,n)=>{var r=n(3366),o=n(9259);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6635:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",l="__lodash_placeholder__",s=32,c=128,u=1/0,d=9007199254740991,p=NaN,h=4294967295,f=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",x="[object Function]",w="[object GeneratorFunction]",S="[object Map]",E="[object Number]",O="[object Object]",C="[object Promise]",_="[object RegExp]",k="[object Set]",T="[object String]",P="[object Symbol]",M="[object WeakMap]",R="[object ArrayBuffer]",I="[object DataView]",D="[object Float32Array]",A="[object Float64Array]",L="[object Int8Array]",N="[object Int16Array]",j="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Y=RegExp(G.source),K=RegExp(q.source),$=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+|\s+$/g,oe=/^\s+/,ie=/\s+$/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+Oe+"]",_e="["+we+"]",ke="\\d+",Te="["+Se+"]",Pe="[^\\ud800-\\udfff"+Oe+ke+"\\u2700-\\u27bf"+Se+Ee+"]",Me="\\ud83c[\\udffb-\\udfff]",Re="[^\\ud800-\\udfff]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="["+Ee+"]",Le="(?:"+Te+"|"+Pe+")",Ne="(?:"+Ae+"|"+Pe+")",je="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Fe="(?:"+_e+"|"+Me+")?",Be="[\\ufe0e\\ufe0f]?",We=Be+Fe+"(?:\\u200d(?:"+[Re,Ie,De].join("|")+")"+Be+Fe+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Ie,De].join("|")+")"+We,He="(?:"+[Re+_e+"?",_e,Ie,De,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['’]","g"),Ge=RegExp(_e,"g"),qe=RegExp(Me+"(?="+Me+")|"+He+We,"g"),Ye=RegExp([Ae+"?"+Te+"+"+je+"(?="+[Ce,Ae,"$"].join("|")+")",Ne+"+"+ze+"(?="+[Ce,Ae+Le,"$"].join("|")+")",Ae+"?"+Le+"+"+je,Ae+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Ue].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+we+"\\ufe0e\\ufe0f]"),$e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xe=-1,Qe={};Qe[D]=Qe[A]=Qe[L]=Qe[N]=Qe[j]=Qe[z]=Qe[F]=Qe[B]=Qe[W]=!0,Qe[g]=Qe[m]=Qe[R]=Qe[y]=Qe[I]=Qe[v]=Qe[b]=Qe[x]=Qe[S]=Qe[E]=Qe[O]=Qe[_]=Qe[k]=Qe[T]=Qe[M]=!1;var Je={};Je[g]=Je[m]=Je[R]=Je[I]=Je[y]=Je[v]=Je[D]=Je[A]=Je[L]=Je[N]=Je[j]=Je[S]=Je[E]=Je[O]=Je[_]=Je[k]=Je[T]=Je[P]=Je[z]=Je[F]=Je[B]=Je[W]=!0,Je[b]=Je[x]=Je[M]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,lt=at&&e&&!e.nodeType&&e,st=lt&<.exports===at,ct=st&&rt.process,ut=function(){try{return lt&<.require&<.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),dt=ut&&ut.isArrayBuffer,pt=ut&&ut.isDate,ht=ut&&ut.isMap,ft=ut&&ut.isRegExp,gt=ut&&ut.isSet,mt=ut&&ut.isTypedArray;function yt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Et(e,t){return!(null==e||!e.length)&&Dt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function _t(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function kt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Tt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=jt("length");function Rt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function It(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Dt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):It(e,Lt,n)}function At(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Lt(e){return e!=e}function Nt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:p}function jt(e){return function(t){return null==t?o:t[e]}}function zt(e){return function(t){return null==e?o:e[t]}}function Ft(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Bt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Wt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ut(e){return function(t){return e(t)}}function Ht(e,t){return Ct(t,(function(t){return e[t]}))}function Vt(e,t){return e.has(t)}function Gt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Kt=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),$t=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Zt(e){return"\\"+et[e]}function Xt(e){return Ke.test(e)}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jt(e,t){return function(n){return e(t(n))}}function en(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==l||(e[n]=l,i[o++]=n)}return i}function tn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function rn(e){return Xt(e)?function(e){for(var t=qe.lastIndex=0;qe.test(e);)++t;return t}(e):Mt(e)}function on(e){return Xt(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.split("")}(e)}var an=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,r=(t=null==t?it:ln.defaults(it.Object(),t,ln.pick(it,Ze))).Array,we=t.Date,Se=t.Error,Ee=t.Function,Oe=t.Math,Ce=t.Object,_e=t.RegExp,ke=t.String,Te=t.TypeError,Pe=r.prototype,Me=Ee.prototype,Re=Ce.prototype,Ie=t["__core-js_shared__"],De=Me.toString,Ae=Re.hasOwnProperty,Le=0,Ne=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Re.toString,ze=De.call(Ce),Fe=it._,Be=_e("^"+De.call(Ae).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=st?t.Buffer:o,Ue=t.Symbol,He=t.Uint8Array,qe=We?We.allocUnsafe:o,Ke=Jt(Ce.getPrototypeOf,Ce),et=Ce.create,rt=Re.propertyIsEnumerable,ot=Pe.splice,at=Ue?Ue.isConcatSpreadable:o,lt=Ue?Ue.iterator:o,ct=Ue?Ue.toStringTag:o,ut=function(){try{var e=ci(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),Mt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,zt=we&&we.now!==it.Date.now&&we.now,sn=t.setTimeout!==it.setTimeout&&t.setTimeout,cn=Oe.ceil,un=Oe.floor,dn=Ce.getOwnPropertySymbols,pn=We?We.isBuffer:o,hn=t.isFinite,fn=Pe.join,gn=Jt(Ce.keys,Ce),mn=Oe.max,yn=Oe.min,vn=we.now,bn=t.parseInt,xn=Oe.random,wn=Pe.reverse,Sn=ci(t,"DataView"),En=ci(t,"Map"),On=ci(t,"Promise"),Cn=ci(t,"Set"),_n=ci(t,"WeakMap"),kn=ci(Ce,"create"),Tn=_n&&new _n,Pn={},Mn=zi(Sn),Rn=zi(En),In=zi(On),Dn=zi(Cn),An=zi(_n),Ln=Ue?Ue.prototype:o,Nn=Ln?Ln.valueOf:o,jn=Ln?Ln.toString:o;function zn(e){if(tl(e)&&!Va(e)&&!(e instanceof Un)){if(e instanceof Wn)return e;if(Ae.call(e,"__wrapped__"))return Fi(e)}return new Wn(e)}var Fn=function(){function e(){}return function(t){if(!el(t))return{};if(et)return et(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Kn(e,t){var n=Va(e),r=!n&&Ha(e),o=!n&&!r&&Ka(e),i=!n&&!r&&!o&&cl(e),a=n||r||o||i,l=a?Wt(e.length,ke):[],s=l.length;for(var c in e)!t&&!Ae.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mi(c,s))||l.push(c);return l}function $n(e){var t=e.length;return t?e[Gr(0,t-1)]:o}function Zn(e,t){return Di(ko(e),ir(t,0,e.length))}function Xn(e){return Di(ko(e))}function Qn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Jn(e,t,n){var r=e[t];Ae.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function tr(e,t,n,r){return ur(e,(function(e,o,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&To(t,Rl(t),e)}function rr(e,t,n){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),l=null==e;++n<i;)a[n]=l?o:_l(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var l,s=1&t,c=2&t,u=4&t;if(n&&(l=i?n(e,r,i,a):n(e)),l!==o)return l;if(!el(e))return e;var d=Va(e);if(d){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return ko(e,l)}else{var p=pi(e),h=p==x||p==w;if(Ka(e))return wo(e,s);if(p==O||p==g||h&&!i){if(l=c||h?{}:fi(e),!s)return c?function(e,t){return To(e,di(e),t)}(e,function(e,t){return e&&To(t,Il(t),e)}(l,e)):function(e,t){return To(e,ui(e),t)}(e,nr(l,e))}else{if(!Je[p])return i?e:{};l=function(e,t,n){var r,o=e.constructor;switch(t){case R:return So(e);case y:case v:return new o(+e);case I:return function(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case A:case L:case N:case j:case z:case F:case B:case W:return Eo(e,n);case S:return new o;case E:case T:return new o(e);case _:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new o;case P:return r=e,Nn?Ce(Nn.call(r)):{}}}(e,p,s)}}a||(a=new Yn);var f=a.get(e);if(f)return f;a.set(e,l),al(e)?e.forEach((function(r){l.add(ar(r,t,n,r,e,a))})):nl(e)&&e.forEach((function(r,o){l.set(o,ar(r,t,n,o,e,a))}));var m=d?o:(u?c?ni:ti:c?Il:Rl)(e);return bt(m||e,(function(r,o){m&&(r=e[o=r]),Jn(l,o,ar(r,t,n,o,e,a))})),l}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],a=t[i],l=e[i];if(l===o&&!(i in e)||!a(l))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Te(i);return Pi((function(){e.apply(o,n)}),t)}function cr(e,t,n,r){var o=-1,i=Et,a=!0,l=e.length,s=[],c=t.length;if(!l)return s;n&&(t=Ct(t,Ut(n))),r?(i=Ot,a=!1):t.length>=200&&(i=Vt,a=!1,t=new qn(t));e:for(;++o<l;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var p=c;p--;)if(t[p]===d)continue e;s.push(u)}else i(t,d,r)||s.push(u)}return s}zn.templateSettings={escape:$,evaluate:Z,interpolate:X,variable:"",imports:{_:zn}},zn.prototype=Bn.prototype,zn.prototype.constructor=zn,Wn.prototype=Fn(Bn.prototype),Wn.prototype.constructor=Wn,Un.prototype=Fn(Bn.prototype),Un.prototype.constructor=Un,Hn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===a?o:n}return Ae.call(t,e)?t[e]:o},Hn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==o:Ae.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===o?a:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():ot.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},Vn.prototype.has=function(e){return er(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Vn),string:new Hn}},Gn.prototype.delete=function(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return li(this,e).get(e)},Gn.prototype.has=function(e){return li(this,e).has(e)},Gn.prototype.set=function(e,t){var n=li(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var ur=Ro(vr),dr=Ro(br,!0);function pr(e,t){var n=!0;return ur(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],l=t(a);if(null!=l&&(s===o?l==l&&!sl(l):n(l,s)))var s=l,c=a}return c}function fr(e,t){var n=[];return ur(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var l=e[i];t>0&&n(l)?t>1?gr(l,t-1,n,r,o):_t(o,l):r||(o[o.length]=l)}return o}var mr=Io(),yr=Io(!0);function vr(e,t){return e&&mr(e,t,Rl)}function br(e,t){return e&&yr(e,t,Rl)}function xr(e,t){return St(t,(function(t){return Xa(e[t])}))}function wr(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&n<r;)e=e[ji(t[n++])];return n&&n==r?e:o}function Sr(e,t,n){var r=t(e);return Va(e)?r:_t(r,n(e))}function Er(e){return null==e?e===o?"[object Undefined]":"[object Null]":ct&&ct in Ce(e)?function(e){var t=Ae.call(e,ct),n=e[ct];try{e[ct]=o;var r=!0}catch(e){}var i=je.call(e);return r&&(t?e[ct]=n:delete e[ct]),i}(e):function(e){return je.call(e)}(e)}function Or(e,t){return e>t}function Cr(e,t){return null!=e&&Ae.call(e,t)}function _r(e,t){return null!=e&&t in Ce(e)}function kr(e,t,n){for(var i=n?Ot:Et,a=e[0].length,l=e.length,s=l,c=r(l),u=1/0,d=[];s--;){var p=e[s];s&&t&&(p=Ct(p,Ut(t))),u=yn(p.length,u),c[s]=!n&&(t||a>=120&&p.length>=120)?new qn(s&&p):o}p=e[0];var h=-1,f=c[0];e:for(;++h<a&&d.length<u;){var g=p[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(f?Vt(f,m):i(d,m,n))){for(s=l;--s;){var y=c[s];if(!(y?Vt(y,m):i(e[s],m,n)))continue e}f&&f.push(m),d.push(g)}}return d}function Tr(e,t,n){var r=null==(e=Ci(e,t=yo(t,e)))?e:e[ji(Zi(t))];return null==r?o:yt(r,e,n)}function Pr(e){return tl(e)&&Er(e)==g}function Mr(e,t,n,r,i){return e===t||(null==e||null==t||!tl(e)&&!tl(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var l=Va(e),s=Va(t),c=l?m:pi(e),u=s?m:pi(t),d=(c=c==g?O:c)==O,p=(u=u==g?O:u)==O,h=c==u;if(h&&Ka(e)){if(!Ka(t))return!1;l=!0,d=!1}if(h&&!d)return a||(a=new Yn),l||cl(e)?Jo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!i(new He(e),new He(t)));case y:case v:case E:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case _:case T:return e==t+"";case S:var l=Qt;case k:var s=1&r;if(l||(l=tn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Jo(l(e),l(t),r,o,i,a);return a.delete(e),u;case P:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var f=d&&Ae.call(e,"__wrapped__"),x=p&&Ae.call(t,"__wrapped__");if(f||x){var w=f?e.value():e,C=x?t.value():t;return a||(a=new Yn),i(w,C,n,r,a)}}return!!h&&(a||(a=new Yn),function(e,t,n,r,i,a){var l=1&n,s=ti(e),c=s.length;if(c!=ti(t).length&&!l)return!1;for(var u=c;u--;){var d=s[u];if(!(l?d in t:Ae.call(t,d)))return!1}var p=a.get(e);if(p&&a.get(t))return p==t;var h=!0;a.set(e,t),a.set(t,e);for(var f=l;++u<c;){var g=e[d=s[u]],m=t[d];if(r)var y=l?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(!(y===o?g===m||i(g,m,n,r,a):y)){h=!1;break}f||(f="constructor"==d)}if(h&&!f){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Mr,i))}function Rr(e,t,n,r){var i=n.length,a=i,l=!r;if(null==e)return!a;for(e=Ce(e);i--;){var s=n[i];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],u=e[c],d=s[1];if(l&&s[2]){if(u===o&&!(c in e))return!1}else{var p=new Yn;if(r)var h=r(u,d,c,e,t,p);if(!(h===o?Mr(d,u,3,r,p):h))return!1}}return!0}function Ir(e){return!(!el(e)||(t=e,Ne&&Ne in t))&&(Xa(e)?Be:ge).test(zi(e));var t}function Dr(e){return"function"==typeof e?e:null==e?rs:"object"==typeof e?Va(e)?zr(e[0],e[1]):jr(e):ps(e)}function Ar(e){if(!wi(e))return gn(e);var t=[];for(var n in Ce(e))Ae.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Nr(e,t){var n=-1,o=qa(e)?r(e.length):[];return ur(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function jr(e){var t=si(e);return 1==t.length&&t[0][2]?Ei(t[0][0],t[0][1]):function(n){return n===e||Rr(n,e,t)}}function zr(e,t){return vi(e)&&Si(t)?Ei(ji(e),t):function(n){var r=_l(n,e);return r===o&&r===t?kl(n,e):Mr(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&mr(t,(function(a,l){if(i||(i=new Yn),el(a))!function(e,t,n,r,i,a,l){var s=ki(e,n),c=ki(t,n),u=l.get(c);if(u)Qn(e,n,u);else{var d=a?a(s,c,n+"",e,t,l):o,p=d===o;if(p){var h=Va(c),f=!h&&Ka(c),g=!h&&!f&&cl(c);d=c,h||f||g?Va(s)?d=s:Ya(s)?d=ko(s):f?(p=!1,d=wo(c,!0)):g?(p=!1,d=Eo(c,!0)):d=[]:ol(c)||Ha(c)?(d=s,Ha(s)?d=yl(s):el(s)&&!Xa(s)||(d=fi(c))):p=!1}p&&(l.set(c,d),i(d,c,r,a,l),l.delete(c)),Qn(e,n,d)}}(e,t,l,n,Fr,r,i);else{var s=r?r(ki(e,l),a,l+"",e,t,i):o;s===o&&(s=a),Qn(e,l,s)}}),Il)}function Br(e,t){var n=e.length;if(n)return mi(t+=t<0?n:0,n)?e[t]:o}function Wr(e,t,n){var r=-1;t=Ct(t.length?t:[rs],Ut(ai()));var o=Nr(e,(function(e,n,o){var i=Ct(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,l=n.length;++r<a;){var s=Oo(o[r],i[r]);if(s)return r>=l?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],l=wr(e,a);n(l,a)&&Zr(i,yo(a,e),l)}return i}function Hr(e,t,n,r){var o=r?At:Dt,i=-1,a=t.length,l=e;for(e===t&&(t=ko(t)),n&&(l=Ct(e,Ut(n)));++i<a;)for(var s=0,c=t[i],u=n?n(c):c;(s=o(l,u,s,r))>-1;)l!==e&&ot.call(l,s,1),ot.call(e,s,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?ot.call(e,o,1):so(e,o)}}return e}function Gr(e,t){return e+un(xn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=un(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Mi(Oi(e,t,rs),e+"")}function Kr(e){return $n(Bl(e))}function $r(e,t){var n=Bl(e);return Di(n,ir(t,0,n.length))}function Zr(e,t,n,r){if(!el(e))return e;for(var i=-1,a=(t=yo(t,e)).length,l=a-1,s=e;null!=s&&++i<a;){var c=ji(t[i]),u=n;if(i!=l){var d=s[c];(u=r?r(d,c,s):o)===o&&(u=el(d)?d:mi(t[i+1])?[]:{})}Jn(s,c,u),s=s[c]}return e}var Xr=Tn?function(e,t){return Tn.set(e,t),e}:rs,Qr=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:es(t),writable:!0})}:rs;function Jr(e){return Di(Bl(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return ur(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!sl(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,rs,n)}function ro(e,t,n,r){t=n(t);for(var i=0,a=null==e?0:e.length,l=t!=t,s=null===t,c=sl(t),u=t===o;i<a;){var d=un((i+a)/2),p=n(e[d]),h=p!==o,f=null===p,g=p==p,m=sl(p);if(l)var y=r||g;else y=u?g&&(r||h):s?g&&h&&(r||!f):c?g&&h&&!f&&(r||!m):!f&&!m&&(r?p<=t:p<t);y?i=d+1:a=d}return yn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!Ba(l,s)){var s=l;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:sl(e)?p:+e}function ao(e){if("string"==typeof e)return e;if(Va(e))return Ct(e,ao)+"";if(sl(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lo(e,t,n){var r=-1,o=Et,i=e.length,a=!0,l=[],s=l;if(n)a=!1,o=Ot;else if(i>=200){var c=t?null:Yo(e);if(c)return tn(c);a=!1,o=Vt,s=new qn}else s=t?[]:l;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var p=s.length;p--;)if(s[p]===d)continue e;t&&s.push(d),l.push(u)}else o(s,d,n)||(s!==l&&s.push(d),l.push(u))}return l}function so(e,t){return null==(e=Ci(e,t=yo(t,e)))||delete e[ji(Zi(t))]}function co(e,t,n,r){return Zr(e,t,n(wr(e,t)),r)}function uo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Un&&(n=n.value()),kt(t,(function(e,t){return t.func.apply(t.thisArg,_t([e],t.args))}),n)}function ho(e,t,n){var o=e.length;if(o<2)return o?lo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var l=e[i],s=-1;++s<o;)s!=i&&(a[i]=cr(a[i]||l,e[s],t,n));return lo(gr(a,1),t,n)}function fo(e,t,n){for(var r=-1,i=e.length,a=t.length,l={};++r<i;){var s=r<a?t[r]:o;n(l,e[r],s)}return l}function go(e){return Ya(e)?e:[]}function mo(e){return"function"==typeof e?e:rs}function yo(e,t){return Va(e)?e:vi(e,t)?[e]:Ni(vl(e))}var vo=Yr;function bo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var xo=Mt||function(e){return it.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function So(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Eo(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=sl(e),l=t!==o,s=null===t,c=t==t,u=sl(t);if(!s&&!u&&!a&&e>t||a&&l&&c&&!s&&!u||r&&l&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!l&&i||!c)return-1}return 0}function Co(e,t,n,o){for(var i=-1,a=e.length,l=n.length,s=-1,c=t.length,u=mn(a-l,0),d=r(c+u),p=!o;++s<c;)d[s]=t[s];for(;++i<l;)(p||i<a)&&(d[n[i]]=e[i]);for(;u--;)d[s++]=e[i++];return d}function _o(e,t,n,o){for(var i=-1,a=e.length,l=-1,s=n.length,c=-1,u=t.length,d=mn(a-s,0),p=r(d+u),h=!o;++i<d;)p[i]=e[i];for(var f=i;++c<u;)p[f+c]=t[c];for(;++l<s;)(h||i<a)&&(p[f+n[l]]=e[i++]);return p}function ko(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function To(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=r?r(n[s],e[s],s,n,e):o;c===o&&(c=e[s]),i?rr(n,s,c):Jn(n,s,c)}return n}function Po(e,t){return function(n,r){var o=Va(n)?vt:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function Mo(e){return Yr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,l=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,l&&yi(n[0],n[1],l)&&(a=i<3?o:a,i=1),t=Ce(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}function Ro(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ce(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(e){return function(t,n,r){for(var o=-1,i=Ce(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(!1===n(i[s],s,i))break}return t}}function Do(e){return function(t){var n=Xt(t=vl(t))?on(t):o,r=n?n[0]:t.charAt(0),i=n?bo(n,1).join(""):t.slice(1);return r[e]()+i}}function Ao(e){return function(t){return kt(Xl(Hl(t).replace(Ve,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return el(r)?r:n}}function No(e){return function(t,n,r){var i=Ce(t);if(!qa(t)){var a=ai(n,3);t=Rl(t),n=function(e){return a(i[e],e,i)}}var l=e(t,n,r);return l>-1?i[a?t[l]:l]:o}}function jo(e){return ei((function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var l=t[r];if("function"!=typeof l)throw new Te(i);if(a&&!s&&"wrapper"==oi(l))var s=new Wn([],!0)}for(r=s?r:n;++r<n;){var c=oi(l=t[r]),u="wrapper"==c?ri(l):o;s=u&&bi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[oi(u[0])].apply(s,u[3]):1==l.length&&bi(l)?s[c]():s.thru(l)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Va(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function zo(e,t,n,i,a,l,s,u,d,p){var h=t&c,f=1&t,g=2&t,m=24&t,y=512&t,v=g?o:Lo(e);return function o(){for(var c=arguments.length,b=r(c),x=c;x--;)b[x]=arguments[x];if(m)var w=ii(o),S=Yt(b,w);if(i&&(b=Co(b,i,a,m)),l&&(b=_o(b,l,s,m)),c-=S,m&&c<p){var E=en(b,w);return Go(e,t,zo,o.placeholder,n,b,E,u,d,p-c)}var O=f?n:this,C=g?O[e]:e;return c=b.length,u?b=_i(b,u):y&&c>1&&b.reverse(),h&&d<c&&(b.length=d),this&&this!==it&&this instanceof o&&(C=v||Lo(C)),C.apply(O,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Wo(e){return ei((function(t){return t=Ct(t,Ut(ai())),Yr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Uo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,cn(e/rn(t)));return Xt(t)?bo(on(r),0,e).join(""):r.slice(0,e)}function Ho(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=o),t=hl(t),n===o?(n=t,t=0):n=hl(n),function(e,t,n,o){for(var i=-1,a=mn(cn((t-e)/(n||1)),0),l=r(a);a--;)l[o?a:++i]=e,e+=n;return l}(t,n,i=i===o?t<n?1:-1:hl(i),e)}}function Vo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ml(t),n=ml(n)),e(t,n)}}function Go(e,t,n,r,i,a,l,c,u,d){var p=8&t;t|=p?s:64,4&(t&=~(p?64:s))||(t&=-4);var h=[e,t,i,p?a:o,p?l:o,p?o:a,p?o:l,c,u,d],f=n.apply(o,h);return bi(e)&&Ti(f,h),f.placeholder=r,Ri(f,e,t)}function qo(e){var t=Oe[e];return function(e,n){if(e=ml(e),(n=null==n?0:yn(fl(n),292))&&hn(e)){var r=(vl(e)+"e").split("e");return+((r=(vl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yo=Cn&&1/tn(new Cn([,-0]))[1]==u?function(e){return new Cn(e)}:ss;function Ko(e){return function(t){var n=pi(t);return n==S?Qt(t):n==k?nn(t):function(e,t){return Ct(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $o(e,t,n,a,u,d,p,h){var f=2&t;if(!f&&"function"!=typeof e)throw new Te(i);var g=a?a.length:0;if(g||(t&=-97,a=u=o),p=p===o?p:mn(fl(p),0),h=h===o?h:fl(h),g-=u?u.length:0,64&t){var m=a,y=u;a=u=o}var v=f?o:ri(e),b=[e,t,n,a,u,m,y,d,p,h];if(v&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var u=e[3];e[3]=u?Co(u,s,t[4]):s,e[4]=u?en(e[3],l):t[4]}(s=t[5])&&(u=e[5],e[5]=u?_o(u,s,t[6]):s,e[6]=u?en(e[5],l):t[6]),(s=t[7])&&(e[7]=s),r&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,v),e=b[0],t=b[1],n=b[2],a=b[3],u=b[4],!(h=b[9]=b[9]===o?f?0:e.length:mn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,n){var i=Lo(e);return function a(){for(var l=arguments.length,s=r(l),c=l,u=ii(a);c--;)s[c]=arguments[c];var d=l<3&&s[0]!==u&&s[l-1]!==u?[]:en(s,u);return(l-=d.length)<n?Go(e,t,zo,a.placeholder,o,s,d,o,o,n-l):yt(this&&this!==it&&this instanceof a?i:e,this,s)}}(e,t,h):t!=s&&33!=t||u.length?zo.apply(o,b):function(e,t,n,o){var i=1&t,a=Lo(e);return function t(){for(var l=-1,s=arguments.length,c=-1,u=o.length,d=r(u+s),p=this&&this!==it&&this instanceof t?a:e;++c<u;)d[c]=o[c];for(;s--;)d[c++]=arguments[++l];return yt(p,i?n:this,d)}}(e,t,n,a);else var x=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ri((v?Xr:Ti)(x,b),e,t)}function Zo(e,t,n,r){return e===o||Ba(e,Re[n])&&!Ae.call(r,n)?t:e}function Xo(e,t,n,r,i,a){return el(e)&&el(t)&&(a.set(t,e),Fr(e,t,o,Xo,a),a.delete(t)),e}function Qo(e){return ol(e)?o:e}function Jo(e,t,n,r,i,a){var l=1&n,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,p=!0,h=2&n?new qn:o;for(a.set(e,t),a.set(t,e);++d<s;){var f=e[d],g=t[d];if(r)var m=l?r(g,f,d,t,e,a):r(f,g,d,e,t,a);if(m!==o){if(m)continue;p=!1;break}if(h){if(!Pt(t,(function(e,t){if(!Vt(h,t)&&(f===e||i(f,e,n,r,a)))return h.push(t)}))){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ei(e){return Mi(Oi(e,o,Gi),e+"")}function ti(e){return Sr(e,Rl,ui)}function ni(e){return Sr(e,Il,di)}var ri=Tn?function(e){return Tn.get(e)}:ss;function oi(e){for(var t=e.name+"",n=Pn[t],r=Ae.call(Pn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Ae.call(zn,"placeholder")?zn:e).placeholder}function ai(){var e=zn.iteratee||os;return e=e===os?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Rl(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Si(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Ir(n)?n:o}var ui=dn?function(e){return null==e?[]:(e=Ce(e),St(dn(e),(function(t){return rt.call(e,t)})))}:gs,di=dn?function(e){for(var t=[];e;)_t(t,ui(e)),e=Ke(e);return t}:gs,pi=Er;function hi(e,t,n){for(var r=-1,o=(t=yo(t,e)).length,i=!1;++r<o;){var a=ji(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ja(o)&&mi(a,o)&&(Va(e)||Ha(e))}function fi(e){return"function"!=typeof e.constructor||wi(e)?{}:Fn(Ke(e))}function gi(e){return Va(e)||Ha(e)||!!(at&&e&&e[at])}function mi(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!el(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&mi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function vi(e,t){if(Va(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!sl(e))||J.test(e)||!Q.test(e)||null!=t&&e in Ce(t)}function bi(e){var t=oi(e),n=zn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Sn&&pi(new Sn(new ArrayBuffer(1)))!=I||En&&pi(new En)!=S||On&&pi(On.resolve())!=C||Cn&&pi(new Cn)!=k||_n&&pi(new _n)!=M)&&(pi=function(e){var t=Er(e),n=t==O?e.constructor:o,r=n?zi(n):"";if(r)switch(r){case Mn:return I;case Rn:return S;case In:return C;case Dn:return k;case An:return M}return t});var xi=Ie?Xa:ms;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Si(e){return e==e&&!el(e)}function Ei(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ce(n))}}function Oi(e,t,n){return t=mn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=mn(o.length-t,0),l=r(a);++i<a;)l[i]=o[t+i];i=-1;for(var s=r(t+1);++i<t;)s[i]=o[i];return s[t]=n(l),yt(e,this,s)}}function Ci(e,t){return t.length<2?e:wr(e,eo(t,0,-1))}function _i(e,t){for(var n=e.length,r=yn(t.length,n),i=ko(e);r--;){var a=t[r];e[r]=mi(a,n)?i[a]:o}return e}function ki(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ti=Ii(Xr),Pi=sn||function(e,t){return it.setTimeout(e,t)},Mi=Ii(Qr);function Ri(e,t,n){var r=t+"";return Mi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(f,(function(n){var r="_."+n[0];t&n[1]&&!Et(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Di(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Gr(n,i),l=e[a];e[a]=e[n],e[n]=l}return e.length=t,e}var Ai,Li,Ni=(Ai=Aa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Li.size&&Li.clear(),e})),Li=Ai.cache,Ai);function ji(e){if("string"==typeof e||sl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function zi(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Un)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=ko(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Yr((function(e,t){return Ya(e)?cr(e,gr(t,1,Ya,!0)):[]})),Wi=Yr((function(e,t){var n=Zi(t);return Ya(n)&&(n=o),Ya(e)?cr(e,gr(t,1,Ya,!0),ai(n,2)):[]})),Ui=Yr((function(e,t){var n=Zi(t);return Ya(n)&&(n=o),Ya(e)?cr(e,gr(t,1,Ya,!0),o,n):[]}));function Hi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fl(n);return o<0&&(o=mn(r+o,0)),It(e,ai(t,3),o)}function Vi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=fl(n),i=n<0?mn(r+i,0):yn(i,r-1)),It(e,ai(t,3),i,!0)}function Gi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Yi=Yr((function(e){var t=Ct(e,go);return t.length&&t[0]===e[0]?kr(t):[]})),Ki=Yr((function(e){var t=Zi(e),n=Ct(e,go);return t===Zi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?kr(n,ai(t,2)):[]})),$i=Yr((function(e){var t=Zi(e),n=Ct(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?kr(n,o,t):[]}));function Zi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Xi=Yr(Qi);function Qi(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Ji=ei((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Vr(e,Ct(t,(function(e){return mi(e,n)?+e:e})).sort(Oo)),r}));function ea(e){return null==e?e:wn.call(e)}var ta=Yr((function(e){return lo(gr(e,1,Ya,!0))})),na=Yr((function(e){var t=Zi(e);return Ya(t)&&(t=o),lo(gr(e,1,Ya,!0),ai(t,2))})),ra=Yr((function(e){var t=Zi(e);return t="function"==typeof t?t:o,lo(gr(e,1,Ya,!0),o,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Ya(e))return t=mn(e.length,t),!0})),Wt(t,(function(t){return Ct(e,jt(t))}))}function ia(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:Ct(n,(function(e){return yt(t,o,e)}))}var aa=Yr((function(e,t){return Ya(e)?cr(e,t):[]})),la=Yr((function(e){return ho(St(e,Ya))})),sa=Yr((function(e){var t=Zi(e);return Ya(t)&&(t=o),ho(St(e,Ya),ai(t,2))})),ca=Yr((function(e){var t=Zi(e);return t="function"==typeof t?t:o,ho(St(e,Ya),o,t)})),ua=Yr(oa),da=Yr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ia(e,n)}));function pa(e){var t=zn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var fa=ei((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&mi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ga=Po((function(e,t,n){Ae.call(e,n)?++e[n]:rr(e,n,1)})),ma=No(Hi),ya=No(Vi);function va(e,t){return(Va(e)?bt:ur)(e,ai(t,3))}function ba(e,t){return(Va(e)?xt:dr)(e,ai(t,3))}var xa=Po((function(e,t,n){Ae.call(e,n)?e[n].push(t):rr(e,n,[t])})),wa=Yr((function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return ur(e,(function(e){a[++o]=i?yt(t,e,n):Tr(e,t,n)})),a})),Sa=Po((function(e,t,n){rr(e,n,t)}));function Ea(e,t){return(Va(e)?Ct:Nr)(e,ai(t,3))}var Oa=Po((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ca=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])})),_a=zt||function(){return it.Date.now()};function ka(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,$o(e,c,o,o,o,o,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=fl(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Pa=Yr((function(e,t,n){var r=1;if(n.length){var o=en(n,ii(Pa));r|=s}return $o(e,r,t,n,o)})),Ma=Yr((function(e,t,n){var r=3;if(n.length){var o=en(n,ii(Ma));r|=s}return $o(t,r,e,n,o)}));function Ra(e,t,n){var r,a,l,s,c,u,d=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new Te(i);function g(t){var n=r,i=a;return r=a=o,d=t,s=e.apply(i,n)}function m(e){return d=e,c=Pi(v,t),p?g(e):s}function y(e){var n=e-u;return u===o||n>=t||n<0||h&&e-d>=l}function v(){var e=_a();if(y(e))return b(e);c=Pi(v,function(e){var n=t-(e-u);return h?yn(n,l-(e-d)):n}(e))}function b(e){return c=o,f&&r?g(e):(r=a=o,s)}function x(){var e=_a(),n=y(e);if(r=arguments,a=this,u=e,n){if(c===o)return m(u);if(h)return xo(c),c=Pi(v,t),g(u)}return c===o&&(c=Pi(v,t)),s}return t=ml(t)||0,el(n)&&(p=!!n.leading,l=(h="maxWait"in n)?mn(ml(n.maxWait)||0,t):l,f="trailing"in n?!!n.trailing:f),x.cancel=function(){c!==o&&xo(c),d=0,r=u=a=c=o},x.flush=function(){return c===o?s:b(_a())},x}var Ia=Yr((function(e,t){return sr(e,1,t)})),Da=Yr((function(e,t,n){return sr(e,ml(t)||0,n)}));function Aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Aa.Cache||Gn),n}function La(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Aa.Cache=Gn;var Na=vo((function(e,t){var n=(t=1==t.length&&Va(t[0])?Ct(t[0],Ut(ai())):Ct(gr(t,1),Ut(ai()))).length;return Yr((function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return yt(e,this,r)}))})),ja=Yr((function(e,t){var n=en(t,ii(ja));return $o(e,s,o,t,n)})),za=Yr((function(e,t){var n=en(t,ii(za));return $o(e,64,o,t,n)})),Fa=ei((function(e,t){return $o(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var Wa=Vo(Or),Ua=Vo((function(e,t){return e>=t})),Ha=Pr(function(){return arguments}())?Pr:function(e){return tl(e)&&Ae.call(e,"callee")&&!rt.call(e,"callee")},Va=r.isArray,Ga=dt?Ut(dt):function(e){return tl(e)&&Er(e)==R};function qa(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Ya(e){return tl(e)&&qa(e)}var Ka=pn||ms,$a=pt?Ut(pt):function(e){return tl(e)&&Er(e)==v};function Za(e){if(!tl(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ol(e)}function Xa(e){if(!el(e))return!1;var t=Er(e);return t==x||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==fl(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function el(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function tl(e){return null!=e&&"object"==typeof e}var nl=ht?Ut(ht):function(e){return tl(e)&&pi(e)==S};function rl(e){return"number"==typeof e||tl(e)&&Er(e)==E}function ol(e){if(!tl(e)||Er(e)!=O)return!1;var t=Ke(e);if(null===t)return!0;var n=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==ze}var il=ft?Ut(ft):function(e){return tl(e)&&Er(e)==_},al=gt?Ut(gt):function(e){return tl(e)&&pi(e)==k};function ll(e){return"string"==typeof e||!Va(e)&&tl(e)&&Er(e)==T}function sl(e){return"symbol"==typeof e||tl(e)&&Er(e)==P}var cl=mt?Ut(mt):function(e){return tl(e)&&Ja(e.length)&&!!Qe[Er(e)]},ul=Vo(Lr),dl=Vo((function(e,t){return e<=t}));function pl(e){if(!e)return[];if(qa(e))return ll(e)?on(e):ko(e);if(lt&&e[lt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[lt]());var t=pi(e);return(t==S?Qt:t==k?tn:Bl)(e)}function hl(e){return e?(e=ml(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fl(e){var t=hl(e),n=t%1;return t==t?n?t-n:t:0}function gl(e){return e?ir(fl(e),0,h):0}function ml(e){if("number"==typeof e)return e;if(sl(e))return p;if(el(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=el(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(re,"");var n=fe.test(e);return n||me.test(e)?nt(e.slice(2),n?2:8):he.test(e)?p:+e}function yl(e){return To(e,Il(e))}function vl(e){return null==e?"":ao(e)}var bl=Mo((function(e,t){if(wi(t)||qa(t))To(t,Rl(t),e);else for(var n in t)Ae.call(t,n)&&Jn(e,n,t[n])})),xl=Mo((function(e,t){To(t,Il(t),e)})),wl=Mo((function(e,t,n,r){To(t,Il(t),e,r)})),Sl=Mo((function(e,t,n,r){To(t,Rl(t),e,r)})),El=ei(or),Ol=Yr((function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],l=Il(a),s=-1,c=l.length;++s<c;){var u=l[s],d=e[u];(d===o||Ba(d,Re[u])&&!Ae.call(e,u))&&(e[u]=a[u])}return e})),Cl=Yr((function(e){return e.push(o,Xo),yt(Al,o,e)}));function _l(e,t,n){var r=null==e?o:wr(e,t);return r===o?n:r}function kl(e,t){return null!=e&&hi(e,t,_r)}var Tl=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),es(rs)),Pl=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Ae.call(e,t)?e[t].push(n):e[t]=[n]}),ai),Ml=Yr(Tr);function Rl(e){return qa(e)?Kn(e):Ar(e)}function Il(e){return qa(e)?Kn(e,!0):function(e){if(!el(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=wi(e),n=[];for(var r in e)("constructor"!=r||!t&&Ae.call(e,r))&&n.push(r);return n}(e)}var Dl=Mo((function(e,t,n){Fr(e,t,n)})),Al=Mo((function(e,t,n,r){Fr(e,t,n,r)})),Ll=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ct(t,(function(t){return t=yo(t,e),r||(r=t.length>1),t})),To(e,ni(e),n),r&&(n=ar(n,7,Qo));for(var o=t.length;o--;)so(n,t[o]);return n})),Nl=ei((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return kl(e,n)}))}(e,t)}));function jl(e,t){if(null==e)return{};var n=Ct(ni(e),(function(e){return[e]}));return t=ai(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var zl=Ko(Rl),Fl=Ko(Il);function Bl(e){return null==e?[]:Ht(e,Rl(e))}var Wl=Ao((function(e,t,n){return t=t.toLowerCase(),e+(n?Ul(t):t)}));function Ul(e){return Zl(vl(e).toLowerCase())}function Hl(e){return(e=vl(e))&&e.replace(ve,Kt).replace(Ge,"")}var Vl=Ao((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gl=Ao((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ql=Do("toLowerCase"),Yl=Ao((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Kl=Ao((function(e,t,n){return e+(n?" ":"")+Zl(t)})),$l=Ao((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Zl=Do("toUpperCase");function Xl(e,t,n){return e=vl(e),(t=n?o:t)===o?function(e){return $e.test(e)}(e)?function(e){return e.match(Ye)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Ql=Yr((function(e,t){try{return yt(e,o,t)}catch(e){return Za(e)?e:new Se(e)}})),Jl=ei((function(e,t){return bt(t,(function(t){t=ji(t),rr(e,t,Pa(e[t],e))})),e}));function es(e){return function(){return e}}var ts=jo(),ns=jo(!0);function rs(e){return e}function os(e){return Dr("function"==typeof e?e:ar(e,1))}var is=Yr((function(e,t){return function(n){return Tr(n,e,t)}})),as=Yr((function(e,t){return function(n){return Tr(e,n,t)}}));function ls(e,t,n){var r=Rl(t),o=xr(t,r);null!=n||el(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=xr(t,Rl(t)));var i=!(el(n)&&"chain"in n&&!n.chain),a=Xa(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,_t([this.value()],arguments))})})),e}function ss(){}var cs=Wo(Ct),us=Wo(wt),ds=Wo(Pt);function ps(e){return vi(e)?jt(ji(e)):function(e){return function(t){return wr(t,e)}}(e)}var hs=Ho(),fs=Ho(!0);function gs(){return[]}function ms(){return!1}var ys,vs=Bo((function(e,t){return e+t}),0),bs=qo("ceil"),xs=Bo((function(e,t){return e/t}),1),ws=qo("floor"),Ss=Bo((function(e,t){return e*t}),1),Es=qo("round"),Os=Bo((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=fl(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=ka,zn.assign=bl,zn.assignIn=xl,zn.assignInWith=wl,zn.assignWith=Sl,zn.at=El,zn.before=Ta,zn.bind=Pa,zn.bindAll=Jl,zn.bindKey=Ma,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},zn.chain=pa,zn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:mn(fl(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,l=0,s=r(cn(i/t));a<i;)s[l++]=eo(e,a,a+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return _t(Va(n)?ko(n):[n],gr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?Ct(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var o=e[r];if(yt(o[0],this,n))return yt(o[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Rl(e);return function(n){return lr(n,e,t)}}(ar(e,1))},zn.constant=es,zn.countBy=ga,zn.create=function(e,t){var n=Fn(e);return null==t?n:nr(n,t)},zn.curry=function e(t,n,r){var i=$o(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.curryRight=function e(t,n,r){var i=$o(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.debounce=Ra,zn.defaults=Ol,zn.defaultsDeep=Cl,zn.defer=Ia,zn.delay=Da,zn.difference=Bi,zn.differenceBy=Wi,zn.differenceWith=Ui,zn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:fl(t))<0?0:t,r):[]},zn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:fl(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!0):[]},zn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=fl(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:fl(r))<0&&(r+=i),r=n>r?0:gl(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},zn.filter=function(e,t){return(Va(e)?St:fr)(e,ai(t,3))},zn.flatMap=function(e,t){return gr(Ea(e,t),1)},zn.flatMapDeep=function(e,t){return gr(Ea(e,t),u)},zn.flatMapDepth=function(e,t,n){return n=n===o?1:fl(n),gr(Ea(e,t),n)},zn.flatten=Gi,zn.flattenDeep=function(e){return null!=e&&e.length?gr(e,u):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:fl(t)):[]},zn.flip=function(e){return $o(e,512)},zn.flow=ts,zn.flowRight=ns,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Rl(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Il(e))},zn.groupBy=xa,zn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},zn.intersection=Yi,zn.intersectionBy=Ki,zn.intersectionWith=$i,zn.invert=Tl,zn.invertBy=Pl,zn.invokeMap=wa,zn.iteratee=os,zn.keyBy=Sa,zn.keys=Rl,zn.keysIn=Il,zn.map=Ea,zn.mapKeys=function(e,t){var n={};return t=ai(t,3),vr(e,(function(e,r,o){rr(n,t(e,r,o),e)})),n},zn.mapValues=function(e,t){var n={};return t=ai(t,3),vr(e,(function(e,r,o){rr(n,r,t(e,r,o))})),n},zn.matches=function(e){return jr(ar(e,1))},zn.matchesProperty=function(e,t){return zr(e,ar(t,1))},zn.memoize=Aa,zn.merge=Dl,zn.mergeWith=Al,zn.method=is,zn.methodOf=as,zn.mixin=ls,zn.negate=La,zn.nthArg=function(e){return e=fl(e),Yr((function(t){return Br(t,e)}))},zn.omit=Ll,zn.omitBy=function(e,t){return jl(e,La(ai(t)))},zn.once=function(e){return Ta(2,e)},zn.orderBy=function(e,t,n,r){return null==e?[]:(Va(t)||(t=null==t?[]:[t]),Va(n=r?o:n)||(n=null==n?[]:[n]),Wr(e,t,n))},zn.over=cs,zn.overArgs=Na,zn.overEvery=us,zn.overSome=ds,zn.partial=ja,zn.partialRight=za,zn.partition=Oa,zn.pick=Nl,zn.pickBy=jl,zn.property=ps,zn.propertyOf=function(e){return function(t){return null==e?o:wr(e,t)}},zn.pull=Xi,zn.pullAll=Qi,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,ai(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,o,n):e},zn.pullAt=Ji,zn.range=hs,zn.rangeRight=fs,zn.rearg=Fa,zn.reject=function(e,t){return(Va(e)?St:fr)(e,La(ai(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Vr(e,o),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Yr(e,t=t===o?t:fl(t))},zn.reverse=ea,zn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:fl(t),(Va(e)?Zn:$r)(e,t)},zn.set=function(e,t,n){return null==e?e:Zr(e,t,n)},zn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Zr(e,t,n,r)},zn.shuffle=function(e){return(Va(e)?Xn:Jr)(e)},zn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:fl(t),n=n===o?r:fl(n)),eo(e,t,n)):[]},zn.sortBy=Ca,zn.sortedUniq=function(e){return e&&e.length?oo(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=o),(n=n===o?h:n>>>0)?(e=vl(e))&&("string"==typeof t||null!=t&&!il(t))&&!(t=ao(t))&&Xt(e)?bo(on(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:mn(fl(t),0),Yr((function(n){var r=n[t],o=bo(n,0,t);return r&&_t(o,r),yt(e,this,o)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:fl(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:fl(t)))<0?0:t,r):[]},zn.takeRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?uo(e,ai(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Te(i);return el(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ra(e,t,{leading:r,maxWait:t,trailing:o})},zn.thru=ha,zn.toArray=pl,zn.toPairs=zl,zn.toPairsIn=Fl,zn.toPath=function(e){return Va(e)?Ct(e,ji):sl(e)?[e]:ko(Ni(vl(e)))},zn.toPlainObject=yl,zn.transform=function(e,t,n){var r=Va(e),o=r||Ka(e)||cl(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:el(e)&&Xa(i)?Fn(Ke(e)):{}}return(o?bt:vr)(e,(function(e,r,o){return t(n,e,r,o)})),n},zn.unary=function(e){return ka(e,1)},zn.union=ta,zn.unionBy=na,zn.unionWith=ra,zn.uniq=function(e){return e&&e.length?lo(e):[]},zn.uniqBy=function(e,t){return e&&e.length?lo(e,ai(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?lo(e,o,t):[]},zn.unset=function(e,t){return null==e||so(e,t)},zn.unzip=oa,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},zn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,mo(n),r)},zn.values=Bl,zn.valuesIn=function(e){return null==e?[]:Ht(e,Il(e))},zn.without=aa,zn.words=Xl,zn.wrap=function(e,t){return ja(mo(t),e)},zn.xor=la,zn.xorBy=sa,zn.xorWith=ca,zn.zip=ua,zn.zipObject=function(e,t){return fo(e||[],t||[],Jn)},zn.zipObjectDeep=function(e,t){return fo(e||[],t||[],Zr)},zn.zipWith=da,zn.entries=zl,zn.entriesIn=Fl,zn.extend=xl,zn.extendWith=wl,ls(zn,zn),zn.add=vs,zn.attempt=Ql,zn.camelCase=Wl,zn.capitalize=Ul,zn.ceil=bs,zn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ml(n))==n?n:0),t!==o&&(t=(t=ml(t))==t?t:0),ir(ml(e),t,n)},zn.clone=function(e){return ar(e,4)},zn.cloneDeep=function(e){return ar(e,5)},zn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},zn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Rl(t))},zn.deburr=Hl,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=xs,zn.endsWith=function(e,t,n){e=vl(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(fl(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},zn.eq=Ba,zn.escape=function(e){return(e=vl(e))&&K.test(e)?e.replace(q,$t):e},zn.escapeRegExp=function(e){return(e=vl(e))&&ne.test(e)?e.replace(te,"\\$&"):e},zn.every=function(e,t,n){var r=Va(e)?wt:pr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},zn.find=ma,zn.findIndex=Hi,zn.findKey=function(e,t){return Rt(e,ai(t,3),vr)},zn.findLast=ya,zn.findLastIndex=Vi,zn.findLastKey=function(e,t){return Rt(e,ai(t,3),br)},zn.floor=ws,zn.forEach=va,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:mr(e,ai(t,3),Il)},zn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Il)},zn.forOwn=function(e,t){return e&&vr(e,ai(t,3))},zn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},zn.get=_l,zn.gt=Wa,zn.gte=Ua,zn.has=function(e,t){return null!=e&&hi(e,t,Cr)},zn.hasIn=kl,zn.head=qi,zn.identity=rs,zn.includes=function(e,t,n,r){e=qa(e)?e:Bl(e),n=n&&!r?fl(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),ll(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Dt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fl(n);return o<0&&(o=mn(r+o,0)),Dt(e,t,o)},zn.inRange=function(e,t,n){return t=hl(t),n===o?(n=t,t=0):n=hl(n),function(e,t,n){return e>=yn(t,n)&&e<mn(t,n)}(e=ml(e),t,n)},zn.invoke=Ml,zn.isArguments=Ha,zn.isArray=Va,zn.isArrayBuffer=Ga,zn.isArrayLike=qa,zn.isArrayLikeObject=Ya,zn.isBoolean=function(e){return!0===e||!1===e||tl(e)&&Er(e)==y},zn.isBuffer=Ka,zn.isDate=$a,zn.isElement=function(e){return tl(e)&&1===e.nodeType&&!ol(e)},zn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Va(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||cl(e)||Ha(e)))return!e.length;var t=pi(e);if(t==S||t==k)return!e.size;if(wi(e))return!Ar(e).length;for(var n in e)if(Ae.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Mr(e,t)},zn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Mr(e,t,o,n):!!r},zn.isError=Za,zn.isFinite=function(e){return"number"==typeof e&&hn(e)},zn.isFunction=Xa,zn.isInteger=Qa,zn.isLength=Ja,zn.isMap=nl,zn.isMatch=function(e,t){return e===t||Rr(e,t,si(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Rr(e,t,si(t),n)},zn.isNaN=function(e){return rl(e)&&e!=+e},zn.isNative=function(e){if(xi(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=rl,zn.isObject=el,zn.isObjectLike=tl,zn.isPlainObject=ol,zn.isRegExp=il,zn.isSafeInteger=function(e){return Qa(e)&&e>=-9007199254740991&&e<=d},zn.isSet=al,zn.isString=ll,zn.isSymbol=sl,zn.isTypedArray=cl,zn.isUndefined=function(e){return e===o},zn.isWeakMap=function(e){return tl(e)&&pi(e)==M},zn.isWeakSet=function(e){return tl(e)&&"[object WeakSet]"==Er(e)},zn.join=function(e,t){return null==e?"":fn.call(e,t)},zn.kebabCase=Vl,zn.last=Zi,zn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=fl(n))<0?mn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):It(e,Lt,i,!0)},zn.lowerCase=Gl,zn.lowerFirst=ql,zn.lt=ul,zn.lte=dl,zn.max=function(e){return e&&e.length?hr(e,rs,Or):o},zn.maxBy=function(e,t){return e&&e.length?hr(e,ai(t,2),Or):o},zn.mean=function(e){return Nt(e,rs)},zn.meanBy=function(e,t){return Nt(e,ai(t,2))},zn.min=function(e){return e&&e.length?hr(e,rs,Lr):o},zn.minBy=function(e,t){return e&&e.length?hr(e,ai(t,2),Lr):o},zn.stubArray=gs,zn.stubFalse=ms,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Ss,zn.nth=function(e,t){return e&&e.length?Br(e,fl(t)):o},zn.noConflict=function(){return it._===this&&(it._=Fe),this},zn.noop=ss,zn.now=_a,zn.pad=function(e,t,n){e=vl(e);var r=(t=fl(t))?rn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Uo(un(o),n)+e+Uo(cn(o),n)},zn.padEnd=function(e,t,n){e=vl(e);var r=(t=fl(t))?rn(e):0;return t&&r<t?e+Uo(t-r,n):e},zn.padStart=function(e,t,n){e=vl(e);var r=(t=fl(t))?rn(e):0;return t&&r<t?Uo(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(vl(e).replace(oe,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hl(e),t===o?(t=e,e=0):t=hl(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=xn();return yn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Gr(e,t)},zn.reduce=function(e,t,n){var r=Va(e)?kt:Ft,o=arguments.length<3;return r(e,ai(t,4),n,o,ur)},zn.reduceRight=function(e,t,n){var r=Va(e)?Tt:Ft,o=arguments.length<3;return r(e,ai(t,4),n,o,dr)},zn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:fl(t),qr(vl(e),t)},zn.replace=function(){var e=arguments,t=vl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[ji(t[r])];a===o&&(r=i,a=n),e=Xa(a)?a.call(e):a}return e},zn.round=Es,zn.runInContext=e,zn.sample=function(e){return(Va(e)?$n:Kr)(e)},zn.size=function(e){if(null==e)return 0;if(qa(e))return ll(e)?rn(e):e.length;var t=pi(e);return t==S||t==k?e.size:Ar(e).length},zn.snakeCase=Yl,zn.some=function(e,t,n){var r=Va(e)?Pt:to;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},zn.sortedIndex=function(e,t){return no(e,t)},zn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&Ba(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return no(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},zn.startCase=Kl,zn.startsWith=function(e,t,n){return e=vl(e),n=null==n?0:ir(fl(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},zn.subtract=Os,zn.sum=function(e){return e&&e.length?Bt(e,rs):0},zn.sumBy=function(e,t){return e&&e.length?Bt(e,ai(t,2)):0},zn.template=function(e,t,n){var r=zn.templateSettings;n&&yi(e,t,n)&&(t=o),e=vl(e),t=wl({},t,r,Zo);var i,a,l=wl({},t.imports,r.imports,Zo),s=Rl(l),c=Ht(l,s),u=0,d=t.interpolate||be,p="__p += '",h=_e((t.escape||be).source+"|"+d.source+"|"+(d===X?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),f="//# sourceURL="+(Ae.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Xe+"]")+"\n";e.replace(h,(function(t,n,r,o,l,s){return r||(r=o),p+=e.slice(u,s).replace(xe,Zt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),l&&(a=!0,p+="';\n"+l+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=s+t.length,t})),p+="';\n";var g=Ae.call(t,"variable")&&t.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(U,""):p).replace(H,"$1").replace(V,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Ql((function(){return Ee(s,f+"return "+p).apply(o,c)}));if(m.source=p,Za(m))throw m;return m},zn.times=function(e,t){if((e=fl(e))<1||e>d)return[];var n=h,r=yn(e,h);t=ai(t),e-=h;for(var o=Wt(r,t);++n<e;)t(n);return o},zn.toFinite=hl,zn.toInteger=fl,zn.toLength=gl,zn.toLower=function(e){return vl(e).toLowerCase()},zn.toNumber=ml,zn.toSafeInteger=function(e){return e?ir(fl(e),-9007199254740991,d):0===e?e:0},zn.toString=vl,zn.toUpper=function(e){return vl(e).toUpperCase()},zn.trim=function(e,t,n){if((e=vl(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=on(e),i=on(t);return bo(r,Gt(r,i),qt(r,i)+1).join("")},zn.trimEnd=function(e,t,n){if((e=vl(e))&&(n||t===o))return e.replace(ie,"");if(!e||!(t=ao(t)))return e;var r=on(e);return bo(r,0,qt(r,on(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=vl(e))&&(n||t===o))return e.replace(oe,"");if(!e||!(t=ao(t)))return e;var r=on(e);return bo(r,Gt(r,on(t))).join("")},zn.truncate=function(e,t){var n=30,r="...";if(el(t)){var i="separator"in t?t.separator:i;n="length"in t?fl(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=vl(e)).length;if(Xt(e)){var l=on(e);a=l.length}if(n>=a)return e;var s=n-rn(r);if(s<1)return r;var c=l?bo(l,0,s).join(""):e.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),il(i)){if(e.slice(s).search(i)){var u,d=c;for(i.global||(i=_e(i.source,vl(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var p=u.index;c=c.slice(0,p===o?s:p)}}else if(e.indexOf(ao(i),s)!=s){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},zn.unescape=function(e){return(e=vl(e))&&Y.test(e)?e.replace(G,an):e},zn.uniqueId=function(e){var t=++Le;return vl(e)+t},zn.upperCase=$l,zn.upperFirst=Zl,zn.each=va,zn.eachRight=ba,zn.first=qi,ls(zn,(ys={},vr(zn,(function(e,t){Ae.call(zn.prototype,t)||(ys[t]=e)})),ys),{chain:!1}),zn.VERSION="4.17.15",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),bt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===o?1:mn(fl(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(rs)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Tr(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(La(ai(e)))},Un.prototype.slice=function(e,t){e=fl(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=fl(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(h)},vr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=zn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(zn.prototype[t]=function(){var t=this.__wrapped__,l=r?[1]:arguments,s=t instanceof Un,c=l[0],u=s||Va(t),d=function(e){var t=i.apply(zn,_t([e],l));return r&&p?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(s=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=a&&!p,g=s&&!h;if(!a&&u){t=g?t:new Un(this);var m=e.apply(t,l);return m.__actions__.push({func:ha,args:[d],thisArg:o}),new Wn(m,p)}return f&&g?e.apply(this,l):(m=this.thru(d),f?r?m.value()[0]:m.value():m)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[n]((function(n){return t.apply(Va(n)?n:[],e)}))}})),vr(Un.prototype,(function(e,t){var n=zn[t];if(n){var r=n.name+"";Ae.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[zo(o,2).name]=[{name:"wrapper",func:o}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=ko(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ko(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ko(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,l=i.end,s=l-a,c=r?l:a-1,u=this.__iteratees__,d=u.length,p=0,h=yn(s,this.__takeCount__);if(!n||!r&&o==s&&h==s)return po(e,this.__actions__);var f=[];e:for(;s--&&p<h;){for(var g=-1,m=e[c+=t];++g<d;){var y=u[g],v=y.iteratee,b=y.type,x=v(m);if(2==b)m=x;else if(!x){if(1==b)continue e;break e}}f[p++]=m}return f},zn.prototype.at=fa,zn.prototype.chain=function(){return pa(this)},zn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===o&&(this.__values__=pl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:o}),new Wn(t,this.__chain__)}return this.thru(ea)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,lt&&(zn.prototype[lt]=function(){return this}),zn}();it._=ln,(r=function(){return ln}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},733:(e,t,n)=>{var r=n(6738);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},6188:(e,t,n)=>{var r=n(1054);e.exports=function(e){return null==e?"":r(e)}},4231:(e,t,n)=>{var r=n(2528),o=n(535),i=n(3535),a=o.DEFAULT_COMPARATOR,l=o.reverseComparator;function s(e,t,n,r){for(var o,i,a=t[r];r>n&&e(a,i=t[o=r-1>>1])<0;)t[r]=i,r=o;t[r]=a}function c(e,t,n){for(var r,o=t.length,i=n,a=t[n],l=2*n+1;l<o;)(r=l+1)<o&&e(t[l],t[r])>=0&&(l=r),t[n]=t[l],l=2*(n=l)+1;t[n]=a,s(e,t,i,n)}function u(e,t,n){t.push(n),s(e,t,0,t.length-1)}function d(e,t){var n=t.pop();if(0!==t.length){var r=t[0];return t[0]=n,c(e,t,0),r}return n}function p(e,t,n){if(0===t.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var r=t[0];return t[0]=n,c(e,t,0),r}function h(e,t,n){var r;return 0!==t.length&&e(t[0],n)<0&&(r=t[0],t[0]=n,n=r,c(e,t,0)),n}function f(e,t){for(var n=t.length>>1;--n>=0;)c(e,t,n)}function g(e,t){for(var n=t.length,r=0,o=new Array(n);r<n;)o[r++]=d(e,t);return o}function m(e){if(this.clear(),this.comparator=e||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function y(e){if(this.clear(),this.comparator=e||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=l(this.comparator)}m.prototype.clear=function(){this.items=[],this.size=0},m.prototype.push=function(e){return u(this.comparator,this.items,e),++this.size},m.prototype.peek=function(){return this.items[0]},m.prototype.pop=function(){return 0!==this.size&&this.size--,d(this.comparator,this.items)},m.prototype.replace=function(e){return p(this.comparator,this.items,e)},m.prototype.pushpop=function(e){return h(this.comparator,this.items,e)},m.prototype.consume=function(){return this.size=0,g(this.comparator,this.items)},m.prototype.toArray=function(){return g(this.comparator,this.items.slice())},m.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:m,enumerable:!1}),e},"undefined"!=typeof Symbol&&(m.prototype[Symbol.for("nodejs.util.inspect.custom")]=m.prototype.inspect),y.prototype=m.prototype,m.from=function(e,t){var n,r=new m(t);return n=i.isArrayLike(e)?e.slice():i.toArray(e),f(r.comparator,n),r.items=n,r.size=n.length,r},y.from=function(e,t){var n,r=new y(t);return n=i.isArrayLike(e)?e.slice():i.toArray(e),f(r.comparator,n),r.items=n,r.size=n.length,r},m.siftUp=c,m.siftDown=s,m.push=u,m.pop=d,m.replace=p,m.pushpop=h,m.heapify=f,m.consume=g,m.nsmallest=function(e,t,n){2===arguments.length&&(n=t,t=e,e=a);var o,s,c,u,d=l(e),h=1/0;if(1===t){if(i.isArrayLike(n)){for(o=0,s=n.length;o<s;o++)c=n[o],(h===1/0||e(c,h)<0)&&(h=c);return(u=new n.constructor(1))[0]=h,u}return r(n,(function(t){(h===1/0||e(t,h)<0)&&(h=t)})),[h]}if(i.isArrayLike(n)){if(t>=n.length)return n.slice().sort(e);for(u=n.slice(0,t),f(d,u),o=t,s=n.length;o<s;o++)d(n[o],u[0])>0&&p(d,u,n[o]);return u.sort(e)}var g=i.guessLength(n);return null!==g&&g<t&&(t=g),u=new Array(t),o=0,r(n,(function(e){o<t?u[o]=e:(o===t&&f(d,u),d(e,u[0])>0&&p(d,u,e)),o++})),u.length>o&&(u.length=o),u.sort(e)},m.nlargest=function(e,t,n){2===arguments.length&&(n=t,t=e,e=a);var o,s,c,u,d=l(e),h=-1/0;if(1===t){if(i.isArrayLike(n)){for(o=0,s=n.length;o<s;o++)c=n[o],(h===-1/0||e(c,h)>0)&&(h=c);return(u=new n.constructor(1))[0]=h,u}return r(n,(function(t){(h===-1/0||e(t,h)>0)&&(h=t)})),[h]}if(i.isArrayLike(n)){if(t>=n.length)return n.slice().sort(d);for(u=n.slice(0,t),f(e,u),o=t,s=n.length;o<s;o++)e(n[o],u[0])>0&&p(e,u,n[o]);return u.sort(d)}var g=i.guessLength(n);return null!==g&&g<t&&(t=g),u=new Array(t),o=0,r(n,(function(n){o<t?u[o]=n:(o===t&&f(e,u),e(n,u[0])>0&&p(e,u,n)),o++})),u.length>o&&(u.length=o),u.sort(d)},m.MinHeap=m,m.MaxHeap=y,e.exports=m},4034:(e,t,n)=>{var r=n(8298),o=n(2528);function i(){this.clear()}i.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},i.prototype.enqueue=function(e){return this.items.push(e),++this.size},i.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},i.prototype.peek=function(){if(this.size)return this.items[this.offset]},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,o=this.items.length;n<o;n++,r++)e.call(t,this.items[n],r,this)},i.prototype.toArray=function(){return this.items.slice(this.offset)},i.prototype.values=function(){var e=this.items,t=this.offset;return new r((function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}}))},i.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r((function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}}))},"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=i.prototype.values),i.prototype.toString=function(){return this.toArray().join(",")},i.prototype.toJSON=function(){return this.toArray()},i.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:i,enumerable:!1}),e},"undefined"!=typeof Symbol&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),i.from=function(e){var t=new i;return o(e,(function(e){t.enqueue(e)})),t},i.of=function(){return i.from(arguments)},e.exports=i},535:(e,t)=>{t.DEFAULT_COMPARATOR=function(e,t){return e<t?-1:e>t?1:0},t.DEFAULT_REVERSE_COMPARATOR=function(e,t){return e<t?1:e>t?-1:0},t.reverseComparator=function(e){return function(t,n){return e(n,t)}},t.createTupleComparator=function(e){return 2===e?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:e[1]>t[1]?1:0}:function(t,n){for(var r=0;r<e;){if(t[r]<n[r])return-1;if(t[r]>n[r])return 1;r++}return 0}}},3535:(e,t,n)=>{var r=n(2528),o=n(6023);function i(e){return"number"==typeof e.length?e.length:"number"==typeof e.size?e.size:void 0}t.isArrayLike=function(e){return Array.isArray(e)||o.isTypedArray(e)},t.guessLength=i,t.toArray=function(e){var t=i(e),n="number"==typeof t?new Array(t):[],o=0;return r(e,(function(e){n[o++]=e})),n},t.toArrayWithIndices=function(e){var t=i(e),n="number"==typeof t?o.getPointerArray(t):Array,a="number"==typeof t?new Array(t):[],l="number"==typeof t?new n(t):[],s=0;return r(e,(function(e){a[s]=e,l[s]=s++})),[a,l]}},6023:(e,t)=>{var n=Math.pow(2,8)-1,r=Math.pow(2,16)-1,o=Math.pow(2,32)-1,i=Math.pow(2,7)-1,a=Math.pow(2,15)-1,l=Math.pow(2,31)-1;t.getPointerArray=function(e){var t=e-1;if(t<=n)return Uint8Array;if(t<=r)return Uint16Array;if(t<=o)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},t.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=l?Int32Array:Float64Array},t.getNumberType=function(e){return e===(0|e)?-1===Math.sign(e)?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};t.getMinimalRepresentation=function(e,n){var r,o,i,a,l,c=null,u=0;for(a=0,l=e.length;a<l;a++)i=n?n(e[a]):e[a],o=t.getNumberType(i),(r=s[o.name])>u&&(u=r,c=o);return c},t.isTypedArray=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(e)},t.concat=function(){var e,t,n,r=0;for(e=0,n=arguments.length;e<n;e++)r+=arguments[e].length;var o=new arguments[0].constructor(r);for(e=0,t=0;e<n;e++)o.set(arguments[e],t),t+=arguments[e].length;return o},t.indices=function(e){for(var n=new(t.getPointerArray(e))(e),r=0;r<e;r++)n[r]=r;return n}},2528:(e,t,n)=>{var r=n(4529),o=r.ARRAY_BUFFER_SUPPORT,i=r.SYMBOL_SUPPORT;e.exports=function(e,t){var n,r,a,l,s;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof t)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||o&&ArrayBuffer.isView(e)||"string"==typeof e||"[object Arguments]"===e.toString())for(a=0,l=e.length;a<l;a++)t(e[a],a);else if("function"!=typeof e.forEach)if(i&&Symbol.iterator in e&&"function"!=typeof e.next&&(e=e[Symbol.iterator]()),"function"!=typeof e.next)for(r in e)e.hasOwnProperty(r)&&t(e[r],r);else for(n=e,a=0;!0!==(s=n.next()).done;)t(s.value,a),a++;else e.forEach(t)}},8298:e=>{function t(e){if("function"!=typeof e)throw new Error("obliterator/iterator: expecting a function!");this.next=e}"undefined"!=typeof Symbol&&(t.prototype[Symbol.iterator]=function(){return this}),t.of=function(){var e=arguments,n=e.length,r=0;return new t((function(){return r>=n?{done:!0}:{done:!1,value:e[r++]}}))},t.empty=function(){return new t((function(){return{done:!0}}))},t.fromSequence=function(e){var n=0,r=e.length;return new t((function(){return n>=r?{done:!0}:{done:!1,value:e[n++]}}))},t.is=function(e){return e instanceof t||"object"==typeof e&&null!==e&&"function"==typeof e.next},e.exports=t},4529:(e,t)=>{t.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,t.SYMBOL_SUPPORT="undefined"!=typeof Symbol},4835:e=>{function t(e){return function(t,n){return t+Math.floor(e()*(n-t+1))}}var n=t(Math.random);n.createRandom=t,e.exports=n},4341:(e,t,n)=>{var r=n(4835).createRandom;function o(e){var t=r(e);return function(e){for(var n=e.length,r=n-1,o=-1;++o<n;){var i=t(o,r),a=e[i];e[i]=e[o],e[o]=a}}}var i=o(Math.random);i.createShuffleInPlace=o,e.exports=i},9057:function(e,t,n){var r=n(4406);(function(){var t,n,o,i,a,l;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=r&&r.hrtime?(e.exports=function(){return(t()-a)/1e6},n=r.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),l=1e9*r.uptime(),a=i-l):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)},4406:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l,s=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?s=l.concat(s):u=-1,s.length&&p())}function p(){if(!c){var e=a(d);c=!0;for(var t=s.length;t;){for(l=s,s=[];++u<t;)l&&l[u].run();u=-1,t=s.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new h(e,t)),1!==s.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},3493:(e,t,n)=>{for(var r=n(9057),o="undefined"==typeof window?n.g:window,i=["moz","webkit"],a="AnimationFrame",l=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],c=0;!l&&c<i.length;c++)l=o[i[c]+"Request"+a],s=o[i[c]+"Cancel"+a]||o[i[c]+"CancelRequest"+a];if(!l||!s){var u=0,d=0,p=[];l=function(e){if(0===p.length){var t=r(),n=Math.max(0,16.666666666666668-(t-u));u=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++d,callback:e,cancelled:!1}),d},s=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return l.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=l,e.cancelAnimationFrame=s}},500:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=d(i),l=d(n(5099)),s=d(n(3666)),c=d(n(2705)),u=n(9680);function d(e){return e&&e.__esModule?e:{default:e}}var p=function(){return!0},h=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return f.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,s.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,i=n.highlightFirstSuggestion;if(!(0,s.default)(r,e.suggestions)&&r.length>0&&i)this.highlightFirstSuggestion();else if(o){var a=this.getHighlightedSuggestion();a!=t.highlightedSuggestion&&o({suggestion:a})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value;return t.length>0&&r(o)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,l=t.renderSuggestion,s=t.inputProps,d=t.multiSection,h=t.renderSectionTitle,f=t.id,g=t.getSectionSuggestions,m=t.theme,y=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,x=this.state,w=x.isFocused,S=x.isCollapsed,E=x.highlightedSectionIndex,O=x.highlightedSuggestionIndex,C=x.valueBeforeUpDown,_=v?p:this.props.shouldRenderSuggestions,k=s.value,T=s.onFocus,P=s.onKeyDown,M=this.willRenderSuggestions(this.props),R=v||w&&!S&&M,I=R?n:[],D=r({},s,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=_(k);e.setState({isFocused:!0,isCollapsed:!n}),T&&T(t),n&&i({value:k,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,o=_(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!o})),o?i({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(S)_(k)&&(i({value:k,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var a,l=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex;a=null===s?null===C?k:C:e.getSuggestionValueByIndex(l,s),e.updateHighlightedSuggestion(l,s,k),e.maybeCallOnChange(t,a,40===o?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(R&&!v&&e.closeSuggestions(),null!=c){var u=y(c);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:u,suggestionIndex:O,sectionIndex:E,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:R&&t.preventDefault();var d=R&&!v;null===C?d||(e.maybeCallOnChange(t,"","escape"),_("")?i({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,C,"escape"),d?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}P&&P(t)}}),A={query:this.getQuery()};return a.default.createElement(c.default,{multiSection:d,items:I,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:l,renderItemData:A,renderSectionTitle:h,getSectionItems:g,highlightedSectionIndex:E,highlightedItemIndex:O,inputProps:D,itemProps:this.itemProps,theme:(0,u.mapToAutowhateverTheme)(m),id:f,ref:this.storeAutowhateverRef})}}]),t}(i.Component);h.propTypes={suggestions:l.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:l.default.func,onSuggestionHighlighted:l.default.func,renderInputComponent:l.default.func,renderSuggestionsContainer:l.default.func,getSuggestionValue:l.default.func.isRequired,renderSuggestion:l.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:l.default.func,alwaysRenderSuggestions:l.default.bool,multiSection:l.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:l.default.bool,highlightFirstSuggestion:l.default.bool,theme:l.default.object,id:l.default.string},h.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return a.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:u.defaultTheme,id:"1"};var f=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,o=n.itemIndex;e.updateHighlightedSuggestion(r,o),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,a=r.onSuggestionsFetchRequested;i&&i(t,n),o?a({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=e.getSuggestionIndices(e.findSuggestionElement(t.target)),a=i.sectionIndex,l=i.suggestionIndex,s=e.getSuggestion(a,l),c=e.props.getSuggestionValue(s);e.maybeCallOnChange(t,c,"click"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:c,suggestionIndex:l,sectionIndex:a,method:"click"}),r||e.closeSuggestions(),!0===o?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,o=n.value,i=n.onBlur,a=e.getHighlightedSuggestion(),l=r(o);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!l}),i&&i(e.blurEvent,{highlightedSuggestion:a})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=h},359:(e,t,n)=>{"use strict";e.exports=n(500).default},9680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},1756:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=p(i),l=p(n(5099)),s=p(n(3145)),c=p(n(4735)),u=p(n(4355)),d=p(n(367));function p(e){return e&&e.__esModule?e:{default:e}}var h={},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,o=t.highlightedSectionIndex,i=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var a="ArrowDown"===e.key?"next":"prev",l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(n.sectionIterator[a]([o,i]),2),s=l[0],c=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:s,newHighlightedItemIndex:c});break;default:r.onKeyDown(e,{highlightedSectionIndex:o,highlightedItemIndex:i})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,s.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,c.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,o=n.items,i=n.renderItem,l=n.renderItemData,s=n.renderSectionTitle,c=n.highlightedSectionIndex,p=n.highlightedItemIndex,h=n.itemProps;return o.map((function(n,o){var f="react-autowhatever-"+r+"-",g=f+"section-"+o+"-",m=0===o;return a.default.createElement("div",t(g+"container","sectionContainer",m&&"sectionContainerFirst"),a.default.createElement(u.default,{section:n,renderSectionTitle:s,theme:t,sectionKeyPrefix:g}),a.default.createElement(d.default,{items:e.sectionsItems[o],itemProps:h,renderItem:i,renderItemData:l,sectionIndex:o,highlightedItemIndex:c===o?p:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:f,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,o=n.renderItem,i=n.renderItemData,l=n.highlightedSectionIndex,s=n.highlightedItemIndex,c=n.itemProps;return a.default.createElement(d.default,{items:e,itemProps:c,renderItem:o,renderItemData:i,highlightedItemIndex:null===l?s:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,l=t.renderItemsContainer,s=t.highlightedSectionIndex,c=t.highlightedItemIndex,u=this.state.isInputFocused,d=o?this.renderSections():this.renderItems(),p=null!==d,h=this.getItemId(s,c),f="react-autowhatever-"+n,g=r({role:"combobox","aria-haspopup":"listbox","aria-owns":f,"aria-expanded":p},e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),this.props.containerProps),m=i(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":f,"aria-activedescendant":h},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",u&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=l({containerProps:r({id:f,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:d});return a.default.createElement("div",g,m,y)}}]),t}(i.Component);f.propTypes={id:l.default.string,multiSection:l.default.bool,renderInputComponent:l.default.func,renderItemsContainer:l.default.func,items:l.default.array.isRequired,renderItem:l.default.func,renderItemData:l.default.object,renderSectionTitle:l.default.func,getSectionItems:l.default.func,containerProps:l.default.object,inputProps:l.default.object,itemProps:l.default.oneOfType([l.default.object,l.default.func]),highlightedSectionIndex:l.default.number,highlightedItemIndex:l.default.number,theme:l.default.oneOfType([l.default.object,l.default.array])},f.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return a.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return a.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:h,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:h,inputProps:h,itemProps:h,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=f},5567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=c(i),l=c(n(5099)),s=c(n(9952));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;u(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:o})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:o})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:o})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:o})},d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete l.sectionIndex,delete l.itemIndex,"function"==typeof l.onMouseEnter&&(l.onMouseEnter=this.onMouseEnter),"function"==typeof l.onMouseLeave&&(l.onMouseLeave=this.onMouseLeave),"function"==typeof l.onMouseDown&&(l.onMouseDown=this.onMouseDown),"function"==typeof l.onClick&&(l.onClick=this.onClick),a.default.createElement("li",r({role:"option"},l,{ref:this.storeItemReference}),o(n,r({isHighlighted:t},i)))}}]),t}(i.Component);p.propTypes={sectionIndex:l.default.number,isHighlighted:l.default.bool.isRequired,itemIndex:l.default.number.isRequired,item:l.default.any.isRequired,renderItem:l.default.func.isRequired,renderItemData:l.default.object.isRequired,onMouseEnter:l.default.func,onMouseLeave:l.default.func,onMouseDown:l.default.func,onClick:l.default.func},t.default=p},367:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=u(i),l=u(n(5099)),s=u(n(5567)),c=u(n(9952));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){var e,n,r;d(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,i=t.renderItem,l=t.renderItemData,c=t.sectionIndex,u=t.highlightedItemIndex,d=t.getItemId,p=t.theme,h=t.keyPrefix,f=null===c?h:h+"section-"+c+"-",g="function"==typeof o;return a.default.createElement("ul",r({role:"listbox"},p(f+"items-list","itemsList")),n.map((function(t,n){var h=0===n,m=n===u,y=f+"item-"+n,v=g?o({sectionIndex:c,itemIndex:n}):o,b=r({id:d(c,n),"aria-selected":m},p(y,"item",h&&"itemFirst",m&&"itemHighlighted"),v);return m&&(b.ref=e.storeHighlightedItemReference),a.default.createElement(s.default,r({},b,{sectionIndex:c,isHighlighted:m,itemIndex:n,item:t,renderItem:i,renderItemData:l}))})))}}]),t}(i.Component);h.propTypes={items:l.default.array.isRequired,itemProps:l.default.oneOfType([l.default.object,l.default.func]),renderItem:l.default.func.isRequired,renderItemData:l.default.object.isRequired,sectionIndex:l.default.number,highlightedItemIndex:l.default.number,onHighlightedItemChange:l.default.func.isRequired,getItemId:l.default.func.isRequired,theme:l.default.func.isRequired,keyPrefix:l.default.string.isRequired},h.defaultProps={sectionIndex:null},t.default=h},4355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(8156),i=s(o),a=s(n(5099)),l=s(n(9952));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,o=e.sectionKeyPrefix,a=n(t);return a?i.default.createElement("div",r(o+"title","sectionTitle"),a):null}}]),t}(o.Component);d.propTypes={section:a.default.any.isRequired,renderSectionTitle:a.default.func.isRequired,theme:a.default.func.isRequired,sectionKeyPrefix:a.default.string.isRequired},t.default=d},9952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var a={},l=void 0,s=void 0;for(l=0,s=r.length;l<s;l++)a[r[l]]=!0;for(l=0,s=o.length;l<s;l++){var c=o[l],u=e[c],d=t[c];if(u!==d){if(!a[c]||null===u||null===d||"object"!==(void 0===u?"undefined":n(u))||"object"!==(void 0===d?"undefined":n(d)))return!0;var p=Object.keys(u),h=Object.keys(d);if(p.length!==h.length)return!0;for(var f=0,g=p.length;f<g;f++){var m=p[f];if(u[m]!==d[m])return!0}}}return!1}},2705:(e,t,n)=>{"use strict";e.exports=n(1756).default},8018:(e,t,n)=>{"use strict";t.ZP=void 0;var r=p(n(1531)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==h(e)&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(8156)),i=p(n(8096)),a=p(n(7224)),l=p(n(5099)),s=p(n(835)),c=p(n(7339)),u=p(n(8310));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=p(n(9998)).default[500],S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,i=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=b(e);if(t()){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}(l);function l(){var e;f(this,l);for(var t=arguments.length,n=new Array(t),c=0;c<t;c++)n[c]=arguments[c];return x(v(e=i.call.apply(i,[this].concat(n))),"buildUrl",(function(t){var n=e.props.storagePath;return t?t.startsWith("http:")||t.startsWith("https:")?t:n+t.replace(/^\/+/,""):""})),x(v(e),"getFallbackAvatar",(function(){var t=e.props,n=t.entityType,i=t.classes,l=t.backgroundColor,c=t.color,d=t.className,p=(0,s.default)(n);return o.default.createElement(r.default,{className:(0,u.default)(d,i.avatar),style:{border:"2px solid ".concat(n.typeColor||w),backgroundColor:l||n.typeColor||w,color:c}},p&&p.charAt(0)||o.default.createElement(a.default,null))})),e}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=e.entityType,n=e.classes,i=e.className,a=t.typeIcon||t.typeImage;return a?o.default.createElement(r.default,{className:(0,u.default)(i,n.avatar),style:{border:"2px solid ".concat(t.typeColor||w),backgroundColor:"#FFFFFF"},src:this.buildUrl(a)},this.getFallbackAvatar()):this.getFallbackAvatar()}}])&&g(t.prototype,n),l}(o.PureComponent);x(S,"propTypes",{entityType:l.default.shape({typeColor:l.default.string,typeIcon:l.default.string,typeImage:l.default.string,label:l.default.string,uri:l.default.string}),className:l.default.string,classes:l.default.shape({avatar:l.default.string}),storagePath:l.default.string,backgroundColor:l.default.string,color:l.default.string}),x(S,"defaultProps",{storagePath:"https://reltio-images.s3.amazonaws.com/api/",entityType:{},color:"#FFFFFF"});var E=(0,i.default)(c.default)(S);t.ZP=E},7339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={avatar:{"& img":{display:"flex",flexDirection:"row",alignItems:"center","&::before":{width:"100%"}}}}},4660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(8156)),o=u(n(5099)),i=u(n(6929)),a=u(n(683)),l=u(n(7685)),s=u(n(5751)),c=u(n(8310));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=e.classes,n=e.title,o=e.message;return r.default.createElement("div",null,r.default.createElement("span",{className:t.errorTitle},n),r.default.createElement("span",{className:t.errorMessage},o))}d.defaultProps={title:s.default.text("Error:"),message:s.default.text("Something was wrong"),classes:{}},d.propTypes={title:o.default.string,message:o.default.string,classes:o.default.object};var p=function(e){var t,n=e.error,o=e.onClose,u=e.style,p=e.classes,h=e.className,f=s.default.text("Close");if(r.default.isValidElement(n))t=n;else{var g=n||{},m=g.title,y=g.message;t=r.default.createElement(d,{classes:p,title:m,message:y})}return r.default.createElement("div",{className:(0,c.default)(p.errorBlock,h),style:u},r.default.createElement("div",{className:p.descriptionBlock},t),r.default.createElement("div",{className:p.closeIconContainer},r.default.createElement(i.default,{title:f,placement:"bottom"},r.default.createElement(a.default,{onClick:o,"aria-label":f},r.default.createElement(l.default,null)))))};p.propTypes={id:o.default.oneOfType([o.default.string,o.default.number]),error:o.default.oneOfType([o.default.node,o.default.shape({title:o.default.string,message:o.default.string})]),style:o.default.object,onClose:o.default.func,className:o.default.oneOfType([o.default.string,o.default.object]),classes:o.default.object},p.defaultProps={classes:{}};var h=p;t.default=h},4176:(e,t,n)=>{"use strict";t.ZP=void 0;var r=u(n(8096)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(8156)),i=u(n(5099)),a=n(72),l=u(n(4660)),s=u(n(1444));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function f(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(s,e);var t,n,r,i=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m(e);if(t()){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}(s);function s(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.autoCloseInterval&&(t.timer&&(clearTimeout(t.timer),t.timer=null),e&&(t.timer=setTimeout((function(){t.handleCloseErrorMessage()}),t.autoCloseInterval)))},(r="processAutoCloseInterval")in(n=g(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,s.$$instance=g(t),t.handleCloseErrorMessage=t.handleCloseErrorMessage.bind(g(t)),t.state={errors:[]},t}return t=s,r=[{key:"addError",value:function(e){s.$$instance&&(s.$$instance.setState({errors:s.$$instance.state.errors.concat(e)}),s.$$instance.processAutoCloseInterval())}}],(n=[{key:"handleCloseErrorMessage",value:function(){var e=this.state.errors,t=e.length;this.setState({errors:e.slice(0,t-1)}),this.processAutoCloseInterval(t>1)}},{key:"autoCloseInterval",get:function(){return 1e3*(this.props.autoCloseInterval||0)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.classes,r=this.state.errors,i=r.length,s=r[i-1];return o.default.createElement(a.CSSTransitionGroup,{transitionName:{enter:n.errorContainerEnter,enterActive:n.errorContainerEnterActive,leave:n.errorContainerLeave,leaveActive:n.errorContainerLeaveActive,appear:n.errorContainerEnter,appearActive:n.errorContainerEnterActive},transitionAppearTimeout:600,transitionEnterTimeout:600,transitionLeaveTimeout:300,transitionAppear:!0},Boolean(i)&&o.default.createElement(l.default,{classes:n,key:"errorMessage".concat(i),onClose:this.handleCloseErrorMessage,error:s,className:t}))}}])&&p(t.prototype,n),r&&p(t,r),s}(o.PureComponent);y.propTypes={className:i.default.oneOfType([i.default.string,i.default.object]),classes:i.default.object,autoCloseInterval:i.default.number},y.defaultProps={classes:{}};var v=(0,r.default)(s.default)(y);t.ZP=v},1444:(e,t)=>{"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="#FFFFFF";t.default=function(e){var t;return{errorContainer:{zIndex:2},errorContainerEnter:{opacity:0},errorContainerEnterActive:{opacity:1,transition:"opacity 600ms ease-in"},errorContainerLeave:{opacity:1},errorContainerLeaveActive:{opacity:0,transition:"opacity 300ms ease-in"},errorBlock:(t={zIndex:2,color:r,position:"absolute",display:"flex",left:346,top:64,right:90,background:"linear-gradient(180deg, ".concat("#E54C4C"," 0%, ").concat("#F16262"," 100%)"),minHeight:48,justifyContent:"space-between",alignItems:"baseline",boxShadow:"0 0 24px 0 rgba(0,0,0,0.22)"},n(t,e.breakpoints.down("sm"),{left:0,right:0}),n(t,e.breakpoints.down("md"),{left:288,right:32}),n(t,e.breakpoints.down("lg"),{left:336,right:80}),n(t,e.breakpoints.up("xl"),{left:456,right:200}),t),descriptionBlock:{fontSize:13,padding:"20px 32px",alignSelf:"center",overflow:"hidden",textOverflow:"ellipsis"},errorTitle:{fontWeight:"bold",marginRight:7},errorMessage:{},closeIconContainer:{position:"relative","& button":{color:r,marginTop:5}}}}},2332:(e,t,n)=>{"use strict";t.Z=void 0;var r=s(n(8156)),o=s(n(5099)),i=s(n(8310)),a=s(n(6871)),l=s(n(8937));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var t=e.headCellData,n=e.sortOrder,o=e.sortField,s=e.sortHandler;return r.default.createElement("div",{className:(0,i.default)(l.default.headCellContentWrapper)},t&&(t.sortable?r.default.createElement(a.default,{active:Boolean(n&&o===t.id),direction:n,onClick:s,classes:{root:l.default.sortLabel,icon:l.default.sortIcon}},t.label):t.label))};c.propTypes={headCellData:o.default.shape({id:o.default.string,label:o.default.oneOfType([o.default.string,o.default.node]),sortable:o.default.bool,resizable:o.default.bool,className:o.default.string,initialWidth:o.default.number,minWidth:o.default.number,autoResize:o.default.bool,renderer:o.default.func}),sortOrder:o.default.string,sortField:o.default.string,sortHandler:o.default.func};var u=c;t.Z=u},8937:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(0,((r=n(6698))&&r.__esModule?r:{default:r}).default)("<style>.DefaultHeadCellRenderer__headCellContentWrapper_3Jgkx{flex-direction:row-reverse;justify-content:flex-end;padding:0 22px;white-space:nowrap;overflow:hidden}.DefaultHeadCellRenderer__headCellContentWrapper_3Jgkx .DefaultHeadCellRenderer__sortLabel_3taIX{margin-left:-22px}.DefaultHeadCellRenderer__headCellContentWrapper_3Jgkx .DefaultHeadCellRenderer__sortIcon_YQ9XF{width:18px;height:18px}</style>"),t.default={headCellContentWrapper:"DefaultHeadCellRenderer__headCellContentWrapper_3Jgkx",sortLabel:"DefaultHeadCellRenderer__sortLabel_3taIX",sortIcon:"DefaultHeadCellRenderer__sortIcon_YQ9XF"}},835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?(0,o.default)(e,"label")||(0,o.default)(e,"uri","").slice((0,o.default)(e,"uri","").lastIndexOf("/")+1):null};var r,o=(r=n(2579))&&r.__esModule?r:{default:r}},6698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("undefined"!=typeof window&&"string"==typeof e&&n.indexOf(e)<0){var t=document.createElement("div");t.innerHTML=e,document.head.appendChild(t.querySelector("style")),n.push(e)}};var n=[]},4129:(e,t,n)=>{"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=c(n(8156)),i=c(n(5099)),a=c(n(2205)),l=c(n(9490)),s=n(9685);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}s.nameShape.isRequired,i.default.bool,i.default.bool,i.default.bool,(0,s.transitionTimeout)("Appear"),(0,s.transitionTimeout)("Enter"),(0,s.transitionTimeout)("Leave");var p=function(e){function t(){var n,r;u(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=d(this,e.call.apply(e,[this].concat(a))),r._wrapChild=function(e){return o.default.createElement(l.default,{name:r.props.transitionName,appear:r.props.transitionAppear,enter:r.props.transitionEnter,leave:r.props.transitionLeave,appearTimeout:r.props.transitionAppearTimeout,enterTimeout:r.props.transitionEnterTimeout,leaveTimeout:r.props.transitionLeaveTimeout},e)},d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return o.default.createElement(a.default,r({},this.props,{childFactory:this._wrapChild}))},t}(o.default.Component);p.displayName="CSSTransitionGroup",p.propTypes={},p.defaultProps={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},t.default=p,e.exports=t.default},9490:(e,t,n)=>{"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=p(n(2196)),i=p(n(4812)),a=p(n(6463)),l=n(4596),s=p(n(8156)),c=p(n(5099)),u=n(7111),d=n(9685);function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var g=[];l.transitionEnd&&g.push(l.transitionEnd),l.animationEnd&&g.push(l.animationEnd),c.default.node,d.nameShape.isRequired,c.default.bool,c.default.bool,c.default.bool,c.default.number,c.default.number,c.default.number;var m=function(e){function t(){var n,r;h(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=f(this,e.call.apply(e,[this].concat(i))),r.componentWillAppear=function(e){r.props.appear?r.transition("appear",e,r.props.appearTimeout):e()},r.componentWillEnter=function(e){r.props.enter?r.transition("enter",e,r.props.enterTimeout):e()},r.componentWillLeave=function(e){r.props.leave?r.transition("leave",e,r.props.leaveTimeout):e()},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach((function(e){clearTimeout(e)})),this.classNameAndNodeQueue.length=0},t.prototype.transition=function(e,t,n){var r=(0,u.findDOMNode)(this);if(r){var a=this.props.name[e]||this.props.name+"-"+e,s=this.props.name[e+"Active"]||a+"-active",c=null,d=void 0;(0,o.default)(r,a),this.queueClassAndNode(s,r);var p=function(e){e&&e.target!==r||(clearTimeout(c),d&&d(),(0,i.default)(r,a),(0,i.default)(r,s),d&&d(),t&&t())};n?(c=setTimeout(p,n),this.transitionTimeouts.push(c)):l.transitionEnd&&(d=function(e,t){return g.length?g.forEach((function(n){return e.addEventListener(n,t,!1)})):setTimeout(t,0),function(){g.length&&g.forEach((function(n){return e.removeEventListener(n,t,!1)}))}}(r,p))}else t&&t()},t.prototype.queueClassAndNode=function(e,t){var n=this;this.classNameAndNodeQueue.push({className:e,node:t}),this.rafHandle||(this.rafHandle=(0,a.default)((function(){return n.flushClassNameAndNodeQueue()})))},t.prototype.flushClassNameAndNodeQueue=function(){this.unmounted||this.classNameAndNodeQueue.forEach((function(e){e.node.scrollTop,(0,o.default)(e.node,e.className)})),this.classNameAndNodeQueue.length=0,this.rafHandle=null},t.prototype.render=function(){var e=r({},this.props);return delete e.name,delete e.appear,delete e.enter,delete e.leave,delete e.appearTimeout,delete e.enterTimeout,delete e.leaveTimeout,delete e.children,s.default.cloneElement(s.default.Children.only(this.props.children),e)},t}(s.default.Component);m.displayName="CSSTransitionGroupChild",m.propTypes={},t.default=m,e.exports=t.default},2205:(e,t,n)=>{"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=s(n(8994)),i=s(n(8156)),a=s(n(5099)),l=(s(n(2564)),n(276));function s(e){return e&&e.__esModule?e:{default:e}}a.default.any,a.default.func,a.default.node;var c=function(e){function t(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,o));return i.performAppear=function(e,t){i.currentlyTransitioningKeys[e]=!0,t.componentWillAppear?t.componentWillAppear(i._handleDoneAppearing.bind(i,e,t)):i._handleDoneAppearing(e,t)},i._handleDoneAppearing=function(e,t){t.componentDidAppear&&t.componentDidAppear(),delete i.currentlyTransitioningKeys[e];var n=(0,l.getChildMapping)(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e,t)},i.performEnter=function(e,t){i.currentlyTransitioningKeys[e]=!0,t.componentWillEnter?t.componentWillEnter(i._handleDoneEntering.bind(i,e,t)):i._handleDoneEntering(e,t)},i._handleDoneEntering=function(e,t){t.componentDidEnter&&t.componentDidEnter(),delete i.currentlyTransitioningKeys[e];var n=(0,l.getChildMapping)(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e,t)},i.performLeave=function(e,t){i.currentlyTransitioningKeys[e]=!0,t.componentWillLeave?t.componentWillLeave(i._handleDoneLeaving.bind(i,e,t)):i._handleDoneLeaving(e,t)},i._handleDoneLeaving=function(e,t){t.componentDidLeave&&t.componentDidLeave(),delete i.currentlyTransitioningKeys[e];var n=(0,l.getChildMapping)(i.props.children);n&&n.hasOwnProperty(e)?i.keysToEnter.push(e):i.setState((function(t){var n=r({},t.children);return delete n[e],{children:n}}))},i.childRefs=Object.create(null),i.state={children:(0,l.getChildMapping)(n.children)},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t,this.childRefs[t])},t.prototype.componentWillReceiveProps=function(e){var t=(0,l.getChildMapping)(e.children),n=this.state.children;for(var r in this.setState({children:(0,l.mergeChildMappings)(n,t)}),t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(var i in n){var a=t&&t.hasOwnProperty(i);!n[i]||a||this.currentlyTransitioningKeys[i]||this.keysToLeave.push(i)}},t.prototype.componentDidUpdate=function(){var e=this,t=this.keysToEnter;this.keysToEnter=[],t.forEach((function(t){return e.performEnter(t,e.childRefs[t])}));var n=this.keysToLeave;this.keysToLeave=[],n.forEach((function(t){return e.performLeave(t,e.childRefs[t])}))},t.prototype.render=function(){var e=this,t=[],n=function(n){var r=e.state.children[n];if(r){var a="string"!=typeof r.ref,l=e.props.childFactory(r),s=function(t){e.childRefs[n]=t};l===r&&a&&(s=(0,o.default)(r.ref,s)),t.push(i.default.cloneElement(l,{key:n,ref:s}))}};for(var a in this.state.children)n(a);var l=r({},this.props);return delete l.transitionLeave,delete l.transitionName,delete l.transitionAppear,delete l.transitionEnter,delete l.childFactory,delete l.transitionLeaveTimeout,delete l.transitionEnterTimeout,delete l.transitionAppearTimeout,delete l.component,i.default.createElement(this.props.component,l,t)},t}(i.default.Component);c.displayName="TransitionGroup",c.propTypes={},c.defaultProps={component:"span",childFactory:function(e){return e}},t.default=c,e.exports=t.default},72:(e,t,n)=>{"use strict";var r=i(n(4129)),o=i(n(2205));function i(e){return e&&e.__esModule?e:{default:e}}e.exports={TransitionGroup:o.default,CSSTransitionGroup:r.default}},276:(e,t,n)=>{"use strict";t.__esModule=!0,t.getChildMapping=function(e){if(!e)return e;var t={};return r.Children.map(e,(function(e){return e})).forEach((function(e){t[e.key]=e})),t},t.mergeChildMappings=function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a=void 0,l={};for(var s in t){if(r.hasOwnProperty(s))for(a=0;a<r[s].length;a++){var c=r[s][a];l[r[s][a]]=n(c)}l[s]=n(s)}for(a=0;a<o.length;a++)l[o[a]]=n(o[a]);return l};var r=n(8156)},9685:(e,t,n)=>{"use strict";t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},o(n(8156));var r=o(n(5099));function o(e){return e&&e.__esModule?e:{default:e}}t.nameShape=r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,leave:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterActive:r.default.string,leave:r.default.string,leaveActive:r.default.string,appear:r.default.string,appearActive:r.default.string})])},6017:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}},8726:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=s(i),l=s(n(5099));function s(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||h()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(i.Component);f.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},6866:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116;function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case l:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case s:return e;default:return t}}case g:case f:case o:return t}}}function y(e){return m(e)===d}t.typeOf=m,t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=f,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===l||e===a||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p)},t.isAsyncMode=function(e){return y(e)||m(e)===u},t.isConcurrentMode=y,t.isContextConsumer=function(e){return m(e)===c},t.isContextProvider=function(e){return m(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return m(e)===p},t.isFragment=function(e){return m(e)===i},t.isLazy=function(e){return m(e)===g},t.isMemo=function(e){return m(e)===f},t.isPortal=function(e){return m(e)===o},t.isProfiler=function(e){return m(e)===l},t.isStrictMode=function(e){return m(e)===a},t.isSuspense=function(e){return m(e)===h}},8570:(e,t,n)=>{"use strict";e.exports=n(6866)},1950:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(8156),a=s(i),l=s(n(5099));function s(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||h(),prevId:n}:null}}]),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(i.Component);f.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},2787:e=>{e.exports=["alignContent","MozAlignContent","WebkitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebkitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebkitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebkitAll","MSAll","OAll","animation","MozAnimation","WebkitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebkitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebkitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebkitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebkitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebkitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebkitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebkitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebkitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebkitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebkitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebkitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebkitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebkitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebkitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebkitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebkitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebkitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebkitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebkitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebkitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebkitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebkitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebkitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebkitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebkitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebkitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebkitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebkitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebkitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebkitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebkitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebkitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebkitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebkitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebkitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebkitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebkitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebkitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebkitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebkitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebkitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebkitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebkitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebkitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebkitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebkitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebkitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebkitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebkitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebkitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebkitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebkitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebkitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebkitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebkitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebkitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebkitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebkitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebkitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebkitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebkitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebkitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebkitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebkitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebkitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebkitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebkitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebkitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebkitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebkitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebkitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebkitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebkitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebkitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebkitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebkitCaptionSide","MSCaptionSide","OCaptionSide","caretColor","MozCaretColor","WebkitCaretColor","MSCaretColor","OCaretColor","ch","MozCh","WebkitCh","MSCh","OCh","clear","MozClear","WebkitClear","MSClear","OClear","clip","MozClip","WebkitClip","MSClip","OClip","clipPath","MozClipPath","WebkitClipPath","MSClipPath","OClipPath","cm","MozCm","WebkitCm","MSCm","OCm","color","MozColor","WebkitColor","MSColor","OColor","columnCount","MozColumnCount","WebkitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebkitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebkitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebkitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebkitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebkitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebkitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebkitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebkitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebkitColumns","MSColumns","OColumns","content","MozContent","WebkitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebkitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebkitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebkitCursor","MSCursor","OCursor","deg","MozDeg","WebkitDeg","MSDeg","ODeg","direction","MozDirection","WebkitDirection","MSDirection","ODirection","display","MozDisplay","WebkitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebkitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebkitDpi","MSDpi","ODpi","dppx","MozDppx","WebkitDppx","MSDppx","ODppx","em","MozEm","WebkitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebkitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebkitEx","MSEx","OEx","filter","MozFilter","WebkitFilter","MSFilter","OFilter","flexBasis","MozFlexBasis","WebkitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebkitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebkitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebkitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebkitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebkitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebkitFloat","MSFloat","OFloat","font","MozFont","WebkitFont","MSFont","OFont","fontFamily","MozFontFamily","WebkitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebkitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebkitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebkitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebkitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebkitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebkitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebkitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebkitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebkitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebkitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebkitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebkitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebkitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebkitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebkitFontWeight","MSFontWeight","OFontWeight","fr","MozFr","WebkitFr","MSFr","OFr","grad","MozGrad","WebkitGrad","MSGrad","OGrad","grid","MozGrid","WebkitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebkitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebkitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebkitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebkitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebkitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebkitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebkitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebkitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebkitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebkitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebkitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebkitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebkitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebkitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebkitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebkitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebkitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebkitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebkitHyphens","MSHyphens","OHyphens","hz","MozHz","WebkitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebkitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebkitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebkitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebkitImeMode","MSImeMode","OImeMode","in","MozIn","WebkitIn","MSIn","OIn","inherit","MozInherit","WebkitInherit","MSInherit","OInherit","initial","MozInitial","WebkitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebkitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebkitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebkitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebkitKhz","MSKhz","OKhz","left","MozLeft","WebkitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebkitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebkitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebkitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebkitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebkitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebkitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebkitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebkitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebkitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebkitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebkitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebkitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebkitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebkitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebkitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebkitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebkitMask","MSMask","OMask","maskClip","MozMaskClip","WebkitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebkitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebkitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebkitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebkitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebkitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebkitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebkitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebkitMaskType","MSMaskType","OMaskType","maxHeight","MozMaxHeight","WebkitMaxHeight","MSMaxHeight","OMaxHeight","maxWidth","MozMaxWidth","WebkitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebkitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebkitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebkitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebkitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebkitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebkitMm","MSMm","OMm","ms","MozMs","WebkitMs","MSMs","OMs","objectFit","MozObjectFit","WebkitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebkitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebkitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebkitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebkitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebkitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebkitOpacity","MSOpacity","OOpacity","order","MozOrder","WebkitOrder","MSOrder","OOrder","orphans","MozOrphans","WebkitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebkitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebkitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebkitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebkitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebkitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebkitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebkitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebkitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebkitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebkitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebkitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebkitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebkitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebkitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebkitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebkitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebkitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebkitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebkitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebkitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebkitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebkitPc","MSPc","OPc","perspective","MozPerspective","WebkitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebkitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebkitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebkitPosition","MSPosition","OPosition","pt","MozPt","WebkitPt","MSPt","OPt","px","MozPx","WebkitPx","MSPx","OPx","q","MozQ","WebkitQ","MSQ","OQ","quotes","MozQuotes","WebkitQuotes","MSQuotes","OQuotes","rad","MozRad","WebkitRad","MSRad","ORad","rem","MozRem","WebkitRem","MSRem","ORem","resize","MozResize","WebkitResize","MSResize","OResize","revert","MozRevert","WebkitRevert","MSRevert","ORevert","right","MozRight","WebkitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebkitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebkitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebkitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebkitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebkitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebkitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebkitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebkitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebkitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebkitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebkitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebkitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebkitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebkitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebkitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebkitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebkitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebkitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebkitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebkitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebkitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebkitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebkitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebkitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebkitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebkitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebkitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebkitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebkitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebkitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebkitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebkitTop","MSTop","OTop","touchAction","MozTouchAction","WebkitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebkitTransform","msTransform","OTransform","transformBox","MozTransformBox","WebkitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebkitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebkitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebkitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebkitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebkitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebkitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebkitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebkitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebkitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebkitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebkitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebkitVh","MSVh","OVh","visibility","MozVisibility","WebkitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebkitVmax","MSVmax","OVmax","vmin","MozVmin","WebkitVmin","MSVmin","OVmin","vw","MozVw","WebkitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebkitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebkitWidows","MSWidows","OWidows","width","MozWidth","WebkitWidth","MSWidth","OWidth","willChange","MozWillChange","WebkitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebkitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebkitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebkitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebkitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebkitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","flex","MozFlex","WebkitFlex","MSFlex","OFlex","fr","MozFr","WebkitFr","MSFr","OFr","overflowScrolling","MozOverflowScrolling","WebkitOverflowScrolling","MSOverflowScrolling","OOverflowScrolling","userSelect","MozUserSelect","WebkitUserSelect","MSUserSelect","OUserSelect"]},5473:(e,t,n)=>{var r=n(2787),o=n(5099);e.exports=function(e,t,n){var o=e[t];if(o){var i=[];if(Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&i.push(e)})),i.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+i.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=o.oneOfType([o.arrayOf(e.exports),e.exports])},4735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,i=(o=n(5431))&&o.__esModule?o:{default:o},a=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],o=t[1];return function(e){for(var t=arguments.length,l=Array(t>1?t-1:0),s=1;s<t;s++)l[s-1]=arguments[s];var c=l.map((function(e){return n[e]})).filter(a);return"string"==typeof c[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,r(c)):c.join(" ")}:{key:e,style:i.default.apply(void 0,[{}].concat(r(c)))}}},e.exports=t.default},5431:e=>{"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var o,i,a=n(e),l=1;l<arguments.length;l++){o=arguments[l],i=r(Object(o));for(var s=0;s<i.length;s++)a[i[s]]=o[i[s]]}return a}},3145:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||a===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,a+1]:0===n||a===n-1?[null,null]:null===a?[null,0]:[null,a+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||0===a?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,a-1]:0===n||0===a?[null,null]:null===a?[null,n-1]:[null,a-1]},isLast:function(e){return null===o(e)[1]}}}},3666:e=>{"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},1250:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1181),l=i(n(2383)),s=n(8586),c=n(432),u=1.5,d=function(e){function t(){var t=e.call(this)||this;return t.x=.5,t.y=.5,t.angle=0,t.ratio=1,t.minRatio=null,t.maxRatio=null,t.nextFrame=null,t.previousState=null,t.enabled=!0,t.previousState=t.getState(),t}return o(t,e),t.from=function(e){return(new t).setState(e)},t.prototype.enable=function(){return this.enabled=!0,this},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},t.prototype.hasState=function(e){return this.x===e.x&&this.y===e.y&&this.ratio===e.ratio&&this.angle===e.angle},t.prototype.getPreviousState=function(){var e=this.previousState;return e?{x:e.x,y:e.y,angle:e.angle,ratio:e.ratio}:null},t.prototype.getBoundedRatio=function(e){var t=e;return"number"==typeof this.minRatio&&(t=Math.max(t,this.minRatio)),"number"==typeof this.maxRatio&&(t=Math.min(t,this.maxRatio)),t},t.prototype.validateState=function(e){var t={};return"number"==typeof e.x&&(t.x=e.x),"number"==typeof e.y&&(t.y=e.y),"number"==typeof e.angle&&(t.angle=e.angle),"number"==typeof e.ratio&&(t.ratio=this.getBoundedRatio(e.ratio)),t},t.prototype.isAnimated=function(){return!!this.nextFrame},t.prototype.setState=function(e){if(!this.enabled)return this;this.previousState=this.getState();var t=this.validateState(e);return"number"==typeof t.x&&(this.x=t.x),"number"==typeof t.y&&(this.y=t.y),"number"==typeof t.angle&&(this.angle=t.angle),"number"==typeof t.ratio&&(this.ratio=t.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},t.prototype.updateState=function(e){return this.setState(e(this.getState())),this},t.prototype.animate=function(e,t,n){var r=this;if(this.enabled){var o=Object.assign({},a.ANIMATE_DEFAULTS,t),i=this.validateState(e),c="function"==typeof o.easing?o.easing:l.default[o.easing],u=Date.now(),d=this.getState(),p=function(){var e=(Date.now()-u)/o.duration;if(e>=1)return r.nextFrame=null,r.setState(i),void(r.animationCallback&&(r.animationCallback.call(null),r.animationCallback=void 0));var t=c(e),n={};"number"==typeof i.x&&(n.x=d.x+(i.x-d.x)*t),"number"==typeof i.y&&(n.y=d.y+(i.y-d.y)*t),"number"==typeof i.angle&&(n.angle=d.angle+(i.angle-d.angle)*t),"number"==typeof i.ratio&&(n.ratio=d.ratio+(i.ratio-d.ratio)*t),r.setState(n),r.nextFrame=(0,s.requestFrame)(p)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(p)):p(),this.animationCallback=n}},t.prototype.animatedZoom=function(e){if(e){if("number"==typeof e)return this.animate({ratio:this.ratio/e});this.animate({ratio:this.ratio/(e.factor||u)},e)}else this.animate({ratio:this.ratio/u})},t.prototype.animatedUnzoom=function(e){if(e){if("number"==typeof e)return this.animate({ratio:this.ratio*e});this.animate({ratio:this.ratio*(e.factor||u)},e)}else this.animate({ratio:this.ratio*u})},t.prototype.animatedReset=function(e){this.animate({x:.5,y:.5,ratio:1,angle:0},e)},t.prototype.copy=function(){return t.from(this.getState())},t}(c.TypedEventEmitter);t.default=d},8231:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getWheelDelta=t.getTouchCoords=t.getTouchesArray=t.getWheelCoords=t.getMouseCoords=t.getPosition=void 0;var a=n(432);function l(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function s(e,t){var n=i(i({},l(e,t)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function c(e){for(var t=[],n=0,r=Math.min(e.length,2);n<r;n++)t.push(e[n]);return t}function u(e){if(void 0!==e.deltaY)return-3*e.deltaY/360;if(void 0!==e.detail)return e.detail/-9;throw new Error("Captor: could not extract delta from event.")}t.getPosition=l,t.getMouseCoords=s,t.getWheelCoords=function(e,t){return i(i({},s(e,t)),{delta:u(e)})},t.getTouchesArray=c,t.getTouchCoords=function(e,t){return{touches:c(e.touches).map((function(e){return l(e,t)})),original:e}},t.getWheelDelta=u;var d=function(e){function t(t,n){var r=e.call(this)||this;return r.container=t,r.renderer=n,r}return o(t,e),t}(a.TypedEventEmitter);t.default=d},3834:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var s=l(n(8231)),c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.enabled=!0,r.draggedEvents=0,r.downStartTime=null,r.lastMouseX=null,r.lastMouseY=null,r.isMouseDown=!1,r.isMoving=!1,r.movingTimeout=null,r.startCameraState=null,r.clicks=0,r.doubleClickTimeout=null,r.currentWheelDirection=0,r.handleClick=r.handleClick.bind(r),r.handleRightClick=r.handleRightClick.bind(r),r.handleDown=r.handleDown.bind(r),r.handleUp=r.handleUp.bind(r),r.handleMove=r.handleMove.bind(r),r.handleWheel=r.handleWheel.bind(r),r.handleOut=r.handleOut.bind(r),t.addEventListener("click",r.handleClick,!1),t.addEventListener("contextmenu",r.handleRightClick,!1),t.addEventListener("mousedown",r.handleDown,!1),t.addEventListener("wheel",r.handleWheel,!1),t.addEventListener("mouseout",r.handleOut,!1),document.addEventListener("mousemove",r.handleMove,!1),document.addEventListener("mouseup",r.handleUp,!1),r}return o(t,e),t.prototype.kill=function(){var e=this.container;e.removeEventListener("click",this.handleClick),e.removeEventListener("contextmenu",this.handleRightClick),e.removeEventListener("mousedown",this.handleDown),e.removeEventListener("wheel",this.handleWheel),e.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},t.prototype.handleClick=function(e){var t=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"==typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(e);setTimeout((function(){t.clicks=0,t.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(e,this.container))}},t.prototype.handleRightClick=function(e){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(e,this.container))},t.prototype.handleDoubleClick=function(e){if(this.enabled){e.preventDefault(),e.stopPropagation();var t=(0,s.getMouseCoords)(e,this.container);if(this.emit("doubleClick",t),!t.sigmaDefaultPrevented){var n=this.renderer.getCamera(),r=n.getBoundedRatio(n.getState().ratio/2.2);n.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(e,this.container),r),{easing:"quadraticInOut",duration:200})}}},t.prototype.handleDown=function(e){if(this.enabled){if(0===e.button){this.startCameraState=this.renderer.getCamera().getState();var t=(0,s.getPosition)(e,this.container),n=t.x,r=t.y;this.lastMouseX=n,this.lastMouseY=r,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",(0,s.getMouseCoords)(e,this.container))}},t.prototype.handleUp=function(e){var t=this;if(this.enabled&&this.isMouseDown){var n=this.renderer.getCamera();this.isMouseDown=!1,"number"==typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var r=(0,s.getPosition)(e,this.container),o=r.x,i=r.y,a=n.getState(),l=n.getPreviousState()||{x:0,y:0};this.isMoving?n.animate({x:a.x+3*(a.x-l.x),y:a.y+3*(a.y-l.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===o&&this.lastMouseY===i||n.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){t.draggedEvents=0,t.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(e,this.container))}},t.prototype.handleMove=function(e){var t=this;if(this.enabled){var n=(0,s.getMouseCoords)(e,this.container);if(this.emit("mousemovebody",n),e.target===this.container&&this.emit("mousemove",n),!n.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"==typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){t.movingTimeout=null,t.isMoving=!1}),100);var r=this.renderer.getCamera(),o=(0,s.getPosition)(e,this.container),i=o.x,a=o.y,l=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:i,y:a}),u=l.x-c.x,d=l.y-c.y,p=r.getState(),h=p.x+u,f=p.y+d;r.setState({x:h,y:f}),this.lastMouseX=i,this.lastMouseY=a,e.preventDefault(),e.stopPropagation()}}},t.prototype.handleWheel=function(e){var t=this;if(this.enabled){e.preventDefault(),e.stopPropagation();var n=(0,s.getWheelDelta)(e);if(n){var r=(0,s.getWheelCoords)(e,this.container);if(this.emit("wheel",r),!r.sigmaDefaultPrevented){var o=n>0?1/1.7:1.7,i=this.renderer.getCamera(),a=i.getBoundedRatio(i.getState().ratio*o),l=n>0?1:-1,c=Date.now();this.currentWheelDirection===l&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTime<50||(i.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(e,this.container),a),{easing:"quadraticOut",duration:250},(function(){t.currentWheelDirection=0})),this.currentWheelDirection=l,this.lastWheelTriggerTime=c)}}}},t.prototype.handleOut=function(){},t}(s.default);t.default=c},916:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var c=l(n(8231)),u=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.enabled=!0,r.isMoving=!1,r.hasMoved=!1,r.touchMode=0,r.startTouchesPositions=[],r.handleStart=r.handleStart.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleMove=r.handleMove.bind(r),t.addEventListener("touchstart",r.handleStart,!1),t.addEventListener("touchend",r.handleLeave,!1),t.addEventListener("touchcancel",r.handleLeave,!1),t.addEventListener("touchmove",r.handleMove,!1),r}return o(t,e),t.prototype.kill=function(){var e=this.container;e.removeEventListener("touchstart",this.handleStart),e.removeEventListener("touchend",this.handleLeave),e.removeEventListener("touchcancel",this.handleLeave),e.removeEventListener("touchmove",this.handleMove)},t.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},t.prototype.dispatchRelatedMouseEvent=function(e,t,n,r){var o=n||t.touches[0],i=new MouseEvent(e,{clientX:o.clientX,clientY:o.clientY,altKey:t.altKey,ctrlKey:t.ctrlKey});i.isFakeSigmaMouseEvent=!0,(r||this.container).dispatchEvent(i)},t.prototype.handleStart=function(e){var t=this;if(this.enabled){e.preventDefault(),1===e.touches.length&&this.dispatchRelatedMouseEvent("mousedown",e);var n=(0,c.getTouchesArray)(e.touches);if(this.touchMode=n.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=n.map((function(e){return(0,c.getPosition)(e,t.container)})),this.lastTouches=n,this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var r=s(this.startTouchesPositions,2),o=r[0],i=o.x,a=o.y,l=r[1],u=l.x,d=l.y;this.startTouchesAngle=Math.atan2(d-a,u-i),this.startTouchesDistance=Math.sqrt(Math.pow(u-i,2)+Math.pow(d-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(e,this.container))}},t.prototype.handleLeave=function(e){if(this.enabled){switch(e.preventDefault(),0===e.touches.length&&this.lastTouches&&this.lastTouches.length&&(this.dispatchRelatedMouseEvent("mouseup",e,this.lastTouches[0],document),this.hasMoved||this.dispatchRelatedMouseEvent("click",e,this.lastTouches[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===e.touches.length){this.handleStart(e),e.preventDefault();break}case 1:if(this.isMoving){var t=this.renderer.getCamera(),n=t.getState(),r=t.getPreviousState()||{x:0,y:0};t.animate({x:n.x+3*(n.x-r.x),y:n.y+3*(n.y-r.y)},{duration:200,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0}this.emit("touchup",(0,c.getTouchCoords)(e,this.container))}},t.prototype.handleMove=function(e){var t,n=this;if(this.enabled){e.preventDefault(),1===e.touches.length&&this.dispatchRelatedMouseEvent("mousemove",e);var r=(0,c.getTouchesArray)(e.touches),o=r.map((function(e){return(0,c.getPosition)(e,n.container)}));if(this.lastTouches=r,this.lastTouchesPositions=o,this.hasMoved||(this.hasMoved=o.some((function(e,t){var r=n.startTouchesPositions[t];return e.x!==r.x||e.y!==r.y}))),this.hasMoved){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){n.isMoving=!1}),200);var i=this.renderer.getCamera(),a=this.startCameraState;switch(this.touchMode){case 1:var l=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=l.x,d=l.y,p=this.renderer.viewportToFramedGraph(o[0]),h=p.x,f=p.y;i.setState({x:a.x+u-h,y:a.y+d-f});break;case 2:var g={},m=o[0],y=m.x,v=m.y,b=o[1],x=b.x,w=b.y,S=Math.atan2(w-v,x-y)-this.startTouchesAngle,E=Math.hypot(w-v,x-y)/this.startTouchesDistance,O=i.getBoundedRatio(a.ratio/E);g.ratio=O,g.angle=a.angle+S;var C=this.getDimensions(),_=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:a}),k=Math.min(C.width,C.height),T=k/C.width,P=O/k;f=v-k/2/(k/C.height),h=(t=s([(h=y-k/2/T)*Math.cos(-g.angle)-f*Math.sin(-g.angle),f*Math.cos(-g.angle)+h*Math.sin(-g.angle)],2))[0],f=t[1],g.x=_.x-h*P,g.y=_.y+f*P,i.setState(g)}this.emit("touchmove",(0,c.getTouchCoords)(e,this.container))}}},t}(c.default);t.default=u},2306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.edgeLabelsToDisplayFromNodes=t.LabelGrid=void 0;var n=function(){function e(e,t){this.key=e,this.size=t}return e.compare=function(e,t){return e.size>t.size?-1:e.size<t.size||e.key>t.key?1:-1},e}(),r=function(){function e(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return e.prototype.resizeAndClear=function(e,t){this.width=e.width,this.height=e.height,this.cellSize=t,this.columns=Math.ceil(e.width/t),this.rows=Math.ceil(e.height/t),this.cells={}},e.prototype.getIndex=function(e){var t=Math.floor(e.x/this.cellSize);return Math.floor(e.y/this.cellSize)*this.columns+t},e.prototype.add=function(e,t,r){var o=new n(e,t),i=this.getIndex(r),a=this.cells[i];a||(a=[],this.cells[i]=a),a.push(o)},e.prototype.organize=function(){for(var e in this.cells)this.cells[e].sort(n.compare)},e.prototype.getLabelsToDisplay=function(e,t){var n=this.cellSize*this.cellSize,r=n/e/e*t/n,o=Math.ceil(r),i=[];for(var a in this.cells)for(var l=this.cells[a],s=0;s<Math.min(o,l.length);s++)i.push(l[s].key);return i},e}();t.LabelGrid=r,t.edgeLabelsToDisplayFromNodes=function(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,o=e.displayedNodeLabels,i=[];return t.forEachEdge((function(e,t,a,l){(a===n||l===n||r.has(a)||r.has(l)||o.has(a)&&o.has(l))&&i.push(e)})),i}},9316:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rectangleCollidesWithQuad=t.squareCollidesWithQuad=t.getCircumscribedAlignedRectangle=t.isRectangleAligned=void 0;var o=r(n(8884)),i=!1;function a(e){return e.x1===e.x2||e.y1===e.y2}function l(e){var t=Math.sqrt(Math.pow(e.x2-e.x1,2)+Math.pow(e.y2-e.y1,2)),n=(e.y1-e.y2)*e.height/t,r=(e.x2-e.x1)*e.height/t,o={x:e.x1,y:e.y1},i={x:e.x2,y:e.y2},a={x:e.x1+n,y:e.y1+r},l={x:e.x2+n,y:e.y2+r},s=Math.min(o.x,i.x,a.x,l.x),c=Math.max(o.x,i.x,a.x,l.x),u=Math.min(o.y,i.y,a.y,l.y);return{x1:s,y1:u,x2:c,y2:u,height:Math.max(o.y,i.y,a.y,l.y)-u}}function s(e,t,n,r,o,i,a){return e<r+i&&e+n>r&&t<o+a&&t+n>o}function c(e,t,n,r,o,i,a,l){return e<o+a&&e+n>o&&t<i+l&&t+r>i}function u(e,t,n,r,o,i){var a=e<n+o/2;return t<r+i/2?a?1:2:a?3:4}t.isRectangleAligned=a,t.getCircumscribedAlignedRectangle=l,t.squareCollidesWithQuad=s,t.rectangleCollidesWithQuad=c;var d=function(){function e(e){var t;void 0===e&&(e={}),this.containers=((t={})[5460]=[],t),this.cache=null,this.lastRectangle=null;var n=Math.pow(4,5);this.data=new Float32Array((4*n-1)/3*4),e.boundaries?this.resize(e.boundaries):this.resize({x:0,y:0,width:1,height:1})}return e.prototype.add=function(e,t,n,r){return function(e,t,n,r,o,a,l){for(var c=o-l,u=a-l,d=2*l,p=0,h=0;;){if(p>=5)return n[h]=n[h]||[],void n[h].push(r);var f=4*h+4,g=4*h+8,m=4*h+12,y=4*h+16,v=s(c,u,d,t[f+0],t[f+1],t[f+2],t[f+3]),b=s(c,u,d,t[g+0],t[g+1],t[g+2],t[g+3]),x=s(c,u,d,t[m+0],t[m+1],t[m+2],t[m+3]),w=s(c,u,d,t[y+0],t[y+1],t[y+2],t[y+3]),S=[v,b,x,w].reduce((function(e,t){return t?e+1:e}),0);if(0===S&&0===p)return n[5460].push(r),void(!i&&n[5460].length>=5&&(i=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===S)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(p,", key: ").concat(r,", x: ").concat(o,", y: ").concat(a,", size: ").concat(l,")."));if(3===S)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(p,", key: ").concat(r,", x: ").concat(o,", y: ").concat(a,", size: ").concat(l,")."));if(S>1)return n[h]=n[h]||[],void n[h].push(r);p++,v&&(h=f),b&&(h=g),x&&(h=m),w&&(h=y)}}(0,this.data,this.containers,e,t,n,r),this},e.prototype.resize=function(e){this.clear(),this.data[0]=e.x,this.data[1]=e.y,this.data[2]=e.width,this.data[3]=e.height,function(e,t){for(var n=[0,0];n.length;){var r=n.pop(),o=n.pop(),i=4*o+4,a=4*o+8,l=4*o+12,s=4*o+16,c=t[o+0],u=t[o+1],d=t[o+2]/2,p=t[o+3]/2;t[i+0]=c,t[i+1]=u,t[i+2]=d,t[i+3]=p,t[a+0]=c+d,t[a+1]=u,t[a+2]=d,t[a+3]=p,t[l+0]=c,t[l+1]=u+p,t[l+2]=d,t[l+3]=p,t[s+0]=c+d,t[s+1]=u+p,t[s+2]=d,t[s+3]=p,r<4&&(n.push(s,r+1),n.push(l,r+1),n.push(a,r+1),n.push(i,r+1))}}(0,this.data)},e.prototype.clear=function(){var e;return this.containers=((e={})[5460]=[],e),this},e.prototype.point=function(e,t){var n=this.containers[5460].slice(),r=0,i=0;do{this.containers[r]&&(0,o.default)(n,this.containers[r]),r=4*r+4*u(e,t,this.data[r+0],this.data[r+1],this.data[r+2],this.data[r+3]),i++}while(i<=5);return n},e.prototype.rectangle=function(e,t,n,r,i){var s=this.lastRectangle;return s&&e===s.x1&&n===s.x2&&t===s.y1&&r===s.y2&&i===s.height||(this.lastRectangle={x1:e,y1:t,x2:n,y2:r,height:i},a(this.lastRectangle)||(this.lastRectangle=l(this.lastRectangle)),this.cache=function(e,t,n,r,i,a,l){for(var s,u=[0,0],d=[];u.length;){var p=u.pop(),h=u.pop();if((s=n[h])&&(0,o.default)(d,s),!(p>=5)){var f=4*h+4,g=4*h+8,m=4*h+12,y=4*h+16,v=c(r,i,a,l,t[f+0],t[f+1],t[f+2],t[f+3]),b=c(r,i,a,l,t[g+0],t[g+1],t[g+2],t[g+3]),x=c(r,i,a,l,t[m+0],t[m+1],t[m+2],t[m+3]),w=c(r,i,a,l,t[y+0],t[y+1],t[y+2],t[y+3]);v&&u.push(f,p+1),b&&u.push(g,p+1),x&&u.push(m,p+1),w&&u.push(y,p+1)}}return d}(0,this.data,this.containers,e,t,Math.abs(e-n)||Math.abs(t-r),i),(0,o.default)(this.cache,this.containers[5460])),this.cache},e}();t.default=d},9358:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Sigma=t.MouseCaptor=t.QuadTree=t.Camera=void 0;var o=r(n(8953));t.Sigma=o.default;var i=r(n(1250));t.Camera=i.default;var a=r(n(9316));t.QuadTree=a.default;var l=r(n(3834));t.MouseCaptor=l.default,t.default=o.default},284:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var i=o.edgeLabelSize,a=o.edgeLabelFont,l=o.edgeLabelWeight,s=o.edgeLabelColor.attribute?t[o.edgeLabelColor.attribute]||o.edgeLabelColor.color||"#000":o.edgeLabelColor.color,c=t.label;if(c){e.fillStyle=s,e.font="".concat(l," ").concat(i,"px ").concat(a);var u,d,p=n.size,h=r.size,f=n.x,g=n.y,m=r.x,y=r.y,v=m-f,b=y-g,x=Math.sqrt(v*v+b*b);if(!(x<p+h)){u=((f+=v*p/x)+(m-=v*h/x))/2,d=((g+=b*p/x)+(y-=b*h/x))/2,v=m-f,b=y-g,x=Math.sqrt(v*v+b*b);var w,S=e.measureText(c).width;if(S>x){for(c+="…",S=e.measureText(c).width;S>x&&c.length>1;)c=c.slice(0,-2)+"…",S=e.measureText(c).width;if(c.length<4)return}w=v>0?b>0?Math.acos(v/x):Math.asin(b/x):b>0?Math.acos(v/x)+Math.PI:Math.asin(v/x)+Math.PI/2,e.save(),e.translate(u,d),e.rotate(w),e.fillText(c,-S/2,t.size/2+i),e.restore()}}}},4362:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2193));t.default=function(e,t,n){var r=n.labelSize,i=n.labelFont,a=n.labelWeight;if(e.font="".concat(a," ").concat(r,"px ").concat(i),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000","string"==typeof t.label){var l=e.measureText(t.label).width,s=Math.round(l+5),c=Math.round(r+4),u=Math.max(t.size,r/2)+2,d=Math.asin(c/2/u),p=Math.sqrt(Math.abs(Math.pow(u,2)-Math.pow(c/2,2)));e.beginPath(),e.moveTo(t.x+p,t.y+c/2),e.lineTo(t.x+u+s,t.y+c/2),e.lineTo(t.x+u+s,t.y-c/2),e.lineTo(t.x+p,t.y-c/2),e.arc(t.x,t.y,u,d,-d),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+2,0,2*Math.PI),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,(0,o.default)(e,t,n)}},2193:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(t.label){var r=n.labelSize,o=n.labelFont,i=n.labelWeight,a=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=a,e.font="".concat(i," ").concat(r,"px ").concat(o),e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}},4488:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.createEdgeCompoundProgram=t.AbstractEdgeProgram=void 0;var i=function(e){function t(t,n,r,o,i){return e.call(this,t,n,r,o,i)||this}return o(t,e),t}(n(1549).AbstractProgram);t.AbstractEdgeProgram=i,t.createEdgeCompoundProgram=function(e){return function(){function t(t,n){this.programs=e.map((function(e){return new e(t,n)}))}return t.prototype.bufferData=function(){this.programs.forEach((function(e){return e.bufferData()}))},t.prototype.allocate=function(e){this.programs.forEach((function(t){return t.allocate(e)}))},t.prototype.bind=function(){},t.prototype.computeIndices=function(){this.programs.forEach((function(e){return e.computeIndices()}))},t.prototype.render=function(e){this.programs.forEach((function(t){t.bind(),t.bufferData(),t.render(e)}))},t.prototype.process=function(e,t,n,r,o){this.programs.forEach((function(i){return i.process(e,t,n,r,o)}))},t}()}},3304:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeCompoundProgram=t.AbstractNodeProgram=void 0;var i=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o,i)||this;a.positionLocation=t.getAttribLocation(a.program,"a_position"),a.sizeLocation=t.getAttribLocation(a.program,"a_size"),a.colorLocation=t.getAttribLocation(a.program,"a_color");var l=t.getUniformLocation(a.program,"u_matrix");if(null===l)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=l;var s=t.getUniformLocation(a.program,"u_ratio");if(null===s)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=s;var c=t.getUniformLocation(a.program,"u_scale");if(null===c)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=c,a}return o(t,e),t.prototype.bind=function(){var e=this.gl;e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.sizeLocation),e.enableVertexAttribArray(this.colorLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.sizeLocation,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},t}(n(1549).AbstractProgram);t.AbstractNodeProgram=i,t.createNodeCompoundProgram=function(e){return function(){function t(t,n){this.programs=e.map((function(e){return new e(t,n)}))}return t.prototype.bufferData=function(){this.programs.forEach((function(e){return e.bufferData()}))},t.prototype.allocate=function(e){this.programs.forEach((function(t){return t.allocate(e)}))},t.prototype.bind=function(){},t.prototype.render=function(e){this.programs.forEach((function(t){t.bind(),t.bufferData(),t.render(e)}))},t.prototype.process=function(e,t,n){this.programs.forEach((function(r){return r.process(e,t,n)}))},t}()}},1549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProgram=void 0;var r=n(3451),o=function(){function e(e,t,n,o,i){this.array=new Float32Array,this.points=o,this.attributes=i,this.gl=e,this.vertexShaderSource=t,this.fragmentShaderSource=n;var a=e.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,e.bindBuffer(e.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,r.loadVertexShader)(e,this.vertexShaderSource),this.fragmentShader=(0,r.loadFragmentShader)(e,this.fragmentShaderSource),this.program=(0,r.loadProgram)(e,[this.vertexShader,this.fragmentShader])}return e.prototype.bufferData=function(){var e=this.gl;e.bufferData(e.ARRAY_BUFFER,this.array,e.DYNAMIC_DRAW)},e.prototype.allocate=function(e){this.array=new Float32Array(this.points*this.attributes*e)},e.prototype.hasNothingToRender=function(){return 0===this.array.length},e}();t.AbstractProgram=o},5696:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(4488),i=r(n(3193)),a=r(n(3653)),l=(0,o.createEdgeCompoundProgram)([a.default,i.default]);t.default=l},3193:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(8586),l=i(n(577)),s=i(n(1604)),c=function(e){function t(t){var n=e.call(this,t,l.default,s.default,3,9)||this;n.positionLocation=t.getAttribLocation(n.program,"a_position"),n.colorLocation=t.getAttribLocation(n.program,"a_color"),n.normalLocation=t.getAttribLocation(n.program,"a_normal"),n.radiusLocation=t.getAttribLocation(n.program,"a_radius"),n.barycentricLocation=t.getAttribLocation(n.program,"a_barycentric");var r=t.getUniformLocation(n.program,"u_matrix");if(null===r)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");n.matrixLocation=r;var o=t.getUniformLocation(n.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");n.sqrtZoomRatioLocation=o;var i=t.getUniformLocation(n.program,"u_correctionRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return n.correctionRatioLocation=i,n.bind(),n}return o(t,e),t.prototype.bind=function(){var e=this.gl;e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.normalLocation),e.enableVertexAttribArray(this.radiusLocation),e.enableVertexAttribArray(this.colorLocation),e.enableVertexAttribArray(this.barycentricLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.normalLocation,2,e.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.radiusLocation,1,e.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.barycentricLocation,3,e.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},t.prototype.computeIndices=function(){},t.prototype.process=function(e,t,n,r,o){if(r)for(var i=27*o,l=i+27;i<l;i++)this.array[i]=0;else{var s=n.size||1,c=t.size||1,u=e.x,d=e.y,p=t.x,h=t.y,f=(0,a.floatColor)(n.color),g=p-u,m=h-d,y=g*g+m*m,v=0,b=0;y&&(v=-m*(y=1/Math.sqrt(y))*s,b=g*y*s);var x=27*o,w=this.array;w[x++]=p,w[x++]=h,w[x++]=-v,w[x++]=-b,w[x++]=c,w[x++]=f,w[x++]=1,w[x++]=0,w[x++]=0,w[x++]=p,w[x++]=h,w[x++]=-v,w[x++]=-b,w[x++]=c,w[x++]=f,w[x++]=0,w[x++]=1,w[x++]=0,w[x++]=p,w[x++]=h,w[x++]=-v,w[x++]=-b,w[x++]=c,w[x++]=f,w[x++]=0,w[x++]=0,w[x]=1}},t.prototype.render=function(e){if(!this.hasNothingToRender()){var t=this.gl,n=this.program;t.useProgram(n),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.drawArrays(t.TRIANGLES,0,this.array.length/9)}},t}(n(4488).AbstractEdgeProgram);t.default=c},3653:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4488),l=n(8586),s=i(n(3574)),c=i(n(3343)),u=function(e){function t(t){var n=e.call(this,t,s.default,c.default,4,6)||this,r=t.createBuffer();if(null===r)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");n.indicesBuffer=r,n.positionLocation=t.getAttribLocation(n.program,"a_position"),n.colorLocation=t.getAttribLocation(n.program,"a_color"),n.normalLocation=t.getAttribLocation(n.program,"a_normal"),n.radiusLocation=t.getAttribLocation(n.program,"a_radius");var o=t.getUniformLocation(n.program,"u_matrix");if(null===o)throw new Error("EdgeClampedProgram: error while getting matrixLocation");n.matrixLocation=o;var i=t.getUniformLocation(n.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");n.sqrtZoomRatioLocation=i;var a=t.getUniformLocation(n.program,"u_correctionRatio");if(null===a)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return n.correctionRatioLocation=a,n.canUse32BitsIndices=(0,l.canUse32BitsIndices)(t),n.IndicesArray=n.canUse32BitsIndices?Uint32Array:Uint16Array,n.indicesArray=new n.IndicesArray,n.indicesType=n.canUse32BitsIndices?t.UNSIGNED_INT:t.UNSIGNED_SHORT,n.bind(),n}return o(t,e),t.prototype.bind=function(){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.normalLocation),e.enableVertexAttribArray(this.colorLocation),e.enableVertexAttribArray(this.radiusLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.normalLocation,2,e.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.radiusLocation,1,e.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},t.prototype.process=function(e,t,n,r,o){if(r)for(var i=24*o,a=i+24;i<a;i++)this.array[i]=0;else{var s=n.size||1,c=e.x,u=e.y,d=t.x,p=t.y,h=t.size||1,f=(0,l.floatColor)(n.color),g=d-c,m=p-u,y=g*g+m*m,v=0,b=0;y&&(v=-m*(y=1/Math.sqrt(y))*s,b=g*y*s);var x=24*o,w=this.array;w[x++]=c,w[x++]=u,w[x++]=v,w[x++]=b,w[x++]=f,w[x++]=0,w[x++]=c,w[x++]=u,w[x++]=-v,w[x++]=-b,w[x++]=f,w[x++]=0,w[x++]=d,w[x++]=p,w[x++]=v,w[x++]=b,w[x++]=f,w[x++]=h,w[x++]=d,w[x++]=p,w[x++]=-v,w[x++]=-b,w[x++]=f,w[x]=-h}},t.prototype.computeIndices=function(){for(var e=this.array.length/6,t=e+e/2,n=new this.IndicesArray(t),r=0,o=0;r<e;r+=4)n[o++]=r,n[o++]=r+1,n[o++]=r+2,n[o++]=r+2,n[o++]=r+1,n[o++]=r+3;this.indicesArray=n},t.prototype.bufferData=function(){e.prototype.bufferData.call(this);var t=this.gl;t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indicesArray,t.STATIC_DRAW)},t.prototype.render=function(e){if(!this.hasNothingToRender()){var t=this.gl,n=this.program;t.useProgram(n),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.drawElements(t.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},t}(a.AbstractEdgeProgram);t.default=u},5372:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(8586),l=i(n(9843)),s=i(n(3343)),c=function(e){function t(t){var n=e.call(this,t,l.default,s.default,4,5)||this,r=t.createBuffer();if(null===r)throw new Error("EdgeProgram: error while creating indicesBuffer");n.indicesBuffer=r,n.positionLocation=t.getAttribLocation(n.program,"a_position"),n.colorLocation=t.getAttribLocation(n.program,"a_color"),n.normalLocation=t.getAttribLocation(n.program,"a_normal");var o=t.getUniformLocation(n.program,"u_matrix");if(null===o)throw new Error("EdgeProgram: error while getting matrixLocation");n.matrixLocation=o;var i=t.getUniformLocation(n.program,"u_correctionRatio");if(null===i)throw new Error("EdgeProgram: error while getting correctionRatioLocation");n.correctionRatioLocation=i;var c=t.getUniformLocation(n.program,"u_sqrtZoomRatio");if(null===c)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return n.sqrtZoomRatioLocation=c,n.canUse32BitsIndices=(0,a.canUse32BitsIndices)(t),n.IndicesArray=n.canUse32BitsIndices?Uint32Array:Uint16Array,n.indicesArray=new n.IndicesArray,n.indicesType=n.canUse32BitsIndices?t.UNSIGNED_INT:t.UNSIGNED_SHORT,n.bind(),n}return o(t,e),t.prototype.bind=function(){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.normalLocation),e.enableVertexAttribArray(this.colorLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.normalLocation,2,e.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},t.prototype.computeIndices=function(){for(var e=this.array.length/5,t=e+e/2,n=new this.IndicesArray(t),r=0,o=0;r<e;r+=4)n[o++]=r,n[o++]=r+1,n[o++]=r+2,n[o++]=r+2,n[o++]=r+1,n[o++]=r+3;this.indicesArray=n},t.prototype.bufferData=function(){e.prototype.bufferData.call(this);var t=this.gl;t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indicesArray,t.STATIC_DRAW)},t.prototype.process=function(e,t,n,r,o){if(r)for(var i=20*o,l=i+20;i<l;i++)this.array[i]=0;else{var s=n.size||1,c=e.x,u=e.y,d=t.x,p=t.y,h=(0,a.floatColor)(n.color),f=d-c,g=p-u,m=f*f+g*g,y=0,v=0;m&&(y=-g*(m=1/Math.sqrt(m))*s,v=f*m*s);var b=20*o,x=this.array;x[b++]=c,x[b++]=u,x[b++]=y,x[b++]=v,x[b++]=h,x[b++]=c,x[b++]=u,x[b++]=-y,x[b++]=-v,x[b++]=h,x[b++]=d,x[b++]=p,x[b++]=y,x[b++]=v,x[b++]=h,x[b++]=d,x[b++]=p,x[b++]=-y,x[b++]=-v,x[b]=h}},t.prototype.render=function(e){if(!this.hasNothingToRender()){var t=this.gl,n=this.program;t.useProgram(n),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.drawElements(t.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},t}(n(4488).AbstractEdgeProgram);t.default=c},732:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(8586),l=i(n(1432)),s=i(n(6846)),c=function(e){function t(t){var n=e.call(this,t,l.default,s.default,1,4)||this;return n.bind(),n}return o(t,e),t.prototype.process=function(e,t,n){var r=this.array,o=1*n*4;if(t)return r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);var i=(0,a.floatColor)(e.color);r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o]=i},t.prototype.render=function(e){if(!this.hasNothingToRender()){var t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.drawArrays(t.POINTS,0,this.array.length/4)}},t}(n(3304).AbstractNodeProgram);t.default=c},1604:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";e.exports=n})()},577:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";e.exports=n})()},3574:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";e.exports=n})()},3343:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";e.exports=n})()},9843:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasing effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';e.exports=n})()},6846:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";e.exports=n})()},1432:e=>{(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{default:()=>r});const r="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";e.exports=n})()},3451:(e,t)=>{"use strict";function n(e,t,n){var r="VERTEX"===e?t.VERTEX_SHADER:t.FRAGMENT_SHADER,o=t.createShader(r);if(null===o)throw new Error("loadShader: error while creating the shader");if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error("loadShader: error while compiling the shader:\n".concat(i,"\n").concat(n))}return o}Object.defineProperty(t,"__esModule",{value:!0}),t.loadProgram=t.loadFragmentShader=t.loadVertexShader=void 0,t.loadVertexShader=function(e,t){return n("VERTEX",e,t)},t.loadFragmentShader=function(e,t){return n("FRAGMENT",e,t)},t.loadProgram=function(e,t){var n,r,o=e.createProgram();if(null===o)throw new Error("loadProgram: error while creating the program.");for(n=0,r=t.length;n<r;n++)e.attachShader(o,t[n]);if(e.linkProgram(o),!e.getProgramParameter(o,e.LINK_STATUS))throw e.deleteProgram(o),new Error("loadProgram: error while linking the program.");return o}},9061:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSettings=t.validateSettings=t.DEFAULT_EDGE_PROGRAM_CLASSES=t.DEFAULT_NODE_PROGRAM_CLASSES=t.DEFAULT_SETTINGS=void 0;var o=n(8586),i=r(n(2193)),a=r(n(4362)),l=r(n(284)),s=r(n(732)),c=r(n(5372)),u=r(n(5696));t.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:i.default,hoverRenderer:a.default,edgeLabelRenderer:l.default,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},t.DEFAULT_NODE_PROGRAM_CLASSES={circle:s.default},t.DEFAULT_EDGE_PROGRAM_CLASSES={arrow:u.default,line:c.default},t.validateSettings=function(e){if("number"!=typeof e.labelDensity||e.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var t=e.minCameraRatio,n=e.maxCameraRatio;if("number"==typeof t&&"number"==typeof n&&n<t)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},t.resolveSettings=function(e){var n=(0,o.assign)({},t.DEFAULT_SETTINGS,e);return n.nodeProgramClasses=(0,o.assign)({},t.DEFAULT_NODE_PROGRAM_CLASSES,n.nodeProgramClasses),n.edgeProgramClasses=(0,o.assign)({},t.DEFAULT_EDGE_PROGRAM_CLASSES,n.edgeProgramClasses),n}},8953:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=l(n(8884)),c=l(n(1250)),u=l(n(3834)),d=l(n(9316)),p=n(432),h=n(8586),f=n(2306),g=n(9061),m=l(n(916)),y=n(2237),v=n(8073);function b(e,t,n){if(!n.hasOwnProperty("x")||!n.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(t,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return n.color||(n.color=e.defaultNodeColor),n.label||""===n.label||(n.label=null),void 0!==n.label&&null!==n.label?n.label=""+n.label:n.label=null,n.size||(n.size=2),n.hasOwnProperty("hidden")||(n.hidden=!1),n.hasOwnProperty("highlighted")||(n.highlighted=!1),n.hasOwnProperty("forceLabel")||(n.forceLabel=!1),n.type&&""!==n.type||(n.type=e.defaultNodeType),n.zIndex||(n.zIndex=0),n}function x(e,t,n){return n.color||(n.color=e.defaultEdgeColor),n.label||(n.label=""),n.size||(n.size=.5),n.hasOwnProperty("hidden")||(n.hidden=!1),n.hasOwnProperty("forceLabel")||(n.forceLabel=!1),n.type&&""!==n.type||(n.type=e.defaultEdgeType),n.zIndex||(n.zIndex=0),n}var w=function(e){function t(t,n,r){void 0===r&&(r={});var o=e.call(this)||this;if(o.elements={},o.canvasContexts={},o.webGLContexts={},o.activeListeners={},o.quadtree=new d.default,o.labelGrid=new f.LabelGrid,o.nodeDataCache={},o.edgeDataCache={},o.nodesWithForcedLabels=[],o.edgesWithForcedLabels=[],o.nodeExtent={x:[0,1],y:[0,1]},o.matrix=(0,y.identity)(),o.invMatrix=(0,y.identity)(),o.correctionRatio=1,o.customBBox=null,o.normalizationFunction=(0,h.createNormalizationFunction)({x:[0,1],y:[0,1]}),o.cameraSizeRatio=1,o.width=0,o.height=0,o.pixelRatio=(0,h.getPixelRatio)(),o.displayedLabels=new Set,o.highlightedNodes=new Set,o.hoveredNode=null,o.hoveredEdge=null,o.renderFrame=null,o.renderHighlightedNodesFrame=null,o.needToProcess=!1,o.needToSoftProcess=!1,o.checkEdgesEventsFrame=null,o.nodePrograms={},o.nodeHoverPrograms={},o.edgePrograms={},o.settings=(0,g.resolveSettings)(r),(0,g.validateSettings)(o.settings),(0,h.validateGraph)(t),!(n instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var i in o.graph=t,o.container=n,o.createWebGLContext("edges",{preserveDrawingBuffer:!0}),o.createCanvasContext("edgeLabels"),o.createWebGLContext("nodes"),o.createCanvasContext("labels"),o.createCanvasContext("hovers"),o.createWebGLContext("hoverNodes"),o.createCanvasContext("mouse"),o.webGLContexts){var a=o.webGLContexts[i];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var l in o.settings.nodeProgramClasses){var s=o.settings.nodeProgramClasses[l];o.nodePrograms[l]=new s(o.webGLContexts.nodes,o);var p=s;l in o.settings.nodeHoverProgramClasses&&(p=o.settings.nodeHoverProgramClasses[l]),o.nodeHoverPrograms[l]=new p(o.webGLContexts.hoverNodes,o)}for(var l in o.settings.edgeProgramClasses){var v=o.settings.edgeProgramClasses[l];o.edgePrograms[l]=new v(o.webGLContexts.edges,o)}return o.resize(),o.camera=new c.default,o.bindCameraHandlers(),o.mouseCaptor=new u.default(o.elements.mouse,o),o.touchCaptor=new m.default(o.elements.mouse,o),o.bindEventHandlers(),o.bindGraphHandlers(),o.handleSettingsUpdate(),o.process(),o.render(),o}return o(t,e),t.prototype.createCanvas=function(e){var t=(0,h.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(e)});return this.elements[e]=t,this.container.appendChild(t),t},t.prototype.createCanvasContext=function(e){var t=this.createCanvas(e);return this.canvasContexts[e]=t.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},t.prototype.createWebGLContext=function(e,t){var n,r=this.createCanvas(e),o=i({preserveDrawingBuffer:!1,antialias:!1},t||{});return(n=r.getContext("webgl2",o))||(n=r.getContext("webgl",o)),n||(n=r.getContext("experimental-webgl",o)),this.webGLContexts[e]=n,this},t.prototype.bindCameraHandlers=function(){var e=this;return this.activeListeners.camera=function(){e._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},t.prototype.mouseIsOnNode=function(e,t,n){var r=e.x,o=e.y,i=t.x,a=t.y;return r>i-n&&r<i+n&&o>a-n&&o<a+n&&Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))<n},t.prototype.getQuadNodes=function(e){var t=this.viewportToFramedGraph(e);return this.quadtree.point(t.x,1-t.y)},t.prototype.getNodeAtPosition=function(e){for(var t=e.x,n=e.y,r=this.getQuadNodes(e),o=1/0,i=null,a=0,l=r.length;a<l;a++){var s=r[a],c=this.nodeDataCache[s],u=this.framedGraphToViewport(c),d=this.scaleSize(c.size);if(!c.hidden&&this.mouseIsOnNode(e,u,d)){var p=Math.sqrt(Math.pow(t-u.x,2)+Math.pow(n-u.y,2));p<o&&(o=p,i=s)}}return i},t.prototype.bindEventHandlers=function(){var e=this;this.activeListeners.handleResize=function(){e.needToSoftProcess=!0,e._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(t){var n={event:t,preventSigmaDefault:function(){t.preventSigmaDefault()}},r=e.getNodeAtPosition(t);if(r&&e.hoveredNode!==r&&!e.nodeDataCache[r].hidden)return e.hoveredNode&&e.emit("leaveNode",i(i({},n),{node:e.hoveredNode})),e.hoveredNode=r,e.emit("enterNode",i(i({},n),{node:r})),void e.scheduleHighlightedNodesRender();if(e.hoveredNode){var o=e.nodeDataCache[e.hoveredNode],a=e.framedGraphToViewport(o),l=e.scaleSize(o.size);if(!e.mouseIsOnNode(t,a,l)){var s=e.hoveredNode;return e.hoveredNode=null,e.emit("leaveNode",i(i({},n),{node:s})),void e.scheduleHighlightedNodesRender()}}!0===e.settings.enableEdgeHoverEvents?e.checkEdgeHoverEvents(n):"debounce"===e.settings.enableEdgeHoverEvents&&(e.checkEdgesEventsFrame||(e.checkEdgesEventsFrame=(0,h.requestFrame)((function(){e.checkEdgeHoverEvents(n),e.checkEdgesEventsFrame=null}))))};var t=function(t){return function(n){var r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}},o=n.original.isFakeSigmaMouseEvent?e.getNodeAtPosition(n):e.hoveredNode;if(o)return e.emit("".concat(t,"Node"),i(i({},r),{node:o}));if("wheel"===t?e.settings.enableEdgeWheelEvents:e.settings.enableEdgeClickEvents){var a=e.getEdgeAtPoint(n.x,n.y);if(a)return e.emit("".concat(t,"Edge"),i(i({},r),{edge:a}))}return e.emit("".concat(t,"Stage"),r)}};return this.activeListeners.handleClick=t("click"),this.activeListeners.handleRightClick=t("rightClick"),this.activeListeners.handleDoubleClick=t("doubleClick"),this.activeListeners.handleWheel=t("wheel"),this.activeListeners.handleDown=t("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this},t.prototype.bindGraphHandlers=function(){var e=this,t=this.graph;return this.activeListeners.graphUpdate=function(){e.needToProcess=!0,e._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){e.needToSoftProcess=!0,e._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(t){delete e.nodeDataCache[t.key],e.hoveredNode===t.key&&(e.hoveredNode=null),e.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(t){delete e.edgeDataCache[t.key],e.hoveredEdge===t.key&&(e.hoveredEdge=null),e.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){e.edgeDataCache={},e.hoveredEdge=null,e.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){e.nodeDataCache={},e.hoveredNode=null,e.activeListeners.clearEdgesGraphUpdate()},t.on("nodeAdded",this.activeListeners.graphUpdate),t.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),t.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.on("edgeAdded",this.activeListeners.graphUpdate),t.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.on("cleared",this.activeListeners.clearGraphUpdate),this},t.prototype.unbindGraphHandlers=function(){var e=this.graph;e.removeListener("nodeAdded",this.activeListeners.graphUpdate),e.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.removeListener("edgeAdded",this.activeListeners.graphUpdate),e.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.removeListener("cleared",this.activeListeners.clearGraphUpdate)},t.prototype.checkEdgeHoverEvents=function(e){var t=this.hoveredNode?null:this.getEdgeAtPoint(e.event.x,e.event.y);return t!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",i(i({},e),{edge:this.hoveredEdge})),t&&this.emit("enterEdge",i(i({},e),{edge:t})),this.hoveredEdge=t),this},t.prototype.getEdgeAtPoint=function(e,t){var n,r,o=this,i=this.edgeDataCache,l=this.nodeDataCache;if(!(0,v.isPixelColored)(this.webGLContexts.edges,e*this.pixelRatio,t*this.pixelRatio))return null;var s=this.viewportToGraph({x:e,y:t}),c=s.x,u=s.y,d=0;if(this.graph.someEdge((function(e,t,n,r,a,s){var c=a.x,u=a.y,p=s.x,h=s.y;if(i[e].hidden||l[n].hidden||l[r].hidden)return!1;if(c!==p||u!==h){var f=Math.sqrt(Math.pow(p-c,2)+Math.pow(h-u,2)),g=o.graphToViewport({x:c,y:u}),m=g.x,y=g.y,v=o.graphToViewport({x:p,y:h}),b=v.x,x=v.y,w=Math.sqrt(Math.pow(b-m,2)+Math.pow(x-y,2));return d=f/w,!0}})),!d)return null;var p=this.graph.filterEdges((function(e,t,n,r,a,s){return!(i[e].hidden||l[n].hidden||l[r].hidden)&&(!!(0,v.doEdgeCollideWithPoint)(c,u,a.x,a.y,s.x,s.y,i[e].size*d/o.cameraSizeRatio)||void 0)}));if(0===p.length)return null;var h=p[p.length-1],f=-1/0;try{for(var g=a(p),m=g.next();!m.done;m=g.next()){var y=m.value,b=this.graph.getEdgeAttribute(y,"zIndex");b>=f&&(h=y,f=b)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(r=g.return)&&r.call(g)}finally{if(n)throw n.error}}return h},t.prototype.process=function(e){var t=this;void 0===e&&(e=!1);var n=this.graph,r=this.settings,o=this.getDimensions(),i=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(o,r.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,h.graphExtent)(n),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var l=new c.default,s=(0,h.matrixFromCamera)(l.getState(),this.getDimensions(),this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.normalizationFunction=(0,h.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var u={},d=n.nodes(),p=0,f=d.length;p<f;p++){var g=d[p],m=Object.assign({},n.getNodeAttributes(g));r.nodeReducer&&(m=r.nodeReducer(g,m)),u[(v=b(this.settings,g,m)).type]=(u[v.type]||0)+1,this.nodeDataCache[g]=v,this.normalizationFunction.applyTo(v),v.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(v.zIndex<i[0]&&(i[0]=v.zIndex),v.zIndex>i[1]&&(i[1]=v.zIndex))}for(var y in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for node type "'.concat(y,'"!'));e||this.nodePrograms[y].allocate(u[y]||0),u[y]=0}for(this.settings.zIndex&&i[0]!==i[1]&&(d=(0,h.zIndexOrdering)(i,(function(e){return t.nodeDataCache[e].zIndex}),d)),p=0,f=d.length;p<f;p++){g=d[p];var v=this.nodeDataCache[g];this.quadtree.add(g,v.x,1-v.y,v.size/this.width),"string"!=typeof v.label||v.hidden||this.labelGrid.add(g,v.size,this.framedGraphToViewport(v,{matrix:s}));var w=this.nodePrograms[v.type];if(!w)throw new Error('Sigma: could not find a suitable program for node type "'.concat(v.type,'"!'));w.process(v,v.hidden,u[v.type]++),v.highlighted&&!v.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var S={},E=n.edges();for(p=0,f=E.length;p<f;p++){var O=E[p];m=Object.assign({},n.getEdgeAttributes(O)),r.edgeReducer&&(m=r.edgeReducer(O,m)),S[(v=x(this.settings,0,m)).type]=(S[v.type]||0)+1,this.edgeDataCache[O]=v,v.forceLabel&&!v.hidden&&this.edgesWithForcedLabels.push(O),this.settings.zIndex&&(v.zIndex<a[0]&&(a[0]=v.zIndex),v.zIndex>a[1]&&(a[1]=v.zIndex))}for(var y in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(y))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(y,'"!'));e||this.edgePrograms[y].allocate(S[y]||0),S[y]=0}for(this.settings.zIndex&&a[0]!==a[1]&&(E=(0,h.zIndexOrdering)(a,(function(e){return t.edgeDataCache[e].zIndex}),E)),p=0,f=E.length;p<f;p++){O=E[p],v=this.edgeDataCache[O];var C=n.extremities(O),_=this.nodeDataCache[C[0]],k=this.nodeDataCache[C[1]],T=v.hidden||_.hidden||k.hidden;this.edgePrograms[v.type].process(_,k,v,T,S[v.type]++)}for(var y in this.edgePrograms){var P=this.edgePrograms[y];e||"function"!=typeof P.computeIndices||P.computeIndices()}return this},t.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},t.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},t.prototype._scheduleRefresh=function(){var e=this;return this.renderFrame||(this.renderFrame=(0,h.requestFrame)((function(){e._refresh(),e.renderFrame=null}))),this},t.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),t=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);(0,s.default)(t,this.nodesWithForcedLabels),this.displayedLabels=new Set;for(var n=this.canvasContexts.labels,r=0,o=t.length;r<o;r++){var a=t[r],l=this.nodeDataCache[a];if(!this.displayedLabels.has(a)&&!l.hidden){var c=this.framedGraphToViewport(l),u=c.x,d=c.y,p=this.scaleSize(l.size);!l.forceLabel&&p<this.settings.labelRenderedSizeThreshold||u<-150||u>this.width+150||d<-50||d>this.height+50||(this.displayedLabels.add(a),this.settings.labelRenderer(n,i(i({key:a},l),{size:p,x:u,y:d}),this.settings))}}return this},t.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);for(var t=(0,f.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),n=new Set,r=0,o=t.length;r<o;r++){var a=t[r],l=this.graph.extremities(a),s=this.nodeDataCache[l[0]],c=this.nodeDataCache[l[1]],u=this.edgeDataCache[a];n.has(a)||u.hidden||s.hidden||c.hidden||(this.settings.edgeLabelRenderer(e,i(i({key:a},u),{size:this.scaleSize(u.size)}),i(i(i({key:l[0]},s),this.framedGraphToViewport(s)),{size:this.scaleSize(s.size)}),i(i(i({key:l[1]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),this.settings),n.add(a))}return this},t.prototype.renderHighlightedNodes=function(){var e=this,t=this.canvasContexts.hovers;t.clearRect(0,0,this.width,this.height);var n=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&n.push(this.hoveredNode),this.highlightedNodes.forEach((function(t){t!==e.hoveredNode&&n.push(t)})),n.forEach((function(n){return function(n){var r=e.nodeDataCache[n],o=e.framedGraphToViewport(r),a=o.x,l=o.y,s=e.scaleSize(r.size);e.settings.hoverRenderer(t,i(i({key:n},r),{size:s,x:a,y:l}),e.settings)}(n)}));var r={};for(var o in n.forEach((function(t){var n=e.nodeDataCache[t].type;r[n]=(r[n]||0)+1})),this.nodeHoverPrograms)this.nodeHoverPrograms[o].allocate(r[o]||0),r[o]=0;for(var o in n.forEach((function(t){var n=e.nodeDataCache[t];e.nodeHoverPrograms[n.type].process(n,n.hidden,r[n.type]++)})),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.nodeHoverPrograms){var a=this.nodeHoverPrograms[o];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:this.pixelRatio})}},t.prototype.scheduleHighlightedNodesRender=function(){var e=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,h.requestFrame)((function(){e.renderHighlightedNodesFrame=null,e.renderHighlightedNodes(),e.renderEdgeLabels()})))},t.prototype.render=function(){var e=this;this.emit("beforeRender");var t=function(){return e.emit("afterRender"),e};if(this.renderFrame&&((0,h.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return t();var n=this.mouseCaptor,r=this.camera.isAnimated()||n.isMoving||n.draggedEvents||n.currentWheelDirection,o=this.camera.getState(),i=this.getDimensions(),a=this.getGraphDimensions(),l=this.getSetting("stagePadding")||0;for(var s in this.matrix=(0,h.matrixFromCamera)(o,i,a,l),this.invMatrix=(0,h.matrixFromCamera)(o,i,a,l,!0),this.correctionRatio=(0,h.getMatrixImpact)(this.matrix,o,i),this.nodePrograms)(c=this.nodePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:o.ratio,correctionRatio:this.correctionRatio/o.ratio,scalingRatio:this.pixelRatio});if(!this.settings.hideEdgesOnMove||!r)for(var s in this.edgePrograms){var c;(c=this.edgePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:o.ratio,correctionRatio:this.correctionRatio/o.ratio,scalingRatio:this.pixelRatio})}return this.settings.hideLabelsOnMove&&r||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),t()},t.prototype.updateCachedValues=function(){var e=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(e)},t.prototype.getCamera=function(){return this.camera},t.prototype.getContainer=function(){return this.container},t.prototype.getGraph=function(){return this.graph},t.prototype.setGraph=function(e){e!==this.graph&&(this.unbindGraphHandlers(),this.nodeDataCache={},this.edgeDataCache={},this.displayedLabels.clear(),this.highlightedNodes.clear(),this.hoveredNode=null,this.hoveredEdge=null,this.nodesWithForcedLabels.length=0,this.edgesWithForcedLabels.length=0,null!==this.checkEdgesEventsFrame&&((0,h.cancelFrame)(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.process(),this.render())},t.prototype.getMouseCaptor=function(){return this.mouseCaptor},t.prototype.getTouchCaptor=function(){return this.touchCaptor},t.prototype.getDimensions=function(){return{width:this.width,height:this.height}},t.prototype.getGraphDimensions=function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}},t.prototype.getNodeDisplayData=function(e){var t=this.nodeDataCache[e];return t?Object.assign({},t):void 0},t.prototype.getEdgeDisplayData=function(e){var t=this.edgeDataCache[e];return t?Object.assign({},t):void 0},t.prototype.getSettings=function(){return i({},this.settings)},t.prototype.getSetting=function(e){return this.settings[e]},t.prototype.setSetting=function(e,t){return this.settings[e]=t,(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},t.prototype.updateSetting=function(e,t){return this.settings[e]=t(this.settings[e]),(0,g.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},t.prototype.resize=function(){var e=this.width,t=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=(0,h.getPixelRatio)(),0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.height=1}if(e===this.width&&t===this.height)return this;for(var n in this.emit("resize"),this.elements){var r=this.elements[n];r.style.width=this.width+"px",r.style.height=this.height+"px"}for(var n in this.canvasContexts)this.elements[n].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[n].setAttribute("height",this.height*this.pixelRatio+"px"),1!==this.pixelRatio&&this.canvasContexts[n].scale(this.pixelRatio,this.pixelRatio);for(var n in this.webGLContexts)this.elements[n].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[n].setAttribute("height",this.height*this.pixelRatio+"px"),this.webGLContexts[n].viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio);return this},t.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this},t.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},t.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},t.prototype.getViewportZoomedState=function(e,t){var n=this.camera.getState(),r=n.ratio,o=n.angle,i=n.x,a=n.y,l=t/r,s={x:this.width/2,y:this.height/2},c=this.viewportToFramedGraph(e),u=this.viewportToFramedGraph(s);return{angle:o,x:(c.x-u.x)*(1-l)+i,y:(c.y-u.y)*(1-l)+a,ratio:t}},t.prototype.viewRectangle=function(){var e=0*this.width/8,t=0*this.height/8,n=this.viewportToFramedGraph({x:0-e,y:0-t}),r=this.viewportToFramedGraph({x:this.width+e,y:0-t}),o=this.viewportToFramedGraph({x:0,y:this.height+t});return{x1:n.x,y1:n.y,x2:r.x,y2:r.y,height:r.y-o.y}},t.prototype.framedGraphToViewport=function(e,t){void 0===t&&(t={});var n=!!t.cameraState||!!t.viewportDimensions||!!t.graphDimensions,r=t.matrix?t.matrix:n?(0,h.matrixFromCamera)(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getSetting("stagePadding")||0):this.matrix,o=(0,y.multiplyVec2)(r,e);return{x:(1+o.x)*this.width/2,y:(1-o.y)*this.height/2}},t.prototype.viewportToFramedGraph=function(e,t){void 0===t&&(t={});var n=!!t.cameraState||!!t.viewportDimensions||!t.graphDimensions,r=t.matrix?t.matrix:n?(0,h.matrixFromCamera)(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,o=(0,y.multiplyVec2)(r,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(o.x)&&(o.x=0),isNaN(o.y)&&(o.y=0),o},t.prototype.viewportToGraph=function(e,t){return void 0===t&&(t={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(e,t))},t.prototype.graphToViewport=function(e,t){return void 0===t&&(t={}),this.framedGraphToViewport(this.normalizationFunction(e),t)},t.prototype.getBBox=function(){return(0,h.graphExtent)(this.graph)},t.prototype.getCustomBBox=function(){return this.customBBox},t.prototype.setCustomBBox=function(e){return this.customBBox=e,this._scheduleRefresh(),this},t.prototype.kill=function(){this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.quadtree=new d.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,h.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,h.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild)},t.prototype.scaleSize=function(e){return e/this.cameraSizeRatio},t.prototype.getCanvases=function(){return i({},this.elements)},t}(p.TypedEventEmitter);t.default=w},432:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TypedEventEmitter=void 0;var i=function(e){function t(){var t=e.call(this)||this;return t.rawEmitter=t,t}return o(t,e),t}(n(2699).EventEmitter);t.TypedEventEmitter=i},1181:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.animateNodes=t.ANIMATE_DEFAULTS=void 0;var o=n(8586),i=r(n(2383));t.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},t.animateNodes=function(e,n,r,a){var l=Object.assign({},t.ANIMATE_DEFAULTS,r),s="function"==typeof l.easing?l.easing:i.default[l.easing],c=Date.now(),u={};for(var d in n){var p=n[d];for(var h in u[d]={},p)u[d][h]=e.getNodeAttribute(d,h)}var f=null,g=function(){f=null;var t=(Date.now()-c)/l.duration;if(t>=1){for(var r in n){var i=n[r];for(var d in i)e.setNodeAttribute(r,d,i[d])}"function"==typeof a&&a()}else{for(var r in t=s(t),n){i=n[r];var p=u[r];for(var d in i)e.setNodeAttribute(r,d,i[d]*t+p[d]*(1-t))}f=(0,o.requestFrame)(g)}};return g(),function(){f&&(0,o.cancelFrame)(f)}}},1078:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HTML_COLORS=void 0,t.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},2383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cubicInOut=t.cubicOut=t.cubicIn=t.quadraticInOut=t.quadraticOut=t.quadraticIn=t.linear=void 0,t.linear=function(e){return e},t.quadraticIn=function(e){return e*e},t.quadraticOut=function(e){return e*(2-e)},t.quadraticInOut=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},t.cubicIn=function(e){return e*e*e},t.cubicOut=function(e){return--e*e*e+1},t.cubicInOut=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};var n={linear:t.linear,quadraticIn:t.quadraticIn,quadraticOut:t.quadraticOut,quadraticInOut:t.quadraticInOut,cubicIn:t.cubicIn,cubicOut:t.cubicOut,cubicInOut:t.cubicInOut};t.default=n},8073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doEdgeCollideWithPoint=t.isPixelColored=void 0,t.isPixelColored=function(e,t,n){var r=new Uint8Array(4);return e.readPixels(t,e.drawingBufferHeight-n,1,1,e.RGBA,e.UNSIGNED_BYTE,r),r[3]>0},t.doEdgeCollideWithPoint=function(e,t,n,r,o,i,a){return!(e<n-a&&e<o-a||t<r-a&&t<i-a||e>n+a&&e>o+a||t>r+a&&t>i+a||!(Math.abs((o-n)*(r-t)-(n-e)*(i-r))/Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2))<a/2))}},8586:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateGraph=t.canUse32BitsIndices=t.extractPixel=t.getMatrixImpact=t.matrixFromCamera=t.getCorrectionRatio=t.floatColor=t.floatArrayColor=t.parseColor=t.zIndexOrdering=t.createNormalizationFunction=t.graphExtent=t.getPixelRatio=t.createElement=t.cancelFrame=t.requestFrame=t.assignDeep=t.assign=t.isPlainObject=void 0;var i=o(n(1880)),a=n(2237),l=n(1078);function s(e){return"object"==typeof e&&null!==e&&e.constructor===Object}t.isPlainObject=s,t.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e=e||{};for(var r=0,o=t.length;r<o;r++){var i=t[r];i&&Object.assign(e,i)}return e},t.assignDeep=function e(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t=t||{};for(var o=0,i=n.length;o<i;o++){var a=n[o];if(a)for(var l in a)s(a[l])?t[l]=e(t[l],a[l]):t[l]=a[l]}return t},t.requestFrame="undefined"!=typeof requestAnimationFrame?function(e){return requestAnimationFrame(e)}:function(e){return setTimeout(e,0)},t.cancelFrame="undefined"!=typeof cancelAnimationFrame?function(e){return cancelAnimationFrame(e)}:function(e){return clearTimeout(e)},t.createElement=function(e,t,n){var r=document.createElement(e);if(t)for(var o in t)r.style[o]=t[o];if(n)for(var o in n)r.setAttribute(o,n[o]);return r},t.getPixelRatio=function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1},t.graphExtent=function(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,o=-1/0;return e.forEachNode((function(e,i){var a=i.x,l=i.y;a<t&&(t=a),a>n&&(n=a),l<r&&(r=l),l>o&&(o=l)})),{x:[t,n],y:[r,o]}},t.createNormalizationFunction=function(e){var t=r(e.x,2),n=t[0],o=t[1],i=r(e.y,2),a=i[0],l=i[1],s=Math.max(o-n,l-a),c=(o+n)/2,u=(l+a)/2;(0===s||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(u)&&(u=0);var d=function(e){return{x:.5+(e.x-c)/s,y:.5+(e.y-u)/s}};return d.applyTo=function(e){e.x=.5+(e.x-c)/s,e.y=.5+(e.y-u)/s},d.inverse=function(e){return{x:c+s*(e.x-.5),y:u+s*(e.y-.5)}},d.ratio=s,d},t.zIndexOrdering=function(e,t,n){return n.sort((function(e,n){var r=t(e)||0,o=t(n)||0;return r<o?-1:r>o?1:0}))};var c=new Int8Array(4),u=new Int32Array(c.buffer,0,1),d=new Float32Array(c.buffer,0,1),p=/^\s*rgba?\s*\(/,h=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function f(e){var t=0,n=0,r=0,o=1;if("#"===e[0])4===e.length?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),9===e.length&&(o=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(p.test(e)){var i=e.match(h);i&&(t=+i[1],n=+i[2],r=+i[3],i[4]&&(o=+i[4]))}return{r:t,g:n,b:r,a:o}}t.parseColor=f;var g={};for(var m in l.HTML_COLORS)g[m]=y(l.HTML_COLORS[m]),g[l.HTML_COLORS[m]]=g[m];function y(e){if(void 0!==g[e])return g[e];var t=f(e),n=t.r,r=t.g,o=t.b,i=t.a;i=255*i|0,u[0]=4278190079&(i<<24|o<<16|r<<8|n);var a=d[0];return g[e]=a,a}function v(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}t.floatArrayColor=function(e){var t=f(e=l.HTML_COLORS[e]||e),n=t.r,r=t.g,o=t.b,i=t.a;return new Float32Array([n/255,r/255,o/255,i])},t.floatColor=y,t.getCorrectionRatio=v,t.matrixFromCamera=function(e,t,n,r,o){var i=e.angle,l=e.ratio,s=e.x,c=e.y,u=t.width,d=t.height,p=(0,a.identity)(),h=Math.min(u,d)-2*r,f=v(t,n);return o?((0,a.multiply)(p,(0,a.translate)((0,a.identity)(),s,c)),(0,a.multiply)(p,(0,a.scale)((0,a.identity)(),l)),(0,a.multiply)(p,(0,a.rotate)((0,a.identity)(),i)),(0,a.multiply)(p,(0,a.scale)((0,a.identity)(),u/h/2/f,d/h/2/f))):((0,a.multiply)(p,(0,a.scale)((0,a.identity)(),h/u*2*f,h/d*2*f)),(0,a.multiply)(p,(0,a.rotate)((0,a.identity)(),-i)),(0,a.multiply)(p,(0,a.scale)((0,a.identity)(),1/l)),(0,a.multiply)(p,(0,a.translate)((0,a.identity)(),-s,-c))),p},t.getMatrixImpact=function(e,t,n){var r=(0,a.multiplyVec2)(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),o=r.x,i=r.y;return 1/Math.sqrt(Math.pow(o,2)+Math.pow(i,2))/n.width},t.extractPixel=function(e,t,n,r){var o=r||new Uint8Array(4);return e.readPixels(t,n,1,1,e.RGBA,e.UNSIGNED_BYTE,o),o},t.canUse32BitsIndices=function(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||!!e.getExtension("OES_element_index_uint")},t.validateGraph=function(e){if(!(0,i.default)(e))throw new Error("Sigma: invalid graph instance.");e.forEachNode((function(e,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw new Error("Sigma: Coordinates of node ".concat(e," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},2237:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiplyVec2=t.multiply=t.translate=t.rotate=t.scale=t.identity=void 0,t.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},t.scale=function(e,t,n){return e[0]=t,e[4]="number"==typeof n?n:t,e},t.rotate=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e},t.translate=function(e,t,n){return e[6]=t,e[7]=n,e},t.multiply=function(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],l=e[5],s=e[6],c=e[7],u=e[8],d=t[0],p=t[1],h=t[2],f=t[3],g=t[4],m=t[5],y=t[6],v=t[7],b=t[8];return e[0]=d*n+p*i+h*s,e[1]=d*r+p*a+h*c,e[2]=d*o+p*l+h*u,e[3]=f*n+g*i+m*s,e[4]=f*r+g*a+m*c,e[5]=f*o+g*l+m*u,e[6]=y*n+v*i+b*s,e[7]=y*r+v*a+b*c,e[8]=y*o+v*l+b*u,e},t.multiplyVec2=function(e,t,n){void 0===n&&(n=1);var r=e[0],o=e[1],i=e[3],a=e[4],l=e[6],s=e[7],c=t.x,u=t.y;return{x:c*r+u*i+l*n,y:c*o+u*a+s*n}}},2564:e=>{"use strict";e.exports=function(){}},6330:(e,t,n)=>{"use strict";e.exports=n.p+"5271a9e7b6651c852e93.png"},8096:e=>{"use strict";e.exports=window["material-ui-coreStyles"].withStyles},1531:e=>{"use strict";e.exports=window["material-ui"].Avatar},683:e=>{"use strict";e.exports=window["material-ui"].IconButton},2298:e=>{"use strict";e.exports=window["material-ui"].SvgIcon},6871:e=>{"use strict";e.exports=window["material-ui"].TableSortLabel},6929:e=>{"use strict";e.exports=window["material-ui"].Tooltip},8310:t=>{"use strict";t.exports=e},2308:e=>{"use strict";e.exports=t},2396:e=>{"use strict";e.exports=n},3192:e=>{"use strict";e.exports=r},5099:e=>{"use strict";e.exports=o},3288:e=>{"use strict";e.exports=i},8156:e=>{"use strict";e.exports=a},5680:e=>{"use strict";e.exports=l},7111:e=>{"use strict";e.exports=s},4756:e=>{"use strict";e.exports=c},5751:e=>{"use strict";e.exports=u},7028:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1600:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},p={};function h(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={id:e,loaded:!1,exports:{}};return d[e].call(n.exports,n,n.exports,h),n.loaded=!0,n.exports}h.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return h.d(t,{a:t}),t},h.d=(e,t)=>{for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;h.g.importScripts&&(e=h.g.location+"");var t=h.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=e})();var f={};return(()=>{"use strict";h.r(f),h.d(f,{GraphView:()=>dj});var e={};h.r(e),h.d(e,{FILE:()=>PS,TEXT:()=>RS,URL:()=>MS});var t={};h.r(t),h.d(t,{MIN_NODE_CONTENT_WIDTH:()=>eA,nodeContentRenderer:()=>YD,rowHeight:()=>nA,scaffoldBlockPxWidth:()=>tA,slideRegionSize:()=>rA,treeNodeRenderer:()=>JD});var n=h(8156),r=h.n(n),o=h(4756);const i=window["material-ui-coreStyles"];var a=h(5099),l=h.n(a),s=h(8310),c=h.n(s),u=h(3288),d=h(5751),p=h.n(d);const g=window["material-ui"].Portal;var m=h.n(g),y=h(4176),v=h(2308),b=h.n(v);const x=(0,i.makeStyles)((()=>({errorBlock:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",minHeight:"58px",left:0,right:0,width:"calc(100% - 64px)",maxWidth:"1280px",margin:"0 auto",zIndex:1e4}})));function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}const S=e=>{const t=x(),i=(0,o.useSelector)(b().selectors.getAutoCloseInterval),a=(0,o.useSelector)(b().selectors.getUiError),l=(0,o.useDispatch)();return(0,n.useEffect)((()=>{a&&e.showErrorFromStore&&(S.addError({title:p().text("Error"),message:a}),l(v.ui.actions.errorSet(null)))}),[l,a,e.showErrorFromStore]),r().createElement(m(),{container:document.body},r().createElement(y.ZP,w({classes:{errorBlock:c()(t.errorBlock,(0,u.path)(["classes","errorBlock"],e))},autoCloseInterval:i},e)))};S.propTypes={showErrorFromStore:l().bool},S.addError=y.ZP.addError;const E=S;var O=function(e,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},O(e,t)};function C(e,t){function n(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_.apply(this,arguments)};function k(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n}function T(e){var t,n,r="";if(e)if("object"==typeof e)if(e.push)for(t=0;t<e.length;t++)e[t]&&(n=T(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(n=T(t))&&(r&&(r+=" "),r+=n);else"boolean"==typeof e||e.call||(r&&(r+=" "),r+=e);return r}function P(){for(var e,t=0,n="";t<arguments.length;)(e=T(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}const M=window["material-ui"].Typography;var R=h.n(M);const I=window["material-ui"].Button;var D=h.n(I);const A=window["material-ui"].Toolbar;var L=h.n(A),N=h(683),j=h.n(N);function z(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F.apply(this,arguments)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function W(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const H=r().createContext(null);function V(e,t){var r=Object.create(null);return e&&n.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&(0,n.isValidElement)(e)?t(e):e}(e)})),r}function G(e,t,n){return null!=n[t]?n[t]:e.props[t]}function q(e,t,r){var o=V(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var s in t){if(o[s])for(r=0;r<o[s].length;r++){var c=o[s][r];l[o[s][r]]=n(c)}l[s]=n(s)}for(r=0;r<i.length;r++)l[i[r]]=n(i[r]);return l}(t,o);return Object.keys(i).forEach((function(a){var l=i[a];if((0,n.isValidElement)(l)){var s=a in t,c=a in o,u=t[a],d=(0,n.isValidElement)(u)&&!u.props.in;!c||s&&!d?c||!s||d?c&&s&&(0,n.isValidElement)(u)&&(i[a]=(0,n.cloneElement)(l,{onExited:r.bind(null,l),in:u.props.in,exit:G(l,"exit",e),enter:G(l,"enter",e)})):i[a]=(0,n.cloneElement)(l,{in:!1}):i[a]=(0,n.cloneElement)(l,{onExited:r.bind(null,l),in:!0,exit:G(l,"exit",e),enter:G(l,"enter",e)})}})),i}var Y=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},K=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(U(U(r)));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}W(t,e);var o=t.prototype;return o.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},o.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var r,o,i=t.children,a=t.handleExited;return{children:t.firstRender?(r=e,o=a,V(r.children,(function(e){return(0,n.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:G(e,"appear",r),enter:G(e,"enter",r),exit:G(e,"exit",r)})}))):q(e,i,a),firstRender:!1}},o.handleExited=function(e,t){var n=V(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=F({},t.children);return delete n[e.key],{children:n}})))},o.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=z(e,["component","childFactory"]),i=this.state.contextValue,a=Y(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r().createElement(H.Provider,{value:i},a):r().createElement(H.Provider,{value:i},r().createElement(t,o,a))},t}(r().Component);K.propTypes={},K.defaultProps={component:"div",childFactory:function(e){return e}};const $=K;var Z=h(2196),X=h.n(Z),Q=h(4812),J=h.n(Q),ee=h(7111),te=h.n(ee);var ne="unmounted",re="exited",oe="entering",ie="entered",ae="exiting",le=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=re,r.appearStatus=oe):o=ie:o=t.unmountOnExit||t.mountOnEnter?ne:re,r.state={status:o},r.nextCallback=null,r}W(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ne?{status:re}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==oe&&n!==ie&&(t=oe):n!==oe&&n!==ie||(t=ae)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=te().findDOMNode(this);t===oe?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===re&&this.setState({status:ne})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:oe},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:ie},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:ie},(function(){n.props.onEntered(e)}))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:ae},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:re},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:re},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ne)return null;var t=this.props,n=t.children,o=z(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return r().createElement(H.Provider,{value:null},n(e,o));var i=r().Children.only(n);return r().createElement(H.Provider,{value:null},r().cloneElement(i,o))},t}(r().Component);function se(){}le.contextType=H,le.propTypes={},le.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:se,onEntering:se,onEntered:se,onExit:se,onExiting:se,onExited:se},le.UNMOUNTED=0,le.EXITED=1,le.ENTERING=2,le.ENTERED=3,le.EXITING=4;const ce=le;var ue=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return J()(e,t)}))},de=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){t.removeClasses(e,"exit"),t.addClass(e,n?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=n?"appear":"enter";t.addClass(e,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=n?"appear":"enter";t.removeClasses(e,r),t.addClass(e,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),t.addClass(e,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){t.addClass(e,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){t.removeClasses(e,"exit"),t.addClass(e,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}W(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"];"appear"===t&&"done"===n&&(r+=" "+this.getClassNames("enter").doneClassName),"active"===n&&e&&e.scrollTop,this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return X()(e,t)}))}(e,r)},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&ue(e,r),o&&ue(e,o),i&&ue(e,i)},n.render=function(){var e=this.props,t=(e.classNames,z(e,["classNames"]));return r().createElement(ce,F({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(r().Component);de.defaultProps={classNames:""},de.propTypes={};const pe=de;var he=h(2298),fe=h.n(he);const ge=window["material-ui"].CircularProgress;var me=h.n(ge);const ye=window["material-ui-styles"];function ve(e,t){if(null==e)return{};var n,r,o=z(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function xe(e){return e&&"object"===be(e)&&e.constructor===Object}function we(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?F({},e):e;return xe(e)&&xe(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(xe(t[o])&&o in e?r[o]=we(e[o],t[o],n):r[o]=t[o])})),r}var Se=["xs","sm","md","lg","xl"];function Ee(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,l=ve(e,["values","unit","step"]);function s(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function c(e,t){var r=Se.indexOf(t);return r===Se.length-1?s(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[Se[r+1]]?n[Se[r+1]]:t)-a/100).concat(o,")")}return F({keys:Se,values:n,up:s,down:function(e){var t=Se.indexOf(e)+1,r=n[Se[t]];return t===Se.length?s("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:c,only:function(e){return c(e,e)},width:function(e){return n[e]}},l)}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e,t,n){var r;return F({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return F({paddingLeft:t(2),paddingRight:t(2)},n,Oe({},e.up("sm"),F({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Oe(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Oe(r,e.up("sm"),{minHeight:64}),r)},n)}function _e(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}const ke={black:"#000",white:"#fff"},Te={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Pe="#7986cb",Me="#3f51b5",Re="#303f9f",Ie="#ff4081",De="#f50057",Ae="#c51162",Le="#e57373",Ne="#f44336",je="#d32f2f",ze="#ffb74d",Fe="#ff9800",Be="#f57c00",We="#64b5f6",Ue="#2196f3",He="#1976d2",Ve="#81c784",Ge="#4caf50",qe="#388e3c";function Ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function Ke(e){if(e.type)return e;if("#"===e.charAt(0))return Ke(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(_e(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function $e(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Ze(e){var t="hsl"===(e=Ke(e)).type?Ke(function(e){var t=(e=Ke(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},l="rgb",s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",s.push(t[3])),$e({type:l,values:s})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Xe(e,t){return e=Ke(e),t=Ye(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,$e(e)}var Qe={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ke.white,default:Te[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Je={text:{primary:ke.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Te[800],default:"#303030"},action:{active:ke.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function et(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Ke(e),t=Ye(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return $e(e)}(e.main,o):"dark"===t&&(e.dark=function(e,t){if(e=Ke(e),t=Ye(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return $e(e)}(e.main,i)))}function tt(e){var t=e.primary,n=void 0===t?{light:Pe,main:Me,dark:Re}:t,r=e.secondary,o=void 0===r?{light:Ie,main:De,dark:Ae}:r,i=e.error,a=void 0===i?{light:Le,main:Ne,dark:je}:i,l=e.warning,s=void 0===l?{light:ze,main:Fe,dark:Be}:l,c=e.info,u=void 0===c?{light:We,main:Ue,dark:He}:c,d=e.success,p=void 0===d?{light:Ve,main:Ge,dark:qe}:d,h=e.type,f=void 0===h?"light":h,g=e.contrastThreshold,m=void 0===g?3:g,y=e.tonalOffset,v=void 0===y?.2:y,b=ve(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=Ze(e),r=Ze(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Je.text.primary)>=m?Je.text.primary:Qe.text.primary;return t}var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=F({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(_e(4,t));if("string"!=typeof e.main)throw new Error(_e(5,JSON.stringify(e.main)));return et(e,"light",n,v),et(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},S={dark:Je,light:Qe};return we(F({common:ke,type:f,primary:w(n),secondary:w(o,"A400","A200","A700"),error:w(a),warning:w(s),info:w(u),success:w(p),grey:Te,contrastThreshold:m,getContrastText:x,augmentColor:w,tonalOffset:v},S[f]),b)}function nt(e){return Math.round(1e5*e)/1e5}var rt={textTransform:"uppercase"},ot='"Roboto", "Helvetica", "Arial", sans-serif';function it(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?ot:r,i=n.fontSize,a=void 0===i?14:i,l=n.fontWeightLight,s=void 0===l?300:l,c=n.fontWeightRegular,u=void 0===c?400:c,d=n.fontWeightMedium,p=void 0===d?500:d,h=n.fontWeightBold,f=void 0===h?700:h,g=n.htmlFontSize,m=void 0===g?16:g,y=n.allVariants,v=n.pxToRem,b=ve(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,w=v||function(e){return"".concat(e/m*x,"rem")},S=function(e,t,n,r,i){return F({fontFamily:o,fontWeight:e,fontSize:w(t),lineHeight:n},o===ot?{letterSpacing:"".concat(nt(r/t),"em")}:{},i,y)},E={h1:S(s,96,1.167,-1.5),h2:S(s,60,1.2,-.5),h3:S(u,48,1.167,0),h4:S(u,34,1.235,.25),h5:S(u,24,1.334,0),h6:S(p,20,1.6,.15),subtitle1:S(u,16,1.75,.15),subtitle2:S(p,14,1.57,.1),body1:S(u,16,1.5,.15),body2:S(u,14,1.43,.15),button:S(p,14,1.75,.4,rt),caption:S(u,12,1.66,.4),overline:S(u,12,2.66,1,rt)};return we(F({htmlFontSize:m,pxToRem:w,round:nt,fontFamily:o,fontSize:a,fontWeightLight:s,fontWeightRegular:u,fontWeightMedium:p,fontWeightBold:f},E),b,{clone:!1})}function at(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const lt=["none",at(0,2,1,-1,0,1,1,0,0,1,3,0),at(0,3,1,-2,0,2,2,0,0,1,5,0),at(0,3,3,-2,0,3,4,0,0,1,8,0),at(0,2,4,-1,0,4,5,0,0,1,10,0),at(0,3,5,-1,0,5,8,0,0,1,14,0),at(0,3,5,-1,0,6,10,0,0,1,18,0),at(0,4,5,-2,0,7,10,1,0,2,16,1),at(0,5,5,-3,0,8,10,1,0,3,14,2),at(0,5,6,-3,0,9,12,1,0,3,16,2),at(0,6,6,-3,0,10,14,1,0,4,18,3),at(0,6,7,-4,0,11,15,1,0,4,20,3),at(0,7,8,-4,0,12,17,2,0,5,22,4),at(0,7,8,-4,0,13,19,2,0,5,24,4),at(0,7,9,-4,0,14,21,2,0,5,26,4),at(0,8,9,-5,0,15,22,2,0,6,28,5),at(0,8,10,-5,0,16,24,2,0,6,30,5),at(0,8,11,-5,0,17,26,2,0,6,32,5),at(0,9,11,-5,0,18,28,2,0,7,34,6),at(0,9,12,-6,0,19,29,2,0,7,36,6),at(0,10,13,-6,0,20,31,3,0,8,38,7),at(0,10,13,-6,0,21,33,3,0,8,40,7),at(0,10,14,-6,0,22,35,3,0,8,42,7),at(0,11,14,-7,0,23,36,3,0,9,44,8),at(0,11,15,-7,0,24,38,3,0,9,46,8)],st={borderRadius:4};function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ut(e,t){if(e){if("string"==typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}}function dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||ut(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pt={xs:0,sm:600,md:960,lg:1280,xl:1920},ht={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(pt[e],"px)")}};function ft(e){return e&&"object"===be(e)&&e.constructor===Object}function gt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?F({},e):e;return ft(e)&&ft(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(ft(t[o])&&o in e?r[o]=gt(e[o],t[o],n):r[o]=t[o])})),r}const mt=function(e,t){return t?gt(e,t,{clone:!1}):e};var yt,vt,bt={m:"margin",p:"padding"},xt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},wt={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},St=(yt=function(e){if(e.length>2){if(!wt[e])return[e];e=wt[e]}var t=dt(e.split(""),2),n=t[0],r=t[1],o=bt[n],i=xt[r]||"";return Array.isArray(i)?i.map((function(e){return o+e})):[o+i]},vt={},function(e){return void 0===vt[e]&&(vt[e]=yt(e)),vt[e]}),Et=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function Ot(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function Ct(e){var t=Ot(e.theme);return Object.keys(e).map((function(n){if(-1===Et.indexOf(n))return null;var r=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}(St(n),t),o=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||ht;return t.reduce((function(e,o,i){return e[r.up(r.keys[i])]=n(t[i]),e}),{})}if("object"===be(t)){var o=e.theme.breakpoints||ht;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}(e,o,r)})).reduce(mt,{})}function _t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Ot({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}Ct.propTypes={},Ct.filterProps=Et;var kt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Tt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Pt(e){return"".concat(Math.round(e),"ms")}const Mt={easing:kt,duration:Tt,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Tt.standard:n,o=t.easing,i=void 0===o?kt.easeInOut:o,a=t.delay,l=void 0===a?0:a;return ve(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Pt(r)," ").concat(i," ").concat("string"==typeof l?l:Pt(l))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Rt={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},It=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,l=e.spacing,s=e.typography,c=void 0===s?{}:s,u=ve(e,["breakpoints","mixins","palette","spacing","typography"]),d=tt(a),p=Ee(n),h=_t(l),f=we({breakpoints:p,direction:"ltr",mixins:Ce(p,h,o),overrides:{},palette:d,props:{},shadows:lt,typography:it(d,c),spacing:h,shape:st,transitions:Mt,zIndex:Rt},u),g=arguments.length,m=new Array(g>1?g-1:0),y=1;y<g;y++)m[y-1]=arguments[y];return m.reduce((function(e,t){return we(e,t)}),f)}(),Dt=function(e,t){return(0,ye.withStyles)(e,F({defaultTheme:It},t))};function At(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Lt(e,t){return n.useMemo((function(){return null==e&&null==t?null:function(n){At(e,n),At(t,n)}}),[e,t])}var Nt="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function jt(e){var t=n.useRef(e);return Nt((function(){t.current=e})),n.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}var zt=!0,Ft=!1,Bt=null,Wt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ut(e){e.metaKey||e.altKey||e.ctrlKey||(zt=!0)}function Ht(){zt=!1}function Vt(){"hidden"===this.visibilityState&&Ft&&(zt=!0)}function Gt(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return zt||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Wt[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function qt(){Ft=!0,window.clearTimeout(Bt),Bt=window.setTimeout((function(){Ft=!1}),100)}function Yt(){var e=n.useCallback((function(e){var t,n=ee.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Ut,!0),t.addEventListener("mousedown",Ht,!0),t.addEventListener("pointerdown",Ht,!0),t.addEventListener("touchstart",Ht,!0),t.addEventListener("visibilitychange",Vt,!0))}),[]);return{isFocusVisible:Gt,onBlurVisible:qt,ref:e}}function Kt(e){return function(e){if(Array.isArray(e))return ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ut(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const $t=r().createContext(null);function Zt(e,t){var r=Object.create(null);return e&&n.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&(0,n.isValidElement)(e)?t(e):e}(e)})),r}function Xt(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qt(e,t,r){var o=Zt(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var s in t){if(o[s])for(r=0;r<o[s].length;r++){var c=o[s][r];l[o[s][r]]=n(c)}l[s]=n(s)}for(r=0;r<i.length;r++)l[i[r]]=n(i[r]);return l}(t,o);return Object.keys(i).forEach((function(a){var l=i[a];if((0,n.isValidElement)(l)){var s=a in t,c=a in o,u=t[a],d=(0,n.isValidElement)(u)&&!u.props.in;!c||s&&!d?c||!s||d?c&&s&&(0,n.isValidElement)(u)&&(i[a]=(0,n.cloneElement)(l,{onExited:r.bind(null,l),in:u.props.in,exit:Xt(l,"exit",e),enter:Xt(l,"enter",e)})):i[a]=(0,n.cloneElement)(l,{in:!1}):i[a]=(0,n.cloneElement)(l,{onExited:r.bind(null,l),in:!0,exit:Xt(l,"exit",e),enter:Xt(l,"enter",e)})}})),i}var Jt=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},en=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(U(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}W(t,e);var o=t.prototype;return o.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},o.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var r,o,i=t.children,a=t.handleExited;return{children:t.firstRender?(r=e,o=a,Zt(r.children,(function(e){return(0,n.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:Xt(e,"appear",r),enter:Xt(e,"enter",r),exit:Xt(e,"exit",r)})}))):Qt(e,i,a),firstRender:!1}},o.handleExited=function(e,t){var n=Zt(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=F({},t.children);return delete n[e.key],{children:n}})))},o.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=z(e,["component","childFactory"]),i=this.state.contextValue,a=Jt(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r().createElement($t.Provider,{value:i},a):r().createElement($t.Provider,{value:i},r().createElement(t,o,a))},t}(r().Component);en.propTypes={},en.defaultProps={component:"div",childFactory:function(e){return e}};const tn=en;var nn="undefined"==typeof window?n.useEffect:n.useLayoutEffect;const rn=function(e){var t=e.classes,r=e.pulsate,o=void 0!==r&&r,i=e.rippleX,a=e.rippleY,l=e.rippleSize,s=e.in,c=e.onExited,u=void 0===c?function(){}:c,d=e.timeout,p=n.useState(!1),h=p[0],f=p[1],g=P(t.ripple,t.rippleVisible,o&&t.ripplePulsate),m={width:l,height:l,top:-l/2+a,left:-l/2+i},y=P(t.child,h&&t.childLeaving,o&&t.childPulsate),v=jt(u);return nn((function(){if(!s){f(!0);var e=setTimeout(v,d);return function(){clearTimeout(e)}}}),[v,s,d]),n.createElement("span",{className:g,style:m},n.createElement("span",{className:y}))};var on=n.forwardRef((function(e,t){var r=e.center,o=void 0!==r&&r,i=e.classes,a=e.className,l=ve(e,["center","classes","className"]),s=n.useState([]),c=s[0],u=s[1],d=n.useRef(0),p=n.useRef(null);n.useEffect((function(){p.current&&(p.current(),p.current=null)}),[c]);var h=n.useRef(!1),f=n.useRef(null),g=n.useRef(null),m=n.useRef(null);n.useEffect((function(){return function(){clearTimeout(f.current)}}),[]);var y=n.useCallback((function(e){var t=e.pulsate,r=e.rippleX,o=e.rippleY,a=e.rippleSize,l=e.cb;u((function(e){return[].concat(Kt(e),[n.createElement(rn,{key:d.current,classes:i,timeout:550,pulsate:t,rippleX:r,rippleY:o,rippleSize:a})])})),d.current+=1,p.current=l}),[i]),v=n.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,a=t.center,l=void 0===a?o||t.pulsate:a,s=t.fakeElement,c=void 0!==s&&s;if("mousedown"===e.type&&h.current)h.current=!1;else{"touchstart"===e.type&&(h.current=!0);var u,d,p,v=c?null:m.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,w=x.clientX,S=x.clientY;u=Math.round(w-b.left),d=Math.round(S-b.top)}if(l)(p=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(p+=1);else{var E=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,O=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(O,2))}e.touches?null===g.current&&(g.current=function(){y({pulsate:i,rippleX:u,rippleY:d,rippleSize:p,cb:n})},f.current=setTimeout((function(){g.current&&(g.current(),g.current=null)}),80)):y({pulsate:i,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[o,y]),b=n.useCallback((function(){v({},{pulsate:!0})}),[v]),x=n.useCallback((function(e,t){if(clearTimeout(f.current),"touchend"===e.type&&g.current)return e.persist(),g.current(),g.current=null,void(f.current=setTimeout((function(){x(e,t)})));g.current=null,u((function(e){return e.length>0?e.slice(1):e})),p.current=t}),[]);return n.useImperativeHandle(t,(function(){return{pulsate:b,start:v,stop:x}}),[b,v,x]),n.createElement("span",F({className:P(i.root,a),ref:m},l),n.createElement(tn,{component:null,exit:!0},c))}));const an=Dt((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(n.memo(on));var ln=n.forwardRef((function(e,t){var r=e.action,o=e.buttonRef,i=e.centerRipple,a=void 0!==i&&i,l=e.children,s=e.classes,c=e.className,u=e.component,d=void 0===u?"button":u,p=e.disabled,h=void 0!==p&&p,f=e.disableRipple,g=void 0!==f&&f,m=e.disableTouchRipple,y=void 0!==m&&m,v=e.focusRipple,b=void 0!==v&&v,x=e.focusVisibleClassName,w=e.onBlur,S=e.onClick,E=e.onFocus,O=e.onFocusVisible,C=e.onKeyDown,_=e.onKeyUp,k=e.onMouseDown,T=e.onMouseLeave,M=e.onMouseUp,R=e.onTouchEnd,I=e.onTouchMove,D=e.onTouchStart,A=e.onDragLeave,L=e.tabIndex,N=void 0===L?0:L,j=e.TouchRippleProps,z=e.type,B=void 0===z?"button":z,W=ve(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),U=n.useRef(null),H=n.useRef(null),V=n.useState(!1),G=V[0],q=V[1];h&&G&&q(!1);var Y=Yt(),K=Y.isFocusVisible,$=Y.onBlurVisible,Z=Y.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return jt((function(r){return t&&t(r),!n&&H.current&&H.current[e](r),!0}))}n.useImperativeHandle(r,(function(){return{focusVisible:function(){q(!0),U.current.focus()}}}),[]),n.useEffect((function(){G&&b&&!g&&H.current.pulsate()}),[g,b,G]);var Q=X("start",k),J=X("stop",A),te=X("stop",M),ne=X("stop",(function(e){G&&e.preventDefault(),T&&T(e)})),re=X("start",D),oe=X("stop",R),ie=X("stop",I),ae=X("stop",(function(e){G&&($(e),q(!1)),w&&w(e)}),!1),le=jt((function(e){U.current||(U.current=e.currentTarget),K(e)&&(q(!0),O&&O(e)),E&&E(e)})),se=function(){var e=ee.findDOMNode(U.current);return d&&"button"!==d&&!("A"===e.tagName&&e.href)},ce=n.useRef(!1),ue=jt((function(e){b&&!ce.current&&G&&H.current&&" "===e.key&&(ce.current=!0,e.persist(),H.current.stop(e,(function(){H.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!h&&(e.preventDefault(),S&&S(e))})),de=jt((function(e){b&&" "===e.key&&H.current&&G&&!e.defaultPrevented&&(ce.current=!1,e.persist(),H.current.stop(e,(function(){H.current.pulsate(e)}))),_&&_(e),S&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&S(e)})),pe=d;"button"===pe&&W.href&&(pe="a");var he={};"button"===pe?(he.type=B,he.disabled=h):("a"===pe&&W.href||(he.role="button"),he["aria-disabled"]=h);var fe=Lt(o,t),ge=Lt(Z,U),me=Lt(fe,ge),ye=n.useState(!1),be=ye[0],xe=ye[1];n.useEffect((function(){xe(!0)}),[]);var we=be&&!g&&!h;return n.createElement(pe,F({className:P(s.root,c,G&&[s.focusVisible,x],h&&s.disabled),onBlur:ae,onClick:S,onFocus:le,onKeyDown:ue,onKeyUp:de,onMouseDown:Q,onMouseLeave:ne,onMouseUp:te,onDragLeave:J,onTouchEnd:oe,onTouchMove:ie,onTouchStart:re,ref:me,tabIndex:h?-1:N},he,W),l,we?n.createElement(an,F({ref:H,center:a},j)):null)}));const sn=Dt({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(ln);function cn(e){if("string"!=typeof e)throw new Error(_e(7));return e.charAt(0).toUpperCase()+e.slice(1)}var un=n.forwardRef((function(e,t){var r=e.edge,o=void 0!==r&&r,i=e.children,a=e.classes,l=e.className,s=e.color,c=void 0===s?"default":s,u=e.disabled,d=void 0!==u&&u,p=e.disableFocusRipple,h=void 0!==p&&p,f=e.size,g=void 0===f?"medium":f,m=ve(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return n.createElement(sn,F({className:P(a.root,l,"default"!==c&&a["color".concat(cn(c))],d&&a.disabled,"small"===g&&a["size".concat(cn(g))],{start:a.edgeStart,end:a.edgeEnd}[o]),centerRipple:!0,focusRipple:!h,disabled:d,ref:t},m),n.createElement("span",{className:a.label},i))}));const dn=Dt((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Xe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Xe(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Xe(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(un);var pn=[0,1,2,3,4,5,6,7,8,9,10],hn=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var gn=n.forwardRef((function(e,t){var r=e.alignContent,o=void 0===r?"stretch":r,i=e.alignItems,a=void 0===i?"stretch":i,l=e.classes,s=e.className,c=e.component,u=void 0===c?"div":c,d=e.container,p=void 0!==d&&d,h=e.direction,f=void 0===h?"row":h,g=e.item,m=void 0!==g&&g,y=e.justify,v=void 0===y?"flex-start":y,b=e.lg,x=void 0!==b&&b,w=e.md,S=void 0!==w&&w,E=e.sm,O=void 0!==E&&E,C=e.spacing,_=void 0===C?0:C,k=e.wrap,T=void 0===k?"wrap":k,M=e.xl,R=void 0!==M&&M,I=e.xs,D=void 0!==I&&I,A=e.zeroMinWidth,L=void 0!==A&&A,N=ve(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),j=P(l.root,s,p&&[l.container,0!==_&&l["spacing-xs-".concat(String(_))]],m&&l.item,L&&l.zeroMinWidth,"row"!==f&&l["direction-xs-".concat(String(f))],"wrap"!==T&&l["wrap-xs-".concat(String(T))],"stretch"!==a&&l["align-items-xs-".concat(String(a))],"stretch"!==o&&l["align-content-xs-".concat(String(o))],"flex-start"!==v&&l["justify-xs-".concat(String(v))],!1!==D&&l["grid-xs-".concat(String(D))],!1!==O&&l["grid-sm-".concat(String(O))],!1!==S&&l["grid-md-".concat(String(S))],!1!==x&&l["grid-lg-".concat(String(x))],!1!==R&&l["grid-xl-".concat(String(R))]);return n.createElement(u,F({className:j,ref:t},N))})),mn=Dt((function(e){return F({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return pn.forEach((function(t){var r=e.spacing(t);0!==r&&(n["spacing-".concat("xs","-").concat(t)]={margin:"-".concat(fn(r,2)),width:"calc(100% + ".concat(fn(r),")"),"& > $item":{padding:fn(r,2)}})})),n}(e),e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};hn.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var o="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:o,flexGrow:0,maxWidth:o}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?F(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(gn);const yn=mn,vn=window["material-ui"].DialogActions;var bn=h.n(vn);const xn=window["material-ui"].DialogContent;var wn=h.n(xn);const Sn=window["material-ui"].Dialog;var En=h.n(Sn);const On=window["material-ui"].Popover;var Cn=h.n(On);const _n=window["material-ui"].TextField;var kn=h.n(_n);const Tn=window["material-ui"].InputAdornment;var Pn=h.n(Tn),Mn=function(e){function t(t){var n;return(n=e.call(this,t)||this)._state=null,n._del=!1,n._handleChange=function(e){var t=n.state.value,r=e.target.value,o=e.target,i=r.length>t.length,a=n._del,l=t===n.props.format(r);n.setState({value:r,local:!0},(function(){var e=o.selectionStart,s=n.props.refuse||/[^\d]+/g,c=r.substr(0,e).replace(s,"");if(n._state={input:o,before:c,op:i,di:a&&l,del:a},n.props.replace&&n.props.replace(t)&&i&&!l){for(var u=-1,d=0;d!==c.length;++d)u=Math.max(u,r.toLowerCase().indexOf(c[d].toLowerCase(),u+1));var p=r.substr(u+1).replace(s,"")[0];u=r.indexOf(p,u+1),r=""+r.substr(0,u)+r.substr(u+1)}var h=n.props.format(r);t===h?n.setState({value:r}):n.props.onChange(h)}))},n._hKD=function(e){"Delete"===e.code&&(n._del=!0)},n._hKU=function(e){"Delete"===e.code&&(n._del=!1)},n.state={value:t.value,local:!0},n}W(t,e),t.getDerivedStateFromProps=function(e,t){return{value:t.local?t.value:e.value,local:!1}};var n=t.prototype;return n.render=function(){var e=this._handleChange,t=this.state.value;return(0,this.props.children)({value:t,onChange:e})},n.componentWillUnmount=function(){document.removeEventListener("keydown",this._hKD),document.removeEventListener("keyup",this._hKU)},n.componentDidMount=function(){document.addEventListener("keydown",this._hKD),document.addEventListener("keyup",this._hKU)},n.componentDidUpdate=function(){var e=this._state;if(e){for(var t=this.state.value,n=-1,r=0;r!==e.before.length;++r)n=Math.max(n,t.toLowerCase().indexOf(e.before[r].toLowerCase(),n+1));if(this.props.replace&&(e.op||e.del&&!e.di))for(;t[n+1]&&(this.props.refuse||/[^\d]+/).test(t[n+1]);)n+=1;e.input.selectionStart=e.input.selectionEnd=n+1+(e.di?1:0)}this._state=null},t}(n.Component);const Rn=window["material-ui"].Tab;var In=h.n(Rn);const Dn=window["material-ui"].Tabs;var An=h.n(Dn);const Ln=window["material-ui"].Paper;var Nn=h.n(Ln),jn=(0,n.createContext)(null),zn=function(e){var t=e.utils,r=e.children,o=e.locale,i=e.libInstance,a=(0,n.useMemo)((function(){return new t({locale:o,moment:i})}),[t,i,o]);return(0,n.createElement)(jn.Provider,{value:a,children:r})};function Fn(){var e=(0,n.useContext)(jn);return function(e){if(!e)throw new Error("Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports. Recommendation: use named imports from the module index.")}(e),e}var Bn=(0,i.makeStyles)((function(e){var t="light"===e.palette.type?e.palette.primary.contrastText:e.palette.getContrastText(e.palette.background.default);return{toolbarTxt:{color:(0,i.fade)(t,.54)},toolbarBtnSelected:{color:t}}}),{name:"MuiPickersToolbarText"}),Wn=function(e){var t,r=e.selected,o=e.label,i=e.className,a=void 0===i?null:i,l=k(e,["selected","label","className"]),s=Bn();return(0,n.createElement)(R(),_({children:o,className:P(s.toolbarTxt,a,(t={},t[s.toolbarBtnSelected]=r,t))},l))},Un=function(e){var t=e.classes,r=e.className,o=void 0===r?null:r,i=e.label,a=e.selected,l=e.variant,s=e.align,c=e.typographyClassName,u=k(e,["classes","className","label","selected","variant","align","typographyClassName"]);return(0,n.createElement)(D(),_({variant:"text",className:P(t.toolbarBtn,o)},u),(0,n.createElement)(Wn,{align:s,className:c,variant:l,label:i,selected:a}))};Un.defaultProps={className:""};var Hn=(0,i.createStyles)({toolbarBtn:{padding:0,minWidth:"16px",textTransform:"none"}}),Vn=(0,i.withStyles)(Hn,{name:"MuiPickersToolbarButton"})(Un),Gn=(0,i.makeStyles)((function(e){return{toolbar:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",height:100,backgroundColor:"light"===e.palette.type?e.palette.primary.main:e.palette.background.default},toolbarLandscape:{height:"auto",maxWidth:150,padding:8,justifyContent:"flex-start"}}}),{name:"MuiPickersToolbar"}),qn=function(e){var t,r=e.children,o=e.isLandscape,i=e.className,a=void 0===i?null:i,l=k(e,["children","isLandscape","className"]),s=Gn();return(0,n.createElement)(L(),_({className:P(s.toolbar,(t={},t[s.toolbarLandscape]=o,t),a)},l),r)};function Yn(e,t){return Array.isArray(t)?t.every((function(t){return-1!==e.indexOf(t)})):-1!==e.indexOf(t)}var Kn=function(e){return 1===e.length&&"year"===e[0]},$n=function(e){return 2===e.length&&Yn(e,"month")&&Yn(e,"year")},Zn=(0,i.makeStyles)({toolbar:{flexDirection:"column",alignItems:"flex-start"},toolbarLandscape:{padding:16},dateLandscape:{marginRight:16}},{name:"MuiPickersDatePickerRoot"}),Xn=function(e){var t,r,o=e.date,i=e.views,a=e.setOpenView,l=e.isLandscape,s=e.openView,c=Fn(),u=Zn(),d=(0,n.useMemo)((function(){return Kn(i)}),[i]),p=(0,n.useMemo)((function(){return $n(i)}),[i]);return(0,n.createElement)(qn,{isLandscape:l,className:P((t={},t[u.toolbar]=!d,t[u.toolbarLandscape]=l,t))},(0,n.createElement)(Vn,{variant:d?"h3":"subtitle1",onClick:function(){return a("year")},selected:"year"===s,label:c.getYearText(o)}),!d&&!p&&(0,n.createElement)(Vn,{variant:"h4",selected:"date"===s,onClick:function(){return a("date")},align:l?"left":"center",label:c.getDatePickerHeaderText(o),className:P((r={},r[u.dateLandscape]=l,r))}),p&&(0,n.createElement)(Vn,{variant:"h4",onClick:function(){return a("month")},selected:"month"===s,label:c.getMonthText(o)}))},Qn=((0,a.oneOfType)([a.object,a.string,a.number,(0,a.instanceOf)(Date)]),(0,a.oneOf)(["year","month","day"]),{ampm:!0,invalidDateMessage:"Invalid Time Format"}),Jn={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),invalidDateMessage:"Invalid Date Format",minDateMessage:"Date should not be before minimal date",maxDateMessage:"Date should not be after maximal date",allowKeyboardControl:!0},er=_({},Qn,Jn,{showTabs:!0}),tr=(0,i.makeStyles)((function(e){return{day:{width:36,height:36,fontSize:e.typography.caption.fontSize,margin:"0 2px",color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium,padding:0},hidden:{opacity:0,pointerEvents:"none"},current:{color:e.palette.primary.main,fontWeight:600},daySelected:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{backgroundColor:e.palette.primary.main}},dayDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersDay"}),nr=function(e){var t,r=e.children,o=e.disabled,i=e.hidden,a=e.current,l=e.selected,s=k(e,["children","disabled","hidden","current","selected"]),c=tr(),u=P(c.day,((t={})[c.hidden]=i,t[c.current]=a,t[c.daySelected]=l,t[c.dayDisabled]=o,t));return(0,n.createElement)(j(),_({className:u,tabIndex:i||o?-1:0},s),(0,n.createElement)(R(),{variant:"body2",color:"inherit"},r))};nr.displayName="Day",nr.defaultProps={disabled:!1,hidden:!1,current:!1,selected:!1};var rr=function(e){var t=e.children,r=e.value,o=e.disabled,i=e.onSelect,a=e.dayInCurrentMonth,l=k(e,["children","value","disabled","onSelect","dayInCurrentMonth"]),s=(0,n.useCallback)((function(){return i(r)}),[i,r]);return(0,n.createElement)("div",_({role:"presentation",onClick:a&&!o?s:void 0,onKeyPress:a&&!o?s:void 0},l),t)},or=(0,i.makeStyles)((function(e){var t=e.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{transitionContainer:{display:"block",position:"relative","& > *":{position:"absolute",top:0,right:0,left:0}},"slideEnter-left":{willChange:"transform",transform:"translate(100%)"},"slideEnter-right":{willChange:"transform",transform:"translate(-100%)"},slideEnterActive:{transform:"translate(0%)",transition:t},slideExit:{transform:"translate(0%)"},"slideExitActiveLeft-left":{willChange:"transform",transform:"translate(-200%)",transition:t},"slideExitActiveLeft-right":{willChange:"transform",transform:"translate(200%)",transition:t}}}),{name:"MuiPickersSlideTransition"}),ir=function(e){var t=e.children,r=e.transKey,o=e.slideDirection,i=e.className,a=void 0===i?null:i,l=or(),s={exit:l.slideExit,enterActive:l.slideEnterActive,enter:l["slideEnter-"+o],exitActive:l["slideExitActiveLeft-"+o]};return(0,n.createElement)($,{className:P(l.transitionContainer,a),childFactory:function(e){return(0,n.cloneElement)(e,{classNames:s})}},(0,n.createElement)(pe,{mountOnEnter:!0,unmountOnExit:!0,key:r+o,timeout:350,classNames:s,children:t}))},ar=(0,i.makeStyles)((function(e){return{switchHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:e.spacing(.5),marginBottom:e.spacing(1)},transitionContainer:{width:"100%",overflow:"hidden",height:23},iconButton:{zIndex:1,backgroundColor:e.palette.background.paper},daysHeader:{display:"flex",justifyContent:"center",alignItems:"center",maxHeight:16},dayLabel:{width:36,margin:"0 2px",textAlign:"center",color:e.palette.text.hint}}}),{name:"MuiPickersCalendarHeader"}),lr=function(e){var t=e.currentMonth,r=e.onMonthChange,o=e.leftArrowIcon,a=e.rightArrowIcon,l=e.leftArrowButtonProps,s=e.rightArrowButtonProps,c=e.disablePrevMonth,u=e.disableNextMonth,d=e.slideDirection,p=Fn(),h=ar(),f="rtl"===(0,i.useTheme)().direction;return(0,n.createElement)("div",null,(0,n.createElement)("div",{className:h.switchHeader},(0,n.createElement)(j(),_({},l,{disabled:c,onClick:function(){return r(p.getPreviousMonth(t),"right")},className:h.iconButton}),f?a:o),(0,n.createElement)(ir,{slideDirection:d,transKey:t.toString(),className:h.transitionContainer},(0,n.createElement)(R(),{align:"center",variant:"body1"},p.getCalendarHeaderText(t))),(0,n.createElement)(j(),_({},s,{disabled:u,onClick:function(){return r(p.getNextMonth(t),"left")},className:h.iconButton}),f?o:a)),(0,n.createElement)("div",{className:h.daysHeader},p.getWeekdays().map((function(e,t){return(0,n.createElement)(R(),{key:t,variant:"caption",className:h.dayLabel},e)}))))};lr.displayName="CalendarHeader",lr.defaultProps={leftArrowIcon:(0,n.createElement)((function(e){return r().createElement(fe(),_({},e),r().createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),r().createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))}),null),rightArrowIcon:(0,n.createElement)((function(e){return r().createElement(fe(),_({},e),r().createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),r().createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))}),null),disablePrevMonth:!1,disableNextMonth:!1};var sr="undefined"==typeof window?n.useEffect:n.useLayoutEffect;function cr(e,t){var n=t[e.key];n&&(n(),e.preventDefault())}function ur(e,t){var r=(0,n.useRef)(t);sr((function(){r.current=t})),(0,n.useEffect)((function(){if(e){var n=function(e){cr(e,t)};return window.addEventListener("keydown",n),function(){window.removeEventListener("keydown",n)}}}),[e,t])}var dr,pr,hr=function(e){var t=e.onKeyDown;return(0,n.useEffect)((function(){return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[t]),null},fr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={slideDirection:"left",currentMonth:t.props.utils.startOfMonth(t.props.date),loadingQueue:0},t.pushToLoadingQueue=function(){var e=t.state.loadingQueue+1;t.setState({loadingQueue:e})},t.popFromLoadingQueue=function(){var e=t.state.loadingQueue;e=e<=0?0:e-1,t.setState({loadingQueue:e})},t.handleChangeMonth=function(e,n){if(t.setState({currentMonth:e,slideDirection:n}),t.props.onMonthChange){var r=t.props.onMonthChange(e);r&&(t.pushToLoadingQueue(),r.then((function(){t.popFromLoadingQueue()})))}},t.validateMinMaxDate=function(e){var n=t.props,r=n.minDate,o=n.maxDate,i=n.utils,a=n.disableFuture,l=n.disablePast,s=i.date();return Boolean(a&&i.isAfterDay(e,s)||l&&i.isBeforeDay(e,s)||r&&i.isBeforeDay(e,i.date(r))||o&&i.isAfterDay(e,i.date(o)))},t.shouldDisablePrevMonth=function(){var e=t.props,n=e.utils,r=e.disablePast,o=e.minDate,i=n.date(),a=n.startOfMonth(r&&n.isAfter(i,n.date(o))?i:n.date(o));return!n.isBefore(a,t.state.currentMonth)},t.shouldDisableNextMonth=function(){var e=t.props,n=e.utils,r=e.disableFuture,o=e.maxDate,i=n.date(),a=n.startOfMonth(r&&n.isBefore(i,n.date(o))?i:n.date(o));return!n.isAfter(a,t.state.currentMonth)},t.shouldDisableDate=function(e){var n=t.props.shouldDisableDate;return t.validateMinMaxDate(e)||Boolean(n&&n(e))},t.handleDaySelect=function(e,n){void 0===n&&(n=!0);var r=t.props,o=r.date,i=r.utils;t.props.onChange(i.mergeDateAndTime(e,o),n)},t.moveToDay=function(e){var n=t.props.utils;e&&!t.shouldDisableDate(e)&&(n.getMonth(e)!==n.getMonth(t.state.currentMonth)&&t.handleChangeMonth(n.startOfMonth(e),"left"),t.handleDaySelect(e,!1))},t.handleKeyDown=function(e){var n=t.props,r=n.theme,o=n.date,i=n.utils;cr(e,{ArrowUp:function(){return t.moveToDay(i.addDays(o,-7))},ArrowDown:function(){return t.moveToDay(i.addDays(o,7))},ArrowLeft:function(){return t.moveToDay(i.addDays(o,"ltr"===r.direction?-1:1))},ArrowRight:function(){return t.moveToDay(i.addDays(o,"ltr"===r.direction?1:-1))}})},t.renderWeeks=function(){var e=t.props,r=e.utils,o=e.classes;return r.getWeekArray(t.state.currentMonth).map((function(e){return(0,n.createElement)("div",{key:"week-"+e[0].toString(),className:o.week},t.renderDays(e))}))},t.renderDays=function(e){var r=t.props,o=r.date,i=r.renderDay,a=r.utils,l=a.date(),s=a.startOfDay(o),c=a.getMonth(t.state.currentMonth);return e.map((function(e){var r=t.shouldDisableDate(e),o=a.getMonth(e)===c,u=(0,n.createElement)(nr,{disabled:r,current:a.isSameDay(e,l),hidden:!o,selected:a.isSameDay(s,e)},a.getDayText(e));return i&&(u=i(e,s,o,u)),(0,n.createElement)(rr,{value:e,key:e.toString(),disabled:r,dayInCurrentMonth:o,onSelect:t.handleDaySelect},u)}))},t}return C(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.utils,r=e.date;if(!n.isEqual(r,t.lastDate)){var o=n.getMonth(r),i=t.lastDate||r,a=n.getMonth(i);return{lastDate:r,currentMonth:e.utils.startOfMonth(r),slideDirection:o===a?t.slideDirection:n.isAfterDay(r,i)?"left":"right"}}return null},t.prototype.componentDidMount=function(){var e=this.props,t=e.date,n=e.minDate,r=e.maxDate,o=e.utils,i=e.disablePast,a=e.disableFuture;if(this.shouldDisableDate(t)){var l=function(e){var t=e.date,n=e.utils,r=e.minDate,o=e.maxDate,i=e.disableFuture,a=e.disablePast,l=e.shouldDisableDate,s=n.startOfDay(n.date());a&&n.isBefore(r,s)&&(r=s),i&&n.isAfter(o,s)&&(o=s);var c=t,u=t;for(n.isBefore(t,r)&&(c=n.date(r),u=null),n.isAfter(t,o)&&(u&&(u=n.date(o)),c=null);c||u;){if(c&&n.isAfter(c,o)&&(c=null),u&&n.isBefore(u,r)&&(u=null),c){if(!l(c))return c;c=n.addDays(c,1)}if(u){if(!l(u))return u;u=n.addDays(u,-1)}}return null}({date:t,utils:o,minDate:o.date(n),maxDate:o.date(r),disablePast:Boolean(i),disableFuture:Boolean(a),shouldDisableDate:this.shouldDisableDate});this.handleDaySelect(l,!1)}},t.prototype.render=function(){var e=this.state,t=e.currentMonth,r=e.slideDirection,o=this.props,i=o.classes,a=o.allowKeyboardControl,l=o.leftArrowButtonProps,s=o.leftArrowIcon,c=o.rightArrowButtonProps,u=o.rightArrowIcon,d=o.loadingIndicator||(0,n.createElement)(me(),null);return(0,n.createElement)(n.Fragment,null,a&&(0,n.createElement)(hr,{onKeyDown:this.handleKeyDown}),(0,n.createElement)(lr,{currentMonth:t,slideDirection:r,onMonthChange:this.handleChangeMonth,leftArrowIcon:s,leftArrowButtonProps:l,rightArrowIcon:u,rightArrowButtonProps:c,disablePrevMonth:this.shouldDisablePrevMonth(),disableNextMonth:this.shouldDisableNextMonth()}),(0,n.createElement)(ir,{slideDirection:r,transKey:t.toString(),className:i.transitionContainer},(0,n.createElement)(n.Fragment,null,this.state.loadingQueue>0&&(0,n.createElement)("div",{className:i.progressContainer},d)||(0,n.createElement)("div",null,this.renderWeeks()))))},t.defaultProps={minDate:new Date("1900-01-01"),maxDate:new Date("2100-01-01"),disablePast:!1,disableFuture:!1,allowKeyboardControl:!0},t}(n.Component),gr=(0,i.withStyles)((function(e){return{transitionContainer:{minHeight:216,marginTop:e.spacing(1.5)},progressContainer:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},week:{display:"flex",justifyContent:"center"}}}),{name:"MuiPickersCalendar",withTheme:!0})((pr=function(e){var t=Fn();return(0,n.createElement)(dr,_({utils:t},e))},pr.displayName="WithUtils("+((dr=fr).displayName||dr.name)+")",pr)),mr=(0,i.makeStyles)((function(e){return{root:{height:40,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none","&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},yearSelected:{margin:"10px 0",fontWeight:e.typography.fontWeightMedium},yearDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersYear"}),yr=function(e){var t,r=e.onSelect,o=e.forwardedRef,i=e.value,a=e.selected,l=e.disabled,s=e.children,c=k(e,["onSelect","forwardedRef","value","selected","disabled","children"]),u=mr(),d=(0,n.useCallback)((function(){return r(i)}),[r,i]);return(0,n.createElement)(R(),_({role:"button",component:"div",tabIndex:l?-1:0,onClick:d,onKeyPress:d,color:a?"primary":void 0,variant:a?"h5":"subtitle1",children:s,ref:o,className:P(u.root,(t={},t[u.yearSelected]=a,t[u.yearDisabled]=l,t))},c))};yr.displayName="Year";var vr=(0,n.forwardRef)((function(e,t){return(0,n.createElement)(yr,_({},e,{forwardedRef:t}))})),br=310,xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,ye.makeStyles)(e,F({defaultTheme:It},t))}((function(e){return{staticWrapperRoot:{overflow:"hidden",minWidth:br,display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper}}}),{name:"MuiPickersStaticWrapper"}),wr=function(e){var t=e.children,r=xr();return(0,n.createElement)("div",{className:r.staticWrapperRoot,children:t})},Sr=function(e){var t,r,o=e.children,i=e.classes,a=e.onAccept,l=e.onDismiss,s=e.onClear,c=e.onSetToday,u=e.okLabel,d=e.cancelLabel,p=e.clearLabel,h=e.todayLabel,f=e.clearable,g=e.showTodayButton,m=(e.showTabs,e.wider),y=k(e,["children","classes","onAccept","onDismiss","onClear","onSetToday","okLabel","cancelLabel","clearLabel","todayLabel","clearable","showTodayButton","showTabs","wider"]);return(0,n.createElement)(En(),_({role:"dialog",onClose:l,classes:{paper:P(i.dialogRoot,(t={},t[i.dialogRootWider]=m,t))}},y),(0,n.createElement)(wn(),{children:o,className:i.dialog}),(0,n.createElement)(bn(),{classes:{root:P((r={},r[i.withAdditionalAction]=f||g,r))}},f&&(0,n.createElement)(D(),{color:"primary",onClick:s},p),!f&&g&&(0,n.createElement)(D(),{color:"primary",onClick:c},h),d&&(0,n.createElement)(D(),{color:"primary",onClick:l},d),u&&(0,n.createElement)(D(),{color:"primary",onClick:a},u)))};Sr.displayName="ModalDialog";var Er=(0,i.createStyles)({dialogRoot:{minWidth:br},dialogRootWider:{},dialog:{"&:first-child":{padding:0}},withAdditionalAction:{justifyContent:"flex-start","& > *:first-child":{marginRight:"auto"}}}),Or=(0,i.withStyles)(Er,{name:"MuiPickersModal"})(Sr),Cr=function(e){var t=e.open,r=e.children,o=e.okLabel,i=e.cancelLabel,a=e.clearLabel,l=e.todayLabel,s=e.showTodayButton,c=e.clearable,u=e.DialogProps,d=e.showTabs,p=e.wider,h=e.InputComponent,f=e.DateInputProps,g=e.onClear,m=e.onAccept,y=e.onDismiss,v=e.onSetToday,b=k(e,["open","children","okLabel","cancelLabel","clearLabel","todayLabel","showTodayButton","clearable","DialogProps","showTabs","wider","InputComponent","DateInputProps","onClear","onAccept","onDismiss","onSetToday"]);return ur(t,{Enter:m}),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(h,_({},b,f)),(0,n.createElement)(Or,_({wider:p,showTabs:d,open:t,onClear:g,onAccept:m,onDismiss:y,onSetToday:v,clearLabel:a,todayLabel:l,okLabel:o,cancelLabel:i,clearable:c,showTodayButton:s,children:r},u)))};Cr.defaultProps={okLabel:"OK",cancelLabel:"Cancel",clearLabel:"Clear",todayLabel:"Today",clearable:!1,showTodayButton:!1};var _r,kr=(0,i.makeStyles)({popoverPaper:{width:br,paddingBottom:8},popoverPaperWider:{width:325}},{name:"MuiPickersInlineWrapper"}),Tr=function(e){var t,r=e.open,o=e.wider,i=e.children,a=e.PopoverProps,l=(e.onClear,e.onDismiss),s=(e.onSetToday,e.onAccept),c=(e.showTabs,e.DateInputProps),u=e.InputComponent,d=k(e,["open","wider","children","PopoverProps","onClear","onDismiss","onSetToday","onAccept","showTabs","DateInputProps","InputComponent"]),p=(0,n.useRef)(),h=kr();return ur(r,{Enter:s}),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u,_({},d,c,{inputRef:p})),(0,n.createElement)(Cn(),_({open:r,onClose:l,anchorEl:p.current,classes:{paper:P(h.popoverPaper,(t={},t[h.popoverPaperWider]=o,t))},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:i},a)))},Pr=(0,n.createContext)(null),Mr=function(e){var t=e.variant,r=k(e,["variant"]),o=function(e){switch(e){case"inline":return Tr;case"static":return wr;default:return Cr}}(t);return(0,n.createElement)(Pr.Provider,{value:t||"dialog"},(0,n.createElement)(o,_({},r)))},Rr=(0,i.makeStyles)({container:{height:300,overflowY:"auto"}},{name:"MuiPickersYearSelection"}),Ir=function(e){var t=e.date,r=e.onChange,o=e.onYearChange,i=e.minDate,a=e.maxDate,l=e.disablePast,s=e.disableFuture,c=e.animateYearScrolling,u=Fn(),d=Rr(),p=(0,n.useContext)(Pr),h=(0,n.useRef)(null);(0,n.useEffect)((function(){h.current&&h.current.scrollIntoView&&h.current.scrollIntoView({block:"static"===p?"nearest":"center",behavior:c?"smooth":"auto"})}),[]);var f=u.getYear(t),g=(0,n.useCallback)((function(e){var n=u.setYear(t,e);o&&o(n),r(n,!0)}),[t,r,o,u]);return(0,n.createElement)("div",{className:d.container},u.getYearRange(i,a).map((function(e){var t=u.getYear(e),r=t===f;return(0,n.createElement)(vr,{key:u.getYearText(e),selected:r,value:t,onSelect:g,ref:r?h:void 0,disabled:Boolean(l&&u.isBeforeYear(e,u.date())||s&&u.isAfterYear(e,u.date()))},u.getYearText(e))})))};!function(e){e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds"}(_r||(_r={}));var Dr=_r,Ar=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={toAnimateTransform:!1,previousType:void 0},t.getAngleStyle=function(){var e=t.props,n=e.value,r=e.isInner,o=e.type,i=360/(o===Dr.HOURS?12:60)*n;return o===Dr.HOURS&&n>12&&(i-=360),{height:r?"26%":"40%",transform:"rotateZ("+i+"deg)"}},t}return C(t,e),t.prototype.render=function(){var e,t,r=this.props,o=r.classes,i=r.hasSelected;return(0,n.createElement)("div",{style:this.getAngleStyle(),className:P(o.pointer,(e={},e[o.animateTransform]=this.state.toAnimateTransform,e))},(0,n.createElement)("div",{className:P(o.thumb,(t={},t[o.noPoint]=i,t))}))},t.getDerivedStateFromProps=function(e,t){return e.type!==t.previousType?{toAnimateTransform:!0,previousType:e.type}:{toAnimateTransform:!1,previousType:e.type}},t}(n.Component),Lr=(0,i.withStyles)((function(e){return(0,i.createStyles)({pointer:{width:2,backgroundColor:e.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},animateTransform:{transition:e.transitions.create(["transform","height"])},thumb:{width:4,height:4,backgroundColor:e.palette.primary.contrastText,borderRadius:"100%",position:"absolute",top:-21,left:-15,border:"14px solid "+e.palette.primary.main,boxSizing:"content-box"},noPoint:{backgroundColor:e.palette.primary.main}})}),{name:"MuiPickersClockPointer"})(Ar),Nr=130,jr=130,zr=Nr-Nr,Fr=0-jr,Br=function(e,t,n){var r=t-Nr,o=n-jr,i=57.29577951308232*(Math.atan2(zr,Fr)-Math.atan2(r,o));i=Math.round(i/e)*e,i%=360;var a=Math.floor(i/e)||0,l=Math.pow(r,2)+Math.pow(o,2);return{value:a,distance:Math.sqrt(l)}},Wr=function(e,t){return t.getHours(e)>=12?"pm":"am"},Ur=function(e,t,n,r){if(n&&(r.getHours(e)>=12?"pm":"am")!==t){var o="am"===t?r.getHours(e)-12:r.getHours(e)+12;return r.setHours(e,o)}return e},Hr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMoving=!1,t.handleTouchMove=function(e){t.isMoving=!0,t.setTime(e)},t.handleTouchEnd=function(e){t.isMoving&&(t.setTime(e,!0),t.isMoving=!1)},t.handleMove=function(e){e.preventDefault(),e.stopPropagation(),(void 0===e.buttons?1===e.nativeEvent.which:1===e.buttons)&&t.setTime(e.nativeEvent,!1)},t.handleMouseUp=function(e){t.isMoving&&(t.isMoving=!1),t.setTime(e.nativeEvent,!0)},t.hasSelected=function(){var e=t.props,n=e.type,r=e.value;return n===Dr.HOURS||r%5==0},t}return C(t,e),t.prototype.setTime=function(e,t){void 0===t&&(t=!1);var n=e.offsetX,r=e.offsetY;if(void 0===n){var o=e.target.getBoundingClientRect();n=e.changedTouches[0].clientX-o.left,r=e.changedTouches[0].clientY-o.top}var i=this.props.type===Dr.SECONDS||this.props.type===Dr.MINUTES?function(e,t,n){return void 0===n&&(n=1),Br(6*n,e,t).value*n%60}(n,r,this.props.minutesStep):function(e,t,n){var r=Br(30,e,t),o=r.value,i=r.distance;return o=o||12,n?o%=12:i<90&&(o+=12,o%=24),o}(n,r,Boolean(this.props.ampm));this.props.onChange(i,t)},t.prototype.render=function(){var e=this.props,t=e.classes,r=e.value,o=e.children,i=e.type,a=!e.ampm&&i===Dr.HOURS&&(r<1||r>12);return(0,n.createElement)("div",{className:t.container},(0,n.createElement)("div",{className:t.clock},(0,n.createElement)("div",{role:"menu",tabIndex:-1,className:t.squareMask,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onMouseUp:this.handleMouseUp,onMouseMove:this.handleMove}),(0,n.createElement)("div",{className:t.pin}),(0,n.createElement)(Lr,{type:i,value:r,isInner:a,hasSelected:this.hasSelected()}),o))},t.defaultProps={ampm:!1,minutesStep:1},t}(n.Component),Vr=(0,i.withStyles)((function(e){return(0,i.createStyles)({container:{display:"flex",justifyContent:"center",alignItems:"flex-end",margin:e.spacing(2)+"px 0 "+e.spacing(1)+"px"},clock:{backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:260,width:260,position:"relative",pointerEvents:"none",zIndex:1},squareMask:{width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:"none",touchActions:"none",userSelect:"none","&:active":{cursor:"move"}},pin:{width:6,height:6,borderRadius:"50%",backgroundColor:e.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})}),{name:"MuiPickersClock"})(Hr),Gr={0:[0,40],1:[55,19.6],2:[94.4,59.5],3:[109,114],4:[94.4,168.5],5:[54.5,208.4],6:[0,223],7:[-54.5,208.4],8:[-94.4,168.5],9:[-109,114],10:[-94.4,59.5],11:[-54.5,19.6],12:[0,5],13:[36.9,49.9],14:[64,77],15:[74,114],16:[64,151],17:[37,178],18:[0,188],19:[-37,178],20:[-64,151],21:[-74,114],22:[-64,77],23:[-37,50]},qr=(0,i.makeStyles)((function(e){var t=e.spacing(4);return{clockNumber:{width:t,height:32,userSelect:"none",position:"absolute",left:"calc(50% - "+t/2+"px)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:"light"===e.palette.type?e.palette.text.primary:e.palette.text.hint},clockNumberSelected:{color:e.palette.primary.contrastText}}}),{name:"MuiPickersClockNumber"}),Yr=function(e){var t,r=e.selected,o=e.label,i=e.index,a=e.isInner,l=qr(),s=P(l.clockNumber,((t={})[l.clockNumberSelected]=r,t)),c=(0,n.useMemo)((function(){var e=Gr[i];return{transform:"translate("+e[0]+"px, "+e[1]+"px"}}),[i]);return(0,n.createElement)(R(),{component:"span",className:s,variant:a?"body2":"body1",style:c,children:o})},Kr=function(e){for(var t=e.ampm,r=e.utils,o=e.date,i=r.getHours(o),a=[],l=t?12:23,s=function(e){return t?12===e?12===i||0===i:i===e||i-12===e:i===e},c=t?1:0;c<=l;c+=1){var u=c.toString();0===c&&(u="00");var d={index:c,label:r.formatNumber(u),selected:s(c),isInner:!t&&(0===c||c>12)};a.push((0,n.createElement)(Yr,_({key:c},d)))}return a},$r=function(e){var t=e.value,r=e.utils.formatNumber;return[(0,n.createElement)(Yr,{label:r("00"),selected:0===t,index:12,key:12}),(0,n.createElement)(Yr,{label:r("05"),selected:5===t,index:1,key:1}),(0,n.createElement)(Yr,{label:r("10"),selected:10===t,index:2,key:2}),(0,n.createElement)(Yr,{label:r("15"),selected:15===t,index:3,key:3}),(0,n.createElement)(Yr,{label:r("20"),selected:20===t,index:4,key:4}),(0,n.createElement)(Yr,{label:r("25"),selected:25===t,index:5,key:5}),(0,n.createElement)(Yr,{label:r("30"),selected:30===t,index:6,key:6}),(0,n.createElement)(Yr,{label:r("35"),selected:35===t,index:7,key:7}),(0,n.createElement)(Yr,{label:r("40"),selected:40===t,index:8,key:8}),(0,n.createElement)(Yr,{label:r("45"),selected:45===t,index:9,key:9}),(0,n.createElement)(Yr,{label:r("50"),selected:50===t,index:10,key:10}),(0,n.createElement)(Yr,{label:r("55"),selected:55===t,index:11,key:11})]},Zr=function(e){var t=e.type,r=e.onHourChange,o=e.onMinutesChange,i=e.onSecondsChange,a=e.ampm,l=e.date,s=e.minutesStep,c=Fn(),u=(0,n.useMemo)((function(){switch(t){case Dr.HOURS:return{value:c.getHours(l),children:Kr({date:l,utils:c,ampm:Boolean(a)}),onChange:function(e,t){var n=Wr(l,c),o=Ur(c.setHours(l,e),n,Boolean(a),c);r(o,t)}};case Dr.MINUTES:var e=c.getMinutes(l);return{value:e,children:$r({value:e,utils:c}),onChange:function(e,t){var n=c.setMinutes(l,e);o(n,t)}};case Dr.SECONDS:var n=c.getSeconds(l);return{value:n,children:$r({value:n,utils:c}),onChange:function(e,t){var n=c.setSeconds(l,e);i(n,t)}};default:throw new Error("You must provide the type for TimePickerView")}}),[a,l,r,o,i,t,c]);return(0,n.createElement)(Vr,_({type:t,ampm:a,minutesStep:s},u))};Zr.displayName="TimePickerView",Zr.defaultProps={ampm:!0,minutesStep:1},(0,n.memo)(Zr);var Xr=(0,i.makeStyles)((function(e){return{root:{flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",outline:"none",height:75,transition:e.transitions.create("font-size",{duration:"100ms"}),"&:focus":{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium}},monthSelected:{color:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium},monthDisabled:{pointerEvents:"none",color:e.palette.text.hint}}}),{name:"MuiPickersMonth"}),Qr=function(e){var t,r=e.selected,o=e.onSelect,i=e.disabled,a=e.value,l=e.children,s=k(e,["selected","onSelect","disabled","value","children"]),c=Xr(),u=(0,n.useCallback)((function(){o(a)}),[o,a]);return(0,n.createElement)(R(),_({role:"button",component:"div",className:P(c.root,(t={},t[c.monthSelected]=r,t[c.monthDisabled]=i,t)),tabIndex:i?-1:0,onClick:u,onKeyPress:u,color:r?"primary":void 0,variant:r?"h5":"subtitle1",children:l},s))};Qr.displayName="Month";var Jr=(0,i.makeStyles)({container:{width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch"}},{name:"MuiPickersMonthSelection"}),eo=function(e){var t=e.disablePast,r=e.disableFuture,o=e.minDate,i=e.maxDate,a=e.date,l=e.onMonthChange,s=e.onChange,c=Fn(),u=Jr(),d=c.getMonth(a),p=function(e){var n=c.date(),a=c.date(o),l=c.date(i),s=c.startOfMonth(t&&c.isAfter(n,a)?n:a),u=c.startOfMonth(r&&c.isBefore(n,l)?n:l),d=c.isBefore(e,s),p=c.isAfter(e,u);return d||p},h=(0,n.useCallback)((function(e){var t=c.setMonth(a,e);s(t,!0),l&&l(t)}),[a,s,l,c]);return(0,n.createElement)("div",{className:u.container},c.getMonthArray(a).map((function(e){var t=c.getMonth(e),r=c.format(e,"MMM");return(0,n.createElement)(Qr,{key:r,value:t,selected:t===d,onSelect:h,disabled:p(e)},r)})))},to=function(){return"undefined"!=typeof window&&window.screen&&window.orientation&&90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait"},no={year:Ir,month:eo,date:gr,hours:Zr,minutes:Zr,seconds:Zr},ro=(0,i.makeStyles)({container:{display:"flex",flexDirection:"column"},containerLandscape:{flexDirection:"row"},pickerView:{overflowX:"hidden",minHeight:305,minWidth:br,maxWidth:325,display:"flex",flexDirection:"column",justifyContent:"center"},pickerViewLandscape:{padding:"0 8px"}},{name:"MuiPickersBasePicker"}),oo=function(e){var t,r,o=e.date,i=e.ampm,a=e.views,l=e.disableToolbar,s=e.disablePast,c=e.disableFuture,u=e.hideTabs,d=e.onChange,p=e.openTo,h=e.minutesStep,f=e.dateRangeIcon,g=e.timeIcon,m=e.minDate,y=e.maxDate,v=e.animateYearScrolling,b=e.leftArrowIcon,x=e.rightArrowIcon,w=e.renderDay,S=e.shouldDisableDate,E=e.allowKeyboardControl,O=e.onMonthChange,C=e.onYearChange,k=e.leftArrowButtonProps,T=e.rightArrowButtonProps,M=e.ToolbarComponent,R=e.loadingIndicator,I=e.orientation,D=Fn(),A=ro(),L=function(e){var t=(0,n.useState)(to()),r=t[0],o=t[1],i=(0,n.useCallback)((function(){return o(to())}),[]);return sr((function(){return window.addEventListener("orientationchange",i),function(){return window.removeEventListener("orientationchange",i)}}),[i]),"landscape"===(e||r)}(I),N=function(e,t,r){var o=(0,n.useState)(t&&Yn(e,t)?t:e[0]),i=o[0],a=o[1],l=(0,n.useCallback)((function(t,n){var o=e[e.indexOf(i)+1];if(n&&o)return r(t,!1),void a(o);r(t,Boolean(n))}),[r,i,e]);return{handleChangeAndOpenNext:l,openView:i,setOpenView:a}}(a,p,d),j=N.openView,z=N.setOpenView,F=N.handleChangeAndOpenNext,B=(0,n.useMemo)((function(){return D.date(m)}),[m,D]),W=(0,n.useMemo)((function(){return D.date(y)}),[y,D]);return(0,n.createElement)("div",{className:P(A.container,(t={},t[A.containerLandscape]=L,t))},!l&&(0,n.createElement)(M,_({date:o,onChange:d,setOpenView:z,openView:j,hideTabs:u,dateRangeIcon:f,timeIcon:g,isLandscape:L},e)),(0,n.createElement)("div",{className:P(A.pickerView,(r={},r[A.pickerViewLandscape]=L,r))},"year"===j&&(0,n.createElement)(Ir,{date:o,onChange:F,minDate:B,maxDate:W,disablePast:s,disableFuture:c,onYearChange:C,animateYearScrolling:v}),"month"===j&&(0,n.createElement)(eo,{date:o,onChange:F,minDate:B,maxDate:W,disablePast:s,disableFuture:c,onMonthChange:O}),"date"===j&&(0,n.createElement)(gr,{date:o,onChange:F,onMonthChange:O,disablePast:s,disableFuture:c,minDate:B,maxDate:W,leftArrowIcon:b,leftArrowButtonProps:k,rightArrowIcon:x,rightArrowButtonProps:T,renderDay:w,shouldDisableDate:S,allowKeyboardControl:E,loadingIndicator:R}),("hours"===j||"minutes"===j||"seconds"===j)&&(0,n.createElement)(Zr,{date:o,ampm:i,type:j,minutesStep:h,onHourChange:F,onMinutesChange:F,onSecondsChange:F})))};oo.defaultProps=_({},Jn,{views:Object.keys(no)});var io=function(e,t,n,r,o){var i=o.invalidLabel,a=o.emptyLabel,l=o.labelFunc,s=n.date(e);return l?l(r?null:s,i):r?a||"":n.isValid(s)?n.format(s,t):i},ao=function(e,t,n){return t?n:e.endOfDay(n)},lo=function(e,t,n){return t?n:e.startOfDay(n)};function so(e,t,n){return void 0===t&&(t=!0),e||(t?n["12h"]:n["24h"])}function co(e,t){var r=e.autoOk,o=e.disabled,i=e.onAccept,a=e.onChange,l=e.onError,s=e.value,c=e.variant,u=Fn(),d=function(e){var t,r=e.open,o=e.onOpen,i=e.onClose,a=null;return null==r&&(r=(t=(0,n.useState)(!1))[0],a=t[1]),{isOpen:r,setIsOpen:(0,n.useCallback)((function(e){return a&&a(e),e?o&&o():i&&i()}),[o,i,a])}}(e),p=d.isOpen,h=d.setIsOpen,f=function(e,t){var r=function(e,t){var r=t.value,o=t.initialFocusedDate,i=(0,n.useRef)(e.date()),a=e.date(r||o||i.current);return a&&e.isValid(a)?a:i.current}(Fn(),e);return{date:r,format:e.format||t.getDefaultFormat()}}(e,t),g=f.date,m=f.format,y=(0,n.useState)(g),v=y[0],b=y[1];(0,n.useEffect)((function(){p||u.isEqual(v,g)||b(g)}),[g,p,v,u]);var x=(0,n.useCallback)((function(e){h(!1),a(e),i&&i(e)}),[i,a,h]),w=(0,n.useMemo)((function(){return{format:m,open:p,onClear:function(){return x(null)},onAccept:function(){return x(v)},onSetToday:function(){return b(u.date())},onDismiss:function(){h(!1)}}}),[x,m,p,v,h,u]),S=(0,n.useMemo)((function(){return{date:v,onChange:function(e,t){void 0===t&&(t=!0),b(e),"inline"!==c&&"static"!==c||a(e),t&&r&&x(e)}}}),[x,r,a,v,c]),E=function(e,t,n){var r=n.maxDate,o=n.minDate,i=n.disablePast,a=n.disableFuture,l=n.maxDateMessage,s=n.minDateMessage,c=n.invalidDateMessage,u=n.strictCompareDates,d=t.date(e);return null===e?"":t.isValid(e)?r&&t.isAfter(d,ao(t,!!u,t.date(r)))||a&&t.isAfter(d,ao(t,!!u,t.date()))?l:o&&t.isBefore(d,lo(t,!!u,t.date(o)))||i&&t.isBefore(d,lo(t,!!u,t.date()))?s:"":c}(s,u,e);(0,n.useEffect)((function(){E&&l&&l(E,s)}),[l,E,s]);var O=io(g,m,u,null===s,e),C={pickerProps:S,inputProps:(0,n.useMemo)((function(){return{inputValue:O,validationError:E,onClick:function(){return!o&&h(!0)}}}),[o,O,h,E]),wrapperProps:w};return(0,n.useDebugValue)(C),C}var uo=function(e){var t=e.inputValue,r=e.inputVariant,o=e.validationError,i=e.InputProps,a=e.TextFieldComponent,l=void 0===a?kn():a,s=k(e,["inputValue","inputVariant","validationError","InputProps","TextFieldComponent"]),c=(0,n.useMemo)((function(){return _({},i,{readOnly:!0})}),[i]);return(0,n.createElement)(l,_({error:Boolean(o),helperText:o},s,{value:t,variant:r,InputProps:c}))};function po(e){var t=e.useOptions,r=e.getCustomProps,o=e.DefaultToolbarComponent;return function(e){var i=e.allowKeyboardControl,a=e.ampm,l=e.hideTabs,s=e.animateYearScrolling,c=(e.autoOk,e.disableFuture),u=e.disablePast,d=(e.format,e.forwardedRef,e.initialFocusedDate,e.invalidDateMessage,e.labelFunc,e.leftArrowIcon),p=e.leftArrowButtonProps,h=e.maxDate,f=(e.maxDateMessage,e.minDate),g=(e.onOpen,e.onClose,e.minDateMessage,e.strictCompareDates),m=e.minutesStep,y=(e.onAccept,e.onChange,e.onMonthChange),v=e.onYearChange,b=e.renderDay,x=e.views,w=e.openTo,S=e.rightArrowIcon,E=e.rightArrowButtonProps,O=e.shouldDisableDate,C=e.dateRangeIcon,T=(e.emptyLabel,e.invalidLabel,e.timeIcon),P=(e.value,e.variant),M=e.orientation,R=e.disableToolbar,I=e.loadingIndicator,D=e.ToolbarComponent,A=void 0===D?o:D,L=k(e,["allowKeyboardControl","ampm","hideTabs","animateYearScrolling","autoOk","disableFuture","disablePast","format","forwardedRef","initialFocusedDate","invalidDateMessage","labelFunc","leftArrowIcon","leftArrowButtonProps","maxDate","maxDateMessage","minDate","onOpen","onClose","minDateMessage","strictCompareDates","minutesStep","onAccept","onChange","onMonthChange","onYearChange","renderDay","views","openTo","rightArrowIcon","rightArrowButtonProps","shouldDisableDate","dateRangeIcon","emptyLabel","invalidLabel","timeIcon","value","variant","orientation","disableToolbar","loadingIndicator","ToolbarComponent"]),N=r?r(e):{},j=co(e,t(e)),z=j.pickerProps,F=j.inputProps,B=j.wrapperProps;return(0,n.createElement)(Mr,_({variant:P,InputComponent:uo,DateInputProps:F},B,N,L),(0,n.createElement)(oo,_({},z,{orientation:M,disableToolbar:R,ToolbarComponent:A,hideTabs:l,ampm:a,views:x,openTo:w,allowKeyboardControl:i,minutesStep:m,animateYearScrolling:s,disableFuture:c,disablePast:u,leftArrowIcon:d,leftArrowButtonProps:p,maxDate:h,minDate:f,strictCompareDates:g,onMonthChange:y,onYearChange:v,renderDay:b,dateRangeIcon:C,timeIcon:T,rightArrowIcon:S,rightArrowButtonProps:E,shouldDisableDate:O,loadingIndicator:I})))}}uo.displayName="PureDateInput";var ho=function(e){var t=e.inputValue,r=e.inputVariant,o=e.validationError,i=e.KeyboardButtonProps,a=e.InputAdornmentProps,l=e.onClick,s=e.onChange,c=e.InputProps,u=e.mask,d=e.maskChar,p=void 0===d?"_":d,h=e.refuse,f=void 0===h?/[^\d]+/gi:h,g=e.format,m=e.keyboardIcon,y=e.disabled,v=e.rifmFormatter,b=e.TextFieldComponent,x=void 0===b?kn():b,w=k(e,["inputValue","inputVariant","validationError","KeyboardButtonProps","InputAdornmentProps","onClick","onChange","InputProps","mask","maskChar","refuse","format","keyboardIcon","disabled","rifmFormatter","TextFieldComponent"]),S=u||function(e,t){return e.replace(/[a-z]/gi,t)}(g,p),E=(0,n.useCallback)(function(e,t,n){return function(r){if(""===r)return r;for(var o="",i=r.replace(n,""),a=0,l=0;a<e.length;){var s=e[a];s===t&&l<i.length?(o+=i[l],l+=1):o+=s,a+=1}return o}}(S,p,f),[u,p]),O=a&&a.position?a.position:"end";return(0,n.createElement)(Mn,{value:t,onChange:function(e){s(""===e||e===S?null:e)},refuse:f,format:v||E},(function(e){var t,s=e.onChange,u=e.value;return(0,n.createElement)(x,_({disabled:y,error:Boolean(o),helperText:o},w,{value:u,onChange:s,variant:r,InputProps:_({},c,(t={},t[O+"Adornment"]=(0,n.createElement)(Pn(),_({position:O},a),(0,n.createElement)(dn,_({disabled:y},i,{onClick:l}),m)),t))}))}))};function fo(e){var t=e.useOptions,r=e.getCustomProps,o=e.DefaultToolbarComponent;return function(e){var i=e.allowKeyboardControl,a=e.ampm,l=e.hideTabs,s=e.animateYearScrolling,c=(e.autoOk,e.disableFuture),u=e.disablePast,d=(e.format,e.forwardedRef,e.initialFocusedDate,e.invalidDateMessage,e.labelFunc,e.leftArrowIcon),p=e.leftArrowButtonProps,h=e.maxDate,f=(e.maxDateMessage,e.minDate),g=(e.onOpen,e.onClose,e.minDateMessage,e.strictCompareDates),m=e.minutesStep,y=(e.onAccept,e.onChange,e.onMonthChange),v=e.onYearChange,b=e.renderDay,x=e.views,w=e.openTo,S=e.rightArrowIcon,E=e.rightArrowButtonProps,O=e.shouldDisableDate,C=(e.value,e.dateRangeIcon),T=(e.emptyLabel,e.invalidLabel,e.timeIcon),P=e.orientation,M=e.variant,R=e.disableToolbar,I=e.loadingIndicator,D=e.ToolbarComponent,A=void 0===D?o:D,L=k(e,["allowKeyboardControl","ampm","hideTabs","animateYearScrolling","autoOk","disableFuture","disablePast","format","forwardedRef","initialFocusedDate","invalidDateMessage","labelFunc","leftArrowIcon","leftArrowButtonProps","maxDate","maxDateMessage","minDate","onOpen","onClose","minDateMessage","strictCompareDates","minutesStep","onAccept","onChange","onMonthChange","onYearChange","renderDay","views","openTo","rightArrowIcon","rightArrowButtonProps","shouldDisableDate","value","dateRangeIcon","emptyLabel","invalidLabel","timeIcon","orientation","variant","disableToolbar","loadingIndicator","ToolbarComponent"]),N=r?r(e):{},j=function(e,t){var r=e.format,o=void 0===r?t.getDefaultFormat():r,i=e.inputValue,a=e.onChange,l=e.value,s=Fn(),c=io(l,o,s,null===l,e),u=(0,n.useState)(c),d=u[0],p=u[1],h=i?function(e,t,n){try{return t.parse(e,n)}catch(e){return null}}(i,s,o):l;(0,n.useEffect)((function(){(null===l||s.isValid(l))&&p(c)}),[c,p,s,l]);var f=(0,n.useCallback)((function(e){a(e,null===e?null:s.format(e,o))}),[o,a,s]),g=co(_({},e,{value:h,onChange:f}),t),m=g.inputProps,y=g.wrapperProps,v=g.pickerProps,b=(0,n.useMemo)((function(){return _({},m,{format:y.format,inputValue:i||d,onChange:function(e){p(e||"");var t=null===e?null:s.parse(e,y.format);a(t,e)}})}),[m,d,i,a,s,y.format]);return{inputProps:b,wrapperProps:y,pickerProps:v}}(e,t(e)),z=j.pickerProps,F=j.inputProps,B=j.wrapperProps;return(0,n.createElement)(Mr,_({variant:M,InputComponent:ho,DateInputProps:F},N,B,L),(0,n.createElement)(oo,_({},z,{ToolbarComponent:A,disableToolbar:R,hideTabs:l,orientation:P,ampm:a,views:x,openTo:w,allowKeyboardControl:i,minutesStep:m,animateYearScrolling:s,disableFuture:c,disablePast:u,leftArrowIcon:d,leftArrowButtonProps:p,maxDate:h,minDate:f,strictCompareDates:g,onMonthChange:y,onYearChange:v,renderDay:b,dateRangeIcon:C,timeIcon:T,rightArrowIcon:S,rightArrowButtonProps:E,shouldDisableDate:O,loadingIndicator:I})))}}ho.defaultProps={keyboardIcon:(0,n.createElement)((function(e){return r().createElement(fe(),_({},e),r().createElement("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),r().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}),null)};var go=_({},Jn,{openTo:"date",views:["year","date"]});function mo(e){var t=Fn();return{getDefaultFormat:function(){return function(e,t){return Kn(e)?t.yearFormat:$n(e)?t.yearMonthFormat:t.dateFormat}(e.views,t)}}}var yo=po({useOptions:mo,DefaultToolbarComponent:Xn}),vo=fo({useOptions:mo,DefaultToolbarComponent:Xn});yo.defaultProps=go,vo.defaultProps=go;var bo=(0,i.makeStyles)({toolbarLandscape:{flexWrap:"wrap"},toolbarAmpmLeftPadding:{paddingLeft:50},separator:{margin:"0 4px 0 2px",cursor:"default"},hourMinuteLabel:{display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},hourMinuteLabelLandscape:{marginTop:"auto"},hourMinuteLabelReverse:{flexDirection:"row-reverse"},ampmSelection:{marginLeft:20,marginRight:-20,display:"flex",flexDirection:"column"},ampmLandscape:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},ampmSelectionWithSeconds:{marginLeft:15,marginRight:10},ampmLabel:{fontSize:18}},{name:"MuiPickersTimePickerToolbar"});function xo(e,t,r){var o=Fn();return{meridiemMode:Wr(e,o),handleMeridiemChange:(0,n.useCallback)((function(n){var i=Ur(e,n,Boolean(t),o);r(i,!1)}),[t,e,r,o])}}var wo=function(e){var t,r,o,a=e.date,l=e.views,s=e.ampm,c=e.openView,u=e.onChange,d=e.isLandscape,p=e.setOpenView,h=Fn(),f=(0,i.useTheme)(),g=bo(),m=xo(a,s,u),y=m.meridiemMode,v=m.handleMeridiemChange,b=d?"h3":"h2";return(0,n.createElement)(qn,{isLandscape:d,className:P((t={},t[g.toolbarLandscape]=d,t[g.toolbarAmpmLeftPadding]=s&&!d,t))},(0,n.createElement)("div",{className:P(g.hourMinuteLabel,(r={},r[g.hourMinuteLabelLandscape]=d,r[g.hourMinuteLabelReverse]="rtl"===f.direction,r))},Yn(l,"hours")&&(0,n.createElement)(Vn,{variant:b,onClick:function(){return p(Dr.HOURS)},selected:c===Dr.HOURS,label:h.getHourText(a,Boolean(s))}),Yn(l,["hours","minutes"])&&(0,n.createElement)(Wn,{label:":",variant:b,selected:!1,className:g.separator}),Yn(l,"minutes")&&(0,n.createElement)(Vn,{variant:b,onClick:function(){return p(Dr.MINUTES)},selected:c===Dr.MINUTES,label:h.getMinuteText(a)}),Yn(l,["minutes","seconds"])&&(0,n.createElement)(Wn,{variant:"h2",label:":",selected:!1,className:g.separator}),Yn(l,"seconds")&&(0,n.createElement)(Vn,{variant:"h2",onClick:function(){return p(Dr.SECONDS)},selected:c===Dr.SECONDS,label:h.getSecondText(a)})),s&&(0,n.createElement)("div",{className:P(g.ampmSelection,(o={},o[g.ampmLandscape]=d,o[g.ampmSelectionWithSeconds]=Yn(l,"seconds"),o))},(0,n.createElement)(Vn,{disableRipple:!0,variant:"subtitle1",selected:"am"===y,typographyClassName:g.ampmLabel,label:h.getMeridiemText("am"),onClick:function(){return v("am")}}),(0,n.createElement)(Vn,{disableRipple:!0,variant:"subtitle1",selected:"pm"===y,typographyClassName:g.ampmLabel,label:h.getMeridiemText("pm"),onClick:function(){return v("pm")}})))},So=_({},Qn,{openTo:"hours",views:["hours","minutes"]});function Eo(e){var t=Fn();return{getDefaultFormat:function(){return so(e.format,e.ampm,{"12h":t.time12hFormat,"24h":t.time24hFormat})}}}var Oo=po({useOptions:Eo,DefaultToolbarComponent:wo}),Co=fo({useOptions:Eo,DefaultToolbarComponent:wo,getCustomProps:function(e){return{refuse:e.ampm?/[^\dap]+/gi:/[^\d]+/gi}}});Oo.defaultProps=So,Co.defaultProps=So;var _o=function(e){return"date"===e||"year"===e?"date":"time"},ko=(0,i.makeStyles)((function(e){var t="light"===e.palette.type?e.palette.primary.main:e.palette.background.default;return{tabs:{color:e.palette.getContrastText(t),backgroundColor:t}}}),{name:"MuiPickerDTTabs"}),To=function(e){var t=e.view,r=e.onChange,o=e.dateRangeIcon,a=e.timeIcon,l=ko(),s="light"===(0,i.useTheme)().palette.type?"secondary":"primary";return(0,n.createElement)(Nn(),null,(0,n.createElement)(An(),{variant:"fullWidth",value:_o(t),onChange:function(e,n){n!==_o(t)&&r("date"===n?"date":"hours")},className:l.tabs,indicatorColor:s},(0,n.createElement)(In(),{value:"date",icon:(0,n.createElement)(n.Fragment,null,o)}),(0,n.createElement)(In(),{value:"time",icon:(0,n.createElement)(n.Fragment,null,a)})))};To.defaultProps={dateRangeIcon:(0,n.createElement)((function(e){return r().createElement(fe(),_({},e),r().createElement("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),r().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}),null),timeIcon:(0,n.createElement)((function(e){return r().createElement(fe(),_({},e),r().createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),r().createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r().createElement("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}))}),null)};var Po=(0,i.makeStyles)((function(e){return{toolbar:{paddingLeft:16,paddingRight:16,justifyContent:"space-around"},separator:{margin:"0 4px 0 2px",cursor:"default"}}}),{name:"MuiPickerDTToolbar"}),Mo=function(e){var t=e.date,r=e.openView,o=e.setOpenView,a=e.ampm,l=e.hideTabs,s=e.dateRangeIcon,c=e.timeIcon,u=e.onChange,d=Fn(),p=Po(),h=!l&&"undefined"!=typeof window&&window.innerHeight>667,f=xo(t,a,u),g=f.meridiemMode,m=f.handleMeridiemChange,y="rtl"===(0,i.useTheme)().direction;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(qn,{isLandscape:!1,className:p.toolbar},(0,n.createElement)(yn,{container:!0,justify:"center",wrap:"nowrap"},(0,n.createElement)(yn,{item:!0,container:!0,xs:5,justify:"flex-start",direction:"column"},(0,n.createElement)("div",null,(0,n.createElement)(Vn,{variant:"subtitle1",onClick:function(){return o("year")},selected:"year"===r,label:d.getYearText(t)})),(0,n.createElement)("div",null,(0,n.createElement)(Vn,{variant:"h4",onClick:function(){return o("date")},selected:"date"===r,label:d.getDateTimePickerHeaderText(t)}))),(0,n.createElement)(yn,{item:!0,container:!0,xs:6,justify:"center",alignItems:"flex-end",direction:y?"row-reverse":"row"},(0,n.createElement)(Vn,{variant:"h3",onClick:function(){return o("hours")},selected:"hours"===r,label:d.getHourText(t,a)}),(0,n.createElement)(Wn,{variant:"h3",label:":",className:p.separator}),(0,n.createElement)(Vn,{variant:"h3",onClick:function(){return o("minutes")},selected:"minutes"===r,label:d.getMinuteText(t)})),a&&(0,n.createElement)(yn,{item:!0,container:!0,xs:1,direction:"column",justify:"flex-end"},(0,n.createElement)(Vn,{variant:"subtitle1",selected:"am"===g,label:d.getMeridiemText("am"),onClick:function(){return m("am")}}),(0,n.createElement)(Vn,{variant:"subtitle1",selected:"pm"===g,label:d.getMeridiemText("pm"),onClick:function(){return m("pm")}})))),h&&(0,n.createElement)(To,{dateRangeIcon:s,timeIcon:c,view:r,onChange:o}))},Ro=_({},er,{wider:!0,orientation:"portrait",openTo:"date",views:["year","date","hours","minutes"]});function Io(e){var t=Fn();if("portrait"!==e.orientation)throw new Error("We are not supporting custom orientation for DateTimePicker yet :(");return{getDefaultFormat:function(){return so(e.format,e.ampm,{"12h":t.dateTime12hFormat,"24h":t.dateTime24hFormat})}}}var Do=po({useOptions:Io,DefaultToolbarComponent:Mo}),Ao=fo({useOptions:Io,DefaultToolbarComponent:Mo,getCustomProps:function(e){return{refuse:e.ampm?/[^\dap]+/gi:/[^\d]+/gi}}});Do.defaultProps=Ro,Ao.defaultProps=Ro;var Lo=h(3192),No=h.n(Lo),jo=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,r=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=r||o||No(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),r=0,o=t,i=[];o.isBefore(n);){var a=Math.floor(r/7);i[a]=i[a]||[],i[a].push(o),o=o.clone().add(1,"day"),r+=1}return i},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),r=this.moment(t).endOf("year"),o=[],i=n;i.isBefore(r);)o.push(i),i=i.clone().add(1,"year");return o},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}();const zo=jo;var Fo=h(2396);const Bo=window["material-ui"].LinearProgress;var Wo=h.n(Bo);const Uo=(0,i.makeStyles)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),Ho=e=>{let{transparent:t=!1,relativePosition:n=!1,className:o}=e;const i=Uo();return r().createElement(r().Fragment,null,r().createElement("div",{"data-reltio-id":"reltio-linear-load-indicator",className:c()(i.loadingOverlay,o,{[i.transparent]:t,[i.relativePosition]:n})},r().createElement(Wo(),{color:"primary"})))};var Vo=h(5473),Go=h.n(Vo);function qo(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function Yo(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function Ko(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function $o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,o=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?o="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==o){var i=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=qo,t.componentWillReceiveProps=Yo),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Ko;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}function Zo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qo(e,t,n){return t&&Xo(e.prototype,t),n&&Xo(e,n),e}function Jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach((function(t){Jo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ni(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oi(e,t)}function ri(e){return ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ri(e)}function oi(e,t){return oi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oi(e,t)}function ii(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ai(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function li(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ai(e):t}function si(e){return function(){var t,n=ri(e);if(ii()){var r=ri(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return li(this,t)}}qo.__suppressDeprecationWarning=!0,Yo.__suppressDeprecationWarning=!0,Ko.__suppressDeprecationWarning=!0;var ci=function(e){ni(n,e);var t=si(n);function n(){return Zo(this,n),t.apply(this,arguments)}return Qo(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,o=e.split,i=e.style,a=e.size,l=e.eleRef,s=["Pane",o,n],c={flex:1,position:"relative",outline:"none"};return void 0!==a&&("vertical"===o?c.width=a:(c.height=a,c.display="flex"),c.flex="none"),c=Object.assign({},c,i||{}),r().createElement("div",{ref:l,className:s.join(" "),style:c},t)}}]),n}(r().PureComponent);ci.propTypes={className:l().string.isRequired,children:l().node.isRequired,size:l().oneOfType([l().string,l().number]),split:l().oneOf(["vertical","horizontal"]),style:Go(),eleRef:l().func},ci.defaultProps={};var ui="Resizer",di=function(e){ni(n,e);var t=si(n);function n(){return Zo(this,n),t.apply(this,arguments)}return Qo(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,o=e.onDoubleClick,i=e.onMouseDown,a=e.onTouchEnd,l=e.onTouchStart,s=e.resizerClassName,c=e.split,u=e.style,d=[s,c,t];return r().createElement("span",{role:"presentation",className:d.join(" "),style:u,onMouseDown:function(e){return i(e)},onTouchStart:function(e){e.preventDefault(),l(e)},onTouchEnd:function(e){e.preventDefault(),a(e)},onClick:function(e){n&&(e.preventDefault(),n(e))},onDoubleClick:function(e){o&&(e.preventDefault(),o(e))}})}}]),n}(r().Component);function pi(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function hi(e,t,n,r){if("number"==typeof r){var o="number"==typeof t?t:0,i="number"==typeof n&&n>=0?n:1/0;return Math.max(o,Math.min(i,r))}return void 0!==e?e:t}di.propTypes={className:l().string.isRequired,onClick:l().func,onDoubleClick:l().func,onMouseDown:l().func.isRequired,onTouchStart:l().func.isRequired,onTouchEnd:l().func.isRequired,split:l().oneOf(["vertical","horizontal"]),style:Go(),resizerClassName:l().string.isRequired},di.defaultProps={resizerClassName:ui};var fi=function(e){ni(n,e);var t=si(n);function n(e){var r;Zo(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(ai(r)),r.onTouchStart=r.onTouchStart.bind(ai(r)),r.onMouseMove=r.onMouseMove.bind(ai(r)),r.onTouchMove=r.onTouchMove.bind(ai(r)),r.onMouseUp=r.onMouseUp.bind(ai(r));var o=e.size,i=e.defaultSize,a=e.minSize,l=e.maxSize,s=e.primary,c=void 0!==o?o:hi(i,a,l,null);return r.state={active:!1,resized:!1,pane1Size:"first"===s?c:void 0,pane2Size:"second"===s?c:void 0,instanceProps:{size:o}},r}return Qo(n,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(n.getSizeUpdate(this.props,this.state))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove)}},{key:"onMouseDown",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchStart(t)}},{key:"onTouchStart",value:function(e){var t=this.props,n=t.allowResize,r=t.onDragStarted,o=t.split;if(n){pi(document,window);var i="vertical"===o?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:i})}}},{key:"onMouseMove",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchMove(t)}},{key:"onTouchMove",value:function(e){var t=this.props,n=t.allowResize,r=t.maxSize,o=t.minSize,i=t.onChange,a=t.split,l=t.step,s=this.state,c=s.active,u=s.position;if(n&&c){pi(document,window);var d="first"===this.props.primary,p=d?this.pane1:this.pane2,h=d?this.pane2:this.pane1;if(p){var f=p,g=h;if(f.getBoundingClientRect){var m=f.getBoundingClientRect().width,y=f.getBoundingClientRect().height,v="vertical"===a?m:y,b=u-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(l){if(Math.abs(b)<l)return;b=~~(b/l)*l}var x=d?b:-b;parseInt(window.getComputedStyle(f).order)>parseInt(window.getComputedStyle(g).order)&&(x=-x);var w=r;if(void 0!==r&&r<=0){var S=this.splitPane;w="vertical"===a?S.getBoundingClientRect().width+r:S.getBoundingClientRect().height+r}var E=v-x,O=u-b;E<o?E=o:void 0!==r&&E>w?E=w:this.setState({position:O,resized:!0}),i&&i(E),this.setState(Jo({draggedSize:E},d?"pane1Size":"pane2Size",E))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,o=r.active,i=r.draggedSize;t&&o&&("function"==typeof n&&n(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,o=t.children,i=t.className,a=t.onResizerClick,l=t.onResizerDoubleClick,s=t.paneClassName,c=t.pane1ClassName,u=t.pane2ClassName,d=t.paneStyle,p=t.pane1Style,h=t.pane2Style,f=t.resizerClassName,g=t.resizerStyle,m=t.split,y=t.style,v=this.state,b=v.pane1Size,x=v.pane2Size,w=n?"":"disabled",S=f?"".concat(f," ").concat(ui):f,E=function(e){return r().Children.toArray(e).filter((function(e){return e}))}(o),O=ti({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},y);"vertical"===m?Object.assign(O,{flexDirection:"row",left:0,right:0}):Object.assign(O,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var C=["SplitPane",i,m,w],_=ti({},d,{},p),k=ti({},d,{},h),T=["Pane1",s,c].join(" "),P=["Pane2",s,u].join(" ");return r().createElement("div",{className:C.join(" "),ref:function(t){e.splitPane=t},style:O},r().createElement(ci,{className:T,key:"pane1",eleRef:function(t){e.pane1=t},size:b,split:m,style:_},E[0]),r().createElement(di,{className:w,onClick:a,onDoubleClick:l,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:S,split:m,style:g||{}}),r().createElement(ci,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:x,split:m,style:k},E[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return n.getSizeUpdate(e,t)}},{key:"getSizeUpdate",value:function(e,t){var n={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var r=void 0!==e.size?e.size:hi(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var o="first"===e.primary;return n[o?"pane1Size":"pane2Size"]=r,n[o?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),n}(r().Component);fi.propTypes={allowResize:l().bool,children:l().arrayOf(l().node).isRequired,className:l().string,primary:l().oneOf(["first","second"]),minSize:l().oneOfType([l().string,l().number]),maxSize:l().oneOfType([l().string,l().number]),defaultSize:l().oneOfType([l().string,l().number]),size:l().oneOfType([l().string,l().number]),split:l().oneOf(["vertical","horizontal"]),onDragStarted:l().func,onDragFinished:l().func,onChange:l().func,onResizerClick:l().func,onResizerDoubleClick:l().func,style:Go(),resizerStyle:Go(),paneClassName:l().string,pane1ClassName:l().string,pane2ClassName:l().string,paneStyle:Go(),pane1Style:Go(),pane2Style:Go(),resizerClassName:l().string,step:l().number},fi.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},$o(fi);const gi=fi,mi=(0,i.makeStyles)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}}))),yi=250,vi=e=>"horizontal"===e,bi=e=>{let{className:t,children:o,orientation:a,primary:l,defaultSize:s,size:u,minSize:d,maxSize:p,allowResize:h,debounceInterval:f=yi,onChange:g}=e;const m=mi(),y=(0,i.useTheme)(),[v,b]=(0,n.useState)(null),[x,w]=(0,n.useState)(!0),S=(0,n.useCallback)((()=>w(!0)),[]),E=(0,n.useCallback)((()=>w(!1)),[]),O=()=>vi(a)?null==v?void 0:v.clientHeight:null==v?void 0:v.clientWidth,C=(0,n.useCallback)((0,Fo.debounce)((e=>{const t=O();g({percentageSize:e/t*100+"%",isMaxSize:+p>0?e===p:e===t+p,isMinSize:e===d,size:e})}),f),[g,a,p,v]),_=(0,n.useMemo)((()=>({transition:y.transitions.create(vi(a)?"height":"width",{easing:y.transitions.easing.sharp,duration:y.transitions.duration.leavingScreen})})),[a,y]);return"number"==typeof u&&u<0&&(u=(O()||0)+u),r().createElement("div",{ref:b,className:c()(m.container,t)},r().createElement(gi,{split:a,size:u,primary:l,allowResize:h,onChange:C,defaultSize:s,minSize:d,maxSize:p,onDragStarted:E,onDragFinished:S,pane1Style:x?_:void 0},o))};bi.displayName="ResizablePanes";var xi=h(6929),wi=h.n(xi);const Si={tooltipTitle:l().node,tooltipPlacement:l().string,showForDisabled:l().bool};const Ei=(0,i.makeStyles)((e=>({tooltip:e.tooltip,wrapper:{lineHeight:0}}))),Oi=e=>{const t=(0,n.forwardRef)(((t,n)=>{let{tooltipTitle:o,tooltipPlacement:i,showForDisabled:a=!1}=t,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["tooltipTitle","tooltipPlacement","showForDisabled"]);const s=Ei();return o?r().createElement(wi(),{ref:n,title:o,placement:i||"bottom",disableFocusListener:!0,disableTouchListener:!0,classes:{tooltip:s.tooltip}},(t=>t?r().createElement("span",{className:s.wrapper},r().createElement(e,l)):r().createElement(e,l))(a)):r().createElement(e,l)}));return t.displayName="WithTooltip",t.propTypes=Si,t};function Ci(){return Ci=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ci.apply(this,arguments)}const _i={XXS:"XXS",XS:"XS",S:"S",M:"M",MPlus:"MPlus",L:"L",XL:"XL"},ki=(0,n.forwardRef)(((e,t)=>{const{classes:n,className:o,onClick:i,icon:a,size:l=_i.XS,iconClassName:s}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes","className","onClick","icon","size","iconClassName"]);return r().createElement(j(),Ci({ref:t,classes:{root:`${n[`root${l}`]} ${n.rootAll}`,disabled:n.disabled},onClick:i,className:o},c),a&&r().createElement(a,{classes:{root:n[`icon${l}`]},className:s}))}));ki.displayName="SmallIconButton";const Ti=(0,i.withStyles)((()=>({rootAll:{padding:"0"},rootXXS:{height:"16px",width:"16px"},iconXXS:{fontSize:"16px"},rootXS:{height:"20px",width:"20px"},iconXS:{fontSize:"20px"},rootS:{height:"24px",width:"24px"},iconS:{fontSize:"24px"},rootM:{height:"30px",width:"30px"},rootMPlus:{height:"36px",width:"36px"},rootL:{height:"40px",width:"40px"},rootXL:{height:"48px",width:"48px"},disabled:{fillOpacity:.5}})))(ki),Pi=Oi(Ti),Mi=(0,i.makeStyles)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,i.fade)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function Ri(){return Ri=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ri.apply(this,arguments)}function Ii(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Di=e=>{let{disabled:t,buttonsProps:n,activeIndexId:o,className:i,onButtonClick:a,classes:l={}}=e;const s=Mi(),{active:u,buttonWrapper:d}=l,p=Ii(l,["active","buttonWrapper"]);return r().createElement("div",{className:c()(s.container,i)},n.map((e=>{let{id:n}=e,i=Ii(e,["id"]);return r().createElement(Pi,Ri({},i,{disabled:t,classes:p,size:"S",key:n,className:c()({[c()(s.active,u)]:o===n},s.buttonWrapper,d),onClick:()=>a(n),"data-reltio-id":`reltio-profile-right-side-button-${n}`}))})))},Ai=r().createContext({settings:{},onChange:()=>{}});Ai.displayName="PerspectivesSettingsContext";const Li=(0,i.makeStyles)((()=>({resizablePanesWrapper:{flexGrow:1,height:"100%",marginRight:"1px"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}))),Ni=480,ji=e=>{let{perspectiveId:t,children:o,buttonsProps:i,disabled:a,defaultTab:l}=e;const s=Li(),{perspectiveSettings:c,updatePerspectiveSettings:d}=(e=>{const{settings:t,onChange:r}=(0,n.useContext)(Ai)||{},o=null==t?void 0:t[e];return{updatePerspectiveSettings:(0,n.useCallback)((t=>{r(e,t)}),[e,r]),perspectiveSettings:o}})(t),{width:p=Ni}=c||{},h=l||(null==c?void 0:c.active),f=!(0,u.isNil)(h)&&!a,g=(0,n.useCallback)((e=>{d(e)}),[d]),m=(0,n.useCallback)((e=>{g({active:h===e?null:e})}),[h,g]),y=(0,n.useCallback)((()=>{g({active:null})}),[g]),v=(0,n.useCallback)((e=>{let{size:t}=e;g({width:t})}),[g]);return r().createElement(r().Fragment,null,r().createElement(bi,{className:s.resizablePanesWrapper,primary:"second",orientation:"vertical",size:f?p:0,minSize:320,maxSize:640,allowResize:f,onChange:v,debounceInterval:2500},r().createElement("div",{className:s.pane},o[0]),r().createElement("div",{className:s.pane},(0,n.cloneElement)(o[1],{active:h,onClose:y}))),r().createElement(Di,{disabled:a,buttonsProps:i,onButtonClick:m,activeIndexId:h}))};ji.displayName="ProfileResizablePanes";var zi=h(1531),Fi=h.n(zi);const Bi=e=>{let{entity:t,avatarClassName:n,imageClassName:i}=e;const a=(0,o.useSelector)(b().selectors.getMetadata),l=(0,o.useSelector)(b().selectors.getAbsoluteImagePath)||"",s=(0,Fo.getEntityImage)(a,l,t),u=(0,Fo.getAbsoluteImageUrl)(l,(0,Fo.getEntityTypeImage)(a,t.type)),d=e=>{e.target.onError=null,e.target.src=(0,Fo.svg2Url)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return r().createElement(Fi(),{className:c()(n,i),src:s,imgProps:{onError:d}},r().createElement("img",{className:i,src:u,alt:"fallback entity avatar",onError:d}))};var Wi=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),Ui="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Hi=void 0!==h.g&&h.g.Math===Math?h.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Vi="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Hi):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},Gi=["top","right","bottom","left","width","height","size","weight"],qi="undefined"!=typeof MutationObserver,Yi=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&l()}function a(){Vi(i)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(a,20);o=e}return l}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Ui&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),qi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Ui&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Gi.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Ki=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},$i=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Hi},Zi=ta(0,0,0,0);function Xi(e){return parseFloat(e)||0}function Qi(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Xi(e["border-"+n+"-width"])}),0)}var Ji="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof $i(e).SVGGraphicsElement}:function(e){return e instanceof $i(e).SVGElement&&"function"==typeof e.getBBox};function ea(e){return Ui?Ji(e)?function(e){var t=e.getBBox();return ta(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Zi;var r=$i(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=Xi(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,l=Xi(r.width),s=Xi(r.height);if("border-box"===r.boxSizing&&(Math.round(l+i)!==t&&(l-=Qi(r,"left","right")+i),Math.round(s+a)!==n&&(s-=Qi(r,"top","bottom")+a)),!function(e){return e===$i(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return ta(o.left,o.top,l,s)}(e):Zi}function ta(e,t,n,r){return{x:e,y:t,width:n,height:r}}var na=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ta(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=ea(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),ra=function(e,t){var n,r,o,i,a,l,s,c=(r=(n=t).x,o=n.y,i=n.width,a=n.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(l.prototype),Ki(s,{x:r,y:o,width:i,height:a,top:o,right:r+i,bottom:a+o,left:r}),s);Ki(this,{target:e,contentRect:c})},oa=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Wi,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof $i(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new na(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof $i(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new ra(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),ia="undefined"!=typeof WeakMap?new WeakMap:new Wi,aa=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Yi.getInstance(),r=new oa(t,n,this);ia.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){aa.prototype[e]=function(){var t;return(t=ia.get(this))[e].apply(t,arguments)}}));const la=void 0!==Hi.ResizeObserver?Hi.ResizeObserver:aa,sa=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ca="object"==typeof global&&global&&global.Object===Object&&global;var ua="object"==typeof self&&self&&self.Object===Object&&self;const da=ca||ua||Function("return this")(),pa=function(){return da.Date.now()};var ha=/\s/;var fa=/^\s+/;const ga=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&ha.test(e.charAt(t)););return t}(e)+1).replace(fa,""):e},ma=da.Symbol;var ya=Object.prototype,va=ya.hasOwnProperty,ba=ya.toString,xa=ma?ma.toStringTag:void 0;var wa=Object.prototype.toString;var Sa=ma?ma.toStringTag:void 0;const Ea=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Sa&&Sa in Object(e)?function(e){var t=va.call(e,xa),n=e[xa];try{e[xa]=void 0;var r=!0}catch(e){}var o=ba.call(e);return r&&(t?e[xa]=n:delete e[xa]),o}(e):function(e){return wa.call(e)}(e)};var Oa=/^[-+]0x[0-9a-f]+$/i,Ca=/^0b[01]+$/i,_a=/^0o[0-7]+$/i,ka=parseInt;const Ta=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Ea(e)}(e))return NaN;if(sa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=sa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ga(e);var n=Ca.test(e);return n||_a.test(e)?ka(e.slice(2),n?2:8):Oa.test(e)?NaN:+e};var Pa=Math.max,Ma=Math.min;const Ra=function(e,t,n){var r,o,i,a,l,s,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function f(e){return c=e,l=setTimeout(m,t),u?h(e):a}function g(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=i}function m(){var e=pa();if(g(e))return y(e);l=setTimeout(m,function(e){var n=t-(e-s);return d?Ma(n,i-(e-c)):n}(e))}function y(e){return l=void 0,p&&r?h(e):(r=o=void 0,a)}function v(){var e=pa(),n=g(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return f(s);if(d)return clearTimeout(l),l=setTimeout(m,t),h(s)}return void 0===l&&(l=setTimeout(m,t)),a}return t=Ta(t)||0,sa(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Pa(Ta(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},v.flush=function(){return void 0===l?a:y(pa())},v};var Ia={debounce:Ra,throttle:function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return sa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ra(e,t,{leading:r,maxWait:t,trailing:o})}},Da=function(e){return"function"==typeof e},Aa=function(){return"undefined"==typeof window};function La(e){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(e)}function Na(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ja(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function za(e,t){return za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},za(e,t)}function Fa(e,t){return!t||"object"!==La(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ba(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wa(e)}var Ua=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&za(e,t)}(i,e);var t,n,r,o=(t=i,function(){var e,n=Wa(t);if(Ba()){var r=Wa(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Fa(this,e)});function i(){return Na(this,i),o.apply(this,arguments)}return n=i,(r=[{key:"render",value:function(){return this.props.children}}])&&ja(n.prototype,r),i}(n.PureComponent);const Ha=Ua;function Va(e){return Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Va(e)}function Ga(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qa(e,t){return qa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},qa(e,t)}function Ya(e,t){return!t||"object"!==Va(t)&&"function"!=typeof t?Ka(e):t}function Ka(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Za(e)}function Xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qa(e,t)}(l,e);var t,o,i,a=(t=l,function(){var e,n=Za(t);if($a()){var r=Za(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Ya(this,e)});function l(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),Xa(Ka(t=a.call(this,e)),"cancelHandler",(function(){t.resizeHandler&&t.resizeHandler.cancel&&(t.resizeHandler.cancel(),t.resizeHandler=null)})),Xa(Ka(t),"rafClean",(function(){t.raf&&t.raf.cancel&&(t.raf.cancel(),t.raf=null)})),Xa(Ka(t),"toggleObserver",(function(e){var n=t.getElement();n&&t.resizeObserver[e]&&t.resizeObserver[e](n)})),Xa(Ka(t),"getElement",(function(){var e=t.props,n=e.querySelector,r=e.targetDomEl;if(!Aa()){if(n)return document.querySelector(n);if(r&&((o=r)instanceof Element||o instanceof HTMLDocument))return r;var o,i=t.element&&(0,ee.findDOMNode)(t.element);if(i)return i.parentElement}})),Xa(Ka(t),"createUpdater",(function(){return t.rafClean(),t.raf=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r}((function(e){var n=e.width,r=e.height,o=t.props.onResize;Da(o)&&o(n,r),t.setState({width:n,height:r})})),t.raf})),Xa(Ka(t),"createResizeHandler",(function(e){var n=t.state,r=n.width,o=n.height,i=t.props,a=i.handleWidth,l=i.handleHeight;if(a||l){var s=t.createUpdater();e.forEach((function(e){var n=e&&e.contentRect||{},i=n.width,c=n.height,u=a&&r!==i||l&&o!==c;!t.skipOnMount&&u&&!Aa()&&s({width:i,height:c}),t.skipOnMount=!1}))}})),Xa(Ka(t),"onRef",(function(e){t.element=e})),Xa(Ka(t),"getRenderType",(function(){var e=t.props,r=e.render,o=e.children;return Da(r)?"renderProp":Da(o)?"childFunction":(0,n.isValidElement)(o)?"child":Array.isArray(o)?"childArray":"parent"})),Xa(Ka(t),"getTargetComponent",(function(){var e=t.props,r=e.render,o=e.children,i=e.nodeType,a=t.state,l={width:a.width,height:a.height};switch(t.getRenderType()){case"renderProp":return(0,n.cloneElement)(r(l),{key:"resize-detector"});case"childFunction":return(0,n.cloneElement)(o(l));case"child":return(0,n.cloneElement)(o,l);case"childArray":return o.map((function(e){return!!e&&(0,n.cloneElement)(e,l)}));default:return(0,n.createElement)(i)}}));var r=e.skipOnMount,o=e.refreshMode,i=e.refreshRate,s=e.refreshOptions;t.state={width:void 0,height:void 0},t.skipOnMount=r,t.raf=null,t.element=null,t.unmounted=!1;var c=Ia[o];return t.resizeHandler=c?c(t.createResizeHandler,i,s):t.createResizeHandler,t.resizeObserver=new la(t.resizeHandler),t}return o=l,(i=[{key:"componentDidMount",value:function(){this.toggleObserver("observe")}},{key:"componentWillUnmount",value:function(){this.toggleObserver("unobserve"),this.rafClean(),this.cancelHandler(),this.unmounted=!0}},{key:"render",value:function(){return r().createElement(Ha,{ref:this.onRef},this.getTargetComponent())}}])&&Ga(o.prototype,i),l}(n.PureComponent);Qa.propTypes={handleWidth:a.bool,handleHeight:a.bool,skipOnMount:a.bool,refreshRate:a.number,refreshMode:a.string,refreshOptions:(0,a.shape)({leading:a.bool,trailing:a.bool}),querySelector:a.string,targetDomEl:a.any,onResize:a.func,render:a.func,children:a.any,nodeType:a.node},Qa.defaultProps={handleWidth:!1,handleHeight:!1,skipOnMount:!1,refreshRate:1e3,refreshMode:void 0,refreshOptions:void 0,querySelector:null,targetDomEl:null,onResize:null,render:void 0,children:null,nodeType:"div"};const Ja=Qa,el=window["material-ui"].RootRef;var tl=h.n(el);const nl=(0,i.makeStyles)((e=>({tooltip:e.tooltip,popper:{zIndex:1e4}})));function rl(){return rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(this,arguments)}function ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){il(e,t,n[t])}))}return e}function il(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const al=e=>{let{children:t,value:o="",className:i,showOnExceededWidth:a=!0,showOnExceededHeight:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","value","className","showOnExceededWidth","showOnExceededHeight"]);const c=nl(),u=(0,n.useRef)(),[d,p]=(0,n.useState)(!1),h=()=>p(((e,t,n)=>e&&(t&&e.clientWidth<e.scrollWidth||n&&e.clientHeight<e.scrollHeight))(u.current,a,l));return(0,n.useEffect)(h,[l,a,o]),r().createElement(r().Fragment,null,r().createElement(Ja,{handleWidth:a,handleHeight:l,onResize:h,refreshMode:"debounce",refreshRate:100}),r().createElement(tl(),{rootRef:u},r().createElement(wi(),rl({title:d?o:"",classes:ol({},c,{tooltip:i})},s),t)))},ll=(0,i.makeStyles)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),sl=e=>{let{entity:t,className:n,size:i="small"}=e;const a=ll(),l=(0,o.useSelector)(b().selectors.getMetadata),s=t.type,u=(0,Fo.getEntityType)(l,s),d=(u?(0,Fo.getPropWithInheritance)(l,u,"typeColor"):null)||Fo.theme.palette.primary.main,p=(0,Fo.getEntityTypeLabel)(l,t);return r().createElement(al,{value:p,placement:"top"},r().createElement(R(),{style:{backgroundColor:d,color:Fo.utils.Colors.getColor(d)?"#FFFFFF":"#212121"},className:c()(a[`entityType-${i}`],a["entityType-overflow"],n),component:"div"},p))},cl=(0,i.makeStyles)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),ul=cl,dl=e=>{let{className:t,entity:i,children:a,classes:l,renderLabel:s=u.identity}=e;const d=ul({classes:l}),h=(0,o.useSelector)(b().selectors.getMetadata),f=(0,o.useSelector)(b().selectors.getShowEntityId),g=(0,n.useCallback)((()=>{navigator.clipboard.writeText((0,Fo.getEntityId)(i))}),[i]);if((0,u.isNil)(i))return null;const m=(0,Fo.getLabel)(i.label),y=i.secondaryLabel,v=(0,Fo.getBusinessCardAttributesText)(h,i),x=(0,Fo.isActiveObject)(i),w=i.uri,S=(0,Fo.getEntityId)(i);return r().createElement("div",{className:c()(d.profileBandWrapper,t)},r().createElement("div",{className:c()(d.profileBand,{[d.inactive]:!x}),"data-entity-uri":w},r().createElement(Bi,{key:i.uri,entity:i,avatarClassName:d.profileIcon,imageClassName:d.imageProfileIcon}),r().createElement("div",{className:d.profileInfo},r().createElement("div",null,r().createElement(R(),{variant:"h6",className:d.label},s(m)),y&&r().createElement(R(),{variant:"subtitle2",className:d.secondaryLabel},y),v&&r().createElement(R(),{variant:"subtitle1",className:d.businessCard},v)),r().createElement("div",{className:d.specialInfo},r().createElement("div",{className:d.entityType},r().createElement(sl,{entity:i,size:"medium",className:d.badge}),!(0,Fo.isTempUri)(w)&&f&&r().createElement(wi(),{title:p().text("Copy to clipboard")},r().createElement(R(),{display:"inline",variant:"body2",className:d.entityId,onClick:g},p().text("Entity ID"),": ",S))))),a&&r().createElement("div",null,a)))},pl=window["material-ui"].Link;var hl=h.n(pl),fl=h(7766),gl=h(2767);const ml=r().createContext({profileBand:{}});ml.displayName="LabelsContext";const yl=(0,i.makeStyles)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),vl=Oi(hl()),bl=e=>{var t;let{className:o,total:i=0,onPrev:a,onNext:l,onSearchResultsClick:s,isPrevDisabled:d,isNextDisabled:h}=e;const f=yl(),g=(0,n.useContext)(ml),{OPEN_RESULTS:m,SEARCH_RESULT:y,SEARCH_RESULTS:v,NEXT_PROFILE:b,PREVIOUS_PROFILE:x}=(0,u.mergeRight)({OPEN_RESULTS:p().text("Go to search results"),SEARCH_RESULT:p().text("Search result"),SEARCH_RESULTS:p().text("Search results"),PREVIOUS_PROFILE:p().text("Go to previous profile"),NEXT_PROFILE:p().text("Go to next profile")},null!==(t=null==g?void 0:g.profileBand)&&void 0!==t?t:{});return r().createElement("div",{className:c()(f.container,o)},r().createElement(vl,{className:f.link,component:"button",variant:"caption",onClick:s,underline:"none",tooltipTitle:m},(0,Fo.formatNumberAsMetric)(i,1e6)," ",1===i?y:v),r().createElement(Pi,{size:"L",icon:fl.Z,"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:x,onClick:a,disabled:d,showForDisabled:!0}),r().createElement(Pi,{size:"L",icon:gl.Z,"data-reltio-id":"reltio-next-profile-button",tooltipTitle:b,onClick:l,disabled:h,showForDisabled:!0}))};function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wl=e=>e.target.value,Sl=e=>e.target.checked,El=()=>{},Ol=()=>null,Cl=(e,t)=>(0,u.union)(Object.keys(e),Object.keys(t)).reduce(((n,r)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xl(e,t,n[t])}))}return e}({},n,{[r]:c()(e[r],t[r])})),{}),_l=r().createContext({isLoading:!1,updateEntityLoadingState:El,updateEntitiesNavigationLoadingState:El,resetLoadingState:El}),kl=r().createContext(null);kl.displayName="ViewIdContext";const Tl=(0,n.createContext)(null);Tl.displayName="ActionsHookContext";const Pl=new Promise((()=>{})),Ml=function(){let{cancelPrevious:e=!0,cancelOnUnmount:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,n.useRef)(El),o=()=>r.current();return(0,n.useEffect)((()=>()=>{t&&o()}),[]),(0,n.useCallback)((t=>(e&&o(),new Promise(((e,n)=>{r.current=()=>n("canceled"),t.then(e,n)})).catch((function(e){if("canceled"===e)return Pl;throw e})))),[])};function Rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Il(e,t,n[t])}))}return e}function Il(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Dl{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:i,searchTenant:a,apiPath:l,dtssPath:s,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=Rl({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,Fo.getFilteredEntitiesFromDataTenant)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,Fo.getFilteredEntities)(r,o)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,Fo.getTotalFromDataTenant)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,Fo.getTotals)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=i,this.searchTenant=a,this.apiPath=l,this.dtssPath=s,this.globalSearchRequestOptions=c}}function Al(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ll(e,t,n[t])}))}return e}function Ll(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nl{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,Fo.getGraphSearchEntities)({apiPath:t.apiPath,tenant:t.tenant,searchBody:Al({},t.searchBody,{filter:e.length?(0,Fo.buildFilterQueryString)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,Fo.getEntityId)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,Fo.getGraphSearchCount)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zl(e,t,n[t])}))}return e}function zl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fl=(e,t)=>(0,u.pipe)((0,u.map)((0,u.prop)("uri")),(0,u.reject)((e=>t.includes(e))))(e),Bl=()=>{const e=Ml(),t=Ml(),r=Ml(),{uri:i,index:a,total:l,tenant:s,cache:c}=(0,o.useSelector)(b().selectors.getSearchNavigationData)||{},{type:u,data:d}=(0,o.useSelector)(b().selectors.getSearchProviderData)||{},p=(0,o.useSelector)(b().selectors.getTenant),h=(0,o.useSelector)(b().selectors.getApiPath),f=(0,o.useSelector)(b().selectors.getDtssPath),g=(0,o.useSelector)((e=>b().selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),{updateEntitiesNavigationLoadingState:m}=(0,n.useContext)(_l),y=(0,n.useContext)(kl),x=(0,o.useDispatch)(),[w,S]=(0,n.useState)(!1),E=(0,n.useMemo)((()=>((e,t)=>{switch(e){case"search":return new Dl(t);case"graphsearch":return new Nl(t)}})(u,{data:d,tenant:p,searchTenant:s,apiPath:h,dtssPath:f,globalSearchRequestOptions:g})),[u,d,p,s,h,f,g]),O=(0,n.useCallback)((e=>{x(v.search.actions.updateSearchNavigationDataFields(e))}),[x]),C=(0,n.useCallback)((e=>{const t=p!==s?(0,Fo.getEntityUriForLink)({uri:e,dataTenant:s}):e;x(v.ui.actions.openEntity({uri:t,viewId:y,source:"navigation"}))}),[x,y,p,s]),_=(0,n.useCallback)((()=>{x(v.ui.actions.openPerspective({perspectiveId:u,viewId:y}))}),[x,u,y]);(0,n.useEffect)((()=>{a>=l?O({index:l-1}):a<0&&O({index:0})}),[l,a,O]);const k=(()=>{const e=(0,n.useContext)(Tl);if(!e)throw new Error("ActionsHookContext must be provided");return e})();(0,n.useEffect)((()=>{const e=k(((e,t)=>{switch(e.type){case v.search.constants.UPDATE_SEARCH_NAVIGATION_DATA_ON_MERGE:{const n=b().selectors.getSearchNavigationData(t);n&&O(((e,t)=>{const{winnerUri:n,losersUris:r=[]}=t,o=((e,t)=>{let{uri:n,index:r,total:o,cache:i}=e;if(t&&t!==n){if(i&&i.includes(n)){i=[...i];const e=i.indexOf(t);let a=i.indexOf(n);e>=0&&(i.splice(e,1),o--,e<a&&r--),a=i.indexOf(n),i.splice(a,1,t)}return n=t,jl({},e,{uri:n,index:r,cache:i,total:o})}return e})(e,n);return((e,t)=>{const{cache:n=[],index:r,total:o,uri:i}=e,a=t.filter((e=>n.includes(e)));if(0===a.length)return e;const l=o-a.length,s=n.indexOf(i);let c=r;for(const e of a)n.indexOf(e)<s&&c--;const u=n.filter((e=>!a.includes(e)));return jl({},e,{cache:u,index:c,total:l})})(o,r)})(n,e.payload));break}}}));return()=>e()}),[k,O]);const T=(0,n.useCallback)(((e,n,o)=>{S(!0),t(E.requestTotal()).then((e=>O({total:e})));const i=o+1;return r(E.requestEntities(15,i)).then((t=>{if(t){if(t.length){const r=Fl(t,e);if(r.length>0)return O({cache:e.concat(r),uri:r[0],index:i+t.length-r.length}),void C(r[0]);if(o+t.length<n-1)return T(e,n-t.length,o+t.length)}O({index:i})}})).finally((()=>{S(!1)}))}),[E,O,C]),P=(0,n.useCallback)(((e,n)=>{S(!0),t(E.requestTotal()).then((e=>O({total:e})));const o=n-1,i=Math.max(0,n-15),a=15+Math.min(0,n-15);return r(E.requestEntities(a,i)).then((t=>{if(t){if(t.length){const r=Fl(t,e);if(r.length>0)return O({cache:r.concat(e),uri:r[r.length-1],index:o-(t.length-r.length)}),void C(r[r.length-1]);if(n-t.length>0)return P(e,n-t.length)}O({index:0})}})).finally((()=>{S(!1)}))}),[E,O,C]),M=(0,n.useCallback)(((t,n,r,o)=>{if(n<t.length){const i=t[n];return S(!0),e(E.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),M(e,n,r-1,o)}O({index:o+1,uri:i,cache:t,total:r}),C(i)})).finally((()=>{S(!1)}))}if(!(o>=r-1))return T(t,r,o);O({cache:t,total:r,index:r-1})}),[E,O,C,T]),R=(0,n.useCallback)(((t,n,r,o)=>{if(n>-1){const i=t[n];return S(!0),e(E.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),R(e,n-1,r-1,o-1)}O({index:o-1,uri:i,cache:t,total:r}),C(i)})).finally((()=>{S(!1)}))}if(!(o<=0))return P(t,o);O({index:0,cache:t,total:r})}),[E,O,C,P]),I=(0,n.useCallback)((()=>{if(c&&i){const e=c.indexOf(i)-1;R(c,e,l,a)}}),[R,c,i,l,a]),D=(0,n.useCallback)((()=>{if(c&&i){const e=c.indexOf(i)+1;M(c,e,l,a)}}),[M,c,i,l,a]);return(0,n.useEffect)((()=>{m(w)}),[m,w]),(0,n.useEffect)((()=>()=>m(!1)),[]),{total:l,onPrev:I,onNext:D,onSearchResultsClick:_,isPrevDisabled:w||a<=0,isNextDisabled:w||a>=l-1}},Wl=e=>{let{className:t}=e;const{total:n,onPrev:i,onNext:a,onSearchResultsClick:l,isPrevDisabled:s,isNextDisabled:c}=Bl(),u=(()=>{const{cache:e}=(0,o.useSelector)(b().selectors.getSearchNavigationData)||{},t=(0,o.useSelector)(b().selectors.getMode),n=(0,o.useSelector)(b().selectors.getEntity);return(0,Fo.isViewMode)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})();return u?r().createElement(bl,{className:t,total:n,onPrev:i,onNext:a,onSearchResultsClick:l,isPrevDisabled:s,isNextDisabled:c}):null},Ul="commentsContainerVisibilityArea",Hl=(0,i.makeStyles)((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},".commentsContainerVisibilityArea:hover &":{visibility:"visible"}},showAlways:{}}))),Vl=(e,t)=>{const r=(0,n.useRef)(!1);(0,n.useEffect)((()=>{r.current?e():r.current=!0}),t)};function Gl(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const ql=function(e,t){var n;void 0===t&&(t=Gl);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}},Yl=ql(((e,t)=>(0,Fo.getAllUsersForTenant)({tenant:e,servicesPath:t}))),Kl=r().createContext([]);Kl.displayName="UsersContext";const $l=()=>{},Zl=r().createContext({comments:[],commentsMap:null,currentComment:null,updateCommentState:$l,clearCommentState:$l,getCommentState:()=>({}),getComment:$l,getComments:()=>new Promise($l),getCommentsCount:$l,createComment:()=>new Promise($l),editComment:()=>new Promise($l),createReply:()=>new Promise($l),resolveThread:$l,reOpenThread:$l,clearCurrentComment:$l,deleteComment:$l,sending:!1,loading:!1,pageToken:null,deleteReply:$l,editReply:()=>new Promise($l)});Zl.displayName="CollaborationContext";const Xl=e=>{let{collaboration:t,children:i}=e;const a=(()=>{const[e,t]=(0,n.useState)([]),r=(0,o.useSelector)(b().selectors.getTenant),i=(0,o.useSelector)(b().selectors.getServicesPath),a=e=>{console.warn("Users error",e),t([])};return(0,n.useEffect)((()=>{Yl(r,i).then((e=>t(e))).catch(a)}),[r,i]),e})();return r().createElement(Zl.Provider,{value:t},r().createElement(Kl.Provider,{value:a},i))},Ql=r().createContext([]);function Jl(){return Jl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(this,arguments)}Ql.displayName="RelatedObjectUrisContext";const es=e=>r().createElement("svg",Jl({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),ts=(0,i.makeStyles)((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}},childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}))),ns=r().forwardRef(((e,t)=>{let{children:n,onClick:o}=e;const i=ts();return r().createElement(wi(),{title:p().text("Show comment")},r().createElement("div",{ref:t,className:i.root,onClick:o},r().createElement(es,{className:i.icon}),r().createElement("div",{className:i.childrenWrapper},n)))}));ns.displayName="CommentButton";const rs=ns;function os(){return os=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},os.apply(this,arguments)}const is=e=>r().createElement("svg",os({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),as=e=>{let{className:t,onClick:n}=e;const o=ts();return r().createElement(wi(),{title:p().text("Add comment")},r().createElement("div",{className:c()(o.root,t),onClick:n},r().createElement(is,{className:o.icon})))},ls=window["material-ui"].Box;var ss=h.n(ls),cs=h(7291),us=h(3054);const ds=window["material-ui"].Menu;var ps=h.n(ds);const hs=window["material-ui"].Checkbox;var fs=h.n(hs);const gs=window["material-ui"].MenuItem;var ms=h.n(gs);const ys=(0,i.makeStyles)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,i.fade)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,i.fade)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),vs=Oi(ms()),bs=(0,n.forwardRef)(((e,t)=>{let{item:n,onMenuClose:o=u.identity}=e;const i=ys(),{disabled:a,text:l,tooltip:s,onClick:c,id:d="",selectable:p,selected:h}=n;return r().createElement(vs,{tooltipTitle:s,showForDisabled:!0,classes:{root:i.menuItem},onClick:e=>{o(e),c(e)},disabled:a,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${d}`},p&&r().createElement(fs(),{checked:h,color:"primary"}),r().createElement(R(),{classes:{root:i.menuText}},l))}));bs.displayName="MenuItemRenderer";const xs=bs;function ws(){return ws=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ws.apply(this,arguments)}function Ss(e){let{className:t,menuId:o,buttonComponent:i=D(),buttonContent:a,menuItems:l=[],buttonProps:s={},popoverProps:d={},onMenuOpen:p=u.identity,onMenuClose:h=u.identity,MenuItemRenderer:f=xs}=e;const g=i,m=ys(),y=(0,n.useRef)(),[v,b]=(0,n.useState)(!1);Vl((()=>{v?p():h()}),[v]);const x=(0,n.useCallback)((e=>{null==e||e.stopPropagation(),b((e=>!e))}),[]);return r().createElement(r().Fragment,null,r().createElement(g,ws({ref:y,className:c()(m.buttonRoot,{[m.selected]:v},t),onClick:x,"aria-pressed":v,"aria-controls":v?o:void 0,"aria-haspopup":"true"},s),a),r().createElement(ps(),ws({id:o,variant:"menu",open:v,autoFocus:!1,classes:{paper:m.paper},anchorEl:y.current,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:v}},d),l.map(((e,t)=>r().createElement(f,{item:e,key:t,onMenuClose:x})))))}Ss.displayName="DropDownMenuButton";const Es=Ss,Os=r().createContext({});Os.displayName="EntitiesMapContext";const Cs=r().createContext({generateEntityUrl:Fo.generateEntityUrlForOldMode,generatePivotingUrl:Fo.generatePivotingUrlForOldMode,generateTagUrl:Fo.generateTagUrlForOldMode});Cs.displayName="UrlGeneratorsContext";const _s=(0,n.forwardRef)(((e,t)=>{let{value:i,children:a,screen:l,className:s}=e;const c=(0,o.useDispatch)(),u=(0,n.useContext)(kl),{generateEntityUrl:d}=(0,n.useContext)(Cs),p=(0,o.useSelector)(b().selectors.getUIPath),h=(0,n.useCallback)((()=>{c(v.ui.actions.openEntity({uri:i,viewId:u,screen:l}))}),[u,i,c,l]);return r().createElement("a",{ref:t,href:(f=i,d({uiPath:p,uri:f,screen:l})),onClick:e=>{h(),e.stopPropagation(),e.preventDefault()},className:s},a);var f}));_s.displayName="EntityUriLink";const ks=_s,Ts=(e,t)=>{const n=e.relatedObjectUris.indexOf(t);if(n>=0)return e.relatedObjectUris[1-n]},Ps=e=>`${p().date(e,"LT")} ${p().date(e,"LL")}`,Ms=e=>`comment/${e.commentId}`,Rs=(e,t)=>`comment/${e.commentId}/reply/${t.replyId}`,Is=(e,t)=>{let n=e;for(const e of t)n=n.split(`+${e}`).join(`@[${e}](${e})`);return n},Ds=(0,i.makeStyles)((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none"}})));function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ls=e=>{let{comment:t,className:i}=e;const a=Ds(),l=(0,o.useSelector)(b().selectors.getEntity),s=(0,o.useSelector)(b().selectors.getMetadata),d=(0,n.useContext)(Os);return r().createElement(ss(),{className:i},(()=>{switch(t.objectType){case Fo.CollaborationObjectTypes.ENTITY_ATTRIBUTE:{const e=(0,Fo.getAttributeTypeUriByValueUri)(t.objectId,l.type),n=(0,Fo.findAttributeTypeByUri)(s,e);return r().createElement(r().Fragment,null,r().createElement(R(),{className:a.title},p().text("Selected attribute:")),r().createElement(R(),{className:a.label},null==n?void 0:n.label))}case Fo.CollaborationObjectTypes.RELATION_ATTRIBUTE:{const e=t.relatedObjectUris.find((0,u.startsWith)("configuration/relationTypes")),n=(0,Fo.getAttributeTypeUriByValueUri)(t.objectId,e),o=(0,Fo.findAttributeTypeByUri)(s,n);return r().createElement(r().Fragment,null,r().createElement(R(),{className:a.title},p().text("Selected attribute:")),r().createElement(R(),{className:a.label},null==o?void 0:o.label))}case Fo.CollaborationObjectTypes.ENTITY:return r().createElement(r().Fragment,null,r().createElement(R(),{className:a.title},p().text("Selected profile:")),r().createElement(ks,{className:c()(a.label,a.link),value:(0,Fo.getEntityUriForLink)(l)},(0,Fo.getLabel)(l.label)));case Fo.CollaborationObjectTypes.RELATION:{const e=Ts(t,l.uri),n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){As(e,t,n[t])}))}return e}({},d[e]||{},{uri:e});return r().createElement(r().Fragment,null,r().createElement(R(),{className:a.title},p().text("Selected relation:")),r().createElement(R(),{className:a.label},r().createElement(ks,{className:a.link,value:(0,Fo.getEntityUriForLink)(l)},(0,Fo.getLabel)(l.label)),e&&r().createElement(r().Fragment,null,` ${p().text("to")} `,r().createElement(ks,{className:a.link,value:(0,Fo.getEntityUriForLink)(n)},n.label?(0,Fo.getLabel)(n.label):(0,Fo.getEntityId)(n)))))}case Fo.CollaborationObjectTypes.POTENTIAL_MATCH:{var e;const n=Ts(t,l.uri),o={uri:n,label:null===(e=d[n])||void 0===e?void 0:e.label};return r().createElement(r().Fragment,null,r().createElement(R(),{className:a.title},p().text("Selected potential match:")),r().createElement(R(),{className:a.label},r().createElement(ks,{className:a.link,value:(0,Fo.getEntityUriForLink)(l)},(0,Fo.getLabel)(l.label)),n&&r().createElement(r().Fragment,null,` ${p().text("and")} `,r().createElement(ks,{className:a.link,value:(0,Fo.getEntityUriForLink)(o)},o.label?(0,Fo.getLabel)(o.label):(0,Fo.getEntityId)(o)))))}default:return null}})())},Ns=(0,i.makeStyles)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),js=e=>{let{comment:t,className:o}=e;const i=Ns(),a=(0,n.useContext)(Kl);return r().createElement(R(),{className:c()(i.root,o)},function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"+";const o=[];let i="",a=!1;for(let l=0;l<=e.length;l++){const s=e[l],c=e[l+1],u=l===e.length-1;i+=s,s===r&&0===l&&(a=!0),a&&t.includes(i.slice(r.length))&&(a=!1,o.push(n(i)),i=""),c===r&&(a=!0,o.push(i),i=""),u&&o.push(i)}return o}(t.content,t.namedUsers,(e=>{const t=a.find((t=>t.username===e.slice(1)));return t?r().createElement(hl(),{href:`mailto:${t.email}`},e):e})).map(((e,t)=>r().createElement(n.Fragment,{key:t},e))))},zs=(0,i.makeStyles)((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function Fs(){return Fs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fs.apply(this,arguments)}const Bs=e=>{let{className:t,children:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","children"]);const i=zs();return r().createElement(Fi(),Fs({},o,{className:c()(i.root,t)}),n.split(".").map((e=>e[0].toUpperCase())).join(""))};function Ws(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Us(){return Us=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Us.apply(this,arguments)}function Hs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gs(e,t,n){return t&&Vs(e.prototype,t),n&&Vs(e,n),e}function qs(e){return qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qs(e)}function Ys(e){return Ys="function"==typeof Symbol&&"symbol"===qs(Symbol.iterator)?function(e){return qs(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":qs(e)},Ys(e)}function Ks(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $s(e,t){return!t||"object"!==Ys(t)&&"function"!=typeof t?Ks(e):t}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zs(e)}function Xs(e,t){return Xs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xs(e,t)}function Qs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xs(e,t)}function Js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ec=h(7677),tc=h.n(ec);var nc=function(e){return e===Object(e)?Object.keys(e):[]},rc=function(e){return e===Object(e)?Object.values(e):[]};function oc(e,t){var n=Object.assign({},e);return lc(e)&&lc(t)&&nc(t).forEach((function(r){lc(t[r])&&r in e?n[r]=oc(e[r],t[r]):Object.assign(n,Oe({},r,t[r]))})),n}var ic=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return oc(e,t)}),e)},ac=function(e,t){var n=Object.assign({},e);if(t)for(var r=0;r<t.length;r++)delete n[t[r]];return n},lc=function(e){return!(e!==Object(e)||e instanceof Date||Array.isArray(e))},sc=function(e){return(e||[]).filter(Boolean)},cc=function(e){return"&"===e[0]},uc=function(e){return!cc(e)},dc=function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},pc=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=nc(e),r={},o=0,i=n.length;o<i;o+=1){var a=n[o],l="[object Object]"!==Object.prototype.toString.call(e[a])||":"===a[0]||"@"===a[0]||t.indexOf(a)>=0;l&&(r[a]=e[a])}return r},hc=function(e,t){for(var n=t.map(dc),r=nc(e),o={},i=0,a=r.length;i<a;i+=1){var l=r[i];(t.indexOf(l)>=0||n.indexOf(dc(l))>=0)&&(o[l]=e[l])}return o},fc=function e(t,n){for(var r=ic.apply(void 0,[{},ac(t,n)].concat(Kt(rc(hc(t,n))))),o=nc(r).filter(cc),i=0,a=o.length;i<a;i+=1){var l=o[i],s=e(r[l],n);n.indexOf(l)>=0?(delete r[l],r=ic({},r,s)):r[l]=s}return r};function gc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gc(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yc=["animationName"];const vc=function(e){var t=e.style,n=e.className;return mc(mc({},t?{style:pc(t,yc)}:{}),n?{className:n}:{})};var bc=(0,n.createContext)(vc);bc.Provider;const xc=function(e){if(!e)return[];if("string"==typeof e)return[e];if(!Array.isArray(e)){var t=e;return nc(e).reduce((function(e,n){return e.concat(t[n]?[n]:[])}),[])}return e};var wc={};const Sc=function(e){return function(t,n){var r,o=n||wc;e.memoize=e.memoize||new WeakMap,e.memoize.has(o)?r=e.memoize.get(o):(r={},e.memoize.set(o,r));var i=xc(t).join(" ");return i in r?r[i]:r[i]=e(t||[],n)}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ec(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ec(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cc=function(e){var t=e&&nc(e)[0];return t&&t.split("__")[0].split("--")[0]},_c=function(e,t,n){if(e){var r=e.split(" ")[0],o=[].concat(Kt(0===t.length?n.map((function(e){return"".concat(r,"--").concat(e.substring(1))})):[]),Kt(t.map((function(e){return"".concat(r,"__").concat(e)}))));return 0===t.length?[e].concat(Kt(o)):o}};const kc=function e(t){var n=t.style,r=t.className,o=t.classNames,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vc,a=r||Cc(o)||(null==n?void 0:n.className),l="function"==typeof n?n:Sc((function(t,r){var l=xc(t);tc()(Array.isArray(l),"First parameter must be a string, an array of strings, a plain object with boolean values, or a falsy value."),tc()(!r||lc(r),"Optional second parameter must be a plain object.");var s=l.filter(cc),c=l.filter(uc),u=c.length>0?function(e){return rc(hc(e,c))}:function(e){return[e]},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(fc(e,s))},p=_c(a,c,s);return e(Oc(Oc(Oc({},(n||r)&&{style:ic.apply(void 0,[{}].concat(Kt(d(r)),Kt(d(n))))}),p&&{className:p.join(" ")}),o&&{classNames:o}),i)})),s=Oc({},"function"==typeof n?n:{style:n}),c=Kt(new Set([].concat(Kt(s.className?s.className.split(" "):[]),Kt(a?a.split(" "):[])))),u=o?sc(c.map((function(e){return o[e]}))):c,d=i(Oc(Oc({},s),u.length>0?{className:u.join(" ")}:{}));return Object.assign(l,d),l},Tc=function(e,t,r){var o=t.style,i=t.className,a=t.classNames,l=(0,n.useContext)(bc);return(0,n.useMemo)((function(){return kc({style:o,className:i,classNames:a},l)}),[o,i,a,l])(r,e)};function Pc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pc(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rc=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},Ic="__id__",Dc="__display__",Ac=function(e,t){tc()("id"===t||"display"===t,'Second arg must be either "id" or "display", got: "'.concat(t,'"'));var n=e.indexOf(Dc),r=e.indexOf(Ic);return n<0&&(n=null),r<0&&(r=null),tc()(null!==n||null!==r,"The markup '".concat(e,"' does not contain either of the placeholders '__id__' or '__display__'")),null!==n&&null!==r?"id"===t&&r<=n||"display"===t&&n<=r?0:1:0},Lc=function(e){var t=/^\/(.+)\/(\w+)?$/;return new RegExp(e.map((function(e){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(t.exec(e.toString()),3),r=n[1],o=n[2];return tc()(!o,"RegExp flags are not supported. Change /".concat(r,"/").concat(o," into /").concat(r,"/")),"(".concat(r,")")})).join("|"),"g")},Nc=function(e){var t=0;return e.indexOf("__id__")>=0&&t++,e.indexOf("__display__")>=0&&t++,t},jc=function(){},zc=function(e,t,n){for(var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:jc,i=Lc(t.map((function(e){return e.regex}))),a=2,l=t.map((function(e){var t=e.markup,n=a;return a+=Nc(t)+1,n})),s=0,c=0;null!==(r=i.exec(e));){var u=l.find((function(e){return!!r[e]})),d=l.indexOf(u),p=t[d],h=p.markup,f=p.displayTransform,g=u+Ac(h,"id"),m=u+Ac(h,"display"),y=r[g],v=f(y,r[m]),b=e.substring(s,r.index);o(b,s,c),c+=b.length,n(r[0],r.index,c,y,v,d,s),c+=v.length,s=i.lastIndex}s<e.length&&o(e.substring(s),s,c)},Fc=function(e,t){var n="";return zc(e,t,(function(e,t,r,o,i){n+=i}),(function(e){n+=e})),n},Bc=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"START";if("number"!=typeof n)return n;var i=function(e,t,o){void 0===r&&o+e.length>=n&&(r=t+n-o)},a=function(e,t,i,a,l,s,c){void 0===r&&i+l.length>n&&(r="NULL"===o?null:t+("END"===o?e.length:0))};return zc(e,t,a,i),void 0===r?e.length:r},Wc=function(e,t,n,r){return e.substring(0,t)+r+e.substring(n)},Uc=function(e,t){var n=[];return zc(e,t,(function(e,t,r,o,i,a,l){n.push({id:o,display:i,childIndex:a,index:t,plainTextIndex:r})})),n},Hc=function(e,t){return"".concat(e,"-").concat(t)},Vc=function(e){return Object.values(e).reduce((function(e,t){return e+t.results.length}),0)},Gc=function(e){var t=Rc(e),n=e[e.indexOf(Dc)+Dc.length],r=e[e.indexOf(Ic)+Ic.length];return new RegExp(t.replace(Dc,"([^".concat(Rc(n||""),"]+?)")).replace(Ic,"([^".concat(Rc(r||""),"]+?)")))},qc=function(e){return n.Children.toArray(e).map((function(e){var t=e.props,n=t.markup,r=t.regex,o=t.displayTransform;return{markup:n,regex:r?Yc(r,n):Gc(n),displayTransform:o||function(e,t){return t||e}}}))},Yc=function(e,t){var n=new RegExp(e.toString()+"|").exec("").length-1,r=Nc(t);return tc()(n===r,"Number of capturing groups in RegExp ".concat(e.toString()," (").concat(n,") does not match the number of placeholders in the markup '").concat(t,"' (").concat(r,")")),e},Kc=[{base:"A",letters:/(A|Ⓐ|A|À|Á|Â|Ầ|Ấ|Ẫ|Ẩ|Ã|Ā|Ă|Ằ|Ắ|Ẵ|Ẳ|Ȧ|Ǡ|Ä|Ǟ|Ả|Å|Ǻ|Ǎ|Ȁ|Ȃ|Ạ|Ậ|Ặ|Ḁ|Ą|Ⱥ|Ɐ|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g},{base:"AA",letters:/(Ꜳ|[\uA732])/g},{base:"AE",letters:/(Æ|Ǽ|Ǣ|[\u00C6\u01FC\u01E2])/g},{base:"AO",letters:/(Ꜵ|[\uA734])/g},{base:"AU",letters:/(Ꜷ|[\uA736])/g},{base:"AV",letters:/(Ꜹ|Ꜻ|[\uA738\uA73A])/g},{base:"AY",letters:/(Ꜽ|[\uA73C])/g},{base:"B",letters:/(B|Ⓑ|B|Ḃ|Ḅ|Ḇ|Ƀ|Ƃ|Ɓ|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g},{base:"C",letters:/(C|Ⓒ|C|Ć|Ĉ|Ċ|Č|Ç|Ḉ|Ƈ|Ȼ|Ꜿ|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g},{base:"D",letters:/(D|Ⓓ|D|Ḋ|Ď|Ḍ|Ḑ|Ḓ|Ḏ|Đ|Ƌ|Ɗ|Ɖ|Ꝺ|Ð|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g},{base:"DZ",letters:/(DZ|DŽ|[\u01F1\u01C4])/g},{base:"Dz",letters:/(Dz|Dž|[\u01F2\u01C5])/g},{base:"E",letters:/(E|Ⓔ|E|È|É|Ê|Ề|Ế|Ễ|Ể|Ẽ|Ē|Ḕ|Ḗ|Ĕ|Ė|Ë|Ẻ|Ě|Ȅ|Ȇ|Ẹ|Ệ|Ȩ|Ḝ|Ę|Ḙ|Ḛ|Ɛ|Ǝ|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g},{base:"F",letters:/(F|Ⓕ|F|Ḟ|Ƒ|Ꝼ|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g},{base:"G",letters:/(G|Ⓖ|G|Ǵ|Ĝ|Ḡ|Ğ|Ġ|Ǧ|Ģ|Ǥ|Ɠ|Ꞡ|Ᵹ|Ꝿ|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g},{base:"H",letters:/(H|Ⓗ|H|Ĥ|Ḣ|Ḧ|Ȟ|Ḥ|Ḩ|Ḫ|Ħ|Ⱨ|Ⱶ|Ɥ|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g},{base:"I",letters:/(I|Ⓘ|I|Ì|Í|Î|Ĩ|Ī|Ĭ|İ|Ï|Ḯ|Ỉ|Ǐ|Ȉ|Ȋ|Ị|Į|Ḭ|Ɨ|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g},{base:"J",letters:/(J|Ⓙ|J|Ĵ|Ɉ|[\u004A\u24BF\uFF2A\u0134\u0248])/g},{base:"K",letters:/(K|Ⓚ|K|Ḱ|Ǩ|Ḳ|Ķ|Ḵ|Ƙ|Ⱪ|Ꝁ|Ꝃ|Ꝅ|Ꞣ|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g},{base:"L",letters:/(L|Ⓛ|L|Ŀ|Ĺ|Ľ|Ḷ|Ḹ|Ļ|Ḽ|Ḻ|Ł|Ƚ|Ɫ|Ⱡ|Ꝉ|Ꝇ|Ꞁ|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g},{base:"LJ",letters:/(LJ|[\u01C7])/g},{base:"Lj",letters:/(Lj|[\u01C8])/g},{base:"M",letters:/(M|Ⓜ|M|Ḿ|Ṁ|Ṃ|Ɱ|Ɯ|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g},{base:"N",letters:/(N|Ⓝ|N|Ǹ|Ń|Ñ|Ṅ|Ň|Ṇ|Ņ|Ṋ|Ṉ|Ƞ|Ɲ|Ꞑ|Ꞥ|Ŋ|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g},{base:"NJ",letters:/(NJ|[\u01CA])/g},{base:"Nj",letters:/(Nj|[\u01CB])/g},{base:"O",letters:/(O|Ⓞ|O|Ò|Ó|Ô|Ồ|Ố|Ỗ|Ổ|Õ|Ṍ|Ȭ|Ṏ|Ō|Ṑ|Ṓ|Ŏ|Ȯ|Ȱ|Ö|Ȫ|Ỏ|Ő|Ǒ|Ȍ|Ȏ|Ơ|Ờ|Ớ|Ỡ|Ở|Ợ|Ọ|Ộ|Ǫ|Ǭ|Ø|Ǿ|Ɔ|Ɵ|Ꝋ|Ꝍ|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g},{base:"OE",letters:/(Œ|[\u0152])/g},{base:"OI",letters:/(Ƣ|[\u01A2])/g},{base:"OO",letters:/(Ꝏ|[\uA74E])/g},{base:"OU",letters:/(Ȣ|[\u0222])/g},{base:"P",letters:/(P|Ⓟ|P|Ṕ|Ṗ|Ƥ|Ᵽ|Ꝑ|Ꝓ|Ꝕ|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g},{base:"Q",letters:/(Q|Ⓠ|Q|Ꝗ|Ꝙ|Ɋ|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g},{base:"R",letters:/(R|Ⓡ|R|Ŕ|Ṙ|Ř|Ȑ|Ȓ|Ṛ|Ṝ|Ŗ|Ṟ|Ɍ|Ɽ|Ꝛ|Ꞧ|Ꞃ|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g},{base:"S",letters:/(S|Ⓢ|S|ẞ|Ś|Ṥ|Ŝ|Ṡ|Š|Ṧ|Ṣ|Ṩ|Ș|Ş|Ȿ|Ꞩ|Ꞅ|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g},{base:"T",letters:/(T|Ⓣ|T|Ṫ|Ť|Ṭ|Ț|Ţ|Ṱ|Ṯ|Ŧ|Ƭ|Ʈ|Ⱦ|Ꞇ|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g},{base:"TH",letters:/(Þ|[\u00DE])/g},{base:"TZ",letters:/(Ꜩ|[\uA728])/g},{base:"U",letters:/(U|Ⓤ|U|Ù|Ú|Û|Ũ|Ṹ|Ū|Ṻ|Ŭ|Ü|Ǜ|Ǘ|Ǖ|Ǚ|Ủ|Ů|Ű|Ǔ|Ȕ|Ȗ|Ư|Ừ|Ứ|Ữ|Ử|Ự|Ụ|Ṳ|Ų|Ṷ|Ṵ|Ʉ|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g},{base:"V",letters:/(V|Ⓥ|V|Ṽ|Ṿ|Ʋ|Ꝟ|Ʌ|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g},{base:"VY",letters:/(Ꝡ|[\uA760])/g},{base:"W",letters:/(W|Ⓦ|W|Ẁ|Ẃ|Ŵ|Ẇ|Ẅ|Ẉ|Ⱳ|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g},{base:"X",letters:/(X|Ⓧ|X|Ẋ|Ẍ|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g},{base:"Y",letters:/(Y|Ⓨ|Y|Ỳ|Ý|Ŷ|Ỹ|Ȳ|Ẏ|Ÿ|Ỷ|Ỵ|Ƴ|Ɏ|Ỿ|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g},{base:"Z",letters:/(Z|Ⓩ|Z|Ź|Ẑ|Ż|Ž|Ẓ|Ẕ|Ƶ|Ȥ|Ɀ|Ⱬ|Ꝣ|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g},{base:"a",letters:/(a|ⓐ|a|ẚ|à|á|â|ầ|ấ|ẫ|ẩ|ã|ā|ă|ằ|ắ|ẵ|ẳ|ȧ|ǡ|ä|ǟ|ả|å|ǻ|ǎ|ȁ|ȃ|ạ|ậ|ặ|ḁ|ą|ⱥ|ɐ|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g},{base:"aa",letters:/(ꜳ|[\uA733])/g},{base:"ae",letters:/(æ|ǽ|ǣ|[\u00E6\u01FD\u01E3])/g},{base:"ao",letters:/(ꜵ|[\uA735])/g},{base:"au",letters:/(ꜷ|[\uA737])/g},{base:"av",letters:/(ꜹ|ꜻ|[\uA739\uA73B])/g},{base:"ay",letters:/(ꜽ|[\uA73D])/g},{base:"b",letters:/(b|ⓑ|b|ḃ|ḅ|ḇ|ƀ|ƃ|ɓ|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g},{base:"c",letters:/(c|ⓒ|c|ć|ĉ|ċ|č|ç|ḉ|ƈ|ȼ|ꜿ|ↄ|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g},{base:"d",letters:/(d|ⓓ|d|ḋ|ď|ḍ|ḑ|ḓ|ḏ|đ|ƌ|ɖ|ɗ|ꝺ|ð|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g},{base:"dz",letters:/(dz|dž|[\u01F3\u01C6])/g},{base:"e",letters:/(e|ⓔ|e|è|é|ê|ề|ế|ễ|ể|ẽ|ē|ḕ|ḗ|ĕ|ė|ë|ẻ|ě|ȅ|ȇ|ẹ|ệ|ȩ|ḝ|ę|ḙ|ḛ|ɇ|ɛ|ǝ|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g},{base:"f",letters:/(f|ⓕ|f|ḟ|ƒ|ꝼ|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g},{base:"g",letters:/(g|ⓖ|g|ǵ|ĝ|ḡ|ğ|ġ|ǧ|ģ|ǥ|ɠ|ꞡ|ᵹ|ꝿ|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g},{base:"h",letters:/(h|ⓗ|h|ĥ|ḣ|ḧ|ȟ|ḥ|ḩ|ḫ|ẖ|ħ|ⱨ|ⱶ|ɥ|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g},{base:"hv",letters:/(ƕ|[\u0195])/g},{base:"i",letters:/(i|ⓘ|i|ì|í|î|ĩ|ī|ĭ|ï|ḯ|ỉ|ǐ|ȉ|ȋ|ị|į|ḭ|ɨ|ı|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g},{base:"ij",letters:/(ij|[\u0133])/g},{base:"j",letters:/(j|ⓙ|j|ĵ|ǰ|ɉ|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g},{base:"k",letters:/(k|ⓚ|k|ḱ|ǩ|ḳ|ķ|ḵ|ƙ|ⱪ|ꝁ|ꝃ|ꝅ|ꞣ|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g},{base:"l",letters:/(l|ⓛ|l|ŀ|ĺ|ľ|ḷ|ḹ|ļ|ḽ|ḻ|ł|ƚ|ɫ|ⱡ|ꝉ|ꞁ|ꝇ|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g},{base:"lj",letters:/(lj|[\u01C9])/g},{base:"m",letters:/(m|ⓜ|m|ḿ|ṁ|ṃ|ɱ|ɯ|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g},{base:"n",letters:/(n|ⓝ|n|ǹ|ń|ñ|ṅ|ň|ṇ|ņ|ṋ|ṉ|ƞ|ɲ|ʼn|ꞑ|ꞥ|ŋ|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g},{base:"nj",letters:/(nj|[\u01CC])/g},{base:"o",letters:/(o|ⓞ|o|ò|ó|ô|ồ|ố|ỗ|ổ|õ|ṍ|ȭ|ṏ|ō|ṑ|ṓ|ŏ|ȯ|ȱ|ö|ȫ|ỏ|ő|ǒ|ȍ|ȏ|ơ|ờ|ớ|ỡ|ở|ợ|ọ|ộ|ǫ|ǭ|ø|ǿ|ɔ|ꝋ|ꝍ|ɵ|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g},{base:"oe",letters:/(œ|[\u0153])/g},{base:"oi",letters:/(ƣ|[\u01A3])/g},{base:"ou",letters:/(ȣ|[\u0223])/g},{base:"oo",letters:/(ꝏ|[\uA74F])/g},{base:"p",letters:/(p|ⓟ|p|ṕ|ṗ|ƥ|ᵽ|ꝑ|ꝓ|ꝕ|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g},{base:"q",letters:/(q|ⓠ|q|ɋ|ꝗ|ꝙ|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g},{base:"r",letters:/(r|ⓡ|r|ŕ|ṙ|ř|ȑ|ȓ|ṛ|ṝ|ŗ|ṟ|ɍ|ɽ|ꝛ|ꞧ|ꞃ|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g},{base:"s",letters:/(s|ⓢ|s|ś|ṥ|ŝ|ṡ|š|ṧ|ṣ|ṩ|ș|ş|ȿ|ꞩ|ꞅ|ẛ|ſ|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g},{base:"ss",letters:/(ß|[\u00DF])/g},{base:"t",letters:/(t|ⓣ|t|ṫ|ẗ|ť|ṭ|ț|ţ|ṱ|ṯ|ŧ|ƭ|ʈ|ⱦ|ꞇ|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g},{base:"th",letters:/(þ|[\u00FE])/g},{base:"tz",letters:/(ꜩ|[\uA729])/g},{base:"u",letters:/(u|ⓤ|u|ù|ú|û|ũ|ṹ|ū|ṻ|ŭ|ü|ǜ|ǘ|ǖ|ǚ|ủ|ů|ű|ǔ|ȕ|ȗ|ư|ừ|ứ|ữ|ử|ự|ụ|ṳ|ų|ṷ|ṵ|ʉ|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g},{base:"v",letters:/(v|ⓥ|v|ṽ|ṿ|ʋ|ꝟ|ʌ|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g},{base:"vy",letters:/(ꝡ|[\uA761])/g},{base:"w",letters:/(w|ⓦ|w|ẁ|ẃ|ŵ|ẇ|ẅ|ẘ|ẉ|ⱳ|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g},{base:"x",letters:/(x|ⓧ|x|ẋ|ẍ|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g},{base:"y",letters:/(y|ⓨ|y|ỳ|ý|ŷ|ỹ|ȳ|ẏ|ÿ|ỷ|ẙ|ỵ|ƴ|ɏ|ỿ|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g},{base:"z",letters:/(z|ⓩ|z|ź|ẑ|ż|ž|ẓ|ẕ|ƶ|ȥ|ɀ|ⱬ|ꝣ|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g}],$c=function(e){return function(e){var t=e;return Kc.forEach((function(e){t=t.replace(e.letters,e.base)})),t}(e).toLowerCase()},Zc=function(e,t,n){return n?$c(e).indexOf($c(t)):e.toLowerCase().indexOf(t.toLowerCase())},Xc=function(e){return"number"==typeof e},Qc=function(e){return e===Object(e)?Object.keys(e):[]},Jc=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(t=[]).concat.apply(t,r);return Object.keys(e).reduce((function(t,n){return e.hasOwnProperty(n)&&!i.includes(n)&&void 0!==e[n]&&(t[n]=e[n]),t}),{})};function eu(e,t){return function(n){var o=function(o){var i=o.style,a=o.className,l=o.classNames,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,["style","className","classNames"]),c=t?t(s):void 0,u=Tc(e,{style:i,className:a,classNames:l},c);return r().createElement(n,Us({},s,{style:u}))},i=n.displayName||n.name||"Component";return o.displayName="defaultStyle(".concat(i,")"),o}}var tu=function(e){function t(){var e;return Hs(this,t),Js(Ks(e=$s(this,Zs(t).apply(this,arguments))),"setCaretElement",(function(t){e.caretElement=t})),e.state={left:void 0,top:void 0},e}return Qs(t,e),Gs(t,[{key:"componentDidMount",value:function(){this.notifyCaretPosition()}},{key:"componentDidUpdate",value:function(){this.notifyCaretPosition()}},{key:"notifyCaretPosition",value:function(){if(this.caretElement){var e=this.caretElement,t=e.offsetLeft,n=e.offsetTop;if(this.state.left!==t||this.state.top!==n){var r={left:t,top:n};this.setState(r),this.props.onCaretPositionChange(r)}}}},{key:"render",value:function(){var e,t=this,n=this.props,o=n.selectionStart,i=n.selectionEnd,a=n.value,l=n.style,s=n.children,c=n.containerRef,u=qc(s);o===i&&(e=Bc(a,u,o,"START"));var d=[],p={},h=d,f=0;return zc(a,u,(function(e,n,r,o,i,a,l){var s=function(e,t){return e.hasOwnProperty(t)?e[t]++:e[t]=0,t+"_"+e[t]}(p,o);h.push(t.getMentionComponentForMatch(o,i,a,s))}),(function(n,r,o){if(Xc(e)&&e>=r&&e<=r+n.length){var i=e-r;h.push(t.renderSubstring(n.substring(0,i),f)),h=[t.renderSubstring(n.substring(i),f)]}else h.push(t.renderSubstring(n,f));f++})),h.push(" "),h!==d&&d.push(this.renderHighlighterCaret(h)),r().createElement("div",Us({},l,{ref:c}),d)}},{key:"renderSubstring",value:function(e,t){return r().createElement("span",Us({},this.props.style("substring"),{key:t}),e)}},{key:"getMentionComponentForMatch",value:function(e,t,o,i){var a={id:e,display:t,key:i},l=n.Children.toArray(this.props.children)[o];return r().cloneElement(l,a)}},{key:"renderHighlighterCaret",value:function(e){return r().createElement("span",Us({},this.props.style("caret"),{ref:this.setCaretElement,key:"caret"}),e)}}]),t}(n.Component);Js(tu,"propTypes",{selectionStart:l().number,selectionEnd:l().number,value:l().string.isRequired,onCaretPositionChange:l().func.isRequired,containerRef:l().oneOfType([l().func,l().shape({current:"undefined"==typeof Element?l().any:l().instanceOf(Element)})]),children:l().oneOfType([l().element,l().arrayOf(l().element)]).isRequired}),Js(tu,"defaultProps",{value:""});var nu=eu({position:"relative",boxSizing:"border-box",width:"100%",color:"transparent",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",border:"1px solid transparent",textAlign:"start","&singleLine":{whiteSpace:"pre",wordWrap:null},substring:{visibility:"hidden"}},(function(e){return{"&singleLine":e.singleLine}}))(tu),ru=function(e){function t(){return Hs(this,t),$s(this,Zs(t).apply(this,arguments))}return Qs(t,e),Gs(t,[{key:"render",value:function(){var e=Jc(this.props,["style","classNames","className"],Qc(t.propTypes));return r().createElement("li",Us({id:this.props.id,role:"option","aria-selected":this.props.focused},e,this.props.style),this.renderContent())}},{key:"renderContent",value:function(){var e=this.props,t=e.query,n=e.renderSuggestion,r=e.suggestion,o=e.index,i=e.focused,a=this.getDisplay(),l=this.renderHighlightedDisplay(a,t);return n?n(r,t,l,o,i):l}},{key:"getDisplay",value:function(){var e=this.props.suggestion;if("string"==typeof e)return e;var t=e.id,n=e.display;return void 0!==t&&n?n:t}},{key:"renderHighlightedDisplay",value:function(e){var t=this.props,n=t.ignoreAccents,o=t.query,i=t.style,a=Zc(e,o,n);return-1===a?r().createElement("span",i("display"),e):r().createElement("span",i("display"),e.substring(0,a),r().createElement("b",i("highlight"),e.substring(a,a+o.length)),e.substring(a+o.length))}}]),t}(n.Component);Js(ru,"propTypes",{id:l().string.isRequired,query:l().string.isRequired,index:l().number.isRequired,ignoreAccents:l().bool,suggestion:l().oneOfType([l().string,l().shape({id:l().oneOfType([l().string,l().number]).isRequired,display:l().string})]).isRequired,renderSuggestion:l().func,focused:l().bool});var ou=eu({cursor:"pointer"},(function(e){return{"&focused":e.focused}}))(ru);function iu(){var e=Tc(),t=e("spinner");return r().createElement("div",e,r().createElement("div",t,r().createElement("div",t(["element","element1"])),r().createElement("div",t(["element","element2"])),r().createElement("div",t(["element","element3"])),r().createElement("div",t(["element","element4"])),r().createElement("div",t(["element","element5"]))))}var au=function(e){function t(){var e,n;Hs(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Js(Ks(n=$s(this,(e=Zs(t)).call.apply(e,[this].concat(o)))),"handleMouseEnter",(function(e,t){n.props.onMouseEnter&&n.props.onMouseEnter(e)})),Js(Ks(n),"select",(function(e,t){n.props.onSelect(e,t)})),Js(Ks(n),"setUlElement",(function(e){n.ulElement=e})),n}return Qs(t,e),Gs(t,[{key:"componentDidUpdate",value:function(){if(this.ulElement&&!(this.ulElement.offsetHeight>=this.ulElement.scrollHeight)&&this.props.scrollFocusedIntoView){var e=this.ulElement.scrollTop,t=this.ulElement.children[this.props.focusIndex].getBoundingClientRect(),n=t.top,r=t.bottom,o=this.ulElement.getBoundingClientRect().top;r=r-o+e,(n=n-o+e)<e?this.ulElement.scrollTop=n:r>this.ulElement.offsetHeight&&(this.ulElement.scrollTop=r-this.ulElement.offsetHeight)}}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.a11ySuggestionsListLabel,o=e.isOpened,i=e.style,a=e.onMouseDown,l=e.containerRef,s=e.position,c=e.left,u=e.top;return o?r().createElement("div",Us({},function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return Mc(Mc(Mc({},e),"function"==typeof t?t:{}),{},{style:Mc(Mc({},e.style),"function"==typeof t?t.style:t)})}),{})}({position:s||"absolute",left:c,top:u},i),{onMouseDown:a,ref:l}),r().createElement("ul",Us({ref:this.setUlElement,id:t,role:"listbox","aria-label":n},i("list")),this.renderSuggestions()),this.renderLoadingIndicator()):null}},{key:"renderSuggestions",value:function(){var e=this;return Object.values(this.props.suggestions).reduce((function(t,n){var r=n.results,o=n.queryInfo;return[].concat(Ws(t),Ws(r.map((function(n,r){return e.renderSuggestion(n,o,t.length+r)}))))}),[])}},{key:"renderSuggestion",value:function(e,t,o){var i=this,a=o===this.props.focusIndex,l=t.childIndex,s=t.query,c=n.Children.toArray(this.props.children)[l].props.renderSuggestion,u=this.props.ignoreAccents;return r().createElement(ou,{style:this.props.style("item"),key:"".concat(l,"-").concat(lu(e)),id:Hc(this.props.id,o),query:s,index:o,ignoreAccents:u,renderSuggestion:c,suggestion:e,focused:a,onClick:function(){return i.select(e,t)},onMouseEnter:function(){return i.handleMouseEnter(o)}})}},{key:"renderLoadingIndicator",value:function(){if(this.props.isLoading)return r().createElement(iu,{style:this.props.style("loadingIndicator")})}}]),t}(n.Component);Js(au,"propTypes",{id:l().string.isRequired,suggestions:l().object.isRequired,a11ySuggestionsListLabel:l().string,focusIndex:l().number,position:l().string,left:l().number,top:l().number,scrollFocusedIntoView:l().bool,isLoading:l().bool,isOpened:l().bool.isRequired,onSelect:l().func,ignoreAccents:l().bool,containerRef:l().oneOfType([l().func,l().shape({current:"undefined"==typeof Element?l().any:l().instanceOf(Element)})]),children:l().oneOfType([l().element,l().arrayOf(l().element)]).isRequired}),Js(au,"defaultProps",{suggestions:{},onSelect:function(){return null}});var lu=function(e){return"string"==typeof e?e:e.id},su=eu({zIndex:1,backgroundColor:"white",marginTop:14,minWidth:100,list:{margin:0,padding:0,listStyleType:"none"}})(au);function cu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cu(n,!0).forEach((function(t){Js(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cu(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var du={TAB:9,RETURN:13,ESC:27,UP:38,DOWN:40},pu=!1,hu={singleLine:l().bool,allowSpaceInQuery:l().bool,allowSuggestionsAboveCursor:l().bool,forceSuggestionsAboveCursor:l().bool,ignoreAccents:l().bool,a11ySuggestionsListLabel:l().string,value:l().string,onKeyDown:l().func,onSelect:l().func,onBlur:l().func,onChange:l().func,suggestionsPortalHost:"undefined"==typeof Element?l().any:l().PropTypes.instanceOf(Element),inputRef:l().oneOfType([l().func,l().shape({current:"undefined"==typeof Element?l().any:l().instanceOf(Element)})]),children:l().oneOfType([l().element,l().arrayOf(l().element)]).isRequired},fu=function(e){function t(e){var o;return Hs(this,t),Js(Ks(o=$s(this,Zs(t).call(this,e))),"setContainerElement",(function(e){o.containerElement=e})),Js(Ks(o),"getInputProps",(function(){var e=o.props,t=e.readOnly,n=e.disabled,r=e.style;return uu({},Jc(o.props,["style","classNames","className"],Qc(hu)),{},r("input"),{value:o.getPlainText()},!t&&!n&&{onChange:o.handleChange,onSelect:o.handleSelect,onKeyDown:o.handleKeyDown,onBlur:o.handleBlur,onCompositionStart:o.handleCompositionStart,onCompositionEnd:o.handleCompositionEnd,onScroll:o.updateHighlighterScroll},{},o.isOpened()&&{role:"combobox","aria-controls":o.uuidSuggestionsOverlay,"aria-expanded":!0,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":Hc(o.uuidSuggestionsOverlay,o.state.focusIndex)})})),Js(Ks(o),"renderControl",(function(){var e=o.props,t=e.singleLine,n=e.style,i=o.getInputProps();return r().createElement("div",n("control"),o.renderHighlighter(),t?o.renderInput(i):o.renderTextarea(i))})),Js(Ks(o),"renderInput",(function(e){return r().createElement("input",Us({type:"text",ref:o.setInputRef},e))})),Js(Ks(o),"renderTextarea",(function(e){return r().createElement("textarea",Us({ref:o.setInputRef},e))})),Js(Ks(o),"setInputRef",(function(e){o.inputElement=e;var t=o.props.inputRef;"function"==typeof t?t(e):t&&(t.current=e)})),Js(Ks(o),"setSuggestionsElement",(function(e){o.suggestionsElement=e})),Js(Ks(o),"renderSuggestionsOverlay",(function(){if(!Xc(o.state.selectionStart))return null;var e=o.state.suggestionsPosition,t=e.position,n=e.left,i=e.top,a=r().createElement(su,{id:o.uuidSuggestionsOverlay,style:o.props.style("suggestions"),position:t,left:n,top:i,focusIndex:o.state.focusIndex,scrollFocusedIntoView:o.state.scrollFocusedIntoView,containerRef:o.setSuggestionsElement,suggestions:o.state.suggestions,onSelect:o.addMention,onMouseDown:o.handleSuggestionsMouseDown,onMouseEnter:o.handleSuggestionsMouseEnter,isLoading:o.isLoading(),isOpened:o.isOpened(),ignoreAccents:o.props.ignoreAccents,a11ySuggestionsListLabel:o.props.a11ySuggestionsListLabel},o.props.children);return o.props.suggestionsPortalHost?te().createPortal(a,o.props.suggestionsPortalHost):a})),Js(Ks(o),"renderHighlighter",(function(){var e=o.state,t=e.selectionStart,n=e.selectionEnd,i=o.props,a=i.singleLine,l=i.children,s=i.value,c=i.style;return r().createElement(nu,{containerRef:o.setHighlighterElement,style:c("highlighter"),value:s,singleLine:a,selectionStart:t,selectionEnd:n,onCaretPositionChange:o.handleCaretPositionChange},l)})),Js(Ks(o),"setHighlighterElement",(function(e){o.highlighterElement=e})),Js(Ks(o),"handleCaretPositionChange",(function(e){o.setState({caretPosition:e})})),Js(Ks(o),"getPlainText",(function(){return Fc(o.props.value||"",qc(o.props.children))})),Js(Ks(o),"executeOnChange",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,a;return o.props.onChange?(i=o.props).onChange.apply(i,[e].concat(n)):o.props.valueLink?(a=o.props.valueLink).requestChange.apply(a,[e.target.value].concat(n)):void 0})),Js(Ks(o),"handleChange",(function(e){if(pu=!1,(document.activeElement&&document.activeElement.contentDocument||document).activeElement===e.target){var t=o.props.value||"",n=qc(o.props.children),r=e.target.value,i=function(e,t,n,r){var o=n.selectionStartBefore,i=n.selectionEndBefore,a=n.selectionEndAfter,l=Fc(e,r),s=l.length-t.length;"undefined"===o&&(o=a+s),"undefined"===i&&(i=o),o===i&&i===a&&l.length===t.length&&(o-=1);var c=t.slice(o,a),u=Math.min(o,a),d=i;o===a&&(d=Math.max(i,o+s));var p=Bc(e,r,u,"START"),h=Bc(e,r,d,"END"),f=Bc(e,r,u,"NULL"),g=Bc(e,r,d,"NULL"),m=null===f||null===g,y=Wc(e,p,h,c);if(!m){var v=Fc(y,r);if(v!==t){for(u=0;t[u]===v[u];)u++;c=t.slice(u,a),d=l.lastIndexOf(t.substring(a)),p=Bc(e,r,u,"START"),h=Bc(e,r,d,"END"),y=Wc(e,p,h,c)}}return y}(t,r,{selectionStartBefore:o.state.selectionStart,selectionEndBefore:o.state.selectionEnd,selectionEndAfter:e.target.selectionEnd},n);r=Fc(i,n);var a=e.target.selectionStart,l=e.target.selectionEnd,s=!1,c=function(e,t,n){var r=n,o=!1;if(zc(e,t,(function(e,t,i,a,l,s,c){i<=n&&i+l.length>n&&(r=i,o=!0)})),o)return r}(t,n,a);void 0!==c&&o.state.selectionEnd>c&&(l=a=c,s=!0),o.setState({selectionStart:a,selectionEnd:l,setSelectionAfterMentionChange:s});var u=Uc(i,n),d={target:{value:i}};o.executeOnChange(d,i,r,u)}})),Js(Ks(o),"handleSelect",(function(e){if(o.setState({selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd}),!pu){var t=o.inputElement;e.target.selectionStart===e.target.selectionEnd?o.updateMentionsQueries(t.value,e.target.selectionStart):o.clearSuggestions(),o.updateHighlighterScroll(),o.props.onSelect(e)}})),Js(Ks(o),"handleKeyDown",(function(e){if(0!==Vc(o.state.suggestions)&&o.suggestionsElement)switch(Object.values(du).indexOf(e.keyCode)>=0&&(e.preventDefault(),e.stopPropagation()),e.keyCode){case du.ESC:return void o.clearSuggestions();case du.DOWN:return void o.shiftFocus(1);case du.UP:return void o.shiftFocus(-1);case du.RETURN:case du.TAB:return void o.selectFocused();default:return}else o.props.onKeyDown(e)})),Js(Ks(o),"shiftFocus",(function(e){var t=Vc(o.state.suggestions);o.setState({focusIndex:(t+o.state.focusIndex+e)%t,scrollFocusedIntoView:!0})})),Js(Ks(o),"selectFocused",(function(){var e=o.state,t=e.suggestions,n=e.focusIndex,r=Object.values(t).reduce((function(e,t){var n=t.results,r=t.queryInfo;return[].concat(Ws(e),Ws(n.map((function(e){return{result:e,queryInfo:r}}))))}),[])[n],i=r.result,a=r.queryInfo;o.addMention(i,a),o.setState({focusIndex:0})})),Js(Ks(o),"handleBlur",(function(e){var t=o._suggestionsMouseDown;o._suggestionsMouseDown=!1,t||o.setState({selectionStart:null,selectionEnd:null}),window.setTimeout((function(){o.updateHighlighterScroll()}),1),o.props.onBlur(e,t)})),Js(Ks(o),"handleSuggestionsMouseDown",(function(e){o._suggestionsMouseDown=!0})),Js(Ks(o),"handleSuggestionsMouseEnter",(function(e){o.setState({focusIndex:e,scrollFocusedIntoView:!1})})),Js(Ks(o),"updateSuggestionsPosition",(function(){var e=o.state.caretPosition,t=o.props,n=t.suggestionsPortalHost,r=t.allowSuggestionsAboveCursor,i=t.forceSuggestionsAboveCursor;if(e&&o.suggestionsElement){var a=o.suggestionsElement,l=o.highlighterElement,s=l.getBoundingClientRect(),c=gu(l,"font-size"),u={left:s.left+e.left,top:s.top+e.top+c},d=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(a){var p={};if(n){p.position="fixed";var h=u.left,f=u.top;h-=gu(a,"margin-left"),f-=gu(a,"margin-top"),h-=l.scrollLeft,f-=l.scrollTop;var g=Math.max(document.documentElement.clientWidth,window.innerWidth||0);h+a.offsetWidth>g?p.left=Math.max(0,g-a.offsetWidth):p.left=h,r&&f+a.offsetHeight>d&&a.offsetHeight<f-c||i?p.top=Math.max(0,f-a.offsetHeight-c):p.top=f}else{var m=e.left-l.scrollLeft,y=e.top-l.scrollTop;m+a.offsetWidth>o.containerElement.offsetWidth?p.right=0:p.left=m,r&&u.top-l.scrollTop+a.offsetHeight>d&&a.offsetHeight<s.top-c-l.scrollTop?p.top=y-a.offsetHeight-c:p.top=y}p.left===o.state.suggestionsPosition.left&&p.top===o.state.suggestionsPosition.top&&p.position===o.state.suggestionsPosition.position||o.setState({suggestionsPosition:p})}}})),Js(Ks(o),"updateHighlighterScroll",(function(){var e=o.inputElement,t=o.highlighterElement;e&&t&&(t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop,t.height=e.height)})),Js(Ks(o),"handleCompositionStart",(function(){pu=!0})),Js(Ks(o),"handleCompositionEnd",(function(){pu=!1})),Js(Ks(o),"setSelection",(function(e,t){if(null!==e&&null!==t){var n=o.inputElement;if(n.setSelectionRange)n.setSelectionRange(e,t);else if(n.createTextRange){var r=n.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}}})),Js(Ks(o),"updateMentionsQueries",(function(e,t){o._queryId++,o.suggestions={},o.setState({suggestions:{}});var n=o.props.value||"",i=o.props.children,a=qc(i),l=Bc(n,a,t,"NULL");if(null!==l){var s=function(e,t){var n=Uc(e,t),r=n[n.length-1];return r?r.plainTextIndex+r.display.length:0}(n.substring(0,l),a),c=e.substring(s,t);r().Children.forEach(i,(function(t,n){if(t){var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e instanceof RegExp)return e;var n=t.allowSpaceInQuery,r=Rc(e);return new RegExp("(?:^|\\s)(".concat(r,"([^").concat(n?"":"\\s").concat(r,"]*))$"))}(t.props.trigger,o.props),i=c.match(r);if(i){var a=s+c.indexOf(i[1],i.index);o.queryData(i[2],n,a,a+i[1].length,e)}}}))}})),Js(Ks(o),"clearSuggestions",(function(){o._queryId++,o.suggestions={},o.setState({suggestions:{},focusIndex:0})})),Js(Ks(o),"queryData",(function(e,t,r,i,a){var l=o.props,s=l.children,c=l.ignoreAccents,u=function(e,t){return e instanceof Array?function(n,r){for(var o=[],i=0,a=e.length;i<a;++i){var l=e[i].display||e[i].id;Zc(l,n,t)>=0&&o.push(e[i])}return o}:e}(n.Children.toArray(s)[t].props.data,c),d=u(e,o.updateSuggestions.bind(null,o._queryId,t,e,r,i,a));d instanceof Array&&o.updateSuggestions(o._queryId,t,e,r,i,a,d)})),Js(Ks(o),"updateSuggestions",(function(e,t,n,r,i,a,l){if(e===o._queryId){o.suggestions=uu({},o.suggestions,Js({},t,{queryInfo:{childIndex:t,query:n,querySequenceStart:r,querySequenceEnd:i,plainTextValue:a},results:l}));var s=o.state.focusIndex,c=Vc(o.suggestions);o.setState({suggestions:o.suggestions,focusIndex:s>=c?Math.max(c-1,0):s})}})),Js(Ks(o),"addMention",(function(e,t){var r=e.id,i=e.display,a=t.childIndex,l=t.querySequenceStart,s=t.querySequenceEnd,c=t.plainTextValue,u=o.props.value||"",d=qc(o.props.children),p=n.Children.toArray(o.props.children)[a].props,h=p.markup,f=p.displayTransform,g=p.appendSpaceOnAdd,m=p.onAdd,y=Bc(u,d,l,"START"),v=y+s-l,b=function(e,t,n){return e.replace(Ic,t).replace(Dc,n)}(h,r,i);g&&(b+=" ");var x=Wc(u,y,v,b);o.inputElement.focus();var w=f(r,i);g&&(w+=" ");var S=l+w.length;o.setState({selectionStart:S,selectionEnd:S,setSelectionAfterMentionChange:!0});var E={target:{value:x}},O=Uc(x,d),C=Wc(c,l,s,w);o.executeOnChange(E,x,C,O),m&&m(r,i,y,v),o.clearSuggestions()})),Js(Ks(o),"isLoading",(function(){var e=!1;return r().Children.forEach(o.props.children,(function(t){e=e||t&&t.props.isLoading})),e})),Js(Ks(o),"isOpened",(function(){return Xc(o.state.selectionStart)&&(0!==Vc(o.state.suggestions)||o.isLoading())})),Js(Ks(o),"_queryId",0),o.suggestions={},o.uuidSuggestionsOverlay=Math.random().toString(16).substring(2),o.handleCopy=o.handleCopy.bind(Ks(o)),o.handleCut=o.handleCut.bind(Ks(o)),o.handlePaste=o.handlePaste.bind(Ks(o)),o.state={focusIndex:0,selectionStart:null,selectionEnd:null,suggestions:{},caretPosition:null,suggestionsPosition:{}},o}return Qs(t,e),Gs(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.updateSuggestionsPosition()}},{key:"componentDidUpdate",value:function(e,t){t.suggestionsPosition===this.state.suggestionsPosition&&this.updateSuggestionsPosition(),this.state.setSelectionAfterMentionChange&&(this.setState({setSelectionAfterMentionChange:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}},{key:"render",value:function(){return r().createElement("div",Us({ref:this.setContainerElement},this.props.style),this.renderControl(),this.renderSuggestionsOverlay())}},{key:"handlePaste",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault();var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,i=o.value,a=o.children,l=qc(a),s=Bc(i,l,n,"START"),c=Bc(i,l,r,"END"),u=e.clipboardData.getData("text/react-mentions"),d=e.clipboardData.getData("text/plain"),p=Wc(i,s,c,u||d).replace(/\r/g,""),h=Fc(p,l),f={target:uu({},e.target,{value:p})};this.executeOnChange(f,p,h,Uc(p,l))}}},{key:"saveSelectionToClipboard",value:function(e){var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,i=o.children,a=o.value,l=qc(i),s=Bc(a,l,n,"START"),c=Bc(a,l,r,"END");e.clipboardData.setData("text/plain",e.target.value.slice(n,r)),e.clipboardData.setData("text/react-mentions",a.slice(s,c))}},{key:"supportsClipboardActions",value:function(e){return!!e.clipboardData}},{key:"handleCopy",value:function(e){e.target===this.inputElement&&this.supportsClipboardActions(e)&&(e.preventDefault(),this.saveSelectionToClipboard(e))}},{key:"handleCut",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault(),this.saveSelectionToClipboard(e);var t=this.state,n=t.selectionStart,r=t.selectionEnd,o=this.props,i=o.children,a=o.value,l=qc(i),s=Bc(a,l,n,"START"),c=Bc(a,l,r,"END"),u=[a.slice(0,s),a.slice(c)].join(""),d=Fc(u,l),p={target:uu({},e.target,{value:d})};this.executeOnChange(p,u,d,Uc(a,l))}}}]),t}(r().Component);Js(fu,"propTypes",hu),Js(fu,"defaultProps",{ignoreAccents:!1,singleLine:!1,allowSuggestionsAboveCursor:!1,onKeyDown:function(){return null},onSelect:function(){return null},onBlur:function(){return null}});var gu=function(e,t){var n=parseFloat(window.getComputedStyle(e,null).getPropertyValue(t));return isFinite(n)?n:0},mu=eu({position:"relative",overflowY:"visible",input:{display:"block",width:"100%",position:"absolute",margin:0,top:0,left:0,boxSizing:"border-box",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit"},"&multiLine":{input:uu({height:"100%",bottom:0,overflow:"hidden",resize:"none"},"undefined"!=typeof navigator&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?{marginTop:1,marginLeft:-3}:null)}},(function(e){var t=e.singleLine;return{"&singleLine":t,"&multiLine":!t}}))(fu),yu={fontWeight:"inherit"},vu=function(e){var t=e.display,n=e.style,o=e.className,i=e.classNames,a=Tc(yu,{style:n,className:o,classNames:i});return r().createElement("strong",a,t)};vu.propTypes={onAdd:l().func,onRemove:l().func,renderSuggestion:l().func,trigger:l().oneOfType([l().string,l().instanceOf(RegExp)]),markup:l().string,displayTransform:l().func,allowSpaceInQuery:l().bool,isLoading:l().bool},vu.defaultProps={trigger:"@",markup:"@[__display__](__id__)",displayTransform:function(e,t){return t||e},onAdd:function(){return null},onRemove:function(){return null},renderSuggestion:null,isLoading:!1,appendSpaceOnAdd:!1};const bu=(0,i.makeStyles)((e=>({root:{width:"100%",backgroundColor:"#fff",fontFamily:"Roboto","&__control":{fontSize:"13px"},"&__highlighter":{padding:"10px 22px",border:"1px solid transparent !important"},"&__input":{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,overflow:"auto !important"},"&__suggestions":{padding:"8px 0",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",transform:"translateY(-100%)"},"&__suggestions__list":{maxHeight:"200px",overflowY:"scroll"},"&__suggestions__item":{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover, &--focused":{backgroundColor:"rgba(0,0,0,0.04)"}}},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function xu(){return xu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xu.apply(this,arguments)}const wu=e=>{let{onChange:t,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["onChange","className"]);const a=bu(),l=(0,n.useContext)(Kl);return r().createElement(mu,xu({},i,{onChange:(e,n,r,o)=>{t(n,r,(0,u.uniq)(o.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:c()(a.root,o)}),r().createElement(vu,{trigger:"+",data:l.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:a.mention}))},Su=(0,i.makeStyles)({root:e=>{let{isEditing:t}=e;return{padding:t?"6px 6px 6px 0":" 6px 6px 6px 8px",borderRadius:"4px",backgroundColor:t?"transparent":"rgba(0,114,206,0.06)"}},textField:e=>{let{isEditing:t}=e;return{maxWidth:t?"100%":"calc(100% - 40px)"}},form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:e=>{let{isEditing:t}=e;return{marginLeft:t?"0":"40px",marginTop:"8px"}},button:{"& + $button":{marginLeft:"8px"}}}),Eu=e=>{switch(e){case"open":return p().text("Reply...");case"resolved":return p().text("Adding a comment will re-open this");default:return""}},Ou=e=>{let{inputRef:t,className:i,uri:a,relatedObjectUris:l,objectType:s,popperRef:d,comment:h,reply:f,isEditingComment:g,isEditingReply:m,onCancel:y}=e;const v=g||m,x=Su({isEditing:v}),[w,S]=(0,n.useState)(!1),E=(0,o.useSelector)(b().selectors.getUserName),{createReply:O,createComment:C,sending:_,editComment:k,editReply:T,getCommentState:P,updateCommentState:M,clearCommentState:R}=(0,n.useContext)(Zl),I=(e=>{let{comment:t,reply:n,isEditingComment:r,isEditingReply:o}=e;return(0,u.isNil)(t)?"comment/new":r?Ms(t):o?Rs(t,n):(e=>`comment/${e.commentId}/reply/new`)(t)})({comment:h,reply:f,isEditingComment:g,isEditingReply:m}),A=(e=>{let{comment:t,reply:n,isEditingComment:r,isEditingReply:o}=e;const i=r?t:o?n:null,{content:a="",namedUsers:l=[]}=i||{};return{value:Is(a,l),plainTextValue:a,mentions:l}})({comment:h,reply:f,isEditingComment:g,isEditingReply:m}),{value:L=A.value,plainTextValue:N=A.plainTextValue,mentions:j=A.mentions}=P(a,I),z=""!==L.trim(),F=w||z,B=null==h?void 0:h.status,W=()=>{null==y||y(),R(a,I)};(0,n.useEffect)((()=>{d&&d.current.update()}),[d,F]);const U=v?"small":"medium";return r().createElement(ss(),{className:c()(x.root,i)},r().createElement("form",{onSubmit:e=>(e.preventDefault(),(0,u.cond)([[(0,u.always)(!h),()=>C({content:N,namedUsers:j,objectType:s,uri:a,relatedObjectUris:l})],[(0,u.always)(g),()=>k({content:N,namedUsers:j,commentId:h.commentId,objectType:s,replies:h.replies,relatedObjectUris:l,uri:a})],[(0,u.always)(m),()=>T({content:N,namedUsers:j,commentId:h.commentId,replyId:f.replyId})],[u.T,()=>O({content:N,namedUsers:j,commentId:h.commentId,action:"open"===h.status?"none":"reopen",uri:a})]])().then(W).catch(console.log)),className:x.form},r().createElement(ss(),{className:x.main},!v&&r().createElement(Bs,{classes:{root:x.avatar}},E),r().createElement(wu,{className:x.textField,disabled:_,onChange:(e,t,n)=>M(a,I,{value:e,plainTextValue:t,mentions:n}),inputRef:t,value:L,onFocus:()=>S(!0),onBlur:()=>S(!1),placeholder:Eu(B)})),F&&r().createElement(ss(),{className:x.buttons},r().createElement(D(),{className:x.button,variant:"contained",color:"primary",disabled:!z||_,type:"submit",size:U},((e,t,n)=>t||n?p().text("Edit"):"open"===e||"resolved"===e?p().text("Reply"):p().text("Comment"))(B,g,m)),r().createElement(D(),{disabled:_,onClick:()=>W(),className:x.button,variant:"outlined",color:"primary",size:U},p().text("Cancel")))))},Cu=(0,i.makeStyles)((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),_u=e=>{let{onReply:t,className:i,uri:a,comment:l,relatedObjectUris:s,objectType:c}=e;const u=Cu(),d=(0,n.useRef)(),h=(0,o.useSelector)(b().selectors.getUserName),{commentId:f,createdBy:g,createdTime:m,status:y}=l,v="resolved"===y,x=g===h,{resolveThread:w,reOpenThread:S,sending:E,deleteComment:O,updateCommentState:C,getCommentState:_}=(0,n.useContext)(Zl),k=Ms(l),{isEditing:T}=_(a,k),P=(0,n.useCallback)((e=>C(a,k,{isEditing:e})),[k,C,a]);(0,n.useEffect)((()=>{T&&d.current.focus()}),[T]);const M=(0,n.useMemo)((()=>v?[{text:p().text("Delete"),onClick:()=>O({uri:a,commentId:f})}]:[{text:p().text("Edit"),onClick:()=>P(!0)},{text:p().text("Delete"),onClick:()=>O({uri:a,commentId:f})}]),[f,O,v,P,a]),I=r().createElement(Ou,{inputRef:d,uri:a,relatedObjectUris:s,objectType:c,onCancel:()=>P(!1),isEditingComment:T,comment:l});return r().createElement(ss(),{className:i},r().createElement(ss(),{className:u.header},r().createElement(Bs,{classes:{root:u.avatar}},g),r().createElement(ss(),{width:"100%"},r().createElement(R(),{className:u.username},g)),r().createElement(R(),{className:u.createdAt},Ps(m)),x&&r().createElement(Es,{buttonComponent:Pi,buttonProps:{icon:us.Z,tooltipTitle:p().text("Open menu")},popoverProps:{PopoverClasses:{root:u.dropdownMenu}},menuItems:M,menuId:"collaboration-comment-menu"})),r().createElement(ss(),{className:u.body},r().createElement(Ls,{comment:l,className:u.commentTarget}),T?I:r().createElement(js,{comment:l,className:u.message}),r().createElement(ss(),{className:u.buttons},r().createElement(hl(),{className:u.button,onClick:t,component:"button"},p().text("Reply")),!v&&r().createElement(hl(),{disabled:E,className:u.button,onClick:()=>{w({commentId:f,uri:a})},component:"button"},p().text("Resolve")),v&&r().createElement(hl(),{disabled:E,className:u.button,onClick:()=>{S({commentId:f,uri:a})},component:"button"},p().text("Re-open")))))},ku=(0,i.makeStyles)((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),Tu=e=>{let{className:t,reply:i,uri:a,comment:l,popperRef:s}=e;const u=(0,n.useRef)(),{createdBy:d,action:h,createdTime:f}=i,g=d===(0,o.useSelector)(b().selectors.getUserName)&&"resolved"!==l.status,{deleteReply:m,updateCommentState:y,getCommentState:v}=(0,n.useContext)(Zl),x=Rs(l,i),{isEditing:w}=v(a,x),S=(0,n.useCallback)((e=>y(a,x,{isEditing:e})),[x,y,a]);(0,n.useEffect)((()=>{w&&u.current.focus()}),[w]);const E=ku(),O=(0,n.useMemo)((()=>[{text:p().text("Edit"),onClick:()=>S(!0)},{text:p().text("Delete"),onClick:()=>m({uri:a,commentId:l.commentId,reply:i})}]),[m,a,l.commentId,i,S]),C=r().createElement(Ou,{inputRef:u,popperRef:s,uri:a,onCancel:()=>S(!1),isEditingReply:w,reply:i,comment:l});return r().createElement(ss(),{className:c()(E.root,t)},r().createElement(Bs,{classes:{root:E.avatar}},d),r().createElement(ss(),{flexGrow:1},r().createElement(ss(),{className:E.header},r().createElement(R(),{className:E.username},d),"resolve"===h&&r().createElement(R(),{className:E.marked},p().text("Marked as resolved")),"reopen"===h&&r().createElement(R(),{className:E.marked},p().text("Re-opened"))),"resolve"!==h&&(w?C:r().createElement(js,{className:E.message,comment:i})),r().createElement(R(),{className:E.createdAt},Ps(f))),g&&r().createElement(Es,{buttonComponent:Pi,buttonProps:{icon:us.Z,tooltipTitle:p().text("Open menu")},menuItems:O,menuId:"collaboration-comment-menu"}))},Pu=(0,i.makeStyles)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),Mu=(0,n.memo)((e=>{let{uri:t,relatedObjectUris:o,objectType:i,classes:a,popperRef:l,messagesRef:s,comment:c}=e;const u=(0,n.useRef)(),d=Pu({classes:a}),p=r().createElement(Ou,{className:d.sendMessageArea,inputRef:u,popperRef:l,uri:t,relatedObjectUris:o,objectType:i,comment:c});return r().createElement(ss(),{className:d.root},c&&r().createElement(r().Fragment,null,r().createElement("div",{className:d.messages,ref:s},r().createElement(_u,{comment:c,uri:t,onReply:()=>{u.current.focus()},className:d.comment,relatedObjectUris:o,objectType:i}),r().createElement(ss(),{className:d.replies},c.replies.map((e=>r().createElement(Tu,{key:e.replyId,className:d.repliedComment,reply:e,uri:t,comment:c}))))),p),!c&&p)})),Ru=window["material-ui"].Fade;var Iu=h.n(Ru);const Du=e=>{let{anchorEl:t,leftBackdropRef:n,rightBackdropRef:r,topBackdropRef:o,bottomBackdropRef:i,rafIdRef:a,lastResizeTimestamp:l=0}=e;if(t){if(Date.now()-l>100&&o.current&&n.current&&r.current&&i.current){const e=t.getBoundingClientRect();o.current.style.top="0",o.current.style.left="0",o.current.style.right="0",o.current.style.height=e.top+"px",n.current.style.top="0",n.current.style.left="0",n.current.style.width=e.left+"px",n.current.style.bottom="0",r.current.style.top="0",r.current.style.left=e.right+"px",r.current.style.right="0",r.current.style.bottom="0",i.current.style.top=e.bottom+"px",i.current.style.left="0",i.current.style.right="0",i.current.style.bottom="0",l=Date.now()}a.current=requestAnimationFrame((()=>Du({anchorEl:t,leftBackdropRef:n,rightBackdropRef:r,topBackdropRef:o,bottomBackdropRef:i,rafIdRef:a,lastResizeTimestamp:l})))}},Au=window["material-ui"].Popper;var Lu=h.n(Au);const Nu=(0,i.makeStyles)({backdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:10},popper:{zIndex:1300}});function ju(){return ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}const zu=(0,n.forwardRef)(((e,t)=>{let{open:o,anchorEl:i,className:a,modal:l=!0,excludeAnchorFromBackdrop:s=!0,onClose:u=El}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["open","anchorEl","className","modal","excludeAnchorFromBackdrop","onClose"]);const p=Nu(),h=(0,n.useRef)(),f=(0,n.useRef)(),g=(0,n.useRef)(),y=(0,n.useRef)(),v=(0,n.useRef)();return(0,n.useEffect)((()=>{if(o&&l)return Du({anchorEl:i,leftBackdropRef:h,rightBackdropRef:f,topBackdropRef:g,bottomBackdropRef:y,rafIdRef:v}),()=>cancelAnimationFrame(v.current)}),[i,o,l]),r().createElement(r().Fragment,null,l&&o&&r().createElement(m(),{container:document.body},s?r().createElement(r().Fragment,null,r().createElement("div",{ref:g,className:p.backdrop,onClick:u}),r().createElement("div",{ref:f,className:p.backdrop,onClick:u}),r().createElement("div",{ref:y,className:p.backdrop,onClick:u}),r().createElement("div",{ref:h,className:p.backdrop,onClick:u})):r().createElement("div",{className:p.backdrop,onClick:u})),r().createElement(Lu(),ju({open:o,anchorEl:i},d,{className:c()(a,p.popper),ref:t})))}));zu.displayName="Popper";const Fu=zu,Bu=(0,i.makeStyles)((e=>{const t=e.palette.background.paper;return{paper:{backgroundColor:t,maxWidth:1e3},popper:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}}));function Wu(){return Wu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wu.apply(this,arguments)}const Uu=e=>{let{children:t,className:o,classes:i,transition:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className","classes","transition"]);const s=Bu(),u=a?Iu():r().Fragment,[d,p]=(0,n.useState)(null);return r().createElement(Fu,Wu({className:c()(s.popper,o),modifiers:{preventOverflow:{boundariesElement:"viewport",padding:14},arrow:{enabled:!0,element:d}},transition:a,excludeAnchorFromBackdrop:!1},l),(e=>{let{TransitionProps:n}=e;return r().createElement(u,n,r().createElement(Nn(),{className:c()(s.paper,null==i?void 0:i.root)},r().createElement("span",{className:c()(s.arrow,null==i?void 0:i.arrow),ref:p}),t))}))},Hu=(0,i.makeStyles)((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:e=>{let{hasScroll:t}=e;return{marginLeft:"16px",marginRight:t?"2px":"8px"}},replies:e=>{let{hasScroll:t}=e;return{marginLeft:"8px",marginRight:t?"2px":"8px"}},sendMessageArea:e=>{let{hasScroll:t,scrollWidth:n}=e;return{marginLeft:"8px",marginRight:t?n+2:"8px"}},messages:{maxHeight:"400px",overflowY:"auto"}}))),Vu=e=>{let{uri:t,relatedObjectUris:o,objectType:i,anchorEl:a,onClose:l,open:s,comment:c}=e;const[u,d]=(0,n.useState)(0),h=Hu({scrollWidth:u,hasScroll:0!==u}),f=(0,n.useRef)(null),{resolveThread:g,loading:m,sending:y}=(0,n.useContext)(Zl),v=1+(null==c?void 0:c.replies.length);return r().createElement(Uu,{popperRef:f,anchorEl:a,open:s,placement:"right-start",onClose:l,className:h.popper},r().createElement(ss(),{className:h.header},r().createElement(ss(),{className:h.headerInfo},r().createElement(R(),{className:h.title},p().text("Comments")),c&&!m&&r().createElement(R(),{className:h.counter},p().number(v)," ",1===v?p().text("item"):p().text("items"))),c&&!m&&r().createElement(Pi,{className:h.resolveButton,size:"S",onClick:()=>{g({commentId:c.commentId,uri:t})},disabled:y,showForDisabled:!0,tooltipTitle:p().text("Resolve"),icon:cs.Z,color:"primary"})),!m&&r().createElement(Mu,{popperRef:f,messagesRef:e=>{e&&d(e.offsetWidth-e.clientWidth)},classes:{root:h.collaborationItem,replies:h.replies,sendMessageArea:h.sendMessageArea,messages:h.messages,comment:h.comment},uri:t,relatedObjectUris:o,objectType:i,comment:c}))},Gu=e=>{let{className:t,uri:o,objectType:i,relatedObjectUris:a,onChangePopupVisibility:l,allowOnlyOneComment:s=!1,showAlways:u=!1}=e;const d=Hl(),[p,h]=(0,n.useState)(null),[f,g]=(0,n.useState)(!1),m=f&&Boolean(p),{currentComment:y,commentsMap:v,getComment:b,clearCurrentComment:x,objectTypes:w}=(0,n.useContext)(Zl),S=!!v&&(!w||w.includes(i)),E=((null==v?void 0:v[o])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),O=!s||s&&0===E.length,C=null===y&&m;Vl((()=>{l&&l(m)}),[m]);const _=(0,n.useContext)(Ql),k=(0,n.useMemo)((()=>_?[...a,..._]:a),[_,a]);return S&&r().createElement("div",{className:c()(d.root,t)},O&&r().createElement(as,{className:c()(d.addButton,{[d.showAlways]:u||C}),onClick:e=>{h(e.currentTarget),g(!0)}}),E.map((e=>{let{replies:t,commentId:n}=e;return r().createElement(rs,{ref:n===(null==y?void 0:y.commentId)?h:null,key:n,onClick:()=>(e=>{b(e),g(!0)})(n)},1+t)})),r().createElement(Vu,{anchorEl:p,open:m,onClose:()=>{h(null),x(),g(!1)},uri:o,relatedObjectUris:k,objectType:i,comment:y}))};function qu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Yu(e,t,n[t])}))}return e}function Yu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ku=(e,t)=>t.filter((t=>t.replyId!==e)),$u=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),r=[...e.replies];return r[n]=t,r},Zu=[],Xu=e=>console.error("Collaboration error",e),Qu=(0,i.makeStyles)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),Ju=()=>{const e=Qu(),t=(0,o.useSelector)(b().selectors.getHistoryEvent),n=(0,o.useDispatch)(),i=(0,u.pipe)(v.profile.history.actions.clearHistoryEvent,n);return t?r().createElement("div",{className:e.root},r().createElement(R(),{component:"div"},p().text("You are viewing a historic slice:")," ",r().createElement("span",{className:e.slice},p().date(t.aStamp,"llll"))),r().createElement(D(),{className:e.cancelButton,variant:"contained",color:"primary",onClick:i},p().text("Cancel"))):null},ed=(0,i.makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),td=(0,n.memo)((e=>{let{entity:t,className:i,historySlice:a}=e;const l=ed(),s=(e=>{let{objectIds:t=Zu,objectTypes:r,enabled:i=!0}=e;const a=(0,o.useSelector)(b().selectors.getEntity),l=(0,o.useSelector)(b().selectors.getTenant),s=(0,o.useSelector)(b().selectors.getCollaborationPath),c=(0,o.useSelector)(b().selectors.isCollaborationEnabled)&&i,[d,p]=(0,n.useState)(null),[h,f]=(0,n.useState)([]),[g,m]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[x,w]=(0,n.useState)(!1),[S,E]=(0,n.useState)(!1),[O,C]=(0,n.useState)({}),_=(0,n.useCallback)((e=>{m((t=>qu({},t,e)))}),[]),k=null==a?void 0:a.uri,T=(0,n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c&&k&&!(0,Fo.isTempUri)(k)){const n=e=>{console.warn("Collaboration error",e),m(null)};(0,u.pipe)(Fo.getCommentsCount,(0,u.andThen)((0,u.map)((0,u.props)(["objectId","comments"]))),(0,u.andThen)(u.fromPairs),(0,u.andThen)(t?m:_),(0,u.otherwise)(n))({uris:e,tenant:l,collaborationPath:s})}else m(null)}),[_,s,k,c,l]);(0,n.useEffect)((()=>{T(t,!0)}),[t,T]);const P=(0,n.useCallback)(((e,t)=>{(0,Fo.getComments)({collaborationPath:s,tenant:l,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;f((e=>t?(0,u.uniqBy)((0,u.prop)("commentId"),[...e,...n]):n)),p(r)})).catch(Xu)}),[s,l]),M=(0,n.useCallback)((e=>{E(!0),(0,Fo.getComment)({collaborationPath:s,tenant:l,commentId:e}).then(v).catch(Xu).finally((()=>E(!1)))}),[s,l]),R=(0,n.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:i}=e;w(!0);const a={objectId:o,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,Fo.createComment)({collaborationPath:s,tenant:l,data:a}).then((e=>{let[t]=e;return((e,t)=>{v(e),m((n=>qu({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),f((t=>[e,...t]))})(t,o)})).catch(Xu).finally((()=>w(!1)))}),[s,l]),I=(0,n.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:i,commentId:a,replies:c}=e;w(!0);const d={objectId:o,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,commentId:a,replies:c};return(0,Fo.updateComment)({collaborationPath:s,tenant:l,data:d}).then((e=>(e=>{v(e),f((0,u.map)((0,u.when)((0,u.propEq)("commentId",e.commentId),(0,u.always)(e))))})(qu({},e,{replies:c})))).catch(Xu).finally((()=>w(!1)))}),[s,l]),D=(0,n.useCallback)((e=>{let{uri:t,commentId:n}=e;w(!0),(0,Fo.deleteComment)({collaborationPath:s,tenant:l,commentId:n}).then((()=>((e,t)=>{v(null),m((n=>{const r=n[t]||[];return qu({},n,{[t]:r.filter((t=>t.commentId!==e))})})),f((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(Xu).finally((()=>w(!1)))}),[s,l]),A=(0,n.useCallback)(((e,t,n,r)=>{const o="resolve"===e.action?"resolved":"open",{replyId:i}=e;v("resolved"===o?e=>{if(e)return null}:t=>{if(t)return qu({},t,{replies:r?Ku(i,t.replies):[...t.replies,e]})}),m((e=>qu({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?qu({},e,{status:o,replies:r?e.replies-1:e.replies+1}):e))}))),f((t=>t.map((t=>t.commentId===n?qu({},t,{status:o,replies:r?Ku(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),L=(0,n.useCallback)((e=>{let{uri:t,commentId:n,reply:r}=e;w(!0),(0,Fo.deleteReply)({collaborationPath:s,tenant:l,commentId:n,replyId:r.replyId}).then((()=>A(r,t,n,!0))).catch(Xu).finally((()=>w(!1)))}),[s,A,l]),N=(0,n.useCallback)(((e,t)=>{v((t=>{if(t)return qu({},t,{replies:$u(t,e)})})),f((n=>n.map((n=>n.commentId===t?qu({},n,{replies:$u(n,e)}):n))))}),[]),j=(0,n.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,replyId:o}=e;w(!0);const i={content:t,namedUsers:n};return(0,Fo.updateReply)({collaborationPath:s,tenant:l,commentId:r,replyId:o,data:i}).then((e=>N(e,r))).catch(Xu).finally((()=>w(!1)))}),[s,l,N]),z=(0,n.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:o,uri:i}=e;w(!0);const a={content:t,action:o,namedUsers:n};return(0,Fo.createReply)({collaborationPath:s,tenant:l,commentId:r,data:a}).then((e=>{let[t]=e;return A(t,i,r)})).catch(Xu).finally((()=>w(!1)))}),[s,l,A]),F=(0,n.useCallback)((e=>{let{commentId:t,uri:n}=e;z({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[z]),B=(0,n.useCallback)((e=>{let{commentId:t,uri:n}=e;z({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[z]);return{clearCurrentComment:(0,n.useCallback)((()=>{v(null)}),[]),comments:h,commentsMap:g,getCommentState:(e,t)=>(0,u.pathOr)({},[e,t],O),updateCommentState:(e,t,n)=>{C((r=>{const o=[e,t],i=(0,u.path)(o,r);return(0,u.assocPath)(o,(0,u.mergeRight)(i,n),r)}))},clearCommentState:(e,t)=>C((0,u.dissocPath)([e,t])),createComment:R,createReply:z,currentComment:y,deleteComment:D,editComment:I,getComment:M,getComments:P,getCommentsCount:T,loading:S,objectTypes:r,pageToken:d,reOpenThread:B,resolveThread:F,sending:x,deleteReply:L,editReply:j}})({objectIds:(0,n.useMemo)((()=>(0,Fo.getProfileBandObjectIdsForCollaboration)(t)),[t])}),d=(0,Fo.getEntityUriForLink)(t);return r().createElement(Xl,{collaboration:s},r().createElement(dl,{className:c()(i,Ul),entity:(null==a?void 0:a.aEntity)||t},a?r().createElement(Ju,null):r().createElement(r().Fragment,null,r().createElement(Wl,{className:l.profileBandNavigation}),r().createElement(Gu,{className:l.comments,uri:d,relatedObjectUris:(0,Fo.createRelatedObjectUris)(Fo.CollaborationObjectTypes.ENTITY,{entityUri:d}),objectType:Fo.CollaborationObjectTypes.ENTITY}))))}));td.displayName="ScreenProfileBand";var nd=h(8996),rd=h.n(nd);const od=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current},id=r().createContext(void 0);id.displayName="PageRequestsAbortingContext";var ad=h(715),ld=h(5174);function sd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){cd(e,t,n[t])}))}return e}function cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ud=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.relations.filter((e=>!n.includes(e))).filter((0,u.either)((0,u.pipe)(Fo.getStartObjectUri,(0,u.equals)(e)),(0,u.pipe)(Fo.getEndObjectUri,(0,u.equals)(e))));n.push(...r);const o=(0,u.pipe)(dd,(0,u.without)([e]))(r);return o.forEach((e=>ud(e,t,n))),n},dd=e=>(0,u.pipe)((0,u.chain)((e=>[(0,Fo.getStartObjectUri)(e),(0,Fo.getEndObjectUri)(e)])),u.uniq)(e),pd=(e,t)=>{const n=(e=>{var t;const n=new Set,r=new Set;e.entities.forEach((e=>n.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>n.has(e.startObject.objectURI)&&n.has(e.endObject.objectURI))))||[]).forEach((e=>{r.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.uri}--${e.type}--${e.direction}`)}));const o=e.entities.map((e=>({id:e.uri,name:e.label,entityTypeUri:e.type,traversedRelationsCount:e.traversedRelations,untraversedRelationsCount:e.untraversedRelations}))),i=[];return r.forEach((e=>{const[t,n,r,o,a]=e.split("--");i.push({from:t,to:n,key:r,relationTypeUri:o,direction:a})})),{nodes:o,edges:i}})(t);n.nodes.forEach((t=>{e.hasNode(t.id)||e.addNode(t.id,{label:(0,Fo.getLabel)(t.name),entityTypeUri:t.entityTypeUri,traversedRelationsCount:t.traversedRelationsCount,untraversedRelationsCount:t.untraversedRelationsCount,x:1,y:1})})),n.edges.forEach((t=>{const n=t.from===t.to;e.hasEdge(t.key)||e.addEdgeWithKey(t.key,t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:n,loop:n,relationTypeUri:t.relationTypeUri,direction:t.direction})}))},hd=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.neighbors(e).filter((e=>!n.includes(e)));return n.push(...r),r.forEach((e=>hd(e,t,n))),n},fd=(e,t,r)=>{const[i,a]=(0,n.useState)(null),l=(0,o.useDispatch)(),[s,c]=(0,n.useState)(null),[d,h]=(0,n.useState)(!1),f=null==e?void 0:e.uri,g=(0,Fo.isDataTenantEntity)(e),m=(0,o.useSelector)(b().selectors.getMetadata),y=Ml(),x=Ml(),w=r===Fo.GraphLayout.TREE,S=od(r),E=(0,n.useContext)(id),O=S===Fo.GraphLayout.TREE&&w,C=(0,n.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return x((0,Fo.getHops)({uri:e,deep:n,limitCreditsConsumption:!0,graphTypes:t?[(0,Fo.getLastUriPart)(t)]:null,activenessDate:null,max:t?200:3e3,signal:E}))}),[t,x,E]);(0,n.useEffect)((()=>(!f||(0,Fo.isTempUri)(f)||g||w||(h(!0),y((0,Fo.getHops)({uri:f,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,Fo.getLastUriPart)(t)]:null,activenessDate:null,max:t?200:3e3,signal:E})).then((e=>{const t=new nd.MultiGraph;pd(t,e),a(t),c(e)})).catch((e=>{console.error(e),c(null),(0,Fo.isAbortError)(e)||l(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong"))))})).finally((()=>{h(!1)}))),()=>{a(null),c(null),h(!1)})),[f,g,l,t,O]);const _=(0,n.useCallback)((async e=>{let{startEntityUri:t,endEntityUri:n,relationType:r,attributes:o,startDate:a,endDate:d}=e;try{var g;h(!0);const e=await(0,Fo.createRelation)({startEntityUri:t,endEntityUri:n,relationType:r,attributes:o,startDate:a,endDate:d});if(null==e||null===(g=e[0])||void 0===g||!g.successful)throw null==e?void 0:e[0];const l=e[0].object,p=t===f?l.endObject.objectURI:l.startObject.objectURI,y=await(0,Fo.getEntity)(p,{select:"label"});t===f?l.endObject.label=y.label:l.startObject.label=y.label;const v=((e,t,n)=>{const r=t.startObject.objectURI,o=t.endObject.objectURI,i=[r,o],a=e.entities.map((0,u.prop)("uri")),l=(0,Fo.getRelationType)(n,t.type),s=i.find((e=>!(0,u.includes)(e,a))),c=s&&(t.startObject.objectURI===s?t.startObject:t.endObject),d=c&&{type:c.type,label:c.label,uri:c.objectURI,traversedRelations:0,untraversedRelations:1},p=sd({},(0,u.pick)(["uri","type","attributes","startDate","endDate","crosswalks","direction"],t),{startObject:(0,u.pick)(["objectURI","directionalLabel"],t.startObject),endObject:(0,u.pick)(["objectURI","directionalLabel"],t.endObject),direction:null==l?void 0:l.direction});return{entities:(d?e.entities.concat([d]):e.entities).map((e=>e.uri===r||e.uri===o?sd({},e,{traversedRelations:e.traversedRelations+1}):e)),relations:(e.relations||[]).concat([p])}})(s,l,m);pd(i,v);const b=[l.startObject.objectURI,l.endObject.objectURI],x=s.entities.map((0,u.prop)("uri"));b.forEach((e=>{if(x.includes(e)){const t=i.getNodeAttribute(e,"traversedRelationsCount");i.setNodeAttribute(e,"traversedRelationsCount",t+1)}})),c(v)}catch(e){throw l(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong")))),e}finally{h(!1)}}),[l,s,i,m]),k=(0,n.useCallback)((e=>{h(!0),(0,Fo.removeRelation)(e).then((()=>{i.extremities(e).forEach((e=>{const t=i.getNodeAttribute(e,"traversedRelationsCount");i.setNodeAttribute(e,"traversedRelationsCount",t-1)})),i.dropEdge(e);const{updatedData:t,removedEntitiesUris:n}=((e,t,n,r)=>{const o=r.relations.find((0,u.propEq)("uri",t)),i=(0,Fo.getStartObjectUri)(o),a=(0,Fo.getEndObjectUri)(o),l=(0,ld.toUndirected)(n),s=(0,u.cond)([[()=>!(0,ad.Ar)(l,e,i),(0,u.always)(i)],[()=>!(0,ad.Ar)(l,e,a),(0,u.always)(a)],[u.T,(0,u.always)(null)]])(),c=(0,u.evolve)({entities:(0,u.map)((e=>e.uri===i||e.uri===a?sd({},e,{traversedRelations:e.traversedRelations-1}):e)),relations:(0,u.reject)((0,u.propEq)("uri",t))})(r),{updatedData:d,removedEntitiesUris:p}=s?((e,t)=>{const n=ud(e,t),r=(0,u.pipe)(dd,(0,u.append)(e),u.uniq)(n);return{updatedData:(0,u.evolve)({relations:(0,u.reject)((e=>n.includes(e))),entities:(0,u.reject)((e=>r.includes(e.uri)))})(t),removedEntitiesUris:r}})(s,c):{updatedData:c,removedEntitiesUris:[]};return{updatedData:d,removedEntitiesUris:p}})(f,e,i,s);var r;r=i,(n||[]).forEach((e=>{r.dropNode(e)})),c(t)})).catch((e=>{l(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong"))))})).finally((()=>{h(!1)}))}),[l,i,f,s]),T=(0,n.useCallback)(((e,t)=>{const{nodes:n=[]}=t,r=(0,u.difference)(i.neighbors(e),n);((e,t,n,r)=>{const o=(0,ld.toUndirected)(r),i=(e,t)=>{o.filterEdges(e,t,(e=>!!e)).forEach((e=>o.dropEdge(e)))};n.forEach((e=>{i(t,e),o.forEachNeighbor(e,(t=>{i(e,t)}))}));const a=[];return o.nodes().forEach((t=>{((e,t,n)=>(0,ad.Ar)(e,t,n)?null:n)(o,e,t)&&a.push(t)})),(0,u.uniq)(a.reduce(((e,t)=>hd(t,o,e)),[...a]))})(f,e,r,i).forEach((t=>{t!==f&&t!==e&&i.setNodeAttribute(t,"hidden",!0)}))}),[f,i]),P=(0,n.useCallback)((e=>{if(e&&!(0,Fo.isTempUri)(e)&&!g){const t=i.getNodeAttribute(e,"untraversedRelationsCount");i.neighbors(e).forEach((e=>{i.setNodeAttribute(e,"hidden",!1)})),t>0&&(h(!0),C(e).then((t=>{const n=((e,t,n)=>{const{entities:r=[],relations:o=[]}=t,i=r.reduce(((e,t)=>{if(e.some((e=>{let{uri:n}=e;return n===t.uri}))){if(t.uri===n){const r=e.findIndex((e=>{let{uri:t}=e;return t===n}));e[r]=sd({},e[r],{traversedRelations:t.traversedRelations,untraversedRelations:t.untraversedRelations})}}else e.push(t);return e}),[...e.entities||[]]);return{entities:i,relations:o.reduce(((e,t)=>(e.some((e=>{let{uri:n}=e;return n===t.uri}))||e.push(t),e)),[...e.relations||[]])}})(s,t,e);pd(i,t);const r=t.entities.find((t=>t.uri===e));i.setNodeAttribute(e,"untraversedRelationsCount",r.untraversedRelations),i.setNodeAttribute(e,"traversedRelationsCount",r.traversedRelations),c(n)})).catch((e=>{console.error(e),(0,Fo.isAbortError)(e)||l(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong"))))})).finally((()=>{h(!1)})))}}),[s,l,i,g,C]);return{graphLoading:d,data:s,graphologyGraph:i,onAddRelation:_,onDeleteRelation:k,onCollapseEntity:T,onExpandEntity:P}};function gd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const md=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gd(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},yd=[25,50,100];function vd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bd=(e,t,n)=>{const{startObject:r,endObject:o,type:i}=t,{directionalLabel:a}=(0,Fo.getStartObjectUri)(t)===n?r:o;return a||(0,Fo.getRelationTypeLabelFromMetadata)(e,i)},xd=e=>{let{data:t,selectedEntityUri:r,mainEntityUri:i,graphTypeUri:a}=e;const[l,s]=(0,n.useState)({field:"",order:"asc"}),[c,d]=(0,n.useState)(0),[h,f]=(0,n.useState)(yd[0]),[g,m]=(0,n.useState)([]),[y,x]=(0,n.useState)(!1),w=(0,o.useDispatch)(),S=(0,o.useSelector)(b().selectors.getMetadata),E=(0,n.useMemo)((()=>{const e=(null==t?void 0:t.entities)||[];return(0,u.zipObj)(e.map((0,u.prop)("uri")),e)}),[null==t?void 0:t.entities]),O=(0,n.useMemo)((()=>(0,u.pipe)((0,u.filter)((0,u.either)((0,u.pipe)(Fo.getStartObjectUri,(0,u.equals)(r)),(0,u.pipe)(Fo.getEndObjectUri,(0,u.equals)(r)))),(0,u.uniqBy)((0,u.prop)("uri")),(0,u.map)((e=>{const t=E[((e,t)=>{const n=(0,Fo.getStartObjectUri)(t),r=(0,Fo.getEndObjectUri)(t);return n===e?r:n})(r,e)];return{relation:e,entity:t,entityLabel:(0,Fo.getLabel)(t.label),entityTypeLabel:(0,Fo.getEntityTypeLabel)(S,t),relationTypeLabel:bd(S,e,t.uri)}})))((null==t?void 0:t.relations)||[])),[t,r,E,S]),{searchText:C,onChangeSearchText:_,filters:k,onFilter:T,relationTypesOptions:P,entityTypesOptions:M}=(e=>{const[t,r]=(0,n.useState)(""),[i,a]=(0,n.useState)({entityTypesUris:[],relationTypesUris:[]}),l=(0,o.useSelector)(b().selectors.getMetadata),s=(0,n.useMemo)((()=>(0,u.pipe)((0,u.map)((e=>{let{entity:t}=e;return t.type})),(0,u.concat)(u.__,i.entityTypesUris),u.uniq,(0,u.map)((0,Fo.getEntityType)(l)))(e)),[e,l,i.entityTypesUris]),c=(0,n.useMemo)((()=>(0,u.pipe)((0,u.map)((e=>{let{relation:t}=e;return t.type})),(0,u.concat)(u.__,i.relationTypesUris),u.uniq,(0,u.map)((0,Fo.getRelationType)(l)))(e)),[e,l,i.relationTypesUris]);return{searchText:t,onChangeSearchText:r,filters:i,onFilter:a,entityTypesOptions:s,relationTypesOptions:c}})(O),R=(0,n.useMemo)((()=>(0,u.pipe)((0,u.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:o,relationTypesUris:i}=k;return Fo.utils.strings.search(t,C)&&(0,u.ifElse)((0,u.prop)("length"),(0,u.includes)(r.type),u.T)(i)&&(0,u.ifElse)((0,u.prop)("length"),(0,u.includes)(n.type),u.T)(o)})),l.field?(0,u.sort)(((e,t)=>Fo.utils.strings.sort(l.order,e[l.field],t[l.field]))):u.identity)(O)),[O,l,C,k]),I=(0,n.useMemo)((()=>R.slice(c*h,c*h+h)),[R,c,h]),D=(0,n.useCallback)((e=>{x(!0),(0,Fo.getRelation)(e).then((e=>{m((t=>[...t,{initialRelation:e,relation:e}]))})).catch((e=>{w(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Can't load relationship's attributes"))))})).finally((()=>x(!1)))}),[w]),A=(0,n.useCallback)((e=>{m((t=>t.map((t=>t.relation.uri===e.uri?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vd(e,t,n[t])}))}return e}({},t,{relation:e}):t))))}),[]);(0,n.useEffect)((()=>{d(0),_("")}),[r,a,_,T]),(0,n.useEffect)((()=>{T({entityTypesUris:[],relationTypesUris:[]})}),[a,i,T]),(0,n.useEffect)((()=>{d(0)}),[l,C,k]);const L=(0,n.useCallback)((e=>{m((t=>t.filter((t=>t.relation.uri!==e))))}),[]),N=(0,n.useCallback)(((e,t)=>{x(!0),(0,Fo.updateRelation)({oldRelation:e,newRelation:t}).then((()=>{L(t.uri)})).catch((e=>{w(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Can't edit relationship"))))})).finally((()=>x(!1)))}),[L,w]);return{rowsData:I,onSort:s,sorting:l,searchText:C,onChangeSearchText:_,filters:k,onFilter:T,entityTypesOptions:M,relationTypesOptions:P,editingRelations:g,onStartRelationEditing:D,onCancelRelationEditing:L,onUpdateEditingRelation:A,total:R.length,page:c,rowsPerPage:h,onPageChange:d,onRowsPerPageChange:f,onSaveEditingRelation:N,loading:y}};var wd=h(2726);const Sd=window["material-ui"].TablePagination;var Ed=h.n(Sd);const Od=(0,i.makeStyles)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function Cd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_d(e,t,n[t])}))}return e}function _d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kd=e=>{let{classes:t={},count:o,rowsPerPageOptions:i,page:a,onChangePage:l,rowsPerPage:s,onChangeRowsPerPage:d,basicTableRef:h,labelRowsPerPage:f}=e;const g=Od(),m=(0,n.useCallback)((()=>{(0,u.pathOr)(u.identity,["current","resetScrollbarPosition"],h)()}),[h]),y=(0,n.useCallback)((e=>{l(e),m()}),[l,m]),v=(0,n.useCallback)((e=>{l(0),d(e),m()}),[l,d,m]);return r().createElement(Ed(),{classes:Cd({},t,{root:c()(g.pagination,t.root),select:c()(g.select,t.select),caption:g.caption,selectRoot:g.selectRoot,actions:g.actions}),component:"div",labelRowsPerPage:f||p().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return p().text("${fromRow}-${toRow} of ${countRows}",{fromRow:p().number(t,"0,0"),toRow:p().number(n,"0,0"),countRows:p().number(r,"0,0")})},count:o,rowsPerPageOptions:i,page:a,onChangePage:(0,u.pipe)((0,u.nthArg)(1),y),rowsPerPage:s,onChangeRowsPerPage:(0,u.pipe)(wl,v)})};kd.propTypes={classes:l().object,rowsPerPageOptions:l().arrayOf(l().number),count:l().number,page:l().number,onChangePage:l().func,rowsPerPage:l().number,onChangeRowsPerPage:l().func,basicTableRef:l().shape({current:l().object}),labelRowsPerPage:l().string};const Td=r().memo(kd);function Pd(){return Pd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pd.apply(this,arguments)}const Md=(e,t,o)=>{if(e&&t){const i=(0,n.memo)(o);return i.displayName=o.name,n=>r().createElement(e.Consumer,null,(e=>r().createElement(i,Pd({},n,t(e,n)))))}return o},Rd=r().createContext({graphLoading:!1,data:null,graphologyGraph:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{},onCollapseEntity:()=>{},onExpandEntity:()=>{},layout:null,setLayout:()=>{}});Rd.displayName="GraphStateContext";var Id="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Dd(e){cancelAnimationFrame(e.id)}var Ad=null;function Ld(e){if(void 0===e&&(e=!1),null===Ad||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Ad="positive-descending":(t.scrollLeft=1,Ad=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ad}return Ad}var Nd=function(e,t){return e};function jd(e){var t,r,o=e.getItemOffset,i=e.getEstimatedTotalSize,a=e.getItemSize,l=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,u=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return r=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=u(n.props,U(U(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:U(U(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=ql((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=ql((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,i=r.direction,l=r.itemSize,s=r.layout,c=n._getItemStyleCache(d&&l,d&&s,d&&i);if(c.hasOwnProperty(e))t=c[e];else{var u=o(n.props,e,n._instanceProps),p=a(n.props,e,n._instanceProps),h="horizontal"===i||"horizontal"===s,f="rtl"===i,g=h?u:0;c[e]=t={position:"absolute",left:f?void 0:g,right:f?g:void 0,top:h?0:u,height:h?"100%":p,width:h?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=ql((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(Ld()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r,o;null!==n._resetIsScrollingTimeoutId&&Dd(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=150,r=Id(),o={id:requestAnimationFrame((function n(){Id()-r>=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}W(t,e),t.getDerivedStateFromProps=function(e,t){return zd(e,t),p(e),null};var r=t.prototype;return r.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},r.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props.itemCount,r=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(l(this.props,e,t,r,this._instanceProps))},r.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},r.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Ld()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},r.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Dd(this._resetIsScrollingTimeoutId)},r.render=function(){var e=this.props,t=e.children,r=e.className,o=e.direction,a=e.height,l=e.innerRef,s=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?Nd:p,f=e.layout,g=e.outerElementType,m=e.outerTagName,y=e.style,v=e.useIsScrolling,b=e.width,x=this.state.isScrolling,w="horizontal"===o||"horizontal"===f,S=w?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),O=E[0],C=E[1],_=[];if(u>0)for(var k=O;k<=C;k++)_.push((0,n.createElement)(t,{data:d,key:h(k,d),index:k,isScrolling:v?x:void 0,style:this._getItemStyle(k)}));var T=i(this.props,this._instanceProps);return(0,n.createElement)(g||m||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:F({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},(0,n.createElement)(s||c||"div",{children:_,ref:l,style:{height:w?"100%":T,pointerEvents:x?"none":void 0,width:w?T:"100%"}}))},r._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},r._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var l=s(this.props,a,this._instanceProps),u=c(this.props,l,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+p)),l,u]},t}(n.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},r}var zd=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Fd=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var l=o[i];a=l.offset+l.size}for(var s=i+1;s<=t;s++){var c=r(s);o[s]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},Bd=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=Fd(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},Wd=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var l=r[i];a=l.offset+l.size}return a+(n-i-1)*o},Ud=jd({getItemOffset:function(e,t,n){return Fd(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Wd,getOffsetForIndexAndAlignment:function(e,t,n,r,o){var i=e.direction,a=e.height,l=e.layout,s=e.width,c="horizontal"===i||"horizontal"===l?s:a,u=Fd(e,t,o),d=Wd(e,o),p=Math.max(0,Math.min(d-c,u.offset)),h=Math.max(0,u.offset-c+u.size);switch("smart"===n&&(n=r>=h-c&&r<=p+c?"auto":"center"),n){case"start":return p;case"end":return h;case"center":return Math.round(h+(p-h)/2);default:return r>=h&&r<=p?r:r<h?h:p}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?Bd(e,t,o,0,n):function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&Fd(e,n,t).offset<r;)n+=i,i*=2;return Bd(e,t,Math.min(n,o-1),Math.floor(n/2),r)}(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,l=e.layout,s=e.width,c="horizontal"===o||"horizontal"===l?s:i,u=Fd(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=Fd(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});const Hd=(0,i.makeStyles)({item:{overflow:"hidden"}});function Vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Gd(e,t,n[t])}))}return e}function Gd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qd=(0,n.memo)((e=>{let{width:t=0,height:o=0,defaultItemSize:i,data:a,children:l,itemKey:s,showNotMeasuredItems:c,listRef:u}=e;const d=Hd(),p=(0,n.useRef)({}),[h,f]=(0,n.useState)({}),g=(0,n.useCallback)((0,Fo.debounce)((()=>{f(Vd({},p.current))})),[]),m=(0,n.useCallback)(((e,t)=>s?s(t,e):t),[s]),y=(0,n.useRef)(),v=u||y;v.current&&v.current.resetAfterIndex(0,!1);const b=(0,n.useMemo)((()=>e=>{let{data:t,index:n,style:o}=e;const i=m(t,n);return r().createElement("div",{style:o,className:d.item},r().createElement("div",{style:c?void 0:{visibility:i in h?void 0:"hidden"}},r().createElement(Ja,{handleHeight:!0,onResize:(e,t)=>{p.current[i]!==t&&(((e,t)=>{p.current=Vd({},p.current,{[e]:t})})(i,t),g())}}),l({data:t,index:n})))}),[l,c,m,g,!c&&h]);return r().createElement(Ud,{ref:v,width:t,height:o,itemCount:a.length,itemData:a,itemSize:e=>h[(e=>m(a,e))(e)]||i,itemKey:s},b)})),Yd="1px solid rgba(0, 0, 0, 0.05)",Kd=(0,i.makeStyles)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:Yd},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},editingRow:{paddingTop:"8px",paddingBottom:"8px"},headRow:{borderBottom:Yd}});function $d(){return $d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}const Zd=(0,n.memo)((e=>{let{columnsData:t,sorting:n,onSort:o}=e;const i=Kd();return r().createElement("div",{className:c()(i.tableRow,i.headRow)},t.map((e=>{const{id:t,sortable:i,headCellRenderer:a,columnClassName:l}=e,s=a,c=i?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{var e;o({field:t,order:n.field===t?(e=n.order,"asc"===e?"desc":"asc"):"asc"})}}:{};return r().createElement("div",{key:t,className:l},r().createElement(s,$d({headCellData:e},c)))})))})),Xd=(0,n.forwardRef)(((e,t)=>{let{classes:o,columnsData:i,rowsData:a,sorting:l,onSort:s,getRowKey:u,ExpandedRowRenderer:d,defaultRowHeight:p}=e;const h=Kd(),[f,g]=(0,n.useState)({width:0,height:0}),m=(0,n.useCallback)((e=>{let{data:t,index:n}=e;const a=t[n];return r().createElement("div",{className:c()(h.tableRowWrapper,null==o?void 0:o.tableRowWrapper)},r().createElement("div",{className:c()(h.tableRow,null==o?void 0:o.tableRow,{[h.editingRow]:a.expanded})},i.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:o}=e;const i=n;return r().createElement("div",{key:t,className:o},r().createElement(i,{value:a[t],rowValue:a}))}))),a.expanded&&d&&r().createElement(d,{open:a.expanded,rowValue:a}))}),[i,d]),y=(0,n.useCallback)(((e,t)=>{g({width:e,height:t})}),[]),v=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=v.current)||void 0===e||e.scrollTo(0)}}))),r().createElement("div",{className:h.table},r().createElement(Zd,{columnsData:i,sorting:l,onSort:s}),r().createElement("div",{className:h.tableBodyWrapper},r().createElement(Ja,{handleHeight:!0,handleWidth:!0,onResize:y}),r().createElement("div",{className:h.tableBody},r().createElement(qd,{listRef:v,width:f.width,height:f.height,data:a,defaultItemSize:p,itemKey:u,showNotMeasuredItems:!0},m))))})),Qd=(0,n.memo)(Xd);var Jd=h(2332);const ep="rgba(238, 238, 238, 1)",tp=(0,i.makeStyles)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{minWidth:"180px",flex:3},relationshipTypeColumn:{minWidth:"70px",flex:1},entityTypeColumn:{minWidth:"70px",flex:1},row:{position:"relative","&:hover":{background:ep}}});function np(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rp={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},op=".collapsibleTableRow:hover &",ip=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){np(e,t,n[t])}))}return e}({},rp,{[op]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${ep} 100%)`}}),ap=(0,i.makeStyles)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":rp},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":ip},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[op]:{visibility:"visible",background:ep}},editingMode:{visibility:"visible"},hidden:{visibility:"hidden"},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}},expandedRow:{padding:"0 16px 6px",fontSize:"13px"}})));function lp(){return lp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(this,arguments)}function sp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){cp(e,t,n[t])}))}return e}function cp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const up=e=>{let{className:t,headCellData:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","headCellData"]);const i=ap();return r().createElement("div",{className:c()(i.headCell,t)},r().createElement(Jd.Z,lp({},o,{headCellData:sp({},n,{label:r().createElement(al,{value:n.label},r().createElement("div",{className:i.headLabel},n.label))})})))},dp=(0,n.memo)((e=>{let{value:t="",tooltip:n,onClick:o,className:i}=e;const a=ap();return n=n||t,r().createElement(al,{value:n},r().createElement("div",{className:c()(a.defaultCell,i,{[a.clickable]:!!o}),onClick:o},t))})),pp=Md(Rd,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:o,onClick:i}=e;const a=ap(),l=r().createElement(r().Fragment,null,r().createElement(Bi,{entity:n,avatarClassName:a.entityAvatar}),t);return r().createElement(dp,{value:l,tooltip:t,className:c()(a.profileCell,o),onClick:()=>i(n.uri)})}));function hp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fp(e,t,n[t])}))}return e}function fp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gp=e=>{let{connection:t,onConnectionChange:r,relatedEntity:i}=e;const a=(0,o.useSelector)(b().selectors.getMetadata),l=(0,n.useCallback)((e=>r(hp({},t,{relation:e}))),[t,r]),s=(0,n.useCallback)((0,u.pipe)((0,Fo.addEntityAttributes)(t.relation),l),[t.relation,l]),c=(0,n.useCallback)((0,u.pipe)((0,Fo.changeEntityAttribute)(t.relation),l),[t.relation,l]),d=(0,n.useCallback)((0,u.pipe)((0,Fo.removeEntityAttribute)(t.relation),l),[t.relation,l]),p=(0,n.useCallback)((e=>{let{type:n,direction:o}=e;const l={entity:t.entity&&(0,Fo.isAvailableRelationBetweenEntities)(o===Fo.Directions.OUT,t.entity,i,a,(0,Fo.getRelationType)(a,n))?t.entity:null,relation:hp({},t.relation,{attributes:{},type:n,direction:o})};r(l)}),[t,r,i,a]);return{onAddAttributes:s,onChangeAttribute:c,onRemoveAttribute:d,onChangeEntity:(0,n.useCallback)((e=>r(hp({},t,{entity:e}))),[t,r]),onChangeRelationType:p}},mp=(0,i.makeStyles)({item:{marginBottom:"16px"},dense:{marginBottom:0}}),yp="1px solid #AFD4E9",vp=(0,i.makeStyles)({decorator:{marginLeft:8,borderLeft:yp,"&:last-child":{borderLeft:"none","&:before":{borderLeft:yp}},"&:before":{top:0,height:14,width:5,borderBottom:yp,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),bp=e=>{let{className:t,children:n,plain:o=!1,enabled:i=!1}=e;const a=vp();return i?r().createElement("div",{className:c()(a.decorator,{[a.plain]:o},t)},r().createElement("div",{className:a.wrapper},n)):r().createElement(r().Fragment,null,n)},xp=(0,i.makeStyles)((e=>({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"},caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}}))),wp=e=>{let{className:t,message:n}=e;const o=xp();return n?r().createElement(R(),{variant:"caption",className:c()(o.caption,t)},n):null},Sp=(0,i.makeStyles)({mark:{color:"red"}}),Ep=()=>{const e=Sp();return r().createElement("span",{className:e.mark},"*")},Op=(0,i.makeStyles)({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"15px"}});function Cp(){return Cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cp.apply(this,arguments)}const _p=e=>{let{label:t,isRequired:n,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","isRequired","className"]);const a=Op();return r().createElement(R(),Cp({className:c()(a.label,o),component:"span"},i),t,n&&r().createElement(Ep,null))},kp=window["material-ui"].Chip;var Tp=h.n(kp);const Pp=r().createContext("");Pp.displayName="SearchValueContext";const Mp=(0,i.makeStyles)({highlight:{fontWeight:600}}),Rp=e=>{let{text:t,highlight:n,className:o,multiTerm:i=!1}=e;const a=Mp();if(!t||!n)return r().createElement(r().Fragment,null,t);const l=new RegExp(/\s+/),s=(0,u.pipe)(u.trim,(0,u.split)(l),(0,u.map)(u.toLower),(0,u.sort)(u.ascend),u.reverse),c=i?s(n):[(0,u.toLower)(n)],d=c.map((e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))),p=t.split(new RegExp(`(${d.join("|")})`,"gi"));return r().createElement("span",null,p.map(((e,t)=>c.includes(e.toLocaleLowerCase())?r().createElement("span",{key:t,className:o||a.highlight},e):e)))},Ip=(0,i.makeStyles)({highlightedText:{background:"rgb(255, 235, 203)"}}),Dp=e=>{let{text:t}=e;const o=Ip(),i=(0,n.useContext)(Pp);return r().createElement(Rp,{text:t,highlight:i,className:o.highlightedText,multiTerm:!0})},Ap=e=>{let{value:t=null,dataTypeDefinition:n,rich:i=!0}=e;const a=(0,o.useSelector)(b().selectors.getAttributePresentations),l=No().localeData().longDateFormat("L"),s=No().localeData().longDateFormat("LTS"),c=(0,o.useSelector)(b().selectors.getDateMask)||l,u=(0,o.useSelector)(b().selectors.getDateTimeMask)||l+" "+s,d=(0,Fo.formatDataTypeValue)({attributePresentations:a,dataTypeDefinition:n,dateMask:c,dateTimeMask:u},t);return i&&(0,Fo.isAttributeValueLink)(n,t)?r().createElement(hl(),{target:"_blank",href:(0,Fo.addProtocolToLink)(d),underline:"none"},r().createElement(Dp,{text:d})):r().createElement(Dp,{text:d})};Ap.propTypes={value:l().any,dataTypeDefinition:l().object,rich:l().bool};const Lp=Ap,Np=r().createContext(null);Np.displayName="EntityContext";const jp=(0,i.makeStyles)((e=>({container:{height:"16px",borderColor:(0,i.fade)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}}))),zp=Oi(Tp()),Fp=e=>{let{className:t,attributeType:i,nonOvValues:a=[],nonOvTotal:l}=e;const s=jp(),u=(0,o.useDispatch)(),d=((e,t)=>{var n;const r=null==t||null===(n=t[0])||void 0===n?void 0:n.uri,o=r?(0,Fo.getEntityUriFromAttributeUri)(r):null;return o&&(0,Fo.isEntityUri)(o)?o:null==e?void 0:e.uri})((0,n.useContext)(Np),a),p=(0,n.useCallback)((()=>{u(v.ui.actions.openEntity({uri:d,viewId:null,screen:"sources"}))}),[u,d]);if(!l)return null;const h=a.length?a.map(((e,t)=>r().createElement("div",{key:t},(0,Fo.isComplexAttribute)(i)?(0,Fo.getLabel)(e.label):r().createElement(Lp,{value:(0,Fo.getAttributeValue)(e),dataTypeDefinition:(0,Fo.getAttrDataTypeDefinition)(i),rich:!1})))):null;return r().createElement(zp,{tooltipTitle:h,tooltipPlacement:"bottom",label:`+ ${l}`,variant:"outlined",onClick:d?p:void 0,classes:{root:c()(s.container,t),label:s.label}})};var Bp=h(6971);const Wp=(0,i.makeStyles)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}}),Up=e=>{let{onClick:t}=e;const n=Wp();return r().createElement(hl(),{component:"button",variant:"caption",className:n.link,onClick:t,underline:"none"},r().createElement(Bp.Z,{className:n["svg-icon__root"]}),p().text("Show less"))};var Hp=h(4426);const Vp=e=>{let{moreNumber:t,valueNumber:n,onClick:o}=e;const i=Wp();return r().createElement(hl(),{component:"button",variant:"caption",className:i.link,onClick:o,underline:"none"},r().createElement(Hp.Z,{className:i["svg-icon__root"]}),t&&n?p().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:t,valueNumber:n}):p().text("Show more"))};var Gp=h(5549),qp=h(2983);function Yp(){return Yp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yp.apply(this,arguments)}const Kp=e=>{let{value:t,onChange:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","onChange"]);return r().createElement(fs(),Yp({},o,{checked:t,onChange:n&&(0,u.pipe)(Sl,n)}))};Kp.propTypes={onChange:l().func,value:l().bool};const $p=Kp,Zp=window["material-ui"].FormControlLabel;var Xp=h.n(Zp);const Qp=(0,i.makeStyles)((e=>({checkbox_primary:{color:e.palette.divider},label:{color:e.palette.text.secondary}}))),Jp=e=>{let{value:t,onChange:n,className:o}=e;const i=Qp();return r().createElement("div",{className:o},r().createElement(Xp(),{classes:{label:i.label},control:r().createElement($p,{classes:{root:i.checkbox_primary},color:"primary",value:!(0,u.isNil)(t)&&!!t,onChange:n}),label:p().text("Yes")}),r().createElement(Xp(),{classes:{label:i.label},control:r().createElement($p,{classes:{root:i.checkbox_primary},color:"primary",value:!(0,u.isNil)(t)&&!t,onChange:n&&(0,u.pipe)(u.not,n)}),label:p().text("No")}))};Jp.propTypes={value:l().bool,onChange:l().func,className:l().string};const eh=Jp;function th(){return th=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},th.apply(this,arguments)}const nh=e=>r().createElement("svg",th({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),rh=(0,i.makeStyles)((e=>({icon:{color:e.palette.text.secondary},iconButtonRoot:{padding:8},underline:{"&:after":{transform:"scaleX(1)"}},inputLabel:{color:e.palette.primary.main},adornedEnd:{paddingRight:4},adornmentPositionEnd:{marginLeft:"-10px"},inputRoot:{fontSize:"14px",letterSpacing:0,lineHeight:"16px",overflow:"hidden"}})));function oh(){return oh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oh.apply(this,arguments)}function ih(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ah(e,t,n[t])}))}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lh=No().localeData().longDateFormat("L"),sh=e=>{var t;let{value:o=null,label:i,variant:a="filled",onChange:l,InputProps:s={},InputLabelProps:d={},onBlur:h=El,onFocus:f=El}=e,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","variant","onChange","InputProps","InputLabelProps","onBlur","onFocus"]);const m=rh(),[y,v]=(0,n.useState)(!1);return r().createElement(vo,oh({format:lh,variant:"inline",invalidDateMessage:p().text("Invalid Date Format"),maxDateMessage:p().text("Date should not be after maximal date"),minDateMessage:p().text("Date should not be before minimal date"),inputVariant:a,autoOk:!0,onBlur:h,onFocus:f,InputAdornmentProps:{position:"end",classes:{positionEnd:m.adornmentPositionEnd}},KeyboardButtonProps:{classes:{root:m.iconButtonRoot},onKeyPress:(0,u.invoker)(0,"stopPropagation")},keyboardIcon:r().createElement(nh,{className:m.icon}),onChange:(0,Fo.debounce)((0,u.when)(Fo.utils.dates.isValidMomentDateOrNull,(0,u.pipe)(Fo.utils.dates.momentToDate,Fo.utils.dates.clearDateTime,l)),0),label:i,"aria-label":i,value:o,placeholder:p().text(lh),onClose:()=>v(!1),onOpen:()=>v(!0),InputProps:ih({classes:{root:m.inputRoot,underline:c()({[m.underline]:y}),adornedEnd:m.adornedEnd},disableUnderline:(0,u.isNil)(o)},s),PopoverProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},InputLabelProps:ih({classes:ih({root:c()({[m.inputLabel]:y},null==d||null===(t=d.classes)||void 0===t?void 0:t.root)},null==d?void 0:d.classes),shrink:!(0,u.isNil)(i)},d)},g))};var ch=h(8281);const uh=(0,i.makeStyles)({multiSelect:{padding:"3px 48px 3px 8px !important",minHeight:"34px !important"},chips:{display:"flex",flexWrap:"wrap"}}),dh=l().oneOfType([l().string,l().number,l().object]),ph=l().shape({value:dh.isRequired,label:l().string}),hh=l().shape({label:l().string.isRequired,values:l().arrayOf(l().object).isRequired}),fh=(l().shape({id:l().string,label:l().string,dataTypeDefinition:l().object,resizable:l().bool,sortable:l().bool,filterable:l().bool,headCellRenderer:l().func,rowCellValueRenderer:l().func,nestedPath:l().arrayOf(l().string)}),l().shape({field:l().string,order:Fo.SortOrderType}),l().shape({value:l().oneOfType([Fo.FilterValueType,l().arrayOf(Fo.FilterValueType)]),filter:l().string}),l().arrayOf(l().shape({id:l().string,label:l().string,dataTypeDefinition:l().object}))),gh=l().arrayOf(l().shape({id:l().string,label:l().string,columns:fh})),mh=(l().oneOfType([fh,gh]),l().shape({title:l().string,pathToTitle:l().arrayOf(l().string),fieldName:l().string,entityTypeUri:l().string,attrType:Fo.AttributeTypeType,uri:l().string,groupName:l().string})),yh=(l().shape({id:l().oneOfType([l().number,l().string]),values:l().array,data:mh,filter:l().string,operator:l().string}),(0,i.makeStyles)({root:{height:"28px",backgroundColor:"rgba(43, 152, 240, 0.12)",maxWidth:"calc(100% - 4px)",margin:"2px"},deleteIcon:{height:18,width:18,color:"rgba(0,0,0,0.38)",marginRight:"8px"},label:{overflow:"hidden"}})),vh=(0,i.makeStyles)((e=>({container:{display:"flex",alignItems:"center",width:"100%"},label:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},count:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginLeft:8}})));function bh(){return bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bh.apply(this,arguments)}const xh=e=>{let{classes:t={},label:n,count:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes","label","count"]);const a=yh(),l=vh();return r().createElement(Tp(),bh({classes:Cl(t,a),label:r().createElement("div",{className:l.container},r().createElement(al,{value:n},r().createElement("div",{className:l.label},n)),o&&r().createElement("div",{className:l.count},o))},i))};xh.propTypes={classes:l().object,label:l().string,count:l().string};const wh=xh;function Sh(){return Sh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sh.apply(this,arguments)}function Eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Oh(e,t,n[t])}))}return e}function Oh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ch=e=>{let{multiple:t,value:n,children:o,getValueLabel:i=El,getValuePlaceholder:a=u.identity,onChange:l=El,fullWidth:s,TextFieldProps:d,MenuProps:p,classes:h}=e,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","children","getValueLabel","getValuePlaceholder","onChange","fullWidth","TextFieldProps","MenuProps","classes"]);const g=uh();return r().createElement(kn(),Sh({select:!0,fullWidth:s},d,{value:(0,u.defaultTo)(t?[]:"",n),onChange:(0,u.pipe)(wl,l),SelectProps:Eh({},f,{MenuProps:Eh({getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}},p),classes:Eh({},h,{root:c()({[g.multiSelect]:t},(0,u.prop)("root",h))}),multiple:t,renderValue:e=>t?r().createElement("div",{className:g.chips},e.map(((t,n)=>r().createElement(wh,{key:t,label:i(t)||a(t),onMouseDown:e=>e.stopPropagation(),onDelete:()=>l((0,u.remove)(n,1,e))})))):i(e)||a(e)})}),o)};Ch.propTypes={multiple:l().bool,fullWidth:l().bool,value:l().oneOfType([dh,l().arrayOf(dh)]),TextFieldProps:l().object,MenuProps:l().object,children:l().node,classes:l().object,onChange:l().func,getValueLabel:l().func,getValuePlaceholder:l().func};const _h=Ch;function kh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Th=(0,u.has)("values"),Ph=(0,u.curry)(((e,t)=>Th(t)?[{label:t.label,depth:e,isGroup:!0},...(0,u.chain)(Ph(e+1),t.values)]:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kh(e,t,n[t])}))}return e}({},t,{depth:e}))),Mh=(0,u.chain)(Ph(0)),Rh=(0,u.curry)(((e,t)=>e.find((e=>{let{isGroup:n,value:r}=e;return!n&&r===t})))),Ih=(0,i.makeStyles)({checkIcon:{transform:"scale(.7)",marginLeft:"-25px",position:"absolute"},emptyLabel:{padding:"4px 16px"}}),Dh={variant:"filled",margin:"dense",hiddenLabel:!0},Ah=(0,i.makeStyles)({filledInputUnderline:{"&:before":{display:"none"}},marginDense:{margin:0}}),Lh=(0,i.makeStyles)({root:{paddingRight:"48px !important"},icon:{right:"12px"}});function Nh(){return Nh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nh.apply(this,arguments)}function jh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zh(e,t,n[t])}))}return e}function zh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fh=e=>{let{value:t,entries:n,classes:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","entries","classes"]);const a=Mh(n),l=(0,u.isNil)(t)?[]:(0,Fo.wrapInArrayIfNeeded)(t),s=Ih(),d=Lh();return r().createElement(_h,Nh({MenuProps:{disableAutoFocusItem:!0},classes:jh({},o,{root:c()(d.root,(0,u.prop)("root",o)),icon:c()(d.icon,(0,u.prop)("icon",o))})},i,{value:t,getValueLabel:(0,u.pipe)(Rh(a),(0,u.prop)("label"))}),a.length>0?a.map(((e,t)=>{let{value:n,label:o,depth:i,isGroup:a}=e;return r().createElement(ms(),{key:t,disabled:a,value:n,style:{paddingLeft:25*(i+1)+"px"}},l.includes(n)&&r().createElement(ch.Z,{className:s.checkIcon}),o||n.toString())})):r().createElement(ms(),{className:s.emptyLabel,disabled:!0},p().text("No results found")))};Fh.propTypes={value:l().oneOfType([dh,l().arrayOf(dh)]),entries:l().arrayOf(l().oneOfType([ph,hh])).isRequired,classes:l().object};const Bh=(0,u.curry)(((e,t)=>{const[n,...r]=t.split(e);return[n,r.join(e)]})),Wh=(0,u.useWith)(u.path,[Bh(".")]),Uh=(0,u.ascend)((0,u.prop)("label"));function Hh(){return Hh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hh.apply(this,arguments)}function Vh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Gh=e=>{let{multiple:t,value:o,lookupCode:i,lookups:a,onChange:l,getLookups:s}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","lookupCode","lookups","onChange","getLookups"]);const d=e=>({lookupCode:e,value:(0,u.path)([i,e,"displayName"],a)});(0,n.useEffect)((()=>{(0,u.isEmpty)(a)&&s&&s()}),[a,s]);const p=((e,t)=>{const n=e=>{const{parent:r}=Wh(e,t);return r?n(r).concat(e):[e]},r=e=>{let[n,r]=e;const i=Wh(n,t),[,a]=Bh(".",n),l=(0,Fo.getLookupLabel)(a,i.displayName);return i===r?{label:l,value:a}:{label:l,values:o(r)}},o=e=>Object.entries(e).map(r).sort(Uh),i=Object.entries(t[e]||[]).reduce(((t,r)=>{let[o,i]=r;return(0,u.assocPath)(n(`${e}.${o}`),i,t)}),{});return o(i)})(i,a),h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vh(e,t,n[t])}))}return e}({},c,{multiple:t,entries:p});return o=(0,u.defaultTo)(t?[]:{},o),t?r().createElement(Fh,Hh({},h,{value:(0,u.pluck)("lookupCode",o),getValuePlaceholder:e=>o.find((0,u.propEq)("lookupCode",e)).value,onChange:(0,u.pipe)((0,u.map)(d),l)})):r().createElement(Fh,Hh({},h,{value:(0,u.prop)("lookupCode",o),getValuePlaceholder:(0,u.always)((0,u.prop)("value",o)),onChange:(0,u.pipe)(d,l)}))};Gh.propTypes={multiple:l().bool,value:l().oneOfType([Fo.LookupValueType,l().arrayOf(Fo.LookupValueType)]),lookupCode:l().string.isRequired,lookups:l().objectOf(l().objectOf(Fo.SimpleLookupType)).isRequired,onChange:l().func,getLookups:l().func};const qh=Gh;function Yh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kh(){return Kh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kh.apply(this,arguments)}function $h(e){return $h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$h(e)}function Zh(e,t){return Zh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zh(e,t)}function Xh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qh(){}function Jh(){}Jh.resetWarningCache=Qh;var ef=function(e,t){return function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Jh,resetWarningCache:Qh};return n.PropTypes=n,n}()}(t={exports:{}}),t.exports}();function tf(){}function nf(e){return!!(e||"").match(/\d/)}function rf(e){return null==e}function of(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function af(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNagation:n,addNegation:r}}function lf(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function sf(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function cf(e,t,n){return Math.min(Math.max(e,t),n)}function uf(e){return Math.max(e.selectionStart,e.selectionEnd)}var df={thousandSeparator:ef.oneOfType([ef.string,ef.oneOf([!0])]),decimalSeparator:ef.string,allowedDecimalSeparators:ef.arrayOf(ef.string),thousandsGroupStyle:ef.oneOf(["thousand","lakh","wan"]),decimalScale:ef.number,fixedDecimalScale:ef.bool,displayType:ef.oneOf(["input","text"]),prefix:ef.string,suffix:ef.string,format:ef.oneOfType([ef.string,ef.func]),removeFormatting:ef.func,mask:ef.oneOfType([ef.string,ef.arrayOf(ef.string)]),value:ef.oneOfType([ef.number,ef.string]),defaultValue:ef.oneOfType([ef.number,ef.string]),isNumericString:ef.bool,customInput:ef.elementType,allowNegative:ef.bool,allowEmptyFormatting:ef.bool,allowLeadingZeros:ef.bool,onValueChange:ef.func,onKeyDown:ef.func,onMouseUp:ef.func,onChange:ef.func,onFocus:ef.func,onBlur:ef.func,type:ef.oneOf(["text","tel","password"]),isAllowed:ef.func,renderText:ef.func,getInputRef:ef.oneOfType([ef.func,ef.shape({current:ef.any})])},pf={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:tf,onChange:tf,onKeyDown:tf,onMouseUp:tf,onFocus:tf,onBlur:tf,isAllowed:function(){return!0}},hf=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Xh(e):t}(this,$h(t).call(this,e));var r=e.defaultValue;n.validateProps();var o=n.formatValueProp(r);return n.state={value:o,numAsString:n.removeFormatting(o),mounted:!1},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(Xh(n)),n.onKeyDown=n.onKeyDown.bind(Xh(n)),n.onMouseUp=n.onMouseUp.bind(Xh(n)),n.onFocus=n.onFocus.bind(Xh(n)),n.onBlur=n.onBlur.bind(Xh(n)),n}var n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zh(e,t)}(t,e),n=t,o=[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,a=void 0===i?"":i;if(e!==t){this.validateProps();var l=this.formatNumString(a),s=rf(t.value)?l:this.formatValueProp(),c=this.removeFormatting(s),u=parseFloat(c),d=parseFloat(a);(isNaN(u)&&isNaN(d)||u===d)&&l===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:c,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(of(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+of(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){sf(e,t),setTimeout((function(){e.value===n&&sf(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=cf(t,0,e.length),!a){var l="-"===e[0];return cf(t,o.length+(l?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&nf(e[t]))return t;if("#"===a[t-1]&&nf(e[t-1]))return t;var s=a.indexOf("#");t=cf(t,s,a.lastIndexOf("#")+1);for(var c=a.substring(t,a.length).indexOf("#"),u=t,d=t+(-1===c?0:c);u>s&&("#"!==a[u]||!nf(e[u]));)u-=1;return!nf(e[d])||"left"===n&&t!==s||t-u<d-t?nf(e[u])?u+1:u:d}},{key:"getCaretPosition",value:function(e,t,n){var r,o,i=this.props.format,a=this.state.value,l=this.getNumberRegex(!0),s=(e.match(l)||[]).join(""),c=(t.match(l)||[]).join("");for(r=0,o=0;o<n;o++){var u=e[o]||"",d=t[r]||"";if((u.match(l)||u===d)&&("0"!==u||!d.match(l)||"0"===d||s.length===c.length)){for(;u!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||a||(r=t.length),this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",l=o===i?e.length:e.indexOf(a,n);if(-1===l){r=e;break}r+=e.substring(n,l),n=l+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,l=t.thousandsGroupStyle,s=this.getSeparators(),c=s.thousandSeparator,u=s.decimalSeparator,d=-1!==e.indexOf(".")||n&&r,p=af(e,a),h=p.beforeDecimal,f=p.afterDecimal,g=p.addNegation;return void 0!==n&&(f=lf(f,n,r)),c&&(h=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(h,c,l)),o&&(h=o+h),i&&(f+=i),g&&(h="-"+h),h+(d&&u||"")+f}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,l=a.value,s=a.isNumericString,c=!(l=rf(l)?e:l)&&0!==l;return c&&i&&(l=""),c&&!i?"":("number"==typeof l&&(l=l.toString(),s=!0),"Infinity"===l&&s&&(l=""),s&&!n&&"number"==typeof r&&(l=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=af(e),i=o.beforeDecimal,a=o.afterDecimal,l=o.hasNagation,s=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),c=i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),u=lf(s[1]||"",Math.min(t,a.length),n),d=r?".":"";return"".concat(l?"-":"").concat(c).concat(d).concat(u)}(l,r,o)),s?this.formatNumString(l):this.formatInput(l))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,a=n.decimalScale,l=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||a&&l&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,i=r.allowNegative,a=r.prefix,l=r.suffix,s=r.decimalScale,c=this.getSeparators(),u=c.allowedDecimalSeparators,d=c.decimalSeparator,p=this.state.numAsString||"",h=this.selectionBeforeInput,f=h.selectionStart,g=h.selectionEnd,m=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),y=m.start,v=m.end;if(!o&&y===v&&-1!==u.indexOf(n[f])){var b=0===s?"":d;return n.substr(0,f)+b+n.substr(f+1,n.length)}var x=o?0:a.length,w=t.length-(o?0:l.length);if(n.length>t.length||!n.length||y===v||0===f&&g===t.length||f===x&&g===w)return n;if(this.checkIfFormatGotDeleted(y,v,t)&&(n=t),!o){var S=this.removeFormatting(n),E=af(S,i),O=E.beforeDecimal,C=E.afterDecimal,_=E.addNegation,k=e<n.indexOf(d)+1;if(S.length<p.length&&k&&""===O&&!parseFloat(C))return _?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,i=e.numAsString,a=e.caretPos,l=this.props.onValueChange,s=this.state.value;if(n)if(o){if(!a){var c=e.inputValue||n.value,u=uf(n);n.value=t,a=this.getCaretPosition(c,t,u)}this.setPatchedCaretPosition(n,a,t)}else n.value=t;void 0===i&&(i=this.removeFormatting(t)),t!==s&&(this.setState({value:t,numAsString:i}),l(this.getValueObject(t,i)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,i=o.isAllowed,a=r.value||"",l=uf(t);n=this.correctInputValue(l,a,n);var s=this.formatInput(n)||"",c=this.removeFormatting(s);i(this.getValueObject(s,c))||(s=a),this.updateValue({formattedValue:s,numAsString:c,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=n.numAsString,l=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(a));var s=this.formatNumString(a);if(s!==l)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value,l=void 0===a?"":a,s=this.props,c=s.decimalScale,u=s.fixedDecimalScale,d=s.prefix,p=s.suffix,h=s.format,f=s.onKeyDown,g=void 0!==c&&u,m=this.getNumberRegex(!1,g),y=new RegExp("-"),v="string"==typeof h;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===i){var b=t,x=v?h.indexOf("#"):d.length,w=v?h.lastIndexOf("#")+1:l.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var S="ArrowLeft"===r?"left":"right";b=this.correctCaretPosition(l,t,S)}else if("Delete"!==r||m.test(l[t])||y.test(l[t])){if("Backspace"===r&&!m.test(l[t]))if(o<=x+1&&"-"===l[0]&&void 0===h){var E=l.substring(1);this.updateValue({formattedValue:E,caretPos:b,input:n})}else if(!y.test(l[t])){for(;!m.test(l[b-1])&&b>x;)b--;b=this.correctCaretPosition(l,b,"left")}}else for(;!m.test(l[b])&&b<w;)b++;(b!==t||t<x||t>w)&&(e.preventDefault(),this.setPatchedCaretPosition(n,b,l)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,b,l),f(e)}else f(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(i,n);a!==n&&this.setPatchedCaretPosition(t,a,i)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,a=void 0===i?"":i,l=t.correctCaretPosition(a,r);l===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,l,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,o=this.props,i=o.type,a=o.displayType,l=o.customInput,s=o.renderText,c=o.getInputRef,u=o.format,d=this.state,p=d.value,h=d.mounted,f=(e=this.props,t=df,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),g=h&&function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(u)?"numeric":void 0,m=Kh({inputMode:g},f,{type:i,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return s?s(p)||null:r().createElement("span",Kh({},f,{ref:c}),p);if(l){var y=l;return r().createElement(y,Kh({},m,{ref:c}))}return r().createElement("input",Kh({},m,{ref:c}))}}],o&&Yh(n.prototype,o),t}(r().Component);hf.propTypes=df,hf.defaultProps=pf;const ff=hf;var gf=h(8726);const mf=(0,i.makeStyles)({inputRoot:{flexWrap:"wrap"},autosizeInput:{width:"auto",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}}});function yf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vf(e,t,n[t])}))}return e}function vf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(){return bf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bf.apply(this,arguments)}function xf(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const wf=e=>{let{CustomInputComponent:t}=e,n=xf(e,["CustomInputComponent"]);return t?r().createElement(t,bf({},n,{customInput:gf.Z})):r().createElement(gf.Z,n)};wf.propTypes={CustomInputComponent:l().elementType};const Sf=p().text("Press Enter to add. You may enter multiple values"),Ef=(0,u.pipe)(u.trim,u.isEmpty),Of=e=>{let{values:t=[],InputProps:o={},inputProps:i={},classes:a={},onChange:l=El,getValueLabel:s=u.identity}=e,d=xf(e,["values","InputProps","inputProps","classes","onChange","getValueLabel"]);const p=mf(),h=o.classes||{},{root:f}=h,g=xf(h,["root"]),[m,y]=(0,n.useState)(""),v=e=>l((0,u.remove)(e,1,t)),b=t.length>0,x=()=>{var e;Ef(m)||(e=m,l((0,u.uniq)([...t,e])),y(""))},[w,S]=(0,n.useState)(!1),E=!b&&w?Sf:"";return r().createElement(wi(),{title:E},r().createElement(kn(),bf({},d,{classes:{root:a.root},value:m,onChange:(0,u.pipe)(wl,y),InputProps:yf({},o,{startAdornment:t.map(((e,t)=>r().createElement(wh,{key:e,label:s(e),onDelete:()=>v(t)}))),inputComponent:wf,classes:yf({root:c()(p.inputRoot,f),input:c()(p.autosizeInput,g.input)},g)}),inputProps:yf({},i,{CustomInputComponent:o.inputComponent}),onKeyPress:(0,u.when)((0,u.propEq)("key","Enter"),x),onKeyDown:(0,u.when)((0,u.propEq)("keyCode",8),(()=>{""===m&&b&&v(-1)})),onFocus:()=>S(!0),onBlur:(0,u.pipe)(x,(()=>S(!1)))})))};Of.propTypes={values:l().arrayOf(l().string),InputProps:l().shape({classes:l().shape({root:l().string}),inputComponent:l().elementType}),inputProps:l().object,onChange:l().func,classes:l().object,getValueLabel:l().func};const Cf=Of;function _f(){return _f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_f.apply(this,arguments)}const kf=e=>{let{value:t,onChange:o=El,multiline:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","onChange","multiline"]);const[l,s]=(0,n.useState)("");(0,n.useEffect)((()=>{s((0,u.isNil)(t)?"":t)}),[t]);const c=()=>{l!==t&&o(l)};return r().createElement(kn(),_f({},a,{multiline:i,value:l,onKeyPress:(0,u.when)((0,u.propEq)("key","Enter"),(()=>{i||c()})),onBlur:c,onChange:(0,u.pipe)(wl,s)}))};kf.propTypes={value:l().oneOfType([l().string,l().number]),onChange:l().func,multiline:l().bool,InputProps:l().object,className:l().string};const Tf=kf;function Pf(){return Pf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pf.apply(this,arguments)}const Mf=e=>{let{multiple:t=!1,value:n,getValueLabel:o,multiline:i=!1}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","getValueLabel","multiline"]);return t?r().createElement(Cf,Pf({},a,{values:n,getValueLabel:o})):r().createElement(Tf,Pf({},a,{value:n,multiline:i}))};Mf.propTypes={multiple:l().bool,multiline:l().bool,value:l().oneOfType([l().string,l().arrayOf(l().string),l().number,l().arrayOf(l().number)]),getValueLabel:l().func};const Rf=Mf;function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Df(e,t,n[t])}))}return e}function Df(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Af(){return Af=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Af.apply(this,arguments)}function Lf(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Nf=e=>({2:"lakh",3:"thousand",4:"wan"}[e]),jf=e=>{let{inputRef:t,onChange:n,integer:o,customInput:i,format:a,value:l}=e,s=Lf(e,["inputRef","onChange","integer","customInput","format","value"]);const c=a||{},{strategy:u,groupSize:d}=c,p=Lf(c,["strategy","groupSize"]);return r().createElement(ff,Af({},s,{value:(0,Fo.applyPresentationStrategyToValue)(u,l),thousandsGroupStyle:Nf(d)},p,{getInputRef:t,isNumericString:!0,onValueChange:e=>{n({target:{value:(0,Fo.revertPresentationStrategyForValue)(u,e.value)}})},decimalScale:o?0:void 0,customInput:i}))},zf=e=>{let{integer:t,format:n,inputProps:o,InputProps:i}=e,a=Lf(e,["integer","format","inputProps","InputProps"]);return r().createElement(Rf,Af({},a,{inputProps:If({integer:t,format:n},o),InputProps:If({},i,{inputComponent:jf}),getValueLabel:(0,Fo.formatNumber)(n)}))};var Ff=h(2771),Bf=h(6898);const Wf=(0,i.makeStyles)((e=>({iconButtonRoot:{padding:8},underline:{"&:after":{transform:"scaleX(1)"}},inputLabel:{color:e.palette.primary.main},adornedEnd:{paddingRight:4},inputRoot:{fontSize:"14px",letterSpacing:0,lineHeight:"16px"}})));function Uf(){return Uf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uf.apply(this,arguments)}function Hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vf(e,t,n[t])}))}return e}function Vf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Gf=No().localeData().longDateFormat("L"),qf=No().localeData().longDateFormat("LTS"),Yf=e=>(0,Bf.Pk)((0,Bf.sb)(e,"_"),"_",/[^\dap]+/gi),Kf=e=>{let{value:t=null,label:o,variant:i="filled",onChange:a,InputProps:l,format:s}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","variant","onChange","InputProps","format"]);const h=Wf(),[f,g]=(0,n.useState)(!1),m=s||`${Gf} ${qf}`,y=m&&m.toLowerCase().includes("a"),v=m.replace(/\s[hH]:/,(e=>" "+e[1]+e.trim()));return r().createElement(Ao,Uf({format:v,rifmFormatter:y?Yf(v):void 0,variant:"inline",invalidDateMessage:p().text("Invalid Date Format"),maxDateMessage:p().text("Date should not be after maximal date"),minDateMessage:p().text("Date should not be before minimal date"),inputVariant:i,views:["year","date","hours","minutes","seconds"],autoOk:!0,InputAdornmentProps:{position:"end"},KeyboardButtonProps:{classes:{root:h.iconButtonRoot},onKeyPress:(0,u.invoker)(0,"stopPropagation")},keyboardIcon:r().createElement(Ff.Z,null),onChange:(0,u.when)(Fo.utils.dates.isValidMomentDateOrNull,(0,u.pipe)(Fo.utils.dates.momentToDate,a)),label:o,"aria-label":o,value:t,placeholder:p().text(`${Gf} HH:MM`.toUpperCase()),ampm:y,onClose:()=>g(!1),onOpen:()=>g(!0),InputProps:Hf({classes:{root:h.inputRoot,underline:c()({[h.underline]:f}),adornedEnd:h.adornedEnd},disableUnderline:(0,u.isNil)(t)},l),PopoverProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},InputLabelProps:{classes:{root:f?h.inputLabel:void 0},shrink:!(0,u.isNil)(o)}},d))};var $f=h(359),Zf=h.n($f);function Xf(){return Xf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xf.apply(this,arguments)}const Qf=e=>r().createElement("svg",Xf({width:79,height:68,viewBox:"0 0 79 68",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("path",{d:"M24.889 40.444V22.556H3.603v-2.334H24.89V3.89h2.333v16.333h23.334V3.89h2.333v16.333h18.157v2.334H52.889v17.888h18.157v2.334H52.889v17.396h-2.333V42.778H27.222v17.396H24.89V42.778H3.603v-2.334H24.89zm2.333 0h23.334V22.556H27.222v17.888z",fill:"#D2DEDE",opacity:.2}),r().createElement("path",{d:"M68.725 3.889H3.889v29.814l13.413-14.36 14.399 6.347 11.265-7.467h16.633l9.126-14.334zm2.053 4.016l-9.044 14.207H44.138l-12.06 7.994-13.818-6.091L3.889 39.4V59.89h66.889V7.905zM3 0h68.667a3 3 0 013 3v57.778a3 3 0 01-3 3H3a3 3 0 01-3-3V3a3 3 0 013-3z",fill:"#D2DEDE",opacity:.5}),r().createElement("path",{d:"M66.732 52.044H64.79l-.689-.664a15.91 15.91 0 003.86-10.4c0-8.826-7.154-15.98-15.98-15.98C43.154 25 36 32.154 36 40.98c0 8.827 7.154 15.981 15.98 15.981a15.91 15.91 0 0010.4-3.86l.664.689v1.942L75.337 68 79 64.337 66.732 52.044zM52 52c-6.087 0-11-4.913-11-11s4.913-11 11-11 11 4.913 11 11-4.913 11-11 11z",fill:"#B5C8C9",fillRule:"nonzero"}))),Jf=(0,i.makeStyles)({container:{display:"flex",flexShrink:0,alignItems:"center",height:"36px","& $smallIcon":{height:"24px",width:"28px",paddingRight:"10px",paddingLeft:"2px"},"& $text":{height:"14px",color:"#707F80",fontSize:"12px",lineHeight:"14px"}},smallIcon:{},text:{}});function eg(){return eg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eg.apply(this,arguments)}const tg=e=>{let{className:t,message:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","message"]);const i=Jf();return r().createElement("div",eg({className:c()(i.container,t)},o),r().createElement(Qf,{className:i.smallIcon}),r().createElement("div",{className:i.text},n))};function ng(){return ng=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ng.apply(this,arguments)}const rg=e=>r().createElement(tg,ng({message:p().text("No results found")},e)),og=(0,i.makeStyles)({"typeahead__suggestions-placeholder":{padding:"8px 16px",textAlign:"center"},"typeahead__suggestions-container--open":{maxHeight:"230px",overflowY:"auto"},"typeahead__suggestions-list":{margin:0,padding:0,listStyleType:"none"},"typeahead__suggestions-menuItem":{color:"rgba(0,0,0,0.87)",fontSize:"14px"},input__root:{color:"rgba(0,0,0,0.87)",fontSize:"14px"},autosizeInput:{width:"auto",paddingTop:"10px",paddingBottom:"11px",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}},rawInput:{height:"19px"},"multiple-input__root":{flexWrap:"wrap",color:"rgba(0,0,0,0.87)",fontSize:"14px"},"multiple-input__input":{flex:"1 0 25px",flexWrap:"wrap"},"multiple-input__adornedStart":{paddingLeft:"8px"},input__underline:{"&:before":{display:"none"}},"typeahead__suggestions-container":{width:"100%"},"menuItem--item":{overflow:"hidden",textOverflow:"ellipsis",display:"block"}});var ig=44,ag=n.forwardRef((function(e,t){var r=e.classes,o=e.className,i=e.color,a=void 0===i?"primary":i,l=e.disableShrink,s=void 0!==l&&l,c=e.size,u=void 0===c?40:c,d=e.style,p=e.thickness,h=void 0===p?3.6:p,f=e.value,g=void 0===f?0:f,m=e.variant,y=void 0===m?"indeterminate":m,v=ve(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),b={},x={},w={};if("determinate"===y||"static"===y){var S=2*Math.PI*((ig-h)/2);b.strokeDasharray=S.toFixed(3),w["aria-valuenow"]=Math.round(g),b.strokeDashoffset="".concat(((100-g)/100*S).toFixed(3),"px"),x.transform="rotate(-90deg)"}return n.createElement("div",F({className:P(r.root,o,"inherit"!==a&&r["color".concat(cn(a))],{determinate:r.determinate,indeterminate:r.indeterminate,static:r.static}[y]),style:F({width:u,height:u},x,d),ref:t,role:"progressbar"},w,v),n.createElement("svg",{className:r.svg,viewBox:"".concat(22," ").concat(22," ").concat(ig," ").concat(ig)},n.createElement("circle",{className:P(r.circle,s&&r.circleDisableShrink,{determinate:r.circleDeterminate,indeterminate:r.circleIndeterminate,static:r.circleStatic}[y]),style:b,cx:ig,cy:ig,r:(ig-h)/2,fill:"none",strokeWidth:h})))}));const lg=Dt((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(ag),sg=(0,i.makeStyles)({loadMoreContainer:{display:"flex",height:"32px"},moreButton:{padding:"9px 38px 9px 38px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden"},loadingSpinner:{alignSelf:"center",marginLeft:"40px"}}),cg=e=>{let{loading:t,onClick:n,onMouseDown:o}=e;const i=sg();return r().createElement("div",{className:i.loadMoreContainer},t?r().createElement(lg,{className:i.loadingSpinner,size:24}):r().createElement(D(),{color:"primary",onClick:n,onMouseDown:o,className:i.moreButton},r().createElement("div",{className:i.buttonLabel},p().text("Load more"))))};function ug(){return ug=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ug.apply(this,arguments)}function dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pg(e,t,n[t])}))}return e}function pg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hg(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const fg=50,gg=e=>{let{value:t,max:o=fg,getSuggestions:i,onChange:a,multiple:l,fullWidth:s,InputProps:d={}}=e,p=hg(e,["value","max","getSuggestions","onChange","multiple","fullWidth","InputProps"]);const[h,f]=(0,n.useState)([]),[g,m]=(0,n.useState)(!1),[y,v]=(0,n.useState)(1),[b,x]=(0,n.useState)(!1),w=o+1,[S,E]=(0,n.useState)("");t=(0,u.defaultTo)(l?[]:"",t);const O=l?S:t;Vl((()=>{v(1)}),[O]);const C=(0,n.useRef)(),_=og(),k=(0,u.pipe)((0,u.prop)("value"),u.trim,(e=>i(e,w)),(0,u.andThen)((0,u.pipe)((0,u.tap)(f),(0,u.both)(u.isEmpty,(()=>{var e;return(null===(e=C.current)||void 0===e?void 0:e.querySelector("input"))===document.activeElement})),m))),T=()=>{x(!0),i(O,w,y+1).then((0,u.pipe)((0,u.concat)(h),f,(0,u.always)(y+1),v)).finally((()=>{x(!1)}))},P=e=>{e.preventDefault()},M=(0,n.useCallback)((0,Fo.debounce)(k,300),[i]),R=(0,n.useMemo)((()=>h.slice(0,y*o)),[h,y,o]),I=h.length>R.length,[D,A]=(0,n.useState)(!1),L=e=>{let{newValue:n,method:r}=e;switch(r){case"type":l&&E(n);break;case"escape":l?E(n):a(n);break;case"click":case"enter":l?(E(""),n&&a((0,u.uniq)([...t,n]))):a(n)}};return r().createElement(Zf(),{suggestions:R,shouldRenderSuggestions:u.T,inputProps:dg({value:O,onChange:(0,u.pipe)((0,u.nthArg)(1),L),onKeyDown:e=>{13===e.keyCode&&l&&!D&&L({method:"enter",newValue:S})},fullWidth:s},p,{autoComplete:"nope"}),getSuggestionValue:u.identity,onSuggestionsFetchRequested:(0,u.ifElse)((0,u.propEq)("reason","input-changed"),M,k),onSuggestionsClearRequested:(0,u.pipe)((0,u.always)([]),f,u.F,m,(0,u.always)(1),v),renderInputComponent:e=>{let{ref:n,onChange:o}=e,i=hg(e,["ref","onChange"]);const s={underline:c()({[_.input__underline]:(0,Fo.isEmptyValue)(t)}),input:c()(_.rawInput,(0,u.path)(["classes","input"],d))};return l?r().createElement(kn(),ug({},i,{ref:C,inputRef:n,InputProps:dg({},d,{startAdornment:t.map(((e,n)=>r().createElement(wh,{key:e,label:e,onDelete:()=>a((0,u.remove)(n,1,t))}))),inputComponent:gf.Z,classes:dg({root:c()(_["multiple-input__input"],(0,u.path)(["classes","root"],d))},s,{input:c()(_.autosizeInput,s.input),adornedStart:_["multiple-input__adornedStart"]})}),value:S,onChange:o,classes:{root:_["multiple-input__root"]}})):r().createElement(kn(),ug({},i,{ref:C,inputRef:n,value:t,onChange:(0,u.pipe)((0,u.tap)(o),wl,a),InputProps:dg({},d,{classes:dg({root:c()(_.input__root,(0,u.path)(["classes","root"],d))},s)})}))},renderSuggestionsContainer:e=>{let{children:t,containerProps:{ref:n}}=e,o=hg(e.containerProps,["ref"]);return r().createElement(Fu,{anchorEl:C.current,open:Boolean(t)||g},r().createElement(Nn(),ug({ref:n,square:!0},o,{style:{width:(0,u.prop)("clientWidth",C.current)}}),t||r().createElement(rg,{className:_["typeahead__suggestions-placeholder"]}),I&&!g&&r().createElement(cg,{onClick:T,onMouseDown:P,loading:b})))},renderSuggestion:(e,t)=>{let{isHighlighted:n}=t;return r().createElement(ms(),{className:_["typeahead__suggestions-menuItem"],selected:n,component:"div"},r().createElement(al,{value:e},r().createElement("div",{className:_["menuItem--item"]},e)))},theme:{container:s?_["typeahead__suggestions-container"]:"",suggestionsList:_["typeahead__suggestions-list"],suggestionsContainerOpen:_["typeahead__suggestions-container--open"]},onSuggestionHighlighted:(0,u.pipe)((0,u.prop)("suggestion"),Boolean,A)})};gg.propTypes={multiple:l().bool,fullWidth:l().bool,placeholder:l().string,value:l().oneOfType([l().string,l().arrayOf(l().string)]),onChange:l().func.isRequired,getSuggestions:l().func.isRequired,InputProps:l().object,max:l().number};const mg=gg;function yg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bg(e,t,n){return t&&vg(e.prototype,t),n&&vg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}function wg(e,t){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}function Sg(e){return Sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sg(e)}var Eg=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();const Og=function(e){function t(e,r,s,c,p){for(var h,f,g,m,x,S=0,E=0,O=0,C=0,_=0,I=0,A=g=h=0,N=0,j=0,z=0,F=0,B=s.length,W=B-1,U="",H="",V="",G="";N<B;){if(f=s.charCodeAt(N),N===W&&0!==E+C+O+S&&(0!==E&&(f=47===E?10:47),C=O=S=0,B++,W++),0===E+C+O+S){if(N===W&&(0<j&&(U=U.replace(d,"")),0<U.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:U+=s.charAt(N)}f=59}switch(f){case 123:for(h=(U=U.trim()).charCodeAt(0),g=1,F=++N;N<B;){switch(f=s.charCodeAt(N)){case 123:g++;break;case 125:g--;break;case 47:switch(f=s.charCodeAt(N+1)){case 42:case 47:e:{for(A=N+1;A<W;++A)switch(s.charCodeAt(A)){case 47:if(42===f&&42===s.charCodeAt(A-1)&&N+2!==A){N=A+1;break e}break;case 10:if(47===f){N=A+1;break e}}N=A}}break;case 91:f++;case 40:f++;case 34:case 39:for(;N++<W&&s.charCodeAt(N)!==f;);}if(0===g)break;N++}if(g=s.substring(F,N),0===h&&(h=(U=U.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<j&&(U=U.replace(d,"")),f=U.charCodeAt(1)){case 100:case 109:case 115:case 45:j=r;break;default:j=R}if(F=(g=t(r,j,g,f,p+1)).length,0<D&&(x=l(3,g,j=n(R,U,z),r,T,k,F,f,p,c),U=j.join(""),void 0!==x&&0===(F=(g=x.trim()).length)&&(f=0,g="")),0<F)switch(f){case 115:U=U.replace(w,a);case 100:case 109:case 45:g=U+"{"+g+"}";break;case 107:g=(U=U.replace(y,"$1 $2"))+"{"+g+"}",g=1===M||2===M&&i("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=U+g,112===c&&(H+=g,g="")}else g=""}else g=t(r,n(r,U,z),g,c,p+1);V+=g,g=z=j=A=h=0,U="",f=s.charCodeAt(++N);break;case 125:case 59:if(1<(F=(U=(0<j?U.replace(d,""):U).trim()).length))switch(0===A&&(h=U.charCodeAt(0),45===h||96<h&&123>h)&&(F=(U=U.replace(" ",":")).length),0<D&&void 0!==(x=l(1,U,r,e,T,k,H.length,c,p,c))&&0===(F=(U=x.trim()).length)&&(U="\0\0"),h=U.charCodeAt(0),f=U.charCodeAt(1),h){case 0:break;case 64:if(105===f||99===f){G+=U+s.charAt(N);break}default:58!==U.charCodeAt(F-1)&&(H+=o(U,h,f,U.charCodeAt(2)))}z=j=A=h=0,U="",f=s.charCodeAt(++N)}}switch(f){case 13:case 10:47===E?E=0:0===1+h&&107!==c&&0<U.length&&(j=1,U+="\0"),0<D*L&&l(0,U,r,e,T,k,H.length,c,p,c),k=1,T++;break;case 59:case 125:if(0===E+C+O+S){k++;break}default:switch(k++,m=s.charAt(N),f){case 9:case 32:if(0===C+S+E)switch(_){case 44:case 58:case 9:case 32:m="";break;default:32!==f&&(m=" ")}break;case 0:m="\\0";break;case 12:m="\\f";break;case 11:m="\\v";break;case 38:0===C+E+S&&(j=z=1,m="\f"+m);break;case 108:if(0===C+E+S+P&&0<A)switch(N-A){case 2:112===_&&58===s.charCodeAt(N-3)&&(P=_);case 8:111===I&&(P=I)}break;case 58:0===C+E+S&&(A=N);break;case 44:0===E+O+C+S&&(j=1,m+="\r");break;case 34:case 39:0===E&&(C=C===f?0:0===C?f:C);break;case 91:0===C+E+O&&S++;break;case 93:0===C+E+O&&S--;break;case 41:0===C+E+S&&O--;break;case 40:0===C+E+S&&(0===h&&(2*_+3*I==533||(h=1)),O++);break;case 64:0===E+O+C+S+A+g&&(g=1);break;case 42:case 47:if(!(0<C+S+O))switch(E){case 0:switch(2*f+3*s.charCodeAt(N+1)){case 235:E=47;break;case 220:F=N,E=42}break;case 42:47===f&&42===_&&F+2!==N&&(33===s.charCodeAt(F+2)&&(H+=s.substring(F,N+1)),m="",E=0)}}0===E&&(U+=m)}I=_,_=f,N++}if(0<(F=H.length)){if(j=r,0<D&&void 0!==(x=l(2,H,j,e,T,k,F,c,p,c))&&0===(H=x).length)return G+H+V;if(H=j.join(",")+"{"+H+"}",0!=M*P){switch(2!==M||i(H,2)||(P=0),P){case 111:H=H.replace(b,":-moz-$1")+H;break;case 112:H=H.replace(v,"::-webkit-input-$1")+H.replace(v,"::-moz-$1")+H.replace(v,":-ms-input-$1")+H}P=0}}return G+H+V}function n(e,t,n){var o=t.trim().split(g);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var l=0;for(e=0===a?"":e[0]+" ";l<i;++l)t[l]=r(e,t[l],n).trim();break;default:var s=l=0;for(t=[];l<i;++l)for(var c=0;c<a;++c)t[s++]=r(e[c]+" ",o[l],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",l=2*t+3*n+4*r;if(944===l){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===M||2===M&&i(s,1)?"-webkit-"+s+s:s}if(0===M||2===M&&!i(a,1))return a;switch(l){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(_,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return h.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(s=a.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(x,"tb");break;case 232:s=a.replace(x,"tb-rl");break;case 220:s=a.replace(x,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,l=(s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<l?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(E,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(E,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),A(2!==t?r:r.replace(O,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function l(e,t,n,r,o,i,a,l,s,u){for(var d,p=0,h=t;p<D;++p)switch(d=I[p].call(c,e,h,n,r,o,i,a,l,s,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function s(e){return void 0!==(e=e.prefix)&&(A=null,e?"function"!=typeof e?M=1:(M=2,A=e):M=0),s}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<D){var o=l(-1,n,r,r,T,k,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var i=t(R,r,n,0,0);return 0<D&&void 0!==(o=l(-2,i,r,r,T,k,i.length,0,0,0))&&(i=o),P=0,k=T=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,g=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,E=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,_=/([^-])(image-set\()/,k=1,T=1,P=0,M=1,R=[],I=[],D=0,A=null,L=0;return c.use=function e(t){switch(t){case void 0:case null:D=I.length=0;break;default:if("function"==typeof t)I[D++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else L=0|!!t}return e},c.set=s,void 0!==e&&s(e),c};var Cg="/*|*/";function _g(e){e&&kg.current.insert(e+"}")}var kg={current:null},Tg=function(e,t,n,r,o,i,a,l,s,c){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return kg.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===l)return t+Cg;break;case 3:switch(l){case 102:case 112:return kg.current.insert(n[0]+t),"";default:return t+(0===c?Cg:"")}case-2:t.split("/*|*/}").forEach(_g)}};function Pg(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var Mg=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0),o=o.next}while(void 0!==o)}};const Rg=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ig={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Dg=/[A-Z]|^ms/g,Ag=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Lg=function(e){return 45===e.charCodeAt(1)},Ng=function(e){return null!=e&&"boolean"!=typeof e},jg=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return Lg(e)?e:e.replace(Dg,"-$&").toLowerCase()})),zg=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ag,(function(e,t,n){return Bg={name:t,styles:n,next:Bg},t}))}return 1===Ig[e]||Lg(e)||"number"!=typeof t||0===t?t:t+"px"};function Fg(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Bg={name:n.name,styles:n.styles,next:Bg},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Bg={name:o.name,styles:o.styles,next:Bg},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Fg(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Ng(a)&&(r+=jg(i)+":"+zg(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Fg(e,t,a,!1);switch(i){case"animation":case"animationName":r+=jg(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var s=0;s<a.length;s++)Ng(a[s])&&(r+=jg(i)+":"+zg(i,a[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=Bg,a=n(e);return Bg=i,Fg(e,t,a,r)}}if(null==t)return n;var l=t[n];return void 0===l||r?n:l}var Bg,Wg=/label:\s*([^\s;\n{]+)\s*;/g,Ug=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Bg=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Fg(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=Fg(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);Wg.lastIndex=0;for(var l,s="";null!==(l=Wg.exec(o));)s+="-"+l[1];return{name:Rg(o)+s,styles:o,next:Bg}},Hg=Object.prototype.hasOwnProperty,Vg=(0,n.createContext)("undefined"!=typeof HTMLElement?function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r,o=new Og(t),i={};r=e.container||document.head;var a,l=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(l,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){i[e]=!0})),e.parentNode!==r&&r.appendChild(e)})),o.use(e.stylisPlugins)(Tg),a=function(e,t,n,r){var i=t.name;kg.current=n,o(e,t.styles),r&&(s.inserted[i]=!0)};var s={key:n,sheet:new Eg({key:n,container:r,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:i,registered:{},insert:a};return s}():null),Gg=(0,n.createContext)({}),qg=(Vg.Provider,function(e){var t=function(t,r){return(0,n.createElement)(Vg.Consumer,null,(function(n){return e(t,n,r)}))};return(0,n.forwardRef)(t)}),Yg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Kg=function(e,t){var n={};for(var r in t)Hg.call(t,r)&&(n[r]=t[r]);return n[Yg]=e,n},$g=function(){return null},Zg=function(e,t,r,o){var i=null===r?t.css:t.css(r);"string"==typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var a=t[Yg],l=[i],s="";"string"==typeof t.className?s=Pg(e.registered,l,t.className):null!=t.className&&(s=t.className+" ");var c=Ug(l);Mg(e,c,"string"==typeof a),s+=e.key+"-"+c.name;var u={};for(var d in t)Hg.call(t,d)&&"css"!==d&&d!==Yg&&(u[d]=t[d]);u.ref=o,u.className=s;var p=(0,n.createElement)(a,u),h=(0,n.createElement)($g,null);return(0,n.createElement)(n.Fragment,null,h,p)},Xg=qg((function(e,t,r){return"function"==typeof e.css?(0,n.createElement)(Gg.Consumer,null,(function(n){return Zg(t,e,n,r)})):Zg(t,e,null,r)}));const Qg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ug(t)};var Jg=function(e,t){var r=arguments;if(null==t||!Hg.call(t,"css"))return n.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Xg,i[1]=Kg(e,t);for(var a=2;a<o;a++)i[a]=r[a];return n.createElement.apply(null,i)},em=(n.Component,function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var l in a="",i)i[l]&&l&&(a&&(a+=" "),a+=l);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o});function tm(e,t,n){var r=[],o=Pg(e,r,n);return r.length<2?n:o+t(r)}var nm=function(){return null},rm=qg((function(e,t){return(0,n.createElement)(Gg.Consumer,null,(function(r){var o=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ug(n,t.registered);return Mg(t,o,!1),t.key+"-"+o.name},i={css:o,cx:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return tm(t.registered,o,em(n))},theme:r},a=e.children(i),l=(0,n.createElement)(nm,null);return(0,n.createElement)(n.Fragment,null,l,a)}))})),om=h(1950),im=function(){};function am(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function lm(e,t,n){var r=[n];if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&r.push("".concat(am(e,o)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var sm=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===be(e)&&null!==e?[e]:[]};function cm(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function um(e){return cm(e)?window.pageYOffset:e.scrollTop}function dm(e,t){cm(e)?window.scrollTo(0,t):e.scrollTop=t}function pm(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:im,o=um(e),i=t-o,a=10,l=0;function s(){var t=pm(l+=a,o,i,n);dm(e,t),l<n?window.requestAnimationFrame(s):r(e)}s()}function fm(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gm(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ym(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sg(e);if(t){var o=Sg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wg(this,n)}}function vm(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.theme.spacing,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=s.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,h=d.height,f=d.top,g=n.offsetParent.getBoundingClientRect().top,m=window.innerHeight,y=um(s),v=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),x=g-b,w=m-f,S=x+y,E=u-y-f,O=p-m+y+v,C=y+f-b,_=160;switch(o){case"auto":case"bottom":if(w>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return i&&hm(s,O,_),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&w>=r)return i&&hm(s,O,_),{placement:"bottom",maxHeight:a?w-v:E-v};if("auto"===o||a){var k=t,T=a?x:S;return T>=r&&(k=Math.min(T-v-l.controlHeight,t)),{placement:"top",maxHeight:k}}if("bottom"===o)return dm(s,O),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&hm(s,C,_),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&x>=r){var P=t;return(!a&&S>=r||a&&x>=r)&&(P=a?x-b:S-b),i&&hm(s,C,_),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var bm=function(e){return"auto"===e?"bottom":e},xm=(0,n.createContext)({getPortalPlacement:null}),wm=function(e){xg(n,e);var t=ym(n);function n(){var e;yg(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,o=n.maxMenuHeight,i=n.menuPlacement,a=n.menuPosition,l=n.menuShouldScrollIntoView,s=n.theme;if(t){var c="fixed"===a,u=vm({maxHeight:o,menuEl:t,minHeight:r,placement:i,shouldScroll:l&&!c,isFixedPosition:c,theme:s}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||bm(t);return mm(mm({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return bg(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(n.Component);wm.contextType=xm;var Sm=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Em=Sm,Om=Sm,Cm=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Jg("div",F({css:o("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};Cm.defaultProps={children:"No options"};var _m=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Jg("div",F({css:o("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};_m.defaultProps={children:"Loading..."};var km=function(e){xg(n,e);var t=ym(n);function n(){var e;yg(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==bm(e.props.menuPlacement)&&e.setState({placement:n})},e}return bg(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,l="fixed"===i;if(!t&&!l||!r)return null;var s=this.state.placement||bm(o),c=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),u=l?0:window.pageYOffset,d=c[s]+u,p=Jg("div",{css:a("menuPortal",{offset:d,position:i,rect:c})},n);return Jg(xm.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,ee.createPortal)(p,t):p)}}]),n}(n.Component),Tm=Array.isArray,Pm=Object.keys,Mm=Object.prototype.hasOwnProperty;function Rm(e,t){if(e===t)return!0;if(e&&t&&"object"==be(e)&&"object"==be(t)){var n,r,o,i=Tm(e),a=Tm(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!Rm(e[n],t[n]))return!1;return!0}if(i!=a)return!1;var l=e instanceof Date,s=t instanceof Date;if(l!=s)return!1;if(l&&s)return e.getTime()==t.getTime();var c=e instanceof RegExp,u=t instanceof RegExp;if(c!=u)return!1;if(c&&u)return e.toString()==t.toString();var d=Pm(e);if((r=d.length)!==Pm(t).length)return!1;for(n=r;0!=n--;)if(!Mm.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!("_owner"===(o=d[n])&&e.$$typeof||Rm(e[o],t[o])))return!1;return!0}return e!=e&&t!=t}function Im(e,t){try{return Rm(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function Dm(){var e,t,n=(e=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return Dm=function(){return n},n}var Am={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},Lm=function(e){var t=e.size,n=ve(e,["size"]);return Jg("svg",F({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Am},n))},Nm=function(e){return Jg(Lm,F({size:20},e),Jg("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},jm=function(e){return Jg(Lm,F({size:20},e),Jg("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},zm=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Fm=zm,Bm=zm,Wm=function(){var e=Qg.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Dm()),Um=function(e){var t=e.delay,n=e.offset;return Jg("span",{css:Qg({animation:"".concat(Wm," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Hm=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isRtl;return Jg("div",F({},o,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),Jg(Um,{delay:0,offset:i}),Jg(Um,{delay:160,offset:!0}),Jg(Um,{delay:320,offset:!i}))};function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vm(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ym(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qm(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Hm.defaultProps={size:4};var Km=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}};function $m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$m(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xm=function(e){var t=e.children,n=e.innerProps;return Jg("div",n,t)},Qm=Xm,Jm=Xm,ey=function(e){var t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,l=e.innerProps,s=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,p=r.Label,h=r.Remove;return Jg(rm,null,(function(r){var f=r.css,g=r.cx;return Jg(d,{data:i,innerProps:Zm(Zm({},l),{},{className:g(f(a("multiValue",e)),o({"multi-value":!0,"multi-value--is-disabled":s},n))}),selectProps:u},Jg(p,{data:i,innerProps:{className:g(f(a("multiValueLabel",e)),o({"multi-value__label":!0},n))},selectProps:u},t),Jg(h,{data:i,innerProps:Zm({className:g(f(a("multiValueRemove",e)),o({"multi-value__remove":!0},n))},c),selectProps:u}))}))};function ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ny(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ty(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ey.defaultProps={cropWithEllipsis:!0};var ry={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Jg("div",F({},i,{css:o("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)}),t||Jg(Nm,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,l=e.innerRef,s=e.innerProps,c=e.menuIsOpen;return Jg("div",F({ref:l,css:r("control",e),className:n({control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":c},o)},s),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Jg("div",F({},i,{css:o("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)}),t||Jg(jm,null))},DownChevron:jm,CrossIcon:Nm,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,l=e.label,s=e.theme,c=e.selectProps;return Jg("div",{css:o("group",e),className:r({group:!0},n)},Jg(i,F({},a,{selectProps:c,theme:s,getStyles:o,cx:r}),l),Jg("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,ve(e,["className","cx","getStyles","theme","selectProps"]));return Jg("div",F({css:r("groupHeading",Gm({theme:o},i)),className:n({"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return Jg("div",{css:o("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return Jg("span",F({},o,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,l=e.theme,s=(e.selectProps,ve(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return Jg("div",{css:r("input",Ym({theme:l},s))},Jg(om.Z,F({className:n({input:!0},t),inputRef:o,inputStyle:Km(i),disabled:a},s)))},LoadingIndicator:Hm,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps;return Jg("div",F({css:o("menu",e),className:r({menu:!0},n)},a,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef,l=e.innerProps;return Jg("div",F({css:o("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":i},n),ref:a},l),t)},MenuPortal:km,LoadingMessage:_m,NoOptionsMessage:Cm,MultiValue:ey,MultiValueContainer:Qm,MultiValueLabel:Jm,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Jg("div",n,t||Jg(Nm,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,l=e.isSelected,s=e.innerRef,c=e.innerProps;return Jg("div",F({css:o("option",e),className:r({option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":l},n),ref:s},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return Jg("div",F({css:o("placeholder",e),className:r({placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,l=e.isRtl;return Jg("div",F({css:o("container",e),className:r({"--is-disabled":a,"--is-rtl":l},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return Jg("div",F({css:o("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return Jg("div",{css:i("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}},oy=function(e){return ny(ny({},ry),e.components)};function iy(e){const{selectProps:{classes:t},children:n}=e;return r().createElement(R(),{color:"textSecondary",className:t.noOptionsMessage},n)}function ay(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ly(e,t,n[t])}))}return e}function ly(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sy(){return sy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sy.apply(this,arguments)}function cy(e){let{inputRef:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["inputRef"]);return r().createElement("div",sy({ref:t},n))}function uy(e){const{children:t,innerProps:n,innerRef:o,selectProps:{classes:i,TextFieldProps:a={}}}=e;return r().createElement(kn(),sy({fullWidth:!0},a,{InputProps:ay({inputComponent:cy},a.InputProps,{inputProps:ay({className:i.control,ref:o,children:t},n,a.inputProps)})}))}function dy(){return dy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dy.apply(this,arguments)}function py(e){const{selectProps:{classes:t},innerProps:n,innerRef:o,getStyles:i,children:a}=e;return r().createElement(Nn(),dy({ref:o,style:i("menu",e),className:t.menu},n),a)}iy.propTypes={children:l().node,selectProps:l().object.isRequired},cy.propTypes={inputRef:l().oneOfType([l().func,l().shape({current:l().any.isRequired})])},uy.propTypes={children:l().node,innerProps:l().shape({onMouseDown:l().func.isRequired}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]).isRequired,selectProps:l().shape({classes:l().shape({control:l().string.isRequired}),TextFieldProps:l().object})},py.propTypes={children:l().element.isRequired,innerProps:l().object.isRequired,selectProps:l().object.isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),getStyles:l().func};var hy=h(9166);function fy(){return fy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(this,arguments)}function gy(e){const{children:t,selectProps:n,removeProps:o}=e;return r().createElement(Tp(),{tabIndex:-1,label:t,className:n.classes.multiValue,classes:{label:n.classes.multiValue__label},onDelete:o.onClick,deleteIcon:r().createElement(hy.Z,fy({},e.removeProps,{style:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginRight:"8px"}}))})}function my(){return my=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(this,arguments)}function yy(e){const{innerProps:t,innerRef:n,children:o,isFocused:i,isSelected:a,label:l,selectProps:{classes:s}}=e;return r().createElement(ms(),my({className:c()(s.option,{[s["option--selected"]]:a}),ref:n,selected:i,component:"div"},t),r().createElement(al,{value:l},r().createElement("div",{className:s["option--item"]},o)))}function vy(){return vy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vy.apply(this,arguments)}function by(e){const{selectProps:{classes:t},innerProps:n={},children:o}=e;return r().createElement(R(),vy({color:"textSecondary",className:t.placeholder},n),o)}function xy(){return xy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xy.apply(this,arguments)}function wy(e){const{selectProps:{classes:t},innerProps:n,children:o}=e;return r().createElement(R(),xy({className:t.singleValue},n),o)}function Sy(e){const{selectProps:{classes:t},children:n,isMulti:o}=e;return r().createElement("div",{className:c()(t.valueContainer,{[t["valueContainer--multi"]]:o})},n)}gy.propTypes={children:l().node,isFocused:l().bool.isRequired,removeProps:l().shape({onClick:l().func.isRequired,onMouseDown:l().func.isRequired,onTouchEnd:l().func.isRequired}).isRequired,selectProps:l().object.isRequired},yy.propTypes={children:l().node,innerProps:l().shape({id:l().string.isRequired,key:l().string,onClick:l().func.isRequired,onMouseMove:l().func.isRequired,onMouseOver:l().func.isRequired,tabIndex:l().number.isRequired}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),isFocused:l().bool.isRequired,isSelected:l().bool.isRequired,label:l().string,selectProps:l().shape({classes:l().shape({option:l().string,"option--selected":l().string})})},by.propTypes={children:l().node,innerProps:l().object,selectProps:l().object.isRequired},wy.propTypes={children:l().node,innerProps:l().object,selectProps:l().object.isRequired},Sy.propTypes={children:l().node,selectProps:l().object.isRequired,isMulti:l().bool};var Ey=h(1039);function Oy(){return Oy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(this,arguments)}function Cy(e){const{selectProps:{classes:t},innerProps:n}=e;return r().createElement(j(),Oy({},n,{className:t.clearIndicator}),r().createElement(Ey.Z,null))}Cy.propTypes={innerProps:l().shape({onMouseDown:l().func.isRequired,onTouchEnd:l().func.isRequired,"aria-hidden":l().string.isRequired}).isRequired,selectProps:l().shape({classes:l().object.isRequired}).isRequired};var _y=h(3543);function ky(){return ky=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ky.apply(this,arguments)}function Ty(e){const{selectProps:{classes:t},innerProps:n}=e;return r().createElement(j(),ky({},n,{className:t.dropdownIndicator}),r().createElement(_y.Z,null))}function Py(e){const{children:t,selectProps:{classes:n}}=e;return r().createElement(R(),{variant:"subtitle2",className:c()(n.groupHeading)},t)}Ty.propTypes={innerProps:l().shape({onMouseDown:l().func.isRequired,onTouchEnd:l().func.isRequired,"aria-hidden":l().string.isRequired}).isRequired,selectProps:l().shape({classes:l().object.isRequired}).isRequired},Py.propTypes={children:l().node,selectProps:l().shape({classes:l().shape({groupHeading:l().string})})};const My={Control:uy,Menu:py,MultiValue:gy,NoOptionsMessage:iy,Option:yy,Placeholder:by,SingleValue:wy,ValueContainer:Sy,ClearIndicator:Cy,DropdownIndicator:Ty,GroupHeading:Py},Ry=(0,i.makeStyles)((e=>({control:{display:"flex","&&":{padding:0},height:"auto"},valueContainer:{display:"flex",flexWrap:"nowrap",flex:1,alignItems:"center",overflow:"hidden",marginLeft:e.spacing(1)},"valueContainer--multi":{flexWrap:"wrap"},multiValue:{margin:e.spacing(.5,.5),maxWidth:"calc(100% - 8px)"},multiValue__label:{paddingRight:0,marginRight:12,maxWidth:"100%",overflow:"hidden"},noOptionsMessage:{padding:e.spacing(1,2)},singleValue:{fontSize:16,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},placeholder:{position:"absolute",left:6,bottom:10,fontSize:16},menu:{zIndex:40,marginTop:e.spacing(1)},clearIndicator:{},dropdownIndicator:{},groupHeading:{paddingLeft:"28px"},option:{fontWeight:400},"option--selected":{fontWeight:400},"option--item":{display:"block",width:"100%",textOverflow:"ellipsis",overflow:"hidden"}})));function Iy(){return Iy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iy.apply(this,arguments)}function Dy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ay(e,t,n[t])}))}return e}function Ay(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ly(e){function t(t){const{components:n,classes:o,error:i,TextFieldProps:a,innerRef:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["components","classes","error","TextFieldProps","innerRef"]),c=Ry(),u=Dy({},My,n),d=Cl(c,o);return r().createElement(e,Iy({ref:l,components:u,classes:d,TextFieldProps:Dy({},a,{error:i})},s))}return t.displayName=`withMuiSkin(${e.displayName||e.name})`,t.defaultProps={components:{},classes:{}},t.propTypes={components:l().shape({ClearIndicator:l().func,Control:l().func,DropdownIndicator:l().func,DownChevron:l().func,CrossIcon:l().func,Group:l().func,GroupHeading:l().func,IndicatorsContainer:l().func,IndicatorSeparator:l().func,Input:l().func,LoadingIndicator:l().func,Menu:l().func,MenuList:l().func,MenuPortal:l().func,LoadingMessage:l().func,NoOptionsMessage:l().func,MultiValue:l().func,MultiValueContainer:l().func,MultiValueLabel:l().func,MultiValueRemove:l().func,Option:l().func,Placeholder:l().func,SelectContainer:l().func,SingleValue:l().func,ValueContainer:l().func}),classes:l().shape({control:l().string,valueContainer:l().string,multiValue:l().string,noOptionsMessage:l().string,singleValue:l().string,placeholder:l().string,menu:l().string,clearIndicator:l().string,dropdownIndicator:l().string,option:l().string,"option--selected":l().string}),TextFieldProps:l().object,error:l().bool,innerRef:l().object},t}for(var Ny=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],jy=new RegExp("["+Ny.map((function(e){return e.letters})).join("")+"]","g"),zy={},Fy=0;Fy<Ny.length;Fy++)for(var By=Ny[Fy],Wy=0;Wy<By.letters.length;Wy++)zy[By.letters[Wy]]=By.base;var Uy=function(e){return e.replace(jy,(function(e){return zy[e]}))};function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Vy=function(e){return e.replace(/^\s+|\s+$/g,"")},Gy=function(e){return"".concat(e.label," ").concat(e.value)},qy={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},Yy=function(e){return Jg("span",F({css:qy},e))};function Ky(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef,n=(e.emotion,ve(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return Jg("input",F({ref:t},n,{css:Qg({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var $y=function(e){xg(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Sg(t);if(n){var o=Sg(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return wg(this,e)});function o(){return yg(this,o),r.apply(this,arguments)}return bg(o,[{key:"componentDidMount",value:function(){this.props.innerRef((0,ee.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),o}(n.Component),Zy=["boxSizing","height","overflow","paddingRight","position"],Xy={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Qy(e){e.preventDefault()}function Jy(e){e.stopPropagation()}function ev(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function tv(){return"ontouchstart"in window||navigator.maxTouchPoints}var nv=!(!window.document||!window.document.createElement),rv=0,ov=function(e){xg(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Sg(t);if(n){var o=Sg(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return wg(this,e)});function o(){var e;yg(this,o);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))).originalStyles={},e.listenerOptions={capture:!1,passive:!1},e}return bg(o,[{key:"componentDidMount",value:function(){var e=this;if(nv){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&Zy.forEach((function(t){var n=i&&i[t];e.originalStyles[t]=n})),n&&rv<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,l=document.body?document.body.clientWidth:0,s=window.innerWidth-l+a||0;Object.keys(Xy).forEach((function(e){var t=Xy[e];i&&(i[e]=t)})),i&&(i.paddingRight="".concat(s,"px"))}o&&tv()&&(o.addEventListener("touchmove",Qy,this.listenerOptions),r&&(r.addEventListener("touchstart",ev,this.listenerOptions),r.addEventListener("touchmove",Jy,this.listenerOptions))),rv+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(nv){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;rv=Math.max(rv-1,0),n&&rv<1&&Zy.forEach((function(t){var n=e.originalStyles[t];i&&(i[t]=n)})),o&&tv()&&(o.removeEventListener("touchmove",Qy,this.listenerOptions),r&&(r.removeEventListener("touchstart",ev,this.listenerOptions),r.removeEventListener("touchmove",Jy,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),o}(n.Component);ov.defaultProps={accountForScrollbars:!0};var iv={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},av=function(e){xg(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Sg(t);if(n){var o=Sg(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return wg(this,e)});function o(){var e;yg(this,o);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))).state={touchScrollTarget:null},e.getScrollTarget=function(t){t!==e.state.touchScrollTarget&&e.setState({touchScrollTarget:t})},e.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},e}return bg(o,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?Jg("div",null,Jg("div",{onClick:this.blurSelectInput,css:iv}),Jg($y,{innerRef:this.getScrollTarget},t),r?Jg(ov,{touchScrollTarget:r}):null):t}}]),o}(n.PureComponent);var lv=function(e){xg(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Sg(t);if(n){var o=Sg(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return wg(this,e)});function i(){var e;yg(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).isBottom=!1,e.isTop=!1,e.scrollTarget=void 0,e.touchStart=void 0,e.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},e.handleEventDelta=function(t,n){var r=e.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,l=r.onTopLeave,s=e.scrollTarget,c=s.scrollTop,u=s.scrollHeight,d=s.clientHeight,p=e.scrollTarget,h=n>0,f=u-d-c,g=!1;f>n&&e.isBottom&&(i&&i(t),e.isBottom=!1),h&&e.isTop&&(l&&l(t),e.isTop=!1),h&&n>f?(o&&!e.isBottom&&o(t),p.scrollTop=u,g=!0,e.isBottom=!0):!h&&-n>c&&(a&&!e.isTop&&a(t),p.scrollTop=0,g=!0,e.isTop=!0),g&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return bg(i,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return r().createElement($y,{innerRef:this.getScrollTarget},this.props.children)}}]),i}(n.Component);function sv(e){var t=e.isEnabled,n=void 0===t||t,o=ve(e,["isEnabled"]);return n?r().createElement(lv,o):o.children}var cv=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled,a=t.tabSelectsValue;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},uv=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},dv=function(e){return!!e.isDisabled},pv={clearIndicator:Bm,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Fm,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Om,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return Oe(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Oe(t,"backgroundColor",a.neutral0),Oe(t,"borderRadius",o),Oe(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Oe(t,"marginBottom",i.menuGutter),Oe(t,"marginTop",i.menuGutter),Oe(t,"position","absolute"),Oe(t,"width","100%"),Oe(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Em,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},hv={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fv(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mv={backspaceRemovesValue:!0,blurInputOnSelect:fm(),captureMenuScroll:!fm(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hy(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({ignoreCase:!0,ignoreAccents:!0,stringify:Gy,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,s=a?Vy(t):t,c=a?Vy(i(e)):i(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=Uy(s),c=Uy(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:dv,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},yv=1,vv=function(e){xg(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Sg(t);if(n){var o=Sg(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return wg(this,e)});function i(e){var t;yg(this,i),(t=o.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},t.blockOptionHover=!1,t.isComposing=!1,t.clearFocusValueOnUpdate=!1,t.commonProps=void 0,t.components=void 0,t.hasGroups=!1,t.initialTouchX=0,t.initialTouchY=0,t.inputIsHiddenAfterUpdate=void 0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.cacheComponents=function(e){t.components=oy({components:e})},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;o(e,gv(gv({},n),{},{name:i}))},t.setValue=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=t.props,i=o.closeMenuOnSelect,a=o.isMulti;t.onInputChange("",{action:"set-value"}),i&&(t.inputIsHiddenAfterUpdate=!a,t.onMenuClose()),t.clearFocusValueOnUpdate=!0,t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=t.state.selectValue;if(o)if(t.isOptionSelected(e,i)){var a=t.getOptionValue(e);t.setValue(i.filter((function(e){return t.getOptionValue(e)!==a})),"deselect-option",e),t.announceAriaLiveSelection({event:"deselect-option",context:{value:t.getOptionLabel(e)}})}else t.isOptionDisabled(e,i)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue([].concat(Kt(i),[e]),"select-option",e),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));else t.isOptionDisabled(e,i)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue(e,"select-option"),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));r&&t.blurInput()},t.removeValue=function(e){var n=t.state.selectValue,r=t.getOptionValue(e),o=n.filter((function(e){return t.getOptionValue(e)!==r}));t.onChange(o.length?o:null,{action:"remove-value",removedValue:e}),t.announceAriaLiveSelection({event:"remove-value",context:{value:e?t.getOptionLabel(e):""}}),t.focusInput()},t.clearValue=function(){t.onChange(null,{action:"clear"})},t.popValue=function(){var e=t.state.selectValue,n=e[e.length-1],r=e.slice(0,e.length-1);t.announceAriaLiveSelection({event:"pop-value",context:{value:n?t.getOptionLabel(n):""}}),t.onChange(r.length?r:null,{action:"pop-value",removedValue:n})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return lm.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return t.props.getOptionLabel(e)},t.getOptionValue=function(e){return t.props.getOptionValue(e)},t.getStyles=function(e,n){var r=pv[e](n);r.boxSizing="border-box";var o=t.props.styles[e];return o?o(r,n):r},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getActiveDescendentId=function(){var e=t.props.menuIsOpen,n=t.state,r=n.menuOptions,o=n.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}},t.announceAriaLiveSelection=function(e){var n=e.event,r=e.context;t.setState({ariaLiveSelection:uv(n,r)})},t.announceAriaLiveContext=function(e){var n=e.event,r=e.context;t.setState({ariaLiveContext:cv(n,gv(gv({},r),{},{label:t.props["aria-label"]}))})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.inputIsHiddenAfterUpdate=!r,t.onMenuClose()):t.openMenu("first"),e.preventDefault(),e.stopPropagation()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.stopPropagation(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&cm(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=e.currentTarget.value;t.inputIsHiddenAfterUpdate=!1,t.onInputChange(n,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){var n=t.props,r=n.isSearchable,o=n.isMulti;t.props.onFocus&&t.props.onFocus(e),t.inputIsHiddenAfterUpdate=!1,t.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),t.setState({isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){var e=t.props,n=e.hideSelectedOptions,r=e.isMulti;return void 0===n?r:n},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,l=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,h=t.state,f=h.focusedOption,g=h.focusedValue,m=h.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)t.removeValue(g);else{if(!o)return;r?t.popValue():l&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!f||p&&t.isOptionSelected(f,m))return;t.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(t.isComposing)return;t.selectOption(f);break}return;case"Escape":c?(t.inputIsHiddenAfterUpdate=!1,t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):l&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!f)return;t.selectOption(f);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.buildMenuOptions=function(e,n){var r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=t.isOptionDisabled(e,n),a=t.isOptionSelected(e,n),l=t.getOptionLabel(e),s=t.getOptionValue(e);if(!(t.shouldHideSelectedOptions()&&a||!t.filterOption({label:l,value:s,data:e},o))){var c=i?void 0:function(){return t.onOptionHover(e)},u=i?void 0:function(){return t.selectOption(e)},d="".concat(t.getElementId("option"),"-").concat(r);return{innerProps:{id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:d,label:l,type:"option",value:s}}};return i.reduce((function(e,n,r){if(n.options){t.hasGroups||(t.hasGroups=!0);var o=n.options.map((function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o})).filter(Boolean);if(o.length){var i="".concat(t.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:i,data:n,options:o})}}else{var l=a(n,"".concat(r));l&&(e.render.push(l),e.focusable.push(n))}return e}),{render:[],focusable:[]})};var n=e.value;t.cacheComponents=ql(t.cacheComponents,Im).bind(U(t)),t.cacheComponents(e.components),t.instancePrefix="react-select-"+(t.props.instanceId||++yv);var r=sm(n);t.buildMenuOptions=ql(t.buildMenuOptions,(function(e,t){var n=dt(e,2),r=n[0],o=n[1],i=dt(t,2),a=i[0];return o===i[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind(U(t));var a=e.menuIsOpen?t.buildMenuOptions(e,r):{render:[],focusable:[]};return t.state.menuOptions=a,t.state.selectValue=r,t}return bg(i,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.menuIsOpen,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==o||e.inputValue!==i){var a=sm(e.value),l=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},s=this.getNextFocusedValue(a),c=this.getNextFocusedOption(l.focusable);this.setState({menuOptions:l,selectValue:a,focusedOption:c,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,l=a.isDisabled,s=a.menuIsOpen,c=this.state.isFocused;(c&&!l&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),c&&l&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?dm(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i<r.top&&dm(t,Math.max(n.offsetTop-i,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildMenuOptions(this.props,r),a=this.props,l=a.isMulti,s=a.tabSelectsValue,c="first"===e?0:i.focusable.length-1;if(!l){var u=i.focusable.indexOf(r[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:i,focusedValue:null,focusedOption:i.focusable[c]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:s}})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var l=i.indexOf(a);a||(l=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,c=-1;if(i.length){switch(e){case"previous":c=0===l?0:-1===l?s:l-1;break;case"next":l>-1&&l<s&&(c=l+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:i[c]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props,n=t.pageSize,r=t.tabSelectsValue,o=this.state,i=o.focusedOption,a=o.menuOptions,l=a.focusable;if(l.length){var s=0,c=l.indexOf(i);i||(c=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:r}})),"up"===e?s=c>0?c-1:l.length-1:"down"===e?s=(c+1)%l.length:"pageup"===e?(s=c-n)<0&&(s=0):"pagedown"===e?(s=c+n)>l.length-1&&(s=l.length-1):"last"===e&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:dv(l[s]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(hv):gv(gv({},hv),this.props.theme):hv}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.setValue,i=this.selectOption,a=this.props,l=a.isMulti,s=a.isRtl,c=a.options;return{cx:t,clearValue:e,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:s,options:c,selectOption:i,setValue:o,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,l=i.menuIsOpen,s=i.inputValue,c=i.screenReaderStatus,u=r?function(e){var t=e.focusedValue,n=e.selectValue;return"value ".concat((0,e.getOptionLabel)(t)," focused, ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=o&&l?function(e){var t=e.focusedOption,n=e.options;return"option ".concat((0,e.getOptionLabel)(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",p=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(d," ").concat(p," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,l=e.form,s=this.components.Input,c=this.state.inputIsHidden,u=o||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return r().createElement(Ky,F({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:im,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:l,value:""},d));var p=this.commonProps,h=p.cx,f=p.theme,g=p.selectProps;return r().createElement(s,F({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:h,getStyles:this.getStyles,id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:c,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:g,spellCheck:"false",tabIndex:a,form:l,theme:f,type:"text",value:i},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,h=u.isMulti,f=u.inputValue,g=u.placeholder,m=this.state,y=m.selectValue,v=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!d)return f?null:r().createElement(s,F({},c,{key:"placeholder",isDisabled:p,isFocused:b}),g);if(h)return y.map((function(t,l){var s=t===v;return r().createElement(n,F({},c,{components:{Container:o,Label:i,Remove:a},isFocused:s,isDisabled:p,key:"".concat(e.getOptionValue(t)).concat(l),index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var x=y[0];return r().createElement(l,F({},c,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r().createElement(e,F({},t,{innerProps:l,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?r().createElement(e,F({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return r().createElement(n,F({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r().createElement(e,F({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state,h=p.focusedOption,f=p.menuOptions,g=this.props,m=g.captureMenuScroll,y=g.inputValue,v=g.isLoading,b=g.loadingMessage,x=g.minMenuHeight,w=g.maxMenuHeight,S=g.menuIsOpen,E=g.menuPlacement,O=g.menuPosition,C=g.menuPortalTarget,_=g.menuShouldBlockScroll,k=g.menuShouldScrollIntoView,T=g.noOptionsMessage,P=g.onMenuScrollToTop,M=g.onMenuScrollToBottom;if(!S)return null;var R,I=function(t){var n=h===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,r().createElement(u,F({},d,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())R=f.render.map((function(t){if("group"===t.type){t.type;var i=ve(t,["type"]),a="".concat(t.key,"-heading");return r().createElement(n,F({},d,i,{Heading:o,headingProps:{id:a,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e)})))}if("option"===t.type)return I(t)}));else if(v){var D=b({inputValue:y});if(null===D)return null;R=r().createElement(s,d,D)}else{var A=T({inputValue:y});if(null===A)return null;R=r().createElement(c,d,A)}var L={minMenuHeight:x,maxMenuHeight:w,menuPlacement:E,menuPosition:O,menuShouldScrollIntoView:k},N=r().createElement(wm,F({},d,L),(function(t){var n=t.ref,o=t.placerProps,l=o.placement,s=o.maxHeight;return r().createElement(i,F({},d,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:l}),r().createElement(sv,{isEnabled:m,onTopArrive:P,onBottomArrive:M},r().createElement(av,{isEnabled:_},r().createElement(a,F({},d,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:s}),R))))}));return C||"fixed"===O?r().createElement(l,F({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,l=this.state.selectValue;if(a&&!o){if(i){if(n){var s=l.map((function(t){return e.getOptionValue(t)})).join(n);return r().createElement("input",{name:a,type:"hidden",value:s})}var c=l.length>0?l.map((function(t,n){return r().createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):r().createElement("input",{name:a,type:"hidden"});return r().createElement("div",null,c)}var u=l[0]?this.getOptionValue(l[0]):"";return r().createElement("input",{name:a,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?r().createElement(Yy,{"aria-live":"polite"},r().createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),r().createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,l=a.className,s=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return r().createElement(o,F({},p,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),r().createElement(t,F({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),r().createElement(i,F({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),r().createElement(n,F({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),i}(n.Component);vv.defaultProps=mv;var bv={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},xv=function(e){var t,o;return o=t=function(t){xg(a,t);var n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sg(n);if(o){var r=Sg(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return wg(this,e)});function a(){var e;yg(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return bg(a,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,o=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,ve(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return r().createElement(e,F({},o,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),a}(n.Component),t.defaultProps=bv,o};n.Component;const wv=Ly(xv(vv)),Sv=e=>{if(!e)return"";const{lookupCode:t,value:n}=e;return(0,Fo.getLookupLabel)(t,n)},Ev=e=>Object.entries(e).map((e=>{let[t,{displayName:n}]=e;return{lookupCode:t,value:n}})).sort(((e,t)=>{const n=Sv(e).toLowerCase(),r=Sv(t).toLowerCase();return Fo.utils.strings.sort("asc",n,r)})),Ov=(0,i.makeStyles)((e=>({expanded:{transform:"rotate(180deg)"},disabled:{color:`${e.palette.text.disabled} !important`}})));function Cv(){return Cv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cv.apply(this,arguments)}const _v=e=>{const{selectProps:{classes:t,menuIsOpen:n,isDisabled:o},innerProps:i}=e,a=Ov();return r().createElement(_y.Z,Cv({"data-reltio-id":"select-dropdown-indicator"},i,{className:c()(t.dropdownIndicator,{[a.expanded]:n},{[a.disabled]:o})}))};_v.propTypes={innerProps:l().object.isRequired,selectProps:l().shape({classes:l().shape({dropdownIndicator:l().string}).isRequired,menuIsOpen:l().bool.isRequired,isDisabled:l().bool}).isRequired};const kv=_v,Tv=(0,i.makeStyles)({popper:{borderRadius:"4px",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",backgroundColor:"#FFFFFF",margin:0,zIndex:1e4}}),Pv=r().createContext(null);function Mv(){return Mv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(this,arguments)}Pv.Provider.propTypes={value:l().shape({element:l().instanceOf(Element),priority:l().arrayOf(l().oneOf(["left","right","top","bottom"]))})},Pv.displayName="PopupBoundariesContext";const Rv=e=>{const{selectProps:{inputRef:t,menuIsOpen:o,inputValue:i},innerRef:a,children:l,innerProps:s}=e,[c,d]=(0,n.useState)("id");(0,n.useEffect)((()=>{d(((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))())}),[i]);const p=Tv(),h=(0,n.useContext)(Pv),f=h&&h.element,g=f?h.element.clientWidth:window.innerWidth;return r().createElement(Fu,{anchorEl:t.current,open:o,className:p.popper,key:c,modifiers:f?{preventOverflow:{boundariesElement:h.element,priority:h.priority}}:void 0,placement:"bottom-start"},r().createElement(Nn(),Mv({ref:a,style:{minWidth:Math.min((0,u.prop)("clientWidth",t.current),g),maxWidth:Math.min(521,g)}},s),l))};Rv.propTypes={children:l().oneOfType([l().element,l().array]).isRequired,selectProps:l().shape({inputRef:l().object.isRequired,menuIsOpen:l().bool.isRequired,inputValue:l().string}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]).isRequired,innerProps:l().object.isRequired};const Iv=Rv,Dv=(0,i.makeStyles)((e=>({option:{paddingLeft:"35px"},dropdownIndicator:{padding:"8px 12px",cursor:"pointer",color:e.palette.text.secondary},clearIndicator:{display:"none"},placeholder:{position:"static"}}))),Av=e=>e&&e.lookupCode&&!e.value,Lv=(0,u.curry)(((e,t)=>(0,u.hasPath)([t,"displayName"],e))),Nv=e=>{const{children:t,data:n,removeProps:o}=e;return r().createElement(wh,{tabIndex:-1,label:t,count:(0,u.prop)("formattedNumber",n),onDelete:o.onClick,deleteIcon:r().createElement(hy.Z,e.removeProps)})};Nv.propTypes={children:l().node,data:l().shape({value:l().string,label:l().string,number:l().number}).isRequired,removeProps:l().shape({onClick:l().func.isRequired,onMouseDown:l().func.isRequired,onTouchEnd:l().func.isRequired}).isRequired};const jv=Nv,zv=(0,i.makeStyles)({checkIcon:{transform:"scale(.7)",marginLeft:"-30px",position:"absolute"}}),Fv=e=>{const t=zv(),{isSelected:n,children:o}=e;return r().createElement(yy,e,n&&r().createElement(ch.Z,{className:t.checkIcon}),o)};Fv.displayName="OptionWithCheckIcon";const Bv=Fv,Wv=r().createContext(null);Wv.displayName="DependentLookupAutopopulationContext";function Uv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Hv(e,t,n[t])}))}return e}function Hv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(){return Vv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vv.apply(this,arguments)}const Gv={IndicatorSeparator:Ol,LoadingIndicator:Ol,Option:Bv,DropdownIndicator:kv,Menu:Iv,MenuList:e=>{const{selectProps:{menuListFooter:t},children:n}=e;return r().createElement(ry.MenuList,e,n,t)},MultiValue:jv,Input:e=>r().createElement(ry.Input,Vv({},e,{isHidden:!1}))},qv=50,Yv=e=>{let{multiple:t,value:o,lookupCode:i,TextFieldProps:a,parents:l,onChange:s,getLookups:c,lookups:d={},resolveLookups:h,fullWidth:f,disabled:g,placeholder:m,max:y=qv}=e,v=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","lookupCode","TextFieldProps","parents","onChange","getLookups","lookups","resolveLookups","fullWidth","disabled","placeholder","max"]);const b=(0,n.useRef)(null),x=(0,n.useRef)(null),w=Dv(),[S,E]=(0,n.useState)(""),[O,C]=(0,n.useState)([]),[_,k]=(0,n.useState)(1),[T,P]=(0,n.useState)(!1);(e=>{let{lookups:t,resolvedValues:r,resolveLookups:o,onLookupsResolve:i}=e;const[a,l]=(0,n.useState)([]);(0,n.useEffect)((()=>{const[e,n]=(0,u.pipe)(Fo.wrapInArrayIfNeeded,(0,u.filter)(Av),(0,u.map)((0,u.prop)("lookupCode")),(0,u.partition)(Lv(r)))(t);if(e.length>0){const t=e.map((e=>({lookupCode:e,value:r[e].displayName})));i(t)}const s=n.filter((e=>!a.includes(e)));s.length>0&&(l((0,u.pipe)((0,u.concat)(s),u.uniq)),o(s))}),[t,r])})({lookups:o,resolvedValues:d[i],resolveLookups:e=>h(i,e),onLookupsResolve:e=>s(t?e:e[0])}),((e,t,r)=>{var o;const i=(0,n.useRef)(!1);!i.current&&r&&document.activeElement===(null===(o=t.current)||void 0===o?void 0:o.getElementsByTagName("input")[0])&&(i.current=!0),(0,n.useEffect)((()=>{const t=()=>{i.current&&(i.current=!1)};var n,o;if(!r&&i.current&&(null===(n=e.current)||void 0===n||n.focus(),i.current=!1),r&&i.current)return null===(o=document)||void 0===o||o.addEventListener("click",t),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("click",t)}}),[r])})(x,b,g),(0,n.useEffect)((()=>{t||(E(Sv(o)),C(N),k(1))}),[o]);const M=e=>{U(),s(e)},R=()=>{k(1),L("",C)},I=()=>{!t&&S&&S!==Sv(o)&&(E(Sv(o)),R())},D=(0,n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return P(!0),(null===l?Promise.resolve([]):c({type:i,parents:l,displayNamePrefix:e,max:y+1,offset:(t-1)*y})).then((e=>Ev(e))).catch((()=>[])).finally((()=>P(!1)))}),[y,i,l]),A=(0,n.useCallback)((()=>{const e=S!==Sv(o)?S:"";D(t?S:e,_+1).then((e=>{C((t=>(0,u.concat)(t.slice(0,_*y),e))),k((e=>e+1))}))}),[y,D,S,_]),L=(0,n.useCallback)((0,Fo.debounce)(((e,t)=>{D(e).then((e=>t(e)))}),400),[D]),{defaultOptions:N,initialDefaultOptions:j,isLoading:z}=(e=>{const[t,r]=(0,n.useState)([]),[o,i]=(0,n.useState)(null),[a,l]=(0,n.useState)(!1),s=Ml();return(0,n.useEffect)((()=>{r([]),l(!0),s(e("")).then((e=>{r(e),i((t=>t||e)),l(!1)})).catch((()=>{l(!1)}))}),[e]),{defaultOptions:t,initialDefaultOptions:o,isLoading:a}})(D);(0,n.useEffect)((()=>{C(N)}),[N]),Vl((()=>{k(1)}),[i]);const F=(0,n.useMemo)((()=>O.slice(0,_*y)),[y,O,_]),B=O.length>F.length,W=t?(0,u.isEmpty)(o):!(null!=o&&o.lookupCode||null!=o&&o.value),{markAsTouched:U}=(e=>{let{initialDefaultOptions:t,isEmptyValue:r,multiple:o,onChange:i}=e;const{id:a,isTouched:l,onTouch:s}=(0,n.useContext)(Wv)||{};return(0,n.useEffect)((()=>{a&&t&&1===t.length&&r&&!l&&i(o?t:t[0])}),[t]),{markAsTouched:(0,n.useCallback)((()=>{a&&(null==s||s(a))}),[s,a])}})({initialDefaultOptions:j,isEmptyValue:W,multiple:t,onChange:s});return r().createElement(wv,Vv({},v,{isMulti:t,classes:w,menuPortalTarget:document.body,menuPlacement:"auto",TextFieldProps:Uv({},a,{ref:b,disabled:(null==a?void 0:a.disabled)||g}),inputRef:b,innerRef:x,styles:{menuPortal:e=>Uv({},e,{zIndex:1300}),container:e=>Uv({},e,f?{width:"100%"}:{})},noOptionsMessage:()=>T&&!B?p().text("Loading..."):p().text("No results found"),components:Gv,isClearable:!0,isSearchable:!0,controlShouldRenderValue:t,inputValue:S,filterOption:t?void 0:u.T,onInputChange:(e,n)=>{let{action:r}=n;switch(r){case"menu-close":I();break;case"input-blur":if(t&&S){E(""),R();break}I();break;case"input-change":E(e),k(1),L(e,C),t||""!==e||M("")}},loadingMessage:()=>p().text("Loading..."),isLoading:!S&&z,hideSelectedOptions:!1,placeholder:m||"",isDisabled:g,options:F,getOptionValue:(0,u.either)((0,u.prop)("value"),(0,u.prop)("lookupCode")),getOptionLabel:Sv,onChange:M,onFocus:t?void 0:()=>{var e,t,n;o&&(null===(e=x.current)||void 0===e||null===(t=e.select)||void 0===t||null===(n=t.inputRef)||void 0===n||n.select())},value:(0,u.defaultTo)(t?[]:null,o),menuListFooter:B&&r().createElement(cg,{loading:T,onClick:A})}))};Yv.propTypes={multiple:l().bool,value:l().oneOfType([Fo.LookupValueType,l().arrayOf(Fo.LookupValueType)]),TextFieldProps:l().shape({variant:l().string,margin:l().string,hiddenLabel:l().bool}),lookupCode:l().string.isRequired,parents:l().array,getLookups:l().func,onChange:l().func,lookups:l().object,resolveLookups:l().func,fullWidth:l().bool,placeholder:l().string,disabled:l().bool,max:l().number};const Kv=Yv,$v=(0,i.makeStyles)({fileUploaderInput:{display:"none"},uploaded:{display:"flex",alignItems:"center"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},cancelIcon:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginLeft:"3px",cursor:"pointer"}}),Zv=e=>{console.error(e),E.addError({title:p().text("File upload error"),message:(0,Fo.getRequestErrorMessage)(e)})},Xv=e=>{let{supportedFileTypes:t=[],onUpload:o,onBeforeUpload:i}=e;const a=$v(),l=(0,n.useRef)(),s=t.join(",");return r().createElement(n.Fragment,null,r().createElement(D(),{variant:"contained",onClick:()=>{l.current.value=null,l.current.click()}},p().text("Select File")),r().createElement("input",{type:"file",className:a.fileUploaderInput,onChange:e=>{const t=e.target.files||e.dataTransfer.files||[];t.length>0&&(i(),o(t[0])),e.stopPropagation(),e.preventDefault()},ref:l,name:"uploadfile",accept:s}))};Xv.propTypes={onUpload:l().func,onBeforeUpload:l().func,supportedFileTypes:l().arrayOf(l().string)};const Qv=e=>{let{link:t,filename:o,onUpload:i,onError:a=Zv,onCancel:l,supportedFileTypes:s,isValidLink:c=!0}=e;const[u,d]=(0,n.useState)(1),[p,h]=(0,n.useState)(""),f=$v();(0,n.useEffect)((()=>{h(o)}),[o]),(0,n.useEffect)((()=>{d(t?3:1)}),[t]);const g=(0,n.useCallback)((e=>{d(1),a(e)}),[a]),m=(0,n.useCallback)((e=>i(e).then((()=>{d(3),h(e.name)})).catch(g)),[i,g]),y=(0,n.useCallback)((()=>{d(2)}),[]),v=(0,n.useCallback)((()=>{d(1),l()}),[l]);switch(u){case 1:return r().createElement(Xv,{supportedFileTypes:s,onUpload:m,onBeforeUpload:y});case 3:{const e=(0,Fo.getLabel)(p);return r().createElement("div",{className:f.uploaded},r().createElement(al,{value:e},c?r().createElement(hl(),{href:t,className:f.label},e):r().createElement(R(),{variant:"inherit",className:f.label},e)),r().createElement(hy.Z,{onClick:v,onMouseDown:v,onTouchEnd:v,className:f.cancelIcon}))}case 2:return r().createElement(me(),{size:20});default:return null}};Qv.propTypes={link:l().string,filename:l().string,onUpload:l().func,onError:l().func,onCancel:l().func,supportedFileTypes:l().arrayOf(l().string),isValidLink:l().bool};const Jv=Qv,eb=(0,i.makeStyles)({editor:{alignSelf:"center"}}),tb=e=>{let{value:t,onChange:o,onError:i,className:a}=e;const{downloadLink:l,filename:s,expirationDate:u}=t||{},d=u>=Date.now(),p=(0,n.useCallback)((e=>(0,Fo.uploadFileForSearch)(e).then((t=>{let{path:n,downloadLink:r,expirationDate:i}=t;o({filename:e.name,downloadLink:r,link:n,expirationDate:new Date(i).getTime()})}))),[o]),h=(0,n.useCallback)((()=>o(null)),[o]),f=eb();return r().createElement("div",{className:c()(f.editor,a)},r().createElement(Jv,{isValidLink:d,link:l,filename:s,supportedFileTypes:[".txt",".csv"],onUpload:p,onError:i,onCancel:h}))};function nb(){return nb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nb.apply(this,arguments)}function rb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const ob=e=>t=>e.find((0,u.propEq)("value",t)),ib=e=>{let{entries:t,classes:n={}}=e,o=rb(e,["entries","classes"]);const{menuItem:i}=n,a=rb(n,["menuItem"]);return r().createElement(_h,nb({},o,{classes:a,getValueLabel:(0,u.pipe)(ob(t),(0,u.prop)("label"))}),t.map(((e,t)=>{let{value:n,label:o}=e;return r().createElement(ms(),{key:t,value:n,className:i},o||n.toString())})))};ib.propTypes={classes:l().object,entries:l().arrayOf(ph).isRequired};const ab=ib;function lb(){return lb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lb.apply(this,arguments)}function sb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){cb(e,t,n[t])}))}return e}function cb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ub=e=>{let{classes:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes"]);const o=Lh();return r().createElement(ab,lb({MenuProps:{disableAutoFocusItem:!0},classes:sb({},t,{root:c()(o.root,(0,u.prop)("root",t)),icon:c()(o.icon,(0,u.prop)("icon",t))})},n))};ub.propTypes={classes:l().object};const db=ub;function pb(){return pb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pb.apply(this,arguments)}function hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fb(e,t,n[t])}))}return e}function fb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mb(e,t,n[t])}))}return e}function mb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yb=e=>{let{fieldName:t,value:i,onChange:a,dataTypeDefinition:l,TextFieldProps:s={}}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["fieldName","value","onChange","dataTypeDefinition","TextFieldProps"]);const d=Ah(),p=((e,t)=>{const r=(0,o.useSelector)(b().selectors.getTenant),i=(0,o.useSelector)(b().selectors.getLookups),a=(0,o.useSelector)(b().selectors.getAttributePresentations),l=(0,o.useSelector)(b().selectors.getGlobalSearchRequestOptions),s=(0,o.useDispatch)(),c=(0,n.useCallback)(((t,n,r)=>(0,Fo.getFacetedAttributeData)({fieldName:e,searchValue:t,options:hb({},l,{max:n,pageNo:r})}).then((0,u.pipe)((0,u.prop)(e),u.keys))),[e,l]),{type:d,values:p,lookupCode:h,dependentLookupCode:f,options:g}=t;switch(d){case Fo.DataTypes.TYPE_ENUM:return{entries:p.map((e=>({value:e})))};case Fo.DataTypes.TYPE_LOOKUP:return{lookups:i,lookupCode:h,getLookups:()=>(0,Fo.getLookups)().then((e=>{s(v.profile.lookups.actions.lookupsLoaded(e))}))};case Fo.DataTypes.TYPE_DEPENDENT_LOOKUP:return{lookups:i,lookupCode:f,getLookups:e=>{let{type:t,parents:n,displayNamePrefix:r,max:o,offset:i}=e;return(0,Fo.getDependentLookups)({type:t,parents:n,displayNamePrefix:r,max:o,offset:i}).then((e=>{let{codeValues:n}=e;return(0,u.propOr)({},t,n)}))},resolveLookups:(e,t)=>{const n=t.map((t=>({type:e,codeValue:t})));return(0,Fo.resolveLookupsList)(n).then((t=>{if(Array.isArray(t)){const n=t.reduce(((t,n)=>hb({},t,n[e])),{});s(v.profile.lookups.actions.lookupsForTypeResolved({type:e,values:n}))}}))}};case Fo.DataTypes.TYPE_TYPEAHEAD:return{getSuggestions:c};case Fo.DataTypes.TYPE_NUMBER:case Fo.DataTypes.TYPE_FLOAT:case Fo.DataTypes.TYPE_DOUBLE:case Fo.DataTypes.TYPE_LONG:case Fo.DataTypes.TYPE_INT:return{format:(0,Fo.getNumberFormat)(t,a,Fo.intl.getLocale())};case Fo.DataTypes.TYPE_FILE:return{tenant:r};case Fo.DataTypes.TYPE_SELECT:return{entries:g};default:return{}}})(t,l);return s=(0,u.mergeDeepLeft)(s,gb({},Dh,{className:d.marginDense,InputProps:{disableUnderline:(e=>(0,u.is)(Object,e)&&(0,u.has)("value",e)?(0,Fo.isEmptyValue)(e.value):(0,Fo.isEmptyValue)(e))(i)}})),class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{fullWidth:n,TextFieldProps:o,color:i}=t,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["fullWidth","TextFieldProps","color"]);switch(e){case Fo.DataTypes.TYPE_STRING:case Fo.DataTypes.TYPE_CIK_ID:case Fo.DataTypes.TYPE_ENTITY_ID:case Fo.DataTypes.TYPE_URL:case Fo.DataTypes.TYPE_BLOG_URL:case Fo.DataTypes.TYPE_IMAGE_URL:return r().createElement(Rf,pb({fullWidth:n},o,a));case Fo.DataTypes.TYPE_EMAIL:return r().createElement(Rf,pb({fullWidth:n},o,a,{type:"email"}));case Fo.DataTypes.TYPE_TEXT:case Fo.DataTypes.TYPE_BLOB:return r().createElement(Rf,pb({fullWidth:n,rowsMax:7},o,a,{multiline:!0}));case Fo.DataTypes.TYPE_PASSWORD:return r().createElement(Rf,pb({fullWidth:n},o,a,{type:"password"}));case Fo.DataTypes.TYPE_LONG:case Fo.DataTypes.TYPE_INT:case Fo.DataTypes.TYPE_COUNT:return r().createElement(zf,pb({fullWidth:n},o,a,{integer:!0}));case Fo.DataTypes.TYPE_FLOAT:case Fo.DataTypes.TYPE_DOUBLE:case Fo.DataTypes.TYPE_NUMBER:case Fo.DataTypes.TYPE_DOLLAR:return r().createElement(zf,pb({fullWidth:n},o,a));case Fo.DataTypes.TYPE_BOOLEAN:case Fo.DataTypes.TYPE_BOOLEAN_RADIO:case Fo.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return r().createElement(eh,pb({color:i},a,{className:null==o?void 0:o.booleanRadioEditorClassName}));case Fo.DataTypes.TYPE_DATE:case Fo.DataTypes.TYPE_ACTIVENESS_DATE:case Fo.DataTypes.TYPE_LOCAL_DATE:return r().createElement(sh,pb({},o,a));case Fo.DataTypes.TYPE_TIMESTAMP:return r().createElement(Kf,pb({},o,a));case Fo.DataTypes.TYPE_ENUM:case Fo.DataTypes.TYPE_SELECT:return r().createElement(db,pb({fullWidth:n,TextFieldProps:o},a));case Fo.DataTypes.TYPE_LOOKUP:return r().createElement(qh,pb({fullWidth:n,TextFieldProps:o},a));case Fo.DataTypes.TYPE_TYPEAHEAD:return r().createElement(mg,pb({fullWidth:n},o,a));case Fo.DataTypes.TYPE_DEPENDENT_LOOKUP:return r().createElement(Kv,pb({fullWidth:n,TextFieldProps:o},a));case Fo.DataTypes.TYPE_FILE:return r().createElement(tb,a);default:return r().createElement(Rf,pb({fullWidth:n},o,a))}}}.build(l.type,gb({onChange:a,value:i,TextFieldProps:s},p,c))};yb.propTypes={fieldName:l().string,value:l().any,onChange:l().func,dataTypeDefinition:l().object},yb.displayName="DataTypeValueEditor";const vb=(0,n.memo)(yb),bb=window["material-ui"].FormControl;var xb=h.n(bb);const wb=window["material-ui"].FormHelperText;var Sb=h.n(wb);function Eb(){return Eb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eb.apply(this,arguments)}const Ob=(0,n.memo)((e=>{let{errorMessage:t,children:n,className:o,classes:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["errorMessage","children","className","classes"]);const l=xp(),s=!!t;return r().createElement(xb(),Eb({className:c()(l.wrapper,o,null==i?void 0:i.root),error:!0},a),n,s&&r().createElement(Sb(),{className:c()(l.helperText,null==i?void 0:i.helperText)},r().createElement(wp,{message:t})))})),Cb=(0,u.curry)(((e,t,n)=>{const r=((e,t)=>{const{type:n}=(0,Fo.getAttrDataTypeDefinition)(e);switch(n){case Fo.DataTypes.TYPE_BOOLEAN:case Fo.DataTypes.TYPE_BOOLEAN_RADIO:case Fo.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case Fo.DataTypes.TYPE_DATE:return t&&No()(t).format("YYYY-MM-DD")||"";case Fo.DataTypes.TYPE_TIMESTAMP:return t&&No()(t).format()||"";case Fo.DataTypes.TYPE_ACTIVENESS_DATE:case Fo.DataTypes.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}})(t,n);return{value:r,uri:e.uri,attributeType:t}})),_b=r().createContext({enabled:!1,queueSizeThreshold:0});_b.Provider.propTypes={value:l().shape({enabled:l().bool,queueSizeThreshold:l().number})},_b.displayName="AsyncMountContext";let kb=0;const Tb=()=>{const e=(0,n.useRef)(!0),{enabled:t,queueSizeThreshold:r=0}=(0,n.useContext)(_b),[o,i]=(0,n.useState)(!t||t&&kb<r);e.current&&kb++;const a=(0,n.useRef)();return(0,n.useEffect)((()=>{if(kb--,!o)return a.current=setTimeout((()=>{i(!0)}),0),()=>clearTimeout(a.current)}),[]),e.current=!1,o};function Pb(){return Pb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pb.apply(this,arguments)}function Mb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Rb(e,t,n[t])}))}return e}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ib={},Db=(e,t,n)=>{const r=b().selectors.getDependentLookupsStructureNode(e,n);if(r){const n=t.uri,{parents:a,missedParentsAttributeTypes:l}=((e,t,n)=>{var r;const o=n.parents.flatMap((t=>{const n=b().selectors.getDependentLookupsStructureNode(e,t);return n.values.map((e=>Mb({},e,{type:t,dependentLookupCode:n.attrType.dependentLookupCode})))})),i=b().selectors.getModifiedEntities(e),a=b().selectors.getEntityUri(e),l=b().selectors.getAllRelationsToAddAndEdit(e),s=b().selectors.getMetadata(e),c=(0,Fo.filterRelatedParentValuesForDependentLookupValueUri)({parentValues:o,valueUri:t,entityUri:a,modifiedEntities:i,connections:l}),d=(0,u.pipe)(Fo.getAttributeValuePath,(0,u.defaultTo)([]),(0,u.map)((0,u.pipe)((0,u.path)(["valueType","uri"]),Fo.getBaseUri)),(0,u.prepend)(null===(r=i[a])||void 0===r?void 0:r.type),(0,u.reject)(u.isNil),u.uniq)({entityUri:a,entitiesMap:i,connections:l,metadata:s},t),p=n.parents.filter((e=>d.some((0,Fo.areOneHierarchyUris)(e)))).map((t=>b().selectors.getDependentLookupsStructureNode(e,t).attrType)).filter((e=>!c.some((t=>{let{type:n,value:r}=t;return r&&n===e.uri}))));return{parents:Object.values(c.reduce(((e,t)=>{var n;const r=(e=>`${e.type}_${(0,Fo.getParentUri)(e.uri)}`)(t);return Mb({},e,{[r]:{type:t.dependentLookupCode,codeValues:(0,u.uniq)([t.value,...(null===(n=e[r])||void 0===n?void 0:n.codeValues)||[]]).filter(Boolean).sort()}})}),{})).filter((e=>!!e.codeValues.length)),missedParentsAttributeTypes:p}})(e,n,r),{isBlocked:s=!1}=b().selectors.getDependentLookupEditorState(e,n)||{},c=(o=l).length?p().text("Please select value for ${labels} ${attributes}.",{labels:(i=o.map((0,u.pipe)((0,u.prop)("label"),(e=>`'${e}'`))),i.reduce(((e,t,n)=>[e,t].join(n===i.length-1?` ${p().text("and")} `:", ")))),attributes:1===o.length?p().text("attribute"):p().text("attributes")}):"",d=!(null!=t&&t.lookupCode||null!=t&&t.value),h=d&&s&&p().text("Populating values...")||d&&c||"",f={parents:c?null:a,disabled:!!c&&d||s,placeholder:h};return h&&(f.value=null),((e,t)=>{const n=Ib[e];return(0,u.equals)(t,n)?n:((0,u.equals)(null==n?void 0:n.parents,t.parents)&&(t.parents=n.parents),Ib[e]=t,t)})(n,f)}var o,i},Ab=r().createContext(!1);let Lb;Ab.displayName="ProfilePerspectiveViewContext",function(e){e.Error="Error",e.NewAttribute="NewAttribute"}(Lb||(Lb={}));const Nb=e=>e===Lb.Error,jb=r().createContext({element:null,type:null,highlightError:El,highlightAttribute:El,scrollIntoRef:El});function zb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Fb(e,t,n[t])}))}return e}function Fb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bb={content:'""',position:"absolute",left:"-1000px",top:"0px",width:"5000px",height:"calc(100% - 10px)",animationName:"$highlightAnimation",animationDuration:"2s",animationIterationCount:1,opacity:0},Wb=(0,i.makeStyles)((()=>({"@keyframes highlightAnimation":{"0%":{opacity:0},"50%":{opacity:1},"100%":{opacity:0}},highlightError:{"&::before":zb({},Bb,{background:"rgba(255, 0, 0, 0.06)"})},highlightWarning:{"&::before":zb({},Bb,{background:"rgba(228, 151, 0, 0.08)"})},simpleAttribute:{position:"relative","&::before":{top:"-4px",height:"calc(100% + 8px)"}}}))),Ub=e=>{let{highlightedError:t,isSimple:r=!1}=e;const o=Wb(),i=(0,n.useRef)(null),{element:a,scrollIntoRef:l}=t||{},s=(0,n.useMemo)((()=>(0,u.propOr)(Fo.ErrorSeverity.ERROR,"severity")(a)),[a]),d=c()({[o.highlightError]:s===Fo.ErrorSeverity.ERROR,[o.highlightWarning]:s===Fo.ErrorSeverity.WARNING,[o.simpleAttribute]:r});return(0,n.useEffect)((()=>{t&&l(i)}),[t,l]),t?{ref:i,errorClassName:d}:{ref:i}},Hb=(0,i.makeStyles)((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px",position:"relative"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center"},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}})));function Vb(){return Vb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vb.apply(this,arguments)}const Gb=e=>{let{className:t,attributeValue:i,attributeType:a,isReltioCrosswalk:l,ownError:s,mode:d,onAddOneMore:h,onDeleteAttribute:f,onChangeAttribute:g,onDeactivateError:m,additionalControlsRenderer:y,state:x,highlightedError:w,isEmptyEditor:S=!1}=e,E=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state","highlightedError","isEmptyEditor"]);const O=Hb(),C="deleted"===x,_="edited"===x,k=(0,Fo.isEditableMode)(d),T=(0,Fo.checkCanCreateAttribute)({attributeType:a,mode:d}),P=(0,Fo.checkCanEditAttribute)({attributeType:a,attributeValue:i,mode:d,isReltioCrosswalk:l}),M=(0,Fo.checkCanDeleteAttribute)({attributeType:a,attributeValue:i,mode:d,isReltioCrosswalk:l}),I=P&&k,D=(0,Fo.getErrorMessage)(s),A=(0,o.useSelector)((e=>(0,Fo.isDependentLookupAttrType)(a)?Db(e,i,null==a?void 0:a.uri):null)),{ref:L,errorClassName:N}=Ub({highlightedError:w,isSimple:!0});(0,n.useEffect)((()=>{S&&(0,Fo.isDependentLookupAttrType)(a)&&!(0,u.has)("lookupCode",i)&&g({attributeType:a,uri:i.uri,value:i.value,silent:!0})}),[S]);const j=(0,n.useMemo)((()=>(0,Fo.getAttrDataTypeDefinition)(a)),[a]),z=(0,n.useMemo)((()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t}=arguments.length>1?arguments[1]:void 0;const{value:n,lookupCode:r}=e;switch(t){case Fo.DataTypes.TYPE_BOOLEAN:case Fo.DataTypes.TYPE_BOOLEAN_RADIO:case Fo.DataTypes.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,Fo.parseBoolean)(n);case Fo.DataTypes.TYPE_DATE:return n&&Fo.utils.dates.toLocalDate(n)||null;case Fo.DataTypes.TYPE_LOCAL_DATE:case Fo.DataTypes.TYPE_TIMESTAMP:case Fo.DataTypes.TYPE_ACTIVENESS_DATE:return n&&new Date(n)||null;case Fo.DataTypes.TYPE_DEPENDENT_LOOKUP:case Fo.DataTypes.TYPE_LOOKUP:return{value:n,lookupCode:r};default:return n}}(i,j)),[i,j]),F=(0,n.useCallback)((()=>{s&&m((0,Fo.getErrorId)(s))}),[s,m]),B=(0,n.useCallback)((0,u.pipe)(Cb(i,a),g,F),[i,a,g,F]),W=!!h&&T&&!a.singleValue,U=!C&&!!f&&M,H=!!D,V=C?{disabled:!0}:{},G=(0,n.useContext)(Ab),{autopopulationContextValue:q}=(e=>{let{enabled:t,attributeTypeUri:r,valueUri:i}=e;const a=(0,o.useDispatch)(),l=(0,o.useSelector)(b().selectors.getLookupAutocomplete),s=t&&(0,Fo.isAutopopulationEnabled)(l,r),c=s?i:null,{isTouched:u=!1}=(0,o.useSelector)((e=>s&&b().selectors.getDependentLookupEditorState(e,i)))||{},d=(0,n.useCallback)((e=>{a(v.profile.dependentLookups.actions.dependentLookupsEditorTouched({uri:e,isTouched:!0}))}),[a]);return{autopopulationContextValue:(0,n.useMemo)((()=>c?{id:c,isTouched:u,onTouch:d}:null),[c,u,d])}})({enabled:G&&(0,Fo.isDependentLookupAttrType)(a),attributeTypeUri:null==a?void 0:a.uri,valueUri:i.uri});return r().createElement("div",{ref:L,className:c()(O.editor,t,N)},r().createElement(Ob,{errorMessage:D,className:O.errorWrapper},r().createElement("div",{className:c()(O["editor-value"],{[O.deleted]:C},{[O["editor-read-only-value"]]:!I}),"data-reltio-id":"reltio-attribute-value"},I?r().createElement(Wv.Provider,{value:q},r().createElement(vb,Vb({fieldName:(0,Fo.attributeUriToSearchUri)(a.uri),value:z,dataTypeDefinition:j,error:H,onChange:B,fullWidth:!0},A,E,V))):r().createElement(Lp,{value:(0,Fo.getAttributeValue)(i),dataTypeDefinition:j}))),r().createElement("div",{className:O["editor-actions"]},_&&r().createElement(R(),{variant:"caption",className:O.editedLabel},"(",p().text("edited"),")"),W&&r().createElement(Ti,{icon:Gp.Z,onClick:h,size:"L",className:c()(O.addButton,O.button)}),y&&y({attributeType:a,attributeValue:i}),U&&r().createElement(Ti,{className:O.button,icon:qp.Z,onClick:()=>{f({uri:i.uri,attributeType:a}),(0,Fo.getErrorType)(s)!==Fo.ErrorType.missed&&F()},size:"L","data-reltio-id":"reltio-delete-simple-attribute-button"})))};Gb.propTypes={className:l().string,attributeValue:Fo.SimpleAttributeValueType,attributeType:Fo.AttributeTypeType,ownError:Fo.AttributeErrorType,isReltioCrosswalk:l().bool,state:l().oneOf(["deleted","edited"]),mode:Fo.ModeType,onAddOneMore:l().func,onDeleteAttribute:l().func,onChangeAttribute:l().func,onDeactivateError:l().func,additionalControlsRenderer:l().func,highlightedError:l().object,isEmptyEditor:l().bool};const qb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=(0,n.forwardRef)(((n,o)=>Tb()?r().createElement(e,Pb({},n,{ref:o})):t&&r().createElement(t,Pb({},n,{ref:o}))));return o.displayName="WithAsyncMount",o}(Md(jb,((e,t)=>{let{attributeValue:n}=t;const{element:r,type:o}=e||{};return{highlightedError:Nb(o)&&(null==r?void 0:r.uri)===n.uri?e:null}}),Gb),(()=>{const e=Hb();return r().createElement("div",{className:e.placeholder})}));var Yb=h(8989);const Kb=(0,i.makeStyles)({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function $b(){return $b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$b.apply(this,arguments)}const Zb=e=>{const t=Kb(),{expanded:n,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["expanded","className"]);return r().createElement(Ti,$b({icon:Yb.Z,size:"XXS",disableRipple:!0,iconClassName:c()(t.expandIcon,{[t.expanded]:n}),className:c()(o,t.expandButton),"data-reltio-id":"arrow-expand-button"},i))},Xb=(0,i.makeStyles)((e=>({complexWrapper:{position:"relative"},editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}})));function Qb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jb=e=>{let{label:t,attributeTypesList:o,attributeType:i,attributeValue:a,children:l,errors:s,ownError:u,mode:d,metadata:h,crosswalks:f,lazy:g,showEmptyEditors:m,onAddOneMore:y,onAddAttributes:v,onDeleteAttribute:b,onChangeAttribute:x,additionalControlsRenderer:w,hideDeleteButton:S,state:E,showNonOv:O,isHighlightedPath:C,highlightedError:_,expanded:k=!1}=e;const T=Xb(),P="deleted"===E,M="edited"===E,I=a.uri,A=(0,Fo.isTempUri)(I),L=A||k,[N,j]=(0,n.useState)(L),{ref:z,errorClassName:F}=Ub({highlightedError:_});(0,n.useEffect)((()=>{C&&j(!0)}),[C]),(0,n.useEffect)((()=>{j(L)}),[L]);const B=(0,n.useMemo)((()=>(0,Fo.checkCanDeleteAttribute)({attributeType:i,attributeValue:a,mode:d,metadata:h,isReltioCrosswalk:(0,Fo.isReltioCrosswalk)(f,a)})),[i,a,d,h,f]),W=!P&&!S&&!!b&&B,U=(0,n.useMemo)((()=>(0,Fo.hasAttributeDescendantsWithErrors)(a,s)),[s,a]);(0,n.useEffect)((()=>{U&&j(!0)}),[s,U]),(0,n.useEffect)((()=>{P&&j(!1)}),[P]);const H=(o||[]).some((e=>(0,Fo.isAnalyticAttribute)(e))),V=(0,n.useMemo)((()=>({attributes:H?null:a.value,analyticsAttributes:H?a.value:null})),[a,H]),G=(0,Fo.getErrorMessage)(u)||U&&p().text("Has an incorrect value")||"";return g?r().createElement(D(),{variant:"text",color:"primary",onClick:y},"Create attribute"):r().createElement("div",{ref:z,className:c()(T.complexWrapper,F)},r().createElement("div",{className:T.editor},r().createElement("div",{className:T.titleContainer},r().createElement(Zb,{onClick:()=>j((e=>!e)),expanded:N,className:T.expandButton,disabled:P}),r().createElement(Ob,{errorMessage:G,classes:{helperText:T.errorWrapperHelperText}},r().createElement("div",{className:c()(T.label,{[T.deleted]:P}),"data-reltio-id":"reltio-attribute-complex-label"},t))),r().createElement("div",{className:T.actions},M&&r().createElement(R(),{variant:"caption",className:T.editedLabel},"(",p().text("edited"),")"),w&&w({attributeType:i,attributeValue:a}),W&&r().createElement(Ti,{icon:qp.Z,onClick:()=>b({uri:I,attributeType:i,attributeValue:a}),size:"L","data-reltio-id":"reltio-delete-complex-attribute-button"}))),N&&r().createElement(ak,{parentAttributeType:i,attrTypes:o,entity:V,showEmptyEditors:m||A,drawLines:!0,parentUri:I,mode:d,crosswalks:f,onAddAttributes:v,onChangeAttribute:x,onDeleteAttribute:b,additionalControlsRenderer:w,showNonOv:O},l))};Jb.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Qb(e,t,n[t])}))}return e}({label:l().string,children:l().node,attributeTypesList:l().arrayOf(Fo.AttributeTypeType),attributeValue:l().oneOfType([Fo.NestedAttributeValueType,Fo.ReferenceAttributeValueType]),highlightedError:l().object,isHighlightedPath:l().bool},Fo.ComplexAttributeType);const ex=Md(jb,((e,t)=>{let{attributeValue:n}=t;const{element:r,type:o}=e||{},i=Nb(o);return{highlightedError:i&&(null==r?void 0:r.uri)===n.uri?e:null,isHighlightedPath:i&&(0,u.pipe)((0,u.propOr)([],"path"),(0,u.any)((0,u.pathEq)(["value","uri"],n.uri)))(r)}}),Jb);function tx(){return tx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tx.apply(this,arguments)}const nx=e=>{const{attributeValue:t,attributeType:n}=e,o=(0,Fo.evaluateDeepEntityLabel)(t,n.dataLabelPattern);return r().createElement(ex,tx({label:(0,Fo.getLabel)(o),attributeTypesList:n.attributes||n.analyticsAttributes},e))};nx.propTypes=Fo.NestedAttributeType;const rx=(0,n.memo)(nx),ox=(0,i.makeStyles)((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),ix=(0,i.makeStyles)({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"21px"}}),ax=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:o,components:i},children:a}=e,l=ox();return r().createElement(Iv,e,a,n&&!(0,u.prop)("Group",i)&&r().createElement("span",{className:l.addLabel,onClick:()=>t(o)},r().createElement(Gp.Z,{className:l.addIcon}),n))};ax.propTypes={children:l().element.isRequired,selectProps:l().object.isRequired};const lx=ax;var sx={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},cx=function(e){var t,o;return o=t=function(t){xg(a,t);var n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sg(n);if(o){var r=Sg(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return wg(this,e)});function a(e){var t;return yg(this,a),(t=i.call(this)).select=void 0,t.lastRequest=void 0,t.mounted=!1,t.optionsCache={},t.handleInputChange=function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(i,(function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return i},t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return bg(a,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,o=(n.loadOptions,n.isLoading),i=ve(n,["loadOptions","isLoading"]),a=this.state,l=a.defaultOptions,s=a.inputValue,c=a.isLoading,u=a.loadedInputValue,d=a.loadedOptions,p=a.passEmptyOptions?[]:s&&u?d:l||[];return r().createElement(e,F({},i,{ref:function(e){t.select=e},options:p,isLoading:c||o,onInputChange:this.handleInputChange}))}}]),a}(n.Component),t.defaultProps=sx,o}(xv(vv));const ux=Ly(cx);function dx(){return dx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dx.apply(this,arguments)}function px(e){const{selectProps:{menuIsOpen:t},innerProps:n,children:o}=e,i=ix();return!t&&r().createElement(R(),dx({className:i.singleValue},n),o)}function hx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fx(e,t,n[t])}))}return e}function fx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}px.propTypes={children:l().node,innerProps:l().object};const gx=(0,i.makeStyles)({control:{height:"auto"},dropdownIndicator:{boxSizing:"content-box",transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",lineHeight:"16px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),mx={menu:e=>hx({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>hx({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>hx({},e,{padding:"0 0 8px 0"}),input:e=>hx({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>hx({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},yx={menuList:e=>hx({},e,{padding:0})},vx={input:e=>hx({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};function bx(){return bx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bx.apply(this,arguments)}function xx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wx(e,t,n[t])}))}return e}function wx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Sx=e=>{let{value:t,label:o,createLabel:i,getOptions:a,options:l,height:s=46,onChange:d=u.identity,onCreate:p,onClear:h=u.identity,components:f,textFieldInputRef:g,TextFieldProps:m,classes:y}=e,v=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","createLabel","getOptions","options","height","onChange","onCreate","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const b=gx({height:s}),x=Ah(),[w,S]=(0,n.useState)(!1),E=(0,n.useRef)(null),O=a?ux:wv,C=(0,u.prop)("ClearIndicator",f)?{}:{IndicatorSeparator:Ol,ClearIndicator:Ol},_=p?(e,t)=>{p(e,t),S(!1)}:void 0,k=(0,u.prop)("Group",f)?yx:{},T=(0,u.isEmpty)(o)?vx:{},P=xx({},mx,k,T),M=xx({},b,y);return r().createElement(O,bx({placeholder:"",defaultOptions:!0},v,{value:(0,u.defaultTo)(null,t),loadOptions:a,options:l,cacheOptions:!0,onChange:d,onCreate:_,onClear:h,createLabel:i,classes:M,styles:P,components:xx({DropdownIndicator:kv,LoadingIndicator:Ol,SingleValue:px,Menu:lx},C,f),menuPlacement:"auto",TextFieldProps:xx({},m,{label:o,variant:"filled",margin:"dense",classes:xx({},(0,u.prop)("classes",m),{root:c()(b.formControl,(0,u.path)(["classes","root"],m))}),inputProps:xx({},(0,u.prop)("inputProps",m)),InputProps:xx({},(0,u.prop)("InputProps",m),{classes:xx({},(0,u.path)(["InputProps","classes"],m),{root:c()(b.filledInputRoot,(0,u.path)(["InputProps","classes","root"],m)),underline:c()({[x.filledInputUnderline]:(0,Fo.isEmptyValue)(t)},(0,u.path)(["InputProps","classes","underline"],m)),focused:c()("focused",(0,u.path)(["InputProps","classes","focused"],m))})}),InputLabelProps:xx({},(0,u.prop)("InputLabelProps",m),{classes:xx({},(0,u.path)(["InputLabelProps","classes"],m),{root:c()(b.inputLabel,(0,u.path)(["InputLabelProps","classes","root"],m)),shrink:c()("shrink",(0,u.path)(["InputLabelProps","classes","shrink"],m))}),shrink:!(0,Fo.isEmptyValue)(t)||void 0}),ref:g||E}),inputRef:g||E,menuIsOpen:w,onMenuOpen:()=>S(!0),onMenuClose:()=>S(!1)}))},Ex={value:l().oneOfType([l().object,l().array]),label:l().string.isRequired,getOptions:l().func,options:l().array,onChange:l().func,onCreate:l().func,onClear:l().func,createLabel:l().string,components:l().object,textFieldInputRef:l().object,TextFieldProps:l().object,height:l().number,classes:l().object};Sx.propTypes=Ex;const Ox=Sx;var Cx=h(8018);function _x(){return _x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_x.apply(this,arguments)}const kx=e=>{const t=(0,o.useSelector)(b().selectors.getAbsoluteImagePath)||"";return r().createElement(Cx.ZP,_x({},e,{storagePath:(n=t,n.endsWith("/")?n:n+"/")}));var n},Tx=(0,i.makeStyles)({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}}),Px=(0,i.makeStyles)((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none",pointerEvents:"all"}}))),Mx=(0,i.makeStyles)((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),Rx=(0,i.makeStyles)({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}});function Ix(){return Ix=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ix.apply(this,arguments)}const Dx=e=>{let{innerRef:t,innerProps:n,selectOption:o,data:i}=e;const a=Tx(),{uri:l,entityType:s,label:c,secondaryLabel:u}=i;return""!==l?r().createElement(ms(),Ix({className:a.entityContainer,ref:t,key:l,onClick:()=>o({label:c,uri:l,entityType:s})},n),r().createElement(kx,{className:a.entityAvatar,entityType:s}),r().createElement(al,{value:`${c}${u?", "+u:""}`},r().createElement("span",{className:a.entityLabel},c,u&&r().createElement("span",{className:a.entitySecondaryLabel},", ",u)))):r().createElement(ms(),Ix({className:a.entityContainer,ref:t,key:l},n,{disabled:!0}),r().createElement("span",{className:a.emptyEntityLabel},p().text("No results found")))};Dx.propTypes={innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),innerProps:l().object.isRequired,selectOption:l().func.isRequired,data:l().shape({uri:l().string.isRequired,label:l().string.isRequired,entityType:Fo.EntityType.isRequired})};const Ax=Dx,Lx=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:i,disableLinkClick:a},children:l,data:s}=e,d=Px(),h=(0,o.useDispatch)(),f=(0,n.useContext)(kl),{generateEntityUrl:g}=(0,n.useContext)(Cs),m=(0,o.useSelector)(b().selectors.getUIPath),y=(0,Fo.isTempUri)(s.entityUri)?{className:d.singleValue,component:"span"}:{className:c()(d.singleValue,d.linkValue),onMouseDown:e=>{e.stopPropagation(),a||(0,u.pipe)((0,u.always)({uri:s.entityUri,viewId:f}),v.ui.actions.openEntity,h)()},onClick:e=>e.preventDefault(),href:g({uiPath:m,uri:s.entityUri}),component:"a"};return!i&&r().createElement(R(),y,(0,Fo.isTempUri)(s.entityUri)?p().text(`New ${t.label} will be created`):(0,Fo.getLabel)(l))};Lx.propTypes={children:l().string,data:l().object.isRequired,selectProps:l().object.isRequired};const Nx=Lx;var jx=h(3375);const zx=e=>{const{selectProps:{onClear:t}}=e,n=Rx();return r().createElement(j(),{onClick:t},r().createElement(jx.Z,{className:n.clearIcon}))};zx.propTypes={selectProps:l().object.isRequired};const Fx=zx,Bx=e=>e&&e.attributes,Wx=e=>{let{entity:t,entityType:o,attributeTypesSelectionStrategy:i=Bx,mode:a,onAddAttributes:l,onDeleteAttribute:s,onChangeAttribute:c}=e;const u=(0,n.useMemo)((()=>i(o)),[i,o]);return t?r().createElement(ak,{key:t.uri,attrTypes:u,entity:t,showEmptyEditors:!0,drawLines:!0,parentUri:t.uri,mode:a,crosswalks:t.crosswalks,onAddAttributes:l,onChangeAttribute:c,onDeleteAttribute:s}):null};Wx.propTypes={entityUri:l().string,parentUri:l().string,entity:l().object,entityType:l().object,attributeTypesSelectionStrategy:l().func,mode:Fo.ModeType,onAddAttributes:l().func,onDeleteAttribute:l().func,onChangeAttribute:l().func};const Ux=Wx,Hx={onAddAttributes:v.profile.actions.addAttributes,onDeleteAttribute:v.profile.actions.removeAttribute,onChangeAttribute:v.profile.actions.modifyAttribute},Vx=(0,o.connect)(((e,t)=>({entity:t.entityUri&&b().selectors.getModifiedEntity(e,t.entityUri)})),Hx)(Ux),{Group:Gx}=ry,qx=e=>{const{selectProps:{inputValue:t,onCreate:n},data:o,children:i}=e,a=Mx();return r().createElement(Gx,e,r().createElement("div",{className:a.groupHeading},r().createElement("span",null,o.label),n&&r().createElement("span",{onClick:()=>n(t,o.entityType),className:a.addLabel},r().createElement(Gp.Z,{className:a.addIcon}),p().text(`Create ${t?`"${t}" as `:""}new ${o.label}`))),i)};qx.propTypes={selectProps:l().object.isRequired,data:l().object,children:l().array};const Yx=qx,Kx=(0,i.makeStyles)({creatorWrapper:{marginTop:"20px"}});function $x(){return $x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$x.apply(this,arguments)}function Zx(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Qx(e,t,n[t])}))}return e}function Qx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jx=e=>{let{entity:t={},entityTypesUris:o=[],mode:i,max:a,onChange:l,onCreate:s,metadata:c,globalSearchRequestOptions:d,attributeTypesSelectionStrategy:h,disableLinkClick:f=!1}=e,g=Zx(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const m=Kx(),[y,v]=(0,n.useState)(""),b=(0,n.useMemo)((()=>o.map((e=>(0,Fo.getEntityType)(c,e))).filter(Fo.isAvailableEntityType)),[o,c]),x=Xx({},d,{max:a}),w=s?(e,t)=>{s(t||o[0],e),v("")}:void 0,S=e=>{null!==e&&(v(""),l(e))},E=(0,n.useMemo)((()=>1!==b.length),[b]),O=((0,u.isEmpty)(t)?b[0]:(0,Fo.getEntityType)(c,t.entityType))||{},C=s&&p().text(`Create ${y?`"${y}" as `:""}new ${O.label}`),_=p().text(`Select ${1===b.length?`${b[0].label} `:""}profile`),k=!(0,u.isEmpty)(t)&&(0,Fo.isTempUri)(t.entityUri),T=E?{Group:Yx,GroupHeading:Ol}:{},P=k?{ClearIndicator:Fx}:{},{TextFieldProps:M}=g,R=Zx(g,["TextFieldProps"]),I=(0,n.useMemo)((()=>Xx({},M||{},{"data-reltio-id":"reltio-entity-selector"})),[M]);return r().createElement(r().Fragment,null,r().createElement(Ox,$x({value:(0,u.isEmpty)(t)?void 0:t,inputValue:y,onInputChange:e=>{v(e)},getOptions:e=>(0,Fo.typeAheadSearch)(b,e,x).then(((e,t)=>n=>{const r=n.map((t=>Xx({},t,{label:(0,Fo.getLabel)(t.label),entityType:e.find((e=>{let{uri:n}=e;return n===t.type}))}))),o=e=>(0,u.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e,i=t?e:e.filter((e=>r.some((t=>t.type===e.uri))));return i.length>1?i.map((e=>({label:e.label,entityType:e.uri,options:o(r.filter((t=>t.type===e.uri)))}))):o(r)})(b,s)),getOptionLabel:(0,u.prop)("entityLabel"),onChange:S,onCreate:w,onClear:()=>{S({})},label:_,createLabel:C,components:Xx({Option:Ax,SingleValue:Nx},T,P),currentEntityType:O,isClearable:!0,disableLinkClick:f,TextFieldProps:I},R)),k&&r().createElement("div",{className:m.creatorWrapper},r().createElement(Vx,{mode:i,attributeTypesSelectionStrategy:h,entityType:O,entityUri:t.entityUri})))};Jx.propTypes={entity:Fo.ConnectionEntityType,entityTypesUris:l().arrayOf(l().string),max:l().number,mode:Fo.ModeType,dispatch:l().func,metadata:Fo.MetadataType,onChange:l().func.isRequired,onCreate:l().func,attributeTypesSelectionStrategy:l().func,globalSearchRequestOptions:l().object,disableLinkClick:l().bool};const ew=Jx,tw=(0,i.makeStyles)({item:{marginBottom:"20px"},dense:{marginBottom:0}});function nw(){return nw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nw.apply(this,arguments)}function rw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ow(e,t,n[t])}))}return e}function ow(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const iw=e=>{const t=tw(),{modifiedEntity:o,metadata:i,globalSearchRequestOptions:a,onDeleteModifiedEntity:l,onUpdateModifiedEntity:s,onDeactivateError:d,highlightedError:p}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["modifiedEntity","metadata","globalSearchRequestOptions","onDeleteModifiedEntity","onUpdateModifiedEntity","onDeactivateError","highlightedError"]),{attributeValue:f,attributeType:g,mode:m,crosswalks:y,errors:v,onChangeAttribute:b}=h,x=(0,n.useRef)(f),{ref:w,errorClassName:S}=Ub({highlightedError:p,isSimple:!0}),E=(0,Fo.getReferencedEntityFromAttrValue)(f),O=(0,Fo.getReferencedRelationFromAttrValue)(f),C=(0,Fo.getReferencedEntityTypeUriFromAttrType)(g),_=(0,Fo.getEntityType)(i,C),k=o?(0,Fo.evaluateDeepEntityLabel)(o,_.dataLabelPattern):f.label,T=(0,n.useMemo)((()=>[C]),[C]),P=(0,n.useMemo)((()=>(0,Fo.addReferencedRelationCrosswalks)(y,O)),[y,O]),M=(0,n.useMemo)((()=>(0,Fo.getReferencedEntityActiveError)(f,v)),[f,v]),R=(0,n.useMemo)((()=>E&&{entityUri:(0,Fo.getReferencedEntityUri)(E),entityType:(0,Fo.getReferencedEntityTypeUri)(E),entityLabel:f.label}),[E,f.label]),I=(0,n.useMemo)((()=>(0,Fo.getReferencedRelationAttrTypesUris)(g).map((e=>(0,Fo.findAttributeTypeByUri)(i,e))).filter(u.identity)),[g,i]),D=(0,n.useCallback)((e=>(0,Fo.referencedEntityAttributeTypesSelectionStrategy)(g,e)),[g]),A=(0,n.useCallback)((e=>{o&&l(o.uri);const t=x.current,n=!(0,u.isEmpty)(e)&&e.uri===(0,Fo.getReferencedEntityUriFromAttrValue)(t),r=rw({},f,{label:e.label,refEntity:n?t.refEntity:(0,Fo.convertReferencedEntityForAttrValue)(e),refRelation:n?t.refRelation:(0,Fo.createReferencedRelationForAttrValue)(f)});b({value:r,attributeType:g,uri:f.uri}),M&&d((0,Fo.getErrorId)(M))}),[f,g,o,b,l,d,M]),L=(0,n.useCallback)(((e,t)=>{const n=(0,u.pipe)(D,(0,Fo.getCreatableAttributeTypes)(m))(_),r=(0,Fo.createTemporaryEntity)({entityTypeUri:e,initValue:t,attributeTypes:n,metadata:i,mode:m});A(r),s(r)}),[D,m,_,i,A,s]),N=(0,n.useMemo)((()=>(0,Fo.checkCanEditAttribute)({attributeType:g,attributeValue:f,mode:m,isReltioCrosswalk:(0,Fo.isReltioCrosswalk)(y,f)})),[g,f,m,y]),j=(0,n.useMemo)((()=>(0,Fo.checkMetadataForCreate)(m,_)),[m,_]),z=(0,Fo.getErrorMessage)(M);return r().createElement(ex,nw({},h,{label:(0,Fo.getLabel)(k),attributeTypesList:I,crosswalks:P,metadata:i}),r().createElement("div",{ref:w,className:S},r().createElement(Ob,{errorMessage:z},r().createElement(ew,{className:c()(t.item,{[t.dense]:z||R&&(0,Fo.isTempUri)(R.entityUri)}),entity:R||{},entityTypesUris:T,max:20,globalSearchRequestOptions:a,mode:m,isDisabled:!N,onChange:A,onCreate:j?L:void 0,metadata:i,attributeTypesSelectionStrategy:D}))))};iw.propTypes=rw({},Fo.ReferenceAttributeType,{modifiedEntity:Fo.EntityType,metadata:Fo.MetadataType,globalSearchRequestOptions:l().object,onDeleteModifiedEntity:l().func,onUpdateModifiedEntity:l().func,onDeactivateError:l().func,highlightedError:l().object});const aw=Md(jb,((e,t)=>{let{attributeValue:n,attributeType:r}=t;const{element:o,type:i}=e||{};return{highlightedError:Nb(i)&&(0,Fo.isAttributeTypeError)(o,n.uri,r.uri)?e:null}}),iw),lw={onDeleteModifiedEntity:v.profile.modifiedEntities.actions.entityDeleted,onUpdateModifiedEntity:v.profile.modifiedEntities.actions.entityCreated,onDeactivateError:v.profile.errors.actions.errorDeactivated},sw=(0,o.connect)(((e,t)=>{const n=(0,Fo.getReferencedEntityUriFromAttrValue)(t.attributeValue);return{modifiedEntity:(0,Fo.isTempUri)(n)?b().selectors.getModifiedEntity(e,n):null,metadata:b().selectors.getMetadata(e),globalSearchRequestOptions:b().selectors.getGlobalSearchRequestOptions(e,["ovOnly"])}}),lw)(aw);function cw(){return cw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cw.apply(this,arguments)}const uw=(0,n.forwardRef)(((e,t)=>{const{className:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className"]);return r().createElement("div",{ref:t,className:n},class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{showEmptyEditors:n,onAddAttributes:o,lazy:i,errors:a,crosswalks:l,showNonOv:s,expanded:c}=t,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv","expanded"]);switch(e.type){case Fo.DataTypes.TYPE_NESTED:return r().createElement(rx,t);case Fo.DataTypes.TYPE_REFERENCE:return r().createElement(sw,t);default:return r().createElement(qb,cw({isReltioCrosswalk:(0,Fo.isReltioCrosswalk)(l,t.attributeValue)},u))}}}.build(e.attributeType,o))}));uw.displayName="Attribute";const dw=uw,pw=(0,i.makeStyles)((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",position:"relative"},description:{marginRight:"-9px"},attributesWrapper:{width:"100%",marginBottom:"10px"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",marginTop:"-1px",textIndent:0},titleWrapper:{flex:1,paddingBottom:"3px"}}))),hw=e=>p().text("${value}",{value:1===e?p().text("value"):p().text("values")}),fw=(0,u.has)("minValue"),gw=(0,u.has)("maxValue"),mw=(0,u.pipe)(gw,u.not),yw=(0,u.propSatisfies)((e=>1===e),"minValue"),vw=e=>{let{minValue:t}=e;return p().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:p().number(t,"0"),minValueCaption:hw(t)})},bw=e=>{let{maxValue:t}=e;return p().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:p().number(t,"0"),maxValueCaption:hw(t)})},xw=(0,u.cond)([[u.isNil,(0,u.always)("")],[e=>{let{minValue:t,maxValue:n}=e;return t&&t===n},e=>{let{minValue:t}=e;return p().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:p().number(t,"0"),minValueCaption:hw(t)})}],[(0,u.allPass)([yw,gw]),bw],[(0,u.allPass)([yw,mw]),(0,u.always)("")],[(0,u.allPass)([fw,gw]),e=>{let{minValue:t,maxValue:n}=e;return p().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:vw({minValue:t}),maxValue:p().number(n,"0"),maxValueCaption:hw(n)})}],[gw,bw],[fw,vw],[u.T,(0,u.always)("")]]),ww=e=>{let{cardinality:t}=e;const n=pw();return r().createElement(R(),{variant:"caption",className:n.caption},xw(t))};ww.propTypes={cardinality:Fo.CardinalityType};const Sw=ww,Ew=(0,u.filter)((0,u.propSatisfies)(Fo.isTempUri,"uri")),Ow=r().createContext(null),Cw=r().createContext({showDescription:!1,showNavigateToGraph:!0});function _w(){return _w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_w.apply(this,arguments)}Cw.displayName="FeaturesContext";const kw=e=>r().createElement("svg",_w({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M5.417 9.5h1.166V8.333H5.417V9.5zM6 .167A5.835 5.835 0 00.167 6 5.835 5.835 0 006 11.833 5.835 5.835 0 0011.833 6 5.835 5.835 0 006 .167zm0 10.5A4.673 4.673 0 011.333 6 4.673 4.673 0 016 1.333 4.673 4.673 0 0110.667 6 4.673 4.673 0 016 10.667zM6 2.5a2.333 2.333 0 00-2.333 2.333h1.166A1.17 1.17 0 016 3.667a1.17 1.17 0 011.167 1.166c0 1.167-1.75 1.021-1.75 2.917h1.166c0-1.313 1.75-1.458 1.75-2.917A2.333 2.333 0 006 2.5z",fill:"#000",fillOpacity:.54})),Tw=(0,i.makeStyles)((()=>({container:{height:"15px",backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"}},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px"},icon:{width:"12px",height:"12px",marginRight:0}}))),Pw=Oi(Tp()),Mw=e=>{let{className:t,description:o}=e;const{showDescription:i}=(0,n.useContext)(Cw),a=Tw();return o&&i?r().createElement(Pw,{tooltipTitle:o,tooltipPlacement:"bottom",icon:r().createElement(kw,null),classes:{root:c()(a.container,t),label:a.label,icon:a.icon}}):null};function Rw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Iw(e,t,n[t])}))}return e}function Iw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dw={content:'""',position:"absolute",left:"-1000px",top:"-4px",width:"5000px",height:"calc(100% + 8px)",animationName:"$highlightAnimation",animationDuration:"2s",animationIterationCount:1,opacity:0},Aw=(0,i.makeStyles)((()=>({"@keyframes highlightAnimation":{"0%":{opacity:0},"50%":{opacity:1},"100%":{opacity:0}},highlighted:{"&::before":Rw({},Dw,{background:"rgba(228, 151, 0, 0.08)"}),position:"relative"}}))),Lw=e=>{const t=Aw(),r=(0,n.useRef)(null),{scrollIntoRef:o}=e||{};return(0,n.useEffect)((()=>{e&&o(r)}),[e,o]),e?{ref:r,highlightedClassName:t.highlighted}:{ref:r}},Nw=e=>{let{max:t,values:o,attributeType:i,parentUri:a,mode:l,drawLines:s,showEmptyEditors:d,errorMessage:p,errors:h,paging:f,crosswalks:g,showNonOv:m,nonVisibleValues:y,highlightedError:v,highlightedAttribute:b,onAddAttributes:x,onDeleteAttribute:w,onChangeAttribute:S,onDeactivateError:E,additionalControlsRenderer:O,requestNextPageOfAttributeValues:C}=e;const _=pw(),[k,T]=(0,n.useState)(t),[P,M]=(0,n.useState)(!1),{label:R,required:I,cardinality:D,name:A,uri:L,description:N}=i,j=(0,Fo.isEditableMode)(l),{ref:z,errorClassName:F}=Ub({highlightedError:v}),{ref:B,highlightedClassName:W}=Lw(b),U=(0,n.useContext)(Ow),H=(0,n.useMemo)((()=>null==U?void 0:U.includes(L)),[L,U]),V=(0,Fo.isEmptyValue)(o),G=(!P&&d||I||H)&&V,q=(0,n.useRef)((0,Fo.createNewAttribute)({parentUri:a,attributeType:i})),Y=(0,n.useCallback)((()=>{T(k+1);const e={parentUri:a,index:k,attributeType:i};return x(G&&!(0,Fo.isComplexAttribute)(i.type)?[e,e]:[e])}),[k,x,a,i,G]),K=(0,n.useCallback)((0,u.pipe)(w,u.T,M),[w,M]);if(V&&!G)return null;if(G&&V&&(o=[q.current]),(0,Fo.isEmptyValue)(o))return null;const $=(Ew(o)||[]).length,Z=m?"totalValues":"totalOvValues",X=(0,u.ifElse)((0,u.has)(Z),(0,u.pipe)((0,u.prop)(Z),(0,u.add)($)),(0,u.always)(o.length))(f),Q=null!=f&&f.totalValues?f.totalValues-X:null==y?void 0:y.length,J=t<X,ee=J&&k<X,te=J&&k>=X,ne=o.slice(0,k),re=ne?ne.length-1:0,oe=X-k;return r().createElement(bp,{enabled:s},r().createElement("div",{ref:z,className:c()(_.wrapper,F)},r().createElement("div",{className:_.titleWrapper},r().createElement(_p,{label:R,isRequired:I,className:_.title,"data-reltio-id":"reltio-attribute-label"}),r().createElement(Mw,{description:N,className:_.description}),r().createElement(Fp,{nonOvValues:y,attributeType:i,className:_.ovIcon,nonOvTotal:Q})),j&&r().createElement(Sw,{cardinality:D}),j&&r().createElement(wp,{message:p,className:_.typeError}),r().createElement("div",{className:_.attributesWrapper},ne.map(((e,t)=>r().createElement(dw,{key:e.uri,attributeValue:e,attributeType:i,lazy:G&&!I,showEmptyEditors:d,errors:h,ownError:(0,Fo.getAttributeOwnError)(e,t,i.uri,h),mode:l,crosswalks:g,onAddOneMore:re===t?Y:null,onAddAttributes:x,onDeleteAttribute:K,onChangeAttribute:S,onDeactivateError:E,additionalControlsRenderer:O,className:0===t?W:null,ref:0===t?B:null,isEmptyEditor:G}))),ee&&r().createElement(Vp,{moreNumber:(0,u.min)(t,oe),valueNumber:oe,onClick:()=>{o.length<X&&C({parentUri:a,attributeTypeUri:L,attributeTypeName:A,values:o,defaultMaxValues:t}),T(k+t)}}),te&&r().createElement(Up,{onClick:()=>{T(t)}}))))};Nw.displayName="AttributeRenderer";const jw=(0,n.memo)(Nw),zw=(0,i.makeStyles)({value:{color:"rgba(0, 0, 0, 0.87)"},placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}}),Fw=e=>{let{selectProps:{menuIsOpen:t},data:{label:n}}=e;const o=zw();return!t&&r().createElement(R(),{variant:"body2",classes:{root:o.value}},n)};Fw.propTypes={selectProps:l().shape({menuIsOpen:l().bool}),data:l().shape({label:l().string})};const Bw=Fw;function Ww(){return Ww=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ww.apply(this,arguments)}const Uw=e=>{const t=zw(),{innerProps:n={},children:o}=e;return r().createElement(R(),Ww({className:t.placeholder},n),o)};function Hw(){return Hw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hw.apply(this,arguments)}Uw.propTypes={children:l().node,innerProps:l().object,selectProps:l().object.isRequired};const Vw={SingleValue:Bw,Placeholder:Uw},Gw=(0,n.memo)((e=>{let t=Hw({},e);return r().createElement(Ox,Hw({components:Vw},t))})),qw=(0,i.makeStyles)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}}),Yw={MultiValue:jv},Kw=e=>{let{values:t,onChange:i,onDelete:a}=e;const l=qw(),s=(0,o.useSelector)(b().selectors.getMetadata),c=(0,o.useSelector)(b().selectors.getEntity),d=c.uri,p=(0,Fo.getRolesForEntityType)(s,c.type).map((e=>({value:e.uri,label:e.label}))),h=(t||[]).map((e=>{var t;return{value:e,label:(null===(t=p.find((0,u.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,Fo.getLastUriPart)(e)}})),f=(0,n.useCallback)((e=>{const t=(null==e?void 0:e.map((0,u.prop)("value")))||[];i({value:t,attributeType:Fo.EntityAttrTypes.roles,uri:d})}),[d,i]),g=(0,n.useCallback)((()=>{a({uri:d,attributeType:Fo.EntityAttrTypes.roles})}),[d,a]);return r().createElement("div",{className:l.container,"data-reltio-id":"reltio-attribute-value"},r().createElement(Gw,{label:"",height:40,isMulti:!0,options:p,value:h,onChange:f,components:Yw,classes:l,className:l.roleContainer}),!!a&&r().createElement(Ti,{className:l.deleteButton,icon:qp.Z,onClick:g,size:"L"}))},$w=(0,i.makeStyles)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},deleteButton:{marginLeft:"8px"}}),Zw=e=>e?`?filter=${(0,Fo.buildFilterQueryString)()((e=>[{filter:"containsWordStartingWith",fieldName:"tags",values:[e]}])(e))}`:"",Xw=[{fieldName:"tags",orderType:"reversedCount"}],Qw=e=>(0,Fo.getFacets)({query:Zw(e),body:Xw}).then((e=>Object.keys(e.tags))),Jw=e=>{let{className:t,values:i,onChange:a,onDelete:l}=e;const s=$w(),c=(0,o.useSelector)(b().selectors.getEntityUri),u=(0,n.useCallback)((e=>{a({value:e,attributeType:Fo.EntityAttrTypes.tags,uri:c})}),[a,c]),d=(0,n.useCallback)((()=>{l({uri:c,attributeType:Fo.EntityAttrTypes.tags})}),[c,l]);return r().createElement("div",{className:s.container,"data-reltio-id":"reltio-attribute-value"},r().createElement(mg,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:i||[],onChange:u,getSuggestions:Qw}),!!l&&r().createElement(Ti,{className:s.deleteButton,icon:qp.Z,onClick:d,size:"L"}))},eS=r().createContext(null);function tS(){return tS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(this,arguments)}function nS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rS=Md(eS,((e,t)=>{let{attributeType:n}=t;const{hasDeletionsMap:r,setHasDeletions:o}=e||{};return{hasDeletions:r?Boolean(r[null==n?void 0:n.uri]):void 0,setHasDeletions:o}}),(e=>{let{values:t,attributeType:o,parentUri:i,mode:a,errorMessage:l,onDeleteAttribute:s,onChangeAttribute:d,showEmptyEditors:p,hasDeletions:h,setHasDeletions:f,highlightedAttribute:g}=e,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors","hasDeletions","setHasDeletions","highlightedAttribute"]);const y=pw(),{label:v,required:b,cardinality:x}=o,w=(0,Fo.isEditableMode)(a),[S,E]=(0,n.useState)(!1),O=(0,n.useCallback)((e=>{E(e),null==f||f(o.uri,e)}),[o.uri,f]),C=void 0!==h?h:S,_=(0,n.useCallback)((0,u.pipe)(s,u.T,O),[s,O]),k=(0,Fo.isEmptyValue)(t),T=!C&&p&&k,P=(0,n.useRef)((0,Fo.createNewAttribute)({parentUri:i,attributeType:o})),{ref:M,highlightedClassName:R}=Lw(g);return(0,Fo.isActivenessAttrType)(o)&&k&&!T?null:r().createElement("div",{ref:M,className:c()(R,y.wrapper)},r().createElement(_p,{label:v,isRequired:b,className:c()(y.title,y.titleWrapper),"data-reltio-id":"reltio-attribute-label"}),w&&r().createElement(Sw,{cardinality:x}),w&&r().createElement(wp,{message:l}),r().createElement(ss(),{className:y.attributesWrapper},(()=>{switch(o.uri){case Fo.EntityAttrTypes.tags.uri:return r().createElement(Jw,{values:t,onDelete:_,onChange:d});case Fo.EntityAttrTypes.roles.uri:return r().createElement(Kw,{values:t,onDelete:_,onChange:d});default:{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nS(e,t,n[t])}))}return e}({},P.current,{value:t[0]||""});return r().createElement(dw,tS({attributeValue:e,attributeType:o,mode:a,onDeleteAttribute:_,onChangeAttribute:d},m))}}})()))}));var oS=h(4438),iS=h(79);function aS(){return aS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aS.apply(this,arguments)}const lS=e=>r().createElement("svg",aS({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("path",{d:"M0 0h24v24H0z"}),r().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"}))),sS=(0,i.makeStyles)((e=>({root:{position:"relative"},image:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,objectFit:"cover",verticalAlign:"bottom"}},defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function cS(){return cS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cS.apply(this,arguments)}const uS="loading",dS="loaded",pS="error",hS={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}},fS=(0,n.memo)((e=>{const{src:t,className:o,containerClassName:i,size:a=hS.SMALL,overlay:l=null}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["src","className","containerClassName","size","overlay"]),u=a||hS.SMALL,d=sS(u),[p,h]=(0,n.useState)(uS);(0,n.useEffect)((()=>{h(uS)}),[t]);const f=p===uS,g=p===dS;return p===pS?r().createElement("div",cS({className:c()(d.defaultContainer,d.image,o)},s),r().createElement(iS.Z,{className:d.defaultImage})):r().createElement("div",{className:c()(d.root,i)},!(0,Fo.isEmptyValue)(t)&&r().createElement("img",cS({src:t,className:c()(d.image,o,{[d.hideImage]:f}),onLoad:()=>{h(dS)},onError:()=>{h(pS)},alt:"image"},s)),f&&r().createElement("div",cS({className:c()(d.defaultContainer,d.image,o)},s),r().createElement(lS,{className:d.defaultImage})),g&&l)}));var gS=h(2669),mS=h(1556);const yS=(0,i.makeStyles)((()=>({root:{fontSize:"24px",color:"#fff"}}))),vS=e=>{let{checked:t,className:n,onClick:o}=e;const i=yS(),a=t?mS.Z:gS.Z;return r().createElement(a,{className:c()(i.root,n),onClick:o})};function bS(){return bS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bS.apply(this,arguments)}const xS=e=>r().createElement("svg",bS({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),r().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"Download_svg__b",fill:"#fff"},r().createElement("use",{xlinkHref:"#Download_svg__a"})),r().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"}))),wS=(0,i.makeStyles)((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),SS=(0,n.memo)((e=>{const{id:t,canBeSelected:o=!1,selected:i=!1,selectionMode:a=!1,onDeselect:l=El,onSelect:s=El,onShareLink:d,onSetAsDefault:h,onDelete:f,onDownload:g=El,onClick:m}=e,y=wS(),[v,b]=(0,n.useState)(!1),x=(0,n.useMemo)((()=>[{text:p().text("Share link"),onClick:d},{text:p().text("Set as default"),onClick:h},{text:p().text("Delete"),onClick:f}].filter((0,u.prop)("onClick"))),[d,h,f]),w=e=>()=>(0,u.ifElse)((0,u.equals)(!0),l,s)(e),S=o&&(i||v||a),E=!a&&!i&&v,O=o&&i;return r().createElement("div",{className:c()(y.overlay,{[y.selected]:i,[y.selectionMode]:a}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:a?w(i):e=>{e.currentTarget===e.target&&m()}},S&&r().createElement(vS,{className:y.checkedIcon,checked:i,onClick:w(i)}),E&&r().createElement("div",{className:y.actions},r().createElement(Ti,{onClick:g,className:y.actionButton,icon:xS}),r().createElement(Es,{menuId:`image-overlay-actions-${t}`,buttonComponent:Ti,buttonProps:{icon:us.Z,className:c()(y.actionButton,y.dropDownMenuButton)},menuItems:x})),O&&r().createElement(D(),{className:y.button,variant:"outlined",onClick:l},p().text("Deselect")))})),ES=window["material-ui"].InputBase;var OS=h.n(ES);const CS=(0,i.makeStyles)((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),_S=e=>0===e.trim().length,kS=e=>{let{onSend:t}=e;const o=CS(),[i,a]=(0,n.useState)(""),[l,s]=(0,n.useState)(null);return r().createElement(ss(),{className:o.root},r().createElement(Nn(),{className:o.paper},r().createElement(OS(),{value:i,onChange:e=>{const t=e.target.value,n=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);a(t),n||_S(t)?s(null):s(p().text("URL is not correct"))},classes:{root:o.inputRoot,input:o.input},placeholder:p().text("Paste an image URL here")}),r().createElement(D(),{disabled:Boolean(l)||_S(i),variant:"outlined",color:"primary",onClick:()=>{t(i),a(""),s(null)}},p().text("Send"))),l&&r().createElement(R(),{className:o.errorMessage},l))};var TS=h(5680),PS="__NATIVE_FILE__",MS="__NATIVE_URL__",RS="__NATIVE_TEXT__";const IS=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],DS=e=>{let{className:t,onAppendFile:n}=e;return r().createElement(r().Fragment,null,r().createElement("input",{onInput:e=>{n&&n(e.currentTarget.files[0])},style:{display:"none"},accept:IS.join(","),id:"upload-image-button","data-reltio-id":"upload-image-button",type:"file"}),r().createElement("label",{htmlFor:"upload-image-button"},r().createElement(D(),{className:t,variant:"contained",color:"primary",component:"span"},p().text("Select image"))))};function AS(){return AS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AS.apply(this,arguments)}const LS=e=>r().createElement("svg",AS({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},r().createElement("stop",{stopColor:"#FFF",offset:"0%"}),r().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},r().createElement("stop",{stopColor:"#FFF",offset:"0%"}),r().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),r().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},r().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),r().createElement("stop",{stopColor:"#000",offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},r().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),r().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),r().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},r().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),r().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),r().createElement("g",{mask:"url(#UploadIcon_svg__b)"},r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},r().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),r().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),r().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),r().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),r().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"})))),NS=(0,i.makeStyles)((e=>({root:{padding:"36px 0 29px"},isActive:{backgroundColor:"rgba(0,114,206,0.12)"},icon:{width:"190px",height:"190px",marginBottom:"24px"},title:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px"},description:{marginBottom:"24px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),jS=e=>{let{onAppendFile:t,className:n}=e;const o=NS(),[{canDrop:i,isOver:a},l]=(0,TS.useDrop)({accept:[PS],drop:e=>{e&&t(e.files[0])},collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})}),s=i&&a;return r().createElement("div",{ref:l,className:c()(o.root,{[o.isActive]:s},n)},r().createElement(LS,{className:o.icon}),r().createElement(R(),{className:o.title},p().text("Drag an image here")),r().createElement(R(),{className:o.description},p().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),r().createElement(DS,{onAppendFile:t}))},zS=(0,i.makeStyles)((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),FS=e=>{let{children:t,className:n}=e;const o=zS();return r().createElement(ss(),{className:c()(o.root,n)},r().createElement(ss(),{className:o.border}),r().createElement(R(),{className:o.text},t),r().createElement(ss(),{className:o.border}))};var BS=h(7685);const WS=window["material-ui"].Snackbar;var US=h.n(WS);const HS=(0,i.makeStyles)({closeIcon:{color:"#fff"}}),VS=e=>{let{error:t,onClose:n}=e;const o=HS();return r().createElement(US(),{open:Boolean(t),onClose:n,message:t,action:r().createElement(Pi,{className:o.closeIcon,tooltipTitle:p().text("Close"),icon:BS.default,onClick:n})})},GS=(0,i.makeStyles)((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}})));function qS(e){var t=null;return function(){return null==t&&(t=e()),t}}function YS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var KS=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,n;return t=e,n=[{key:"enter",value:function(e){var t=this,n=this.entered.length;return this.entered=function(e,t){var n=new Set,r=function(e){return n.add(e)};e.forEach(r),t.forEach(r);var o=[];return n.forEach((function(e){return o.push(e)})),o}(this.entered.filter((function(n){return t.isNodeInDocument(n)&&(!n.contains||n.contains(e))})),[e]),0===n&&this.entered.length>0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}],n&&YS(t.prototype,n),e}(),$S=qS((function(){return/firefox/i.test(navigator.userAgent)})),ZS=qS((function(){return Boolean(window.safari)}));function XS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var QS,JS=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=t.length,o=[],i=0;i<r;i++)o.push(i);o.sort((function(e,n){return t[e]<t[n]?-1:1}));for(var a,l,s=[],c=[],u=[],d=0;d<r-1;d++)a=t[d+1]-t[d],l=n[d+1]-n[d],c.push(a),s.push(l),u.push(l/a);for(var p=[u[0]],h=0;h<c.length-1;h++){var f=u[h],g=u[h+1];if(f*g<=0)p.push(0);else{a=c[h];var m=c[h+1],y=a+m;p.push(3*y/((y+m)/f+(y+a)/g))}}p.push(u[u.length-1]);for(var v,b=[],x=[],w=0;w<p.length-1;w++){v=u[w];var S=p[w],E=1/c[w],O=S+p[w+1]-v-v;b.push((v-S-O)*E),x.push(O*E*E)}this.xs=t,this.ys=n,this.c1s=p,this.c2s=b,this.c3s=x}var t,n;return t=e,n=[{key:"interpolate",value:function(e){var t=this.xs,n=this.ys,r=this.c1s,o=this.c2s,i=this.c3s,a=t.length-1;if(e===t[a])return n[a];for(var l,s=0,c=i.length-1;s<=c;){var u=t[l=Math.floor(.5*(s+c))];if(u<e)s=l+1;else{if(!(u>e))return n[l];c=l-1}}var d=e-t[a=Math.max(0,c)],p=d*d;return n[a]+r[a]*d+o[a]*p+i[a]*d*p}}],n&&XS(t.prototype,n),e}();function eE(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function tE(e){return{x:e.clientX,y:e.clientY}}function nE(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function rE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oE=(rE(QS={},PS,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),rE(QS,MS,{exposeProperties:{urls:function(e,t){return nE(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),rE(QS,RS,{exposeProperties:{text:function(e,t){return nE(e,t,"")}},matchesTypes:["Text","text/plain"]}),QS);function iE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var aE=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,n;return t=e,(n=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach((function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&iE(t.prototype,n),e}();function lE(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(oE).filter((function(e){return oE[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function sE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var cE=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalContext=t}var t,n;return t=e,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&sE(t.prototype,n),e}();function uE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uE(Object(n),!0).forEach((function(t){pE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var fE=function(){function t(e,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){return eE(r.sourceNodes.get(e))},this.endDragNativeItem=function(){r.isDraggingNativeItem()&&(r.actions.endDrag(),r.registry.removeSource(r.currentNativeHandle),r.currentNativeHandle=null,r.currentNativeSource=null)},this.isNodeInDocument=function(e){return r.document&&r.document.body&&document.body.contains(e)},this.endDragIfSourceWasRemovedFromDOM=function(){var e=r.currentDragSourceNode;r.isNodeInDocument(e)||r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragStartCapture=function(){r.clearCurrentDragSourceNode(),r.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=r.dragStartSourceIds;r.dragStartSourceIds=null;var n=tE(e);r.monitor.isDragging()&&r.actions.endDrag(),r.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:r.getSourceClientOffset,clientOffset:n});var o=e.dataTransfer,i=lE(o);if(r.monitor.isDragging()){if(o&&"function"==typeof o.setDragImage){var a=r.monitor.getSourceId(),l=r.sourceNodes.get(a),s=r.sourcePreviewNodes.get(a)||l;if(s){var c=r.getCurrentSourcePreviewNodeOptions(),u=function(e,t,n,r,o){var i,a=function(e){return"IMG"===e.nodeName&&($S()||!document.documentElement.contains(e))}(t),l=eE(a?e:t),s={x:n.x-l.x,y:n.y-l.y},c=e.offsetWidth,u=e.offsetHeight,d=r.anchorX,p=r.anchorY,h=function(e,t,n,r){var o=e?t.width:n,i=e?t.height:r;return ZS()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(a,t,c,u),f=h.dragPreviewWidth,g=h.dragPreviewHeight,m=o.offsetX,y=o.offsetY,v=0===y||y;return{x:0===m||m?m:new JS([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(d),y:v?y:(i=new JS([0,.5,1],[s.y,s.y/u*g,s.y+g-u]).interpolate(p),ZS()&&a&&(i+=(window.devicePixelRatio-1)*g),i)}}(l,s,n,{anchorX:c.anchorX,anchorY:c.anchorY},{offsetX:c.offsetX,offsetY:c.offsetY});o.setDragImage(s,u.x,u.y)}}try{o.setData("application/json",{})}catch(e){}r.setCurrentDragSourceNode(e.target),r.getCurrentSourcePreviewNodeOptions().captureDraggingState?r.actions.publishDragSource():setTimeout((function(){return r.actions.publishDragSource()}),0)}else if(i)r.beginDragNativeItem(i);else{if(o&&!o.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(r.dragEnterTargetIds=[],r.enterLeaveCounter.enter(e.target)&&!r.monitor.isDragging()){var t=e.dataTransfer,n=lE(t);n&&r.beginDragNativeItem(n,t)}},this.handleTopDragEnter=function(e){var t=r.dragEnterTargetIds;r.dragEnterTargetIds=[],r.monitor.isDragging()&&(r.altKeyPressed=e.altKey,$S()||r.actions.hover(t,{clientOffset:tE(e)}),t.some((function(e){return r.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){r.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=r.dragOverTargetIds;if(r.dragOverTargetIds=[],!r.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));r.altKeyPressed=e.altKey,r.actions.hover(t||[],{clientOffset:tE(e)}),(t||[]).some((function(e){return r.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())):r.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){r.isDraggingNativeItem()&&e.preventDefault(),r.enterLeaveCounter.leave(e.target)&&r.isDraggingNativeItem()&&r.endDragNativeItem()},this.handleTopDropCapture=function(e){r.dropTargetIds=[],e.preventDefault(),r.isDraggingNativeItem()&&r.currentNativeSource.loadDataTransfer(e.dataTransfer),r.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=r.dropTargetIds;r.dropTargetIds=[],r.actions.hover(t,{clientOffset:tE(e)}),r.actions.drop({dropEffect:r.getCurrentDropEffect()}),r.isDraggingNativeItem()?r.endDragNativeItem():r.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new cE(n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new KS(this.isNodeInDocument)}var n,r;return n=t,r=[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var o=function(t){return r.handleDragStart(t,e)},i=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},i=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return dE({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return dE({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var t=this.monitor.getItemType();return Object.keys(e).some((function(n){return e[n]===t}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new aE(oE[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){return t.window&&t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}],r&&hE(n.prototype,r),t}();const gE=(0,TS.createDndContext)((function(e,t){return new fE(e,t)})),mE=e=>{const t=(e=>{const t=(0,n.useRef)(gE);return e.children?r().createElement(TS.DndProvider,{manager:t.current.dragDropManager},e.children):null})(e);return r().createElement(r().Fragment,null,t)},yE=e=>{let{open:t,onClose:i,onUpload:a}=e;const l=GS(),s=(0,o.useSelector)(b().selectors.getImageServicePath),c=(0,o.useSelector)(b().selectors.getEnvironment),u=(0,o.useSelector)(b().selectors.getTenant),[d,h]=(0,n.useState)(!1),[f,g]=(0,n.useState)(null),m=e=>{h(!0),(0,Fo.uploadImage)({image:e,imageServicePath:s,environment:c,tenant:u}).then((e=>{a(e),i()})).catch((e=>{g((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong")))})).finally((()=>h(!1)))};return r().createElement(mE,null,r().createElement(En(),{open:t,onClose:i,classes:{paper:l.dialogPaper}},r().createElement(R(),{className:l.title},p().text("Add new image")),r().createElement(ss(),{className:l.body},r().createElement(jS,{className:l.targetBox,onAppendFile:e=>{if(!e)return g(p().text("No image selected."));const t=Number((e.size/1024/1024).toFixed(2)),n=IS.includes(e.type);t>20?g(p().text("File size exceeds configured max file size.")):n?m(e):g(p().text("File format is not supported."))}}),r().createElement(FS,{className:l.divider},p().text("or")),r().createElement(kS,{onSend:e=>{m(e)}})),d&&r().createElement(Ho,null),r().createElement(VS,{error:f,onClose:()=>g(null)})))},vE=r().createContext(!1);vE.displayName="BlockImageGalleryDialogContext";var bE=h(5203),xE=h(5762);const wE=(0,i.makeStyles)((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}}))),SE=window["material-ui"].Grid;var EE=h.n(SE);const OE=(0,i.makeStyles)((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),CE=e=>{let{attributeValues:t,setAttributeValueIndex:o,attributeValueIndex:i}=e;const a=OE(),l=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!=l&&l.current){const e=l.current.scrollLeft,t=l.current.offsetWidth+e,n=96*i+16*i+12;t<n?l.current.scroll&&(n>t+96+16?l.current.scroll(n,0):l.current.scroll(112+e,0)):e+96>n&&l.current.scroll&&l.current.scroll(n-96,0)}}),[i,l]),r().createElement("div",{ref:l,className:a.thumbnails},r().createElement(EE(),{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:a.gridContainer},t.map(((e,t)=>{let{uri:n,value:l}=e;return r().createElement(EE(),{item:!0,key:n},r().createElement(fS,{onClick:()=>o(t),className:c()(a.thumb,{[a.inactiveThumb]:i!==t}),src:(0,Fo.getImageAttributeOvThumbnailUrl)({value:l})}))}))))},_E=e=>{let{className:t,attributeValues:n,attributeValueIndex:o,setAttributeValueIndex:i}=e;const a=wE(),l=n[o],s=(0,Fo.getImageAttributeOvPreviewUrl)(l);return r().createElement("div",{className:c()(a.root,t)},r().createElement("div",{className:a.main},o>0&&r().createElement(Ti,{icon:bE.Z,className:c()(a.arrowButton,a.arrowButtonPrev),onClick:()=>{i(o-1)},size:"XL"}),r().createElement(fS,{containerClassName:a.mainImageContainer,className:a.mainImage,size:s&&hS.OVERRIDE,src:s}),o!==n.length-1&&r().createElement(Ti,{icon:xE.Z,className:c()(a.arrowButton,a.arrowButtonNext),onClick:()=>{i(o+1)},size:"XL"})),r().createElement(CE,{attributeValues:n,attributeValueIndex:o,setAttributeValueIndex:i}))},kE=window["material-ui"].Divider;var TE=h.n(kE);const PE=window["material-ui"].ListItem;var ME=h.n(PE);const RE=window["material-ui"].ListItemText;var IE=h.n(RE);function DE(){return DE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DE.apply(this,arguments)}const AE=e=>r().createElement("svg",DE({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function LE(){return LE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LE.apply(this,arguments)}const NE=e=>r().createElement("svg",LE({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function jE(){return jE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jE.apply(this,arguments)}const zE=e=>r().createElement("svg",jE({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),FE=(0,i.makeStyles)({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),BE=e=>{let{attrType:t={}}=e;const n=FE(),o=(e=>{switch(e.type){case Fo.DataTypes.TYPE_IMAGE:case Fo.DataTypes.TYPE_NESTED:return AE;case Fo.DataTypes.TYPE_REFERENCE:return NE;default:return zE}})(t);return r().createElement(o,{className:n.icon})},WE=e=>{let{margin:t,level:n,className:o,children:i}=e;return null!=n?r().createElement("div",{style:{marginLeft:n*t},className:o},i):i};function UE(){return UE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UE.apply(this,arguments)}const HE=Oi((e=>r().createElement("svg",UE({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),r().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),r().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),r().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),r().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),VE=(0,n.memo)((e=>{let{groupId:t,data:n,checked:o=!1,isFocused:i=!1,isRequired:a=!1,label:l,labelInText:s,level:u,onClick:d=El,hideCheckBox:h=!1,hideIcon:f=!1,notSelectable:g=!1,disableHorizontalScrollbar:m=!1,style:y={},subItemMargin:v=20,LogoIcon:b,className:x,disableNonSelectable:w,disableGutters:S}=e;const E=FE(),{attrType:O}=n||{},C=!(h&&(0,Fo.isNested)(O)||g),_=!!b;return r().createElement(al,{value:s||l,className:E.itemTooltip,placement:"bottom-end"},r().createElement(ME(),{className:c()(E.container,E.listItem,{[E.defaultCursor]:!C},x),onClick:C?()=>d(n,!o,t):void 0,style:y,dense:!0,button:C,disabled:w&&g,classes:{focusVisible:E.listItemFocus,selected:E.listItemFocus},selected:i,tabIndex:-1,disableGutters:S},!h&&r().createElement(fs(),{checked:o,disableRipple:!0,disabled:!C,className:c()(E.checkbox,{[E.checked]:o}),tabIndex:-1}),r().createElement(WE,{margin:v,level:u,className:E.marginWrapper},r().createElement(r().Fragment,null,!f&&(e=>"recommended"===t?r().createElement(HE,{className:E.recommendedIcon,tooltipTitle:p().text("Recommended"),showForDisabled:!0}):r().createElement(BE,{attrType:e}))(O),r().createElement("div",{className:c()(E.itemTextWrapper,{[E.marginText]:f})},_&&r().createElement(b,{className:E.logoIcon}),r().createElement(IE(),{primary:r().createElement(r().Fragment,null,l,a&&r().createElement(Ep,null)),className:E.itemText})))),C&&m&&r().createElement("div",{className:E.itemAfter})))})),GE=(0,i.makeStyles)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}}))),qE=GE,YE=window["material-ui"].Input;var KE=h.n(YE),$E=h(1853);const ZE=(0,i.makeStyles)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})));function XE(){return XE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XE.apply(this,arguments)}function QE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){JE(e,t,n[t])}))}return e}function JE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eO=(0,n.memo)((e=>{let{value:t,autofocus:o,onSearch:i=El,rootRef:a,classes:l={},height:s,placeholder:d=p().text("Search")}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const f=ZE({height:s}),[g,m]=(0,n.useState)(""),y=(0,u.pipe)((0,u.tap)(i),m),v=(0,u.isNil)(t)?g:t;return r().createElement(KE(),XE({startAdornment:r().createElement(Pn(),{position:"start"},r().createElement($E.Z,{className:f.icon})),endAdornment:r().createElement(Pn(),{position:"end"},v.length>0&&r().createElement(Ti,{icon:BS.default,className:f.clearButton,onClick:()=>y("")})),autoFocus:o,classes:QE({},l,{input:c()(f.input,l.input),root:c()(f.container,l.root)}),placeholder:d,value:v,onChange:(0,u.pipe)(wl,y),disableUnderline:!0,ref:a},h))}));function tO(){return tO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tO.apply(this,arguments)}const nO=e=>{let{title:t,className:n,onSearch:o,hideTitle:i,hideSearchInput:a,headerPlacement:l="top",containerWidth:s,containerHeight:u,searchInputOnKeyDown:d,children:h,searchInputRef:f,anchorOrigin:g={vertical:"top",horizontal:"right"},transformOrigin:m={vertical:"top",horizontal:"right"}}=e,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const v=qE({containerWidth:s,containerHeight:u}),b=r().createElement(r().Fragment,null,!i&&r().createElement("div",{className:v.header},t),!a&&r().createElement(eO,{onSearch:o,autofocus:!0,onKeyDown:d,inputRef:f,classes:{root:v.searchInputContainer},placeholder:p().text("Search & add attributes"),height:40}));return r().createElement(Cn(),tO({anchorOrigin:g,transformOrigin:m},y),r().createElement("div",{className:c()(v.container,n),style:{width:s}},"top"===l&&b,r().createElement("div",{className:v.list},h),"bottom"===l&&b))},rO=(0,i.makeStyles)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}}),oO=e=>e.titleItemIndex===e.index,iO=e=>{let{items:t,getItemSize:o,renderItem:i,renderGroupTitle:a,width:l="100%",height:s,fixedTitle:c=!0,itemKey:u=(e=>e),disableHorizontalScrollbar:d,hideSubtitles:p,focusIndex:h=null,onInnerContainerResize:f}=e;const g=rO(),m=(0,n.useRef)(null),y=(0,n.useRef)(null),v=(0,n.useRef)(null),b=(0,n.useRef)([0]),x={topMargin:0},w=(0,n.useMemo)((()=>!p||(t||[]).some((e=>null!==e.titleItemIndex))),[t,p]),S=(0,n.useCallback)((e=>{const n=b.current.length;let r=0;t.slice(n-1,e+1).forEach(((e,t)=>{const i=n+t-1;t>0&&(b.current[i]=b.current[i-1]+r),r=o(i,e.item)}))}),[o,t]),E=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),O=(0,n.useCallback)((e=>t[e]),[t]);(0,n.useEffect)((()=>{requestAnimationFrame((()=>{m.current&&m.current.scrollTo(0)}))}),[t.length]),(0,n.useEffect)((()=>{m.current&&m.current.resetAfterIndex(0),C();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){S(t);const e=E(t);return{offset:b.current[t],titleHeight:o(e,O(e).item)}}})(t);if(e&&e.offset&&m.current){const{titleHeight:t}=e,n=e.offset-t;(n<m.current.state.scrollOffset||n>m.current.state.scrollOffset+s)&&requestAnimationFrame((()=>{m.current&&m.current.scrollTo(n-(s-t)/2)}))}}),[S,O,o,E,s,b,t,m]);const C=()=>{v.current&&y.current&&(v.current.style.width=y.current.offsetWidth+"px")},_=(0,n.useCallback)((e=>{let n=null,r=0;return t.some(((t,o)=>{S(o+10);const i=b.current[o+1];return e>=r&&e<i&&(n={index:o,offset:r,listItem:t}),r=i,n})),n}),[S,b,t]),k=(0,n.useCallback)((e=>o(e,O(e).item)),[O,o]),T=(0,n.useCallback)((e=>{let{index:t,style:n,data:r}=e;const o=O(t);return o.item&&(oO(o)&&a(n,o.item)||i(n,o.item,t,r))}),[O,a,i]),{handleOnItemsRendered:P}=(e=>{let{focusIndex:t,listRef:r,items:o}=e;const i=(0,n.useRef)(null),a=(0,n.useRef)(null),l=(0,n.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;i.current=t,a.current=n}),[]);return(0,n.useEffect)((()=>{r.current&&null!==t&&0!==o.length&&(t<Math.max(i.current+3,0)?r.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(a.current-3,o.length-1)&&r.current.scrollToItem(Math.min(t+3,o.length-1),"end"))}),[t,o.length,r]),{handleOnItemsRendered:l}})({items:t,focusIndex:h,listRef:m}),M=(0,n.useCallback)((()=>t.filter((e=>oO(e))).map((e=>(e=>r().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},a({height:o(e.index,e.item)},e.item)))(e)))),[o,t,a]);return r().createElement(r().Fragment,null,r().createElement("div",{ref:v,className:g.stickyTitlesWrapper},c&&M()),f&&y.current&&r().createElement(Ja,{handleHeight:!0,onResize:f,targetDomEl:y.current}),r().createElement(Ud,{ref:m,itemCount:t.length,itemSize:k,width:l,height:s,itemKey:u,innerRef:y,onScroll:e=>{let{scrollOffset:n,scrollDirection:r}=e;if(!c||!w)return;const i=_(n),a=i&&E(i.index);var l;null!==a&&(l=a,v.current&&[...v.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===l.toString()?(e.style.visibility="visible",x.index=l):e.style.visibility="hidden"}))),C();const s=null!==a&&o(a,O(a).item),u=_(n+s+x.topMargin);let d=0;if(u){switch(r){case"forward":u.offset-n>0&&oO(u.listItem)&&(d=s-(u.offset-n));break;case"backward":{const e=a>-1&&(p=a,t.findIndex(((e,t)=>oO(e)&&p<t))),r=(e=>(S(e),b.current[e]))(e);e>-1&&n<r&&s>=r-n&&(d=s-(r-n))}}(e=>{v.current&&(x.topMargin=-e,v.current.style.top=-e+"px")})(d)}var p},style:d?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:P},T))};iO.propTypes={items:l().arrayOf(l().object).isRequired,getItemSize:l().func.isRequired,renderItem:l().func.isRequired,width:l().oneOfType([l().number,l().string]),height:l().number.isRequired,renderGroupTitle:l().func,fixedTitle:l().bool,hideSubtitles:l().bool,itemKey:l().func,disableHorizontalScrollbar:l().bool,focusIndex:l().number,onInnerContainerResize:l().func};const aO=iO,lO=e=>{let{items:t,open:r,onSelectFocusedItem:o,selectedItems:i,onClose:a}=e;const[l,s]=(0,n.useState)(null),c=(0,n.useRef)(!1),d=(0,n.useCallback)((e=>{let n=null===e?d(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&oO(t[n]));)n+=1;return n!==t.length?n:d(-1)}),[t]),p=(0,n.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||oO(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),h=(0,n.useCallback)((()=>{if(!(0,u.isNil)(l)){const e=t[l].item;!e.item.notSelectable&&o({item:e.item,groupData:e})}}),[o,t,l]),f=(0,n.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return s(d),e.preventDefault(),!1;case"Up":case"ArrowUp":return s(p),e.preventDefault(),!1;case"Enter":c.current=!0,h();break;case"Tab":a&&a(e);break;default:return}}),[t,d,p,h,a]);return(0,n.useEffect)((()=>{if(c.current){c.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&s(e)}else s(null)}),[t,r,i]),{focusIndex:l,handleKeyDown:f}},sO=(0,u.curry)(((e,t)=>(0,u.filter)((t=>(t.label||t.name).toLowerCase().includes(e.toLowerCase())))(t))),cO=e=>{let{attrTypes:t,filter:n="",sortingFn:r}=e;return(0,u.pipe)(sO(n),(0,u.sort)(r),(0,u.map)((e=>({item:{id:e.uri,label:e.label||e.name,attrType:e}}))))(t)};var uO;!function(e){e.parent="parent",e.attributes="attributes"}(uO||(uO={}));const dO=(0,i.makeStyles)({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},subHeader:{backgroundColor:"rgb(245, 245, 245)",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500},noResultsCaptionContainer:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center"}}),pO=e=>{let{label:t,popupTitle:i=t,data:a,parent:l,dense:s,onApply:d}=e;const h=dO(),f=(0,n.useRef)(),[g,m]=(0,n.useState)(!1),[y,v]=(0,n.useState)(""),[x,w]=(0,n.useState)([]),{items:S,hasGroups:E,parentGroupLength:O,attributesGroupLength:C}=(e=>{let{data:t,parent:r,filter:i}=e;const a=Boolean(r),l=(0,o.useSelector)(b().selectors.getAttributesSortingStrategy),s=(0,n.useMemo)((()=>l===Fo.SortingStrategy.ASC_BY_NAME?(e,t)=>{var n;return null==e||null===(n=e.label)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.label)}:(e,t)=>0),[l]),c=(0,n.useMemo)((()=>a?cO({attrTypes:[r],filter:i,sortingFn:s}):[]),[a,r,i,s]),d=(0,n.useMemo)((()=>a&&null!=c&&c.length?[{item:{id:uO.parent,label:p().text("Parent")},items:c}]:[]),[a,c]),h=(0,n.useMemo)((()=>cO({attrTypes:t,filter:i,sortingFn:s})),[t,i,s]),f=(0,n.useMemo)((()=>a&&null!=h&&h.length?[{item:{id:uO.attributes,label:p().text("Attributes")},items:h}]:h),[a,h]),g=(0,n.useMemo)((()=>(e=>{const t=e=>(0,u.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))})((d||[]).concat(f))),[d,f]),m=d.length,y=f.length;return{items:g,hasGroups:a,parentGroupLength:m,attributesGroupLength:y}})({data:a,parent:l,filter:y}),_=(0,n.useCallback)(((e,t)=>{w((0,u.ifElse)((0,u.always)(t),(0,u.append)(e),(0,u.reject)((0,u.propEq)("id",e.id)))(x))}),[x]),k=(0,n.useCallback)(((e,t)=>t.items?40:28),[]),T=(0,n.useCallback)((e=>{let{item:t}=e;_(t,(0,u.not)((0,u.any)((0,u.propEq)("id",t.id))(x)))}),[_,x]),{focusIndex:P,handleKeyDown:M}=lO({items:S,open:g,onSelectFocusedItem:T,selectedItems:x}),I=(0,n.useRef)(null);I.current=P;const A=E?(O?1:0)+(C?1:0):0,L=S.length-A,N=Math.min(255,28*L+40*A),j=Math.max(140,N+112),z=(0,n.useCallback)(((e,t,n)=>{var o;let{item:i,level:a=0}=t;const l=(0,u.any)((0,u.propEq)("id",i.id))(x),s=I.current===n;return r().createElement(VE,{key:i.uri,onClick:_,checked:l,level:a,data:i,label:r().createElement(Rp,{text:i.label,highlight:y}),labelInText:i.label,style:e,isFocused:s,isRequired:!(null===(o=i.attrType)||void 0===o||!o.required),LogoIcon:i.LogoIcon})}),[y,_,x]),F=(0,n.useCallback)(((e,t)=>r().createElement(ME(),{component:"div",className:h.subHeader,style:e,key:`group-${t.item.id}`},t.item.label)),[]);return r().createElement("div",{className:c()(h.moreAttributes,{[h.dense]:s})},r().createElement(D(),{color:"primary",onClick:()=>m(!g),ref:f,className:h.moreButton},r().createElement(Gp.Z,{classes:{root:h.icon}}),r().createElement("div",{className:h.buttonLabel},t)),r().createElement(nO,{open:g,className:c()(h.moreAttributesPopup,h.popupContainer),anchorEl:f.current,onClose:(0,u.pipe)((()=>{x.length>0&&d((0,u.pluck)("attrType",x))}),(()=>m(!1)),(()=>v("")),(()=>w([]))),onSearch:v,containerHeight:j,title:i,containerWidth:320,searchInputOnKeyDown:M},r().createElement(aO,{getItemSize:k,renderItem:z,renderGroupTitle:F,items:S,height:N,focusIndex:P}),0===S.length&&r().createElement("div",{className:h.noResultsCaptionContainer},r().createElement(R(),{variant:"caption",display:"block",gutterBottom:!0},p().text("No results found")))))},hO={get CreationTime(){return p().text("Creation Time")},get CreationDate(){return p().text("Creation Date")},get Dimensions(){return p().text("Dimensions")},get MimeType(){return p().text("Mime Type")},get Size(){return p().text("Size")},get Url(){return p().text("Full image URL (S3)")},get UrlPreview(){return p().text("Preview image URL (S3)")},get UrlThumbnail(){return p().text("Small image URL (S3)")},get CdnUrl(){return p().text("Full image URL (CDN)")},get CdnUrlPreview(){return p().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return p().text("Small image URL (CDN)")}},fO=function(){let{value:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,u.path)([t,0,"value"],e):"CreationDate"===t&&(0,u.path)(["CreationTimestamp",0,"value"],e)?No()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,u.path)(["CreationTimestamp",0,"value"],e)?No()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,u.path)(["Height",0,"value"],e)&&(0,u.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${p().text("pixels")}`:"Size"===t&&(0,u.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},gO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},mO=(e,t)=>{const{includeNames:n=[],excludeNames:r=[],order:o=[]}=t,i=n.length?e.filter((e=>n.includes(e))):e.filter((e=>!r.includes(e)));return 0===o.length?i:i.sort(((e,t)=>{const n=o.indexOf(e),r=o.indexOf(t);return-1===n&&-1!==r?1:-1===r&&-1!==n?-1:n-r}))},yO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=gO(t.attributes);return mO(Object.keys(e.value||{}),n).reduce(((t,n)=>{const o=r.find((e=>{let{name:t}=e;return t===n}));return o?[...t,{attrType:o,values:e.value[n]}]:t}),[])},vO=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),bO=(0,i.makeStyles)({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},canAdd:{}}),xO=e=>{let{attributeType:t,onAddAttributes:o,uri:i}=e;const a=bO(),l=gO(t.attributes),s=Boolean(o);return r().createElement(ss(),null,r().createElement(R(),{className:c()(a.title,{[a.canAdd]:s})},p().text("Meta info")),s&&r().createElement(n.Fragment,null,r().createElement(pO,{label:p().text("Attributes"),data:l,dense:!1,onApply:e=>{o&&o(e.map((e=>({attributeType:e,parentUri:i}))))}}),r().createElement(TE(),{className:a.divider})))};function wO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){SO(e,t,n[t])}))}return e}function SO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const EO="13px",OO="15px",CO={titleRow:{display:"block",minHeight:"16px",textIndent:"-1em",paddingLeft:"1em"},title:{whiteSpace:"nowrap"},ovIcon:{marginLeft:"8px",marginRight:"-3px",marginTop:"-1px",textIndent:0},descriptionIcon:{marginTop:"-1px",textIndent:0,marginRight:"-10px"}},_O=(0,i.makeStyles)({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),kO=(0,i.makeStyles)(wO({wrapper:{fontSize:EO,lineHeight:OO,flex:1},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginBottom:"-3px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)"}},CO)),TO=(0,i.makeStyles)(wO({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:EO,lineHeight:OO},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"}},CO,{titleRow:wO({},CO.titleRow,{marginBottom:"3px"})})),PO=r().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});PO.displayName="HistoryDiffContext";const MO=r().createContext([]),RO=(e,t,n,r)=>{const o=((e,t)=>{const n=t.find((t=>t.uri===e.uri));return n&&Array.isArray(n.children)?n.children:[]})(e,n);let i=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return o.length&&(i=i.filter((e=>o.includes(e.uri)))),i.reduce(((e,o)=>{const i=IO(t[o.name],r,n);return i&&i.length&&(Array.isArray(i[0])?e.push({[o.uri]:i[0]}):e.push({[o.uri]:i})),e}),[])},IO=(e,t,n)=>{if(e&&0!==e.length)return e.reduce(((e,r)=>{if("type"in r&&r.type){const o="lookupCode"in r?r.lookupCode:r.value,i=(0,Fo.findAttributeTypeByUri)(t,r.type);o&&"object"!=typeof o&&(0,Fo.isOv)(r)?e.push(DO(o,i)):o&&"object"==typeof o&&!Array.isArray(o)&&e.push(RO(i,o,n,t))}return e}),[])},DO=(e,t)=>{switch(null==t?void 0:t.type){case Fo.DataTypes.TYPE_DATE:return new Date(e).getTime();case Fo.DataTypes.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function AO(){return AO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AO.apply(this,arguments)}const LO=e=>r().createElement("svg",AO({width:11,height:11,viewBox:"0 0 11 11"},e),r().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"})),NO=(0,i.makeStyles)((e=>({link:{color:e.palette.primary.main,textDecoration:"none"}}))),jO=(0,n.forwardRef)(((e,t)=>{let{value:i,attributeType:a,children:l,className:s,onClick:u}=e;const d=NO(),p=(0,o.useSelector)(b().selectors.getUIPath),{generatePivotingUrl:h}=(0,n.useContext)(Cs),f=h({uiPath:p,uri:a.uri,value:JSON.stringify(i)});return r().createElement("a",{ref:t,href:f,onClick:e=>{u(),e.stopPropagation(),e.preventDefault()},className:c()(d.link,s)},l)}));jO.displayName="PivotingUriLink";const zO=jO,FO=(0,i.makeStyles)((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"31px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px",wordBreak:"break-word"},icon:{margin:"auto 8px auto 0"},content:{color:e.palette.primary.main,cursor:"pointer"},seeAllButton:{cursor:"pointer"}}))),BO=(0,i.makeStyles)({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}});function WO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const UO=e=>{let{value:t,attributeType:i,config:a={},generatedValue:l,onSeeAllClick:s}=e;const[c,u]=(0,n.useState)([]),[d,h]=(0,n.useState)(0),f=(0,o.useSelector)(b().selectors.getEntity)||{},g=Ml(),m=FO(),y=(0,o.useSelector)(b().selectors.getGlobalSearchRequestOptions)||{},v=a.entityType||f.type,x=d>6;(0,n.useEffect)((()=>{const e=(0,Fo.convertPivotingValueToSearchFilters)({value:t,attributeType:i,entityType:v}),n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){WO(e,t,n[t])}))}return e}({max:6},y);g(Promise.all([(0,Fo.getFilteredEntities)(e,n),(0,Fo.getTotals)(e,n)])).then((e=>{const[t,{total:n}]=e;u(Array.isArray(t)?t:[]),h(n)})).catch((()=>{u([]),h(0)}))}),[]);const w=Boolean(a.label);return r().createElement("div",{className:m.container},r().createElement("div",{className:m.header},r().createElement("div",{className:m.title},p().text("Pivot profiles")),r().createElement("div",{className:m.divider}),r().createElement("div",{className:m.headerCount},p().number(d,"0,0")+" "+(1===d?p().text("item"):p().text("items")))),w&&r().createElement("div",{className:m.entityTypeLabel},a.label),r().createElement("div",{className:m.body},c.map((e=>r().createElement("div",{key:e.uri,className:m.entityContainer},r().createElement(Bi,{entity:e,avatarClassName:m.profileIcon}),r().createElement(ks,{className:m.entityLabel,value:(0,Fo.getEntityUriForLink)(e)},(0,Fo.getLabel)(e.label)))))),x&&r().createElement("div",{className:m.footer},r().createElement(zO,{value:l,attributeType:i,className:m.seeAllButton,onClick:s},p().text("See all"))))},HO=e=>{let{value:t,attributeType:i,children:a,className:l}=e;const s=BO(),c=FO(),d=(0,o.useDispatch)(),p=(0,n.useContext)(MO)||[],h=(0,Fo.isNested)(i),f=(0,o.useSelector)(b().selectors.getMetadata)||{},g=h?RO(i,t.value,p,f):DO(t.lookupCode||t.value,i),m=p.some((e=>{let{uri:t}=e;return t===i.uri}))&&(Array.isArray(g)&&g.length||!Array.isArray(g)&&!(0,u.isNil)(g)),y=p.find((e=>{let{uri:t}=e;return t===i.uri})),x=m?Array.isArray(g)?(e=>e.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[(0,Fo.getLastUriPart)(t),n]}))))))(g):((e,t)=>[{[e.name]:t}])(i,g):void 0,w=()=>{d(v.ui.actions.openPivotingPerspective({value:x,attributeType:i}))};return m?r().createElement(wi(),{interactive:!0,arrow:!0,placement:"right-start",classes:s,title:r().createElement(UO,{value:g,generatedValue:x,attributeType:i,config:y.popup,onSeeAllClick:w})},r().createElement("span",{className:l},r().createElement(LO,{className:c.icon}),r().createElement(zO,{onClick:w,className:c.content,value:x,attributeType:i},a))):r().createElement(r().Fragment,null,a)};function VO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){GO(e,t,n[t])}))}return e}function GO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qO=(0,i.makeStyles)({root:{display:"flex",alignItems:"start",justifyContent:"space-between"},commentsContainer:{height:"15px",marginRight:"-4px"},attributeValue:{flex:1,wordBreak:"break-all"},updateAttribute:VO({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},Fo.historyPalettes[Fo.HistoryOperations.updateAttribute],{"& > a":{color:Fo.historyPalettes[Fo.HistoryOperations.updateAttribute].color}}),insertAttribute:VO({width:"fit-content"},Fo.historyPalettes[Fo.HistoryOperations.insertAttribute],{"& > a":{color:Fo.historyPalettes[Fo.HistoryOperations.insertAttribute].color}}),deleteAttribute:VO({width:"fit-content",padding:"0 4px",marginLeft:"-4px",textDecoration:"line-through"},Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute],{"& > a":{color:Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute].color}}),multilineAttribute:{width:"fit-content"}}),YO=r().createContext({highlightedValuesUris:[],highlightedClassName:""});YO.displayName="HighlightedValuesContext";const KO=(0,i.makeStyles)((e=>({ovFalse:e.inactive}))),$O=e=>{let{className:t,attributeType:o=null,attributeValue:i,inlined:a}=e;const l=qO(),s=KO(),{highlightedValuesUris:u=[],highlightedClassName:d}=(0,n.useContext)(YO),{appearance:p}=(0,n.useContext)(PO),h=(0,Fo.getHistoryAppearanceByUri)(i.uri,p),f=(0,Fo.getHistoryAttributeClassName)(h),g=r().createElement(Lp,{value:(0,Fo.getAttributeValue)(i),dataTypeDefinition:(0,Fo.getAttrDataTypeDefinition)(o)}),m=(0,Fo.isRelationAttrType)(o)?Fo.CollaborationObjectTypes.RELATION_ATTRIBUTE:Fo.CollaborationObjectTypes.ENTITY_ATTRIBUTE;return a||f?r().createElement("div",{className:c()(t,{[d]:u.includes(i.uri)})},r().createElement(HO,{value:i,attributeType:o,key:i.uri,className:c()({[l.multilineAttribute]:!a})},r().createElement("span",{className:c()(l[f],{[s.ovFalse]:!(0,Fo.isOv)(i)}),"data-reltio-id":"reltio-attribute-value"},g))):r().createElement("div",{className:c()(t,l.root,Ul,{[d]:u.includes(i.uri)})},r().createElement(HO,{value:i,attributeType:o,key:i.uri},r().createElement("span",{className:c()(l.attributeValue,{[s.ovFalse]:!(0,Fo.isOv)(i)}),"data-reltio-id":"reltio-attribute-value"},g)),r().createElement(Gu,{className:l.commentsContainer,uri:i.uri,relatedObjectUris:(0,Fo.createRelatedObjectUris)(m,{uri:i.uri}),objectType:m}))},ZO=[Fo.EntityAttrTypes.roles.uri,Fo.EntityAttrTypes.tags.uri],XO=(e,t,n,r)=>{const o=(0,u.pipe)(Fo.getEntityType,(0,u.defaultTo)({}),(0,u.props)(["attributes","analyticsAttributes"]),(0,u.reject)(u.isNil),u.flatten,(0,u.concat)(u.__,(0,u.pipe)(u.values,(0,u.reject)((0,u.propEq)("uri",Fo.EntityAttrTypes.id.uri)))(Fo.EntityAttrTypes)))(e,t);return n.length?o.filter((e=>{let{uri:t}=e;return n.includes(t)})):o.filter((e=>{let{uri:t}=e;return!r.includes(t)}))},QO=(e,t)=>(0,u.partition)((0,u.pipe)((0,u.path)(["attrType","uri"]),(0,u.includes)(u.__,e)),t),JO=(0,n.memo)((e=>{let{attrTypes:t,entity:o,parentUri:i,drawLines:a,children:l,className:s,max:c,alwaysVisibleTypeUris:d=ZO,showNonOv:p}=e;const[h,f]=(0,n.useState)(c||1/0),g=(0,n.useMemo)((()=>(0,Fo.getAttributesListForReadMode)(t,o,p)),[t,o,p]),[m,y]=(0,n.useMemo)((()=>QO(d,g)),[g,d]),v=y.slice(0,h),b=c&&v.length<y.length,x=c&&v.length>=y.length&&c<v.length,w={enabled:a};return r().createElement("div",{className:s},l&&r().createElement(bp,w,l),v.concat(m).map((e=>{let{attrType:t,values:n}=e;return r().createElement(c_,{key:t.uri,attributeType:t,drawLines:a,values:n,paging:(0,u.path)(["paging",t.uri],o.attributes),parentUri:i,showNonOv:p})})),b&&r().createElement(Vp,{onClick:()=>{f(1/0)}}),x&&r().createElement(Up,{onClick:()=>{f(c)}}))})),eC=(0,i.makeStyles)({complexContainer:{marginTop:"1px"},labelContainer:{display:"flex",minHeight:"18px"},label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",paddingTop:"1px",marginLeft:"2px"},spacer:{flex:1}});function tC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nC=e=>{let{attributeTypesList:t,attributeValue:o,label:i,expanded:a=!1,children:l,showNonOv:s,attributeType:u,LabelRenderer:d,RightSlot:p}=e;const h=eC(),f=KO(),g=o.uri,[m,y]=(0,n.useState)(!1),{highlightedValuesUris:v=[],highlightedClassName:b}=(0,n.useContext)(YO);(0,n.useEffect)((()=>{y(a)}),[a]);const x=(t||[]).some((e=>(0,Fo.isAnalyticAttribute)(e))),w=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tC(e,t,n[t])}))}return e}({attributes:x?null:o.value,analyticsAttributes:x?o.value:null},(0,Fo.isSpecialAttribute)(u)?o.value:{})),[o,x,u]),S=(0,Fo.isRelationAttrType)(u)?Fo.CollaborationObjectTypes.RELATION_ATTRIBUTE:Fo.CollaborationObjectTypes.ENTITY_ATTRIBUTE;return r().createElement("div",{className:h.complexContainer},r().createElement("div",{className:c()(h.labelContainer,Ul)},r().createElement(Zb,{onClick:()=>y((e=>!e)),expanded:m}),d?r().createElement(d,{attributeType:u,attributeValue:o}):r().createElement(r().Fragment,null,r().createElement(R(),{component:"span",variant:"body2",classes:{body2:h.label},className:c()({[b]:v.includes(o.uri),[f.ovFalse]:!(0,Fo.isOv)(o)}),"data-reltio-id":"reltio-attribute-complex-label"},i),r().createElement("div",{className:h.spacer}),p&&r().createElement(p,{attributeType:u,attributeValue:o}),r().createElement(Gu,{uri:o.uri,relatedObjectUris:(0,Fo.createRelatedObjectUris)(S,{uri:o.uri}),objectType:S}))),m&&r().createElement(JO,{attrTypes:t,entity:w,drawLines:!0,parentUri:g,showNonOv:s},l))};nC.propTypes={children:l().node,label:l().oneOfType([l().string,l().node]),attributeTypesList:l().arrayOf(Fo.AttributeTypeType),attributeValue:l().oneOfType([Fo.NestedAttributeValueType,Fo.ReferenceAttributeValueType]),expanded:l().bool,showNonOv:l().bool,attributeType:Fo.AttributeTypeType,LabelRenderer:l().elementType,RightSlot:l().elementType};const rC=nC;function oC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){iC(e,t,n[t])}))}return e}function iC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const aC=(0,i.makeStyles)({label:{textDecoration:"none"},updateAttribute:oC({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},Fo.historyPalettes[Fo.HistoryOperations.updateAttribute]),insertAttribute:oC({width:"fit-content"},Fo.historyPalettes[Fo.HistoryOperations.insertAttribute]),deleteAttribute:oC({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function lC(){return lC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lC.apply(this,arguments)}const sC=e=>{let{attributeValue:t,attributeType:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["attributeValue","attributeType"]);const a=aC(),{appearance:l}=(0,n.useContext)(PO),s=(0,n.useMemo)((()=>{const e=(0,Fo.getHistoryAppearanceByUri)(t.uri,l),n=(0,Fo.getHistoryAttributeClassName)(e),i=t.label?t.label:(0,Fo.evaluateDeepEntityLabel)(t,o.dataLabelPattern);return r().createElement(HO,{className:a.pivotingTooltip,value:t,attributeType:o},r().createElement(ss(),{component:"span",className:c()(a[n],a.label)},r().createElement(Dp,{text:(0,Fo.getLabel)(i)})))}),[l,a,t,o]);return r().createElement(rC,lC({label:s,attributeValue:t,attributeTypesList:(0,Fo.getAttributeTypeSubAttributes)({},o),attributeType:o},i))};sC.propTypes=Fo.NestedAttributeType;const cC=(0,n.memo)(sC);var uC,dC=uC||(uC={});function pC(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}dC.Pop="POP",dC.Push="PUSH",dC.Replace="REPLACE";var hC,fC=hC||(hC={});function gC(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function mC(e,t){if(!e)throw new Error(t)}fC.Pop="POP",fC.Push="PUSH",fC.Replace="REPLACE";const yC=(0,n.createContext)(null),vC=(0,n.createContext)(null),bC=(0,n.createContext)({outlet:null,matches:[]});function xC(){return null!=(0,n.useContext)(vC)}function wC(){return xC()||mC(!1),(0,n.useContext)(vC).location}function SC(e){let{matches:t}=(0,n.useContext)(bC),{pathname:r}=wC(),o=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,n.useMemo)((()=>EC(e,JSON.parse(o),r)),[e,o,r])}function EC(e,t,n){let r,o="string"==typeof e?gC(e):e,i=""===e||""===o.pathname?"/":o.pathname;if(null==i)r=n;else{let e=t.length-1;if(i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}r=e>=0?t[e]:"/"}let a=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?gC(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:CC(r),hash:_C(o)}}(o,r);return i&&"/"!==i&&i.endsWith("/")&&!a.pathname.endsWith("/")&&(a.pathname+="/"),a}const OC=e=>e.join("/").replace(/\/\/+/g,"/"),CC=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",_C=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function kC(){return kC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kC.apply(this,arguments)}const TC=["onClick","reloadDocument","replace","state","target","to"],PC=(0,n.forwardRef)((function(e,t){let{onClick:r,reloadDocument:o,replace:i=!1,state:a,target:l,to:s}=e,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,TC),u=function(e){xC()||mC(!1);let{basename:t,navigator:r}=(0,n.useContext)(yC),{hash:o,pathname:i,search:a}=SC(e),l=i;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?gC(e).pathname:e.pathname}(e),r=null!=n&&n.endsWith("/");l="/"===i?t+(r?"/":""):OC([t,i])}return r.createHref({pathname:l,search:a,hash:o})}(s),d=function(e,t){let{target:r,replace:o,state:i}=void 0===t?{}:t,a=function(){xC()||mC(!1);let{basename:e,navigator:t}=(0,n.useContext)(yC),{matches:r}=(0,n.useContext)(bC),{pathname:o}=wC(),i=JSON.stringify(r.map((e=>e.pathnameBase))),a=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{a.current=!0})),(0,n.useCallback)((function(n,r){if(void 0===r&&(r={}),!a.current)return;if("number"==typeof n)return void t.go(n);let l=EC(n,JSON.parse(i),o);"/"!==e&&(l.pathname=OC([e,l.pathname])),(r.replace?t.replace:t.push)(l,r.state)}),[e,t,i,o])}(),l=wC(),s=SC(e);return(0,n.useCallback)((t=>{if(!(0!==t.button||r&&"_self"!==r||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!o||pC(l)===pC(s);a(e,{replace:n,state:i})}}),[l,a,s,o,i,r,e])}(s,{replace:i,state:a,target:l});return(0,n.createElement)("a",kC({},c,{href:u,onClick:function(e){r&&r(e),e.defaultPrevented||o||d(e)},ref:t,target:l}))})),MC=(0,i.makeStyles)((e=>({link:{color:e.palette.primary.main,textDecoration:"none"}})));function RC(){return RC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RC.apply(this,arguments)}const IC=e=>{const t=MC(),n=xC(),{href:o,className:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["href","className"]),l=c()(t.link,i);return n&&o?r().createElement(PC,RC({to:o.replace(window.location.origin,""),className:l},a)):r().createElement("a",RC({href:o,className:l},a))};function DC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AC(e,t,n[t])}))}return e}function AC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const LC=(0,i.makeStyles)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:DC({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},Fo.historyPalettes[Fo.HistoryOperations.updateAttribute]),insertAttribute:DC({width:"fit-content"},Fo.historyPalettes[Fo.HistoryOperations.insertAttribute]),deleteAttribute:DC({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute])}))),NC=LC;function jC(){return jC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jC.apply(this,arguments)}const zC=(0,n.memo)((e=>{let{attributeValue:t,attributeType:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["attributeValue","attributeType"]);const l=(0,o.useSelector)(b().selectors.getMetadata),s=(0,o.useSelector)(b().selectors.getUIPath),u=NC(),d=KO(),p=(0,Fo.getReferencedEntityUriFromAttrValue)(t),h=(0,n.useMemo)((()=>(0,Fo.getAttributeTypeSubAttributes)(l,i)),[i,l]),{appearance:f}=(0,n.useContext)(PO),{generateEntityUrl:g}=(0,n.useContext)(Cs),m=(0,n.useMemo)((()=>{const e=(0,Fo.getHistoryAppearanceByUri)(t.uri,f),n=(0,Fo.getHistoryAttributeClassName)(e),o=null!=p&&p.startsWith("changeRequests")?"dcrReview":"profile";return r().createElement(IC,{href:(0,Fo.isEmptyValue)(f)?g({uiPath:s,uri:p,screen:o}):void 0,className:c()(u[n],{[d.ovFalse]:!(0,Fo.isOv)(t)})},r().createElement(Dp,{text:(0,Fo.getLabel)(t.label)}),t.relationshipLabel&&r().createElement("span",{className:u.relationshipLabel},r().createElement(Dp,{text:t.relationshipLabel})))}),[t,f,s,p,u,d.ovFalse,g]);return r().createElement(rC,jC({attributeTypesList:h,attributeValue:t,label:m,attributeType:i},a))})),FC=zC,BC=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e.type){case Fo.DataTypes.TYPE_NESTED:return r().createElement(cC,t);case Fo.DataTypes.TYPE_REFERENCE:return r().createElement(FC,t);default:return r().createElement($O,t)}}}.build(t,e)},WC=e=>{let{value:t,nonVisibleValues:n,attributeType:o,titleClassName:i,contentClassName:a,showNonOv:l,totalNonVisibleValues:s}=e;const u=kO(),{label:d,description:p}=o,h=(0,Fo.isRelationAttrType)(o)?Fo.CollaborationObjectTypes.RELATION_ATTRIBUTE:Fo.CollaborationObjectTypes.ENTITY_ATTRIBUTE;return r().createElement("div",{className:c()(u.collaborationWrapper,Ul)},r().createElement("div",{className:c()(u.titleRow,u.wrapper)},r().createElement(_p,{label:d,className:c()(u.title,i),"data-reltio-id":"reltio-attribute-label"}),r().createElement(Mw,{description:p,className:u.descriptionIcon}),r().createElement(Fp,{nonOvValues:n,attributeType:o,className:u.ovIcon,nonOvTotal:s}),r().createElement(BC,{className:c()(u.attribute,a),attributeValue:t,attributeType:o,showNonOv:l,inlined:!0})),r().createElement(Gu,{uri:t.uri,relatedObjectUris:(0,Fo.createRelatedObjectUris)(h,{uri:t.uri}),objectType:h}))},UC=e=>{let{max:t,values:o,nonVisibleValues:i,totalVisibleValues:a,attributeType:l,parentUri:s,requestNextPageOfAttributeValues:d,titleClassName:p,contentClassName:h,showNonOv:f,totalNonVisibleValues:g}=e;const m=TO(),[y,v]=(0,n.useState)(t),b=t<a,x=b&&y<a,w=b&&y>=a,{label:S,description:E}=l,O=o.slice(0,y),C=a-y;return r().createElement("div",{className:m.wrapper},r().createElement("div",{className:m.titleRow},r().createElement(_p,{label:S,className:c()(m.title,p),"data-reltio-id":"reltio-attribute-label"}),r().createElement(Mw,{description:E}),r().createElement(Fp,{nonOvValues:i,attributeType:l,className:m.ovIcon,nonOvTotal:g})),r().createElement("div",{className:m.attributes},O.map((e=>r().createElement(BC,{key:e.uri,className:c()(m.attribute,h),attributeValue:e,attributeType:l,showNonOv:f})))),x&&r().createElement(Vp,{moreNumber:(0,u.min)(t,C),valueNumber:C,onClick:()=>{o.length<a&&d({parentUri:s,attributeTypeUri:l.uri,attributeTypeName:l.name,values:o,defaultMaxValues:t}),v(y+t)}}),w&&r().createElement(Up,{onClick:()=>{v(t)}}))};var HC=h(404);const VC=e=>{let{className:t,values:o,Component:i,dataReltioId:a}=e;return r().createElement("div",{className:t,"data-reltio-id":a},o.map(((e,t)=>r().createElement(n.Fragment,{key:e},r().createElement(i,{value:e}),t<o.length-1&&", "))))};function GC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){qC(e,t,n[t])}))}return e}function qC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const YC=(0,i.makeStyles)({insertAttribute:GC({width:"fit-content"},Fo.historyPalettes[Fo.HistoryOperations.insertAttribute]),deleteAttribute:GC({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute])}),KC=e=>{let{value:t}=e;const i=YC(),a=(0,o.useSelector)(b().selectors.getMetadata),{appearance:l}=(0,n.useContext)(PO),s=(0,Fo.getHistoryAppearanceBySpecialAttributeValue)("roles",t,l),c=(0,Fo.getHistoryAttributeClassName)(s);return r().createElement("span",{className:i[c]},(0,Fo.getRoleLabel)(a,t))},$C=e=>{let{className:t,values:n}=e;return r().createElement(VC,{values:n,className:t,dataReltioId:"reltio-attribute-value",Component:KC})},ZC=e=>{let{value:t}=e;const i=YC(),a=(0,o.useSelector)(b().selectors.getUIPath),l=(0,o.useSelector)(b().selectors.getEntity),s=(0,n.useContext)(Np),{appearance:c}=(0,n.useContext)(PO),{generateTagUrl:u}=(0,n.useContext)(Cs),d=(0,Fo.getHistoryAppearanceBySpecialAttributeValue)("tags",t,c),p=(0,Fo.getHistoryAttributeClassName)(d),h=s||l;return r().createElement(IC,{className:i[p],href:u({uiPath:a,tag:t,entityUri:h.dataTenant?(0,Fo.getDataTenantEntityUri)(h):h.uri})},t)},XC=e=>{let{className:t,values:n}=e;return r().createElement(VC,{values:n,className:t,dataReltioId:"reltio-attribute-value",Component:ZC})},QC=e=>{let{values:t,attributeType:n}=e;const o=kO(),{label:i}=n;return r().createElement("div",{className:c()(o.titleRow,o.wrapper)},(a=o.titleIcon,n.uri===Fo.EntityAttrTypes.tags.uri?r().createElement(HC.Z,{className:a}):null),r().createElement(_p,{label:i,className:o.title,"data-reltio-id":"reltio-attribute-label"}),(e=>{switch(n.uri){case Fo.EntityAttrTypes.tags.uri:return r().createElement(XC,{className:e,values:t});case Fo.EntityAttrTypes.roles.uri:return r().createElement($C,{className:e,values:t});default:return r().createElement(BC,{className:e,attributeValue:{value:t[0]},attributeType:n,inlined:!0})}})(o.attribute));var a},JC={imageMargin:4,imageWidth:hS.SMALL.imageWidth,imageHeight:hS.SMALL.imageHeight},e_=(0,i.makeStyles)((e=>({image:e=>{let{imageMargin:t,imageHeight:n,imageWidth:r}=e;return{marginRight:t,width:r,height:n,cursor:"pointer","&:last-child":{marginRight:0}}},deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,Fo.svg2Url)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:Fo.historyPalettes[Fo.HistoryOperations.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${Fo.historyPalettes[Fo.HistoryOperations.deleteAttribute].color}`,outlineOffset:"-3px"}},insertAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${Fo.historyPalettes[Fo.HistoryOperations.insertAttribute].color}`,outlineOffset:"-3px"}},updateAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${Fo.historyPalettes[Fo.HistoryOperations.updateAttribute].color}`,outlineOffset:"-3px"}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),t_=e=>{let{attributeType:t,attributeValues:o=[],paging:i,parentUri:a,requestNextPageOfAttributeValues:l,showNonOv:s,imageSize:u=JC}=e;const d=e_(u),{appearance:p}=(0,n.useContext)(PO);return r().createElement(Y_,{attributeValues:o,attributeType:t,renderImage:e=>{let{onOpenImageGalleryDialog:t}=e;return e=>{const n=(0,Fo.getImageAttributeOvThumbnailUrl)(e),{uri:o}=e,i=(0,Fo.getHistoryAppearanceByUri)(o,p),a=(0,Fo.getHistoryAttributeClassName)(i);return r().createElement("div",{className:c()(d.image,{[d[a+"Image"]]:a}),key:o,"data-reltio-id":"reltio-attribute-value"},r().createElement(fS,{onClick:()=>t(o),className:d[a],src:n,size:{imageWidth:u.imageWidth,imageHeight:u.imageHeight}}))}},imageSize:u,requestNextPageOfAttributeValues:l,paging:i,parentUri:a,showNonOv:s})},n_=e=>{let{attributeType:t,attributeValues:n,paging:o,parentUri:i,showNonOv:a,requestNextPageOfAttributeValues:l}=e;const s=TO(),{label:c,description:u}=t;return r().createElement(r().Fragment,null,r().createElement("div",{className:s.titleRow},r().createElement(_p,{className:s.title,label:c,"data-reltio-id":"reltio-attribute-label"}),r().createElement(Mw,{className:s.descriptionIcon,description:u})),r().createElement(t_,{attributeValues:n,attributeType:t,paging:o,parentUri:i,requestNextPageOfAttributeValues:l,showNonOv:a}))},r_="oneLine",o_="multiLine",i_="imageLine",a_="special",l_=(0,n.memo)((e=>{let{values:t,attributeType:n,drawLines:o,paging:i={},parentUri:a,max:l=1/0,requestNextPageOfAttributeValues:s,titleClassName:d,contentClassName:p,showNonOv:h}=e;const f=_O(),g=(0,u.partition)(Fo.isOv);if(!t||!t.length)return null;const[m,y]=g(t),v=h?t:m,b=h?[]:y,x=h?"totalValues":"totalOvValues",w=(0,u.ifElse)((0,u.has)(x),(0,u.prop)(x),(0,u.always)(v.length))(i),S=null!=i&&i.totalValues?i.totalValues-w:b.length,E=1===w&&!(0,Fo.isComplexAttribute)(n);return r().createElement(bp,{enabled:o,className:c()({[f.paddingWrapperWithLines]:o})},r().createElement("div",{className:c()({[f.paddingWrapper]:!o})},(()=>{switch((0,u.cond)([[Fo.isSpecialAttribute,(0,u.always)(a_)],[Fo.isImage,(0,u.always)(i_)],[(0,u.always)(E),(0,u.always)(r_)],[u.T,(0,u.always)(o_)]])(n)){case r_:return r().createElement(WC,{value:v[0],nonVisibleValues:b,totalNonVisibleValues:S,attributeType:n,titleClassName:d,contentClassName:p,showNonOv:h});case o_:return r().createElement(UC,{values:v,nonVisibleValues:b,totalVisibleValues:w,totalNonVisibleValues:S,attributeType:n,parentUri:a,max:l,requestNextPageOfAttributeValues:s,titleClassName:d,contentClassName:p,showNonOv:h});case i_:return r().createElement(n_,{attributeValues:v,attributeType:n,paging:i,parentUri:a,requestNextPageOfAttributeValues:s,showNonOv:h});case a_:return r().createElement(QC,{values:v,attributeType:n})}})()))})),s_={requestNextPageOfAttributeValues:v.profile.actions.requestNextPageOfAttributeValues},c_=(0,o.connect)(((e,t)=>{let{max:n}=t;return{max:n||b().selectors.getDefaultMaxValues(e)}}),s_)(l_),u_=(0,i.makeStyles)((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),d_=e=>{let{title:t,content:n,isLink:o,children:i}=e;const a=u_();return r().createElement("div",{className:a.root},r().createElement("span",{className:a.title},t),o?r().createElement("a",{className:a.link,href:n},p().text("link")):r().createElement("span",{className:a.content},n||i))},p_=(0,i.makeStyles)({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),h_=e=>{let{attributeValue:t,attributeType:n,imageAttributeFieldsOrder:i}=e;const a=p_(),l=(0,o.useSelector)(b().selectors.getIsViewMode),s=(c=t,u=i,mO(Object.keys(hO),u).map((e=>fO(c,e)?{title:hO[e],value:fO(c,e),isLink:vO(e)}:null)).filter(Boolean));var c,u;const d=yO(t,n,i);return r().createElement(ss(),{className:a.root},s.map((e=>{let{title:t,value:n,isLink:o}=e;return r().createElement(d_,{key:t,isLink:o,title:t,content:n})})),l&&d.map((e=>{let{attrType:n,values:o}=e;return r().createElement(c_,{key:n.uri,attributeType:n,drawLines:!1,values:o,titleClassName:a.title,contentClassName:a.content,parentUri:t.uri})})))},f_=(0,i.makeStyles)({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),g_=e=>{let{attributeType:t,imageAttributeFieldsOrder:n,attributeValue:o,hasChanges:i,onDeleteAttribute:a,onChangeAttribute:l,onAddAttributes:s,onCancel:c,onApply:u,mode:d}=e;const h=f_(),f=yO(o,t,n),g=0!==f.length||0===f.length&&i;return r().createElement(ss(),{className:h.root},r().createElement(ss(),{className:h.form},f.map((e=>{let{attrType:t,values:n}=e;return r().createElement(nk,{key:t.uri,parentUri:o.uri,attributeType:t,values:n,showEmptyEditors:(0,Fo.isTempUri)(o.uri),mode:d,drawLines:!1,onDeleteAttribute:a,onChangeAttribute:l,onAddAttributes:s})}))),g&&r().createElement(r().Fragment,null,r().createElement(TE(),{className:h.divider}),r().createElement(ss(),{className:h.actions},r().createElement(D(),{disabled:!i,onClick:c,className:h.cancelButton},p().text("Cancel")),r().createElement(D(),{disabled:!i,onClick:u,color:"primary"},p().text("Apply")))))},m_={palette:{type:"dark",primary:Fo.theme.palette.primary,secondary:Fo.theme.palette.secondary}},y_=(0,i.createMuiTheme)(m_),v_=e=>{let{imageAttributeFieldsOrder:t,attributeType:a,attributeValue:l}=e;const{addAttributes:s,changeAttribute:c,deleteAttribute:d,clearLocalChanges:p,applyLocalChanges:h,attributeValue:f,hasChanges:g}=(e=>{let{initialAttributeValue:t,attributeType:r}=e;const i=(0,o.useDispatch)(),a=(0,n.useContext)(kl),[l,s]=(0,n.useState)(t);(0,n.useEffect)((()=>{s(t)}),[t]);const c=!(0,u.equals)(l,t),d=(0,n.useCallback)((e=>{s((t=>e.reduce(((e,t)=>{const{attributeType:n,parentUri:r,index:o}=t;return(0,Fo.addAttribute)({entity:e,attributeType:n,parentUri:r,index:o,nestingLevel:1})}),t)))}),[]),p=(0,n.useCallback)((e=>{let{value:t,attributeType:n,uri:r}=e;s((e=>(0,Fo.editAttribute)({entity:e,attributeType:n,uri:r,value:t,nestingLevel:1})))}),[]),h=(0,n.useCallback)((e=>{let{attributeType:t,uri:n}=e;s((e=>(0,Fo.removeAttribute)({entity:e,attributeType:t,uri:n,nestingLevel:1})))}),[]);return{addAttributes:d,changeAttribute:p,deleteAttribute:h,clearLocalChanges:(0,n.useCallback)((()=>{s(t)}),[t]),applyLocalChanges:(0,n.useCallback)((()=>{i(v.profile.actions.modifyAttribute({value:l,attributeType:r,uri:l.uri,viewId:a}))}),[l,r,a,i]),attributeValue:l,hasChanges:c}})({attributeType:a,initialAttributeValue:l}),m=(0,o.useSelector)(b().selectors.getMode),y=(0,o.useSelector)(b().selectors.getIsEditableMode);return r().createElement(i.MuiThemeProvider,{theme:y_},r().createElement(ss(),null,r().createElement(xO,{attributeType:a,uri:null==f?void 0:f.uri,onAddAttributes:y?s:void 0}),r().createElement(h_,{attributeType:a,attributeValue:f,imageAttributeFieldsOrder:t}),y&&r().createElement(g_,{mode:m,imageAttributeFieldsOrder:t,attributeType:a,attributeValue:f,hasChanges:g,onDeleteAttribute:d,onChangeAttribute:c,onAddAttributes:s,onCancel:p,onApply:h})))},b_=(0,i.makeStyles)((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),x_=e=>{let{className:t,attributeValue:i,handleSetAsDefault:a,attributeType:l}=e;const s=b_(),u=(0,o.useSelector)(b().selectors.getEntity)||{},d=(0,o.useSelector)((e=>b().selectors.getModifiedEntity(e,null==u?void 0:u.uri)))||{},h=(0,o.useSelector)(b().selectors.getIsViewMode)?u:d,f=(0,o.useSelector)(b().selectors.getImageAttributesFieldsOrder)||{},g=f[null==u?void 0:u.type]||(null==f?void 0:f.default)||{},[m,y]=(0,n.useState)(!1);(0,n.useEffect)((()=>{y((null==h?void 0:h.defaultProfilePic)===(null==i?void 0:i.uri))}),[null==i?void 0:i.uri,h]);const v=(0,n.useCallback)((()=>{a(i.uri)}),[null==i?void 0:i.uri]);return r().createElement(ss(),{className:c()(s.root,t)},r().createElement(ss(),{className:s.header},r().createElement(R(),{className:s.headerTitle},p().text("Details"))),r().createElement(ss(),{className:s.bodyWrapper},r().createElement(ss(),{className:s.body},r().createElement(Xp(),{classes:{root:s.formControlLabel,label:s.checkboxLabel},control:r().createElement(fs(),{className:s.checkbox,checked:m,onChange:v,color:"default"}),label:p().text("Set as default")}),r().createElement(v_,{attributeType:l,imageAttributeFieldsOrder:g,attributeValue:i}))))},w_=(0,i.makeStyles)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),S_=e=>{let{attributeValues:t=[],currentAttributeValueUri:o,setCurrentAttributeValueUri:i,handleSetAsDefault:a,attributeType:l}=e;const[s,c]=(0,n.useState)(0);(0,n.useEffect)((()=>{u(o?t.findIndex((e=>e.uri===o)):0)}),[o,t]);const u=(0,n.useCallback)((e=>{var n;c(e),i(null===(n=t[e])||void 0===n?void 0:n.uri)}),[t]),d=w_();return r().createElement(ss(),{className:d.root},r().createElement(_E,{attributeValueIndex:s,setAttributeValueIndex:u,attributeValues:t,className:d.main}),r().createElement(x_,{handleSetAsDefault:a,attributeValue:t[s],className:d.details,attributeType:l}))},E_=window["material-ui"].AppBar;var O_=h.n(E_),C_=h(3115);function __(){return __=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__.apply(this,arguments)}const k_=e=>r().createElement("svg",__({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),r().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},r().createElement("mask",{id:"Details_svg__b",fill:"#fff"},r().createElement("use",{xlinkHref:"#Details_svg__a"})),r().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"}))),T_=window["material-ui"].ButtonGroup;var P_=h.n(T_);const M_=(0,i.makeStyles)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px","& + $title":{marginLeft:"8px"}},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,i.fade)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,i.fade)(e.palette.primary.main,.24)}}}))),R_=M_,I_=Oi(D()),D_=e=>{let{className:t,classes:n={},modes:o=[],modeId:i,onChange:a}=e;const l=R_();return r().createElement(P_(),{className:t},o.map((e=>{let{id:t,title:o,tooltipTitle:s,Icon:u,disabled:d}=e;return r().createElement(I_,{disabled:d,showForDisabled:d&&!!s,key:String(t),className:c()(l.button,{[l.current]:i===t},n.button),tooltipTitle:s,onClick:(p=t,()=>a(p)),"data-reltio-id":`reltio-search-mode-${t}`},u&&r().createElement(u,{className:l.icon}),o&&r().createElement("div",{className:l.title},o));var p})))},A_=(0,i.makeStyles)((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}})));let L_;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(L_||(L_={}));const N_=e=>{let{open:t,mode:o,children:i,header:a,onClose:l,onChangeMode:s}=e;const c=A_(),u=(0,n.useMemo)((()=>[{id:L_.GALLERY_MODE,title:p().text("Gallery"),Icon:C_.Z},{id:L_.DETAILS_MODE,title:p().text("Details"),Icon:k_}]),[]);return r().createElement(En(),{classes:{paper:c.paper},open:t,BackdropProps:{className:c.backdrop},fullScreen:!0},r().createElement(O_(),{classes:{colorPrimary:c.appBar}},r().createElement(L(),{className:c.toolbar},r().createElement(ss(),{className:c.headerLeft},r().createElement(Pi,{tooltipTitle:p().text("Close"),onClick:l,className:c.closeButton,iconClassName:c.closeIcon,icon:BS.default}),null==a?void 0:a.left),r().createElement(ss(),{className:c.headerCenter},r().createElement(D_,{modes:u,modeId:o,onChange:s,className:c.modeSwitcher})),r().createElement(ss(),{className:c.headerRight},null==a?void 0:a.right))),r().createElement(wn(),{className:c.content},i))},j_=(0,i.makeStyles)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),z_=e=>{let{items:t,selectedItems:n,onSelectImage:o,onDeselectImage:i,onShareLink:a,onSetAsDefault:l,onDownload:s,onClickImage:c,onDelete:u}=e;const d=j_(),p=e=>r().createElement(SS,{id:e,selected:n.includes(e),selectionMode:0!==n.length,onSelect:()=>o(e),onDeselect:()=>i(e),onShareLink:()=>a(e),onSetAsDefault:()=>l(e),onDownload:()=>s(e),onClick:()=>c(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return r().createElement(ss(),{className:d.root},r().createElement(EE(),{container:!0},t.map((e=>{let{id:t,src:n}=e;return r().createElement(EE(),{key:t,classes:{item:d.item},item:!0},r().createElement(fS,{size:hS.LARGE,onClick:()=>c(t),src:n,overlay:p(t)}))}))))},F_=(0,i.makeStyles)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),B_=e=>{let{selectedItems:t,items:n,onSelectAll:o,onClearAll:i}=e;const a=F_(),l=t.length===n.length;return r().createElement(hl(),{component:"button",underline:"none",classes:{button:a.selectButton},onClick:l?i:o},l?p().text("Clear selection"):p().text("Select all images"))};var W_=h(5292);const U_=(0,i.makeStyles)((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),H_=e=>{let{onDownload:t,onShare:n,onUpload:o,onDelete:i}=e;const a=U_();return r().createElement(r().Fragment,null,o&&r().createElement(D(),{variant:"contained",color:"primary",onClick:o,startIcon:r().createElement(oS.Z,null)},p().text("Upload")),t&&o&&r().createElement("div",{className:a.divider}),t&&r().createElement(Pi,{className:a.downloadButton,tooltipTitle:p().text("Download selected items"),icon:xS,onClick:t}),n&&r().createElement(Pi,{className:a.shareButton,tooltipTitle:p().text("Copy link"),icon:W_.Z,onClick:n}),i&&r().createElement(Pi,{className:a.deleteButton,tooltipTitle:p().text("Delete selected items"),icon:qp.Z,onClick:i}))},V_=e=>{let{attributeValues:t,open:i,onClose:a,currentAttributeValueUri:l,setCurrentAttributeValueUri:s,attributeType:c,onDownload:d,onShareLink:p,onSetAsDefault:h,onUpload:f,onDeleteAttribute:g}=e;const[m,y]=(0,n.useState)([]),[v,x]=(0,n.useState)(L_.GALLERY_MODE),w=(0,o.useSelector)(b().selectors.getIsViewMode);(0,n.useEffect)((()=>{x(l?L_.DETAILS_MODE:L_.GALLERY_MODE)}),[l]);const S=t.map((e=>({src:(0,Fo.getImageAttributeOvThumbnailUrl)(e),downloadURL:(0,Fo.getImageAttributeOvUrl)(e),id:e.uri}))),E=e=>{p(S.find((0,u.propEq)("id",e)).downloadURL)},O=e=>{const n=t.find((t=>{let{uri:n}=t;return n===e}));h(n)},C=e=>{g({uri:e,attributeType:c})},_=v===L_.GALLERY_MODE,k=v===L_.DETAILS_MODE,T=m.length>0,P=k||_&&T,M=!w&&P,R=!w&&(k||_&&!T),I=_&&T&&r().createElement(B_,{items:S,selectedItems:m,onClearAll:()=>{y([])},onSelectAll:()=>{y((0,u.pluck)("id",S))}}),D=r().createElement(H_,{onDelete:M?()=>{(_?m:[l]).forEach((e=>{C(e)})),m.length&&y([])}:void 0,onDownload:P?()=>{const e=_?(0,u.pipe)((0,u.filter)((e=>{let{id:t}=e;return m.includes(t)})),(0,u.pluck)("downloadURL"))(S):[S.find((0,u.propEq)("id",l)).downloadURL];d(e)}:void 0,onShare:k?()=>{E(l)}:void 0,onUpload:R?f:void 0});return r().createElement(N_,{mode:v,open:i,onChangeMode:x,header:{left:I,right:D},onClose:a},_&&r().createElement(z_,{items:S,selectedItems:m,onSelectImage:e=>{y((t=>[...t,e]))},onDeselectImage:e=>{y((t=>t.filter((t=>t!==e))))},onShareLink:E,onSetAsDefault:O,onDownload:e=>{d([S.find((0,u.propEq)("id",e)).downloadURL])},onClickImage:e=>{s(e),x(L_.DETAILS_MODE)},onDelete:w?void 0:C}),k&&r().createElement(S_,{handleSetAsDefault:O,setCurrentAttributeValueUri:s,currentAttributeValueUri:l,attributeValues:t,attributeType:c}))},G_=(0,i.makeStyles)((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:e=>{let{imageWidth:t,imageHeight:n}=e;return{backgroundColor:"white",width:t,height:n,position:"absolute",right:0,cursor:"pointer"}},moreButton:t=>{let{imageWidth:n,imageHeight:r}=t;return{display:"flex",justifyContent:"center",alignItems:"center",width:n,height:r,backgroundColor:Xe(e.palette.primary.main,.06)}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function q_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Y_=e=>{let{attributeType:t,attributeValues:i=[],renderImage:a,overlay:l=!1,countFixedItems:s=0,children:c,onUpload:u,onDeleteAttribute:d,imageSize:p=JC,paging:h,parentUri:f,showNonOv:g,requestNextPageOfAttributeValues:m}=e;const y=(0,o.useSelector)(b().selectors.getEntity)||{},x=(0,o.useSelector)(b().selectors.getIsViewMode),w=(0,o.useDispatch)(),S=G_(p);(0,n.useEffect)((()=>{if(h&&m){const e=g?h.totalOvValues:h.totalValues;e>i.length&&m({parentUri:f,attributeTypeUri:t.uri,attributeTypeName:t.name,values:[],defaultMaxValues:e})}}),[h,m,t,f,i.length,g]);const E=(0,n.useRef)(),[O,C]=(0,n.useState)(0),[_,k]=(0,n.useState)(0),T=(0,n.useContext)(vE),[P,M]=(0,n.useState)(!1),[I,D]=(0,n.useState)(),A=(0,n.useCallback)((e=>{const{imageMargin:t,imageWidth:n}=p,r=Math.floor((e+t)/(n+t))-s,o=e+t-(r+s)*(n+t)<8;C(r),i.length>r?k(i.length-r+(o?1:0)):k(0)}),[i.length,s,p]),L=(0,n.useCallback)((e=>{A(e),E.current=e}),[A]);(0,n.useEffect)((()=>{E.current&&A(E.current)}),[i.length,A]);const N=(0,n.useCallback)((e=>{T||(D(e),M(!0))}),[T]),j=(0,n.useCallback)((()=>{M(!1)}),[]),z=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const n=document.createElement("iframe");n.setAttribute("style","display: none;"),n.setAttribute("src",e),document.body.appendChild(n),setTimeout((()=>document.body.removeChild(n)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),F=e=>navigator.clipboard.writeText(e),B=(0,n.useCallback)((e=>{x?(0,Fo.insertDefaultImageByAttrUri)(y.uri,e.uri).then((t=>{let{status:n}=t;"success"===n&&w(v.profile.entity.actions.setDefaultProfilePic(e))})):w(v.profile.modifiedEntities.actions.setDefaultProfilePic({entityUri:y.uri,value:e}))}),[x,y.uri,w]),W=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q_(e,t,n[t])}))}return e}({onOpenImageGalleryDialog:N},l&&{onDownload:z,onShareLink:F,onSetAsDefault:B});return r().createElement(r().Fragment,null,r().createElement(Ja,{handleWidth:!0,onResize:L}),r().createElement(V_,{attributeValues:i,open:P,onClose:j,setCurrentAttributeValueUri:D,currentAttributeValueUri:I,attributeType:t,onDownload:z,onShareLink:F,onSetAsDefault:B,onUpload:u,onDeleteAttribute:d}),r().createElement("div",{className:S.imageBox},c,i.slice(0,O).map(a(W)),_>0&&r().createElement("div",{className:S.moreButtonContainer},r().createElement("div",{className:S.moreButton,onClick:()=>N()},r().createElement(R(),{className:S.number},`+${_}`)))))},K_=(0,i.makeStyles)((()=>({root:{width:"100%",marginBottom:"10px"},image:e=>{let{imageMargin:t}=e;return{marginRight:t,cursor:"pointer","&:last-child":{marginRight:0}}},uploadContainer:e=>{let{imageMargin:t,imageWidth:n,imageHeight:r}=e;return{backgroundColor:"white",width:n,height:r,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:t,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),$_=e=>{let{attributeType:t={},attributeValues:i=[],onDeleteAttribute:a,onChangeAttribute:l,requestNextPageOfAttributeValues:s,parentUri:c,paging:u,showNonOv:d,imageSize:p=JC}=e;const h=K_(p),f=(0,o.useSelector)(b().selectors.getEntity)||{},g=(0,o.useSelector)((e=>b().selectors.getModifiedEntityDefaultProfilePic(e,f.uri))),m=(0,o.useDispatch)(),[y,x]=(0,n.useState)(!1),w=(0,n.useCallback)((()=>{x((e=>!e))}),[]),S=(0,n.useCallback)((e=>{const n=(0,Fo.generateUri)(c,t.name),r={};for(const o in e){const i=(t.attributes||[]).find((e=>{let{name:t}=e;return t===o}));i&&(r[o]=[{uri:(0,Fo.generateUri)(n,i.name),ov:!0,value:e[o],type:i.uri}])}l({attributeType:t,uri:n,value:r})}),[l,c,t]),E=(0,n.useCallback)((e=>{if(a(e),g===e.uri){var t;const n=(null===(t=i[0])||void 0===t?void 0:t.uri)===e.uri?i[1]:i[0];m(v.profile.modifiedEntities.actions.setDefaultProfilePic({entityUri:f.uri,value:n||{}}))}}),[a,f,g,i]),O=(e,n)=>{const{onOpenImageGalleryDialog:o,onDownload:i,onShareLink:a,onSetAsDefault:l}=e,s=(0,Fo.getImageAttributeOvUrl)(n),{uri:c}=n;return r().createElement(SS,{id:c,onShareLink:()=>a(s),onSetAsDefault:()=>l(n),onDelete:()=>E({uri:c,attributeType:t}),onDownload:()=>i([s]),onClick:()=>o(c)})};return r().createElement("div",{className:h.root},r().createElement(Y_,{attributeValues:i,attributeType:t,renderImage:e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,Fo.getImageAttributeOvThumbnailUrl)(t),{uri:o}=t,{onOpenImageGalleryDialog:i}=e;return r().createElement("div",{className:h.image,key:o},r().createElement(fS,{src:n,overlay:O(e,t),onClick:()=>i(o),size:{imageWidth:p.imageWidth,imageHeight:p.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:1,onUpload:w,onDeleteAttribute:E,imageSize:p,requestNextPageOfAttributeValues:s,paging:u,parentUri:c,showNonOv:d},r().createElement("div",{className:h.uploadContainer,onClick:w},r().createElement(Ti,{className:h.uploadButton,iconClassName:h.uploadIcon,icon:oS.Z}))),r().createElement(yE,{open:y,onUpload:S,onClose:w}))},Z_=e=>{let{attributeType:t,attributeValues:n,paging:o,parentUri:i,showNonOv:a,onDeleteAttribute:l,onChangeAttribute:s,requestNextPageOfAttributeValues:u,highlightedAttribute:d}=e;const p=pw(),{label:h,description:f}=t,{ref:g,highlightedClassName:m}=Lw(d);return r().createElement("div",{ref:g,className:c()(p.wrapper,m)},r().createElement("div",{className:p.titleWrapper},r().createElement(_p,{className:p.title,label:h,"data-reltio-id":"reltio-attribute-label"}),r().createElement(Mw,{className:p.description,description:f})),r().createElement($_,{attributeValues:n,attributeType:t,paging:o,onDeleteAttribute:l,parentUri:i,onChangeAttribute:s,requestNextPageOfAttributeValues:u,showNonOv:a}))};function X_(){return X_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X_.apply(this,arguments)}var Q_,J_;(J_=Q_||(Q_={})).imageLine="imageLine",J_.special="special",J_.default="default";const ek=Md(jb,((e,t)=>{let{attributeType:n,parentUri:r}=t;const{element:o,type:i}=e||{},a=(e=>e===Lb.NewAttribute)(i)&&o.uri===n.uri;return{highlightedAttribute:a?e:null,highlightedError:Nb(i)&&(0,Fo.isAttributeTypeError)(o,r,n.uri)?e:null}}),(e=>{let{values:t,attributeType:n,mode:o=Fo.Mode.Viewing,crosswalks:i,drawLines:a,paging:l={},parentUri:s,errors:c,errorMessage:d,max:p=1/0,showEmptyEditors:h,showNonOv:f,highlightedError:g,highlightedAttribute:m,onAddAttributes:y,onDeleteAttribute:v,onChangeAttribute:b,onDeactivateError:x,additionalControlsRenderer:w,requestNextPageOfAttributeValues:S}=e;const E=(0,u.partition)(Fo.isOv),[O,C]=E(t),_=f?t:O,k=f?[]:C,T={errorMessage:d,errors:c,mode:o,parentUri:s,onAddAttributes:y,onDeleteAttribute:v,onChangeAttribute:b,onDeactivateError:x,additionalControlsRenderer:w,showEmptyEditors:h,highlightedError:g,highlightedAttribute:m};return(()=>{switch((0,u.cond)([[Fo.isSpecialAttribute,(0,u.always)(Q_.special)],[Fo.isImage,(0,u.always)(Q_.imageLine)],[u.T,(0,u.always)(Q_.default)]])(n)){case Q_.special:return r().createElement(bp,{enabled:a},r().createElement(rS,X_({values:_,attributeType:n},T)));case Q_.imageLine:return r().createElement(bp,{enabled:a},r().createElement(Z_,{attributeValues:_,attributeType:n,paging:l,onDeleteAttribute:v,parentUri:s,onChangeAttribute:b,requestNextPageOfAttributeValues:S,showNonOv:f,highlightedAttribute:m}));default:return r().createElement(jw,X_({values:_,attributeType:n,max:p,paging:l,crosswalks:i,drawLines:a,requestNextPageOfAttributeValues:S,showNonOv:f,nonVisibleValues:k},T))}})()})),tk={requestNextPageOfAttributeValues:v.profile.actions.requestNextPageOfAttributeValues,onDeactivateError:v.profile.errors.actions.errorDeactivated},nk=(0,o.connect)(((e,t)=>{let{parentUri:n,attributeType:r,max:o}=t;return{errors:b().selectors.getActiveErrorsForAttributesPager(e,n,r),errorMessage:(0,Fo.getAttributePagerActiveTypeErrorMessage)(n,r,b().selectors.getProfileErrors(e)),max:o||b().selectors.getDefaultMaxValues(e)}}),tk)(ek);function rk(){return rk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rk.apply(this,arguments)}function ok(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ik=e=>{let{parentAttributeType:t,attrTypes:o,entity:i,parentUri:a,showEmptyEditors:l,mode:s,crosswalks:c,drawLines:d,children:h,className:f,alwaysVisibleTypeUris:g=ZO,onAddAttributes:m,onChangeAttribute:y,onDeleteAttribute:v,additionalControlsRenderer:b,showNonOv:x,highlightAttribute:w}=e;const{attributes:S={}}=i,[E,O]=(0,n.useState)({}),C=(0,n.useCallback)(((e,t)=>{O((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ok(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);(0,n.useEffect)((()=>{O({})}),[a]);const _=(0,n.useMemo)((()=>t&&(0,Fo.checkCanCreateAttribute)({attributeType:t,mode:s})),[t,s]),k=((e,t,n,r)=>e.filter((e=>{const o=((e,t)=>{const{attributes:n={},analyticsAttributes:r={}}=t;return(0,u.cond)([[Fo.isSpecialAttribute,(0,u.always)(t)],[(0,u.both)(Fo.isAnalyticAttribute,(0,u.always)(r)),(0,u.always)(r)],[u.T,(0,u.always)(n)]])(e)})(e,t),i=(e=>(0,Fo.isSpecialAttribute)(e)?"uri":"name")(e);return!((e.singleValue||(0,Fo.isRoleAttrType)(e)||(0,Fo.isTagAttrType)(e))&&((0,u.has)(e[i])(o)||n&&(null==r||!r[e.uri])))})))((0,n.useMemo)((()=>(0,Fo.getCreatableAttributeTypes)(s,o)),[o,s]),i,l,E),T=(0,n.useContext)(Ow),P=(0,n.useMemo)((()=>(0,Fo.getAttributesListForEditMode)(o,s,i,l,x,T)),[o,s,i,l,x,T]),[M,R]=(0,n.useMemo)((()=>QO(g,P)),[P,g]),I=(0,n.useCallback)((e=>{m(e.map((e=>({attributeType:e,parentUri:e===t?(0,Fo.getParentUri)(a):a})))),w((0,u.last)(e),Lb.NewAttribute)}),[m,a,t]),D={enabled:d},A=(0,n.useMemo)((()=>({hasDeletionsMap:E,setHasDeletions:C})),[E,C]);return r().createElement("div",{className:f},h&&r().createElement(bp,D,h),r().createElement(bp,rk({},D,{plain:!0}),k.length>0&&r().createElement(pO,{label:p().text("More attributes"),onApply:I,dense:d,data:k,parent:_&&t})),r().createElement(eS.Provider,{value:A},R.concat(M).map((e=>{let{attrType:t,values:n}=e;return r().createElement(nk,{key:`${t.uri}_${a}`,attributeType:t,drawLines:d,values:n,paging:(0,u.path)(["paging",t.uri],S),parentUri:a,showEmptyEditors:l,mode:s,crosswalks:c,onAddAttributes:m,onChangeAttribute:y,onDeleteAttribute:v,additionalControlsRenderer:b,showNonOv:x})}))))};ik.propTypes={parentAttributeType:l().object,attrTypes:l().array,entity:l().object,parentUri:l().string,children:l().node,showEmptyEditors:l().bool,mode:Fo.ModeType,crosswalks:l().array,drawLines:l().bool,showNonOv:l().bool,className:l().string,alwaysVisibleTypeUris:l().array,onAddAttributes:l().func,onChangeAttribute:l().func,onDeleteAttribute:l().func,additionalControlsRenderer:l().func,highlightAttribute:l().func};const ak=Md(jb,(e=>{const{highlightAttribute:t}=e||{};return{highlightAttribute:t}}),ik),lk=(0,i.makeStyles)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});function sk(){return sk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sk.apply(this,arguments)}const ck=e=>{let{innerRef:t,innerProps:n,selectOption:o,data:i}=e;const a=lk(),{value:l,label:s,startObject:u,endObject:d}=i,p=u.objectType.label+" ↔ "+d.objectType.label;return r().createElement(ms(),sk({className:a.container,ref:t,key:l,onClick:()=>o({label:s,value:l,startObject:u,endObject:d})},n),r().createElement("div",{className:a.icons},r().createElement(kx,{className:a.iconTop,entityType:u.objectType}),r().createElement(kx,{className:a.iconBottom,entityType:d.objectType})),r().createElement("div",{className:a.text},r().createElement(al,{value:s},r().createElement(R(),{className:c()(a.textItem,a.primaryTextItem)},s)),r().createElement(al,{value:p},r().createElement(R(),{color:"textSecondary",className:c()(a.textItem,a.secondaryTextItem)},p))))};ck.propTypes={innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),innerProps:l().object.isRequired,selectOption:l().func.isRequired,data:l().shape({value:l().string.isRequired,label:l().string.isRequired,startObject:l().object,endObject:l().object})};const uk=ck;function dk(){return dk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dk.apply(this,arguments)}function pk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hk=e=>{let{value:t={},options:o=[],onChange:i=u.identity,TextFieldProps:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","options","onChange","TextFieldProps"]);const s=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pk(e,t,n[t])}))}return e}({},(0,u.defaultTo)({},a),{"data-reltio-id":"relation-type-selector"})),[a]);return r().createElement(Ox,dk({value:t,options:o,onChange:i,label:p().text("Select relationship type "),components:{Option:uk},TextFieldProps:s},l))},fk=l().shape({label:l().string.isRequired,value:l().string.isRequired,startObject:l().object,endObject:l().object});hk.propTypes={value:fk,options:l().arrayOf(fk),onChange:l().func};const gk=hk;function mk(){return mk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mk.apply(this,arguments)}const yk=e=>{let{relation:t={},inRelationTypes:o=[],outRelationTypes:i=[],onChange:a=u.identity,applyFirstByDefault:l=!1,reversedContextLabels:s=!1}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:d,fromEditorValue:p,toEditorValue:h}=(e=>{let{reversedContextLabels:t}=e;const r=(0,n.useCallback)(((e,n)=>{const r={},o=(0,u.pipe)(Fo.getDirectionalLabelFromObject,(0,u.tap)((e=>r[e]=(0,u.propOr)(0,e,r)+1))),i=(0,u.ascend)((0,u.prop)("label")),a=(0,u.curry)(((e,n)=>{let{uri:r,label:i,startObject:a,endObject:l}=n;const s=e===(t?Fo.Directions.OUT:Fo.Directions.IN)?a:l;return{label:{directionalLabel:o(s),typeLabel:i},value:`${r},${e}`,startObject:a,endObject:l}}));return e.map(a(Fo.Directions.IN)).concat(n.map(a(Fo.Directions.OUT))).map((0,u.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?r[t]>1?`${t} (${n})`:t:n}})).sort(i)}),[t]);return{getRelationTypesOptions:r,fromEditorValue:(0,n.useCallback)(((e,t)=>n=>{const[r,o]=n.value.split(",");return{type:(o===Fo.Directions.IN?e:t).find((0,u.propEq)("uri",r)),direction:o}}),[]),toEditorValue:(0,n.useCallback)(((e,t)=>t.find((0,u.propEq)("value",`${e.relationType},${e.direction}`))),[])}})({reversedContextLabels:s}),f=(0,n.useMemo)((()=>d(o,i)),[d,o,i]),g=(0,n.useCallback)((0,u.pipe)(p(o,i),a),[p,o,i,a]),m=!!t.relationType;return(0,n.useEffect)((()=>{l&&f.length&&!m&&g(f[0])}),[f,l,g,m]),r().createElement(gk,mk({value:h(t,f),options:f,onChange:g},c))};yk.propTypes={className:l().string,relation:Fo.ConnectionRelationType,inRelationTypes:l().arrayOf(Fo.RelationTypeType),outRelationTypes:l().arrayOf(Fo.RelationTypeType),applyFirstByDefault:l().bool,reversedContextLabels:l().bool,onChange:l().func};const vk=yk;function bk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xk=e=>{let{connection:t,relatedEntity:i,inRelationTypes:a=[],outRelationTypes:l=[],showEmptyEditors:s,entityErrorMessage:d,onChangeAttribute:p,onRemoveAttribute:h,onAddAttributes:f,onChangeRelationType:g,onChangeEntity:m}=e;const y=mp(),{relation:v,entity:x}=t,{attributes:w,uri:S,type:E="",direction:O}=v||{},C=Boolean(E),_=(0,o.useSelector)(b().selectors.getMetadata),k=(0,n.useMemo)((()=>v&&function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bk(e,t,n[t])}))}return e}({attributes:w},(0,Fo.getActivenessAttributes)(v))),[v,w]),T=(0,n.useMemo)((()=>(0,Fo.getRelationAttributesList)(_,E)),[E,_]),P=(0,n.useMemo)((()=>C?(0,Fo.getSuitableEntityTypeUrisForRelationTypes)(O===Fo.Directions.OUT,_,[(0,Fo.getRelationType)(_,E)]):(0,u.uniq)((0,Fo.getSuitableEntityTypeUrisForRelationTypes)(!0,_,l).concat((0,Fo.getSuitableEntityTypeUrisForRelationTypes)(!1,_,a)))),[C,E,_,a,l]),M=(0,o.useSelector)((e=>b().selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),R=(0,n.useMemo)((()=>v&&{relationType:v.type,direction:v.direction}),[v]),I=(0,n.useMemo)((()=>x&&{entityUri:x.uri,entityType:x.type,entityLabel:(0,Fo.getLabel)(x.label)}),[x]),D=(0,n.useMemo)((()=>x&&x.uri?a.filter((0,Fo.isAvailableRelationBetweenEntities)(!1,x,i,_)):a),[x,a,i,_]),A=(0,n.useMemo)((()=>x&&x.uri?l.filter((0,Fo.isAvailableRelationBetweenEntities)(!0,x,i,_)):l),[x,l,i,_]);(0,n.useEffect)((()=>{const{type:e,direction:t}=(0,Fo.getDefaultRelationTypeObject)(a,l)||{};!E&&e&&g&&g({type:e.uri,direction:t})}),[E,a,l,g]),Vl((()=>{const{type:e,direction:t}=(0,Fo.getDefaultRelationTypeObject)(D,A)||{};!E&&e&&g({type:e.uri,direction:t})}),[E,x,D,A,m]);const L=(0,n.useCallback)((e=>{let{type:t,direction:n}=e;g({type:t.uri,direction:n})}),[g]);return r().createElement(r().Fragment,null,g&&r().createElement(vk,{className:y.item,relation:R,metadata:_,inRelationTypes:a,outRelationTypes:l,onChange:L}),m&&r().createElement(Ob,{errorMessage:d,className:y.item},r().createElement(ew,{key:E,className:c()({[y.dense]:d}),entity:I||{},entityTypesUris:P,max:20,globalSearchRequestOptions:M,mode:Fo.ModeTypes.EDITING,onChange:m,onCreate:void 0,metadata:_,attributeTypesSelectionStrategy:void 0})),E&&r().createElement(ak,{attrTypes:T,entity:k,showEmptyEditors:s,mode:Fo.ModeTypes.EDITING,parentUri:S,onAddAttributes:f,onChangeAttribute:p,onDeleteAttribute:h}))},wk=Md(Rd,((e,t)=>{let{relationshipTable:n}=e;return{editingRelationObject:n.editingRelations.find((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)})),onUpdateEditingRelation:n.onUpdateEditingRelation,onCancelRelationEditing:n.onCancelRelationEditing,onSaveEditingRelation:n.onSaveEditingRelation}}),(e=>{let{open:t,editingRelationObject:i,onUpdateEditingRelation:a,onCancelRelationEditing:l,onSaveEditingRelation:s}=e;const c=(0,o.useDispatch)(),d=(0,o.useSelector)(b().selectors.getMetadata),{relation:h,initialRelation:f}=i,g=(0,n.useMemo)((()=>!(0,u.equals)(f,h)),[h,f]),m=ap(),y=(0,n.useCallback)((e=>{let{relation:t}=e;return a(t)}),[a]),x=(0,n.useCallback)((()=>l(h.uri)),[l,h.uri]),w=(0,n.useMemo)((()=>({relation:h})),[h]),{onAddAttributes:S,onChangeAttribute:E,onRemoveAttribute:O}=gp({connection:w,onConnectionChange:y});return t?r().createElement("div",{className:m.expandedRow},r().createElement(xk,{connection:w,onAddAttributes:S,onChangeAttribute:E,onRemoveAttribute:O}),r().createElement("div",{className:m.actionButtons},r().createElement(D(),{onClick:x},p().text("Cancel")),r().createElement(D(),{color:"primary",disabled:!g,onClick:()=>{(e=>{const t=(0,Fo.validateConnectionRelation)(d,{relation:{object:e}});return c(v.profile.errors.actions.errorsSet(t)),0===t.length})(h)&&s(f,h)}},p().text("Save")))):null}));var Sk=h(7604);const Ek=window["material-ui"].DialogContentText;var Ok=h.n(Ek);const Ck=window["material-ui"].DialogTitle;var _k=h.n(Ck);const kk=(0,i.makeStyles)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),Tk=e=>{let{open:t,title:n,content:o,onCancel:i,cancelCaption:a=p().text("Cancel"),onDiscard:l,discardCaption:s="",onSave:c,saveCaption:u=p().text("Save"),disabledSave:d=!1}=e;const h=kk();return r().createElement(En(),{open:t,onClose:i,classes:{paperScrollPaper:h.paper}},r().createElement(_k(),{classes:{root:h.title}},n),r().createElement(wn(),{classes:{root:h.content}},r().createElement(Ok(),{classes:{root:h.contentText}},o)),r().createElement(bn(),{className:h.actionButtons,disableSpacing:!0},i&&r().createElement(D(),{onClick:i},a),r().createElement("div",null,l&&r().createElement(D(),{onClick:l,classes:{root:h.discardButton}},s),r().createElement(D(),{onClick:c,color:"primary",disabled:d,autoFocus:!0},u))))},Pk=Md(Rd,(0,u.pick)(["onDeleteRelation"]),(e=>{let{uri:t,open:n,onClose:o,onDeleteRelation:i}=e;return r().createElement(Tk,{open:n,title:p().text("Do you want to make a clean break?"),content:p().text("To end this relationship, click Delete Relationship. To keep the connection, click Cancel."),saveCaption:p().text("Delete relationship"),discardCaption:p().text("Cancel"),onDiscard:o,onSave:()=>{i(t),o()}})})),Mk=(0,n.memo)((e=>{let{uri:t}=e;const[o,i]=(0,n.useState)(!1),a=(0,n.useCallback)((()=>i(!0)),[]),l=(0,n.useCallback)((()=>i(!1)),[]);return r().createElement(r().Fragment,null,r().createElement(Pi,{icon:qp.Z,size:"XXS",tooltipTitle:p().text("Delete"),"data-reltio-id":"reltio-delete-relation-button",onClick:a}),r().createElement(Pk,{open:o,onClose:l,uri:t}))}));Mk.displayName="DeleteRelationButton";const Rk=Mk,Ik=Md(Rd,((e,t)=>{let{relationshipTable:{onStartRelationEditing:n,editingRelations:r}}=e;return{onEdit:n,isEditing:r.some((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)}))}}),(e=>{let{rowValue:{relation:{uri:t,type:n}},className:i,onEdit:a,isEditing:l}=e;const s=ap(),u=(0,o.useSelector)(b().selectors.getMetadata),d=(0,Fo.getRelationType)(u,n),h=(0,Fo.checkMetadataForUpdate)(Fo.Mode.Editing,d),f=(0,Fo.checkMetadataForDelete)(Fo.Mode.Editing,d);return r().createElement("div",{className:c()(s.controlsCell,i,{[s.editingMode]:l})},h&&r().createElement(Pi,{className:c()(s.editButton,{[s.hidden]:l}),icon:Sk.Z,size:"XXS",tooltipTitle:p().text("Edit"),"data-reltio-id":"reltio-edit-relationship-button",onClick:()=>a(t)}),f&&r().createElement(Rk,{uri:t}))}));function Dk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ak(e,t,n[t])}))}return e}function Ak(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Lk=(e,t)=>t[e].relation.uri||`${e}`,Nk=Md(Rd,(e=>{let{relationshipTable:t}=e;return Dk({},t)}),(e=>{let{rowsData:t,sorting:o,onSort:i,total:a,page:l,rowsPerPage:s,onPageChange:u,onRowsPerPageChange:d,editingRelations:h,loading:f}=e;const g=tp(),m=(0,n.useMemo)((()=>[{id:"entityLabel",label:p().text("Profile"),headCellRenderer:up,rowCellValueRenderer:pp,sortable:!0,columnClassName:g.profileColumn},{id:"relationTypeLabel",label:p().text("Relationship type"),headCellRenderer:up,rowCellValueRenderer:dp,sortable:!0,columnClassName:g.relationshipTypeColumn},{id:"entityTypeLabel",label:p().text("Entity Type"),headCellRenderer:up,rowCellValueRenderer:dp,sortable:!0,columnClassName:g.entityTypeColumn},{id:"controls",label:"",headCellRenderer:up,rowCellValueRenderer:Ik}]),[g]),y=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e;null===(e=y.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const v=(0,n.useMemo)((()=>t.map((e=>null!=h&&h.some((t=>{var n;return t.initialRelation.uri===(null==e||null===(n=e.relation)||void 0===n?void 0:n.uri)}))?Dk({},e,{expanded:!0}):e))),[t,h]),b=(0,n.useMemo)((()=>({tableRow:c()(g.row,"collapsibleTableRow")})),[g]);return r().createElement("div",{className:g.tableWithPagination},r().createElement("div",{className:g.tableContainer},r().createElement(Qd,{ref:y,columnsData:m,rowsData:v,sorting:o,onSort:i,getRowKey:Lk,ExpandedRowRenderer:wk,defaultRowHeight:28,classes:b})),a>yd[0]&&r().createElement(Td,{count:a,rowsPerPageOptions:yd,rowsPerPage:s,onChangeRowsPerPage:d,page:l,onChangePage:u,basicTableRef:y}),f&&r().createElement(Ho,null))}));var jk=h(6444);const zk=(0,i.makeStyles)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),Fk=Md(Rd,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const o=zk();return r().createElement(eO,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:p().text("Search profiles"),classes:{input:o.input}})})),Bk=(0,i.makeStyles)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),Wk=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:o}=t;if(n.length>0){const[t]=Array.from(n),i=document.createRange();i.setStart(t,0);for(let n=0;n<e.length;n++){i.setEnd(t,i.endOffset+e[n].length);const{width:a}=i.getBoundingClientRect();if(r+a>o)return n;n!==e.length-1&&i.setEnd(t,i.endOffset+", ".length)}}return-1},Uk=e=>e.join(", "),Hk=e=>`calc(${(0,u.isNil)(e)?"100%":`${e}px`} - 35px)`,Vk=e=>{let{list:t,maxWidth:o}=e;const i=Bk(),a=(0,n.useRef)(),[l,s]=(0,n.useState)(0);(0,n.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=Wk(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,a.current))}),[t]);const c=Uk(t),u=l>0,d=u?Uk(t.slice(0,-l)):c;return r().createElement(wi(),{title:u?c:""},r().createElement("div",{className:i.listLabelContainer},r().createElement("div",{style:{width:Hk(o)},className:i.listLabel,ref:a},c),r().createElement("div",{className:i.visibleItemsLabel},d),u&&r().createElement("div",{className:i.hiddenCount},`+${l}`)))};function Gk(){return Gk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gk.apply(this,arguments)}const qk=(0,u.always)(32),Yk=(0,n.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:o,width:i,height:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return r().createElement(aO,Gk({getItemSize:qk,renderItem:(e,i,a)=>{let{item:l}=i;const s=!!t.find((e=>l.uri===e)),c=a===o;return r().createElement(VE,{key:l.uri,onClick:n,checked:s,data:l,label:r().createElement(Rp,{text:l.label,highlight:l.filterText}),labelInText:l.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:l.LogoIcon})},focusIndex:o,fixedTitle:!1,disableHorizontalScrollbar:!0,width:i,height:a},l))}));Yk.displayName="SelectMetadataTypesList";const Kk=(0,i.makeStyles)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function $k(){return $k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$k.apply(this,arguments)}function Zk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xk(e,t,n[t])}))}return e}function Xk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qk=(0,n.memo)((e=>{let{placeholder:t,classes:o={},items:i,selectedItemsUris:a,onChange:l,ListLabelProps:s={},disabled:d,enableEmptyValueUnderline:p,single:h,label:f,dataReltioId:g,selectionPopupTitle:m}=e;const y=Kk(),[v,b]=(0,n.useState)(!1),x=(0,n.useCallback)((()=>b(!0)),[]),w=(0,n.useCallback)((()=>b(!1)),[]),[S,E]=(0,n.useState)(""),O=(0,n.useCallback)((()=>E("")),[]),C=(0,n.useCallback)((0,u.pipe)(O,w),[w,O]),_=i.filter((e=>{let{label:t}=e;return Fo.utils.strings.search(t,S)})).map(((e,t)=>({item:{item:Zk({},e,{filterText:S})},index:t}))),k=(0,n.useMemo)((()=>a.map((e=>i.find((0,u.propEq)("uri",e)))).map((0,u.prop)("label"))),[a,i]),T=(0,n.useCallback)(((e,t)=>{h?(l(t?[e.uri]:[]),C()):l(t?a.concat(e.uri):a.filter((t=>t!==e.uri)))}),[a,l,h,C]),P=(0,n.useCallback)((e=>{let{item:t}=e;const n=!a.includes(t.uri);T(t,n)}),[a,T]),{focusIndex:M,handleKeyDown:R}=lO({items:_,open:v,onSelectFocusedItem:P,selectedItems:a,onClose:C}),I=(0,n.useRef)(),D=I.current?I.current.getBoundingClientRect().width:0,A=Math.max(D,255),L=0===a.length;return r().createElement(r().Fragment,null,r().createElement(kn(),{label:f,ref:I,InputProps:{startAdornment:L&&!t?null:r().createElement("div",{className:c()(y.inputText,o.inputText)},L?r().createElement("div",null,t):r().createElement(Vk,$k({},s,{list:k}))),classes:{root:y.inputRoot,input:c()(y.input,o.input,{[y.emptyInput]:L&&!t}),disabled:c()(y.disabledInput,{[y.disabledPointer]:d}),underline:y.disabledUnderline},endAdornment:r().createElement(Ti,{size:"L",icon:_y.Z,iconClassName:c()(y.icon,{[y["popup-opened-icon"]]:v}),disabled:d}),readOnly:!0,disabled:!0,disableUnderline:L&&!p},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:c()(y.inputLabel,o.label)}},value:"",onClick:d?void 0:x,classes:{root:c()(y.root,o.root)},margin:"dense",variant:"filled",disabled:d,"data-reltio-id":g}),r().createElement(nO,{open:v,anchorEl:I.current,onClose:C,onSearch:E,title:m,containerWidth:A,containerHeight:355,searchInputOnKeyDown:R,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${g}-popup`}},r().createElement(Yk,{items:_,onItemClick:T,selectedItems:a,width:A,height:245,focusIndex:M})))}));Qk.displayName="MetadataTypesSelector";const Jk=(0,n.memo)((e=>{let{entityTypes:t,selectedEntityTypes:o,single:i,placeholder:a,enableEmptyValueUnderline:l,onChange:s,classes:c={},ListLabelProps:u={},disabled:d=!1}=e;const h=(0,n.useMemo)((()=>t.filter(Fo.isAvailableEntityType)),[t]);return r().createElement(Qk,{items:h,selectedItemsUris:o,single:i,placeholder:a,enableEmptyValueUnderline:l,onChange:s,classes:c,ListLabelProps:u,disabled:d,label:p().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:p().text("Select entity types")})}));Jk.displayName="EntityTypesSelector";const eT=(0,n.memo)((e=>{let{relationTypes:t,selectedRelationTypes:o,single:i,placeholder:a,enableEmptyValueUnderline:l,onChange:s,classes:c={},ListLabelProps:u={},disabled:d=!1}=e;const h=(0,n.useMemo)((()=>t.filter(Fo.isAvailableRelationType)),[t]);return r().createElement(Qk,{items:h,selectedItemsUris:o,single:i,placeholder:a,enableEmptyValueUnderline:l,onChange:s,classes:c,ListLabelProps:u,disabled:d,label:p().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:p().text("Select relation types")})}));eT.displayName="RelationTypesSelector";const tT=(0,i.makeStyles)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),nT=Md(Rd,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:o,filters:i,onFilter:a,entityTypesOptions:l,relationTypesOptions:s}=e;const c=tT(),[u,d]=(0,n.useState)([]),[h,f]=(0,n.useState)([]),g=()=>{d(i.entityTypesUris),f(i.relationTypesUris),o()};return(0,n.useEffect)((()=>{d(i.entityTypesUris),f(i.relationTypesUris)}),[i.entityTypesUris,i.relationTypesUris]),r().createElement(En(),{classes:{paper:c.dialogPaper},onClose:g,open:t},r().createElement(R(),{className:c.title},p().text("Filter")),r().createElement(Jk,{classes:{root:c.entityTypesSelector},entityTypes:l,selectedEntityTypes:u,enableEmptyValueUnderline:!0,onChange:d}),r().createElement(eT,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:h,enableEmptyValueUnderline:!0,onChange:f}),r().createElement("div",{className:c.footer},r().createElement(D(),{className:c.clearAllButton,onClick:()=>{d([]),f([])}},p().text("Clear All")),r().createElement(D(),{className:c.cancelButton,onClick:g},p().text("Cancel")),r().createElement(D(),{onClick:()=>{a({entityTypesUris:u,relationTypesUris:h}),o()},color:"primary"},p().text("Apply"))))})),rT=(0,i.makeStyles)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),oT=Md(Rd,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["filters"])),(e=>{let{filters:t}=e;const o=rT(),[i,a]=(0,n.useState)(!1),{entityTypesUris:l,relationTypesUris:s}=t,c=l.length||s.length;return r().createElement("div",{className:o.wrapper},r().createElement(Fk,null),r().createElement(j(),{"data-reltio-id":"reltio-filter-relationship-button",className:o.iconButton,onClick:()=>a(!0)},r().createElement(jk.Z,{className:c?o.activeFiltersIcon:o.inactiveFiltersIcon})),r().createElement(nT,{open:i,onClose:()=>a(!1)}))})),iT=(0,i.makeStyles)((e=>({button:{padding:"9px 16px 9px 12px","& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},label:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));function aT(){return aT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aT.apply(this,arguments)}let lT;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(lT||(lT={}));const sT=(0,n.forwardRef)(((e,t)=>{let{className:n,mode:o=lT.iconButton,label:i,disabled:a,icon:l,onClick:s=El,onMenuClose:u=El}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const p=iT();return(()=>{switch(o){case"iconButton":return r().createElement(Pi,aT({disabled:a,className:c()(p.iconButton,n),size:"S",tooltipTitle:i,onClick:s,icon:l,showForDisabled:!0},d));case"button":return r().createElement(D(),aT({className:c()(p.button,n),disabled:a,startIcon:r().createElement(l,null),onClick:s,color:"primary",classes:{startIcon:p.startIcon,label:p.label}},d),r().createElement(al,{value:i},r().createElement("div",{className:p.overflowStyle},i)));case"menuItem":{const e=()=>{u(),s()};return r().createElement(ms(),aT({classes:{root:p.menuItem},onClick:e,disabled:a,ref:t},d),r().createElement(r().Fragment,null,r().createElement(l,{className:p.menuIcon}),r().createElement(R(),{classes:{root:p.menuText}},i)))}}})()}));sT.displayName="ActionButton";const cT=e=>{const t=(0,o.useSelector)(b().selectors.getMetadata),{inRelations:r=[],outRelations:i=[]}=(0,n.useMemo)((()=>(0,Fo.getInOutRelationTypesForEntityTypeUri)(t,e,(0,Fo.checkMetadataForCreate)(Fo.Mode.Editing))),[t,e]);return{inRelationTypes:r,outRelationTypes:i}},uT=(0,i.makeStyles)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"12px 16px"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px",fontWeight:"bold"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}}))),dT=Md(Rd,(e=>{let{selectedEntity:t,onAddRelation:n}=e;return{selectedEntity:t,onAddRelation:n}}),(e=>{let{selectedEntity:t,open:i,onClose:a,onAddRelation:l}=e;const s=uT(),c=(0,o.useSelector)(b().selectors.getMetadata),[u,d]=(0,n.useState)({}),{relation:h,entity:f}=u,{type:g,direction:m}=h||{},[y,x]=(0,n.useState)(!1),w=(0,o.useDispatch)();(0,n.useEffect)((()=>{i&&d({relation:{uri:(0,Fo.generateNewRelationUri)(),type:null,attributes:{}}})}),[i]);const{inRelationTypes:S,outRelationTypes:E}=cT(null==t?void 0:t.type),O=(0,n.useCallback)((()=>{const e=(0,Fo.validateConnectionRelation)(c,{relation:{object:h}});return w(v.profile.errors.actions.errorsSet(e)),0===e.length}),[h,c,w]),{onAddAttributes:C,onChangeAttribute:_,onRemoveAttribute:k,onChangeEntity:T,onChangeRelationType:P}=gp({connection:u,onConnectionChange:d,relatedEntity:t});return r().createElement(En(),{open:i,fullWidth:!0,maxWidth:"sm",onClose:a,classes:{paper:s.dialogPaper}},r().createElement(_k(),{disableTypography:!0,classes:{root:s.dialogTitle}},r().createElement(R(),{variant:"subtitle1",classes:{root:s.titleText}},p().text("Add relationship"))),r().createElement(wn(),{classes:{root:s.content}},r().createElement(xk,{connection:u,onAddAttributes:C,onChangeAttribute:_,onRemoveAttribute:k,relatedEntity:t,inRelationTypes:S,outRelationTypes:E,onChangeRelationType:P,onChangeEntity:T})),r().createElement(bn(),null,r().createElement(D(),{onClick:a},p().text("Cancel")),r().createElement(D(),{disabled:!(null!=u&&u.entity)||!g||y,color:"primary",onClick:()=>{const{type:e,attributes:n={},startDate:r,endDate:o}=h,i=m===Fo.Directions.OUT?t.uri:f.uri,s=m===Fo.Directions.OUT?f.uri:t.uri;O()&&(x(!0),l({startEntityUri:i,endEntityUri:s,relationType:e,attributes:n,startDate:r,endDate:o}).then((()=>{a()})).catch((e=>{console.error(e)})).finally((()=>{x(!1)})))}},p().text("Add"))))})),pT=Md(Rd,(0,u.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;const{inRelationTypes:o,outRelationTypes:i}=cT(null==t?void 0:t.type),a=o.length+i.length>0,[l,s]=(0,n.useState)(!1);return a&&r().createElement(r().Fragment,null,r().createElement(sT,{"data-reltio-id":"reltio-add-relationship-button",mode:lT.button,label:p().text("Add relationship"),icon:Gp.Z,onClick:()=>{s(!0)}}),r().createElement(dT,{open:l,onClose:()=>{s(!1)}}))})),hT=(0,i.makeStyles)({caption:{marginLeft:"16px",marginTop:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),fT=()=>{const e=hT();return r().createElement("div",{className:e.wrapper},r().createElement("div",{className:e.caption},r().createElement(R(),{variant:"subtitle1"},p().text("Relationships")),r().createElement(pT,null)),r().createElement(oT,null),r().createElement(Nk,null))};function gT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mT(e,t,n[t])}))}return e}function mT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yT=(0,i.makeStyles)((e=>({"basic-view__paper":gT({display:"flex",flexDirection:"column"},e.basicView)})));function vT(){return vT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vT.apply(this,arguments)}const bT=(0,n.forwardRef)(((e,t)=>{let{children:n,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const a=yT();return r().createElement(Nn(),vT({ref:t,className:o,classes:{root:a["basic-view__paper"]}},i),n)}));bT.displayName="BasicView",bT.propTypes={children:l().node,className:l().string};const xT=bT,wT=(0,i.makeStyles)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function ST(){return ST=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ST.apply(this,arguments)}const ET=e=>{let{title:t="",children:n=null,classes:o={}}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","children","classes"]);const a=wT();return r().createElement(L(),ST({className:o.root,classes:{root:a.toolbar}},i),r().createElement(R(),{className:o.title,classes:{root:a.title},variant:"h6"},p().text(t)),n)},OT=(0,i.makeStyles)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),CT=e=>{let{className:t,title:n,children:o}=e;const i=OT();return r().createElement(ET,{title:n,classes:{root:c()(i.container,t),title:i.title}},o)},_T=(0,i.makeStyles)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),kT=(0,o.connect)((e=>({metadata:b().selectors.getMetadata(e)})))((e=>{let{className:t,entity:i={},metadata:a,caption:l="",excludeUris:s=[],includeUris:u=[],attributesCount:d=16}=e;const h=_T(),f=(0,o.useSelector)(b().selectors.getPivotingAttributes),g=(0,n.useMemo)((()=>XO(a,i.type,u,s)),[s,u,a,i.type]),m=(0,Fo.getAttributesListForReadMode)(g,i).filter((e=>{let{values:t}=e;return!(0,Fo.isEmptyValue)(t)})).length>0;return m||!(0,Fo.isEmptyValue)(l)?r().createElement(MO.Provider,{value:f},r().createElement(xT,{className:t},l&&r().createElement(CT,{className:h.header,title:l}),r().createElement(ss(),{className:c()(h.attributesContainer,{[h.noCaption]:!l})},m?r().createElement(JO,{entity:i,attrTypes:g,parentUri:i.uri,drawLines:!1,max:d}):r().createElement(R(),{className:h.noData},p().text("No data found"))))):null})),TT=(0,i.makeStyles)({attributesContainer:{overflow:"hidden",padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function PT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){MT(e,t,n[t])}))}return e}function MT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const RT=(0,o.connect)((e=>({metadata:b().selectors.getMetadata(e)})))((e=>{let{className:t,entity:i={},mode:a,metadata:l,caption:s="",excludeUris:d=[],includeUris:p=[],pinnedAttributes:h}=e;const f=TT(),g=(0,o.useDispatch)(),m=(0,n.useContext)(kl),y=(0,o.useSelector)(b().selectors.getUserRoles),x=(0,n.useMemo)((()=>(0,Fo.getPinnedAttributesForUser)(h,y)),[h,y]),w=(0,o.useSelector)((e=>b().selectors.getModifiedEntity(e,i.uri)||{})),S=(0,n.useMemo)((()=>XO(l,w.type,p,d)),[d,p,l,w.type]),E=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.addAttributes,g)(e.map((e=>PT({},e,{viewId:m}))))),[m,g]),O=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.modifyAttribute,g)(PT({},e,{viewId:m}))),[m,g]),C=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.removeAttribute,g)(PT({},e,{viewId:m}))),[m,g]);return r().createElement(xT,{className:t},s&&r().createElement(CT,{className:f.header,title:s}),r().createElement(ss(),{className:c()(f.attributesContainer,{[f.noCaption]:!s})},r().createElement(Ow.Provider,{value:x},r().createElement(ak,{entity:w,attrTypes:S,parentUri:w.uri,drawLines:!1,mode:a,showEmptyEditors:(0,Fo.isTempUri)(w.uri),crosswalks:w.crosswalks,onAddAttributes:E,onChangeAttribute:O,onDeleteAttribute:C}))))}));function IT(){return IT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IT.apply(this,arguments)}const DT=(0,o.connect)(((e,t)=>({entity:t.entity||b().selectors.getEntityWithDiff(e),mode:t.mode||b().selectors.getMode(e)})))((e=>{let{mode:t=Fo.Mode.Viewing,attributesCount:n,pinnedAttributes:o,entity:i}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["mode","attributesCount","pinnedAttributes","entity"]);return r().createElement(Np.Provider,{value:i},(0,Fo.isViewMode)(t)?r().createElement(kT,IT({attributesCount:n,entity:i},a)):r().createElement(RT,IT({mode:t,pinnedAttributes:o,entity:i},a)))})),AT=(0,i.makeStyles)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),LT=Md(Rd,(0,u.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const o=AT();return r().createElement("div",{className:o.wrapper},n&&r().createElement(Ho,null),r().createElement(DT,{entity:t,caption:p().text("Entity details"),className:o.noShadowBlock}))})),NT=(0,i.makeStyles)((e=>({contentWrapper:{display:"flex",boxSizing:"border-box",flex:1,flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),jT=e=>{let{width:t,open:n,children:o}=e;const i=NT();return r().createElement("div",{className:i.contentWrapper,"data-reltio-id":"side-panel",style:{width:t?`${n?t:0}px`:"100%"}},n&&r().createElement(r().Fragment,null,o))},zT=(0,i.makeStyles)((e=>({link:{textDecoration:"none",color:e.palette.primary.main}}))),FT=Md(Rd,(0,u.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;const n=zT(),i=(0,o.useSelector)(b().selectors.getEntityUri),a=null==t?void 0:t.uri;return r().createElement(dl,{entity:t,renderLabel:e=>i===a?e:r().createElement(ks,{className:n.link,value:(0,Fo.getEntityUriForLink)(t),screen:"graph"},e)})}));let BT;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(BT||(BT={}));const WT=(0,n.memo)((e=>{var t;let{active:n,tabs:o}=e;const i=!(0,u.isNil)(n);return r().createElement(jT,{open:i},r().createElement(FT,null),null===(t=o[n])||void 0===t?void 0:t.content)}));function UT(){return UT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UT.apply(this,arguments)}WT.displayName="GraphRightSidePanel";const HT=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return r().createElement("svg",UT({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var VT=h(6635),GT=h(9358);const qT=(0,n.createContext)(null),YT=qT.Provider;function KT(){const e=(0,n.useContext)(qT);if(null==e)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return e}function $T(){return KT().sigma}function ZT(){const{sigma:e,container:t}=KT(),[r,o]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!e||!r)return;const n={};return Object.keys(r).forEach((t=>{n[t]=r[t],e.setSetting(t,r[t])})),()=>{e&&t&&t.offsetWidth>0&&t.offsetHeight>0&&Object.keys(n).forEach((t=>{e.setSetting(t,n[t])}))}}),[e,r,t]),o}const XT=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRender","kill"],QT=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],JT=["touchup","touchdown","touchmove"],eP=["updated"];function tP(){const e=$T(),t=ZT(),[r,o]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!e||!r)return;const n=r,o=Object.keys(n),i={},a={},l=e.getSettings();return o.some((e=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(e)))&&!1===l.enableEdgeClickEvents&&(i.enableEdgeClickEvents=!0,a.enableEdgeClickEvents=!1),o.some((e=>["enterEdge","leaveEdge"].includes(e)))&&!1===l.enableEdgeHoverEvents&&(i.enableEdgeHoverEvents=!0,a.enableEdgeHoverEvents=!1),o.some((e=>["wheelEdge"].includes(e)))&&!1===l.enableEdgeWheelEvents&&(i.enableEdgeWheelEvents=!0,a.enableEdgeWheelEvents=!1),Object.keys(i).length>0&&t(i),o.forEach((t=>{const r=n[t];XT.find((e=>e===t))&&e.on(t,r),QT.find((e=>e===t))&&e.getMouseCaptor().on(t,r),JT.find((e=>e===t))&&e.getTouchCaptor().on(t,r),eP.find((e=>e===t))&&e.getCamera().on(t,r)})),()=>{Object.keys(a).length>0&&t(a),e&&o.forEach((t=>{const r=n[t];XT.find((e=>e===t))&&e.off(t,r),QT.find((e=>e===t))&&e.getMouseCaptor().off(t,r),JT.find((e=>e===t))&&e.getTouchCaptor().off(t,r),eP.find((e=>e===t))&&e.getCamera().off(t,r)}))}}),[e,r,t]),o}function nP(e){const t=$T(),r=(0,n.useRef)();(0,VT.isEqual)(r.current,e)||(r.current=e);const o=(0,n.useCallback)((e=>{t.getCamera().animatedZoom(Object.assign(Object.assign({},r.current),e))}),[t,r]),i=(0,n.useCallback)((e=>{t.getCamera().animatedUnzoom(Object.assign(Object.assign({},r.current),e))}),[t,r]),a=(0,n.useCallback)((e=>{t.getCamera().animatedReset(Object.assign(Object.assign({},r.current),e))}),[t,r]),l=(0,n.useCallback)(((e,n)=>{t.getCamera().animate(e,Object.assign(Object.assign({},r.current),n))}),[t,r]),s=(0,n.useCallback)(((e,n)=>{const o=t.getNodeDisplayData(e);o?t.getCamera().animate(o,Object.assign(Object.assign({},r.current),n)):console.log(`Node ${e} not found`)}),[t,r]);return{zoomIn:o,zoomOut:i,reset:a,goto:l,gotoNode:s}}const rP=(0,n.forwardRef)((({graph:e,id:t,className:o,style:i,settings:a,children:l},s)=>{const c=(0,n.useRef)(null),u=(0,n.useRef)(null),d={className:`react-sigma ${o||""}`,id:t,style:i},[p,h]=(0,n.useState)(null),f=(0,n.useRef)({});(0,VT.isEqual)(f.current,a)||(f.current=a||{}),(0,n.useEffect)((()=>{let t=null;if(null!==u.current){const n=e?"function"==typeof e?new e:e:new(rd());t=new GT.Sigma(n,u.current,Object.assign({allowInvalidContainer:!0},f.current)),p&&t.getCamera().setState(p.getCamera().getState())}return h(t),()=>{t&&t.kill(),h(null)}}),[u,e,f]),(0,n.useImperativeHandle)(s,(()=>p),[p]);const g=(0,n.useMemo)((()=>p&&c.current?{sigma:p,container:c.current}:null),[p,c.current]),m=null!==g?r().createElement(YT,{value:g},l):null;return r().createElement("div",Object.assign({},d,{ref:c}),r().createElement("div",{className:"sigma-container",ref:u}),m)}));var oP=h(3304),iP=h(4488),aP=h(5372),lP=h.n(aP),sP=h(8586);const cP=e=>e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),uP=e=>{const t=document.createElement("canvas");return t.style.position="absolute",t.setAttribute("class",`sigma-${e}`),t},dP=(0,n.createContext)({addRenderers:El,canvases:{}}),pP=()=>(0,n.useContext)(dP);dP.displayName="SigmaCustomRenderersContext";const hP=e=>{let{children:t}=e;const o=(()=>{const{container:e,sigma:t}=KT(),[r,o]=(0,n.useState)({}),i=(0,n.useRef)({}),a=(0,n.useRef)(0),l=(0,n.useRef)(0),s=(0,n.useCallback)((e=>{o((0,u.mergeLeft)(e))}),[]),c=(0,n.useCallback)((()=>{a.current=e.offsetWidth,l.current=e.offsetHeight;const t=(0,sP.getPixelRatio)();for(const e in i.current){const{canvasElement:n,context:r}=i.current[e];n.style.width=a.current+"px",n.style.height=l.current+"px",n.setAttribute("width",a.current*t+"px"),n.setAttribute("height",l.current*t+"px"),1!==t&&r.scale(t,t)}}),[e.offsetHeight,e.offsetWidth]),d=(0,n.useCallback)((()=>{for(const e in r){const{context:t}=i.current[e];t.clearRect(0,0,a.current,l.current);const{renderer:n}=r[e];n(t)}}),[r]),p=(0,n.useCallback)((()=>{for(const t in r){if(!(0,Fo.isEmptyValue)(i.current[t]))continue;const{insertBefore:n}=r[t],o=e.querySelector(".sigma-container"),a=uP(t),l=cP(a);o.insertBefore(a,o.querySelector(`.sigma-${n}`)),i.current[t]={canvasElement:a,context:l},c()}}),[r,e,c]);return(0,n.useEffect)((()=>(t.addListener("beforeRender",p),()=>{t.off("beforeRender",p)})),[t,p]),(0,n.useEffect)((()=>(t.addListener("afterRender",d),()=>{t.off("afterRender",d)})),[t,d]),(0,n.useEffect)((()=>(t.addListener("resize",c),()=>{t.off("resize",c)})),[t,c]),(0,n.useEffect)((()=>{const e=i.current;return()=>{for(const t in e)e[t].canvasElement.remove(),delete e[t]}}),[]),{addRenderers:s,canvases:i.current}})();return r().createElement(dP.Provider,{value:o},t)},fP=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=2,e.shadowBlur=3,e.shadowColor="rgba(0,0,0,0.2)","string"==typeof t.label){const o=n.labelSize+2,i=2,a=e.measureText(t.label).width,l=Math.round(a+16),s=Math.round(o+4),c=Math.max(t.size,o/2)+2,u=t.y-s/2,d=t.y+s/2,p=t.x+(r?0:c),h=p+l+(r?c:0);e.beginPath(),e.moveTo(p,d-i),e.quadraticCurveTo(p,d,p+i,d),e.lineTo(h-i,d),e.quadraticCurveTo(h,d,h,d-i),e.lineTo(h,u+i),e.quadraticCurveTo(h,u,h-i,u),e.lineTo(p+i,u),e.quadraticCurveTo(p,u,p,u+i),e.closePath(),e.fill(),r&&(e.shadowOffsetX=-2,e.shadowOffsetY=0,e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.closePath(),e.fill())}else r&&(e.beginPath(),e.arc(t.x,t.y,t.size+2,0,2*Math.PI),e.closePath(),e.fill())},gP=function(e,t,n){var r;let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t.label)return;const i=n.labelSize,a=n.labelFont,l=n.labelWeight;o&&fP(e,t,n,!1),e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,e.fillStyle=null!==(r=n.labelColor)&&void 0!==r&&r.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color,e.font=`${l} ${i}px ${a}`,e.fillText(t.label,t.x+t.size+11,t.y+i/3)},mP=(e,t,n)=>{fP(e,t,n,!0),gP(e,t,n,!1)};class yP extends oP.AbstractNodeProgram{constructor(e){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_borderSize;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\nvarying float v_borderRadius;\n\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n \n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n v_borderRadius = radius - (radius * a_borderSize / a_size); // border radius in node's size (full size is 1)\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}","\nprecision mediump float;\n\nvarying vec4 v_color; // base color of node\nvarying float v_border;\nvarying float v_borderRadius; // inner border radius\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); // transparent color\nconst float radius = 0.5;\n\nvoid main(void) {\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5)); // distance from current point to center of node\n\n if (distToCenter < v_borderRadius - v_border) // distance to inner border radius\n gl_FragColor = transparent;\n else if (distToCenter < v_borderRadius)\n gl_FragColor = mix(v_color, transparent, (v_borderRadius - distToCenter) / v_border);\n else if (distToCenter < radius - v_border) // distance to outer border radius\n gl_FragColor = v_color;\n else if (distToCenter < radius)\n gl_FragColor = mix(transparent, v_color, (radius - distToCenter) / v_border);\n else // points outside the button\n gl_FragColor = transparent;\n}\n",1,5),this.borderSize=void 0,this.borderSize=e.getAttribLocation(this.program,"a_borderSize"),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.borderSize),e.vertexAttribPointer(this.borderSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16)}process(e,t,n){const r=this.array;let o=1*n*5;if(t||!e.inPath)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,sP.floatColor)(e.color),r[o]=e.highlighted?4:2}render(e){const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.drawArrays(t.POINTS,0,this.array.length/5)}}class vP{constructor(){this.rebindTextureFns=[],this.images={},this.textureImage=void 0,this.hasReceivedImages=!1,this.pendingImagesFrameID=void 0,this.loadImage=(e,t)=>{if(this.images[e])return;const n=new Image;var r;n.addEventListener("load",(()=>{this.images[e]={status:"pending",image:n},"number"!=typeof this.pendingImagesFrameID&&(this.pendingImagesFrameID=requestAnimationFrame((()=>this.finalizePendingImages())))})),n.addEventListener("error",(()=>{this.images[e]={status:"error"}})),this.images[e]={status:"loading"},r=n,new URL(t,window.location.href).origin!==window.location.origin&&(r.crossOrigin=""),n.src=t.startsWith("data:image")?t:t+"?not-from-cache"},this.finalizePendingImages=()=>{this.pendingImagesFrameID=void 0;const e=[];for(const t in this.images){const n=this.images[t];"pending"===n.status&&e.push({id:t,image:n.image,size:Math.min(n.image.width,n.image.height)||1})}const t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.reduce(((e,t)=>{let{size:n}=t;return e+n}),this.hasReceivedImages?this.textureImage.width:0),t.height=Math.max(this.hasReceivedImages?this.textureImage.height:0,...e.map((e=>{let{size:t}=e;return t})));let r=0;this.hasReceivedImages&&(n.putImageData(this.textureImage,0,0),r=this.textureImage.width),e.forEach((e=>{let{id:t,image:o,size:i}=e;const a=Math.min(128,i);let l=0,s=0;(o.width||0)>(o.height||0)?l=(o.width-o.height)/2:s=(o.height-o.width)/2,n.drawImage(o,l,s,i,i,r,0,a,a),this.images[t]={status:"ready",x:r,y:0,width:a,height:a},r+=a})),this.textureImage=n.getImageData(0,0,t.width,t.height),this.hasReceivedImages=!0,this.rebindTextureFns.forEach((e=>e()))}}}const bP={id:"defaultImage",path:(0,Fo.svg2Url)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};class xP extends oP.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute vec4 a_texture;\nattribute float a_inactive;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n\n // Pass inactive property\n v_inactive = a_inactive;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst float radius = 0.5;\n\n// convert color to gray\nvec4 toGrayscale(in vec4 color)\n{\n float average = (color.r + color.g + color.b) / 3.0;\n return vec4(average, average, average, 1.0);\n}\n\nvoid main(void) {\n vec4 color;\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));\n } else {\n color = v_color;\n }\n\n // convert color to gray\n if (v_inactive > 0.0) {\n color = toGrayscale(color);\n }\n\n // distance from point to center of node\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n\n if (dist < radius - v_border) // points inside node\n gl_FragColor = color;\n else if (dist < radius) // border of node\n gl_FragColor = mix(transparent, color, (radius - dist) / v_border);\n else // points outside node\n gl_FragColor = transparent;\n}",1,9),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.inactive=void 0,this.imageLoader=new vP,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.inactive=e.getAttribLocation(this.program,"a_inactive");const n=e.getUniformLocation(this.program,"u_atlas");if(null===n)throw new Error("NodeProgramImage: error while getting atlasLocation");this.atlasLocation=n,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),this.imageLoader.loadImage(bP.id,bP.path),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.textureLocation),e.enableVertexAttribArray(this.inactive),e.vertexAttribPointer(this.inactive,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20)}process(e,t,n){const r=this.array;let o=1*n*9;const i=e.image;let a=i&&this.imageLoader.images[i];if("string"!=typeof i||a||this.imageLoader.loadImage(i,i),t)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,sP.floatColor)(e.color),r[o++]=e.inactive?1:0,a&&"ready"===a.status||(a=this.imageLoader.images[bP.id]),a&&"ready"===a.status){const{width:e,height:t}=this.imageLoader.textureImage;r[o++]=a.x/e,r[o++]=a.y/t,r[o++]=a.width/e,r[o++]=a.height/t}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1i(this.atlasLocation,0),t.drawArrays(t.POINTS,0,this.array.length/9)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}const wP=[{id:"expandIcon",path:(0,Fo.svg2Url)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.80013 7.20003V4H7.20013L7.20013 7.20003H4V8.80003H7.20013L7.20013 12H8.80013V8.80003H12V7.20003H8.80013Z" fill="black" fill-opacity="0.541176"/>\n</svg>')},{id:"collapseIcon",path:(0,Fo.svg2Url)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path d="M4 7.20004H12V8.80004H4V7.20004Z" fill="black" fill-opacity="0.541176"/>\n</svg>\n')}];class SP extends oP.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_buttonSize;\nattribute vec2 a_normals;\nattribute vec4 a_texture;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying float v_border;\nvarying vec4 v_texture;\nvarying vec4 v_color;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normals);\n vec2 unitNormal = (a_normals) / normalLength;\n\n float pixelsThickness = max(normalLength, 1.0 * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Move the point\n float adaptedWebGLNodeRadius = a_size * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n vec2 compensationVector = vec2(-unitNormal.y, unitNormal.x) * (adaptedWebGLNodeRadius);\n\n // Set position\n gl_Position = vec4((u_matrix * vec3(a_position + compensationVector, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_buttonSize * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 black = vec4(0.0, 0.0, 0.0, 1.0);\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main(void) {\n vec4 color;\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5));\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(black, texel, texel.a).rgb, max(texel.a, bias));\n } else {\n color = black;\n }\n\n if (distToCenter < radius - v_border) // points inside button\n gl_FragColor = color;\n else if (distToCenter < radius) // border of button\n gl_FragColor = mix(transparent, color, (0.5 - distToCenter) / v_border);\n else // points outside button\n gl_FragColor = transparent;\n}",2,11),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.buttonSize=void 0,this.normals=void 0,this.correctionRatioLocation=void 0,this.sqrtZoomRatioLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.imageLoader=new vP,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.buttonSize=e.getAttribLocation(this.program,"a_buttonSize"),this.normals=e.getAttribLocation(this.program,"a_normals");const n=e.getUniformLocation(this.program,"u_correctionRatio");if(null===n)throw new Error("NodeButtonsProgram: error while getting correctionRatioLocation");this.correctionRatioLocation=n;const r=e.getUniformLocation(this.program,"u_sqrtZoomRatio");if(null===r)throw new Error("NodeButtonsProgram: error while getting sqrtZoomRatioLocation");this.sqrtZoomRatioLocation=r;const o=e.getUniformLocation(this.program,"u_atlas");if(null===o)throw new Error("NodeButtonsProgram: error while getting atlasLocation");this.atlasLocation=o,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),wP.map((e=>this.imageLoader.loadImage(e.id,e.path))),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.buttonSize),e.enableVertexAttribArray(this.normals),e.enableVertexAttribArray(this.textureLocation),e.vertexAttribPointer(this.buttonSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.normals,2,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,28)}process(e,t,n){const r=this.array;let o=2*n*11;const i=t||e.inactive&&!e.highlighted,[a,l]=e.buttonOffset||[0,0];let s=a*a+l*l,c=0,u=0;if(s&&(s=1/Math.sqrt(s),c=l*s,u=a*s),i||!e.showExpand)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.expandIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,sP.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=c,r[o++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}if(i||!e.showCollapse)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.collapseIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,sP.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=-c,r[o++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.uniform1i(this.atlasLocation,1),t.drawArrays(t.POINTS,0,this.array.length/11)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}var EP=h(3193),OP=h.n(EP);class CP extends(OP()){process(e,t,n,r,o){if(r){for(let e=27*o,t=e+27;e<t;e++)this.array[e]=0;return}const i=n.arrowSizeRatio||1,a=n.size*i||1,l=t.size||1,s=e.x,c=e.y,u=t.x,d=t.y,p=(0,sP.floatColor)(n.color),h=u-s,f=d-c;let g=h*h+f*f,m=0,y=0;g&&(g=1/Math.sqrt(g),m=-f*g*a,y=h*g*a);let v=27*o;const b=this.array;b[v++]=u,b[v++]=d,b[v++]=-m,b[v++]=-y,b[v++]=l,b[v++]=p,b[v++]=1,b[v++]=0,b[v++]=0,b[v++]=u,b[v++]=d,b[v++]=-m,b[v++]=-y,b[v++]=l,b[v++]=p,b[v++]=0,b[v++]=1,b[v++]=0,b[v++]=u,b[v++]=d,b[v++]=-m,b[v++]=-y,b[v++]=l,b[v++]=p,b[v++]=0,b[v++]=0,b[v]=1}}class _P extends CP{process(e,t,n,r,o){super.process(t,e,n,r,o)}}var kP=h(3343),TP=h.n(kP);class PP extends iP.AbstractEdgeProgram{constructor(e){super(e,"\nattribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\nattribute float a_arrowSizeRatio;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // our change - apply a_arrowSizeRatio depending on current zoom and minThickness\n float arrowSizeCoefficient = min(a_arrowSizeRatio, a_arrowSizeRatio / (u_sqrtZoomRatio * minThickness));\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio * arrowSizeCoefficient;\n\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}",TP(),4,7),this.IndicesArray=void 0,this.indicesArray=void 0,this.indicesBuffer=void 0,this.indicesType=void 0,this.positionLocation=void 0,this.colorLocation=void 0,this.normalLocation=void 0,this.radiusLocation=void 0,this.arrowSizeRatioLocation=void 0,this.matrixLocation=void 0,this.sqrtZoomRatioLocation=void 0,this.correctionRatioLocation=void 0,this.canUse32BitsIndices=void 0;const t=e.createBuffer();if(null===t)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");this.indicesBuffer=t,this.positionLocation=e.getAttribLocation(this.program,"a_position"),this.colorLocation=e.getAttribLocation(this.program,"a_color"),this.normalLocation=e.getAttribLocation(this.program,"a_normal"),this.radiusLocation=e.getAttribLocation(this.program,"a_radius"),this.arrowSizeRatioLocation=e.getAttribLocation(this.program,"a_arrowSizeRatio");const n=e.getUniformLocation(this.program,"u_matrix");if(null===n)throw new Error("EdgeClampedProgram: error while getting matrixLocation");this.matrixLocation=n;const r=e.getUniformLocation(this.program,"u_sqrtZoomRatio");if(null===r)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");this.sqrtZoomRatioLocation=r;const o=e.getUniformLocation(this.program,"u_correctionRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");this.correctionRatioLocation=o,this.canUse32BitsIndices=(0,sP.canUse32BitsIndices)(e),this.IndicesArray=this.canUse32BitsIndices?Uint32Array:Uint16Array,this.indicesArray=new this.IndicesArray,this.indicesType=this.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,this.bind()}bind(){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.normalLocation),e.enableVertexAttribArray(this.colorLocation),e.enableVertexAttribArray(this.radiusLocation),e.enableVertexAttribArray(this.arrowSizeRatioLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.normalLocation,2,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,7*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.radiusLocation,1,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.arrowSizeRatioLocation,1,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,24)}process(e,t,n,r,o){if(r){for(let e=28*o,t=e+28;e<t;e++)this.array[e]=0;return}const i=n.arrowSizeRatio||1,a=n.size||1,l=e.x,s=e.y,c=t.x,u=t.y,d="doubleArrow"===n.type?e.size||1:0,p=t.size||1,h=(0,sP.floatColor)(n.color),f=c-l,g=u-s;let m=f*f+g*g,y=0,v=0;m&&(m=1/Math.sqrt(m),y=-g*m*a,v=f*m*a);let b=28*o;const x=this.array;x[b++]=l,x[b++]=s,x[b++]=y,x[b++]=v,x[b++]=h,x[b++]=-d,x[b++]=i,x[b++]=l,x[b++]=s,x[b++]=-y,x[b++]=-v,x[b++]=h,x[b++]=d,x[b++]=i,x[b++]=c,x[b++]=u,x[b++]=y,x[b++]=v,x[b++]=h,x[b++]=p,x[b++]=i,x[b++]=c,x[b++]=u,x[b++]=-y,x[b++]=-v,x[b++]=h,x[b++]=-p,x[b]=i}computeIndices(){const e=this.array.length/7,t=e+e/2,n=new this.IndicesArray(t);for(let t=0,r=0;t<e;t+=4)n[r++]=t,n[r++]=t+1,n[r++]=t+2,n[r++]=t+2,n[r++]=t+1,n[r++]=t+3;this.indicesArray=n}bufferData(){super.bufferData();const e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)}render(e){if(this.hasNothingToRender())return;const t=this.gl,n=this.program;t.useProgram(n),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.drawElements(t.TRIANGLES,this.indicesArray.length,this.indicesType,0)}}const MP=e=>{let{children:t}=e;const o=(0,n.useMemo)((()=>({allowInvalidContainer:!0,defaultNodeType:"image",hoverRenderer:mP,labelRenderer:gP,nodeProgramClasses:{image:(0,oP.createNodeCompoundProgram)([xP,yP,SP])},edgeProgramClasses:{line:lP(),arrow:(0,iP.createEdgeCompoundProgram)([PP,CP]),doubleArrow:(0,iP.createEdgeCompoundProgram)([PP,CP,_P])},labelFont:"Roboto",labelSize:13,labelColor:{color:"rgba(0, 0, 0, 0.87)"}})),[]);return r().createElement(rP,{graph:nd.MultiGraph,style:{background:"transparent"},settings:o},r().createElement(hP,null,t))};var RP=h(8833),IP=h.n(RP),DP=h(3660),AP=h.n(DP),LP=h(8301),NP=h.n(LP),jP=h(1181);const zP={[Fo.RelationTypeDirection.bidirectional]:"doubleArrow",[Fo.RelationTypeDirection.directed]:"arrow",[Fo.RelationTypeDirection.undirected]:"line"},FP=(e,t,n,r,o)=>e>n-o&&e<n+o&&t>r-o&&t<r+o&&Math.sqrt(Math.pow(e-n,2)+Math.pow(t-r,2))<o,BP=e=>{let{graph:t,undirectedGraph:n,selectedNode:r,rootNodeUri:o}=e;if(t&&n&&o&&r&&o!==r)try{const e=(0,ad.Ar)(n,o,r),i=function(e,t){const n=[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?"findOutEdge":"findEdge";return t&&t.forEach(((t,o,i)=>{const a=i[o+1];a&&n.push(e[r](t,a,(e=>!!e)))})),n}(t,e);return e?{edges:i,nodes:e}:{}}catch(e){}return{}},WP=.4,UP=(e,t,n,r,o,i,a)=>({aX:e+(r-e)*(n-a-i)/n,aY:t+(o-t)*(n-a-i)/n,vX:(r-e)*a/n,vY:(o-t)*a/n}),HP=(e,t,n,r,o)=>{e.beginPath(),e.moveTo(t+r,n+o),e.lineTo(t+o*WP,n-r*WP),e.lineTo(t-o*WP,n+r*WP),e.lineTo(t+r,n+o),e.closePath(),e.fill()};function VP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){GP(e,t,n[t])}))}return e}function GP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){YP(e,t,n[t])}))}return e}function YP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const KP=(0,u.memoizeWith)(((e,t,n)=>n.type),Fo.getEntityImage),$P={size:24,buttonSize:8,buttonOffset:[19,19]},ZP={size:12,buttonSize:6,buttonOffset:[8,13]},XP=e=>{let{data:t,graph:r,syncLayout:i,workerLayout:a,layoutSettings:l,selectedNode:s,isDirected:c=!1,onNodeClick:u,onNodeCollapse:d,onNodeExpand:p,filters:h}=e;const f=$T(),g=function(){const e=$T();return(0,n.useCallback)(((t,n=!0)=>{e&&t&&(n&&e.getGraph().order>0&&e.getGraph().clear(),e.getGraph().import(t),e.refresh())}),[e])}(),m=tP(),y=ZT(),{selfRelationsPathsMap:v,selfRelationLoopsCanvas:x}=(e=>{const t=$T(),{addRenderers:r,canvases:o}=pP(),i=(0,n.useRef)({}),{selfRelationLoops:a}=o;return(0,n.useEffect)((()=>{r({selfRelationLoops:{renderer:n=>{e.forEachEdge(((e,r,o)=>{if(r.loop){delete i.current[e];const r=t.getEdgeDisplayData(e),a=t.getNodeDisplayData(o);if(r.hidden||a.hidden)return;const l=((e,t,n)=>{const{size:r,color:o,arrowSizeRatio:i=1}=t,a=n.x,l=n.y,s=n.size,c=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(n+r),y1:t,x2:e,y2:t+7*(n+r)}}(a,l,.6*s);e.strokeStyle=o,e.lineWidth=r;const u=new Path2D;if("arrow"===t.type||"doubleArrow"===t.type){if(e.fillStyle=o,"doubleArrow"===t.type){const t=((e,t,n,r,o)=>{const i=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return UP(e.x2,e.y2,i,t,n,r,o)})(c,a,l,s,r*i*2.2);HP(e,t.aX,t.aY,t.vX,t.vY),u.moveTo(t.aX,t.aY)}else u.moveTo(a,l);const n=((e,t,n,r,o)=>{const i=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return UP(e.x1,e.y1,i,t,n,r,o)})(c,a,l,s,r*i*2.2);u.bezierCurveTo(c.x2,c.y2,c.x1,c.y1,n.aX,n.aY),e.stroke(u),HP(e,n.aX,n.aY,n.vX,n.vY)}else u.moveTo(a,l),u.bezierCurveTo(c.x1,c.y1,c.x2,c.y2,a,l),e.stroke(u);return u})(n,VP({},r,{size:t.scaleSize(r.size)}),VP({},a,t.framedGraphToViewport(a),{size:t.scaleSize(a.size)}));i.current[e]=l}}))},insertBefore:"edges"}})}),[r,e,t]),{selfRelationsPathsMap:i.current,selfRelationLoopsCanvas:a}})(r),w=((e,t,r)=>{const o=$T(),i=tP(),{addRenderers:a}=pP(),l=(0,n.useRef)({x:0,y:0}),[s,c]=(0,n.useState)(null),[u,d]=(0,n.useState)(null),p=s||u;return(0,n.useEffect)((()=>{i({enterEdge:e=>{let{edge:t}=e;c(t)},leaveEdge:()=>{c(null)},mousemove:e=>{if(l.current.x=e.x,l.current.y=e.y,!t)return;const{context:n,canvasElement:o}=t,{x:i,y:a}=((e,t)=>{const n=e.getBoundingClientRect();return{x:(t.clientX-n.left)/(n.right-n.left)*e.width,y:(t.clientY-n.top)/(n.bottom-n.top)*e.height}})(o,e.original);for(const e in r){const t=r[e];if(n.isPointInStroke(t,i,a)){d(e);break}d(null)}}})}),[o,i,t,r]),(0,n.useEffect)((()=>{a({tooltips:{renderer:t=>{e.forEachEdge(((e,n,r)=>{const i=o.getEdgeDisplayData(e),a=o.getNodeDisplayData(r);if(!i.hovered||a.highlighted)return;const{x:s,y:c}=l.current;((e,t,n,r)=>{e.font="normal 10px Roboto",e.textAlign="center",e.textBaseline="middle";const o=e.measureText(r).width+16,i=t-o/2,a=n-12;e.fillStyle="rgba(0, 0, 0, 0.54)",((e,t,n,r,o,i)=>{e.beginPath(),e.moveTo(t,n+4),e.arcTo(t,n+24,t+4,n+24,4),e.arcTo(t+r,n+24,t+r,n+24-4,4),e.arcTo(t+r,n,t+r-4,n,4),e.arcTo(t,n,t,n+4,4),e.fill()})(e,i,a,o),e.fillStyle="#fff",e.fillText(r,i+o/2,a+12)})(t,s,c-15,i.relationLabel)}))},insertBefore:"mouse"}})}),[a,e,o]),p})(r,x,v),S=(0,o.useSelector)(b().selectors.getEntity),E=(0,o.useSelector)(b().selectors.getMetadata),O=(0,o.useSelector)(b().selectors.getAbsoluteImagePath)||"",[C,_]=(0,n.useState)(void 0),[k,T]=(0,n.useState)(null),[P,M]=(0,n.useState)({}),R=null==S?void 0:S.uri;(0,n.useEffect)((()=>{f.getCamera().setState({ratio:1.2})}),[r,f]),(0,n.useEffect)((()=>{if(T((0,ld.toUndirected)(r)),g(r),i){const e=i(f.getGraph(),l);(0,jP.animateNodes)(f.getGraph(),e,{duration:1e3})}if(a){const e=new a(f.getGraph(),l);e.start();const t=setTimeout((()=>{e.stop()}),5e3);return()=>{clearTimeout(t),e.kill()}}}),[t,r,i,a,f,l,g,c]),(0,n.useEffect)((()=>{const e=BP({graph:f.getGraph(),undirectedGraph:k,selectedNode:s,rootNodeUri:R});M(e)}),[s,R,f,k]),(0,n.useEffect)((()=>{m({enterNode:e=>{let{node:t}=e;_(t)},leaveNode:()=>{_(void 0)},clickNode:e=>{let{node:t}=e;u(t)},click:e=>{const t=(e=>{let{x:t,y:n}=e;const r=f.viewportToGraph({x:t,y:n}),o=f.getGraph(),i=o.nodes().map((e=>{const t=o.getNodeAttributes(e);return{nodeId:e,distance:Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2),hidden:t.hidden}})).sort(((e,t)=>e.distance-t.distance)).filter((e=>{let{hidden:t}=e;return!t}));return i.length>0?i[0].nodeId:null})(e);if(!t)return;const n=f.getNodeDisplayData(t),r=f.framedGraphToViewport({x:n.x,y:n.y}),o=f.scaleSize(n.buttonOffset[0]),i=f.scaleSize(n.buttonOffset[1]),a=f.scaleSize(n.buttonSize),l=FP(e.x,e.y,r.x+o,r.y-i,a),s=FP(e.x,e.y,r.x+o,r.y+i,a);if(n.showExpand&&l&&(p(t),u(t)),n.showCollapse&&s){const e=BP({graph:f.getGraph(),undirectedGraph:k,selectedNode:t,rootNodeUri:R});d(t,e),u(t)}}})}),[f,m,u,d,p,R,k]),(0,n.useEffect)((()=>{const e=f.getGraph();let t;try{t=e.neighbors(s)}catch(e){}y({nodeReducer:(n,r)=>{const{entityTypesUris:o=[]}=h||{},i=KP(E,O,{type:r.entityTypeUri}),a=e.neighbors(n),l=a.map((t=>e.getNodeAttribute(t,"hidden"))).filter((e=>!!e)).length,c=(P.nodes||[]).includes(n),u=C===n,d=n===R,p=n===s,f=t&&!t.includes(n)&&s!==n&&s!==R&&!c,g=![s,R].includes(n)&&o.length>0&&!o.includes(r.entityTypeUri),m=qP({},r,n===s?$P:ZP,{color:"#0072CE",image:i,showExpand:r.untraversedRelationsCount>0||l>0,showCollapse:r.traversedRelationsCount>1&&a.length-l>1});return c||p||d?(m.inPath=!0,m.color=d?"#00FFFF":r.color):f&&(m.label=u?r.label:"",m.inactive=!0),u&&(m.highlighted=!0),g&&(m.hidden=!0),m},edgeReducer:(t,n)=>{const{relationTypesUris:r=[]}=h||{},o=qP({},n,{hidden:!1}),i=(P.edges||[]).includes(t),a=(0,Fo.getRelationType)(E,n.relationTypeUri),l=(0,Fo.getRelationTypePropWithInheritance)(E,a,"typeColor"),u=s&&s!==R&&!e.hasExtremity(t,s)&&!i||r.length>0&&!r.includes(n.relationTypeUri);var d;return l&&(o.color=l),w===t&&(o.hovered=!0),u&&(o.hidden=!0),c&&(o.arrowSizeRatio=4),i&&(o.color="#0072CE",o.size=4,o.arrowSizeRatio=c?1.4:n.arrowSizeRatio),o.type=(d=c?n.direction:Fo.RelationTypeDirection.undirected,zP[d]||"line"),o.relationLabel=(0,Fo.getLabel)(null==a?void 0:a.label),o},enableEdgeHoverEvents:!0})}),[f,y,C,s,P,R,E,O,c,h,w])};function QP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){JP(e,t,n[t])}))}return e}function JP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eM=e=>{let{data:t,graph:r,selectedNode:o,layout:i,onNodeClick:a,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const d=od(t);Vl((()=>{if(d){const e=(0,u.difference)(t.entities.map((0,u.prop)("uri")),d.entities.map((0,u.prop)("uri")));if(e.length){const t=r.copy();IP().assign(t),e.forEach((e=>{r.setNodeAttribute(e,"x",t.getNodeAttribute(e,"x")),r.setNodeAttribute(e,"y",t.getNodeAttribute(e,"y"))}))}}}),[t]);const p=(0,n.useMemo)((()=>(IP().assign(r),{settings:QP({},AP().inferSettings(r),{gravity:1})})),[r]);return XP({workerLayout:NP(),layoutSettings:p,data:t,graph:r,selectedNode:o,onNodeClick:a,isDirected:i===Fo.GraphLayout.DIRECTED_NETWORK,onNodeCollapse:l,onNodeExpand:s,filters:c}),null};var tM=h(6039);const nM=(e,t,n)=>{const r=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||r.add(t.id)})),r.size||r.add(n),r},rM=(e,t,n,r)=>{const o=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{n.add(t),r.forEach((r=>{r.from!==t||e.has(r.to)||n.has(r.to)||o.add(r.to)}))})),o.size&&t.push(Array.from(o)),((e,t,n)=>{const r=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||n.has(t.to)||r.add(t.to)}))})),!!r.size})(o,r,n)?rM(o,t,n,r):t},oM=(e,t,n,r,o)=>{if(e.length<=o&&(t[r]=[...e]),e.length>o){const i=e.slice(o),a=e.slice(0,o);t[r]=a,t[r+1]=n[r+1]?[...n[r+1],...i]:i}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return oM(e,t,n,r,o)}return t},iM=e=>{let{quantityAtLvl:t,rowNumber:n,isEvenItem:r,layout:o,shouldUseCheckboardPattern:i}=e;const a=o===Fo.GraphLayout.VERTICAL_TB;return i&&a&&r&&1!==t?10*n+5:10*n},aM=e=>{let{quantityAtLvl:t,posAtLvl:n,max:r,isEvenRow:o,layout:i,shouldUseCheckboardPattern:a}=e;const l=i===Fo.GraphLayout.HORIZONTAL_LR;return t===r?a&&o&&l?10*n+5:10*n:1===t?10*(r-1)/2:10*(r-1)/(t+1)*(n+1)},lM=e=>e<100;function sM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cM=e=>{let{data:t,graph:r,selectedNode:o,layout:i,onNodeClick:a,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const u=(0,n.useCallback)((e=>{const t=e.copy(),n=(e=>{switch(e){case Fo.GraphLayout.VERTICAL_TB:return 180;case Fo.GraphLayout.HORIZONTAL_LR:return 270}})(i),r=(e=>{const t=e.nodes().map((e=>({id:e,name:""}))),n=e.mapEdges(((e,t,n,r)=>({from:n,to:r,key:e,relationTypeUri:t.relationTypeUri,direction:t.direction})));return{nodes:t,edges:n}})(t),a=r.nodes.length,l=!lM(a),s=((e,t)=>{if(lM(e))return 10;const n=t===Fo.GraphLayout.VERTICAL_TB?1.5:.7;return Math.round(Math.sqrt(e)*n)})(a,i),c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=e.nodes,o=e.edges.filter((e=>e.from!==e.to)),i=nM(o,r,t),a=rM(i,[],new Set,o);return oM(a[0],[],a,0,n)}(r,o,s),u=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(c);for(let e=0;e<c.length;++e){const n=e%2==0,r=c[e].length;for(let o=0;o<r;++o){const a=o%2==0,s=aM({quantityAtLvl:r,posAtLvl:o,max:u,isEvenRow:n,layout:i,shouldUseCheckboardPattern:l}),d=iM({quantityAtLvl:r,rowNumber:e,isEvenItem:a,layout:i,shouldUseCheckboardPattern:l});t.setNodeAttribute(c[e][o],"x",s),t.setNodeAttribute(c[e][o],"y",d)}}return tM.rotation.assign(t,n,{degrees:!0}),t.reduceNodes(((e,t,n)=>{let{x:r,y:o}=n;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sM(e,t,n[t])}))}return e}({},e,{[t]:{x:r,y:o}})}),{})}),[i,o]);return XP({syncLayout:u,data:t,graph:r,selectedNode:o,onNodeClick:a,onNodeCollapse:l,onNodeExpand:s,filters:c}),null},uM=(0,i.makeStyles)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),dM=Md(Rd,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:i}=e;const a=uM(),l=(0,o.useSelector)(b().selectors.getMetadata),s=(0,o.useSelector)(b().selectors.getEntity),c=(0,n.useMemo)((()=>[{label:p().text("All"),value:null},...(0,Fo.getGraphTypesForEntityType)(l,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,l]),u=(0,n.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return r().createElement(Ox,{classes:{valueContainer:a.valueContainer},className:a.graphTypeSelector,height:42,label:p().text("Graph type"),value:u,options:c,onChange:e=>i(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:a.filledInputRoot}}}})})),pM=(0,i.makeStyles)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),hM=(0,n.memo)((e=>{let{value:t,onChangeHandler:n,graphTypeUri:o}=e;const i=pM(),a=[{label:p().text("Simple network"),value:Fo.GraphLayout.SIMPLE_NETWORK},{label:p().text("Vertical hierarchy"),value:Fo.GraphLayout.VERTICAL_TB},{label:p().text("Horizontal hierarchy"),value:Fo.GraphLayout.HORIZONTAL_LR},{label:p().text("Directed network"),value:Fo.GraphLayout.DIRECTED_NETWORK},{label:p().text("Tree"),value:Fo.GraphLayout.TREE}],l=o?a:a.filter((e=>e.value!==Fo.GraphLayout.TREE));return r().createElement(Ox,{className:i.graphLayoutSelector,label:p().text("Graph layout"),value:a.find((0,u.propEq)("value",t)),options:l,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:i.filledInputRoot}}}})})),fM=()=>{const e=$T(),t=(0,n.useCallback)((()=>{e.refresh()}),[e]);return r().createElement(Ja,{handleWidth:!0,onResize:t})};var gM=h(7373);const mM=window["material-ui"].Slider;var yM=h.n(mM);function vM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bM(e,t,n[t])}))}return e}function bM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xM="0 1px 1px rgba(0,0,0,0.14), 0 2px 1px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.2)",wM={background:"#FFFFFF",boxShadow:xM,width:"28px",height:"28px"},SM=(0,i.makeStyles)({container:{display:"flex",alignItems:"center"},maxButton:vM({},wM,{borderRadius:"2px 4px 4px 2px"}),minButton:vM({},wM,{borderRadius:"4px 2px 2px 4px"}),thumb:{position:"absolute",boxShadow:xM,borderRadius:"2px",width:"8px",height:"28px",marginTop:"-13px",marginLeft:"1px",color:"rgba(0,0,0,0.54)",backgroundColor:"#FFFFFF",boxSizing:"border-box",outline:0,display:"flex",alignItems:"center",justifyContent:"center"},thumbIcon:{transform:"rotate(90deg)"},icon:{width:"18px",height:"18px"},rail:{opacity:1,height:"4px",paddingRight:"10px"},sliderRoot:{color:"#EDEDED",marginRight:"10px"}});function EM(){return EM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EM.apply(this,arguments)}const OM=e=>Math.pow(100/e,2),CM=e=>100/Math.sqrt(e),_M=e=>{const t=SM(),n=(0,u.omit)(["className"],e);return r().createElement("div",EM({className:t.thumb},n),r().createElement(gM.Z,{className:c()(t.icon,t.thumbIcon)}))},kM=e=>{let{className:t,max:o,min:i}=e;const a=SM(),l=ZT(),s=tP(),d=$T().getCamera(),{zoomIn:p,zoomOut:h}=nP({factor:1.2}),[f,g]=(0,n.useState)((0,u.clamp)(i,o,CM(d.getState().ratio))),m=(0,n.useMemo)((()=>i>0?OM(i):null),[i]),y=(0,n.useMemo)((()=>o>0?OM(o):null),[o]);return(0,n.useEffect)((()=>(l({maxCameraRatio:m,minCameraRatio:y}),()=>{l({maxCameraRatio:null,minCameraRatio:null})})),[l,y,m]),(0,n.useEffect)((()=>{s({updated:e=>g(CM(e.ratio))})}),[s]),r().createElement("div",{className:c()(a.container,t)},r().createElement(j(),{className:a.minButton,onClick:()=>h()},r().createElement(gM.Z,{className:a.icon})),r().createElement(yM(),{ThumbComponent:_M,classes:{root:a.sliderRoot,rail:a.rail},track:!1,value:f,min:i,max:o,onChange:(e,t)=>d.setState({ratio:d.getBoundedRatio(OM(t))})}),r().createElement(j(),{className:a.maxButton,onClick:()=>p()},r().createElement(Gp.Z,{className:a.icon})))};var TM=h(5156);const PM=(0,i.makeStyles)({button:{background:"#FFFFFF",boxShadow:"0 1px 1px rgba(0,0,0,0.14), 0 2px 1px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.2)",width:"28px",height:"28px",borderRadius:"4px"},icon:{width:"18px",height:"18px"}}),MM=e=>{let{node:t}=e;const n=PM(),{gotoNode:o}=nP();return r().createElement(j(),{className:n.button,onClick:()=>o(t)},r().createElement(TM.Z,{className:n.icon}))};var RM=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,r=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=r||o||No(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),r=0,o=t,i=[];o.isBefore(n);){var a=Math.floor(r/7);i[a]=i[a]||[],i[a].push(o),o=o.clone().add(1,"day"),r+=1}return i},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),r=this.moment(t).endOf("year"),o=[],i=n;i.isBefore(r);)o.push(i),i=i.clone().add(1,"year");return o},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}();const IM=RM;function DM(){return DM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DM.apply(this,arguments)}const AM=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return r().createElement("svg",DM({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),r().createElement("defs",null,r().createElement("path",{d:"M12 7c2.762 0 5 2.238 5 5s-2.238 5-5 5-5-2.238-5-5 2.238-5 5-5zm0 2a3 3 0 100 6 3 3 0 100-6zm8.94 2A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z",id:"svg2250934887a"})),r().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"svg2250934887b",fill:"#fff"},r().createElement("use",{xlinkHref:"#svg2250934887a"})),r().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2250934887b)",d:"M0 0h24v24H0z"})))};function LM(){return LM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LM.apply(this,arguments)}const NM=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return r().createElement("svg",LM({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),r().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},r().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},jM=(0,i.makeStyles)((()=>({header:{padding:"0 4px 0 16px"},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"},icon:{width:"24px",height:"24px"},disabledIcon:{opacity:.54}}))),zM=Oi(j()),FM=e=>{let{title:t,entityLabel:o="",onScrollToCurrentEntity:i,onGraphOpen:a,disabled:l=!1,isGraphView:s=!1}=e;const u=jM(),{showNavigateToGraph:d}=(0,n.useContext)(Cw),h=c()(u.icon,{[u.disabledIcon]:l});return r().createElement(CT,{title:t,className:u.header},r().createElement("div",{className:u.buttonsContainer},!s&&d&&r().createElement(zM,{tooltipTitle:p().text("Show Graph"),onClick:a,classes:{root:u.button,label:h},disabled:l,showForDisabled:!0},r().createElement(NM,null)),r().createElement(zM,{tooltipTitle:p().text("Scroll to ${node}",{node:o}),tooltipPlacement:"bottom-end",onClick:i,classes:{root:u.button,label:h},disabled:l,showForDisabled:!0},r().createElement(AM,null))))},BM=(0,i.makeStyles)((e=>({textField:{marginLeft:e.spacing(),marginRight:e.spacing(),width:200},panel:e=>{let{isGraphView:t}=e;return{display:"flex",flexGrow:1,flexDirection:"column",minHeight:t?void 0:"372px",maxHeight:t?void 0:"507px",height:t?"100%":void 0}},treeWrapper:{flexGrow:1,height:0,marginTop:7},checkedNode:{backgroundColor:"rgba(0,114,206, 0.12)"},editorNode:{overflow:"hidden","&:hover":{backgroundColor:"transparent !important"},"&:hover div.rst__moveHandle":{visibility:"hidden"},"& div.rst__rowLabel":{paddingRight:0}}})));function WM(e){var t=e.cellCount,n=e.cellSize,r=e.computeMetadataCallback,o=e.computeMetadataCallbackProps,i=e.nextCellsCount,a=e.nextCellSize,l=e.nextScrollToIndex,s=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===i&&("number"!=typeof n&&"number"!=typeof a||n===a)||(r(o),s>=0&&s===l&&c())}var UM=function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,o=t.estimatedCellSize;yg(this,e),Oe(this,"_cellSizeAndPositionData",{}),Oe(this,"_lastMeasuredIndex",-1),Oe(this,"_lastBatchedIndex",-1),Oe(this,"_cellCount",void 0),Oe(this,"_cellSizeGetter",void 0),Oe(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=o}return bg(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(o));null===o?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:o},n+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var a,l=this.getSizeAndPositionOfCell(i),s=l.offset,c=s-r+l.size;switch(n){case"start":a=s;break;case"end":a=c;break;case"center":a=s-(r-l.size)/2;break;default:a=Math.max(c,Math.min(s,o))}var u=this.getTotalSize();return Math.max(0,Math.min(u-r,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,o=this._findNearestCell(n),i=this.getSizeAndPositionOfCell(o);n=i.offset+i.size;for(var a=o;n<r&&a<this._cellCount-1;)a++,n+=this.getSizeAndPositionOfCell(a).size;return{start:o,stop:a}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,n){for(;t<=e;){var r=t+Math.floor((e-t)/2),o=this.getSizeAndPositionOfCell(r).offset;if(o===n)return r;o<n?t=r+1:o>n&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=n,n*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),n=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}(),HM=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?"undefined"!=typeof window&&window.chrome?16777100:15e5:n,o=ve(t,["maxScrollSize"]);yg(this,e),Oe(this,"_cellSizeAndPositionManager",void 0),Oe(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new UM(o),this._maxScrollSize=r}return bg(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(i*(o-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(r-t))}}]),e}();function VM(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,o=n.indices,i=Object.keys(o),a=!e||i.every((function(e){var t=o[e];return Array.isArray(t)?t.length>0:t>=0})),l=i.length!==Object.keys(t).length||i.some((function(e){var n=t[e],r=o[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=o,a&&l&&r(o)}}function GM(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,s=e.scrollOffset,c=e.scrollToAlignment,u=e.scrollToIndex,d=e.size,p=e.sizeJustIncreasedFromZero,h=e.updateScrollIndexCallback,f=n.getCellCount(),g=u>=0&&u<f;g&&(d!==l||p||!o||"number"==typeof t&&t!==o||c!==i||u!==a)?h(u):!g&&f>0&&(d<l||f<r)&&s>n.getTotalSize()-d&&h(f-1)}const qM=!("undefined"==typeof window||!window.document||!window.document.createElement);var YM,KM;function $M(e){if((!YM&&0!==YM||e)&&qM){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),YM=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return YM}var ZM,XM,QM=(KM="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||KM.webkitRequestAnimationFrame||KM.mozRequestAnimationFrame||KM.oRequestAnimationFrame||KM.msRequestAnimationFrame||function(e){return KM.setTimeout(e,1e3/60)},JM=KM.cancelAnimationFrame||KM.webkitCancelAnimationFrame||KM.mozCancelAnimationFrame||KM.oCancelAnimationFrame||KM.msCancelAnimationFrame||function(e){KM.clearTimeout(e)},eR=QM,tR=JM,nR=function(e){return tR(e.id)},rR=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:eR((function o(){Date.now()-n>=t?e.call():r.id=eR(o)}))};return r};function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oR(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aR="requested",lR=(XM=ZM=function(e){function t(e){var n;yg(this,t),Oe(U(n=wg(this,Sg(t).call(this,e))),"_onGridRenderedMemoizer",VM()),Oe(U(n),"_onScrollMemoizer",VM(!1)),Oe(U(n),"_deferredInvalidateColumnIndex",null),Oe(U(n),"_deferredInvalidateRowIndex",null),Oe(U(n),"_recomputeScrollLeftFlag",!1),Oe(U(n),"_recomputeScrollTopFlag",!1),Oe(U(n),"_horizontalScrollBarSize",0),Oe(U(n),"_verticalScrollBarSize",0),Oe(U(n),"_scrollbarPresenceChanged",!1),Oe(U(n),"_scrollingContainer",void 0),Oe(U(n),"_childrenToDisplay",void 0),Oe(U(n),"_columnStartIndex",void 0),Oe(U(n),"_columnStopIndex",void 0),Oe(U(n),"_rowStartIndex",void 0),Oe(U(n),"_rowStopIndex",void 0),Oe(U(n),"_renderedColumnStartIndex",0),Oe(U(n),"_renderedColumnStopIndex",0),Oe(U(n),"_renderedRowStartIndex",0),Oe(U(n),"_renderedRowStopIndex",0),Oe(U(n),"_initialScrollTop",void 0),Oe(U(n),"_initialScrollLeft",void 0),Oe(U(n),"_disablePointerEventsTimeoutId",void 0),Oe(U(n),"_styleCache",{}),Oe(U(n),"_cellCache",{}),Oe(U(n),"_debounceScrollEndedCallback",(function(){n._disablePointerEventsTimeoutId=null,n.setState({isScrolling:!1,needToResetStyleCache:!1})})),Oe(U(n),"_invokeOnGridRenderedHelper",(function(){var e=n.props.onSectionRendered;n._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:n._columnStartIndex,columnOverscanStopIndex:n._columnStopIndex,columnStartIndex:n._renderedColumnStartIndex,columnStopIndex:n._renderedColumnStopIndex,rowOverscanStartIndex:n._rowStartIndex,rowOverscanStopIndex:n._rowStopIndex,rowStartIndex:n._renderedRowStartIndex,rowStopIndex:n._renderedRowStopIndex}})})),Oe(U(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),Oe(U(n),"_onScroll",(function(e){e.target===n._scrollingContainer&&n.handleScrollEvent(e.target)}));var r=new HM({cellCount:e.columnCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.columnWidth)(n)},estimatedCellSize:t._getEstimatedColumnSize(e)}),o=new HM({cellCount:e.rowCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.rowHeight)(n)},estimatedCellSize:t._getEstimatedRowSize(e)});return n.state={instanceProps:{columnSizeAndPositionManager:r,rowSizeAndPositionManager:o,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return xg(t,e),bg(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=iR({},this.props,{scrollToAlignment:n,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,s=i.height,c=i.width,u=this.state.instanceProps,d=u.scrollbarSize,p=u.rowSizeAndPositionManager.getTotalSize(),h=u.columnSizeAndPositionManager.getTotalSize(),f=Math.min(Math.max(0,h-c+d),n),g=Math.min(Math.max(0,p-s+d),o);if(this.state.scrollLeft!==f||this.state.scrollTop!==g){var m={isScrolling:!0,scrollDirectionHorizontal:f!==this.state.scrollLeft?f>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};a||(m.scrollTop=g),l||(m.scrollLeft=f),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:g,totalColumnsWidth:h,totalRowsHeight:p})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,s=this.state.instanceProps;s.columnSizeAndPositionManager.resetCell(n),s.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?n<=a:n>=a),this._recomputeScrollTopFlag=l>=0&&(1===this.state.scrollDirectionVertical?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(iR({},o,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(iR({},o,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,s=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(e){var t=iR({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof o&&o>=0||"number"==typeof a&&a>=0){var u=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=r>0&&s>0;i>=0&&d&&this._updateScrollLeftForScrollToColumn(),l>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,s=r.rowCount,c=r.scrollToAlignment,u=r.scrollToColumn,d=r.scrollToRow,p=r.width,h=this.state,f=h.scrollLeft,g=h.scrollPositionChangeReason,m=h.scrollTop,y=h.instanceProps;this._handleInvalidatedGridSize();var v=a>0&&0===e.columnCount||s>0&&0===e.rowCount;g===aR&&(!i&&f>=0&&(f!==this._scrollingContainer.scrollLeft||v)&&(this._scrollingContainer.scrollLeft=f),!o&&m>=0&&(m!==this._scrollingContainer.scrollTop||v)&&(this._scrollingContainer.scrollTop=m));var b=(0===e.width||0===e.height)&&l>0&&p>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):GM({cellSizeAndPositionManager:y.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:f,scrollToAlignment:c,scrollToIndex:u,size:p,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):GM({cellSizeAndPositionManager:y.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:m,scrollToAlignment:c,scrollToIndex:d,size:l,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),f!==t.scrollLeft||m!==t.scrollTop){var x=y.rowSizeAndPositionManager.getTotalSize(),w=y.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:m,totalColumnsWidth:w,totalRowsHeight:x})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&nR(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,r=e.autoHeight,o=e.autoWidth,i=e.className,a=e.containerProps,l=e.containerRole,s=e.containerStyle,c=e.height,u=e.id,d=e.noContentRenderer,p=e.role,h=e.style,f=e.tabIndex,g=e.width,m=this.state,y=m.instanceProps,v=m.needToResetStyleCache,b=this._isScrolling(),x={boxSizing:"border-box",direction:"ltr",height:r?"auto":c,position:"relative",width:o?"auto":g,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=y.columnSizeAndPositionManager.getTotalSize(),S=y.rowSizeAndPositionManager.getTotalSize(),E=S>c?y.scrollbarSize:0,O=w>g?y.scrollbarSize:0;O===this._horizontalScrollBarSize&&E===this._verticalScrollBarSize||(this._horizontalScrollBarSize=O,this._verticalScrollBarSize=E,this._scrollbarPresenceChanged=!0),x.overflowX=w+E<=g?"hidden":"auto",x.overflowY=S+O<=c?"hidden":"auto";var C=this._childrenToDisplay,_=0===C.length&&c>0&&g>0;return n.createElement("div",F({ref:this._setScrollingContainerRef},a,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:P("ReactVirtualized__Grid",i),id:u,onScroll:this._onScroll,role:p,style:iR({},x,{},h),tabIndex:f}),C.length>0&&n.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:iR({width:t?"auto":w,height:S,maxWidth:w,maxHeight:S,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"},s)},C),_&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,s=e.overscanIndicesGetter,c=e.overscanRowCount,u=e.rowCount,d=e.width,p=e.isScrollingOptOut,h=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,g=t.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,y=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,v=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&d>0){var b=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:y}),x=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:m}),w=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:y}),S=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:m});this._renderedColumnStartIndex=b.start,this._renderedColumnStopIndex=b.stop,this._renderedRowStartIndex=x.start,this._renderedRowStopIndex=x.stop;var E=s({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:h,startIndex:"number"==typeof b.start?b.start:0,stopIndex:"number"==typeof b.stop?b.stop:-1}),O=s({direction:"vertical",cellCount:u,overscanCellsCount:c,scrollDirection:f,startIndex:"number"==typeof x.start?x.start:0,stopIndex:"number"==typeof x.stop?x.stop:-1}),C=E.overscanStartIndex,_=E.overscanStopIndex,k=O.overscanStartIndex,T=O.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var P=k;P<=T;P++)if(!i.has(P,0)){C=0,_=o-1;break}if(!i.hasFixedWidth())for(var M=C;M<=_;M++)if(!i.has(0,M)){k=0,T=u-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:C,columnStopIndex:_,deferredMeasurementCache:i,horizontalOffsetAdjustment:w,isScrolling:v,isScrollingOptOut:p,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:k,rowStopIndex:T,scrollLeft:y,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:b,visibleRowIndices:x}),this._columnStartIndex=C,this._columnStopIndex=_,this._rowStartIndex=k,this._rowStopIndex=T}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&nR(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=rR(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),WM({cellCount:a.prevColumnCount,cellSize:"number"==typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),WM({cellCount:a.prevRowCount,cellSize:"number"==typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,iR({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:aR};return"number"==typeof n&&n>=0&&(o.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,o.scrollLeft=n),"number"==typeof r&&r>=0&&(o.scrollDirectionVertical=r>t.scrollTop?1:-1,o.scrollTop=r),"number"==typeof n&&n>=0&&n!==t.scrollLeft||"number"==typeof r&&r>=0&&r!==t.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=t.scrollLeft,s=t.instanceProps;if(n>0){var c=n-1,u=i<0?c:Math.min(c,i),d=s.rowSizeAndPositionManager.getTotalSize(),p=s.scrollbarSizeMeasured&&d>r?s.scrollbarSize:0;return s.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-p,currentOffset:l,targetIndex:u})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=t.scrollTop,s=t.instanceProps;if(r>0){var c=r-1,u=i<0?c:Math.min(c,i),d=s.columnSizeAndPositionManager.getTotalSize(),p=s.scrollbarSizeMeasured&&d>a?s.scrollbarSize:0;return s.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n-p,currentOffset:l,targetIndex:u})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(n.PureComponent),Oe(ZM,"propTypes",null),XM);Oe(lR,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,s=e.isScrolling,c=e.isScrollingOptOut,u=e.parent,d=e.rowSizeAndPositionManager,p=e.rowStartIndex,h=e.rowStopIndex,f=e.styleCache,g=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,y=e.visibleRowIndices,v=[],b=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),x=!s&&!b,w=p;w<=h;w++)for(var S=d.getSizeAndPositionOfCell(w),E=o;E<=i;E++){var O=r.getSizeAndPositionOfCell(E),C=E>=m.start&&E<=m.stop&&w>=y.start&&w<=y.stop,_="".concat(w,"-").concat(E),k=void 0;x&&f[_]?k=f[_]:a&&!a.has(w,E)?k={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(k={height:S.size,left:O.offset+l,position:"absolute",top:S.offset+g,width:O.size},f[_]=k);var T={columnIndex:E,isScrolling:s,isVisible:C,key:_,parent:u,rowIndex:w,style:k},P=void 0;!c&&!s||l||g?P=n(T):(t[_]||(t[_]=n(T)),P=t[_]),null!=P&&!1!==P&&v.push(P)}return v},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:$M,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),$o(lR);const sR=lR;function cR(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),1===r?{overscanStartIndex:Math.max(0,o-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i+1)}}var uR,dR;function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var hR,fR,gR=(dR=uR=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),Oe(U(n),"_columnStartIndex",0),Oe(U(n),"_columnStopIndex",0),Oe(U(n),"_rowStartIndex",0),Oe(U(n),"_rowStopIndex",0),Oe(U(n),"_onKeyDown",(function(e){var t=n.props,r=t.columnCount,o=t.disabled,i=t.mode,a=t.rowCount;if(!o){var l=n._getScrollState(),s=l.scrollToColumn,c=l.scrollToRow,u=n._getScrollState(),d=u.scrollToColumn,p=u.scrollToRow;switch(e.key){case"ArrowDown":p="cells"===i?Math.min(p+1,a-1):Math.min(n._rowStopIndex+1,a-1);break;case"ArrowLeft":d="cells"===i?Math.max(d-1,0):Math.max(n._columnStartIndex-1,0);break;case"ArrowRight":d="cells"===i?Math.min(d+1,r-1):Math.min(n._columnStopIndex+1,r-1);break;case"ArrowUp":p="cells"===i?Math.max(p-1,0):Math.max(n._rowStartIndex-1,0)}d===s&&p===c||(e.preventDefault(),n._updateScrollState({scrollToColumn:d,scrollToRow:p}))}})),Oe(U(n),"_onSectionRendered",(function(e){var t=e.columnStartIndex,r=e.columnStopIndex,o=e.rowStartIndex,i=e.rowStopIndex;n._columnStartIndex=t,n._columnStopIndex=r,n._rowStartIndex=o,n._rowStopIndex=i})),n}return xg(t,e),bg(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow;this.setState({scrollToRow:n,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.children,o=this._getScrollState(),i=o.scrollToColumn,a=o.scrollToRow;return n.createElement("div",{className:t,onKeyDown:this._onKeyDown},r({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:a}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow,r=this.props,o=r.isControlled,i=r.onScrollToChange;"function"==typeof i&&i({scrollToColumn:t,scrollToRow:n}),o||this.setState({scrollToColumn:t,scrollToRow:n})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(n.PureComponent),Oe(uR,"propTypes",null),dR);function mR(e,t){var n,r=void 0!==(n=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:h.g).document&&n.document.attachEvent;if(!r){var o=function(){var e=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(e){return n.setTimeout(e,20)};return function(t){return e(t)}}(),i=function(){var e=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(t){return e(t)}}(),a=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},l=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&i(this.__resizeRAF__),this.__resizeRAF__=o((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}},s=!1,c="",u="animationstart",d="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=n.document.createElement("fakeelement");if(void 0!==f.style.animationName&&(s=!0),!1===s)for(var g=0;g<d.length;g++)if(void 0!==f.style[d[g]+"AnimationName"]){c="-"+d[g].toLowerCase()+"-",u=p[g],s=!0;break}var m="resizeanim",y="@"+c+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",v=c+"animation: 1ms "+m+"; "}return{addResizeListener:function(t,o){if(r)t.attachEvent("onresize",o);else{if(!t.__resizeTriggers__){var i=t.ownerDocument,s=n.getComputedStyle(t);s&&"static"==s.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var n=(y||"")+".resize-triggers { "+(v||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],o=t.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(t.createTextNode(n)),r.appendChild(o)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var c='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var d=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return c}});t.__resizeTriggers__.innerHTML=d.createHTML("")}else t.__resizeTriggers__.innerHTML=c;t.appendChild(t.__resizeTriggers__),a(t),t.addEventListener("scroll",l,!0),u&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&a(t)},t.__resizeTriggers__.addEventListener(u,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(o)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(u,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function yR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yR(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yR(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Oe(gR,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),$o(gR);var bR=(fR=hR=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"state",{height:n.props.defaultHeight||0,width:n.props.defaultWidth||0}),Oe(U(n),"_parentNode",void 0),Oe(U(n),"_autoSizer",void 0),Oe(U(n),"_window",void 0),Oe(U(n),"_detectElementResize",void 0),Oe(U(n),"_onResize",(function(){var e=n.props,t=e.disableHeight,r=e.disableWidth,o=e.onResize;if(n._parentNode){var i=n._parentNode.offsetHeight||0,a=n._parentNode.offsetWidth||0,l=(n._window||window).getComputedStyle(n._parentNode)||{},s=parseInt(l.paddingLeft,10)||0,c=parseInt(l.paddingRight,10)||0,u=parseInt(l.paddingTop,10)||0,d=parseInt(l.paddingBottom,10)||0,p=i-u-d,h=a-s-c;(!t&&n.state.height!==p||!r&&n.state.width!==h)&&(n.setState({height:i-u-d,width:a-s-c}),o({height:i,width:a}))}})),Oe(U(n),"_setRef",(function(e){n._autoSizer=e})),n}return xg(t,e),bg(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=mR(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,o=e.disableHeight,i=e.disableWidth,a=e.style,l=this.state,s=l.height,c=l.width,u={overflow:"visible"},d={};return o||(u.height=0,d.height=s),i||(u.width=0,d.width=c),n.createElement("div",{className:r,ref:this._setRef,style:vR({},u,{},a)},t(d))}}]),t}(n.Component),Oe(hR,"propTypes",null),fR);Oe(bR,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var xR,wR,SR=(wR=xR=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"_child",void 0),Oe(U(n),"_measure",(function(){var e=n.props,t=e.cache,r=e.columnIndex,o=void 0===r?0:r,i=e.parent,a=e.rowIndex,l=void 0===a?n.props.index||0:a,s=n._getCellMeasurements(),c=s.height,u=s.width;c===t.getHeight(l,o)&&u===t.getWidth(l,o)||(t.set(l,o,u,c),i&&"function"==typeof i.recomputeGridSize&&i.recomputeGridSize({columnIndex:o,rowIndex:l}))})),Oe(U(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),n._child=e,e&&n._maybeMeasureCell()})),n}return xg(t,e),bg(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"==typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||(0,ee.findDOMNode)(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var n=t.style.width,r=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var o=Math.ceil(t.offsetHeight),i=Math.ceil(t.offsetWidth);return n&&(t.style.width=n),r&&(t.style.height=r),{height:o,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,n=e.columnIndex,r=void 0===n?0:n,o=e.parent,i=e.rowIndex,a=void 0===i?this.props.index||0:i;if(!t.has(a,r)){var l=this._getCellMeasurements(),s=l.height,c=l.width;t.set(a,r,c,s),o&&"function"==typeof o.invalidateCellSizeAfterRender&&o.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:a})}}}]),t}(n.PureComponent),Oe(xR,"propTypes",null),wR);Oe(SR,"__internalCellMeasurerFlag",!1);var ER=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yg(this,e),Oe(this,"_cellHeightCache",{}),Oe(this,"_cellWidthCache",{}),Oe(this,"_columnWidthCache",{}),Oe(this,"_rowHeightCache",{}),Oe(this,"_defaultHeight",void 0),Oe(this,"_defaultWidth",void 0),Oe(this,"_minHeight",void 0),Oe(this,"_minWidth",void 0),Oe(this,"_keyMapper",void 0),Oe(this,"_hasFixedHeight",void 0),Oe(this,"_hasFixedWidth",void 0),Oe(this,"_columnCount",0),Oe(this,"_rowCount",0),Oe(this,"columnWidth",(function(e){var n=e.index,r=t._keyMapper(0,n);return void 0!==t._columnWidthCache[r]?t._columnWidthCache[r]:t._defaultWidth})),Oe(this,"rowHeight",(function(e){var n=e.index,r=t._keyMapper(n,0);return void 0!==t._rowHeightCache[r]?t._rowHeightCache[r]:t._defaultHeight}));var r=n.defaultHeight,o=n.defaultWidth,i=n.fixedHeight,a=n.fixedWidth,l=n.keyMapper,s=n.minHeight,c=n.minWidth;this._hasFixedHeight=!0===i,this._hasFixedWidth=!0===a,this._minHeight=s||0,this._minWidth=c||0,this._keyMapper=l||OR,this._defaultHeight=Math.max(this._minHeight,"number"==typeof r?r:30),this._defaultWidth=Math.max(this._minWidth,"number"==typeof o?o:100)}return bg(e,[{key:"clear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);delete this._cellHeightCache[n],delete this._cellWidthCache[n],this._updateCachedColumnAndRowSizes(e,t)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]?Math.max(this._minHeight,this._cellHeightCache[n]):this._defaultHeight}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var n=this._keyMapper(e,t);return void 0!==this._cellWidthCache[n]?Math.max(this._minWidth,this._cellWidthCache[n]):this._defaultWidth}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]}},{key:"set",value:function(e,t,n,r){var o=this._keyMapper(e,t);t>=this._columnCount&&(this._columnCount=t+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[o]=r,this._cellWidthCache[o]=n,this._updateCachedColumnAndRowSizes(e,t)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,t){if(!this._hasFixedWidth){for(var n=0,r=0;r<this._rowCount;r++)n=Math.max(n,this.getWidth(r,t));var o=this._keyMapper(0,t);this._columnWidthCache[o]=n}if(!this._hasFixedHeight){for(var i=0,a=0;a<this._columnCount;a++)i=Math.max(i,this.getHeight(e,a));var l=this._keyMapper(e,0);this._rowHeightCache[l]=i}}},{key:"defaultHeight",get:function(){return this._defaultHeight}},{key:"defaultWidth",get:function(){return this._defaultWidth}}]),e}();function OR(e,t){return"".concat(e,"-").concat(t)}function CR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CR(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CR(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kR="observed",TR="requested",PR=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),Oe(U(n),"_calculateSizeAndPositionDataOnNextUpdate",!1),Oe(U(n),"_onSectionRenderedMemoizer",VM()),Oe(U(n),"_onScrollMemoizer",VM(!1)),Oe(U(n),"_invokeOnSectionRenderedHelper",(function(){var e=n.props,t=e.cellLayoutManager,r=e.onSectionRendered;n._onSectionRenderedMemoizer({callback:r,indices:{indices:t.getLastRenderedIndices()}})})),Oe(U(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),Oe(U(n),"_updateScrollPositionForScrollToCell",(function(){var e=n.props,t=e.cellLayoutManager,r=e.height,o=e.scrollToAlignment,i=e.scrollToCell,a=e.width,l=n.state,s=l.scrollLeft,c=l.scrollTop;if(i>=0){var u=t.getScrollPositionForCell({align:o,cellIndex:i,height:r,scrollLeft:s,scrollTop:c,width:a});u.scrollLeft===s&&u.scrollTop===c||n._setScrollPosition(u)}})),Oe(U(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,o=t.height,i=t.isScrollingChange,a=t.width,l=n._scrollbarSize,s=r.getTotalSize(),c=s.height,u=s.width,d=Math.max(0,Math.min(u-a+l,e.target.scrollLeft)),p=Math.max(0,Math.min(c-o+l,e.target.scrollTop));if(n.state.scrollLeft!==d||n.state.scrollTop!==p){var h=e.cancelable?kR:TR;n.state.isScrolling||i(!0),n.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:h,scrollTop:p})}n._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:p,totalWidth:u,totalHeight:c})}})),n._scrollbarSize=$M(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return xg(t,e),bg(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,o=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=$M(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||o>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:o}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,l=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:o||0,totalHeight:a,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,o=n.scrollToAlignment,i=n.scrollToCell,a=n.width,l=this.state,s=l.scrollLeft,c=l.scrollPositionChangeReason,u=l.scrollTop;c===TR&&(s>=0&&s!==t.scrollLeft&&s!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=s),u>=0&&u!==t.scrollTop&&u!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=u)),r===e.height&&o===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,r=e.cellCount,o=e.cellLayoutManager,i=e.className,a=e.height,l=e.horizontalOverscanSize,s=e.id,c=e.noContentRenderer,u=e.style,d=e.verticalOverscanSize,p=e.width,h=this.state,f=h.isScrolling,g=h.scrollLeft,m=h.scrollTop;(this._lastRenderedCellCount!==r||this._lastRenderedCellLayoutManager!==o||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=r,this._lastRenderedCellLayoutManager=o,this._calculateSizeAndPositionDataOnNextUpdate=!1,o.calculateSizeAndPositionData());var y=o.getTotalSize(),v=y.height,b=y.width,x=Math.max(0,g-l),w=Math.max(0,m-d),S=Math.min(b,g+p+l),E=Math.min(v,m+a+d),O=a>0&&p>0?o.cellRenderers({height:E-w,isScrolling:f,width:S-x,x,y:w}):[],C={boxSizing:"border-box",direction:"ltr",height:t?"auto":a,position:"relative",WebkitOverflowScrolling:"touch",width:p,willChange:"transform"},_=v>a?this._scrollbarSize:0,k=b>p?this._scrollbarSize:0;return C.overflowX=b+_<=p?"hidden":"auto",C.overflowY=v+k<=a?"hidden":"auto",n.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:P("ReactVirtualized__Collection",i),id:s,onScroll:this._onScroll,role:"grid",style:_R({},C,{},u),tabIndex:0},r>0&&n.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:v,maxHeight:v,maxWidth:b,overflow:"hidden",pointerEvents:f?"none":"",width:b}},O),0===r&&c())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:TR};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:TR}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:TR}}}]),t}(n.PureComponent);Oe(PR,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),PR.propTypes={},$o(PR);const MR=PR;var RR=function(){function e(t){var n=t.height,r=t.width,o=t.x,i=t.y;yg(this,e),this.height=n,this.width=r,this.x=o,this.y=i,this._indexMap={},this._indices=[]}return bg(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),IR=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;yg(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return bg(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,o=e.y,i={};return this.getSections({height:t,width:n,x:r,y:o}).forEach((function(e){return e.getCellIndices().forEach((function(e){i[e]=e}))})),Object.keys(i).map((function(e){return i[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,o=e.y,i=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),l=Math.floor(o/this._sectionSize),s=Math.floor((o+t-1)/this._sectionSize),c=[],u=i;u<=a;u++)for(var d=l;d<=s;d++){var p="".concat(u,".").concat(d);this._sections[p]||(this._sections[p]=new RR({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:d*this._sectionSize})),c.push(this._sections[p])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function DR(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,o=e.cellSize,i=e.containerSize,a=e.currentOffset,l=r,s=l-i+o;switch(n){case"start":return l;case"end":return s;case"center":return l-(i-o)/2;default:return Math.max(s,Math.min(l,a))}}var AR=function(e){function t(e,n){var r;return yg(this,t),(r=wg(this,Sg(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(U(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(U(r)),r}return xg(t,e),bg(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=F({},this.props);return n.createElement(MR,F({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=[],o=new IR(e.sectionSize),i=0,a=0,l=0;l<t;l++){var s=n({index:l});if(null==s.height||isNaN(s.height)||null==s.width||isNaN(s.width)||null==s.x||isNaN(s.x)||null==s.y||isNaN(s.y))throw Error("Invalid metadata returned for cell ".concat(l,":\n x:").concat(s.x,", y:").concat(s.y,", width:").concat(s.width,", height:").concat(s.height));i=Math.max(i,s.y+s.height),a=Math.max(a,s.x+s.width),r[l]=s,o.registerCell({cellMetadatum:s,index:l})}return{cellMetadata:r,height:i,sectionManager:o,width:a}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,n=e.cellIndex,r=e.height,o=e.scrollLeft,i=e.scrollTop,a=e.width,l=this.props.cellCount;if(n>=0&&n<l){var s=this._cellMetadata[n];o=DR({align:t,cellOffset:s.x,cellSize:s.width,containerSize:a,currentOffset:o,targetIndex:n}),i=DR({align:t,cellOffset:s.y,cellSize:s.height,containerSize:r,currentOffset:i,targetIndex:n})}return{scrollLeft:o,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,n=e.height,r=e.isScrolling,o=e.width,i=e.x,a=e.y,l=this.props,s=l.cellGroupRenderer,c=l.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:n,width:o,x:i,y:a}),s({cellCache:this._cellCache,cellRenderer:c,cellSizeAndPositionGetter:function(e){var n=e.index;return t._sectionManager.getCellMetadata({index:n})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),t}(n.PureComponent);Oe(AR,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,n=e.cellRenderer,r=e.cellSizeAndPositionGetter,o=e.indices,i=e.isScrolling;return o.map((function(e){var o=r({index:e}),a={index:e,isScrolling:i,key:e,style:{height:o.height,left:o.x,position:"absolute",top:o.y,width:o.width}};return i?(e in t||(t[e]=n(a)),t[e]):n(a)})).filter((function(e){return!!e}))}}),AR.propTypes={},(function(e){function t(e,n){var r;return yg(this,t),(r=wg(this,Sg(t).call(this,e,n)))._registerChild=r._registerChild.bind(U(r)),r}return xg(t,e),bg(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.columnMaxWidth,r=t.columnMinWidth,o=t.columnCount,i=t.width;n===e.columnMaxWidth&&r===e.columnMinWidth&&o===e.columnCount&&i===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.columnMaxWidth,r=e.columnMinWidth,o=e.columnCount,i=e.width,a=r||1,l=n?Math.min(n,i):i,s=i/o;return s=Math.max(a,s),s=Math.min(l,s),s=Math.floor(s),t({adjustedWidth:Math.min(i,s*o),columnWidth:s,getColumnWidth:function(){return s},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),t}(n.PureComponent)).propTypes={};var LR=function(e){function t(e,n){var r;return yg(this,t),(r=wg(this,Sg(t).call(this,e,n)))._loadMoreRowsMemoizer=VM(),r._onRowsRendered=r._onRowsRendered.bind(U(r)),r._registerChild=r._registerChild.bind(U(r)),r}return xg(t,e),bg(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=VM(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,n=this.props.loadMoreRows;e.forEach((function(e){var r=n(e);r&&r.then((function(){var n;(n={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex}).startIndex>n.lastRenderedStopIndex||n.stopIndex<n.lastRenderedStartIndex||t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,o=this.props,i=o.isRowLoaded,a=o.minimumBatchSize,l=o.rowCount,s=o.threshold,c=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,o=e.stopIndex,i=[],a=null,l=null,s=e.startIndex;s<=o;s++)t({index:s})?null!==l&&(i.push({startIndex:a,stopIndex:l}),a=l=null):(l=s,null===a&&(a=s));if(null!==l){for(var c=Math.min(Math.max(l,a+n-1),r-1),u=l+1;u<=c&&!t({index:u});u++)l=u;i.push({startIndex:a,stopIndex:l})}if(i.length)for(var d=i[0];d.stopIndex-d.startIndex+1<n&&d.startIndex>0;){var p=d.startIndex-1;if(t({index:p}))break;d.startIndex=p}return i}({isRowLoaded:i,minimumBatchSize:a,rowCount:l,startIndex:Math.max(0,e-s),stopIndex:Math.min(l-1,t+s)}),u=(n=[]).concat.apply(n,Kt(c.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:u}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(n.PureComponent);Oe(LR,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),LR.propTypes={};var NR,jR,zR=(jR=NR=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"Grid",void 0),Oe(U(n),"_cellRenderer",(function(e){var t=e.parent,r=e.rowIndex,o=e.style,i=e.isScrolling,a=e.isVisible,l=e.key,s=n.props.rowRenderer,c=Object.getOwnPropertyDescriptor(o,"width");return c&&c.writable&&(o.width="100%"),s({index:r,style:o,isScrolling:i,isVisible:a,key:l,parent:t})})),Oe(U(n),"_setRef",(function(e){n.Grid=e})),Oe(U(n),"_onScroll",(function(e){var t=e.clientHeight,r=e.scrollHeight,o=e.scrollTop;(0,n.props.onScroll)({clientHeight:t,scrollHeight:r,scrollTop:o})})),Oe(U(n),"_onSectionRendered",(function(e){var t=e.rowOverscanStartIndex,r=e.rowOverscanStopIndex,o=e.rowStartIndex,i=e.rowStopIndex;(0,n.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:r,startIndex:o,stopIndex:i})})),n}return xg(t,e),bg(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.noRowsRenderer,o=e.scrollToIndex,i=e.width,a=P("ReactVirtualized__List",t);return n.createElement(sR,F({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:a,columnWidth:i,columnCount:1,noContentRenderer:r,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:o}))}}]),t}(n.PureComponent),Oe(NR,"propTypes",null),jR);Oe(zR,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:cR,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const FR=function(e,t,n,r,o){return"function"==typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>=0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>=r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)};function BR(e,t,n,r,o){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=o,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var WR=BR.prototype;function UR(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function HR(e,t){var n=QR(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function VR(e,t){var n=e.intervals([]);n.push(t),HR(e,n)}function GR(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?0:(n.splice(r,1),HR(e,n),1)}function qR(e,t,n){for(var r=0;r<e.length&&e[r][0]<=t;++r){var o=n(e[r]);if(o)return o}}function YR(e,t,n){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var o=n(e[r]);if(o)return o}}function KR(e,t){for(var n=0;n<e.length;++n){var r=t(e[n]);if(r)return r}}function $R(e,t){return e-t}function ZR(e,t){return e[0]-t[0]||e[1]-t[1]}function XR(e,t){return e[1]-t[1]||e[0]-t[0]}function QR(e){if(0===e.length)return null;for(var t=[],n=0;n<e.length;++n)t.push(e[n][0],e[n][1]);t.sort($R);var r=t[t.length>>1],o=[],i=[],a=[];for(n=0;n<e.length;++n){var l=e[n];l[1]<r?o.push(l):r<l[0]?i.push(l):a.push(l)}var s=a,c=a.slice();return s.sort(ZR),c.sort(XR),new BR(r,QR(o),QR(i),s,c)}function JR(e){this.root=e}WR.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},WR.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?VR(this,e):this.left.insert(e):this.left=QR([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?VR(this,e):this.right.insert(e):this.right=QR([e]);else{var n=FR(this.leftPoints,e,ZR),r=FR(this.rightPoints,e,XR);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},WR.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?GR(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?GR(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var o=this.left,i=this.right;n.count-=r.count,n.right=r.left,r.left=o,r.right=i}UR(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?UR(this,this.left):UR(this,this.right);return 1}for(o=FR(this.leftPoints,e,ZR);o<this.leftPoints.length&&this.leftPoints[o][0]===e[0];++o)if(this.leftPoints[o]===e)for(this.count-=1,this.leftPoints.splice(o,1),i=FR(this.rightPoints,e,XR);i<this.rightPoints.length&&this.rightPoints[i][1]===e[1];++i)if(this.rightPoints[i]===e)return this.rightPoints.splice(i,1),1;return 0},WR.queryPoint=function(e,t){return e<this.mid?this.left&&(n=this.left.queryPoint(e,t))?n:qR(this.leftPoints,e,t):e>this.mid?this.right&&(n=this.right.queryPoint(e,t))?n:YR(this.rightPoints,e,t):KR(this.leftPoints,t);var n},WR.queryInterval=function(e,t,n){var r;return e<this.mid&&this.left&&(r=this.left.queryInterval(e,t,n))||t>this.mid&&this.right&&(r=this.right.queryInterval(e,t,n))?r:t<this.mid?qR(this.leftPoints,t,n):e>this.mid?YR(this.rightPoints,e,n):KR(this.leftPoints,n)};var eI=JR.prototype;eI.insert=function(e){this.root?this.root.insert(e):this.root=new BR(e[0],null,null,[e],[e])},eI.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},eI.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},eI.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(eI,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(eI,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var tI,nI,rI=function(){function e(){yg(this,e),Oe(this,"_columnSizeMap",{}),Oe(this,"_intervalTree",new JR(null)),Oe(this,"_leftMap",{})}return bg(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=dt(e,3),o=t[0],i=(t[1],t[2]);return n(i,r._leftMap[i],o)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var o=this._columnSizeMap,i=o[t];o[t]=void 0===i?n+r:Math.max(i,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function oI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oI(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aI=(nI=tI=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"state",{isScrolling:!1,scrollTop:0}),Oe(U(n),"_debounceResetIsScrollingId",void 0),Oe(U(n),"_invalidateOnUpdateStartIndex",null),Oe(U(n),"_invalidateOnUpdateStopIndex",null),Oe(U(n),"_positionCache",new rI),Oe(U(n),"_startIndex",null),Oe(U(n),"_startIndexMemoized",null),Oe(U(n),"_stopIndex",null),Oe(U(n),"_stopIndexMemoized",null),Oe(U(n),"_debounceResetIsScrollingCallback",(function(){n.setState({isScrolling:!1})})),Oe(U(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),Oe(U(n),"_onScroll",(function(e){var t=n.props.height,r=e.currentTarget.scrollTop,o=Math.min(Math.max(0,n._getEstimatedTotalHeight()-t),r);r===o&&(n._debounceResetIsScrolling(),n.state.scrollTop!==o&&n.setState({isScrolling:!0,scrollTop:o}))})),n}return xg(t,e),bg(t,[{key:"clearCellPositions",value:function(){this._positionCache=new rI,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new rI,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&nR(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,r=this.props,o=r.autoHeight,i=r.cellCount,a=r.cellMeasurerCache,l=r.cellRenderer,s=r.className,c=r.height,u=r.id,d=r.keyMapper,p=r.overscanByPixels,h=r.role,f=r.style,g=r.tabIndex,m=r.width,y=r.rowDirection,v=this.state,b=v.isScrolling,x=v.scrollTop,w=[],S=this._getEstimatedTotalHeight(),E=this._positionCache.shortestColumnSize,O=this._positionCache.count,C=0;if(this._positionCache.range(Math.max(0,x-p),c+2*p,(function(n,r,o){var i;void 0===e?(C=n,e=n):(C=Math.min(C,n),e=Math.max(e,n)),w.push(l({index:n,isScrolling:b,key:d(n),parent:t,style:(i={height:a.getHeight(n)},Oe(i,"ltr"===y?"left":"right",r),Oe(i,"position","absolute"),Oe(i,"top",o),Oe(i,"width",a.getWidth(n)),i)}))})),E<x+c+p&&O<i)for(var _=Math.min(i-O,Math.ceil((x+c+p-E)/a.defaultHeight*m/a.defaultWidth)),k=O;k<O+_;k++)e=k,w.push(l({index:k,isScrolling:b,key:d(k),parent:this,style:{width:a.getWidth(k)}}));return this._startIndex=C,this._stopIndex=e,n.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:P("ReactVirtualized__Masonry",s),id:u,onScroll:this._onScroll,role:h,style:iI({boxSizing:"border-box",direction:"ltr",height:o?"auto":c,overflowX:"hidden",overflowY:S<c?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},f),tabIndex:g},n.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:S,maxWidth:"100%",maxHeight:S,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&nR(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=rR(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,n=e.cellMeasurerCache,r=e.width,o=Math.max(1,Math.floor(r/n.defaultWidth));return this._positionCache.estimateTotalHeight(t,o,n.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,n=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(n({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var n=this.props,r=n.cellMeasurerCache,o=n.cellPositioner,i=e;i<=t;i++){var a=o(i),l=a.left,s=a.top;this._positionCache.setPosition(i,l,s,r.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(n.PureComponent),Oe(tI,"propTypes",null),nI);function lI(){}Oe(aI,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:lI,onScroll:lI,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),$o(aI);var sI=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yg(this,e),Oe(this,"_cellMeasurerCache",void 0),Oe(this,"_columnIndexOffset",void 0),Oe(this,"_rowIndexOffset",void 0),Oe(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),Oe(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,i=void 0===o?0:o,a=n.rowIndexOffset,l=void 0===a?0:a;this._cellMeasurerCache=r,this._columnIndexOffset=i,this._rowIndexOffset=l}return bg(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function cI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cI(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cI(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dI=function(e){function t(e,r){var o;yg(this,t),Oe(U(o=wg(this,Sg(t).call(this,e,r))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),Oe(U(o),"_deferredInvalidateColumnIndex",null),Oe(U(o),"_deferredInvalidateRowIndex",null),Oe(U(o),"_bottomLeftGridRef",(function(e){o._bottomLeftGrid=e})),Oe(U(o),"_bottomRightGridRef",(function(e){o._bottomRightGrid=e})),Oe(U(o),"_cellRendererBottomLeftGrid",(function(e){var t=e.rowIndex,r=ve(e,["rowIndex"]),i=o.props,a=i.cellRenderer,l=i.fixedRowCount;return t===i.rowCount-l?n.createElement("div",{key:r.key,style:uI({},r.style,{height:20})}):a(uI({},r,{parent:U(o),rowIndex:t+l}))})),Oe(U(o),"_cellRendererBottomRightGrid",(function(e){var t=e.columnIndex,n=e.rowIndex,r=ve(e,["columnIndex","rowIndex"]),i=o.props,a=i.cellRenderer,l=i.fixedColumnCount,s=i.fixedRowCount;return a(uI({},r,{columnIndex:t+l,parent:U(o),rowIndex:n+s}))})),Oe(U(o),"_cellRendererTopRightGrid",(function(e){var t=e.columnIndex,r=ve(e,["columnIndex"]),i=o.props,a=i.cellRenderer,l=i.columnCount,s=i.fixedColumnCount;return t===l-s?n.createElement("div",{key:r.key,style:uI({},r.style,{width:20})}):a(uI({},r,{columnIndex:t+s,parent:U(o)}))})),Oe(U(o),"_columnWidthRightGrid",(function(e){var t=e.index,n=o.props,r=n.columnCount,i=n.fixedColumnCount,a=n.columnWidth,l=o.state,s=l.scrollbarSize;return l.showHorizontalScrollbar&&t===r-i?s:"function"==typeof a?a({index:t+i}):a})),Oe(U(o),"_onScroll",(function(e){var t=e.scrollLeft,n=e.scrollTop;o.setState({scrollLeft:t,scrollTop:n});var r=o.props.onScroll;r&&r(e)})),Oe(U(o),"_onScrollbarPresenceChange",(function(e){var t=e.horizontal,n=e.size,r=e.vertical,i=o.state,a=i.showHorizontalScrollbar,l=i.showVerticalScrollbar;if(t!==a||r!==l){o.setState({scrollbarSize:n,showHorizontalScrollbar:t,showVerticalScrollbar:r});var s=o.props.onScrollbarPresenceChange;"function"==typeof s&&s({horizontal:t,size:n,vertical:r})}})),Oe(U(o),"_onScrollLeft",(function(e){var t=e.scrollLeft;o._onScroll({scrollLeft:t,scrollTop:o.state.scrollTop})})),Oe(U(o),"_onScrollTop",(function(e){var t=e.scrollTop;o._onScroll({scrollTop:t,scrollLeft:o.state.scrollLeft})})),Oe(U(o),"_rowHeightBottomGrid",(function(e){var t=e.index,n=o.props,r=n.fixedRowCount,i=n.rowCount,a=n.rowHeight,l=o.state,s=l.scrollbarSize;return l.showVerticalScrollbar&&t===i-r?s:"function"==typeof a?a({index:t+r}):a})),Oe(U(o),"_topLeftGridRef",(function(e){o._topLeftGrid=e})),Oe(U(o),"_topRightGridRef",(function(e){o._topRightGrid=e}));var i=e.deferredMeasurementCache,a=e.fixedColumnCount,l=e.fixedRowCount;return o._maybeCalculateCachedStyles(!0),i&&(o._deferredMeasurementCacheBottomLeftGrid=l>0?new sI({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:l}):i,o._deferredMeasurementCacheBottomRightGrid=a>0||l>0?new sI({cellMeasurerCache:i,columnIndexOffset:a,rowIndexOffset:l}):i,o._deferredMeasurementCacheTopRightGrid=a>0?new sI({cellMeasurerCache:i,columnIndexOffset:a,rowIndexOffset:0}):i),o}return xg(t,e),bg(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.fixedColumnCount,l=i.fixedRowCount,s=Math.max(0,n-a),c=Math.max(0,o-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:s,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:o}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:s,rowIndex:o}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,r=e.onSectionRendered,o=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),a=ve(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,s=l.scrollLeft,c=l.scrollTop;return n.createElement("div",{style:this._containerOuterStyle},n.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(a),this._renderTopRightGrid(uI({},a,{onScroll:t,scrollLeft:s}))),n.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(uI({},a,{onScroll:t,scrollTop:c})),this._renderBottomRightGrid(uI({},a,{onScroll:t,onSectionRendered:r,scrollLeft:s,scrollToColumn:o,scrollToRow:i,scrollTop:c}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof n){for(var r=0,o=0;o<t;o++)r+=n({index:o});this._leftGridWidth=r}else this._leftGridWidth=n*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,n=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof n){for(var r=0,o=0;o<t;o++)r+=n({index:o});this._topGridHeight=r}else this._topGridHeight=n*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,n=t.columnWidth,r=t.enableFixedColumnScroll,o=t.enableFixedRowScroll,i=t.height,a=t.fixedColumnCount,l=t.fixedRowCount,s=t.rowHeight,c=t.style,u=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,p=t.styleTopLeftGrid,h=t.styleTopRightGrid,f=t.width,g=e||i!==this._lastRenderedHeight||f!==this._lastRenderedWidth,m=e||n!==this._lastRenderedColumnWidth||a!==this._lastRenderedFixedColumnCount,y=e||l!==this._lastRenderedFixedRowCount||s!==this._lastRenderedRowHeight;(e||g||c!==this._lastRenderedStyle)&&(this._containerOuterStyle=uI({height:i,overflow:"visible",width:f},c)),(e||g||y)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||u!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=uI({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},u)),(e||m||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=uI({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||p!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=uI({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},p)),(e||m||h!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=uI({left:this._getLeftGridWidth(this.props),overflowX:o?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},h)),this._lastRenderedColumnWidth=n,this._lastRenderedFixedColumnCount=a,this._lastRenderedFixedRowCount=l,this._lastRenderedHeight=i,this._lastRenderedRowHeight=s,this._lastRenderedStyle=c,this._lastRenderedStyleBottomLeftGrid=u,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=p,this._lastRenderedStyleTopRightGrid=h,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,r=e.fixedColumnCount,o=e.fixedRowCount,i=e.rowCount,a=e.hideBottomLeftGridScrollbar,l=this.state.showVerticalScrollbar;if(!r)return null;var s=l?1:0,c=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),d=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,p=a?u+d:u,h=n.createElement(sR,F({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:r,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:c,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-o)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:p}));return a?n.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:uI({},this._bottomLeftGridStyle,{height:c,width:u,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,r=e.fixedColumnCount,o=e.fixedRowCount,i=e.rowCount,a=e.scrollToColumn,l=e.scrollToRow;return n.createElement(sR,F({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-r),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-o),rowHeight:this._rowHeightBottomGrid,scrollToColumn:a-r,scrollToRow:l-o,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,r=e.fixedRowCount;return t&&r?n.createElement(sR,F({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:r,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,r=e.enableFixedRowScroll,o=e.fixedColumnCount,i=e.fixedRowCount,a=e.scrollLeft,l=e.hideTopRightGridScrollbar,s=this.state,c=s.showHorizontalScrollbar,u=s.scrollbarSize;if(!i)return null;var d=c?1:0,p=this._getTopGridHeight(e),h=this._getRightGridWidth(e),f=c?u:0,g=p,m=this._topRightGridStyle;l&&(g=p+f,m=uI({},this._topRightGridStyle,{left:0}));var y=n.createElement(sR,F({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-o)+d,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:g,onScroll:r?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:a,style:m,tabIndex:null,width:h}));return l?n.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:uI({},this._topRightGridStyle,{height:p,width:h,overflowX:"hidden"})},y):y}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(n.PureComponent);Oe(dI,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),dI.propTypes={},$o(dI);var pI=function(e){function t(e,n){var r;return yg(this,t),(r=wg(this,Sg(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(U(r)),r}return xg(t,e),bg(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,o=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,l=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:o,scrollLeft:i,scrollTop:a,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,o=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:o,scrollTop:i,scrollWidth:a})}}]),t}(n.PureComponent);function hI(e){var t=e.className,r=e.columns,o=e.style;return n.createElement("div",{className:t,role:"row",style:o},r)}pI.propTypes={},hI.propTypes=null;const fI="ASC",gI="DESC";function mI(e){var t=e.sortDirection,r=P("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===fI,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===gI});return n.createElement("svg",{className:r,width:18,height:18,viewBox:"0 0 24 24"},t===fI?n.createElement("path",{d:"M7 14l5-5 5 5z"}):n.createElement("path",{d:"M7 10l5 5 5-5z"}),n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function yI(e){var t=e.dataKey,r=e.label,o=e.sortBy,i=e.sortDirection,a=o===t,l=[n.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof r?r:null},r)];return a&&l.push(n.createElement(mI,{key:"SortIndicator",sortDirection:i})),l}function vI(e){var t=e.className,r=e.columns,o=e.index,i=e.key,a=e.onRowClick,l=e.onRowDoubleClick,s=e.onRowMouseOut,c=e.onRowMouseOver,u=e.onRowRightClick,d=e.rowData,p=e.style,h={"aria-rowindex":o+1};return(a||l||s||c||u)&&(h["aria-label"]="row",h.tabIndex=0,a&&(h.onClick=function(e){return a({event:e,index:o,rowData:d})}),l&&(h.onDoubleClick=function(e){return l({event:e,index:o,rowData:d})}),s&&(h.onMouseOut=function(e){return s({event:e,index:o,rowData:d})}),c&&(h.onMouseOver=function(e){return c({event:e,index:o,rowData:d})}),u&&(h.onContextMenu=function(e){return u({event:e,index:o,rowData:d})})),n.createElement("div",F({},h,{className:t,key:i,role:"row",style:p}),r)}mI.propTypes={},yI.propTypes=null,vI.propTypes=null;var bI=function(e){function t(){return yg(this,t),wg(this,Sg(t).apply(this,arguments))}return xg(t,e),t}(n.Component);function xI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xI(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xI(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Oe(bI,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"==typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:fI,flexGrow:0,flexShrink:1,headerRenderer:yI,style:{}}),bI.propTypes={};var SI=function(e){function t(e){var n;return yg(this,t),(n=wg(this,Sg(t).call(this,e))).state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(U(n)),n._createRow=n._createRow.bind(U(n)),n._onScroll=n._onScroll.bind(U(n)),n._onSectionRendered=n._onSectionRendered.bind(U(n)),n._setRef=n._setRef.bind(U(n)),n}return xg(t,e),bg(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=(0,ee.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,r=t.children,o=t.className,i=t.disableHeader,a=t.gridClassName,l=t.gridStyle,s=t.headerHeight,c=t.headerRowRenderer,u=t.height,d=t.id,p=t.noRowsRenderer,h=t.rowClassName,f=t.rowStyle,g=t.scrollToIndex,m=t.style,y=t.width,v=this.state.scrollbarWidth,b=i?u:u-s,x="function"==typeof h?h({index:-1}):h,w="function"==typeof f?f({index:-1}):f;return this._cachedColumnStyles=[],n.Children.toArray(r).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=wI({overflow:"hidden"},r)})),n.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":n.Children.toArray(r).length,"aria-rowcount":this.props.rowCount,className:P("ReactVirtualized__Table",o),id:d,role:"grid",style:m},!i&&c({className:P("ReactVirtualized__Table__headerRow",x),columns:this._getHeaderColumns(),style:wI({height:s,overflow:"hidden",paddingRight:v,width:y},w)}),n.createElement(sR,F({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:P("ReactVirtualized__Table__Grid",a),cellRenderer:this._createRow,columnWidth:y,columnCount:1,height:b,id:void 0,noContentRenderer:p,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:v,scrollToRow:g,style:wI({},l,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,r=e.columnIndex,o=e.isScrolling,i=e.parent,a=e.rowData,l=e.rowIndex,s=this.props.onColumnClick,c=t.props,u=c.cellDataGetter,d=c.cellRenderer,p=c.className,h=c.columnData,f=c.dataKey,g=c.id,m=d({cellData:u({columnData:h,dataKey:f,rowData:a}),columnData:h,columnIndex:r,dataKey:f,isScrolling:o,parent:i,rowData:a,rowIndex:l}),y=this._cachedColumnStyles[r],v="string"==typeof m?m:null;return n.createElement("div",{"aria-colindex":r+1,"aria-describedby":g,className:P("ReactVirtualized__Table__rowColumn",p),key:"Row"+l+"-Col"+r,onClick:function(e){s&&s({columnData:h,dataKey:f,event:e})},role:"gridcell",style:y,title:v},m)}},{key:"_createHeader",value:function(e){var t,r,o,i,a,l=e.column,s=e.index,c=this.props,u=c.headerClassName,d=c.headerStyle,p=c.onHeaderClick,h=c.sort,f=c.sortBy,g=c.sortDirection,m=l.props,y=m.columnData,v=m.dataKey,b=m.defaultSortDirection,x=m.disableSort,w=m.headerRenderer,S=m.id,E=m.label,O=!x&&h,C=P("ReactVirtualized__Table__headerColumn",u,l.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:O}),_=this._getFlexStyleForColumn(l,wI({},d,{},l.props.headerStyle)),k=w({columnData:y,dataKey:v,disableSort:x,label:E,sortBy:f,sortDirection:g});if(O||p){var T=f!==v?b:g===gI?fI:gI,M=function(e){O&&h({defaultSortDirection:b,event:e,sortBy:v,sortDirection:T}),p&&p({columnData:y,dataKey:v,event:e})};a=l.props["aria-label"]||E||v,i="none",o=0,t=M,r=function(e){"Enter"!==e.key&&" "!==e.key||M(e)}}return f===v&&(i=g===fI?"ascending":"descending"),n.createElement("div",{"aria-label":a,"aria-sort":i,className:C,id:S,key:"Header-Col"+s,onClick:t,onKeyDown:r,role:"columnheader",style:_,tabIndex:o},k)}},{key:"_createRow",value:function(e){var t=this,r=e.rowIndex,o=e.isScrolling,i=e.key,a=e.parent,l=e.style,s=this.props,c=s.children,u=s.onRowClick,d=s.onRowDoubleClick,p=s.onRowRightClick,h=s.onRowMouseOver,f=s.onRowMouseOut,g=s.rowClassName,m=s.rowGetter,y=s.rowRenderer,v=s.rowStyle,b=this.state.scrollbarWidth,x="function"==typeof g?g({index:r}):g,w="function"==typeof v?v({index:r}):v,S=m({index:r}),E=n.Children.toArray(c).map((function(e,n){return t._createColumn({column:e,columnIndex:n,isScrolling:o,parent:a,rowData:S,rowIndex:r,scrollbarWidth:b})})),O=P("ReactVirtualized__Table__row",x),C=wI({},l,{height:this._getRowHeight(r),overflow:"hidden",paddingRight:b},w);return y({className:O,columns:E,index:r,isScrolling:o,key:i,onRowClick:u,onRowDoubleClick:d,onRowRightClick:p,onRowMouseOver:h,onRowMouseOut:f,rowData:S,style:C})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=wI({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,r=t.children;return(t.disableHeader?[]:n.Children.toArray(r)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,o=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:o})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(n.PureComponent);Oe(SI,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:cR,overscanRowCount:10,rowRenderer:vI,headerRowRenderer:hI,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),SI.propTypes={};var EI=[],OI=null,CI=null;function _I(){CI&&(CI=null,document.body&&null!=OI&&(document.body.style.pointerEvents=OI),OI=null)}function kI(){_I(),EI.forEach((function(e){return e.__resetIsScrolling()}))}function TI(e){e.currentTarget===window&&null==OI&&document.body&&(OI=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){CI&&nR(CI);var e=0;EI.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),CI=rR(kI,e)}(),EI.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function PI(e,t){EI.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",TI),EI.push(e)}function MI(e,t){(EI=EI.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",TI),CI&&(nR(CI),_I()))}var RI,II,DI=function(e){return e===window},AI=function(e){return e.getBoundingClientRect()};function LI(e,t){if(e){if(DI(e)){var n=window,r=n.innerHeight,o=n.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof o?o:0}}return AI(e)}return{height:t.serverHeight,width:t.serverWidth}}function NI(e,t){if(DI(t)&&document.documentElement){var n=document.documentElement,r=AI(e),o=AI(n);return{top:r.top-o.top,left:r.left-o.left}}var i=jI(t),a=AI(e),l=AI(t);return{top:a.top+i.top-l.top,left:a.left+i.left-l.left}}function jI(e){return DI(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function zI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zI(n,!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zI(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var BI=function(){return"undefined"!=typeof window?window:void 0},WI=(II=RI=function(e){function t(){var e,n;yg(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Oe(U(n=wg(this,(e=Sg(t)).call.apply(e,[this].concat(o)))),"_window",BI()),Oe(U(n),"_isMounted",!1),Oe(U(n),"_positionFromTop",0),Oe(U(n),"_positionFromLeft",0),Oe(U(n),"_detectElementResize",void 0),Oe(U(n),"_child",void 0),Oe(U(n),"state",FI({},LI(n.props.scrollElement,n.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),Oe(U(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),n._child=e,n.updatePosition()})),Oe(U(n),"_onChildScroll",(function(e){var t=e.scrollTop;if(n.state.scrollTop!==t){var r=n.props.scrollElement;r&&("function"==typeof r.scrollTo?r.scrollTo(0,t+n._positionFromTop):r.scrollTop=t+n._positionFromTop)}})),Oe(U(n),"_registerResizeListener",(function(e){e===window?window.addEventListener("resize",n._onResize,!1):n._detectElementResize.addResizeListener(e,n._onResize)})),Oe(U(n),"_unregisterResizeListener",(function(e){e===window?window.removeEventListener("resize",n._onResize,!1):e&&n._detectElementResize.removeResizeListener(e,n._onResize)})),Oe(U(n),"_onResize",(function(){n.updatePosition()})),Oe(U(n),"__handleWindowScrollEvent",(function(){if(n._isMounted){var e=n.props.onScroll,t=n.props.scrollElement;if(t){var r=jI(t),o=Math.max(0,r.left-n._positionFromLeft),i=Math.max(0,r.top-n._positionFromTop);n.setState({isScrolling:!0,scrollLeft:o,scrollTop:i}),e({scrollLeft:o,scrollTop:i})}}})),Oe(U(n),"__resetIsScrolling",(function(){n.setState({isScrolling:!1})})),n}return xg(t,e),bg(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,o=n.width,i=this._child||ee.findDOMNode(this);if(i instanceof Element&&e){var a=NI(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=LI(e,this.props);r===l.height&&o===l.width||(this.setState({height:l.height,width:l.width}),t({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=mR(),this.updatePosition(e),e&&(PI(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),MI(this,r),PI(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(MI(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,o=t.scrollLeft,i=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:o,scrollTop:r,width:a})}}]),t}(n.PureComponent),Oe(RI,"propTypes",null),II);Oe(WI,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:BI(),serverHeight:0,serverWidth:0});const UI=(0,i.makeStyles)((()=>({container:{display:"flex",flexDirection:"column",height:"100%"},root:{minHeight:"28px",display:"flex",padding:"0 18px","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"},wordBreak:"break-all"},tree:{flexGrow:1,height:0}})));function HI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){VI(e,t,n[t])}))}return e}function VI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GI(e){let{targetIndex:t,node:n,currentIndex:r,getNodeKey:o,path:i=[],lowerSiblingCounts:a=[],ignoreCollapsed:l=!0,isPseudoRoot:s=!1}=e;const c=s?[]:[...i,o({node:n,treeIndex:r})];if(r===t)return{node:n,lowerSiblingCounts:a,path:c};if(!n.children||l&&!0!==n.expanded)return{nextIndex:r+1};let u=r+1;const d=n.children.length;for(let e=0;e<d;e+=1){const r=GI({ignoreCollapsed:l,getNodeKey:o,targetIndex:t,node:n.children[e],currentIndex:u,lowerSiblingCounts:[...a,d-e-1],path:c});if(r.node)return r;u=r.nextIndex}return{nextIndex:u}}function qI(e){let{node:t,ignoreCollapsed:n=!0}=e;return GI({getNodeKey:()=>{},ignoreCollapsed:n,node:t,currentIndex:0,targetIndex:-1}).nextIndex-1}function YI(e){let{callback:t,getNodeKey:n,ignoreCollapsed:r,isPseudoRoot:o=!1,node:i,parentNode:a=null,currentIndex:l,path:s=[],lowerSiblingCounts:c=[]}=e;const u=o?[]:[...s,n({node:i,treeIndex:l})];if(!o&&!1===t(o?null:{node:i,parentNode:a,path:u,lowerSiblingCounts:c,treeIndex:l}))return!1;if(!i.children||!0!==i.expanded&&r&&!o)return l;let d=l;const p=i.children.length;if("function"!=typeof i.children)for(let e=0;e<p;e+=1)if(d=YI({callback:t,getNodeKey:n,ignoreCollapsed:r,node:i.children[e],parentNode:o?null:i,currentIndex:d+1,lowerSiblingCounts:[...c,p-e-1],path:u}),!1===d)return!1;return d}function KI(e){let{callback:t,getNodeKey:n,ignoreCollapsed:r,isPseudoRoot:o=!1,node:i,parentNode:a=null,currentIndex:l,path:s=[],lowerSiblingCounts:c=[]}=e;const u=HI({},i),d=o?[]:[...s,n({node:u,treeIndex:l})],p={node:u,parentNode:a,path:d,lowerSiblingCounts:c,treeIndex:l};if(!u.children||!0!==u.expanded&&r&&!o)return{treeIndex:l,node:t(p)};let h=l;const f=u.children.length;return"function"!=typeof u.children&&(u.children=u.children.map(((e,i)=>{const a=KI({callback:t,getNodeKey:n,ignoreCollapsed:r,node:e,parentNode:o?null:u,currentIndex:h+1,lowerSiblingCounts:[...c,f-i-1],path:d});return h=a.treeIndex,a.node}))),{node:t(p),treeIndex:h}}function $I(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:o=!0}=e;!t||t.length<1||YI({callback:r,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function ZI(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:o=!0}=e;return!t||t.length<1?[]:KI({callback:r,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function XI(e){let{treeData:t,expanded:n=!0}=e;return ZI({treeData:t,callback:e=>{let{node:t}=e;return HI({},t,{expanded:n})},getNodeKey:e=>{let{treeIndex:t}=e;return t},ignoreCollapsed:!1})}function QI(e){let{treeData:t,path:n,newNode:r,getNodeKey:o,ignoreCollapsed:i=!0}=e;const a="RESULT_MISS",l=e=>{let{isPseudoRoot:t=!1,node:s,currentTreeIndex:c,pathIndex:u}=e;if(!t&&o({node:s,treeIndex:c})!==n[u])return a;if(u>=n.length-1)return"function"==typeof r?r({node:s,treeIndex:c}):r;if(!s.children)throw new Error("Path referenced children of node with no children.");let d=c+1;for(let e=0;e<s.children.length;e+=1){const t=l({node:s.children[e],currentTreeIndex:d,pathIndex:u+1});if(t!==a)return HI({},s,t?{children:[...s.children.slice(0,e),t,...s.children.slice(e+1)]}:{children:[...s.children.slice(0,e),...s.children.slice(e+1)]});d+=1+qI({node:s.children[e],ignoreCollapsed:i})}return a},s=l({node:{children:t},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(s===a)throw new Error("No node found at the given path.");return s.children}function JI(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o=!0}=e,i=null,a=null;const l=QI({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o,newNode:e=>{let{node:t,treeIndex:n}=e;return i=t,a=n,null}});return{treeData:l,node:i,treeIndex:a}}function eD(e){let{targetDepth:t,minimumTreeIndex:n,newNode:r,ignoreCollapsed:o,expandParent:i,isPseudoRoot:a=!1,isLastChild:l,node:s,currentIndex:c,currentDepth:u,getNodeKey:d,path:p=[]}=e;const h=e=>a?[]:[...p,d({node:e,treeIndex:c})];if(c>=n-1||l&&(!s.children||!s.children.length)){if("function"==typeof s.children)throw new Error("Cannot add to children defined by a function");{const e=HI({},s,i?{expanded:!0}:{},{children:s.children?[r,...s.children]:[r]});return{node:e,nextIndex:c+2,insertedTreeIndex:c+1,parentPath:h(e),parentNode:a?null:e}}}if(u>=t-1){if(!s.children||"function"==typeof s.children||!0!==s.expanded&&o&&!a)return{node:s,nextIndex:c+1};let e=c+1,t=null,i=null;for(let r=0;r<s.children.length;r+=1){if(e>=n){t=e,i=r;break}e+=1+qI({node:s.children[r],ignoreCollapsed:o})}if(null===i){if(e<n&&!l)return{node:s,nextIndex:e};t=e,i=s.children.length}const u=HI({},s,{children:[...s.children.slice(0,i),r,...s.children.slice(i)]});return{node:u,nextIndex:e,insertedTreeIndex:t,parentPath:h(u),parentNode:a?null:u}}if(!s.children||"function"==typeof s.children||!0!==s.expanded&&o&&!a)return{node:s,nextIndex:c+1};let f=null,g=null,m=null,y=c+1,v=s.children;"function"!=typeof v&&(v=v.map(((e,a)=>{if(null!==f)return e;const s=eD({targetDepth:t,minimumTreeIndex:n,newNode:r,ignoreCollapsed:o,expandParent:i,isLastChild:l&&a===v.length-1,node:e,currentIndex:y,currentDepth:u+1,getNodeKey:d,path:[]});return"insertedTreeIndex"in s&&({insertedTreeIndex:f,parentNode:m,parentPath:g}=s),y=s.nextIndex,s.node})));const b=HI({},s,{children:v}),x={node:b,nextIndex:y};return null!==f&&(x.insertedTreeIndex=f,x.parentPath=[...h(b),...g],x.parentNode=m),x}function tD(e){let{treeData:t,depth:n,minimumTreeIndex:r,newNode:o,getNodeKey:i=(()=>{}),ignoreCollapsed:a=!0,expandParent:l=!1}=e;if(!t&&0===n)return{treeData:[o],treeIndex:0,path:[i({node:o,treeIndex:0})],parentNode:null};const s=eD({targetDepth:n,minimumTreeIndex:r,newNode:o,ignoreCollapsed:a,expandParent:l,getNodeKey:i,isPseudoRoot:!0,isLastChild:!0,node:{children:t},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in s))throw new Error("No suitable position found to insert.");const c=s.insertedTreeIndex;return{treeData:s.node.children,treeIndex:c,path:[...s.parentPath,i({node:o,treeIndex:c})],parentNode:s.parentNode}}function nD(e){let{treeData:t,getNodeKey:n,ignoreCollapsed:r=!0}=e;if(!t||t.length<1)return[];const o=[];return $I({treeData:t,getNodeKey:n,ignoreCollapsed:r,callback:e=>{o.push(e)}}),o}function rD(e,t){return!!e.children&&"function"!=typeof e.children&&e.children.some((e=>e===t||rD(e,t)))}function oD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.children?"function"==typeof e.children?t+1:e.children.reduce(((e,n)=>Math.max(e,oD(n,t+1))),t):t}function iD(e){let{getNodeKey:t,treeData:n,searchQuery:r,searchMethod:o,searchFocusOffset:i,expandAllMatchPaths:a=!1,expandFocusMatchPaths:l=!0}=e,s=0;const c=e=>{let{isPseudoRoot:n=!1,node:u,currentIndex:d,path:p=[]}=e,h=[],f=!1,g=!1;const m=n?[]:[...p,t({node:u,treeIndex:d})],y=n?null:{path:m,treeIndex:d},v=u.children&&"function"!=typeof u.children&&u.children.length>0;!n&&o(HI({},y,{node:u,searchQuery:r}))&&(s===i&&(g=!0),s+=1,f=!0);let b=d;const x=HI({},u);return v&&(x.children=x.children.map((e=>{const t=c({node:e,currentIndex:b+1,path:m});return t.node.expanded?b=t.treeIndex:b+=1,(t.matches.length>0||t.hasFocusMatch)&&(h=[...h,...t.matches],t.hasFocusMatch&&(g=!0),(a&&t.matches.length>0||(a||l)&&t.hasFocusMatch)&&(x.expanded=!0)),t.node}))),n||x.expanded||(h=h.map((e=>HI({},e,{treeIndex:null})))),f&&(h=[HI({},y,{node:x}),...h]),{node:h.length>0?x:u,matches:h,hasFocusMatch:g,treeIndex:b}},u=c({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:u.matches,treeData:u.node.children}}const aD={find:iD,getDepth:oD,isDescendant:rD,getTreeFromFlatData:function(e){let{flatData:t,getKey:n=(e=>e.id),getParentKey:r=(e=>e.parentId),rootKey:o="0"}=e;if(!t)return[];const i={};if(t.forEach((e=>{const t=r(e);t in i?i[t].push(e):i[t]=[e]})),!(o in i))return[];const a=e=>{const t=n(e);return t in i?HI({},e,{children:i[t].map((e=>a(e)))}):HI({},e)};return i[o].map((e=>a(e)))},getFlatDataFromTree:nD,insertNode:tD,addNodeUnderParent:function(e){let{treeData:t,newNode:n,parentKey:r=null,getNodeKey:o,ignoreCollapsed:i=!0,expandParent:a=!1,addAsFirstChild:l=!1}=e;if(null===r)return l?{treeData:[n,...t||[]],treeIndex:0}:{treeData:[...t||[],n],treeIndex:(t||[]).length};let s=null,c=!1;const u=ZI({treeData:t,getNodeKey:o,ignoreCollapsed:i,callback:e=>{let{node:t,treeIndex:o,path:u}=e;const d=u?u[u.length-1]:null;if(c||d!==r)return t;c=!0;const p=HI({},t);if(a&&(p.expanded=!0),!p.children)return s=o+1,HI({},p,{children:[n]});if("function"==typeof p.children)throw new Error("Cannot add to children defined by a function");let h=o+1;for(let e=0;e<p.children.length;e+=1)h+=1+qI({node:p.children[e],ignoreCollapsed:i});return s=h,HI({},p,{children:l?[n,...p.children]:[...p.children,n]})}});if(!c)throw new Error("No node found with the given key.");return{treeData:u,treeIndex:s}},getNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o=!0}=e,i=null;try{QI({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o,newNode:e=>{let{node:t,treeIndex:n}=e;return i={node:t,treeIndex:n},t}})}catch(e){}return i},removeNode:JI,removeNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o=!0}=e;return QI({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:o,newNode:null})},changeNodeAtPath:QI,toggleExpandedForAll:XI,map:ZI,walk:$I,getVisibleNodeInfoAtIndex:function(e){let{treeData:t,index:n,getNodeKey:r}=e;if(!t||t.length<1)return null;const o=GI({targetIndex:n,getNodeKey:r,node:{children:t,expanded:!0},currentIndex:-1,path:[],lowerSiblingCounts:[],isPseudoRoot:!0});return o.node?o:null},getVisibleNodeCount:function(e){let{treeData:t}=e;const n=e=>e.children&&!0===e.expanded&&"function"!=typeof e.children?1+e.children.reduce(((e,t)=>e+n(t)),0):1;return t.reduce(((e,t)=>e+n(t)),0)},getDescendantCount:qI};var lD=h(7121);function sD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}const cD=(0,i.makeStyles)((()=>({"@global .rst__node":{minWidth:"100%",whiteSpace:"nowrap",position:"relative",textAlign:"left"},"@global .rst__node.rst__rtl":{textAlign:"right"},"@global .rst__nodeContent":{position:"absolute",top:0,bottom:0},"@global .rst__lineBlock, .rst__absoluteLineBlock":{height:"100%",position:"relative",display:"inline-block"},"@global .rst__absoluteLineBlock":{position:"absolute",top:0},"@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{position:"absolute",content:"",backgroundColor:"black"},"@global .rst__lineHalfHorizontalRight::before":{height:"1px",top:"50%",right:0,width:"50%"},"@global .rst__rtl.rst__lineHalfHorizontalRight::before":{left:0,right:"initial"},"@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{width:"1px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after":{right:"50%",left:"initial"},"@global .rst__lineHalfVerticalTop::after":{height:"50%"},"@global .rst__lineHalfVerticalBottom::after":{top:"auto",bottom:0,height:"50%"},"@global .rst__highlightLineVertical":{zIndex:3},"@global .rst__highlightLineVertical::before":{position:"absolute",content:"",backgroundColor:"#36c2f6",width:"8px",marginLeft:"-4px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__highlightLineVertical::before":{marginLeft:"initial",marginRight:"-4px",left:"initial",right:"50%"},"@keyframes arrow-pulse":{"0%":{transform:"translate(0, 0)",opacity:0},"30%":{transform:"translate(0, 300%)",opacity:1},"70%":{transform:"translate(0, 700%)",opacity:1},"100%":{transform:"translate(0, 1000%)",opacity:0}},"@global .rst__highlightLineVertical::after":{content:"",position:"absolute",height:0,marginLeft:"-4px",left:"50%",top:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid white",animation:"arrow-pulse 1s infinite linear both"},"@global .rst__rtl.rst__highlightLineVertical::after":{marginLeft:"initial",marginRight:"-4px",right:"50%",left:"initial"},"@global .rst__highlightTopLeftCorner::before":{zIndex:3,content:"",position:"absolute",borderTop:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(50% + 4px)",top:"50%",marginTop:"-4px",right:0,width:"calc(50% + 4px)"},"@global .rst__rtl.rst__highlightTopLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:0,right:"initial"},"@global .rst__highlightBottomLeftCorner":{zIndex:3},"@global .rst__highlightBottomLeftCorner::before":{content:"",position:"absolute",borderBottom:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(100% + 4px)",top:0,right:"12px",width:"calc(50% - 8px)"},"@global .rst__rtl.rst__highlightBottomLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:"12px",right:"initial"},"@global .rst__highlightBottomLeftCorner::after":{content:"",position:"absolute",height:0,right:0,top:"100%",marginTop:"-12px",borderTop:"12px solid transparent",borderBottom:"12px solid transparent",borderLeft:"12px solid #36c2f6"},"@global .rst__rtl.rst__highlightBottomLeftCorner::after":{left:0,right:"initial",borderRight:"12px solid #36c2f6",borderLeft:"none"}})));function uD(){return uD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uD.apply(this,arguments)}const dD=e=>{let{children:t,listIndex:o,swapFrom:i,swapLength:a,swapDepth:l,scaffoldBlockPxWidth:s,lowerSiblingCounts:c,connectDropTarget:u,isOver:d,draggedNode:p,canDrop:h,treeIndex:f,treeId:g,getPrevRow:m,node:y,path:v,rowDirection:b}=e,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]);cD();const w="rtl"===b?"rst__rtl":null,S=c.length,E=[];let O;return c.forEach(((e,t)=>{let n="";if(e>0?n=0===o?"rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":t===S-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":0===o?n="rst__lineHalfHorizontalRight":t===S-1&&(n="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),E.push(r().createElement("div",{key:`pre_${1+t}`,style:{width:s},className:sD("rst__lineBlock",n,w)})),f!==o&&t===l){let e,n="";n=o===i+a-1?"rst__highlightBottomLeftCorner":f===i?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",e="rtl"===b?{width:s,right:s*t}:{width:s,left:s*t},E.push(r().createElement("div",{key:t,style:e,className:sD("rst__absoluteLineBlock",n,w)}))}})),O="rtl"===b?{right:s*S}:{left:s*S},u(r().createElement("div",uD({},x,{className:sD("rst__node",w)}),E,r().createElement("div",{className:"rst__nodeContent",style:O},n.Children.map(t,(e=>(0,n.cloneElement)(e,{isOver:d,canDrop:h,draggedNode:p}))))))};dD.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},dD.propTypes={treeIndex:l().number.isRequired,treeId:l().string.isRequired,swapFrom:l().number,swapDepth:l().number,swapLength:l().number,scaffoldBlockPxWidth:l().number.isRequired,lowerSiblingCounts:l().arrayOf(l().number).isRequired,listIndex:l().number.isRequired,children:l().node.isRequired,connectDropTarget:l().func.isRequired,isOver:l().bool.isRequired,canDrop:l().bool,draggedNode:l().shape({}),getPrevRow:l().func.isRequired,node:l().shape({}).isRequired,path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,rowDirection:l().string};const pD=dD;function hD(){return hD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hD.apply(this,arguments)}function fD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gD(e,t,n[t])}))}return e}function gD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mD=e=>{let{scaffoldBlockPxWidth:t,toggleChildrenVisibility:n,connectDragPreview:o,connectDragSource:i,isDragging:a,canDrop:l,canDrag:s,node:c,title:u,subtitle:d,draggedNode:p,path:h,treeIndex:f,isSearchMatch:g,isSearchFocus:m,buttons:y,className:v,style:b,didDrop:x,treeId:w,isOver:S,parentNode:E,rowDirection:O}=e,C=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]);const _=u||c.title,k=d||c.subtitle,T="rtl"===O?"rst__rtl":null;let P;s&&(P="function"==typeof c.children&&c.expanded?r().createElement("div",{className:"rst__loadingHandle"},r().createElement("div",{className:"rst__loadingCircle"},[...new Array(12)].map(((e,t)=>r().createElement("div",{key:t,className:sD("rst__loadingCirclePoint",T)}))))):i(r().createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));const M=p&&rD(p,c),R=!x&&a;let I={left:-.5*t};return"rtl"===O&&(I={right:-.5*t}),r().createElement("div",hD({style:{height:"100%"}},C),n&&c.children&&(c.children.length>0||"function"==typeof c.children)&&r().createElement("div",null,r().createElement("button",{type:"button","aria-label":c.expanded?"Collapse":"Expand",className:sD(c.expanded?"rst__collapseButton":"rst__expandButton",T),style:I,onClick:()=>n({node:c,path:h,treeIndex:f})}),c.expanded&&!a&&r().createElement("div",{style:{width:t},className:sD("rst__lineChildren",T)})),r().createElement("div",{className:sD("rst__rowWrapper",T)},o(r().createElement("div",{className:sD("rst__row",R&&"rst__rowLandingPad",R&&!l&&"rst__rowCancelPad",g&&"rst__rowSearchMatch",m&&"rst__rowSearchFocus",T,v),style:fD({opacity:M?.5:1},b)},P,r().createElement("div",{className:sD("rst__rowContents",!s&&"rst__rowContentsDragDisabled",T)},r().createElement("div",{className:sD("rst__rowLabel",T)},r().createElement("span",{className:sD("rst__rowTitle",c.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof _?_({node:c,path:h,treeIndex:f}):_),k&&r().createElement("span",{className:"rst__rowSubtitle"},"function"==typeof k?k({node:c,path:h,treeIndex:f}):k)),r().createElement("div",{className:"rst__rowToolbar"},y.map(((e,t)=>r().createElement("div",{key:t,className:"rst__toolbarButton"},e)))))))))};mD.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},mD.propTypes={node:l().shape({}).isRequired,title:l().oneOfType([l().func,l().node]),subtitle:l().oneOfType([l().func,l().node]),path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,treeIndex:l().number.isRequired,treeId:l().string.isRequired,isSearchMatch:l().bool,isSearchFocus:l().bool,canDrag:l().bool,scaffoldBlockPxWidth:l().number.isRequired,toggleChildrenVisibility:l().func,buttons:l().arrayOf(l().node),className:l().string,style:l().shape({}),connectDragPreview:l().func.isRequired,connectDragSource:l().func.isRequired,parentNode:l().shape({}),isDragging:l().bool.isRequired,didDrop:l().bool.isRequired,draggedNode:l().shape({}),isOver:l().bool.isRequired,canDrop:l().bool,rowDirection:l().string};const yD=mD;function vD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class bD extends n.Component{render(){const e=this.props,{children:t,connectDropTarget:o,treeId:i,drop:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","connectDropTarget","treeId","drop"]);return o(r().createElement("div",null,n.Children.map(t,(e=>(0,n.cloneElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vD(e,t,n[t])}))}return e}({},l))))))}}bD.defaultProps={canDrop:!1,draggedNode:null},bD.propTypes={children:l().node.isRequired,connectDropTarget:l().func.isRequired,isOver:l().bool.isRequired,canDrop:l().bool,draggedNode:l().shape({}),treeId:l().string.isRequired,drop:l().func.isRequired};const xD=bD,wD=(0,i.makeStyles)((()=>({"@global .rst__placeholder":{position:"relative",height:"68px",maxWidth:"300px",padding:"10px"},"@global .rst__placeholder, .rst__placeholder > *":{boxSizing:"border-box"},"@global .rst__placeholder::before":{border:"3px dashed #d9d9d9",content:"",position:"absolute",top:"5px",right:"5px",bottom:"5px",left:"5px",zIndex:-1},"@global .rst__placeholderLandingPad, .rst__placeholderCancelPad":{border:"none !important",boxShadow:"none !important",outline:"none !important"},"@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *":{opacity:"0 !important"},"@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before":{backgroundColor:"lightblue",borderColor:"white"},"@global .rst__placeholderCancelPad::before":{backgroundColor:"#e6a8ad"}}))),SD=e=>{let{isOver:t,canDrop:n}=e;return wD(),r().createElement("div",{className:sD("rst__placeholder",n&&"rst__placeholderLandingPad",n&&!t&&"rst__placeholderCancelPad")})};SD.defaultProps={isOver:!1,canDrop:!1},SD.propTypes={isOver:l().bool,canDrop:l().bool};const ED=SD,OD=e=>{let t=[],n=[],r=null;return o=>{const i=Object.keys(o).sort(),a=i.map((e=>o[e]));return(a.length!==t.length||a.some(((e,n)=>e!==t[n]))||i.some(((e,t)=>e!==n[t])))&&(t=a,n=i,r=e(o)),r}},CD=OD(tD),_D=OD(nD),kD=OD(qI);function TD(e){return"string"==typeof e?e:null===e||"object"!=typeof e||!e.props||!e.props.children||"string"!=typeof e.props.children&&"object"!=typeof e.props.children?"":"string"==typeof e.props.children?e.props.children:e.props.children.map((e=>TD(e))).join("")}function PD(e,t,n,r,o){return"function"==typeof n[e]?String(n[e]({node:n,path:r,treeIndex:o})).indexOf(t)>-1:"object"==typeof n[e]?TD(n[e]).indexOf(t)>-1:n[e]&&String(n[e]).indexOf(t)>-1}function MD(e){let{node:t,path:n,treeIndex:r,searchQuery:o}=e;return PD("title",o,t,n,r)||PD("subtitle",o,t,n,r)}class RD{constructor(e){this.hoverHandler=()=>{if(null===this.hoverProps)return;const{dropTargetProps:e,monitor:t,component:n}=this.hoverProps,r=t.getItem();if(!r)return;const o=this.getTargetDepth(e,t,n),i=r.node;(e.node!==this.lastDropTargetNode||o!==this.lastDropTargetDepth)&&(this.lastDropTargetNode=e.node,this.lastDropTargetDepth=o,this.dragHover({node:i,path:r.path,minimumTreeIndex:e.listIndex,depth:o}),this.hoverProps=null)},this.deferredCallHoverHandler=()=>{if(this.shouldSkipMoreFrames)return this.shouldSkipMoreFrames=!1,void(this.rafId=requestAnimationFrame(this.deferredCallHoverHandler));this.rafId=null,this.hoverHandler()},this.treeRef=e,this.resetDragVariables()}get startDrag(){return this.treeRef.startDrag}get dragHover(){return this.treeRef.dragHover}get endDrag(){return this.treeRef.endDrag}get drop(){return this.treeRef.drop}get treeId(){return this.treeRef.treeId}get dndType(){return this.treeRef.dndType}get treeData(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}get getNodeKey(){return this.treeRef.props.getNodeKey}get customCanDrop(){return this.treeRef.props.canDrop}get maxDepth(){return this.treeRef.props.maxDepth}resetDragVariables(){this.lastDropTargetNode=null,this.lastDropTargetDepth=null,this.hoverProps=null,this.lastCanDropResult=null,this.lastCanDropProps=null,this.shouldSkipMoreFrames=!1,this.rafId=null}getTargetDepth(e,t,n){let r=0;const o=e.getPrevRow();if(o){let{path:t}=o;!this.treeRef.canNodeHaveChildren(o.node)&&(t=t.slice(0,t.length-1)),r=Math.min(t.length,e.path.length)}let i,a=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(a=0,n){const r=(0,ee.findDOMNode)(n).getBoundingClientRect(),o=t.getSourceClientOffset().x-r.left;i=Math.round(o/e.scaffoldBlockPxWidth)}else i=e.path.length;else{const n="rtl"===e.rowDirection?-1:1;i=Math.round(n*t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth)}let l=Math.min(r,Math.max(0,a+i-1));if(void 0!==this.maxDepth&&null!==this.maxDepth){const e=oD(t.getItem().node);l=Math.max(0,Math.min(l,this.maxDepth-e-1))}return l}canDrop(e,t){if(!t.isOver())return!1;const n=e.getPrevRow(),r=n?n.path:[],o=n?n.node:{},i=Math.round(t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth),a={nodeId:void 0!==e.node.nodeId?e.node.nodeId:e.node,rowAbove:n,abovePath:r,aboveNodeId:void 0!==o.nodeId?o.nodeId:o,blocksOffset:i};if((0,u.equals)(this.lastCanDropProps,a))return this.lastCanDropResult;this.lastCanDropProps=a;const l=this.getTargetDepth(e,t,null);if(l>=r.length&&"function"==typeof o.children)return this.lastCanDropResult=!1;if("function"==typeof this.customCanDrop){const{node:n}=t.getItem(),r=CD({treeData:this.treeData,newNode:n,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:e.listIndex,expandParent:!0});return this.lastCanDropResult=this.customCanDrop({node:n,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:r.path,nextParent:r.parentNode,nextTreeIndex:r.treeIndex})}return this.lastCanDropResult=!0}wrapSource(e){const t={beginDrag:e=>(this.startDrag(e),{node:e.node,parentNode:e.parentNode,path:e.path,treeIndex:e.treeIndex,treeId:e.treeId}),endDrag:(e,t)=>{this.rafId&&cancelAnimationFrame(this.rafId),this.endDrag(t.getDropResult()),this.resetDragVariables()},isDragging:(e,t)=>{const n=t.getItem().node;return e.node===n}};return(0,TS.DragSource)(this.dndType,t,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),didDrop:t.didDrop()}}))(e)}wrapTarget(e){const t={drop:(e,t,n)=>{this.rafId&&cancelAnimationFrame(this.rafId);const r={node:t.getItem().node,path:t.getItem().path,treeIndex:t.getItem().treeIndex,treeId:this.treeId,minimumTreeIndex:e.treeIndex,depth:this.getTargetDepth(e,t,n)};return this.lastDropTargetNode=null,this.drop(r),r},hover:(e,t,n)=>{this.rafId?this.shouldSkipMoreFrames=!0:(this.shouldSkipMoreFrames=!1,this.hoverProps={dropTargetProps:e,monitor:t,component:n},this.rafId=requestAnimationFrame(this.deferredCallHoverHandler))},canDrop:this.canDrop.bind(this)};return(0,TS.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}wrapPlaceholder(e){const t={drop:(e,t)=>{const{node:n,path:r,treeIndex:o}=t.getItem(),i={node:n,path:r,treeIndex:o,treeId:this.treeId,minimumTreeIndex:0,depth:0};return this.drop(i),i}};return(0,TS.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}}function ID(){return ID=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ID.apply(this,arguments)}function DD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){AD(e,t,n[t])}))}return e}function AD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let LD=1;const ND=e=>{const t=DD({},e,{style:DD({},e.theme.style,e.style),innerStyle:DD({},e.theme.innerStyle,e.innerStyle),reactVirtualizedListProps:DD({},e.theme.reactVirtualizedListProps,e.reactVirtualizedListProps)}),n={nodeContentRenderer:yD,placeholderRenderer:ED,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:pD};return Object.keys(n).forEach((r=>{null===e[r]&&(t[r]=void 0!==e.theme[r]?e.theme[r]:n[r])})),t};class jD extends n.Component{constructor(e){super(e);const{dndType:t,nodeContentRenderer:n,treeNodeRenderer:r,isVirtualized:o,slideRegionSize:i}=ND(e);this.dndManager=new RD(this),this.treeId=`rst__${LD}`,LD+=1,this.dndType=t||this.treeId,this.nodeContentRenderer=this.dndManager.wrapSource(n),this.treePlaceholderRenderer=this.dndManager.wrapPlaceholder(xD),this.treeNodeRenderer=this.dndManager.wrapTarget(r),o&&(this.scrollZoneVirtualList=(lD._t||lD.ZP)(zR),this.vStrength=(0,lD.Kx)(i),this.hStrength=(0,lD.v7)(i)),this.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,draggingExpandedPaths:[],ignoreOneTreeUpdate:!1,instanceProps:{treeData:this.props.treeData||[],searchQuery:null,searchFocusOffset:null,ignoreTreeChanges:!1}},this.toggleChildrenVisibility=this.toggleChildrenVisibility.bind(this),this.moveNode=this.moveNode.bind(this),this.startDrag=this.startDrag.bind(this),this.dragHover=this.dragHover.bind(this),this.endDrag=this.endDrag.bind(this),this.drop=this.drop.bind(this),this.handleDndMonitorChange=this.handleDndMonitorChange.bind(this)}componentDidMount(){jD.loadLazyChildren(this.props);const e=jD.search(this.props,this.state,!0,!0,!1);this.setState(e),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}static getDerivedStateFromProps(e,t){const{instanceProps:n}=t,r={};return(0,u.equals)(n.searchQuery,e.searchQuery)?n.searchFocusOffset!==e.searchFocusOffset&&Object.assign(r,jD.search(e,t,!0,!0,!0)):Object.assign(r,jD.search(e,t,!0,!0,!1)),n.searchQuery=e.searchQuery,n.searchFocusOffset=e.searchFocusOffset,r.instanceProps=n,r}componentDidUpdate(e,t){if(this.state.dragging!==t.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode}),this.state.dragging)if((0,u.equals)(this.props.treeData,e.treeData))this.state.draggingTreeData&&t.draggingTreeData!==this.state.draggingTreeData&&$I({treeData:this.state.draggingTreeData,getNodeKey:this.props.getNodeKey,callback:e=>{let{node:t,path:n,lowerSiblingCounts:r,treeIndex:o}=e;t.pending&&t.expanded&&this.props.onLazyLoadChildren({node:t,path:n,lowerSiblingCounts:r,treeIndex:o})}});else{const{treeData:e}=JI({treeData:this.props.treeData,path:t.draggedPath,getNodeKey:this.props.getNodeKey});this.setState((t=>{let{draggingExpandedPaths:n}=t;return{draggingTreeData:n.reduce(((e,t)=>{let n;try{n=QI({treeData:e,path:t,newNode:e=>{let{node:t}=e;return DD({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey})}catch(t){n=e}return n}),e)}}))}else if(this.props.treeData!==e.treeData){const t=(0,u.equals)(this.props.treeData,e.treeData),{ignoreOneTreeUpdate:n,instanceProps:r}=this.state,o={};t||(n?o.ignoreOneTreeUpdate=!1:(o.searchFocusTreeIndex=null,jD.loadLazyChildren(this.props),Object.assign(o,jD.search(this.props,this.state,!1,!1,!1))),o.draggingTreeData=null,o.draggedNode=null,o.draggedMinimumTreeIndex=null,o.draggedDepth=null,o.dragging=!1,o.draggingExpandedPaths=[],o.instanceProps=DD({},r,{treeData:this.props.treeData}),this.setState(o))}}componentWillUnmount(){this.clearMonitorSubscription()}getRows(e){return _D({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:e})}handleDndMonitorChange(){!this.props.dragDropManager.getMonitor().isDragging()&&this.state.draggingTreeData&&this.endDrag()}toggleChildrenVisibility(e){let{node:t,path:n}=e;const{instanceProps:r}=this.state,o=QI({treeData:r.treeData,path:n,newNode:e=>{let{node:t}=e;return DD({},t,{expanded:!t.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(o),this.props.onVisibilityToggle({treeData:o,node:t,expanded:!t.expanded,path:n})}moveNode(e){let{node:t,path:n,treeIndex:r,depth:o,minimumTreeIndex:i}=e;const{treeData:a,treeIndex:l,path:s,parentNode:c}=tD({treeData:this.state.draggingTreeData,newNode:t,depth:o,minimumTreeIndex:i,expandParent:!0,getNodeKey:this.props.getNodeKey});this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1,draggingExpandedPaths:[]},(()=>{this.props.onChange(a),this.props.onMoveNode({treeData:a,node:t,treeIndex:l,path:s,nextPath:s,nextTreeIndex:l,prevPath:n,prevTreeIndex:r,nextParentNode:c})}))}static search(e,t,n,r,o){const{onChange:i,getNodeKey:a,searchFinishCallback:l,searchQuery:s,searchMethod:c,searchFocusOffset:u,onlyExpandSearchedNodes:d}=e,{instanceProps:p}=t;if(!s&&!c)return l&&l([]),{searchMatches:[]};const h={},{treeData:f,matches:g}=iD({getNodeKey:a,treeData:d?XI({treeData:p.treeData,expanded:!1}):p.treeData,searchQuery:s,searchMethod:c||MD,searchFocusOffset:u,expandAllMatchPaths:r&&!o,expandFocusMatchPaths:!!r});r&&(h.ignoreOneTreeUpdate=!0,i(f)),l&&l(g);let m=null;return n&&null!==u&&u<g.length&&(m=g[u].treeIndex),h.searchMatches=g,h.searchFocusTreeIndex=m,h}startDrag(e){let{path:t}=e;this.setState((e=>{const{treeData:n,node:r,treeIndex:o}=JI({treeData:e.instanceProps.treeData,path:t,getNodeKey:this.props.getNodeKey});return{draggingTreeData:n,draggedNode:r,draggedDepth:t.length-1,draggedMinimumTreeIndex:o,draggedPath:t,dragging:!0}}))}dragHover(e){let{node:t,depth:n,minimumTreeIndex:r}=e;this.state.draggedDepth===n&&this.state.draggedMinimumTreeIndex===r||this.setState((e=>{let{draggingTreeData:o,instanceProps:i,draggingExpandedPaths:a}=e;const l=o||i.treeData,s=CD({treeData:l,newNode:t,depth:n,minimumTreeIndex:r,expandParent:!0,getNodeKey:this.props.getNodeKey}),c=this.getRows(s.treeData)[s.treeIndex].path.slice(0,-1),d=(0,u.pipe)((0,u.when)((0,u.always)((0,u.gt)(c.length,0)),(0,u.append)(c)),(0,u.uniqWith)((0,u.eqBy)(String)))(a);return{draggedNode:t,draggedDepth:n,draggedMinimumTreeIndex:r,draggingTreeData:QI({treeData:l,path:c,newNode:e=>{let{node:t}=e;return DD({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0,draggingExpandedPaths:d}}))}endDrag(e){const{instanceProps:t}=this.state;if(e){if(e.treeId!==this.treeId){const{node:n,path:r,treeIndex:o}=e;let i=this.props.shouldCopyOnOutsideDrop;"function"==typeof i&&(i=i({node:n,prevTreeIndex:o,prevPath:r}));let a=this.state.draggingTreeData||t.treeData;i&&(a=QI({treeData:t.treeData,path:r,newNode:e=>{let{node:t}=e;return DD({},t)},getNodeKey:this.props.getNodeKey})),this.props.onChange(a),this.props.onMoveNode({treeData:a,node:n,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:r,prevTreeIndex:o})}}else(()=>{this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})})()}drop(e){this.moveNode(e)}canNodeHaveChildren(e){const{canNodeHaveChildren:t}=this.props;return!t||t(e)}static loadLazyChildren(e){$I({treeData:e.treeData,getNodeKey:e.getNodeKey,callback:t=>{let{node:n,path:r,lowerSiblingCounts:o,treeIndex:i}=t;n.pending&&(n.expanded||e.loadCollapsedLazyChildren)&&e.onLazyLoadChildren({node:n,path:r,lowerSiblingCounts:o,treeIndex:i,done:t=>e.onChange(QI({treeData:e.treeData,path:r,newNode:e=>{let{node:r}=e;return r===n?DD({},r,{children:t}):r},getNodeKey:e.getNodeKey}),!0)})}})}renderRow(e,t){let{listIndex:n,style:o,getPrevRow:i,matchKeys:a,swapFrom:l,swapDepth:s,swapLength:c}=t;const{node:u,parentNode:d,path:p,lowerSiblingCounts:h,treeIndex:f}=e,{canDrag:g,generateNodeProps:m,scaffoldBlockPxWidth:y,searchFocusOffset:v,rowDirection:b}=ND(this.props),x=this.treeNodeRenderer,w=this.nodeContentRenderer,S=p[p.length-1],E=S in a,O=E&&a[S]===v,C={node:u,parentNode:d,path:p,lowerSiblingCounts:h,treeIndex:f,isSearchMatch:E,isSearchFocus:O},_=m?m(C):{},k="function"!=typeof g?g:g(C),T={treeIndex:f,scaffoldBlockPxWidth:y,node:u,path:p,treeId:this.treeId,rowDirection:b};return r().createElement(x,ID({style:o,key:S,listIndex:n,getPrevRow:i,lowerSiblingCounts:h,swapFrom:l,swapLength:c,swapDepth:s},T),r().createElement(w,ID({parentNode:d,isSearchMatch:E,isSearchFocus:O,canDrag:k,toggleChildrenVisibility:this.toggleChildrenVisibility},T,_)))}render(){const{dragDropManager:e,style:t,className:n,innerStyle:o,rowHeight:i,isVirtualized:a,placeholderRenderer:l,reactVirtualizedListProps:s,getNodeKey:c,rowDirection:u}=ND(this.props),{searchMatches:d,searchFocusTreeIndex:p,draggedNode:h,draggedDepth:f,draggedMinimumTreeIndex:g}=this.state,m=this.state.draggingTreeData||this.props.treeData,y="rtl"===u?"rst__rtl":null;let v,b=null,x=null;if(h&&null!==g){const e=CD({treeData:m,newNode:h,depth:f,minimumTreeIndex:g,expandParent:!0,getNodeKey:c}),t=g;b=e.treeIndex,x=1+kD({node:h}),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e.slice(0,t),...e.slice(t+r)];return[...o.slice(0,n),...e.slice(t,t+r),...o.slice(n)]}(this.getRows(e.treeData),b,t,x)}else v=this.getRows(m);const w={};d.forEach(((e,t)=>{let{path:n}=e;w[n[n.length-1]]=t}));const S=null!==p?{scrollToIndex:p}:{};let E,O=t;if(v.length<1){const e=this.treePlaceholderRenderer,t=l;E=r().createElement(e,{treeId:this.treeId,drop:this.drop},r().createElement(t,null))}else if(a){O=DD({height:"100%"},O);const t=this.scrollZoneVirtualList;E=r().createElement(bR,null,(n=>{let{height:a,width:l}=n;return r().createElement(t,ID({},S,{dragDropManager:e,verticalStrength:this.vStrength,horizontalStrength:this.hStrength,speed:30,scrollToAlignment:"start",className:this.props.classes.rst__virtualScrollOverride,width:l,onScroll:e=>{let{scrollTop:t}=e;this.scrollTop=t},height:a,style:o,rowCount:v.length,estimatedRowSize:"function"!=typeof i?i:void 0,rowHeight:"function"!=typeof i?i:e=>{let{index:t}=e;return i({index:t,treeIndex:t,node:v[t].node,path:v[t].path})},rowRenderer:e=>{let{index:t,style:n}=e;return this.renderRow(v[t],{listIndex:t,style:n,getPrevRow:()=>v[t-1]||null,matchKeys:w,swapFrom:b,swapDepth:f,swapLength:x})}},s))}))}else E=v.map(((e,t)=>this.renderRow(e,{listIndex:t,style:{height:"function"!=typeof i?i:i({index:t,treeIndex:t,node:e.node,path:e.path})},getPrevRow:()=>v[t-1]||null,matchKeys:w,swapFrom:b,swapDepth:f,swapLength:x})));return r().createElement("div",{className:sD("rst__tree",n,y),style:O},E)}}jD.propTypes={classes:l().object,dragDropManager:l().shape({getMonitor:l().func}).isRequired,treeData:l().arrayOf(l().object).isRequired,style:l().shape({}),className:l().string,innerStyle:l().shape({}),rowHeight:l().oneOfType([l().number,l().func]),slideRegionSize:l().number,reactVirtualizedListProps:l().shape({}),scaffoldBlockPxWidth:l().number,maxDepth:l().number,searchMethod:l().func,searchQuery:l().any,searchFocusOffset:l().number,searchFinishCallback:l().func,generateNodeProps:l().func,isVirtualized:l().bool,treeNodeRenderer:l().func,nodeContentRenderer:l().func,placeholderRenderer:l().func,theme:l().shape({style:l().shape({}),innerStyle:l().shape({}),reactVirtualizedListProps:l().shape({}),scaffoldBlockPxWidth:l().number,slideRegionSize:l().number,rowHeight:l().oneOfType([l().number,l().func]),treeNodeRenderer:l().func,nodeContentRenderer:l().func,placeholderRenderer:l().func}),getNodeKey:l().func,onChange:l().func.isRequired,onMoveNode:l().func,canDrag:l().oneOfType([l().func,l().bool]),canDrop:l().func,canNodeHaveChildren:l().func,shouldCopyOnOutsideDrop:l().oneOfType([l().func,l().bool]),onVisibilityToggle:l().func,dndType:l().string,onDragStateChanged:l().func,onlyExpandSearchedNodes:l().bool,rowDirection:l().string,onLazyLoadChildren:l().func,ignoreTreeChanges:l().bool},jD.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:()=>!0,className:"",dndType:null,generateNodeProps:null,getNodeKey:function(e){let{treeIndex:t}=e;return t},innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:()=>{},onVisibilityToggle:()=>{},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:()=>{},onlyExpandSearchedNodes:!1,rowDirection:"ltr",onLazyLoadChildren:()=>{},ignoreTreeChanges:!1},$o(jD);const zD=(0,i.withStyles)((()=>({"@global .ReactVirtualized__Grid__innerScrollContainer":{overflow:"visible !important"},"@global .ReactVirtualized__Grid":{outline:"none"},"@global .ReactVirtualized__List":{},rst__virtualScrollOverride:{overflow:"auto !important"},"@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer":{direction:"rtl"}})))(jD),FD=e=>r().createElement(TS.DndContext.Consumer,null,(t=>{let{dragDropManager:n}=t;return void 0===n?null:r().createElement(zD,ID({},e,{dragDropManager:n}))})),BD=e=>r().createElement(mE,null,r().createElement(FD,e));var WD=h(4940);function UD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}function HD(){return HD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HD.apply(this,arguments)}function VD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){GD(e,t,n[t])}))}return e}function GD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class qD extends n.Component{render(){const e=this.props,{scaffoldBlockPxWidth:t,toggleChildrenVisibility:n,connectDragPreview:o,connectDragSource:i,isDragging:a,canDrop:l,canDrag:s,node:c,title:u,subtitle:d,draggedNode:h,path:f,treeIndex:g,isSearchMatch:m,isSearchFocus:y,buttons:v,className:b,style:x,didDrop:w,treeId:S,isOver:E,parentNode:O,rowDirection:C}=e,_=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),k=u||c.title,T=d||c.subtitle,P="rtl"===C?"rst__rtl":null;let M;s&&(M="function"==typeof c.children&&c.expanded?r().createElement("div",{className:"rst__loadingHandle"},r().createElement("div",{className:"rst__loadingCircle"},[...new Array(12)].map(((e,t)=>r().createElement("div",{key:t,className:UD("rst__loadingCirclePoint",P)}))))):i(r().createElement("div",{className:"rst__moveHandle"},r().createElement(wi(),{title:p().text("Drag node")},r().createElement(WD.Z,null))),{dropEffect:"copy"}));const R=h&&aD.isDescendant(h,c),I=!w&&a,D=n&&!c.root&&!c.cycled&&(c.children&&c.children.length>0||c.pending);return r().createElement("div",HD({style:{height:"100%"}},_,{key:c.nodeId}),D&&c.expanded&&!a&&r().createElement("div",{style:{width:t-2},className:UD("rst__lineChildren",P)}),r().createElement("div",{className:UD("rst__rowWrapper",P)},o(r().createElement("div",{className:UD("rst__row",I&&"rst__rowLandingPad",I&&!l&&"rst__rowCancelPad",m&&"rst__rowSearchMatch",y&&"rst__rowSearchFocus",P,b),style:VD({opacity:R?.5:1},x)},M,r().createElement("div",{className:UD("rst__rowContents",!s&&"rst__rowContentsDragDisabled",P)},D?r().createElement("div",{className:"rst__buttonWrapper",onClick:()=>{n({node:c,path:f,treeIndex:g})}},r().createElement("div",{"aria-label":c.expanded?"Collapse":"Expand",className:UD(c.expanded?"rst__collapseButton":"rst__expandButton",P)})):r().createElement("div",{className:UD("rst__buttonWrapper","rst__noButton")}),r().createElement("div",{className:UD("rst__rowLabel",P)},r().createElement("div",{className:UD("rst__rowTitle",c.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof k?k({node:c,path:f,treeIndex:g}):k),T&&r().createElement("span",{className:"rst__rowSubtitle"},"function"==typeof T?T({node:c,path:f,treeIndex:g}):T)),r().createElement("div",{className:"rst__rowToolbar"},v.map(((e,t)=>r().createElement("div",{key:t,className:"rst__toolbarButton"},e)))))),{offsetX:0,offsetY:0})))}}qD.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},qD.propTypes={node:l().shape({}).isRequired,title:l().oneOfType([l().func,l().node]),subtitle:l().oneOfType([l().func,l().node]),path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,treeIndex:l().number.isRequired,treeId:l().string.isRequired,isSearchMatch:l().bool,isSearchFocus:l().bool,canDrag:l().bool,scaffoldBlockPxWidth:l().number.isRequired,toggleChildrenVisibility:l().func,buttons:l().arrayOf(l().node),className:l().string,style:l().shape({}),connectDragPreview:l().func.isRequired,connectDragSource:l().func.isRequired,parentNode:l().shape({}),isDragging:l().bool.isRequired,didDrop:l().bool.isRequired,draggedNode:l().shape({}),isOver:l().bool.isRequired,canDrop:l().bool,rowDirection:l().string};const YD=qD,KD=(0,n.createContext)({generateTreeNodeProps:void 0});function $D(){return $D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$D.apply(this,arguments)}function ZD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){XD(e,t,n[t])}))}return e}function XD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}KD.displayName="TreeThemeContext";class QD extends n.Component{render(){const e=this.props,{children:t,listIndex:o,swapFrom:i,swapLength:a,swapDepth:l,scaffoldBlockPxWidth:s,lowerSiblingCounts:c,connectDropTarget:u,isOver:d,draggedNode:p,canDrop:h,treeIndex:f,treeId:g,getPrevRow:m,node:y,path:v,rowDirection:b}=e,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),w="rtl"===b?"rst__rtl":null,S=c.length,E=[];let O;c.forEach(((e,t)=>{let n="";if(e>0?n=t===S-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":t===S-1&&(n="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),E.push(r().createElement("div",{key:`pre_${1+t}`,style:{width:s},className:UD("rst__lineBlock",n,w)})),f!==o&&t===l){let e,n="";n=o===i+a-1?"rst__highlightBottomLeftCorner":f===i?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",e="rtl"===b?{width:s,right:s*t}:{width:s,left:s*t},E.push(r().createElement("div",{key:t,style:e,className:UD("rst__absoluteLineBlock",n,w)}))}}));const C=s*S;O="rtl"===b?{right:C}:{left:C},O=ZD({},O,{width:`calc(100% - ${C}px`});const _=`${C+eA}px`,k=ZD({},x.style,{width:_}),T=this.context&&this.context.generateTreeNodeProps&&this.context.generateTreeNodeProps(this.props);return u(r().createElement("div",$D({},x,{className:UD("rst__node",y.root&&"rst__root",w,T&&T.treeNodeClassName,!!p&&p.nodeId!==y.nodeId&&"rst_node_hover_disabled"),style:k}),E,r().createElement("div",{className:"rst__nodeContent",style:O},n.Children.map(t,(e=>(0,n.cloneElement)(e,{isOver:d,canDrop:h,draggedNode:p}))))))}}QD.contextType=KD,QD.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},QD.propTypes={treeIndex:l().number.isRequired,treeId:l().string.isRequired,swapFrom:l().number,swapDepth:l().number,swapLength:l().number,scaffoldBlockPxWidth:l().number.isRequired,lowerSiblingCounts:l().arrayOf(l().number).isRequired,listIndex:l().number.isRequired,children:l().node.isRequired,connectDropTarget:l().func.isRequired,isOver:l().bool.isRequired,canDrop:l().bool,draggedNode:l().shape({}),getPrevRow:l().func.isRequired,node:l().shape({}).isRequired,path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,rowDirection:l().string};const JD=QD,eA=250,tA=16,nA=28,rA=50,oA=l().shape({nodeId:l().oneOfType([l().number,l().string]),children:l().arrayOf((()=>oA)),showParents:l().bool,expanded:l().bool,pending:l().bool,cycled:l().bool}),iA=l().shape({nodeId:l().oneOfType([l().number,l().string]),entity:Fo.EntityType,relation:Fo.RelationType,relations:l().arrayOf(Fo.RelationType),total:l().number,parent:l().arrayOf(l().string),directParentUri:l().string,children:l().arrayOf((()=>iA)),loading:l().bool,expanded:l().bool,showParents:l().bool,cycled:l().bool,pending:l().bool}),aA=l().number,lA=l().shape({root:iA,graphTypes:l().string,entitiesMap:l().object,title:l().string,activenessDate:aA,scrollTo:iA,loading:l().bool}),sA=e=>{let{measure:t,registerChild:o,NodeRenderer:i,node:a,treeIndex:l}=e;return(0,n.useEffect)(t,[l]),r().createElement(i,{measure:t,registerChild:o,node:a})};sA.propTypes={measure:l().func,registerChild:l().func,NodeRenderer:l().func,node:oA,treeIndex:l().number};const cA=(e,t)=>{const n=(e=>document.querySelector(`[data-node-id="${e}"]`))(e);if(n){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect();e.right>r.right?t.scrollLeft=e.right-r.right:t.scrollLeft>0&&e.left<r.left&&(t.scrollLeft=t.scrollLeft+e.left-r.left)}else setTimeout((()=>cA(e,t)),0)},uA=e=>{let{node:t}=e;return t.nodeId},dA=e=>{let{node:t}=e;return t.title||null};function pA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){hA(e,t,n[t])}))}return e}function hA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fA=(0,u.pick)(["nodeContentRenderer","treeNodeRenderer","scaffoldBlockPxWidth","rowHeight","slideRegionSize"],t),gA=e=>{let{NodeRenderer:t=dA,root:o,scrollToNode:i,onChange:a,onRequestChildren:l,canDrag:s=!1,canDrop:c,onScroll:d=u.identity,onNodeMoved:p=u.identity,inlineRoot:h}=e;const f=UI(),g=(0,n.useMemo)((()=>{const e=o&&o.children||[];return h?[(0,u.pipe)((0,u.omit)(["children"]),(0,u.assoc)("root",!0))(o),...e]:e}),[o,h]),m=(0,n.useRef)(null),y=(0,n.useRef)(null),v=(0,n.useRef)(null);y.current=g;const b=(0,n.useCallback)((()=>(0,u.path)(["current","wrappedInstance","current"],m)),[]),x=((e,t)=>{const r=(0,n.useCallback)((n=>{const r=aD.getVisibleNodeInfoAtIndex({treeData:e.current,index:n,getNodeKey:t});return t({node:(0,u.propOr)({nodeId:-1},"node",r)})}),[t,e]),[o]=(0,n.useState)(new ER({fixedWidth:!0,defaultHeight:nA,minHeight:nA,keyMapper:r})),i=(0,n.useCallback)((()=>{o.clearAll()}),[]);return(0,n.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)})),[i]),o})(y,uA);((e,t)=>{const r=(0,n.useRef)(!1);(0,n.useEffect)((()=>{t&&!r.current&&(r.current=!0,e())}),[e,t])})((()=>{setTimeout((()=>{const e=b();e&&e.forceUpdateGrid()}),0)}),o);const w=(0,n.useCallback)((()=>(0,u.path)(["Grid","_scrollingContainer"],b())),[b]);(0,n.useEffect)((()=>{if(o&&i){const e=aD.find({treeData:g,getNodeKey:uA,searchFocusOffset:0,searchQuery:"",searchMethod:e=>{let{node:t}=e;return t===i}}),t=(0,u.path)(["matches",0,"treeIndex"],e),n=b();n&&null!=t&&(n.scrollToRow(t),v.current=setTimeout((()=>{const e=w();cA(i.nodeId,e)}),500))}return()=>{clearTimeout(v.current)}}),[o,g,i,b,w]);const S=(0,n.useCallback)((e=>{a&&a(pA({},o,{children:h?e.slice(1):e}))}),[a,o,h]),E=(0,n.useCallback)((e=>{let{node:n,treeIndex:o}=e;return r().createElement(SR,{cache:x,columnIndex:0,key:uA({node:n}),rowIndex:o,parent:b()},(e=>{let{NodeRenderer:t,node:n,treeIndex:o}=e;return e=>{let{measure:i,registerChild:a}=e;return r().createElement(sA,{NodeRenderer:t,node:n,treeIndex:o,measure:i,registerChild:a})}})({NodeRenderer:t,node:n,treeIndex:o}))}),[t,x]),O=(0,n.useCallback)((e=>({title:E(e)})),[E]),C=od(g),_=(0,n.useCallback)((e=>{const{prevPath:t,nextParentNode:n}=e;let r;if(t.length>1){const e=t.slice(0,-1),n=aD.getNodeAtPath({treeData:C,getNodeKey:uA,path:e});n&&(r=n.node)}else r=o;p(pA({prevParentNode:r},e,{nextParentNode:n||o}))}),[p,o,C]),k=(0,n.useCallback)((e=>{let{node:t}=e;l(t)}),[l]),T=(0,n.useCallback)((()=>{x.clearAll()}),[x]);return o?r().createElement(Ja,{skipOnMount:!0,handleWidth:!0,onResize:T},r().createElement("div",{className:f.container},!h&&r().createElement("div",{className:f.root},r().createElement(t,{node:o,isRoot:!0})),r().createElement("div",{className:f.tree},r().createElement(BD,{isVirtualized:!0,canDrag:s,canDrop:c,treeData:g,theme:fA,generateNodeProps:O,rowHeight:x.rowHeight,reactVirtualizedListProps:{ref:m,scrollToAlignment:"end",onScroll:d},onMoveNode:_,onChange:S,onLazyLoadChildren:k,getNodeKey:uA})))):null};gA.propTypes={NodeRenderer:l().elementType,root:oA,canDrag:l().oneOfType([l().bool,l().func]),canDrop:l().func,scrollToNode:l().object,onChange:l().func,onRequestChildren:l().func,onNodeMoved:l().func,onScroll:l().func,inlineRoot:l().bool,getNodeKey:l().func};const mA=gA,yA=(0,i.makeStyles)((()=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,width:0,minHeight:"15px"}}))),vA=(0,i.makeStyles)((()=>({loadingSpinner:{alignSelf:"center",maxHeight:"16px",marginRight:"16px"}}))),bA=e=>{let{className:t}=e;return r().createElement("img",{className:t,alt:"loading",src:(0,Fo.gif2Url)("R0lGODlhFQALAKIAAP///8Hf75vL5Van0wB4v////wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAFACwAAAIAFQAHAAADLFi6zPSQFEGpGhgXkrEUQShc1bB1wxcGYzGUZ6eKJGVy8lS1aJxJjaAiAkkAACH5BAkKAAUALAAAAwAUAAUAAAMiWLFbJRC6QakCODjBxIzDlW3dB4UBBmhPWQygwrCR9FZDAgAh+QQJCgAFACwIAAMADAAFAAADFBiqVfIvgBmaWHeC6rCklrdw0JMAACH5BAkKAAUALAAAAgAUAAcAAAMkSLpU/vCRQWmLLmg967hYAIxBV4GRSJoWlo1A6X1usXGMUkcJACH5BAkKAAUALAAAAgAOAAcAAAMdWLpF/qSMORudcYg97M2b0BHXAHIelV0pxizQkwAAOw==")})},xA=e=>{let{className:t,registerChild:n}=e;const o=yA(),i=vA();return r().createElement("div",{className:c()(o.container,t),ref:n},r().createElement(bA,{className:i.loadingSpinner}),r().createElement("div",{className:o.title},p().text("Loading...")))};xA.propTypes={className:l().string,registerChild:l().func};const wA=xA,SA=(0,i.makeStyles)({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),EA=e=>{let{to:t,children:n,onClick:o}=e;const i=SA();return r().createElement("a",{href:t,onClick:e=>{o&&(o(),e.stopPropagation(),e.preventDefault())},className:i.link},n)},OA=(0,i.makeStyles)((e=>({image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",overflow:"hidden",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",overflow:"hidden",alignItems:"baseline",whiteSpace:"nowrap",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis","&[aria-describedby]":{cursor:"pointer","&:hover":{textDecoration:"underline"}}}}))),CA=OA,_A=e=>{let{entity:t,classes:o={}}=e;const i=CA(),{secondaryLabel:a,label:l}=o,s=(0,Fo.getLabel)(t.label),{secondaryLabel:u}=t,d=(0,n.useCallback)((()=>{navigator.clipboard.writeText((0,Fo.getEntityId)(t))}),[t]);return r().createElement(r().Fragment,null,r().createElement(Bi,{entity:t,imageClassName:i.image}),r().createElement("div",{className:i.info},r().createElement(ks,{value:(0,Fo.getEntityUriForLink)(t),className:i.link},r().createElement(al,{value:s,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:c()(i.label,l)},s))),u&&r().createElement(al,{value:u,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:c()(i.secondaryLabel,a)},u)),r().createElement("div",{className:i.thirdRow},r().createElement(sl,{entity:t,size:"medium"}),r().createElement("div",{className:i.entityId,onClick:d},r().createElement("div",{className:i.entityIdLabel},p().text("ID:")),r().createElement(al,{value:`Copy to clipboard ${(0,Fo.getEntityId)(t)}`,placement:"top"},r().createElement("div",{className:i.entityIdValue},(0,Fo.getEntityId)(t)))))))},kA=(0,i.makeStyles)({"@keyframes keyframes-wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},wave:{overflow:"hidden",position:"relative","&:after":{top:"0",left:"0",right:"0",bottom:"0",content:'""',position:"absolute",animation:"$keyframes-wave 1.6s linear 0.5s infinite",transform:"translateX(-100%)",background:"linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);"}},avatar:{flex:"none",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.11)"},info:{marginLeft:"12px",flex:"auto"},label:{width:"40%",height:"15px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},secondaryLabel:{marginTop:"4px",width:"100%",height:"12px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},thirdRow:{marginTop:"4px",width:"60%",height:"24px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"}}),TA=()=>{const e=kA();return r().createElement(r().Fragment,null,r().createElement("div",{className:c()(e.avatar,e.wave)}),r().createElement("div",{className:e.info},r().createElement("div",{className:c()(e.label,e.wave)}),r().createElement("div",{className:c()(e.secondaryLabel,e.wave)}),r().createElement("div",{className:c()(e.thirdRow,e.wave)})))},PA=(0,i.makeStyles)({container:{display:"flex",padding:"16px",overflow:"hidden"}});function MA(){return MA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MA.apply(this,arguments)}const RA=(0,n.memo)((e=>{let{entity:t,classes:n={},variant:o="normal"}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["entity","classes","variant"]);const a=PA(),{container:l}=n;return r().createElement("div",MA({className:c()(a.container,l)},i),"normal"===o?r().createElement(_A,{entity:t,classes:n}):r().createElement(TA,null))})),IA=(0,i.makeStyles)((e=>({link:{cursor:"pointer",color:e.palette.primary.main,lineHeight:"15px",wordBreak:"break-word"},selected:{fontWeight:"bold"},popper:{maxWidth:"345px",minWidth:"200px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}}))),DA=e=>{let{title:t,isSelected:i,entityUri:a,viewId:l,anchorEl:s,withEntityDetails:u=!0}=e;const d=IA(),p=(0,o.useDispatch)(),h=(0,o.useSelector)(b().selectors.getUIPath),{generateEntityUrl:f}=(0,n.useContext)(Cs),{isLoading:g,entityDetails:m,showEntityDetails:y,hideEntityDetails:x}=(e=>{const[t,r]=(0,n.useState)(null),[o,i]=(0,n.useState)(!1),a=(0,n.useRef)(null),l=Ml(),s=(0,n.useCallback)((()=>l(Promise.resolve())),[l]),c=(0,n.useCallback)((()=>{a.current=setTimeout((()=>{i(!0),l((0,Fo.getEntity)(e)).then(r).finally((()=>i(!1)))}),1e3)}),[e,l]),u=(0,n.useCallback)((()=>{s(),clearTimeout(a.current),i(!1),r(null)}),[s]);return(0,n.useEffect)((()=>()=>clearTimeout(a.current)),[]),{isLoading:o,entityDetails:t,showEntityDetails:c,hideEntityDetails:u}})(a),w=f({uiPath:h,uri:a}),S=Boolean(s)&&(Boolean(m)||g),E=(0,n.useCallback)((()=>{p(v.ui.actions.openEntity({uri:a,viewId:l}))}),[p,a,l]);return r().createElement(r().Fragment,null,r().createElement("span",{"data-reltio-id":"reltio-hierarchy-node-title",className:c()(d.link,{[d.selected]:i}),onMouseEnter:u?y:void 0,onMouseLeave:u?x:void 0},r().createElement(EA,{to:w,onClick:E},t)),r().createElement(Fu,{anchorEl:s,className:d.popper,open:S,modal:!1,placement:"top-start"},r().createElement(RA,{entity:m,variant:g?"loading":"normal"})))},AA=(0,i.makeStyles)((()=>({wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px"},avatarWithMultiParent:{cursor:"pointer"},number:{color:"rgba(0,0,0,0.54)",marginLeft:"13px"},multiParentIcon:{position:"absolute",top:"15px",left:"-3px",cursor:"pointer"},actionsBlock:{position:"absolute",right:"0",top:"2px",backgroundColor:"rgb(240,240,240)","&::after":{content:'""',position:"absolute",left:"-40px",top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(240,240,240, 0.2), rgba(240,240,240, 1) 100%)",pointerEvents:"none"}},actionsBlockWithOpenMenu:{backgroundColor:"white","&::after":{background:"linear-gradient(to right, rgba(255,255,255, 0.2), rgba(255,255,255, 1) 100%)"}},actionsBlockForCheckedNode:{backgroundColor:"rgb(224,238,249)","&::after":{background:"linear-gradient(to right, rgba(224,238,249, 0.2), rgba(224,238,249, 1) 100%)"}},regularNodeCheckbox:{padding:0,marginRight:"16px",marginTop:"-4px",marginLeft:"-4px"},subtitle:{fontSize:"11px",letterSpacing:0,lineHeight:"13px",paddingLeft:"24px",paddingTop:"2px",paddingBottom:"4px",wordBreak:"break-word"}})));var LA=h(6330);function NA(){return NA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NA.apply(this,arguments)}const jA=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return r().createElement("svg",NA({width:"11",height:"11",viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),r().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r().createElement("circle",{strokeOpacity:".54",stroke:"#000",fill:"#FFF",cx:"6",cy:"6",r:"5.5"}),r().createElement("path",{d:"M5.536 4.641L4.505 3.61H8v3.495L6.874 5.98 5.509 7.344a1.995 1.995 0 00-.581 1.548l-.407-.408a2 2 0 010-2.828l1.015-1.015z",fillOpacity:".87",fill:"#000"})))};function zA(){return zA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zA.apply(this,arguments)}const FA=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return r().createElement("svg",zA({width:"10",height:"10",viewBox:"0 0 10 10",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),r().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".38"},r().createElement("path",{d:"M4.536 3.641L3.505 2.61H7v3.495L5.874 4.98 4.509 6.344a1.995 1.995 0 00-.581 1.548l-.407-.408a2 2 0 010-2.828l1.015-1.015z",fill:"#000"})))},BA=(0,i.makeStyles)((()=>({root:{fontSize:"13px",lineHeight:"16px",display:"flex",marginBottom:"12px",alignItems:"center","&:last-child":{marginBottom:0}},avatar:{height:"16px",width:"16px",marginRight:"6px",flexShrink:0},loadingNode:{paddingTop:0,width:"100%"}}))),WA=e=>{let{node:t}=e;const o=BA(),[i,a]=(0,n.useState)();return r().createElement("div",{ref:a,className:o.root},t.pending?r().createElement(wA,{className:o.loadingNode}):r().createElement(r().Fragment,null,r().createElement(FA,{className:o.avatar}),r().createElement(DA,{title:t.title,entityUri:t.entityUri,viewId:t.viewId,anchorEl:i})))},UA=(0,i.makeStyles)((()=>({multiParent:{position:"relative",background:"#ffffff",border:"1px solid rgba(0,0,0,0.12)",marginLeft:"-5px",marginTop:"10px",padding:"10px 11px 9px 6px","&:after,&:before":{bottom:"100%",left:"12px",border:"solid transparent",content:"' '",height:0,width:0,position:"absolute","pointer-events":"none"},"&:after":{borderColor:"rgba(255, 255, 255, 0)",borderBottomColor:"#ffffff",borderWidth:"6px",marginLeft:"-6px"},"&:before":{borderColor:"rgba(220, 216, 245, 0)",borderBottomColor:"rgba(0,0,0,0.12)",borderWidth:"7px",marginLeft:"-7px"}}}))),HA=e=>{let{showParents:t,additionalParents:n}=e;const o=UA();return t&&n.length>0?r().createElement("div",{className:o.multiParent},n.map(((e,t)=>r().createElement(WA,{key:t,node:e})))):null},VA=(0,i.makeStyles)((()=>({details:{margin:"1px 0 8px 24px"},loadingNode:{paddingTop:0},detailLine:{display:"flex"},detail:{flexGrow:1,width:0,wordWrap:"break-word",lineHeight:"16px",paddingLeft:"8px",textIndent:"-8px"},detailLabel:{color:"rgba(0, 0, 0, 0.6)",whiteSpace:"nowrap",lineHeight:"16px",letterSpacing:0,marginRight:"5px"},detailValue:{fontSize:"0.75rem",letterSpacing:0}})));function GA(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){YA(e,t,n[t])}))}return e}function YA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const KA=(e,t)=>{const{sortField:n,sortOrder:r,graphTypes:o}=e,i=(0,Fo.mapTree)(e.root,{childrenProcessing:(0,Fo.sortTreeChildren)({sortField:n,sortOrder:r,typesLabelsMap:(0,Fo.createRelationTypesLabelsMap)(t)}),nodeProcessing:(0,u.pipe)(tL,rL,oL)});return qA({},e,{root:i,entitiesMap:aL(i),title:((0,Fo.getGraphType)(t,o)||{}).label})};let $A=0;const ZA=()=>$A++,XA=e=>e?[].concat(e):[],QA=e=>(0,u.path)(["entity","uri"],e),JA=e=>e?(0,Fo.wrapInArrayIfNeeded)(e):[],eL=(e,t)=>{const n=(0,u.prop)("relation",e);if(Array.isArray(n)){const r=XA(e.parent),o=(0,u.findIndex)((0,u.equals)(t),r);return(0,u.path)([o],n)}return n},tL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.formatted?e:qA({},e,{nodeId:ZA(),parent:XA(e.parent),directParentUri:QA(t),pending:!e.children&&e.total>0,formatted:!0,relations:JA(e.relation),relation:eL(e,QA(t))})},nL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{children:n,parent:r,traversedRelations:o,untraversedRelations:i,cycled:a,formatted:l,relation:s}=e,c=GA(e,["children","parent","traversedRelations","untraversedRelations","cycled","formatted","relation"]);if(l)return e;const u=o+i-1,d=QA(t),p={nodeId:ZA(),cycled:a,entity:c,parent:XA(r),directParentUri:d,total:u,pending:!a&&!n&&u>0,formatted:!0,relations:JA(s),relation:eL(e,d)};return n&&(p.children=n,p.pending=!a&&u>n.length),p},rL=e=>{const t=e.children||[];return t.some((t=>(0,u.path)(["entity","uri"],t)===e.entity.uri||t.uri===e.entity.uri))||e.cycled||!e.parent.includes(e.entity.uri)?e:qA({},e,{children:t.concat(qA({},e,{nodeId:ZA(),directParentUri:e.entity.uri,total:0,children:[],cycled:!0}))})},oL=(0,u.when)((0,u.both)((0,u.has)("children"),(0,u.complement)((0,u.prop)("pending"))),(0,u.assoc)("expanded",!0)),iL=e=>{let{nodeId:t,relation:n,formatted:r,directParentUri:o,pending:i,children:a,total:l}=e;return GA(e,["nodeId","relation","formatted","directParentUri","pending","children","total"])},aL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=QA(e);return n&&(t[n]=iL(e)),e.children&&e.children.forEach((e=>aL(e,t))),t},lL=e=>Object.keys(e).reduce(((t,n)=>{const r=nL(e[n]);return t[n]=iL(r),t}),{}),sL=(e,t)=>{let{entities:n,relations:r}=e;if(Array.isArray(n)){const e=n.reduce(((e,t)=>(e[t.uri]=t,e)),{});return(r||[]).forEach((n=>{const r=t?"startObject":"endObject",o=e[n[t?"endObject":"startObject"].objectURI],i=e[n[r].objectURI];o.children=o.children||[],o.children.includes(i)||o.children.push(i),i.parent=i.parent||[],i.relation||(i.relation=n),i.parent.includes(o.uri)||i.parent.push(o.uri)})),e}},cL=(0,u.curry)(((e,t)=>(0,u.pipe)(sL,lL)(t,e))),uL=()=>({nodeId:ZA(),relation:{uri:(0,Fo.generateNewRelationUri)(),attributes:{}}}),dL=v.profile.trees.actions,pL=e=>{let{parentUri:t,parentId:n,graphTypes:r,activenessDate:o,id:i,isReversed:a,signal:l}=e;return(e,s)=>{const{sortField:c,sortOrder:d}=b().selectors.getTree(s(),i),h=b().selectors.getMetadata(s());return e(dL.childrenLoading({id:i,parentId:n,nodeId:ZA()})),(0,Fo.getHops)({uri:t,graphTypes:r,activenessDate:o,signal:l}).then((r=>{const{children:o}=(e=>{let{json:t,parentUri:n,sortField:r,sortOrder:o,metadata:i,isReversed:a}=e;const l=sL(t,a),s=l&&(e=>{const t=[{node:e,parent:null}],n=[];for(const e of t){const{node:r,parent:o}=e;n.includes(r)?o.children=o.children.map((e=>e===r?qA({},r,{cycled:!0,children:[]}):e)):(n.push(r),r.children&&t.push(...r.children.map((e=>({node:e,parent:r})))))}return e})(l[n]);return(0,Fo.mapTree)(s,{nodeProcessing:(0,u.pipe)(nL,rL),childrenProcessing:(0,Fo.sortTreeChildren)({sortField:r,sortOrder:o,typesLabelsMap:(0,Fo.createRelationTypesLabelsMap)(i)})})})({json:r,parentUri:t,sortField:c,sortOrder:d,metadata:h,isReversed:a}),l=cL(a,r);e(dL.childrenLoaded({id:i,children:o,parentId:n})),e(dL.entitiesMappingLoaded({id:i,entitiesSubMap:l}))})).catch((t=>{(0,Fo.isAbortError)(t)||e(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(t,p().text("Something went wrong")))),e(dL.cancelChildrenLoading({id:i,parentId:n}))}))}},hL=e=>{let{id:t,uri:n}=e;return e=>{e(dL.currentEntityShownInTree({id:t,uri:n})),setTimeout((()=>{e(dL.resetScrollToNode(t))}),0)}},fL=(0,u.pipe)(Fo.getAllEntityTypesForGraphType,(0,u.any)((0,u.prop)("secondaryLabelPattern")));function gL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mL=v.profile.trees.actions,yL=(0,u.has)("attributes"),vL=e=>{let{node:t,checkedNodes:n}=e;return(0,u.has)(t.nodeId,n)},bL=(0,u.has)("editingMode"),xL=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bL(e)||(0,u.has)("children",e)&&e.children.some(xL)},wL=e=>{let{id:t,node:n}=e;return e=>{const{nodeId:r,relation:o}=n,i=Array.isArray(o)?o[0]:o;return yL(i)?Promise.resolve(o):(0,Fo.getRelation)(i.uri).then((n=>{const o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gL(e,t,n[t])}))}return e}({},i,n);return e(mL.treeNodeChanged({id:t,node:{nodeId:r,relation:o}})),Promise.resolve(o)}))}},SL=e=>e.loading||(0,u.has)("children",e)&&e.children.some(SL),EL=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return t&&e},OL=(0,u.pick)(["startDate","endDate"]),CL=[{uri:"typeName",type:Fo.DataTypes.TYPE_STRING,label:p().text("Relationship")},...Fo.ACTIVENESS_ATTR_TYPES],_L=e=>{let{showDetails:t,metadata:n,relation:o={}}=e;const i=VA(),a=OL(o);return a.typeName=(0,u.prop)("label",(0,Fo.getRelationType)(n,o.type)),t&&o?r().createElement("div",{className:i.details},yL(o)?CL.map((e=>a[e.uri]&&r().createElement("div",{key:e.uri,className:i.detailLine},r().createElement("div",{className:i.detail},r().createElement(R(),{variant:"caption",gutterBottom:!0,className:i.detailLabel},e.label+": "),r().createElement("span",{className:i.detailValue},r().createElement(Lp,{value:a[e.uri],dataTypeDefinition:e})))))):r().createElement(wA,{key:"loading-details",className:i.loadingNode})):null};_L.propTypes={showDetails:l().bool,relation:Fo.RelationType,metadata:Fo.MetadataType};const kL=_L;var TL=h(6602),PL=h(4443);const ML=(0,i.makeStyles)((()=>({addButton:{marginRight:"11px"},editButton:{marginRight:"13px"}}))),RL=e=>{let{className:t,show:n,showDetails:o,onToggleRelationDetails:i,onMenuOpen:a,onMenuClose:l,onStartEditing:s,onAddParent:c,onAddChild:d,onDelete:h}=e;const f=ML(),g=[c&&{text:p().text("Add Parent"),onClick:c},d&&{text:p().text("Add Child"),onClick:d}].filter(u.identity);return n&&(i||s||c||d||h)?r().createElement("div",{className:t},i&&r().createElement(Pi,{tooltipTitle:o?p().text("Hide details"):p().text("View details"),tooltipPlacement:"bottom-end",size:"S",icon:o?TL.Z:wd.Z,onClick:i}),g.length>0&&r().createElement(Es,{buttonComponent:Pi,buttonProps:{icon:PL.Z,size:"S",tooltipTitle:p().text("Add node"),className:f.addButton},menuId:"tree-node-actions",menuItems:g,onMenuOpen:a,onMenuClose:l}),s&&r().createElement(Pi,{tooltipTitle:p().text("Edit node"),size:"S",icon:Sk.Z,onClick:s,className:f.editButton}),h&&r().createElement(Pi,{tooltipTitle:p().text("Delete node"),size:"S",icon:qp.Z,onClick:h})):null};RL.propTypes={show:l().bool,showDetails:l().bool,className:l().string,onMenuOpen:l().func,onMenuClose:l().func,onStartEditing:l().func,onAddParent:l().func,onAddChild:l().func,onDelete:l().func,onToggleRelationDetails:l().func};const IL=RL,DL=(0,u.prop)("graph"),AL=(0,u.pipe)(DL,(0,u.path)(["options","reverseRelations"])),LL=(0,u.pipe)(DL,(0,u.prop)("type")),NL=(0,u.pipe)((0,u.prop)("sortOrder"),Fo.getValidatedSortOrder),jL=(0,u.pipe)((0,u.prop)("sortBy"),Fo.getValidatedSortField),zL=(0,u.pipe)((0,u.prop)("attributes"),(0,u.defaultTo)([]),(0,u.includes)("secondaryLabel"));function FL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){BL(e,t,n[t])}))}return e}function BL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const WL=v.profile.trees.actions,UL=(e,t,n)=>{const r=(0,Fo.getEntityType)(t,n)||{},o=(0,Fo.getPropWithInheritance)(t,r,"typeGraphIcon");return o&&(0,Fo.getAbsoluteImageUrl)(e,o)},HL=(e,t,n)=>{let{relation:r}=e;return!!r&&(0,Fo.checkMetadataForUpdate)(n,(0,Fo.getRelationType)(t,r.type))},VL=(0,u.curry)(((e,t,n,r,o)=>{const{entity:i={}}=r,a=AL(t)?"parent"===e:"child"===e,l=i.type,s=LL(t);if(s){const e=(0,Fo.getGraphType)(n,s),t=(0,Fo.getRelationshipTypeUrisFromGraphType)(e)||[],r=(0,Fo.isInHierarchy)(n,u.__,l);return t.map((0,Fo.getRelationType)(n)).filter((0,u.both)((0,Fo.checkMetadataForCreate)(o),(0,Fo.checkMetadataForUpdate)(o))).map(a?Fo.getStartObjectTypeUri:Fo.getEndObjectTypeUri).some(r)}return!0})),GL=VL("parent"),qL=VL("child"),YL=(e,t,n)=>{let{relation:r}=e;return!!r&&(0,Fo.checkMetadataForDelete)(n,(0,Fo.getRelationType)(t,r.type))},KL=e=>{let{node:t,metadata:n,absoluteImagePath:r,currentEntityUri:o,mode:i,config:a={},showSecondaryLabel:l,onParentsRequested:s,dispatch:c,signal:d}=e;const{entity:p,children:h,total:f,pending:g,showParents:m,nodeId:y}=t,{id:v}=a,x=((e,t)=>QA(e)===t)(t,o),w=(0,Fo.isEditableMode)(i),S={onToggleShowParents:e=>{c(WL.treeNodeChanged({id:v,node:{nodeId:y,showParents:!m}})),e&&s(t)}},E=FL(w?{onStartEditing:HL(t,n,i)?()=>c((e=>{let{id:t,node:n}=e;return e=>{const{nodeId:r}=n;e(mL.treeNodeChanged({id:t,node:{nodeId:r,loading:!0}})),e(wL({id:t,node:n})).then((()=>{e(mL.treeNodeEditingStarted({id:t,node:n}))}))}})({id:v,node:t})):null,onAddParent:GL(a,n,t,i)?()=>c(WL.treeNodeNewParentEditingStarted({id:v,node:t,newNode:uL()})):null,onAddChild:qL(a,n,t,i)?()=>c((e=>{let{id:t,node:n,newNode:r,isReversed:o,signal:i}=e;return(e,a)=>{if(e(mL.treeNodeNewChildEditingStarted({id:t,node:n,newNode:r})),n.pending){const r=a(),{activenessDate:l,graphTypes:s}=b().selectors.getTree(r,t);e(pL({parentUri:n.entity.uri,parentId:n.nodeId,graphTypes:s,activenessDate:l,id:t,isReversed:o,signal:i}))}}})({id:v,isReversed:AL(a),node:t,newNode:uL(),signal:d})):null,onDelete:YL(t,n,i)?()=>{const e=(0,u.path)(["relation","uri"],t);e&&c(WL.treeRelationRemoved({relationUri:e})),c(WL.treeNodeRemoved({id:v,nodeId:y}))}:null}:{onToggleRelationDetails:()=>c((e=>{let{id:t,node:n}=e;return e=>{const{nodeId:r,showDetails:o,relation:i}=n,a={nodeId:r,showDetails:!o};e(mL.treeNodeChanged({id:t,node:a})),!o&&!yL(i)&&i&&e(wL({id:t,node:n}))}})({id:v,node:t}))},S);return FL({title:(0,Fo.getLabel)(p.label),subtitle:l?p.secondaryLabel:void 0,number:h&&!g?h.length:f,icon:UL(r,n,p.type),isSelectedNode:x,entityUri:p.uri,viewId:v,showDetails:t.showDetails&&!w},(0,u.reject)(u.isNil,E))},$L=e=>{let{node:t,entitiesMap:n,metadata:r,config:o,absoluteImagePath:i}=e;const{entity:a,directParentUri:l}=t;return(0,u.pathOr)([],[a.uri,"parent"],n).filter((e=>e!==l)).map((e=>{const t=(0,u.prop)(e,n);return t?KL({node:t,config:o,metadata:r,absoluteImagePath:i}):{pending:!0}}))},ZL=(0,n.createContext)({config:{},entitiesMap:{},onToggleNodeCheckbox:()=>{},onParentsRequested:()=>{},checkedNodes:{},canSelect:!1});ZL.displayName="NodeContext";const XL=e=>{e.target.src=LA},QL=e=>{let{node:t={},isRoot:i,registerChild:a,measure:l=u.identity}=e;const s=AA(),[d,p]=(0,n.useState)(),h=yA(),f=(0,o.useDispatch)(),{config:g,entitiesMap:m,onToggleNodeCheckbox:y,checkedNodes:v,canSelect:x,onParentsRequested:w,showSecondaryLabel:S}=(0,n.useContext)(ZL),E=(0,o.useSelector)(b().selectors.getAbsoluteImagePath),O=(0,o.useSelector)(b().selectors.getMetadata),{uri:C}=(0,o.useSelector)(b().selectors.getEntity),_=(0,o.useSelector)(b().selectors.getMode),k=(0,n.useContext)(id),{title:T,subtitle:P,number:M,icon:R,relation:I,showDetails:D,additionalParents:A=[],showParents:L,isSelectedNode:N,nodeId:j,viewId:z,entityUri:F,onStartEditing:B,onAddParent:W,onAddChild:U,onToggleRelationDetails:H,onDelete:V,onToggleShowParents:G}=(e=>{let{node:t,entitiesMap:n,metadata:r,absoluteImagePath:o,currentEntityUri:i,mode:a,config:l,showSecondaryLabel:s,onParentsRequested:c,signal:u,dispatch:d}=e;return FL({},t,{relation:Array.isArray(t.relation)?t.relation[0]:t.relation},KL({node:t,metadata:r,absoluteImagePath:o,currentEntityUri:i,mode:a,config:l,showSecondaryLabel:s,onParentsRequested:c,signal:u,dispatch:d}),{additionalParents:$L({node:t,config:l,entitiesMap:n,metadata:r,absoluteImagePath:o})})})({node:t,entitiesMap:m,metadata:O,absoluteImagePath:E,currentEntityUri:C,mode:_,config:g,showSecondaryLabel:S,onParentsRequested:w,signal:k,dispatch:f}),q=A.some((e=>e.pending)),[Y,K]=(0,n.useState)(!1),$=(0,n.useCallback)((()=>K(!0)),[]),Z=(0,n.useCallback)((()=>K(!1)),[]),[X,Q]=(0,n.useState)(!1),J=(0,n.useCallback)((()=>Q(!0)),[]),ee=(0,n.useCallback)((()=>{Q(!1),K(!1)}),[]),te=A.length>0,ne=te&&G?G.bind(null,q):void 0,re=((0,n.useCallback)((e=>y({checked:e.target.checked,node:t})),[t,y]),vL({node:t,checkedNodes:v}));return(0,n.useEffect)(l,[!1,te,P,!!H,D,M,L,D&&yL(I),L&&q,l]),r().createElement("div",{className:s.wrapper,"data-node-id":j,"data-reltio-id":"tree-node-"+j,onMouseEnter:$,onMouseLeave:Z,ref:a},r().createElement("div",{ref:p,className:h.container},r().createElement(Fi(),{className:c()(s.avatar,{[s.avatarWithMultiParent]:te}),src:R||LA,onError:XL,onClick:ne}),te&&r().createElement(jA,{className:s.multiParentIcon,onClick:ne}),r().createElement("div",{className:h.title},r().createElement(DA,{title:T,isSelected:N,viewId:z,entityUri:F,anchorEl:d}),!!M&&r().createElement("span",{className:s.number},M),r().createElement(IL,{show:Y||X,className:c()(s.actionsBlock,{[s.actionsBlockWithOpenMenu]:X&&!re,[s.actionsBlockForCheckedNode]:X&&re}),showDetails:D,onToggleRelationDetails:I&&!i?H:null,onMenuOpen:J,onMenuClose:ee,onStartEditing:i?null:B,onAddChild:U,onAddParent:W,onDelete:i?null:V}))),r().createElement(HA,{showParents:L,additionalParents:A}),P&&r().createElement("div",{className:s.subtitle},P),H&&r().createElement(kL,{showDetails:D,metadata:O,relation:I}))};QL.propTypes={node:iA,isRoot:l().bool,registerChild:l().func,measure:l().func};const JL=(0,n.memo)(QL);function eN(){return eN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eN.apply(this,arguments)}function tN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nN(e,t,n[t])}))}return e}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rN=e=>e.value,oN=(e,t)=>t.find((0,u.propEq)("value",e)),iN=e=>{let{value:t,relationTypes:o=[],isChild:i,onChange:a=u.identity,metadata:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","relationTypes","isChild","onChange","metadata"]);const c=(0,n.useMemo)((()=>((e,t,n)=>{const r={},o=(0,u.pipe)(Fo.getDirectionalLabelFromObject,(0,u.tap)((e=>r[e]=(0,u.propOr)(0,e,r)+1))),i=(0,u.ascend)((0,u.prop)("label")),a=(e,t)=>{const n=(0,Fo.getEntityType)(e,t);return tN({},n,{typeIcon:(0,Fo.getPropWithInheritance)(e,n,"typeIcon")})};return e.map((e=>{let{uri:r,label:i,startObject:l,endObject:s}=e;return{label:{directionalLabel:o(t?s:l),typeLabel:i},value:r,startObject:tN({},l,{objectType:a(n,l.objectTypeURI)}),endObject:tN({},s,{objectType:a(n,s.objectTypeURI)})}})).map((0,u.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?r[t]>1?`${t} (${n})`:t:n}})).sort(i)})(o,i,l)),[o,i,l]);return r().createElement(gk,eN({value:oN(t,c),options:c,onChange:(0,u.pipe)(rN,a)},s))};iN.propTypes={className:l().string,value:l().string,relationTypes:l().arrayOf(Fo.RelationTypeType),isChild:l().bool,metadata:Fo.MetadataType,onChange:l().func};const aN=iN,lN=(0,u.curry)(((e,t,n,r)=>{const o=(0,Fo.isInHierarchy)(n,u.__,t.type),i=e?Fo.getStartObjectTypeUri:Fo.getEndObjectTypeUri;return(0,u.pipe)(i,o)(r)})),sN=(0,i.makeStyles)((()=>({editorContainer:{width:"calc(100% - 34px)",minWidth:"185px",backgroundColor:"rgba(0,0,0,0.03)",padding:"16px 16px 8px 16px"},dense:{marginBottom:0},item:{marginBottom:"20px"},actionButtons:{display:"flex",justifyContent:"flex-end"}})));function cN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){uN(e,t,n[t])}))}return e}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dN=v.profile.trees.actions,pN=e=>{let{node:t={},measure:i,registerChild:a}=e;const l=sN(),s=(0,o.useDispatch)(),{relatedEntity:d,relation:{uri:h}={},editingMode:f,initialConnection:g}=t,m=f===Fo.NODE_EDITING_MODES.addingParent,{config:y}=(0,n.useContext)(ZL),x=y.id,w=AL(y)||!1,S=w?m:!m,E=(0,o.useSelector)((e=>b().selectors.getTreeEditingConnection(e,x,h))),O=(0,o.useSelector)((e=>(0,Fo.getHierarchyNodeEditorActiveError)(E,b().selectors.getProfileErrors(e)))),C=(0,o.useSelector)(b().selectors.getProfileErrors),{relation:_,entity:k}=E,{attributes:T,type:P,crosswalks:M=[]}=_,R=(0,n.useMemo)((()=>cN({attributes:T},(0,Fo.getActivenessAttributes)(_))),[T,_]),I=(0,o.useSelector)((e=>b().selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),A=(0,o.useSelector)(b().selectors.getMetadata),L=(0,o.useSelector)(b().selectors.getMode),N=LL(y),j=(0,Fo.getGraphType)(A,N)||{},z=(0,n.useMemo)((()=>((e,t,n,r,o)=>(0,u.pipe)(Fo.getRelationshipTypeUrisFromGraphType,(0,u.defaultTo)([]),(0,u.map)((0,Fo.getRelationType)(n)),(0,u.reject)(u.isNil),(0,u.filter)((0,u.allPass)([(0,Fo.checkMetadataForCreate)(o),(0,Fo.checkMetadataForUpdate)(o),lN(e,t,n)])))(r))(S,d,A,j,L)),[S,d,A,j,L]),F=(0,n.useMemo)((()=>k&&k.uri?z.filter((0,Fo.isAvailableRelationBetweenEntities)(S,k,d,A)):z),[k,z,S,d,A]),B=(0,n.useMemo)((()=>(0,Fo.getSuitableEntityTypeUrisForRelationTypes)(S,A,P?[(0,Fo.getRelationType)(A,P)]:z)),[S,A,P,z]),W=(0,n.useCallback)((e=>{s(dN.treeNodeRelationTypeChanged({id:x,node:t,relationTypeUri:e}))}),[t,x,s]),U=(0,n.useCallback)((e=>{s(dN.treeNodeEntityChanged({id:x,node:t,entity:e}))}),[t,x,s]);(0,n.useEffect)((()=>{P||1!==z.length||W(z[0].uri)}),[P,z,W]),Vl((()=>{!P&&F.length>=1&&W(F[0].uri)}),[P,k,F,W]),(0,n.useEffect)(i,[x,E,C,P,z,!!W,k,F,i]);const H=(0,n.useMemo)((()=>(0,Fo.getRelationAttributesList)(A,P)),[P,A]),V=(0,n.useMemo)((()=>k&&{entityUri:k.uri,entityType:k.type,entityLabel:(0,Fo.getLabel)(k.label)}),[k]),G=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.addAttributes,s)(e.map((e=>cN({},e,{viewId:x}))))),[x,s]),q=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.modifyAttribute,s)(cN({},e,{viewId:x}))),[x,s]),Y=(0,n.useCallback)((e=>(0,u.pipe)(v.profile.actions.removeAttribute,s)(cN({},e,{viewId:x}))),[x,s]),K=(0,n.useCallback)((()=>{const e=(0,Fo.validateHierarchyConnection)(A,E);return s(v.profile.errors.actions.errorsSet(e)),0===e.length}),[E,A,s]),$=(0,n.useCallback)((()=>{s((e=>{let{id:t,node:n}=e;return e=>{e((0,u.cond)([[(0,u.equals)(Fo.NODE_EDITING_MODES.addingParent),(0,u.always)(mL.treeNodeNewParentEditingCanceled)],[(0,u.equals)(Fo.NODE_EDITING_MODES.addingChild),(0,u.always)(mL.treeNodeNewChildEditingCanceled)],[(0,u.equals)(Fo.NODE_EDITING_MODES.editing),(0,u.always)(mL.treeNodeEditingCanceled)]])(n.editingMode)({id:t,node:n}))}})({id:x,node:t}))}),[t,x,s]),Z=(0,n.useCallback)((()=>{K()&&s((e=>{let{id:t,node:n,isReversed:r}=e;return(e,o)=>{const i=b().selectors.getTreeEditingConnection(o(),t,n.relation.uri);let a;switch(n.editingMode){case Fo.NODE_EDITING_MODES.addingParent:case Fo.NODE_EDITING_MODES.addingChild:a=mL.treeRelationCreated;break;case Fo.NODE_EDITING_MODES.editing:a=mL.treeRelationChanged}e(a((0,Fo.getPayloadForNodeApplyEditing)({node:n,connection:i,isReversed:r}))),e((0,u.cond)([[(0,u.equals)(Fo.NODE_EDITING_MODES.addingParent),(0,u.always)(mL.treeNodeNewParentEditingApplied)],[(0,u.equals)(Fo.NODE_EDITING_MODES.addingChild),(0,u.always)(mL.treeNodeNewChildEditingApplied)],[(0,u.equals)(Fo.NODE_EDITING_MODES.editing),(0,u.always)(mL.treeNodeEditingApplied)]])(n.editingMode)({id:t,node:n}))}})({id:x,isReversed:w,node:t}))}),[t,x,w,s,K]),X=!(0,u.equals)(g,E)&&P,Q=(0,Fo.getErrorMessage)(O),J=(0,n.useContext)(jb),ee=(0,n.useMemo)((()=>Nb(J.type)&&(0,Fo.isAttributeTypeError)(J.element,h,P)),[h,P,J]),{ref:te,errorClassName:ne}=Ub({highlightedError:ee?J:null,isSimple:!0});return r().createElement("div",{className:l.editorContainer,ref:a},r().createElement(Ja,{handleHeight:!0,onResize:i}),1!==z.length&&r().createElement(aN,{isChild:S,relationTypes:F,className:l.item,value:P,metadata:A,onChange:W}),r().createElement("div",{ref:te,className:ne},r().createElement(Ob,{errorMessage:Q,className:l.item},r().createElement(ew,{key:P,className:c()({[l.dense]:Q}),entity:V||{},entityTypesUris:B,max:y.max||20,globalSearchRequestOptions:I,mode:L,onChange:U,metadata:A,attributeTypesSelectionStrategy:Fo.relationEditorAttributeTypesSelectionStrategy}))),P&&r().createElement(ak,{className:l.item,attrTypes:H,entity:R,showEmptyEditors:!1,crosswalks:M,mode:L,parentUri:h,onAddAttributes:G,onChangeAttribute:q,onDeleteAttribute:Y}),r().createElement("div",{className:l.actionButtons},r().createElement(D(),{onClick:$},p().text("Cancel")),r().createElement(D(),{color:"primary",disabled:!X,onClick:Z},p().text("Apply"))))};pN.propTypes={node:iA,registerChild:l().func,measure:l().func};const hN=(0,n.memo)(pN),fN="loading",gN="regular",mN="editor",yN=(0,u.cond)([[bL,(0,u.always)(mN)],[e=>e.loading,(0,u.always)(fN)],[u.T,(0,u.always)(gN)]]),vN=e=>class{static build(e){const{node:t}=e;switch(yN(t)){case fN:return r().createElement(wA,e);case gN:return r().createElement(JL,e);case mN:return r().createElement(hN,e)}}}.build(e);vN.propTypes={node:iA,onToggleShowParents:l().func};const bN=vN,xN=e=>{let{className:t,config:i,tree:a={},onChildrenRequested:l,onParentsRequested:s,onTreeChanged:u,onTreeScroll:d,onNodeMoved:p,onToggleNodeCheckbox:h,checkedNodes:f,mode:g,isGraphView:m}=e;const y=BM({isGraphView:m}),v=(0,Fo.isEditableMode)(g),x=(0,o.useSelector)(b().selectors.getMetadata),w=(0,n.useMemo)((()=>({config:i,entitiesMap:a.entitiesMap,onToggleNodeCheckbox:h,checkedNodes:f,canSelect:v,onParentsRequested:s,showSecondaryLabel:EL(a.showSecondaryLabel,zL(i))})),[f,i,v,h,a.entitiesMap,a.showSecondaryLabel,s]),S=(0,n.useMemo)((()=>({generateTreeNodeProps:e=>{let{node:t}=e;return{treeNodeClassName:c()({[y.checkedNode]:vL({node:t,checkedNodes:f}),[y.editorNode]:bL(t)})}}})),[f,y]),E=(0,n.useCallback)((e=>{let{node:t}=e;return v&&!bL(t)&&!SL(t)&&YL(t,x,g)}),[v,x,g]),O=(0,n.useCallback)((e=>{let{nextParent:t,node:n}=e;const r=!AL(i),o=null===t?a.root:t;return o&&!o.loading&&qL(i,x,o)&&(0,Fo.isAvailableRelationBetweenEntities)(r,n.entity,o.entity,x,(0,Fo.getRelationType)(x,n.relation.type))}),[i,x,a.root]);return r().createElement("div",{className:c()(y.panel,t)},r().createElement("div",{className:y.treeWrapper},r().createElement(KD.Provider,{value:S},r().createElement(ZL.Provider,{value:w},r().createElement(mA,{NodeRenderer:bN,onChange:u,canDrag:E,canDrop:O,root:a.root,scrollToNode:a.scrollTo,onScroll:d,onRequestChildren:l,onNodeMoved:p,inlineRoot:!!a.root&&bL(a.root)})))))};xN.propTypes={className:l().string,tree:lA,onChildrenRequested:l().func,onParentsRequested:l().func,onTreeChanged:l().func,onTreeScroll:l().func,onNodeMoved:l().func,onToggleNodeCheckbox:l().func,checkedNodes:l().object,mode:l().string,config:l().object,isGraphView:l().bool};const wN=(0,n.memo)(xN);function SN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const EN=v.profile.trees.actions,ON=(0,i.makeStyles)({onlyValue:{color:"rgba(0,0,0,.6)",fontSize:"13px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),CN=e=>{let{value:t,onChange:o,options:i,classes:a={},emptyLabel:l}=e;const s=ON(),[c,...u]=i,d=0===u.length;(0,n.useEffect)((()=>{d&&t!==c.value&&o(c.value)}),[c.value]);const p=!!l;return r().createElement("div",{className:a.root},d?r().createElement(R(),{className:a.onlyValue||s.onlyValue,variant:"h6"},c.label):r().createElement(ab,{displayEmpty:p,disableUnderline:!0,classes:{select:a.select||s.select},TextFieldProps:{classes:{root:a.textField||s.textField}},MenuProps:{classes:{list:a.selectMenu||s.selectMenu}},value:t||"",entries:p?[{value:"",label:l},...i]:i,onChange:e=>o(e||null)}))};CN.propTypes={value:l().string,onChange:l().func,options:l().arrayOf(l().shape({value:l().string,label:l().string})),classes:l().shape({root:l().string,onlyValue:l().string,select:l().string,selectMenu:l().string,textField:l().string}),emptyLabel:l().string};const _N=CN,kN=e=>{let{value:t,onChange:n,graphTypes:o,className:i}=e;return r().createElement(_N,{classes:{root:i},value:t,onChange:n,options:o.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))})};function TN(){return TN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TN.apply(this,arguments)}const PN=e=>{let{value:t,onChange:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","onChange"]);const i=(0,u.pipe)((e=>e&&e.getTime()),n);return r().createElement(sh,TN({value:t,label:p().text("Effective date"),onChange:i,margin:"dense"},o))};PN.propTypes={value:aA,onChange:l().func};const MN=PN;var RN=h(595),IN=h(324);const DN="23px",AN=(0,i.makeStyles)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:DN,paddingRight:DN,minWidth:"245px",maxWidth:"308px",width:"40%"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"}}))),LN=Oi(Xp()),NN=[{label:p().text("Relationship type label"),value:Fo.TREE_SORT_FIELD_VALUES.relationTypeLabel},{label:p().text("Entity label"),value:Fo.TREE_SORT_FIELD_VALUES.entityLabel}],jN=e=>{let{className:t,sortField:o,sortOrder:i,onSort:a,showSecondaryLabel:l,showSecondaryLabelDisabledReason:s,onShowSecondaryLabelChange:u}=e;const d=AN(),h=(0,n.useRef)(),[f,g]=(0,n.useState)(!1),m=i===Fo.TREE_SORT_ORDER_VALUES.asc,y=()=>g((e=>!e));return r().createElement(r().Fragment,null,r().createElement(D(),{ref:h,classes:{root:c()(d.triggerButton,t)},onClick:y},r().createElement(jk.Z,null)),r().createElement(Cn(),{open:f,classes:{paper:d.popupContent},anchorEl:h.current,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},u&&r().createElement(r().Fragment,null,r().createElement(R(),{className:d.viewOptionsTitle,variant:"h6"},p().text("View options")),r().createElement(LN,{tooltipTitle:s,showForDisabled:!!s,classes:{root:d.checkboxControlRoot,label:d.checkboxControlLabel},control:r().createElement(fs(),{className:d.checkboxControlCheckbox,checked:l||!1,onChange:e=>u(e.target.checked)}),label:p().text("Display secondary label"),disabled:!!s}),r().createElement(TE(),{className:d.divider})),r().createElement(R(),{className:d.title,variant:"h6"},p().text("Sort by")),r().createElement("div",{className:d.sortControls},r().createElement(ab,{entries:NN,TextFieldProps:{variant:"filled"},classes:{root:d.sortSelectorRoot,menuItem:d.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:o,onChange:e=>{a({sortField:e,sortOrder:i})},MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),r().createElement(Pi,{tooltipTitle:m?p().text("Ascending"):p().text("Descending"),icon:m?IN.Z:RN.Z,onClick:()=>{a({sortField:o,sortOrder:m?Fo.TREE_SORT_ORDER_VALUES.desc:Fo.TREE_SORT_ORDER_VALUES.asc})},className:d.sortOrderButton,size:"L"}))))};jN.propTypes={className:l().string,sortField:l().string,sortOrder:l().string,onSort:l().func,showSecondaryLabel:l().bool,showSecondaryLabelDisabledReason:l().string,onShowSecondaryLabelChange:l().func};const zN=jN,FN=window["material-ui"].Breadcrumbs;var BN=h.n(FN);const WN=(0,i.makeStyles)((()=>({text:{fontSize:"12px",lineHeight:"14px",letterSpacing:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},textContainer:{maxWidth:"calc(100% - 13px)"},separator:{marginLeft:"4px",marginRight:"4px"}})));function UN(){return UN=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UN.apply(this,arguments)}const HN=e=>{let{items:t=[]}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["items"]);const o=WN();return r().createElement(BN(),UN({"aria-label":p().text("Breadcrumb"),expandText:p().text("Show path"),classes:{li:o.textContainer,separator:c()(o.text,o.separator)}},n),t.map(((e,t,n)=>{const{label:i,href:a,onClick:l}=e,s=t===n.length-1?"textPrimary":"textSecondary";return l||a?r().createElement(hl(),{key:t,color:s,classes:{root:o.text},href:a,onClick:l},i):r().createElement(R(),{key:t,href:a,color:s,classes:{root:o.text}},i)})))},VN=l().shape({label:l().string.isRequired,href:l().string,onClick:l().func});HN.propTypes={items:l().arrayOf(VN)};const GN=HN,qN=v.profile.trees.actions,YN=["showSecondaryLabel"],KN=(0,u.pipe)((0,u.filter)((0,u.anyPass)([(0,u.has)("root"),...YN.map((e=>(0,u.has)(e)))])),(0,u.map)((0,u.pick)(YN)),(0,u.reject)(u.isEmpty)),$N=v.profile.trees.actions,ZN=(0,i.makeStyles)((e=>({view:{width:"100%"},linearIndicator:{top:"42px"},filtersBar:{paddingLeft:"24px",display:"flex",alignItems:"center",marginTop:"2px",marginBottom:"12px",height:"46px"},errorMessage:{fontSize:"13px",marginLeft:"24px",marginRight:"16px",lineHeight:"1.4",color:e.palette.text.secondary},activenessDate:{flex:1,margin:0},filterSortButton:{flexShrink:0,margin:"0 6px 0 12px"},breadcrumbs:{padding:"8px 24px",backgroundColor:"rgba(0,0,0,0.03)"},graphTypeSelector:{margin:"0 10px 15px 24px",overflow:"hidden"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));function XN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){QN(e,t,n[t])}))}return e}function QN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const JN=v.profile.trees.actions,ej=(0,o.connect)(((e,t)=>({tree:b().selectors.getTree(e,t.config.id),total:b().selectors.getTreeTotal(e,t.config.id),entity:b().selectors.getEntity(e),metadata:b().selectors.getMetadata(e),mode:b().selectors.getMode(e)})),void 0)((e=>{let{config:t,tree:i,metadata:a,entity:l={},mode:s,className:d,isGraphView:h}=e;const{id:f,caption:g,graph:m,showPath:y,_showNavigateToGraph:x}=t,w=ZN(),S=(0,o.useDispatch)(),E=(0,n.useRef)(Date.now()),O=null==m?void 0:m.type,C=l.uri,{activenessDate:_=E.current,sortField:k,sortOrder:T,loading:P,errorMessage:M,showSecondaryLabel:I}=i||{},[D,A]=(0,n.useState)(O),[L,N]=(0,n.useState)({}),j=(0,n.useContext)(id),z=(0,n.useContext)(Cw),F=void 0!==x?x:z.showNavigateToGraph,B=(0,n.useMemo)((()=>XN({},z,{showNavigateToGraph:F})),[F,z]),W=AL(t),U=zL(t),H=EL(I,U),V=fL(a,D),G=(0,n.useMemo)((()=>[]),[]),q=(0,n.useMemo)((()=>(0,Fo.getPathByEntityUri)((i||{}).root,C).map((e=>({label:(0,Fo.getLabel)((0,u.path)(["entity","label"],e))})))),[i,C]);(e=>{let{entityUri:t,id:r,graphTypes:i,activenessDate:a,isReversed:l,enabled:s,signal:c}=e;const d=Ml({cancelOnUnmount:!1}),h=(0,o.useDispatch)(),f=(0,n.useRef)(null),g=(0,o.useSelector)(b().selectors.getMetadata),m=(0,o.useSelector)((e=>b().selectors.getTree(e,r)))||{},{root:y,isReversed:v,graphTypes:x}=m,w=od(a)||a,S=(0,n.useCallback)((()=>{f.current=setTimeout((()=>h(hL({id:r,uri:t}))),100)}),[r,t,h]),E=!!y,O=(0,o.useSelector)(b().selectors.getEntity);Vl((()=>{const e=(0,Fo.updateTreesWithNewEntity)((0,u.pick)(["uri","label","secondaryLabel","type"],O),{[r]:m});e.length&&h(EN.treeChanged({id:r,tree:e[0].root}))}),[null==O?void 0:O.updatedTime]),(0,n.useEffect)((()=>{if(s&&E)return S(),()=>clearTimeout(f.current)}),[s,S,E]),(0,n.useEffect)((()=>{if(s){const e=e=>EN.treeLoaded({id:r,tree:e,graphTypes:i,activenessDate:a,isReversed:l}),n=(0,u.pipe)(KA,e,h);(!(0,Fo.hasEntityInTree)(y,t)||v!==l||w!==a||x!==i||xL(y))&&(h(EN.treeLoading(r)),d((0,Fo.getTree)({uri:t,graphTypes:i,activenessDate:a,isReversed:l,signal:c})).then((e=>n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){SN(e,t,n[t])}))}return e}({},e,{graphTypes:i}),g))).then((e=>S())).catch((e=>{h(EN.treeLoadedWithError({id:r,errorMessage:(0,Fo.isAbortError)(e)?" ":(0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong"))})),console.warn(e)})))}}),[t,i,a,r,g,l,s,d,h,S,v,x,w])})({id:f,entityUri:C,graphTypes:D,activenessDate:_,isReversed:W,enabled:C&&(0,Fo.isViewMode)(s)&&!(0,Fo.isTempUri)(C),signal:j}),(e=>{var t,r;let{id:i,entityUri:a,graphTypes:l,activenessDate:s,isReversed:c}=e;const d=(0,o.useDispatch)(),p=(0,o.useSelector)(b().selectors.getMetadata),h=(0,o.useSelector)((e=>b().selectors.getModifiedEntity(e,a))),{root:f}=(0,o.useSelector)((e=>b().selectors.getTree(e,i)))||{},g=(null==f||null===(t=f.entity)||void 0===t?void 0:t.uri)===a||(null==f?void 0:f.editingMode)===Fo.NODE_EDITING_MODES.addingParent&&(null==f||null===(r=f.children)||void 0===r?void 0:r.some((e=>{let{entity:t}=e;return(null==t?void 0:t.uri)===a})));(0,n.useEffect)((()=>{if(h&&(0,Fo.isTempUri)(a)&&!g){const e=e=>$N.treeLoaded({id:i,tree:e,graphTypes:l,activenessDate:s,isReversed:c});(0,u.pipe)(KA,e,d)({root:{entity:h,total:0},graphTypes:l},p)}}),[s,d,a,l,i,c,p,h,g])})({id:f,entityUri:C,graphTypes:D,activenessDate:_,isReversed:W});const Y=(0,n.useCallback)((0,Fo.debounce)((()=>S((e=>(t,n)=>{const r=n(),o=b().selectors.getTrees(r),i=KN(o);t(qN.treesStateSaved({id:e,state:i}))})(f))),500),[f,S]),K=(0,n.useCallback)((e=>{let{sortField:t,sortOrder:n}=e;S(JN.treeSorted({id:f,typesLabelsMap:(0,Fo.createRelationTypesLabelsMap)(a),sortField:t,sortOrder:n})),S((e=>(t,n)=>{const r=b().selectors.getTree(n(),e),o=(0,u.path)(["root","children",0,"entity","uri"],r);o&&t(hL({id:e,uri:o}))})(f))}),[f,a,S]),$=(0,n.useCallback)((e=>{S(JN.treeSecondaryLabelShown({id:f,show:e})),Y()}),[f,S,Y]),Z=(0,n.useCallback)((e=>S(pL({parentUri:e.entity.uri,parentId:e.nodeId,graphTypes:D,activenessDate:_,id:f,isReversed:W,signal:j}))),[S,D,_,f,W,j]),X=(0,n.useCallback)((e=>S((e=>{let{uri:t,graphTypes:n,activenessDate:r,id:o,isReversed:i,nodeId:a,signal:l}=e;return e=>{const s=(0,u.pipe)(cL(i),(e=>dL.entitiesMappingLoaded({id:o,entitiesSubMap:e})),e);return(0,Fo.getHops)({uri:t,graphTypes:n,activenessDate:r,signal:l}).then(s).catch((t=>{(0,Fo.isAbortError)(t)||e(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(t,p().text("Something went wrong")))),e(dL.treeNodeChanged({id:o,node:{nodeId:a,showParents:!1}}))}))}})({uri:e.entity.uri,graphTypes:D,activenessDate:_,id:f,isReversed:W,signal:j,nodeId:e.nodeId}))),[S,D,_,f,W,j]),Q=(0,n.useCallback)((e=>{S(JN.treeChanged({id:f,tree:e}))}),[S,f]),J=(0,n.useCallback)((e=>{S(JN.activenessDateChanged({id:f,activenessDate:e}))}),[S,f]),ee=(0,n.useCallback)((()=>{S(hL({id:f,uri:C}))}),[S,f,C]),te=(0,n.useCallback)((e=>{const{node:t,nextParentNode:n}=e,{entity:r}=n||{},{relation:o,entity:i}=t;o?S(JN.treeRelationRepointed({entity:i,relation:o,newParent:r,isReversed:W})):console.error("relation not found:"+JSON.stringify(e))}),[S,W]),ne=(0,n.useCallback)((e=>{let{checked:t,node:n}=e;N(t?e=>XN({},e,{[n.nodeId]:n}):(0,u.omit)([n.nodeId]))}),[]),re=(0,n.useCallback)((()=>{S(v.ui.actions.openGraph({viewId:f,graphType:D,entityUri:C,graphLayout:Fo.GraphLayout.TREE}))}),[S,f,D,C]),oe=(0,n.useCallback)((()=>N({})),[]);return(0,n.useEffect)(oe,[s]),(0,n.useEffect)((()=>{k&&T||K({sortField:jL(t),sortOrder:NL(t)})}),[K,k,T,t]),(0,n.useEffect)((()=>{A(O)}),[O]),r().createElement(Cw.Provider,{value:B},r().createElement(xT,{className:c()(w.view,d)},r().createElement(FM,{title:g,onScrollToCurrentEntity:ee,entityLabel:(0,Fo.getLabel)(l.label),onGraphOpen:re,disabled:P,isGraphView:h}),P&&r().createElement(Ho,{className:w.linearIndicator}),G.length>0&&r().createElement(kN,{className:w.graphTypeSelector,value:D,onChange:A,graphTypes:G}),r().createElement("div",{className:w.filtersBar},r().createElement(MN,{className:w.activenessDate,value:_,onChange:J,fullWidth:!0}),r().createElement(zN,{sortField:k,sortOrder:T,className:w.filterSortButton,onSort:K,showSecondaryLabel:H,onShowSecondaryLabelChange:U?$:void 0,showSecondaryLabelDisabledReason:V?"":p().text("Entity types in this hierarchy don't have any secondary label pattern defined.")})),y&&q.length>0&&r().createElement(GN,{items:q,className:w.breadcrumbs}),M?r().createElement(R(),{className:w.errorMessage},M):r().createElement(wN,{isGraphView:h,config:t,tree:i,onTreeChanged:Q,mode:s,onNodeMoved:te,onParentsRequested:X,onChildrenRequested:Z,onToggleNodeCheckbox:ne,checkedNodes:L})))})),tj=(0,i.createGenerateClassName)({productionPrefix:"hierarchyTree",disableGlobal:!0}),nj=e=>{let{config:t,store:n,onResize:a=u.identity,className:l,isGraphView:s}=e;return r().createElement(o.Provider,{store:n},r().createElement(kl.Provider,{value:t.id},r().createElement(i.StylesProvider,{generateClassName:tj},r().createElement(zn,{utils:IM},r().createElement(Ja,{handleHeight:!0,onResize:(e,t)=>a(Math.floor(e),Math.floor(t))}),t&&r().createElement(ej,{config:t,className:l,isGraphView:s}),r().createElement(E,null)))))},rj=(0,i.makeStyles)({hierarchyTree:{position:"relative",width:"calc(100% - 190px)",margin:"80px 95px 0",height:"calc(100% - 100px)"}}),oj=e=>{var t;let{graphTypeUri:i}=e;const a=rj(),{store:l}=(0,n.useContext)(o.ReactReduxContext),s=(0,o.useSelector)(b().selectors.getMetadata),c=(0,o.useSelector)(b().selectors.getEntity),d=null===(t=(0,Fo.getGraphTypesForEntityType)(s,c.type).find((0,u.propEq)("uri",i)))||void 0===t?void 0:t.label,p=(0,n.useMemo)((()=>({id:"___graphView___",class:Fo.ProfileViewTypes.HierarchyTree,graph:{type:i},caption:d})),[d,i]);return r().createElement(nj,{config:p,store:l,className:a.hierarchyTree,isGraphView:!0})},ij=(0,i.makeStyles)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"},rightBottomControls:{position:"absolute",zIndex:100,right:"18px",bottom:"16px",display:"flex",width:"200px"},zoomSlider:{flexGrow:1,marginRight:"8px"}}),aj=Md(Rd,(e=>{let{data:t,graphologyGraph:n,selectedEntity:r,onEntitySelect:o,onCollapseEntity:i,onExpandEntity:a,relationshipTable:{filters:l},graphTypeUri:s,layout:c,setLayout:u}=e;return{data:t,graph:n,selectedNode:null==r?void 0:r.uri,onNodeSelect:o,onNodeCollapse:i,onNodeExpand:a,filters:l,graphTypeUri:s,layout:c,setLayout:u}}),(e=>{let{data:t,graph:n,selectedNode:o,onNodeSelect:i,onNodeCollapse:a,onNodeExpand:l,filters:s,graphTypeUri:c,layout:u,setLayout:d}=e;const p=ij(),h={data:t,graph:n,selectedNode:o,layout:u,onNodeClick:i,onNodeCollapse:a,onNodeExpand:l,filters:s};return r().createElement("div",{className:p.wrapper},r().createElement("div",{className:p.selectors},r().createElement(dM,null),r().createElement(hM,{value:u,onChangeHandler:d,graphTypeUri:c})),r().createElement("div",{className:p.graph},u===Fo.GraphLayout.TREE?r().createElement(oj,{graphTypeUri:c}):n&&r().createElement(MP,null,r().createElement(r().Fragment,null,r().createElement(fM,null),u===Fo.GraphLayout.SIMPLE_NETWORK||u===Fo.GraphLayout.DIRECTED_NETWORK?r().createElement(eM,h):r().createElement(cM,h),r().createElement("div",{className:p.rightBottomControls},r().createElement(kM,{className:p.zoomSlider,min:30,max:300}),r().createElement(MM,{node:o}))))))})),lj=(0,i.makeStyles)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),sj=(0,n.memo)((e=>{let{graphTypeUri:t,graphLayout:i}=e;const a=lj(),l=(0,o.useSelector)(b().selectors.getEntity),s=((e,t,r)=>{const{layout:i,setLayout:a}=(e=>{const[t,r]=(0,n.useState)(Fo.GraphLayout.SIMPLE_NETWORK);return(0,n.useEffect)((()=>{const t=Object.values(Fo.GraphLayout).some((t=>e===t));t&&r(e)}),[e]),{layout:t,setLayout:r}})(r),{graphTypeUri:l,setGraphTypeUri:s}=((e,t,r)=>{const[i,a]=(0,n.useState)(null),l=(0,o.useSelector)(b().selectors.getMetadata);return(0,n.useEffect)((()=>{const n=(0,Fo.getGraphTypesForEntityType)(l,e.type).some((e=>{let{uri:n}=e;return t===n}));n&&a(t)}),[t,e,l]),{graphTypeUri:i,setGraphTypeUri:e=>{a(e),e||r(Fo.GraphLayout.SIMPLE_NETWORK)}}})(e,t,a),{graphLoading:c,data:d,graphologyGraph:h,onAddRelation:f,onDeleteRelation:g,onCollapseEntity:m,onExpandEntity:y}=fd(e,l,i),{selectedEntity:x,onEntitySelect:w,selectedEntityLoading:S}=((e,t)=>{const r=Ml(),i=(0,o.useDispatch)(),[a,l]=(0,n.useState)(null),s=(0,n.useRef)({}),[c,d]=(0,n.useState)(!1),h=(0,n.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,Fo.getEntity)(e).then((e=>(s.current=md(s.current,e),e)))}),[]),f=(0,n.useCallback)((e=>{var n;const o=null==t||null===(n=t.entities)||void 0===n?void 0:n.find((0,u.propEq)("uri",e));o&&l(o),d(!0),r(h(e)).then(l).catch((e=>{i(v.ui.actions.errorSet((0,Fo.getRequestErrorMessage)(e,p().text("Something went wrong"))))})).finally((()=>{d(!1)}))}),[i,t,r,h]);return(0,n.useEffect)((()=>{null!=e&&e.uri&&(s.current=md({},e),f(e.uri))}),[null==e?void 0:e.uri]),(0,n.useEffect)((()=>{const n=null==t?void 0:t.entities.find((e=>(null==a?void 0:a.uri)===e.uri));n||(null!=e&&e.uri?(s.current=md({},e),f(e.uri)):(s.current={},l(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:a,onEntitySelect:f}})(e,d);return{graphLoading:c,data:d,graphologyGraph:h,selectedEntity:x,selectedEntityLoading:S,graphTypeUri:l,relationshipTable:xd({data:d,selectedEntityUri:null==x?void 0:x.uri,mainEntityUri:null==e?void 0:e.uri,graphTypeUri:l}),layout:i,onAddRelation:f,onDeleteRelation:g,onCollapseEntity:m,onExpandEntity:y,onEntitySelect:w,setGraphTypeUri:s,setLayout:a}})(l,t,i),{graphLoading:c,layout:d}=s,h=d===Fo.GraphLayout.TREE,{tabs:f}={tabs:(0,n.useMemo)((()=>[{buttonProps:{id:BT.Relationship,icon:HT,tooltipTitle:p().text("Relationship"),showForDisabled:!0},content:r().createElement(fT,null)},{buttonProps:{id:BT.EntityDetails,icon:wd.Z,tooltipTitle:p().text("Entity Details"),showForDisabled:!0},content:r().createElement(LT,null)}]),[])};return r().createElement(Rd.Provider,{value:s},r().createElement("div",{className:a.perspectiveView},c&&r().createElement(Ho,null),(null==l?void 0:l.uri)&&r().createElement("div",{className:a.graphContainer},r().createElement(ji,{disabled:h,perspectiveId:"graph",buttonsProps:(0,u.pluck)("buttonProps",f)},r().createElement("div",{className:a.graphWrapper},r().createElement(td,{entity:l}),r().createElement(aj,null)),r().createElement(WT,{tabs:f})))))}));sj.displayName="GraphPerspectiveView";const cj=sj,uj=(0,i.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),dj=e=>{let{store:t,graphTypeUri:n,graphLayout:a}=e;return r().createElement(o.Provider,{store:t},r().createElement(i.StylesProvider,{generateClassName:uj},r().createElement(zn,{utils:zo},r().createElement(cj,{graphTypeUri:n,graphLayout:a}),r().createElement(E,{showErrorFromStore:!0}))))}})(),f})()}));
|