/*! * Licensed Materials - Property of IBM * IBM Cognos Products: Modeling UI * (C) Copyright IBM Corp. 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ (window.caModellingPerspective=window.caModellingPerspective||[]).push([[31],{1205:function(t,e,n){"use strict";n.d(e,"b",function(){return c}),n.d(e,"c",function(){return s}),n.d(e,"a",function(){return u});var r=n(1010),o=n.n(r),i=n(41),a=n(774);function c(t){return t?Object(i.d)(t):o.a}function s(t,e){var n=t[0],r=t[1],o=e.x,i=e.y,a=e.width,c=e.height;return o<=n&&o+a>=n&&i<=r&&i+c>=r}function u(t){return a.COLUMN_WIDTH-2*a.MARGIN-(t.isFact?a.MARGIN:t.isKey?3*a.MARGIN+2*a.ICON_SIZE:2*a.MARGIN+a.ICON_SIZE)}},1206:function(t,e,n){var r=n(1414);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0};n(36)(r,o);r.locals&&(t.exports=r.locals)},1409:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return k});var r,o,i,a,c,s,u,p,l,d,m,y,f,g,O,_,b,v=n(90),h=n.n(v),I=n(6),T=n(1896),N=n(0),S=n.n(N),z=n(1204),A=n.n(z),C=n(5),R=n(14),E=n(2),j=n(9),D=n(8),G=n(4),L=n(1205),P=n(774);function w(){return(w=Object.assign||function(t){for(var e=1;e0?i.forEach(function(t){return e.edges.push({id:""+t+P.EDGE_SEPARATOR+n.getIdentifier(),sources:[t],targets:[n.getIdentifier()]})}):e.edges.push({id:""+P.ROOT_GROUP+P.EDGE_SEPARATOR+n.getIdentifier(),sources:[P.ROOT_GROUP],targets:[n.getIdentifier()]}),e.children.push(r)}),e},n.generateDataForLayout=function(t){var e={},n={id:P.ROOT_GROUP,height:this.layoutOptions.ROOT_HEIGHT,width:this.layoutOptions.ROOT_WIDTH};return e.id="NormalizationLayoutData",e.properties={"elk.algorithm":"layered","elk.direction":this.layoutOptions.DIRECTION},e.children=[n],t&&t.children&&(e.children=e.children.concat(t.children.map(function(t){var e=t.items.map(function(t){return w({width:P.COLUMN_WIDTH,height:P.COLUMN_HEIGHT},t)});return{id:t.id,width:P.GROUP_WIDTH,height:P.GROUP_HEIGHT+P.EXTRA_COLUMN_HEIGHT*(t.items.length-1),items:e}}))),e.edges=[],t&&t.edges&&(e.edges=t.edges.map(function(t){return{id:t.id,sources:t.sources,targets:t.targets}})),e},n.sortLayoutData=function(t){var e=this;return t.children.sort(function(t,n){var r=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?t:n,o=e.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION?n:t;return r.xo.x?1:r.yo.sections[0].startPoint.x?1:r.sections[0].startPoint.y-1},n.getAncestorGroups=function(t,e){for(var n=this,r=[],o=e.getParentGroupRef(),i=function(e){var i=o[e],a=t.find(function(t){return t.getIdentifier()===i}),c=n.getAncestorGroups(t,a);r.push(i),c&&c.length>0&&(r=r.concat(c))},a=0;a-1},n.canCreateLinkToGroup=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup(),r=n.find(function(e){return e.getIdentifier()===t}),o=n.find(function(t){return t.getIdentifier()===e});return r&&o&&r!==o&&!this.hasExistingLink(r,o)&&!this.isAncestorGroup(n,o,r)},n.isLinkedToDummy=function(t){return!!t&&0===t.indexOf(P.ROOT_GROUP)},n.getItemLabel=function(t){var e=S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject);return e&&e.getLabel()||t},n.isFactItem=function(t){var e=S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject);return e&&e.getUsage()===S.a.UsageType.FACT||!1},n.getQueryItemById=function(t){return S.a.QuerySubjectUtils.getQueryItemById(t,this.querySubject)},n._addNormalizationGroup=function(t,e){t.getItemNormalization()||t.setItemNormalization(this.provider.getObjectFactory().createItemNormalizationType()),t.getItemNormalization().addItemNormalizationGroup(e)},n._generateNormalizationKey=function(t){return this.provider.getJSONObjectFactory().createItemNormalizationGroupTypeKey({itemRef:t,keyConstraint:S.a.KeyConstraintType.REPEATING,keyComposition:S.a.KeyCompositionType.USE_PARENT})},n._generateNormalizationAttribute=function(t,e){return this.provider.getJSONObjectFactory().createItemNormalizationGroupTypeAttribute({itemRef:e,sqlOperator:S.a.SqlOperatorType.MINIMUM})},n._generateNormalizationGroup=function(t,e){var n=this.provider.getObjectFactory().createItemNormalizationGroupType();return n.setLabel(e),S.a.ModuleUtils.generateObjectId(t,n),this.isFactItem(e)?n.addAttribute(this._generateNormalizationAttribute(t,e)):n.setKey(this._generateNormalizationKey(e)),n},n._swapKeyAndAttribute=function(t,e,n){var r=this._generateNormalizationAttribute(e,t.getKey().getItemRef()),o=this._generateNormalizationKey(n.getItemRef());t.removeAttribute(n),t.addAttributeAt(0,r),t.setKey(o)},n._addAttribute=function(t,e,n){var r=this.querySubject,o=r.getItemNormalization().getItemNormalizationGroup(),i=o.find(function(e){return e.getIdentifier()===t}),a="string"==typeof e?this._generateNormalizationAttribute(r,e):e;if(i){o.some(function(t){return t.getKey()&&t.getKey().getItemRef()===e||t.getAttribute().some(function(t){return t.getItemRef()===e})})&&Object(G.deleteNormalizationAttribute)(r,e);var c=!!i.getKey();0===n?c?this._swapKeyAndAttribute(i,r,a):i.setKey(this._generateNormalizationKey(e)):null!=n?i.addAttributeAt(n-(c?1:0),a):i.addAttribute(a)}},n.createLink=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup(),r=n.find(function(e){return e.getIdentifier()===t}),o=n.find(function(t){return t.getIdentifier()===e});this.canCreateLinkToGroup(t,e)&&o.addParentGroupRef(r.getIdentifier())},n.removeLink=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(t){return t.getIdentifier()===e}),r=n.getParentGroupRef().indexOf(t);r>-1&&n.removeParentGroupRefAt(r)},n.createGroup=function(t){var e=this;if(void 0===t&&(t=[]),0!==t.length){var n,r=this.querySubject,o=t.slice(),i=t.findIndex(function(t){return t.getUsage()===S.a.UsageType.IDENTIFIER});if(-1===i&&(i=t.findIndex(function(t){return t.getUsage()===S.a.UsageType.ATTRIBUTE})),i>-1)n=o.splice(i,1)[0];else n=o.splice(0,1)[0];r.getItemNormalization()&&r.getItemNormalization().getItemNormalizationGroup().length&&Object(G.deleteNormalizationAttribute)(r,n.getIdentifier());var a=this._generateNormalizationGroup(r,n.getIdentifier());this._addNormalizationGroup(r,a),o.forEach(function(t){Object(G.deleteNormalizationAttribute)(e.querySubject,t.getIdentifier()),e._addAttribute(a.getIdentifier(),t.getIdentifier())})}},n.createGroupFromDnD=function(t){if(this){var e=this.getValidSelection(t);this.createGroup(e)}},n.removeGroup=function(t){var e=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return t===e.getIdentifier()});e&&Object(G.deleteNormalizationGroup)(this.querySubject,e)},n.removeGroups=function(){for(var t=this.querySubject.getItemNormalization(),e=t.getItemNormalizationGroup();e.length>0;)t.removeItemNormalizationGroupAt(0);this.querySubject.setItemNormalization(null)},n.addAttributesToGroup=function(t,e,n){var r=this,o=[];e.forEach(function(t){var e=r.getQueryItemById(t);if(r.getNormalizationGroup(e)){var n=Object(G.deleteNormalizationAttribute)(r.querySubject,t,!0);n&&o.push(n)}}),e.forEach(function(e,i){var a=o.find(function(t){return t.getItemRef()===e});r._addAttribute(t,a||e,n+i)})},n.removeAttributes=function(t){var e=this;t.forEach(function(t){Object(G.deleteNormalizationAttribute)(e.querySubject,t)})},n.onItemMenu=function(t){var e=t.coordinates,n=e[0],r=e[1],o=t.ids,i=t.action;(i!==P.NORMALIZATION_ACTION.LINK||i===P.NORMALIZATION_ACTION.LINK&&o.length>0)&&this.provider.showContextMenu(this,P.NORMALIZATION,{ids:o,action:i,activeElement:document.activeElement},n,r)},n._setKeyComposition=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getKey()&&e.getKey().getItemRef()===t});n&&n.getKey().setKeyComposition(e)},n.setKeyCompositions=function(t,e){var n=this;t.forEach(function(t){n._setKeyComposition(t,e)})},n._setKeyConstraint=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getKey()&&e.getKey().getItemRef()===t});n&&n.getKey().setKeyConstraint(e)},n.setKeyConstraints=function(t,e){var n=this;t.forEach(function(t){n._setKeyConstraint(t,e)})},n._setAttributeSqlOperator=function(t,e){var n=this.querySubject.getItemNormalization().getItemNormalizationGroup().find(function(e){return e.getAttribute().some(function(e){return e.getItemRef()===t})});n&&n.getAttribute().find(function(e){return e.getItemRef()===t}).setSqlOperator(e)},n.setAttributeSqlOperators=function(t,e){var n=this;t.forEach(function(t){n._setAttributeSqlOperator(t,e)})},n.setCurrentDropTarget=function(t,e){var n=this.currentDropTarget;t?n&&n.attributeRef===t&&n.hoveredBelow===e||(this.currentDropTarget={attributeRef:t,hoveredBelow:e}):this.currentDropTarget=null},n.setAllowHoverStates=function(t){void 0===t&&(t=!1),this.allowHoverStates=t},n.setLayoutOptions=function(t){this.layoutOptions=t},n.setSelection=function(t){this.selectedItems=t},function(t,e,n){e&&M(t.prototype,e),n&&M(t,n)}(e,[{key:"layoutOptions",get:function(){if(!this.querySubject)return P.LAYOUT_OPTIONS.HORIZONTAL;var t=Object(D.getObjectProperty)(this.querySubject,j.m);return t?(t.ROOT_HEIGHT||(t.ROOT_HEIGHT=t.DIRECTION===P.LAYOUT_OPTIONS.VERTICAL.DIRECTION?P.LAYOUT_OPTIONS.VERTICAL.ROOT_HEIGHT:P.LAYOUT_OPTIONS.HORIZONTAL.ROOT_HEIGHT),t.ROOT_WIDTH||(t.ROOT_WIDTH=t.DIRECTION===P.LAYOUT_OPTIONS.VERTICAL.DIRECTION?P.LAYOUT_OPTIONS.VERTICAL.ROOT_WIDTH:P.LAYOUT_OPTIONS.HORIZONTAL.ROOT_WIDTH),t):P.LAYOUT_OPTIONS.HORIZONTAL},set:function(t){Object(D.setObjectProperty)(this.querySubject,j.m,t)}},{key:"isHorizontalLayout",get:function(){return this.layoutOptions.DIRECTION===P.LAYOUT_OPTIONS.HORIZONTAL.DIRECTION}},{key:"selectedQuerySubject",get:function(){return this.querySubject}},{key:"layoutDataPromise",get:function(){var t=this,e=new A.a;return Object(T.a)(e.layout(this.generateDataForLayout(this.prepareDataForLayout())).then(function(e){return t.sortLayoutData(e)}))}},{key:"layoutData",get:function(){var t=this.querySubject&&this.querySubject.getItemNormalization()&&this.querySubject.getItemNormalization().getItemNormalizationGroup().length&&this.layoutDataPromise.value;return t&&t.children&&t.children.forEach(function(t){t.items&&t.items.forEach(function(e,n){e.x=t.x+P.MARGIN,e.y=t.y+P.MARGIN+P.EXTRA_COLUMN_HEIGHT*n})}),t}},{key:"layoutDataPending",get:function(){return!!(this.querySubject&&this.querySubject.getItemNormalization()&&this.querySubject.getItemNormalization().getItemNormalizationGroup().length&&this.layoutDataPromise.isPending())}},{key:"selectedItems",get:function(){return this.getValidSelection(this.provider.getSelection())},set:function(t){this.provider.setSelection(t)}},{key:"selectedItemsRefs",get:function(){return this.selectedItems.map(function(t){return t.getIdentifier()})}}]),e}(C.a),_.defaultProvider={getSelection:function(){return[]},setSelection:function(){}},f=H((y=b).prototype,"querySubject",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=H(y.prototype,"currentDropTarget",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=H(y.prototype,"allowHoverStates",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),H(y.prototype,"layoutOptions",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutOptions"),y.prototype),H(y.prototype,"isHorizontalLayout",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"isHorizontalLayout"),y.prototype),H(y.prototype,"selectedQuerySubject",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedQuerySubject"),y.prototype),H(y.prototype,"layoutDataPromise",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutDataPromise"),y.prototype),H(y.prototype,"layoutData",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"layoutData"),y.prototype),H(y.prototype,"selectedItems",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedItems"),y.prototype),H(y.prototype,"selectedItemsRefs",[I.computed],Object.getOwnPropertyDescriptor(y.prototype,"selectedItemsRefs"),y.prototype),H(y.prototype,"getLinkedGroupIds",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getLinkedGroupIds"),y.prototype),H(y.prototype,"getNormalizationGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getNormalizationGroup"),y.prototype),H(y.prototype,"getAttributeIndex",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getAttributeIndex"),y.prototype),H(y.prototype,"getValidSelection",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getValidSelection"),y.prototype),H(y.prototype,"hasExistingLink",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"hasExistingLink"),y.prototype),H(y.prototype,"getAncestorGroups",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getAncestorGroups"),y.prototype),H(y.prototype,"isAncestorGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isAncestorGroup"),y.prototype),H(y.prototype,"canCreateLinkToGroup",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"canCreateLinkToGroup"),y.prototype),H(y.prototype,"isLinkedToDummy",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isLinkedToDummy"),y.prototype),H(y.prototype,"getItemLabel",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getItemLabel"),y.prototype),H(y.prototype,"isFactItem",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"isFactItem"),y.prototype),H(y.prototype,"getQueryItemById",[C.j],Object.getOwnPropertyDescriptor(y.prototype,"getQueryItemById"),y.prototype),H(y.prototype,"createLink",[o],Object.getOwnPropertyDescriptor(y.prototype,"createLink"),y.prototype),H(y.prototype,"removeLink",[i],Object.getOwnPropertyDescriptor(y.prototype,"removeLink"),y.prototype),H(y.prototype,"createGroup",[a],Object.getOwnPropertyDescriptor(y.prototype,"createGroup"),y.prototype),H(y.prototype,"createGroupFromDnD",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"createGroupFromDnD"),y.prototype),H(y.prototype,"removeGroup",[c],Object.getOwnPropertyDescriptor(y.prototype,"removeGroup"),y.prototype),H(y.prototype,"removeGroups",[s],Object.getOwnPropertyDescriptor(y.prototype,"removeGroups"),y.prototype),H(y.prototype,"addAttributesToGroup",[u],Object.getOwnPropertyDescriptor(y.prototype,"addAttributesToGroup"),y.prototype),H(y.prototype,"removeAttributes",[p],Object.getOwnPropertyDescriptor(y.prototype,"removeAttributes"),y.prototype),H(y.prototype,"onItemMenu",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"onItemMenu"),y.prototype),H(y.prototype,"setKeyCompositions",[l],Object.getOwnPropertyDescriptor(y.prototype,"setKeyCompositions"),y.prototype),H(y.prototype,"setKeyConstraints",[d],Object.getOwnPropertyDescriptor(y.prototype,"setKeyConstraints"),y.prototype),H(y.prototype,"setAttributeSqlOperators",[m],Object.getOwnPropertyDescriptor(y.prototype,"setAttributeSqlOperators"),y.prototype),H(y.prototype,"setCurrentDropTarget",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setCurrentDropTarget"),y.prototype),H(y.prototype,"setAllowHoverStates",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setAllowHoverStates"),y.prototype),H(y.prototype,"setLayoutOptions",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setLayoutOptions"),y.prototype),H(y.prototype,"setSelection",[C.c],Object.getOwnPropertyDescriptor(y.prototype,"setSelection"),y.prototype),y)},1413:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return h});var r,o=n(1),i=n.n(o),a=n(20),c=n.n(a),s=n(16),u=n(19),p=n(3),l=n(278),d=n.n(l),m=n(5),y=n(63),f=n(2),g=n(774),O=(n(1206),n(1415));function _(){return(_=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,["hoveredActive","className"]);return i.a.createElement(p.Container,_({},r,{className:Object(p.classnames)(n,{active:e})}))},e}(o.Component),{dropItemType:[y.d,y.f],scrollable:!0,simpleHoverStates:!1}),h=Object(m.e)(function(t){return{selectedQuerySubject:t.selectedQuerySubject,layoutData:t.layoutData,layoutDataPending:t.layoutDataPending,isHorizontalLayout:t.isHorizontalLayout,allowHoverStates:t.allowHoverStates,getValidSelection:t.getValidSelection,selectedItems:t.selectedItems.slice(),setCurrentDropTarget:t.setCurrentDropTarget,createGroup:t.createGroup,setLayoutOptions:t.setLayoutOptions}})(r=Object(u.withErrorHandling)()(r=Object(s.observer)(r=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o0)},e._onDrop=function(t,n,r){var o=n.items,i=r.getItemType(),a=[];i===y.f?a=e.props.selectedItems:i===y.d&&(a=e.props.getValidSelection(o)),e.props.createGroup(a)},e._onHover=function(){e.props.setCurrentDropTarget(null)},e._renderEmpty=function(){return i.a.createElement(u.EmptyState,{icon:d.a,header:Object(f.getString)("normalizeTable"),body:Object(f.getString)("normalizeTableDetails")})},e._ref=function(t){e._node=c.a.findDOMNode(t)},e._renderNormalizationCanvas=function(t){return i.a.createElement(p.FlexLayout,{direction:"column"},i.a.createElement(p.FlexLayout,{direction:"row"},t&&i.a.createElement(p.FlexItem,{className:"bi-mui-normalization-title",gutter:[3,2,3,2],"aria-label":t,shrink:!0},i.a.createElement(p.TruncatedText,{value:t})),i.a.createElement(p.FlexItem,{align:"right",gutter:[2,1]},i.a.createElement(p.Button,{intent:"primary",variant:e.props.isHorizontalLayout?"solid":"frameless",label:Object(f.getString)("normalizationViewHorizontal"),"aria-label":Object(f.getString)("normalizationViewHorizontal"),onClick:function(){return e.props.setLayoutOptions(g.LAYOUT_OPTIONS.HORIZONTAL)}})),i.a.createElement(p.FlexItem,{gutter:[2,2,2,1]},i.a.createElement(p.Button,{intent:"primary",variant:e.props.isHorizontalLayout?"frameless":"solid",label:Object(f.getString)("normalizationViewVertical"),"aria-label":Object(f.getString)("normalizationViewVertical"),onClick:function(){return e.props.setLayoutOptions(g.LAYOUT_OPTIONS.VERTICAL)}}))),i.a.createElement(p.Separator,null),i.a.createElement(p.FlexItem,{gutter:[0,0,0,.5]},i.a.createElement(O.a,null)))},e}return b(e,t),e.prototype.render=function(){var t=this.props,e=t.selectedQuerySubject,n=t.allowHoverStates,r=t.layoutData,o=!t.layoutDataPending&&(null==r||null!=r&&r.children&&1===r.children.length),a=e&&e.getLabel&&Object(f.getString)("normalizeTable")+" - "+e.getLabel(),c=e&&!o&&null!=r&&r.children&&r.children.length>1;return i.a.createElement(v,{className:Object(p.classnames)("bi-mui-normalization-container",{disabledHovers:!n}),ref:this._ref,id:"NormalizationTab","aria-label":c&&Object(f.getString)("normalizationALGroups",{groups:r.children.length-1})||"",height:"100%",width:"100%",onDrop:this._onDrop,canDrop:this._canDrop,onHover:this._onHover,tabIndex:0},o?this._renderEmpty():this._renderNormalizationCanvas(a))},e}(o.Component))||r)||r)||r},1414:function(t,e,n){(t.exports=n(32)(void 0)).push([t.i,'.bi-mui-normalization-title{font-size:14px;font-weight:700;color:#343334}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__attribute:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__attribute:hover,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__border:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__border:hover,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__fact:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__fact:hover{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__action:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__action:hover{stroke:#5392ff;stroke-width:1px}.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__path:focus,.bi-mui-normalization-container:not(.is-disabledHovers) .bi-mui-normalization-container__canvas__path:hover{stroke-width:4px}.bi-mui-normalization-container{overflow:auto}.bi-mui-normalization-container.is-active:after{border:2px dashed;content:"";position:absolute;left:0;top:0;right:0;bottom:0;border-color:blue}.bi-mui-normalization-container__canvas{min-width:100%;min-height:100%;stroke-width:2px}.bi-mui-normalization-container__canvas.is-connecting .bi-mui-normalization-container__canvas__path,.bi-mui-normalization-container__canvas.is-connecting .bi-mui-normalization-container__canvas__path__aligner{opacity:.5}.bi-mui-normalization-container__canvas__attribute{fill:#e1ebf7}.bi-mui-normalization-container__canvas__attribute.selected{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container__canvas__fact{fill:#f7e4fb}.bi-mui-normalization-container__canvas__fact.selected{stroke:#5392ff;stroke-width:2px}.bi-mui-normalization-container__canvas__dropZone{fill:none}.bi-mui-normalization-container__canvas__dropZone:hover{pointer-events:none}.bi-mui-normalization-container__canvas__dropZoneHighlight{stroke:#5392ff;stroke-dasharray:4}.bi-mui-normalization-container__canvas__dropZoneHighlight:hover{pointer-events:none}.bi-mui-normalization-container__canvas__action rect{cursor:pointer;fill:transparent}.bi-mui-normalization-container__canvas__icon,.bi-mui-normalization-container__canvas__label{fill:#000;pointer-events:none;user-select:none}.bi-mui-normalization-container__canvas__icon.invalid,.bi-mui-normalization-container__canvas__label.invalid{fill:#e62325}.bi-mui-normalization-container__canvas__border{fill:#fff;stroke:#a6a5a6;stroke-width:1px}.bi-mui-normalization-container__canvas__border__aligner{fill:none;stroke:#1f57a4}.bi-mui-normalization-container__canvas__border.validForLinkCreation{stroke:#00aa5e;stroke-width:2px}.bi-mui-normalization-container__canvas__border.validForLinkCreation:hover{stroke-width:4px}.bi-mui-normalization-container__canvas__border.validForLinkCreation~*{pointer-events:none}.bi-mui-normalization-container__canvas__border.invalidForLinkCreation{cursor:no-drop}.bi-mui-normalization-container__canvas__border.invalidForLinkCreation~*{pointer-events:none}.bi-mui-normalization-container__canvas__path,.bi-mui-normalization-container__canvas__path__aligner{fill:none;stroke:#1f57a4}.bi-mui-normalization-container__canvas__connector circle{stroke:#1f57a4;stroke-width:1px;fill:#fff}.bi-mui-normalization-container__canvas__connector circle:hover{stroke-width:2px}.bi-mui-normalization-container__canvas__connector svg{fill:#1d3458}.bi-mui-normalization-container__canvas__drawing{fill:none;stroke-width:3px;stroke:#00aa5e}',""])},1415:function(t,e,n){"use strict";n.d(e,"a",function(){return At});var r,o,i=n(0),a=n.n(i),c=n(1),s=n.n(c),u=n(759),p=n(16),l=n(3),d=n(1416),m=n.n(d),y=n(1010),f=n.n(y),g=n(123),O=n.n(g),_=n(1417),b=n.n(_),v=n(1418),h=n.n(v),I=n(1419),T=n.n(I),N=n(1420),S=n.n(N),z=n(1421),A=n.n(z),C=n(1422),R=n.n(C),E=n(302),j=n.n(E),D=n(5),G=n(2),L=n(1207),P=n(277),w=n(1205),x=n(774),M=(n(1206),n(1423)),K=n(1424);var H=1e3,k=150,U="NormalizationContainer__columnGroups",q="NormalizationContainer__links",B="columnGroup",F="columnGroupBorder",Q="columnGroupLink",V="columnGroupConnector",Z="columnContainer",Y="Attribute",W="Icon",J="Label",X="DropZone",$="DrawingConnector",tt="bi-mui-normalization-container__canvas",et=tt+"__attribute",nt=tt+"__columnContainer",rt=tt+"__fact",ot=tt+"__icon",it=tt+"__action",at=tt+"__label",ct=tt+"__dropZone",st=tt+"__path",ut=tt+"__drawing",pt=tt+"__border",lt=it+"__title",dt=pt+"__aligner",mt=st+"__aligner",yt="selected",ft="invalid",gt="invalidForLinkCreation",Ot="validForLinkCreation",_t=tt+"__connector",bt="data-d3-id",vt="data-d3-type",ht="KEY_ACTION_CONSTRAINT",It="KEY_ACTION_COMPOSITION",Tt="ATTRIBUTE_ACTION_OPERATOR",Nt=((r={})[a.a.SqlOperatorType.GROUP_BY.toString()]=O.a,r[a.a.SqlOperatorType.MINIMUM.toString()]=h.a,r[a.a.SqlOperatorType.MAXIMUM.toString()]=T.a,r[a.a.SqlOperatorType.AVERAGE.toString()]=S.a,r[a.a.KeyConstraintType.REPEATING.toString()]=A.a,r[a.a.KeyConstraintType.UNIQUE.toString()]=R.a,r[a.a.KeyCompositionType.USE_PARENT.toString()]=m.a,r[a.a.KeyCompositionType.INDEPENDENT.toString()]=b.a,r);function St(t){return"["+bt+"="+t+"]"}function zt(t){return"["+vt+"="+t+"]"}var At=Object(D.e)(function(t){return{normalizationStore:t,selectedQuerySubject:t.selectedQuerySubject,selectedItems:t.selectedItems,selectedItemsRefs:t.selectedItemsRefs,layoutData:t.layoutData,layoutOptions:t.layoutOptions,isLinkedToDummy:t.isLinkedToDummy,isHorizontalLayout:t.isHorizontalLayout,getQueryItemById:t.getQueryItemById,canCreateLinkToGroup:t.canCreateLinkToGroup,getLinkedGroupIds:t.getLinkedGroupIds,createLink:t.createLink,onItemMenu:t.onItemMenu,setSelection:t.setSelection,setAllowHoverStates:t.setAllowHoverStates,setAttributeSqlOperators:t.setAttributeSqlOperators,setKeyConstraints:t.setKeyConstraints,setKeyCompositions:t.setKeyCompositions,removeAttributes:t.removeAttributes,removeGroup:t.removeGroup,removeGroups:t.removeGroups,removeLink:t.removeLink}})(o=Object(P.a)(function(t){return t.normalizationStore&&!t.normalizationStore.layoutDataPending})(o=Object(p.observer)(o=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;om&&(c.text(function(t){return Object(L.e)(t.label,d,m)}),o.append("title").text(function(t){return t.label})),c.transition().duration(H).attr("x",function(t){return t.x+2*x.MARGIN}).attr("y",function(t){return t.y+1.5*x.MARGIN}),s.transition().duration(H).attr("x",function(t){return t.x-x.MARGIN}).attr("y",function(t){return t.y-x.MARGIN/2}).attr("width",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_WIDTH+2*x.MARGIN}).attr("height",function(t){return t.id===x.ROOT_GROUP?0:x.COLUMN_HEIGHT+x.MARGIN}),l(It,Nt[t.keyComposition],t.isKey),l(ht,Nt[t.keyConstraint],t.isKey,24),l(Tt,Nt[t.sqlOperator],!t.isKey)},e._handleColumnMouseDown=function(t){var n=e.props.getQueryItemById(t.id,e.props.selectedQuerySubject);if(n){var r=u.event;if(r.ctrlKey||r.metaKey){var o=e.props.selectedItems.slice(),i=o.findIndex(function(t){return t.getIdentifier()===n.getIdentifier()});i>-1&&o.length>1?o.splice(i,1):-1===i&&o.push(n),e.props.setSelection(o)}else e.props.setSelection([n])}else e.props.setSelection([])},e._renderColumns=function(t,n){var r=n.items,o=t.selectAll("g").filter(Object(L.c)(zt(Z))).data(r,function(t){return t.id});o.exit().transition().duration(H).style("opacity",0).remove(),o.enter().append("g").attr(bt,function(t){return t.id}).attr(vt,Z).classed(nt,!0).attr("data-column",function(t){return t.id}).on("contextmenu",function(t){var n=e.props.getQueryItemById(t.id);if(!e.props.selectedItems.find(function(t){return t.getIdentifier()===n.getIdentifier()})){var r=e.props.selectedItems.slice();r.push(n),e.props.setSelection(r)}var o=e.props.selectedItems;e._onMenu(o.map(function(t){return t.getIdentifier()}),x.NORMALIZATION_ACTION.ATTRIBUTE),u.event.preventDefault()}).on("mousedown",function(t){e._handleColumnMouseDown(t)}).on("keydown",function(t){32===u.event.keyCode&&e._handleColumnMouseDown(t),46===u.event.keyCode&&e.props.removeAttributes(e.props.selectedItemsRefs)}).style("opacity",0).each(function(n){return e._renderColumn(n,t)}).style("opacity",1),o.transition().duration(H).each(function(n){return e._renderColumn(n,t)})},e._handleConnectorMouseDown=function(t){var n=e._select(U).selectAll("rect").filter(Object(L.c)(zt(F)));n.classed(Ot,function(n){return e.props.canCreateLinkToGroup(t.id,n.id)}),n.classed(gt,function(n){return!e.props.canCreateLinkToGroup(t.id,n.id)}),e._select(U).selectAll("g").filter(Object(L.c)(zt(B))).filter(function(n){return n.id!==t.id&&!e.props.canCreateLinkToGroup(t.id,n.id)}).style("opacity",.5),e._startConnectorDrawing(t),e.props.setAllowHoverStates(!1)},e._getGroupDimensions=function(t){var n=e._select(B,t).select("rect");return{x:parseFloat(n.attr("x")),y:parseFloat(n.attr("y")),width:parseFloat(n.attr("width")),height:parseFloat(n.attr("height"))}},e._handleMouseMove=function(){if(e._activeConnectGroup){var t=u.mouse(u.event.currentTarget),n=t[0],r=t[1];e._select($).attr("d",e._generateConnectorPath(e._startingLinePoint,{x:n,y:r})),u.event.preventDefault()}},e._handleMouseUp=function(){if(e._activeConnectGroup){var t=u.mouse(u.event.currentTarget),n=e._select(U).selectAll("rect").filter(Object(L.c)(zt(F))),r=n.filter(function(e){return Object(w.c)(t,e)}),o=r.empty()?null:r.data()[0].id;n.classed(Ot,!1),n.classed(gt,!1),e._select(U).selectAll("g").filter(Object(L.c)(zt(B))).style("opacity",1),o&&e.props.createLink(e._activeConnectGroup,o),e._endConnectorDrawing(),e.props.setAllowHoverStates(!0),u.event.preventDefault(),e._select(V).remove()}},e._handleGroupMouseMove=function(t){if(t.id!==x.ROOT_GROUP)if(e._activeConnectGroup&&e.props.canCreateLinkToGroup(e._activeConnectGroup,t.id)){var n=e.props.isHorizontalLayout?t.x:u.mouse(u.event.currentTarget)[0],r=e.props.isHorizontalLayout?u.mouse(u.event.currentTarget)[1]:t.y;e._select($).attr("d",e._generateConnectorPath(e._startingLinePoint,{x:n,y:r})),u.event.stopPropagation()}else if(!e._activeConnectGroup){var o=e._select(V);if(o.empty()){(o=e._select().append("g").attr(vt,V).classed(_t,!0)).append("circle").attr("r",x.CONNECTOR_RADIUS);var i=o.append("svg").classed(ot,!0).attr("width",x.ICON_SIZE).attr("height",x.ICON_SIZE);Object(L.d)(i,j.a)}o.select("circle").attr("cx",e.props.isHorizontalLayout?t.x+t.width:t.x+t.width/2).attr("cy",e.props.isHorizontalLayout?t.y+t.height/2:t.y+t.height).on("mousedown",e._handleConnectorMouseDown.bind(null,t)),o.select("svg").attr("x",e.props.isHorizontalLayout?t.x+t.width-x.ICON_SIZE/2:t.x+t.width/2-x.ICON_SIZE/2).attr("y",e.props.isHorizontalLayout?t.y+t.height/2-x.ICON_SIZE/2:t.y+t.height-x.ICON_SIZE/2)}},e._renderColumnGroup=function(t){var n=e._select(B,t.id),r=n.select(zt(F));r.empty()&&(r=n.append("rect").classed(t.id===x.ROOT_GROUP?dt:pt,!0).attr(vt,F).on("mousemove",e._handleGroupMouseMove).on("contextmenu",function(t){e._onMenu([t.id],t.id===x.ROOT_GROUP?x.NORMALIZATION_ACTION.GROUPS:x.NORMALIZATION_ACTION.GROUP),u.event.preventDefault()}).on("keydown",function(t){46===u.event.keyCode&&(t.id===x.ROOT_GROUP?e.props.removeGroups():e.props.removeGroup(t.id))})),r.attr("aria-label",function(){return t.id===x.ROOT_GROUP?"":Object(G.getString)("normalizationALGroup",{id:t.id,key:t.items?t.items.filter(function(t){return t.isKey}).length:0,attributes:t.items?t.items.filter(function(t){return!t.isKey}).length:0})}).attr("tabindex",0).attr("focusable",!0).transition().duration(H).attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),t.id!==x.ROOT_GROUP&&e._renderColumns(n,t)},e._renderColumnGroups=function(t){var n=e._select(),r=e._select(U);r.empty()&&(r=n.append("svg").classed(tt,!0).attr(vt,U)),r.attr("width",n.width).attr("height",n.height);var o=r.selectAll("g").filter(Object(L.c)(zt(B))).data(t,function(t){return t.id});o.exit().transition().duration(H).style("opacity",0).remove(),o.enter().append("g").style("opacity",0).attr(bt,function(t){return t.id}).attr(vt,B).attr("style",function(t){return"width:"+t.width+";height:"+t.height}).each(function(t){e._renderColumnGroup(t)}).style("opacity",1),o.transition().duration(H).each(function(t){e._renderColumnGroup(t)})},e._generateConnectorPath=function(t,n){var r,o=t.x,i=t.y,a=n.x,c=n.y,s=o'});a.a.add(c),e.a=c}},["5739814cfde0a40ab6ad"])}(n(15))},1417:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([1053],{"3865314c5959606874d4":function(e,n){e.exports=t},"953f9b1fe60969330d49":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("a0111354117be1ca7043"));e.default=o.a},a0111354117be1ca7043:function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"independent_16_v7",use:"independent_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c}},["953f9b1fe60969330d49"])}(n(15))},1418:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([855],{"227b249cf771cbead25c":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"min_16_v7",use:"min_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c},"3865314c5959606874d4":function(e,n){e.exports=t},"60d4136ea9155d86a7a6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("227b249cf771cbead25c"));e.default=o.a}},["60d4136ea9155d86a7a6"])}(n(15))},1419:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([904],{"3865314c5959606874d4":function(e,n){e.exports=t},"936f6f10cc2536ec2d77":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"max_16_v7",use:"max_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c},f9b8bee3eb1aac63fb0d:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("936f6f10cc2536ec2d77"));e.default=o.a}},["f9b8bee3eb1aac63fb0d"])}(n(15))},1420:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([1898],{"0cf6f2dadae640648c4c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("66db74487f8eb4882271"));e.default=o.a},"3865314c5959606874d4":function(e,n){e.exports=t},"66db74487f8eb4882271":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"average_16_v7",use:"average_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c}},["0cf6f2dadae640648c4c"])}(n(15))},1421:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([542],{"3865314c5959606874d4":function(e,n){e.exports=t},"4172c49fbc6f3b54eea8":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"repeating_16_v7",use:"repeating_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c},b98c292b3ae01727db0a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("4172c49fbc6f3b54eea8"));e.default=o.a}},["b98c292b3ae01727db0a"])}(n(15))},1422:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){return webpackJsonPBaGraphics([130],{"124b0419aac12c7c6e77":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("3865314c5959606874d4"),o=(n.n(r),n("579ddfa0e0934b7cd1dd"));e.default=o.a},"3865314c5959606874d4":function(e,n){e.exports=t},"579ddfa0e0934b7cd1dd":function(t,e,n){"use strict";var r=n("9689a9c94ae38b47fa2c"),o=n.n(r),i=n("9ce58a7deea14f49ef01"),a=n.n(i),c=new o.a({id:"unique_16_v7",use:"unique_16_v7-usage",viewBox:"0 0 16 16",content:''});a.a.add(c),e.a=c}},["124b0419aac12c7c6e77"])}(n(15))},1423:function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r,o=n(1),i=n(759),a=n(16),c=n(46),s=n(5),u=n(774);var p=Object(s.e)(function(t){return{normalizationStore:t,currentDropTarget:t.currentDropTarget,layoutData:t.layoutData,setCurrentDropTarget:t.setCurrentDropTarget,setAllowHoverStates:t.setAllowHoverStates}})(r=Object(c.DragLayer)(function(t){return{isDragging:t.isDragging()}})(r=Object(a.observer)(r=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o