@elyra/canvas 12.32.0 → 12.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseIteratee-e1311552.js +8 -0
- package/dist/_baseIteratee-e1311552.js.map +1 -0
- package/dist/_baseIteratee-eabd2a94.js +7 -0
- package/dist/_baseIteratee-eabd2a94.js.map +1 -0
- package/dist/{canvas-constants-0b396113.js → canvas-constants-72222288.js} +2 -2
- package/dist/{canvas-constants-0b396113.js.map → canvas-constants-72222288.js.map} +1 -1
- package/dist/{canvas-controller-293520d1.js → canvas-controller-69928ea7.js} +2 -2
- package/dist/{canvas-controller-293520d1.js.map → canvas-controller-69928ea7.js.map} +1 -1
- package/dist/common-canvas-159fb083.js +2 -0
- package/dist/common-canvas-159fb083.js.map +1 -0
- package/dist/common-canvas-318d3486.js +2 -0
- package/dist/common-canvas-318d3486.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.es.js.map +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-canvas.js.map +1 -1
- package/dist/common-properties-96c9c88a.js +2 -0
- package/dist/common-properties-96c9c88a.js.map +1 -0
- package/dist/common-properties-c5292c66.js +2 -0
- package/dist/common-properties-c5292c66.js.map +1 -0
- package/dist/{datarecord-metadata-v3-schema-cd1871c0.js → datarecord-metadata-v3-schema-dd7370da.js} +2 -2
- package/dist/{datarecord-metadata-v3-schema-cd1871c0.js.map → datarecord-metadata-v3-schema-dd7370da.js.map} +1 -1
- package/dist/flexible-table-23d61157.js +2 -0
- package/dist/flexible-table-23d61157.js.map +1 -0
- package/dist/flexible-table-4259d869.js +2 -0
- package/dist/flexible-table-4259d869.js.map +1 -0
- package/dist/icon-04f858ce.js +2 -0
- package/dist/{icon-5f3da14a.js.map → icon-04f858ce.js.map} +1 -1
- package/dist/icon-8cc7816d.js +2 -0
- package/dist/{icon-f3de6e3a.js.map → icon-8cc7816d.js.map} +1 -1
- package/dist/index-101f9560.js +2 -0
- package/dist/{index-20a7841f.js.map → index-101f9560.js.map} +1 -1
- package/dist/index-2788d55d.js +2 -0
- package/dist/{index-7ec85110.js.map → index-2788d55d.js.map} +1 -1
- package/dist/{isArrayLikeObject-5da4b548.js → isArrayLikeObject-c0bf3ab6.js} +2 -2
- package/dist/{isArrayLikeObject-5da4b548.js.map → isArrayLikeObject-c0bf3ab6.js.map} +1 -1
- package/dist/lib/canvas-controller.es.js +1 -1
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/properties/field-picker.es.js +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.es.js +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/dist/lib/tooltip.es.js +1 -1
- package/dist/lib/tooltip.es.js.map +1 -1
- package/dist/lib/tooltip.js +1 -1
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/toolbar-12f6def6.js +2 -0
- package/dist/toolbar-12f6def6.js.map +1 -0
- package/dist/toolbar-55e2020e.js +2 -0
- package/dist/toolbar-55e2020e.js.map +1 -0
- package/package.json +1 -1
- package/src/common-canvas/cc-context-toolbar.jsx +2 -1
- package/src/common-properties/ui-conditions/conditions-utils.js +9 -0
- package/src/tooltip/tooltip.jsx +5 -7
- package/stats.html +1 -1
- package/dist/_baseForOwn-2ef49e2c.js +0 -7
- package/dist/_baseForOwn-2ef49e2c.js.map +0 -1
- package/dist/_baseForOwn-33edf1a0.js +0 -8
- package/dist/_baseForOwn-33edf1a0.js.map +0 -1
- package/dist/common-canvas-b19904f0.js +0 -2
- package/dist/common-canvas-b19904f0.js.map +0 -1
- package/dist/common-canvas-ef3c716f.js +0 -2
- package/dist/common-canvas-ef3c716f.js.map +0 -1
- package/dist/common-properties-7863aacb.js +0 -2
- package/dist/common-properties-7863aacb.js.map +0 -1
- package/dist/common-properties-8b8a659b.js +0 -2
- package/dist/common-properties-8b8a659b.js.map +0 -1
- package/dist/flexible-table-865cd1c7.js +0 -2
- package/dist/flexible-table-865cd1c7.js.map +0 -1
- package/dist/flexible-table-ccced653.js +0 -2
- package/dist/flexible-table-ccced653.js.map +0 -1
- package/dist/icon-5f3da14a.js +0 -2
- package/dist/icon-f3de6e3a.js +0 -2
- package/dist/index-20a7841f.js +0 -2
- package/dist/index-7ec85110.js +0 -2
- package/dist/toolbar-9f4c1709.js +0 -2
- package/dist/toolbar-9f4c1709.js.map +0 -1
- package/dist/toolbar-c2ec8f11.js +0 -2
- package/dist/toolbar-c2ec8f11.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t,b as r}from"./createClass-be661622.js";import{_ as n,a as o,b as i,c as a}from"./getPrototypeOf-3751add9.js";import s,{Component as l}from"react";import{S as p,P as c,f as u,_ as d,C as h,t as f,T as m,a as v,s as y,l as g,e as b,b as E,I,g as S,c as C,F as R,G as T,E as _,d as k,h as w,O as L,i as A,j as D,k as O,m as P,n as N,o as x,p as B,q as M,r as F,u as V,v as U,w as H,x as j,y as z,z as q}from"./index-7ec85110.js";import{c as G,_ as W,a as $,b as X}from"./canvas-constants-0b396113.js";import{_ as K,a as Y,b as J,i as Q,c as Z,h as ee,g as te,d as re,e as ne,f as oe,k as ie,j as ae,l as se,m as le,n as pe,o as ce,p as ue,q as de,r as he,s as fe,t as me,u as ve}from"./isArrayLikeObject-5da4b548.js";import{_ as ye,a as ge,A as be,s as Ee,b as Ie,c as Se,u as Ce,d as Re,o as Te}from"./datarecord-metadata-v3-schema-cd1871c0.js";import{h as _e,_ as ke,T as we,F as Le}from"./flexible-table-ccced653.js";import{Modal as Ae,ComposedModal as De,ModalHeader as Oe,ModalBody as Pe,Button as Ne,Accordion as xe,AccordionItem as Be,Tab as Me,Tabs as Fe,Link as Ve,TextInput as Ue,TextArea as He,NumberInput as je,Checkbox as ze,Dropdown as qe,ContentSwitcher as Ge,Switch as We,PasswordInput as $e,DatePicker as Xe,DatePickerInput as Ke,Toggle as Ye,RadioButton as Je,SelectItem as Qe,Select as Ze,ComboBox as et,FilterableMultiSelect as tt,MultiSelect as rt}from"carbon-components-react";import{C as nt,a as ot,b as it,c as at,M as st,D as lt,d as pt,e as ct,T as ut,f as dt,S as ht,g as ft,h as mt,i as vt,j as yt,k as gt,l as bt,m as Et,n as It,o as St,P as Ct,p as Rt,U as Tt,q as _t,R as kt,r as wt,E as Lt,s as At,A as Dt,t as Ot,u as Pt,v as Nt,w as xt}from"./_baseForOwn-2ef49e2c.js";import{Portal as Bt}from"react-portal";import{injectIntl as Mt,FormattedDate as Ft}from"react-intl";import{connect as Vt,Provider as Ut}from"react-redux";import{Add16 as Ht,Shuffle16 as jt,Settings16 as zt,TrashCan16 as qt,Edit16 as Gt,UpToTop24 as Wt,ArrowUp24 as $t,ArrowDown24 as Xt,DownToBottom24 as Kt,Maximize16 as Yt,Minimize16 as Jt,Calculator24 as Qt,Information16 as Zt,Help16 as er,Close16 as tr}from"@carbon/icons-react";import rr from"react-dom";import{I as nr}from"./icon-5f3da14a.js";import{v4 as or}from"uuid";import ir from"./lib/tooltip.es.js";import{_ as ar}from"./extends-093996c9.js";import{combineReducers as sr,createStore as lr}from"redux";import pr from"seedrandom";import cr from"./lib/command-stack.es.js";import{isValid as ur,parse as dr,format as hr}from"date-fns";import fr from"react-inlinesvg";import mr from"prop-types";import{t as vr,T as yr}from"./toolbar-c2ec8f11.js";import{UnControlled as gr}from"react-codemirror2";import{Validator as br}from"jsonschema";var Er=K,Ir=ye,Sr=Y;var Cr=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Er(e,a);r(s,a)&&Ir(i,Sr(a,e),s)}return i},Rr=_e;var Tr=function(e,t){return Cr(e,t,(function(t,r){return Rr(e,r)}))},_r=ge((function(e,t){return null==e?{}:Tr(e,t)}));function kr(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var wr=function(r){n(i,l);var o=kr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"getCarbonModalSize",value:function(){switch(this.props.bsSize){case p.SMALL:return it;case p.LARGE:case p.MAX:return ot;case p.MEDIUM:default:return nt}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return s.createElement(Bt,null,s.createElement(Ae,{className:at("properties-modal",{noButtons:!1===this.props.showPropertiesButtons},this.props.classNames),open:!0,modalHeading:this.props.title,primaryButtonText:this.props.applyLabel,secondaryButtonText:this.props.rejectLabel,onRequestSubmit:this.props.okHandler,onSecondarySubmit:this.props.cancelHandler,"aria-label":"",size:e},s.createElement("div",{className:"properties-modal-children"},this.props.children)))}}]),i}(),Lr=wr;function Ar(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Dr=function(r){n(i,l);var o=Ar(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e="properties-editing properties-"+(void 0===this.props.bsSize?"large":this.props.bsSize),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement("div",{className:e},s.createElement("h2",null,this.props.title),s.createElement("div",{className:"properties-body"},this.props.children),t)}}]),i}(),Or=Dr;function Pr(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Nr=function(r){n(i,l);var o=Pr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.tearsheet?this.props.tearsheet.title:null,t=this.props.tearsheet?this.props.tearsheet.description:null,r=this.props.tearsheet?this.props.tearsheet.content:null,n=this.props.showPropertiesButtons&&!this.props.applyOnBlur,o=!Array.isArray(r),i=this.props.applyOnBlur?null:s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement(Bt,null,s.createElement(De,{className:at("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":u(this.props.intl,st.PROPERTIES_LABEL,{label:e}),preventCloseOnClickOutside:!0},null===e?null:s.createElement(Oe,{className:at("properties-tearsheet-header",{"with-buttons":n},{"with-tabs":o},{"hide-close-button":"function"!=typeof this.props.onCloseCallback}),title:e,buttonOnClick:this.props.onCloseCallback},t?s.createElement("p",null,t):null),s.createElement(Pe,{className:at("properties-tearsheet-body",{"with-buttons":n},{"with-tabs":o})},r),i))}}]),i}();Nr.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var xr=Mt(Nr);function Br(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Mr=function(r){n(i,l);var o=Br(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"shouldEnabledSaveButton",value:function(){return!!this.props.saveButtonEnabled&&(!this.props.disableSaveOnRequiredErrors||0===Object.keys(this.props.requiredErrorMessages).length)}},{key:"render",value:function(){var e=this.shouldEnabledSaveButton();return s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,applyButtonEnabled:e})}}]),i}();Mr.defaultProps={saveButtonEnabled:!0};var Fr=Vt((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(Mr),Vr=d;var Ur=function(e,t){var r=[];return Vr(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},Hr=J,jr=Ur,zr=ke,qr=Q;var Gr=function(e,t){return(qr(e)?Hr:jr)(e,zr(t))},Wr="SET_PROPERTY_VALUES",$r="UPDATE_PROPERTY_VALUE",Xr="REMOVE_PROPERTY_VALUE",Kr="SET_CONTROL_STATES",Yr="UPDATE_CONTROL_STATE",Jr="SET_PANEL_STATES",Qr="UPDATE_PANEL_STATE",Zr="SET_ACTION_STATES",en="UPDATE_ACTION_STATE",tn="SET_ERROR_MESSAGES",rn="UPDATE_ERROR_MESSAGE",nn="CLEAR_ERROR_MESSAGE",on="SET_DATASET_METADATA",an="UPDATE_SELECTED_ROWS",sn="CLEAR_SELECTED_ROWS",ln="SET_TITLE",pn="SET_ACTIVE_TAB",cn="DISABLE_ROW_MOVE_BUTTONS",un="SET_SAVE_BUTTON_DISABLE",dn="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",hn="SET_ADD_REMOVE_ROWS",fn="UPDATE_STATIC_ROWS",mn="CLEAR_STATIC_ROWS",vn="SET_TABLE_BUTTON_ENABLED",yn="SET_HIDE_EDIT_BUTTON",gn="SET_ACTIVE_TEARSHEET";function bn(e){return{type:ln,title:e}}function En(e){return{type:pn,activeTab:e}}function In(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Sn=function(r){n(i,r);var o=In(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel;return void 0===e&&(e=s.createElement("div",{className:"properties-control-panel"})),e}}]),i}(s.Component),Cn=Vt((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Sn);function Rn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Tn=function(r){n(i,l);var o=Rn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={style:{height:0}},r.updateDimensions=r.updateDimensions.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"updateDimensions",value:function(){if(this.wideFlyout&&(this.commonPropertiesParent||(this.commonPropertiesParent=this.findPropertyWrapper(this.wideFlyout)),this.commonPropertiesParent)){var e=rr.findDOMNode(this.commonPropertiesParent).getBoundingClientRect();this.setState({style:{height:e.height+"px",top:e.top+"px"}})}}},{key:"findPropertyWrapper",value:function(e){return e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes("properties-right-flyout")?e.parentNode:e&&e.parentNode?this.findPropertyWrapper(e.parentNode):null}},{key:"render",value:function(){var e,t,r,n=this,o=s.createElement("div",{className:at("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=s.createElement("div",{className:"properties-wf-title"},this.props.title)),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,showPropertiesButtons:this.props.showPropertiesButtons,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,applyButtonEnabled:this.props.okButtonEnabled}),r=s.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),s.createElement("div",{className:"properties-wf-modal",ref:function(e){return n.wideFlyout=e}},s.createElement(Bt,{node:this.commonPropertiesParent},o,s.createElement("div",{className:at("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),i}();Tn.defaultProps={show:!1,okButtonEnabled:!0};var _n=Tn;function kn(e,t){var r=t||or();return"".concat(wn(e),"-").concat(r)}function wn(e){var t=e.name;return void 0!==e.row?(t+="_"+e.row,void 0!==e.col&&(t+="_"+e.col)):void 0!==e.col&&(t+="_"+e.col),"properties-"+t}function Ln(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function An(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function Dn(e,t){var r=!1;if(Array.isArray(e)){if(0===e.length)return{value:"",truncated:r};var n="";return e.forEach((function(o,i){var a=On(o),s=i===e.length-1?"":t;n+=a+s,r||(r=a.length!==o.length)})),{value:n,truncated:r}}return{value:e,truncated:r}}function On(e){return e.length>ut?e.substring(0,ut)+"...":e}function Pn(e,t){var r={};return!e||t||("error"===e.type?(r.invalid=!0,r.invalidText=e.text):"warning"===e.type&&(r.warn=!0,r.warnText=e.text)),r}function Nn(e){return e.controlType===h.DATEPICKER||e.controlType===h.DATEPICKERRANGE?e.dateFormat?e.dateFormat:lt:e.controlType===h.DATEFIELD?e.dateFormat?e.dateFormat:pt:e.timeFormat?e.timeFormat:ct}function xn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Bn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bn(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Fn=function(r){n(i,r);var o=Mn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showWideFlyout:!1},r.handleLinkClicked=r.handleLinkClicked.bind(a(r)),r.hideWideFlyout=r.hideWideFlyout.bind(a(r)),r.cancelWideFlyout=r.cancelWideFlyout.bind(a(r)),r._getSummaryTables=r._getSummaryTables.bind(a(r)),r}return t(i,[{key:"hideWideFlyout",value:function(){this.props.controller.setIsSummaryPanelShowing(!1),this.setState({showWideFlyout:!1}),this.props.controller.clearSelectedRows()}},{key:"cancelWideFlyout",value:function(){this.props.controller.setPropertyValues(this.initialControlValues),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates),this.hideWideFlyout()}},{key:"handleLinkClicked",value:function(){this.props.children&&(this.props.controller.setIsSummaryPanelShowing(!0),this.setState({showWideFlyout:!0})),this.initialControlValues=this.props.controller.getPropertyValues(),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates()}},{key:"_getSummaryTables",value:function(){var e=[],t=this.props.controller.getSummaryPanelControls(this.props.panel.id);if(!Array.isArray(t))return e;var r,n=xn(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,i={name:o},a=this.props.controller.getControl(i),l=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),p=this.props.controller.getCustPropSumPanelValue(i),c=!1;null!=p&&(l=p.value,a.summaryLabel=p.label,c=!0);var d=[];if(Array.isArray(l)){var h=0;if(a.subControls)for(var f=0;f<a.subControls.length;f++){var m={name:i.name,col:f};(this.props.controller.isSummary(m)||c)&&h++}else a.summary&&(h=1);for(var v=0!==h?"calc((100% / "+h+") - 2px)":"100%",y=0;y<l.length;y++){var g=l[y],b=[];if(Array.isArray(g))for(var E=0;E<g.length;E++){var I={name:i.name,col:E};if(this.props.controller.isSummary(I)||c){var S=this._getSummaryDisplayValue(g[E],I),C=void 0===S?"":JSON.stringify(S).replace('"',"").replace(new RegExp('"',"g"),"")+" ";b.push(s.createElement("td",{key:"summary-table-data-"+E,className:"properties-summary-row-data ",style:{width:v}},s.createElement(we,{content:s.createElement("span",null,C),tooltipText:C,disabled:!1})))}}else if(this.props.controller.isSummary(i)||c){var R=this._getSummaryDisplayValue(g,i);b.push(s.createElement("td",{key:"summary-table-row-data-"+y,className:"properties-summary-row-data "},s.createElement(we,{content:s.createElement("span",null,R),tooltipText:R,disabled:!1})))}b.length>0&&d.push(s.createElement("tr",{key:"summary-table-row-"+y,className:"properties-summary-row"},b))}}else if(l&&(this.props.controller.isSummary(i)||c)){var T=this._getSummaryDisplayValue(l,i);d.push(s.createElement("tr",{key:"summary-row-"+o,className:"properties-summary-row"},s.createElement("td",{key:"summary-table-row-data-"+o,className:"properties-summary-rows-data"},T)))}if(d.length>0){var _=s.createElement("table",{role:"presentation",key:"summary-table-"+o,className:"properties-summary-table"},s.createElement("tbody",{key:"summary-body-"+o},d));if(d.length>10){var k=u(this.props.controller.getReactIntl(),st.LONG_TABLE_SUMMARY_PLACEHOLDER);_=s.createElement("div",{className:"properties-summary-table"},s.createElement("span",null,k))}e.push(s.createElement("div",{key:"summary-container-"+o,className:"properties-summary-values"},s.createElement("span",{key:"summary-text-"+o,className:"properties-summary-label"},a.summaryLabel),_))}}}catch(e){n.e(e)}finally{n.f()}return e}},{key:"_getSummaryDisplayValue",value:function(e,t){var r=e,n=this.props.controller.getControl(t);if(n.values&&n.valueLabels){var o=n.values.indexOf(e);o>-1&&n.valueLabels[o]&&(r=n.valueLabels[o])}return"object"===f(r)&&(r=n.valueDef.propType===m.STRUCTURE&&n.role===v.COLUMN?y(e,n):JSON.stringify(r)),r}},{key:"_getSummaryIconState",value:function(){var e=this,t=this.props.controller.getSummaryPanelControls(this.props.panel.id),r={},n=0,o=0;if(Array.isArray(t)&&t.forEach((function(t){var i=e.props.controller.getErrorMessage({name:t},!0);Z(i)||(i.type===dt.WARNING&&(o+=1),i.type===dt.ERROR&&(n+=1)),Z(i)||Z(r)&&"error"===r.type||(r=i)})),!Z(r)){var i="";return n>0&&0===o?i=u(this.props.controller.getReactIntl(),st.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&o>0?i=u(this.props.controller.getReactIntl(),st.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:o}):0===n&&o>0&&(i=u(this.props.controller.getReactIntl(),st.CONTROL_SUMMARY_WARNING,{warningMsgCount:o})),s.createElement(ir,{id:"summary-icon",tip:i,className:"properties-tooltips"},s.createElement(nr,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=s.createElement("div",{className:"properties-summary-link-container"},s.createElement(Ne,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:Ht},this.props.panel.label),e),r=u(this.props.controller.getReactIntl(),st.APPLYBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),st.REJECTBUTTON_LABEL),o=this.state.showWideFlyout?s.createElement(_n,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:n,title:this.props.panel.label,light:this.props.controller.getLight(),okButtonEnabled:this.props.okButtonEnabled},s.createElement("div",null,this.props.children)):s.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",a=at("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===ht.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return s.createElement("div",{className:a,disabled:this.props.panelState===ht.DISABLED,"data-id":wn({name:this.props.panel.id})},o,t,this._getSummaryTables())}}]),i}(s.Component),Vn=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}}),null)(Fn);function Un(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Hn=function(r){n(i,r);var o=Un(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"",t=this.props.panelState===ht.DISABLED;return s.createElement("div",{className:at("properties-twisty-panel",{hide:this.props.panelState===ht.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":wn({name:this.props.panel.id})},s.createElement(xe,{disabled:t},s.createElement(Be,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),i}(s.Component),jn=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Hn);function zn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var qn=function(r){n(i,r);var o=zn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={panel:null,title:null,hideHandler:null,subPanelVisible:!1},r.showSubDialog=r.showSubDialog.bind(a(r)),r.hideSubDialog=r.hideSubDialog.bind(a(r)),r}return t(i,[{key:"showSubDialog",value:function(e,t,r){this.props.controller.increaseVisibleSubPanelCounter(),this.setState({panel:t,title:e,hideHandler:r,subPanelVisible:!0})}},{key:"hideSubDialog",value:function(e){this.props.controller.decreaseVisibleSubPanelCounter(),this.state.hideHandler(e),this.setState({panel:null,title:null,hideHandler:null,subPanelVisible:!1})}},{key:"render",value:function(){var e=[];if(this.state.subPanelVisible&&!this.props.rightFlyout){var t=this.props.controller.isTearsheetContainer()?"properties-subpanel-modal-in-tearsheet":"";e=s.createElement(Lr,{title:this.state.title,okHandler:this.hideSubDialog.bind(this,!0),cancelHandler:this.hideSubDialog.bind(this,!1),applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,classNames:t},this.state.panel)}else this.props.rightFlyout&&this.state.subPanelVisible&&(e=s.createElement(_n,{cancelHandler:this.hideSubDialog.bind(this,!1),okHandler:this.hideSubDialog.bind(this,!0),show:!0,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,title:this.state.title,light:this.props.controller.getLight()},s.createElement("div",null,this.state.panel)));return s.createElement("div",null,e,this.props.children)}}]),i}(s.Component);function Gn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}qn.defaultProps={rightFlyout:!1};var Wn=function(r){n(i,r);var o=Gn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){g.info("onSubPanelHidden(): applyChanges="+e)}},{key:"showSubPanel",value:function(){this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),st.APPLYBUTTON_LABEL),r=u(this.props.controller.getReactIntl(),st.REJECTBUTTON_LABEL),n=s.createElement(Ne,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return s.createElement(qn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),i}(s.Component);function $n(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Xn=function(r){n(i,r);var o=$n(i);function i(t){var r;e(this,i),r=o.call(this,t);var n="";return t.children.forEach((function(e,t){0===t?n="1fr":n+=" 1fr"})),r.style={gridTemplateColumns:n},r}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return s.createElement("div",{className:at("properties-column-panel",{hide:this.props.panelState===ht.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===ht.DISABLED,"data-id":wn({name:this.props.panel.id}),style:this.style},this.props.children)}}]),i}(s.Component),Kn=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Xn);function Yn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Jn=function(r){n(i,r);var o=Yn(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return this.props.children.length>0?s.createElement("div",{className:at("properties-control-panel",{hide:this.props.panelState===ht.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===ht.DISABLED,"data-id":wn({name:this.props.panel.id})},this.props.children):null}}]),i}(s.Component),Qn=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Jn);function Zn(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var eo=function(r){n(i,r);var o=Zn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={activeTabId:""},r.uuid=or(),r}return t(i,[{key:"onClick",value:function(e){this.setState({activeTabId:e})}},{key:"render",value:function(){for(var e=[],t=0,r=0,n=this.props.className?this.props.className:"",o=0;o<this.props.tabs.length;o++){var i=this.props.tabs[o],a=this.props.controller.getPanelState({name:i.group});if(a!==ht.HIDDEN){var l=this.props.genUIItem(o,i.content);this.state.activeTabId===i.group&&a!==ht.DISABLED&&(t=r),e.push(s.createElement(Me,{id:"subtabs.tab.".concat(o,"-").concat(this.uuid),key:"subtabs.tab.".concat(o,"-").concat(this.uuid),disabled:a===ht.DISABLED,className:at("properties-subtab",{"properties-leftnav-subtab-item":this.props.leftnav}),tabIndex:r,label:i.text,title:i.text,onClick:this.onClick.bind(this,i.group),"data-id":wn({name:i.group})},l)),r++}}return s.createElement("div",{className:at("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},n)},s.createElement(Fe,{className:at("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),selected:t,light:this.props.controller.getLight(),tabContentClassName:"properties-subtab-panel"},e))}}]),i}(s.Component);eo.defaultProps={leftnav:!1};var to=eo;function ro(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var no=function(r){n(i,l);var o=ro(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===ht.HIDDEN,n=this.props.panelState===ht.DISABLED,o=this.props.panel.label?s.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);if("as_tooltip"===this.props.panel.description.placement){this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id});var a=s.createElement(ir,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(nr,{type:ft.INFORMATION,className:"properties-control-description-icon-info"}));o=s.createElement("div",{className:at("properties-label-container")},o,a)}else e=s.createElement("div",{className:"panel-description"},i)}return s.createElement("div",{className:at("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:n},o,e)}}]),i}(),oo=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),null)(no);function io(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ao=function(r){n(i,l);var o=io(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===ht.HIDDEN,n=this.props.panelState===ht.DISABLED;if(this.props.panel.label){var o;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id}),o=s.createElement(ir,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(nr,{type:ft.INFORMATION,className:"properties-control-description-icon-info"}))}e=s.createElement("div",{className:at("properties-label-container")},s.createElement("label",{className:"properties-control-label"},this.props.panel.label),o)}return s.createElement("div",{className:at("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":wn({name:this.props.panel.id}),disabled:n},e,this.props.children)}}]),i}(),so=Vt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(ao);function lo(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var po=function(r){n(i,r);var o=lo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"getActionButtonKind",value:function(){if(!ee(this.props,"action.button.kind"))return mt.TERTIARY;switch(this.props.action.button.kind){case mt.PRIMARY:return mt.PRIMARY;case mt.SECONDARY:return mt.SECONDARY;case mt.TERTIARY:return mt.TERTIARY;case mt.GHOST:return mt.GHOST;case mt.DANGER:return mt.DANGER;case mt.DANGER_TERTIARY:return mt.DANGER_TERTIARY;case mt.DANGER_GHOST:return mt.DANGER_GHOST;default:return mt.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!ee(this.props,"action.button.size"))return vt.SMALL;switch(this.props.action.button.size){case vt.SMALL:return vt.SMALL;case vt.MEDIUM:return vt.DEFAULT;case vt.LARGE:return vt.LARGE;case vt.EXTRA_LARGE:return vt.EXTRA_LARGE;default:return vt.SMALL}}},{key:"applyAction",value:function(){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}},{key:"render",value:function(){var e=this.props.action.className?this.props.action.className:"",t=at("properties-action-button",{hide:this.props.state===ht.HIDDEN},e),r=this.props.state===ht.DISABLED,n=this.getActionButtonKind(),o=this.getActionButtonSize(),i=s.createElement(Ne,{type:"button",size:o,kind:n,onClick:this.applyAction,disabled:r},this.props.action.label.text),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);a=s.createElement(ir,{id:l,tip:p,direction:"bottom",className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:t,"data-id":this.props.action.name},a)}}]),i}(s.Component),co=Vt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(po);function uo(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ho=function(r){n(i,r);var o=uo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"applyAction",value:function(){if(this.props.state!==ht.DISABLED){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}}},{key:"render",value:function(){var e={},t={};this.props.action.image.size&&(e=this.props.action.image.size.height?{height:this.props.action.image.size.height}:{},t=this.props.action.image.size.width?{width:this.props.action.image.size.width}:{});var r=this.props.state===ht.DISABLED,n=this.props.action.className?this.props.action.className:"",o=at("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===ht.HIDDEN},{disabled:r},n),i=s.createElement("div",{"data-id":this.props.action.name},s.createElement("img",ar({src:this.props.action.image.url,onClick:this.applyAction},e,t))),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text),c=this.props.action.image.tooltip_direction&&["left","right","top","bottom"].includes(this.props.action.image.tooltip_direction.toLowerCase())?this.props.action.image.tooltip_direction.toLowerCase():"bottom";a=s.createElement(ir,{id:l,tip:p,direction:c,className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:o},a)}}]),i}(s.Component),fo=Vt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(ho),mo=function(){function r(t){e(this,r),this.controller=t}return t(r,[{key:"generateAction",value:function(e,t){if(t){if("button"===t.actionType)return s.createElement(co,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return s.createElement(fo,{key:"action."+e,action:t,controller:this.controller})}return null}}]),r}();function vo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function go(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var bo="alertMsgs",Eo=function(r){n(i,r);var o=go(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showFieldPicker:!1},r.genPanel=r.genPanel.bind(a(r)),r.genUIContent=r.genUIContent.bind(a(r)),r.genUIItem=r.genUIItem.bind(a(r)),r._getGroupedMessages=r._getGroupedMessages.bind(a(r)),r.closeFieldPicker=r.closeFieldPicker.bind(a(r)),r.openFieldPicker=r.openFieldPicker.bind(a(r)),r.generateSharedControlNames=r.generateSharedControlNames.bind(a(r)),r.messages=r._getGroupedMessages(t.messages),r.ControlFactory=t.controller.getControlFactory(),r.ControlFactory.setFunctions(r.openFieldPicker,r.genUIItem),r.ControlFactory.setRightFlyout(t.rightFlyout),r.actionFactory=new mo(r.props.controller),r.FIRST_TEARSHEET_ID=null,r.TEARSHEETS={},r.visibleTearsheet=null,r}return t(i,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.controller.isSummaryPanelShowing()||this.props.controller.isSubPanelsShowing()||(this.messages=this._getGroupedMessages(e.messages)),!0}},{key:"_getMessageCountForCategory",value:function(e){var t=this;if(e.group===bo)return" ("+this.messages.length+")";var r=0;return this.messages.forEach((function(n){var o=t.props.controller.getControl({name:n.id_ref});o&&o.parentCategoryId===e.group&&r++})),r>0?" ("+r+")":null}},{key:"_getGroupedMessages",value:function(e){return Z(e)?[]:E(e,["type"])}},{key:"_getTabId",value:function(e){return e.group}},{key:"_showCategoryPanel",value:function(e){var t=e;this.props.activeTab===e&&(t=""),this.props.setActiveTab(t)}},{key:"_handleMessageClick",value:function(e,t){var r=this.props.controller.getControl(e);this.props.setActiveTab(r.parentCategoryId)}},{key:"_modalTabsOnClick",value:function(e){this.props.setActiveTab(e)}},{key:"genPrimaryTabs",value:function(e,t,r,n){for(var o=[],i=!1,a=0,l=t.filter((function(e){return e.content.itemType!==I.TEARSHEET})),p=t.filter((function(e){return e.content.itemType===I.TEARSHEET})).concat(l),c=0;c<p.length;c++){var u=p[c];if(this.props.controller.getPanelState({name:u.group})!==ht.HIDDEN){0===c&&u.group===bo&&(i=!0);var d=this.genUIItem(this._getContainerIndex(i,c),u.content,r,n),h=null;if(this.props.additionalComponents&&(h=this.props.additionalComponents[u.group]),1===p.length&&1===l.length)return s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h);if(this.props.rightFlyout&&this.props.categoryView!==yt.TABS){var f=s.createElement(nr,{type:ft.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),m=!1;this.props.activeTab===u.group&&(f=s.createElement(nr,{type:ft.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),m=!0),u.content.itemType!==I.TEARSHEET&&1===l.length?o.push(s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h)):o.push(s.createElement("div",{key:this._getContainerIndex(i,c)+"-"+e,className:at("properties-category-container",{"properties-hidden-container":u.content.itemType===I.TEARSHEET})},s.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,u.group),className:at("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},u.text,this._getMessageCountForCategory(u),f),s.createElement("div",{className:at("properties-category-content",{show:m})},d,h)))}else this.props.activeTab===u.group&&(a=c),o.push(s.createElement(Me,{id:"tab."+this._getContainerIndex(i,c)+"-"+e,key:this._getContainerIndex(i,c)+"-"+e,tabIndex:c,label:Gr([u.text,this._getMessageCountForCategory(u)]).join(""),title:Gr([u.text,this._getMessageCountForCategory(u)]).join(""),className:at({"properties-hidden-container":u.content.itemType===I.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,u.group)},d,h))}}return this.props.rightFlyout&&this.props.categoryView!==yt.TABS?s.createElement("div",{key:"cat."+e,className:"properties-categories"},o):s.createElement(Fe,{key:"tab."+e,className:"properties-primaryTabs",selected:a,light:this.props.controller.getLight(),tabContentClassName:at("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===yt.TABS})},o)}},{key:"_getContainerIndex",value:function(e,t){return e&&0===t?"alerts":e?t-1:t}},{key:"genPanelSelector",value:function(e,t,r,n,o,i,a){var l=this.generateAdditionalPanels(t,e,n,o,!1,a);return s.createElement(Cn,{key:"selectorPanel"+e,panels:l,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,n,o,i){for(var a={},l=0;l<e.length;l++){var p=e[l],c="properties-control-panel";p.content&&"textPanel"===p.content.itemType&&(c=""),o&&(c+=" properties-control-nested-panel"),a[p.group]=s.createElement("div",{className:at(c,i),key:p.group+t},this.genUIItem(l,p.content,r,n))}return a}},{key:"genUIContent",value:function(e,t,r){for(var n=[],o=0;o<e.length;o++)n.push(this.genUIItem(o,e[o],t,r));return n}},{key:"genUIItem",value:function(e,t,r,n){var o="",i=null,a="";switch(t.itemType){case"control":t.additionalItems&&t.additionalItems.length>0&&(t.control.additionalItems=t.additionalItems,t.control.optionalPanels=this.generateAdditionalPanels(t.additionalItems,e,null,n,!0));var l={name:t.control.name};if(r){var p=G(r);return this.props.controller.updateLastChildPropertyId(p,{col:n(t.control.name)}),this.ControlFactory.createControlItem(t.control,p)}return this.ControlFactory.createControlItem(t.control,l);case"additionalLink":var c=this.genPanel(e,t.panel,r,n);return s.createElement(Wn,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:c,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return o=at("properties-static-text",t.textType),i="info"===t.textType?s.createElement("div",null,s.createElement(nr,{type:ft.INFORMATION,className:"properties-static-text-icon-info"})):null,a=s.createElement("div",{className:o},b(t.text,this.props.controller)),s.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},i,a);case"linkText":return o=at("properties-link-text-container",t.textType),"warning"===t.textType?i=s.createElement(nr,{type:dt.WARNING}):"error"===t.textType&&(i=s.createElement(nr,{type:dt.ERROR})),a=s.createElement(Ve,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},b(t.text,this.props.controller)),s.createElement("div",{key:"link-text."+e,className:o},i,a);case"hSeparator":return s.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"tearsheet":case"checkboxSelector":return this.genPanel(e,t.panel,r,n);case"subTabs":return s.createElement(to,{key:"subtabs."+e,tabs:t.tabs,className:t.className,controller:this.props.controller,rightFlyout:this.props.rightFlyout,genUIItem:this.genUIItem,nestedPanel:t.nestedPanel,leftnav:this.props.controller.isTearsheetContainer()});case"primaryTabs":return this.genPrimaryTabs(e,t.tabs,r,n);case"panelSelector":return this.genPanelSelector(e,t.tabs,t.dependsOn,r,n,t.id,t.className);case"customPanel":return this.generateCustomPanel(e,t.panel);case"action":return this.actionFactory.generateAction(e,t.action);case"textPanel":return t.panel?s.createElement(oo,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,n=vo(this.props.customPanels);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.id()===t.id)try{return s.createElement("div",{className:at("properties-custom-panel",{"properties-control-nested-panel":te(t,"nestedPanel",!1)}),key:"custom."+e},new o(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return g.warn("Error thrown creating custom panel: "+e),null}}}catch(e){n.e(e)}finally{n.f()}}return s.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=vo(this.props.controller.getSharedCtrlInfo());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(void 0!==n.id&&n.id===e.id)return}}catch(e){r.e(e)}finally{r.f()}var o,i=[],a=vo(e.uiItems);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.control&&s.control.name){var l=s.control.name;i.push({controlName:l})}}}catch(e){a.e(e)}finally{a.f()}this.props.controller.addSharedControls(e.id,i)}},{key:"genPanel",value:function(e,t,r,n){var o=this,i=this.genUIContent(t.uiItems,r,n),a="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),i=this.genUIContent(t.uiItems,r,n),s.createElement(Qn,{key:a,controller:this.props.controller,panel:t},i);case"summary":return this.props.rightFlyout?s.createElement(Vn,{key:"summary-panel-"+a,controller:this.props.controller,panel:t},i):i;case"actionPanel":return s.createElement(so,{key:"action-panel-"+e,controller:this.props.controller,panel:t},i);case"twisty":return s.createElement(jn,{key:a,controller:this.props.controller,panel:t},i);case"tearsheet":if(this.TEARSHEETS[t.id]={panel:t,title:t.label,description:t.description?t.description.text:null,content:i},null!==this.props.controller.getActiveTearsheet()?this.visibleTearsheet=this.TEARSHEETS[this.props.controller.getActiveTearsheet()]:this.visibleTearsheet=null,!this.FIRST_TEARSHEET_ID||this.FIRST_TEARSHEET_ID===t.id){this.FIRST_TEARSHEET_ID=t.id;return s.createElement(xr,{open:null!==this.props.controller.getActiveTearsheet(),onCloseCallback:function(){o.props.controller.clearActiveTearsheet()},key:t.id,tearsheet:this.visibleTearsheet})}return null;case"column":return s.createElement(Kn,{key:a,controller:this.props.controller,panel:t},i);default:return s.createElement(Qn,{key:a,controller:this.props.controller,panel:t},i)}}},{key:"closeFieldPicker",value:function(e,t){this.closeFieldPickerCallback&&(this.closeFieldPickerCallback(e,t),this.closeFieldPickerCallback=null),this.props.showPropertiesButtons(!0),this.fieldPickerPropertyId=null,this.setState({showFieldPicker:!1})}},{key:"openFieldPicker",value:function(e,t){this.props.showPropertiesButtons(!1),this.fieldPickerPropertyId=e,this.closeFieldPickerCallback=t,this.setState({showFieldPicker:!0})}},{key:"fieldPicker",value:function(e){if(this.fieldPickerPropertyId&&this.fieldPickerPropertyId.name){var t,r=this.props.controller.getPropertyValue(this.fieldPickerPropertyId),n=this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId),o=this.props.controller.getControl(this.fieldPickerPropertyId),i=S(o),a=o.subControls;-1!==i&&(t=a?a[i].dmImage:o.dmImage);var l=C(o,r);return s.createElement("div",{className:"properties-fp-table"},s.createElement(R,{key:"field-picker-control",controller:this.props.controller,closeFieldPicker:this.closeFieldPicker,currentFields:l,fields:n,title:e,rightFlyout:this.props.rightFlyout,dmIcon:t}))}return s.createElement("div",null)}},{key:"genAlertsTab",value:function(e){var t=e.map((function(e){return{itemType:"linkText",text:e.text,textType:e.type,controlId:{name:e.id_ref}}}));return{text:u(this.props.controller.getReactIntl(),st.ALERTS_TAB_TITLE),group:bo,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!Z(this.messages)&&"primaryTabs"===e[0].itemType&&e[0].tabs&&e[0].tabs.length>1&&(e=G(e))[0].tabs.unshift(this.genAlertsTab(this.messages));var t,r=this.genUIContent(e),n=s.createElement("div",null),o=this.props.controller.getForm(),i=u(this.props.controller.getReactIntl(),st.FIELDPICKER_SAVEBUTTON_LABEL)+" "+o.label;return this.state.showFieldPicker&&(this.props.rightFlyout?n=s.createElement(_n,{showPropertiesButtons:!1,show:!0,title:i,light:this.props.controller.getLight()},this.fieldPicker(i)):this.props.controller.isTearsheetContainer()?t=s.createElement(xr,{open:!0,stacked:!0,tearsheet:{title:i,content:this.fieldPicker()}}):r=this.fieldPicker(i)),s.createElement("div",{className:at("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===yt.TABS},{"field-picker":this.state.showFieldPicker})},r,n,t)}}]),i}(s.Component),Io=Vt((function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}}),(function(e,t){return{setActiveTab:function(t){e(En(t))}}}))(Eo),So=K;var Co=function(e){return function(t){return null==e?void 0:So(e,t)}},Ro=function(){function r(t){e(this,r),this.resources=t}return t(r,[{key:"l10n",value:function(e,t){if(this.resources){var r=Co(this.resources)(e);if(r||""===r)return r}return t||e}},{key:"l10nResource",value:function(e){var t;return e&&(e.resource_key?(t=this.l10n(e.resource_key))&&t!==e.resource_key||!e.default||(t=e.default):e.default&&(t=e.default)),t}},{key:"l10nLabel",value:function(e,t){return this.l10nResource(e.label)?this.l10nResource(e.label):this.l10n(t+".label",t)}},{key:"l10nDesc",value:function(e,t){return this.l10nResource(e.description)?this.l10nResource(e.description):this.l10n(t+".desc",t)}},{key:"l10nValueLabel",value:function(e,t){var r=e+"."+t+".label";return this.l10n(r,t)}},{key:"l10nValueDesc",value:function(e,t){var r=e+"."+t+".desc",n=this.l10n(r,t);return n!==t?n:null}}]),r}(),To=function(){function r(){e(this,r)}return t(r,null,[{key:"make",value:function(e){var t;return e&&((t=new r).default=e.default,t.resource_key=e.resource_key,e.placement&&(t.placement=e.placement),e.type&&(t.type=e.type),e.link&&(t.link=e.link)),t}}]),r}();function _o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ko(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ko(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var wo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.parameters=n,this.actions=o,this.type=i,this.label=To.make(a),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=c,this.description=To.make(u),this.data=d,this.className=h,this.open=f}return t(r,[{key:"parameterNames",value:function(){return this.parameters}},{key:"actionIds",value:function(){return this.actions}},{key:"groupType",value:function(){return this.type?this.type:T.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var t;if(ee(e,"group_info")){t=[];var n,o=_o(e.group_info);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=r.makeGroup(i);null!==a&&t.push(a)}}catch(e){o.e(e)}finally{o.f()}}return new r(Co(e)("id"),Co(e)("parameter_refs"),Co(e)("action_refs"),Co(e)("type"),Co(e)("label"),Co(e)("depends_on_ref"),Co(e)("insert_panels"),Co(e)("nested_panel"),t,Co(e)("description"),Co(e)("data"),Co(e)("class_name"),Co(e)("open"))}return null}}]),r}(),Lo=function(){function r(t){e(this,r),this.groups=t}return t(r,null,[{key:"makeGroupMetadata",value:function(e,t){var n=[];if(e){var o,i=_o(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=wo.makeGroup(a);null!==s&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new wo(or(),t,null,T.CONTROLS));return new r(n)}}]),r}();function Ao(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Do(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Do(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Do(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Oo=t((function t(r,n,o,i,a,s,l,p){e(this,t),this.name=r,this.label=n,this.description=o,this.actionType=i,this.data=a,this.image=s,this.button=l,this.className=p})),Po=function(){function r(){e(this,r)}return t(r,null,[{key:"makeActionDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=To.make(e.label),t.description=To.make(e.description),t.control=e.control,t.data=e.data,t.image=e.image,t.button=e.button,t.className=e.class_name,t}return null}}]),r}(),No=function(){function r(t){e(this,r),this.actionDefs=t}return t(r,[{key:"getAction",value:function(e){var t;return this.actionDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeActionMetadata",value:function(e){if(e){var t,n=[],o=Ao(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=Po.makeActionDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function xo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Bo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Mo=function(){function r(t){e(this,r),t.id&&(this.name=t.id),t.label&&(this.label=To.make(t.label)),t.description&&(this.description=To.make(t.description)),t.type&&(this.type=t.type),t.role&&(this.role=t.role),t.valueRestriction&&(this.valueRestriction=t.valueRestriction),null!==t.defaultValue&&"undefined"!==f(t.defaultValue)?t.defaultValue.parameter_ref?(this.defaultValue={},this.defaultValue.parameterRef=t.defaultValue.parameter_ref):this.defaultValue=t.defaultValue:void 0===t.defaultValue&&(this.isList()||this.isMapValue())&&(this.defaultValue=[]),"boolean"==typeof t.labelVisible&&(this.labelVisible=t.labelVisible),t.control&&(this.control=t.control),t.orientation&&(this.orientation=t.orientation),t.width&&(this.width=t.width),t.charLimit&&(this.charLimit=t.charLimit),t.placeHolderText&&(this.placeHolderText=To.make(t.placeHolderText)),t.separator&&(this.separator=t.separator),t.resource_key&&(this.resource_key=t.resource_key),"boolean"===f(t.visible)?this.visible=t.visible:this.visible=!0,t.valueIcons&&(this.valueIcons=t.valueIcons),"boolean"===f(t.sortable)&&(this.sortable=t.sortable),"boolean"===f(t.filterable)&&(this.filterable=t.filterable),"boolean"===f(t.resizable)&&(this.resizable=t.resizable),t.editStyle&&(this.editStyle=t.editStyle),"boolean"===f(t.required)&&(this.required=t.required),t.numberGenerator&&(t.numberGenerator.label=To.make(t.numberGenerator.label),this.numberGenerator=t.numberGenerator),t.isKey&&(this.isKey=t.isKey),t.dmDefault&&(this.dmDefault=t.dmDefault),t.dmImage&&(this.dmImage=t.dmImage),t.language&&(this.language=t.language),t.enableMaximize&&(this.enableMaximize=t.enableMaximize),"boolean"===f(t.summary)&&(this.summary=t.summary),t.increment&&(this.increment=t.increment),t.textAfter&&(this.textAfter=To.make(t.textAfter)),t.textBefore&&(this.textBefore=To.make(t.textBefore)),"boolean"===f(t.moveableRows)&&(this.moveableRows=t.moveableRows),t.generatedValues&&(this.generatedValues=t.generatedValues),t.dateFormat&&(this.dateFormat=t.dateFormat),t.timeFormat&&(this.timeFormat=t.timeFormat),t.customControlId&&(this.customControlId=t.customControlId),t.data&&(this.data=t.data),t.rows&&(this.rows=t.rows),t.displayChars&&(this.displayChars=t.displayChars),t.uionly&&(this.uionly=t.uionly),t.actionRef&&(this.actionRef=t.actionRef),"boolean"===f(t.customValueAllowed)&&(this.customValueAllowed=t.customValueAllowed),t.className&&(this.className=t.className)}return t(r,[{key:"isList",value:function(){return!!this.type&&this.type.startsWith("array[")}},{key:"isMapValue",value:function(){return!!this.type&&this.type.startsWith("map[")}},{key:"isSubPanelEdit",value:function(){return this.editStyle===_.SUBPANEL}},{key:"isCompoundField",value:function(){return!(!this.role||!this.type)&&((this.type===m.OBJECT||this.baseType()===m.OBJECT)&&this.role===v.COLUMN)}},{key:"propType",value:function(){var e;for(var t in m)this.baseType()===m[t]&&(e=m[t]);return e||(e=m.STRUCTURE),e}},{key:"getRole",value:function(){return this.role?this.role:this.getValidValues()?v.ENUM:v.UNSPECIFIED}},{key:"baseType",value:function(){var e=this.type;return this.isList()?e.substring(6,this.type.length-1):this.isMapValue()?e.substring(e.indexOf(",")+1,this.type.length-1).trim():this.valueRestriction&&!this.type?m.STRING:e}},{key:"getValidValues",value:function(){return this.valueRestriction?this.valueRestriction:this.type===m.BOOLEAN?[!0,!1]:void 0}},{key:"getValidValueCount",value:function(){return this.getValidValues()?this.getValidValues().length:0}},{key:"getAdditionalText",value:function(e){return e.l10nResource(this.placeHolderText)}},{key:"getTextAfter",value:function(e){return e.l10nResource(this.textAfter)}},{key:"getTextAfterType",value:function(){return this.textAfter?this.textAfter.type:null}},{key:"getTextBefore",value:function(e){return e.l10nResource(this.textBefore)}},{key:"getTextBeforeType",value:function(){return this.textBefore?this.textBefore.type:null}},{key:"getControl",value:function(e){return this.control?this.control:e}},{key:"columns",value:function(e){return this.width?this.width:e}},{key:"separatorAfter",value:function(){return this.separator===k.AFTER}},{key:"separatorBefore",value:function(){return this.separator===k.BEFORE}}],[{key:"makeParameterDef",value:function(e,t,n){return e?new r({id:Co(e)("id"),enableMaximize:Co(t)("enable_maximize"),label:Co(t)("label"),description:Co(t)("description"),type:Co(e)("type"),role:Co(e)("role"),valueRestriction:Co(e)("enum"),defaultValue:Co(e)("default"),labelVisible:Co(t)("label_visible"),control:Co(t)("control"),orientation:Co(t)("orientation"),width:Co(t)("width"),charLimit:Co(t)("char_limit"),placeHolderText:Co(t)("place_holder_text"),separator:Co(t)("separator"),resource_key:Co(t)("resource_key"),visible:Co(t)("visible"),valueIcons:Co(t)("value_icons"),sortable:Co(t)("sortable"),filterable:Co(t)("filterable"),resizable:Co(t)("resizable"),editStyle:Co(t)("edit_style"),required:Co(e)("required"),numberGenerator:Co(t)("number_generator"),isKey:n,dmDefault:Co(t)("dm_default"),dmImage:Co(t)("dm_image"),language:Co(t)("language"),summary:Co(t)("summary"),increment:Co(t)("increment"),textAfter:Co(t)("text_after"),textBefore:Co(t)("text_before"),moveableRows:Co(t)("moveable_rows"),generatedValues:Co(t)("generated_values"),dateFormat:Co(t)("date_format"),timeFormat:Co(t)("time_format"),customControlId:Co(t)("custom_control_id"),data:Co(t)("data"),rows:Co(t)("rows"),displayChars:Co(t)("display_chars"),uionly:Co(e)("uionly"),actionRef:Co(t)("action_ref"),customValueAllowed:Co(t)("custom_value_allowed"),className:Co(t)("class_name")}):null}}]),r}();function Fo(e,t){if(t){var r,n=xo(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.parameter_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Vo=function(){function r(t){e(this,r),this.paramDefs=t}return t(r,[{key:"getParameter",value:function(e){var t;return this.paramDefs.forEach((function(r){r.name===e&&(t=r)})),t}},{key:"getParameters",value:function(){return this.paramDefs.map((function(e){return e.name}))}}],[{key:"makeParameterMetadata",value:function(e,t,n){var o=[];if(Array.isArray(e)){var i,a=xo(e);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=Mo.makeParameterDef(s,Fo(s.id,t));l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}}if(Array.isArray(n)){var p,c=xo(n);try{for(c.s();!(p=c.n()).done;){var u=p.value,d=Mo.makeParameterDef(u,Fo(u.id,t));d&&(d.uionly=!0,o.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new r(o)}}]),r}();function Uo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ho(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ho(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jo=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.label=n,this.description=o,this.icon=i,this.carbonIcon=a,this.enabled=s,this.divider=l})),zo=function(){function r(){e(this,r)}return t(r,null,[{key:"makeButtonDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=To.make(e.label),t.description=To.make(e.description),t.icon=e.icon,t.carbonIcon=e.carbon_icon,t.enabled=e.enabled,t.divider=e.divider,t}return null}}]),r}(),qo=function(){function r(t){e(this,r),this.buttonDefs=t}return t(r,[{key:"getButton",value:function(e){var t;return this.buttonDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeButtonMetadata",value:function(e){if(e){var t,n=[],o=Uo(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=zo.makeButtonDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function Go(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $o=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h){e(this,r),this.name=t,this.keyDefinition=n,this.parameterMetadata=o,this.moveableRows=i,this.label=To.make(a),this.rowSelection=s,this.buttons=d,this.addRemoveRows="boolean"!=typeof l||l,this.header="boolean"!=typeof p||p,"boolean"==typeof c&&(this.includeAllFields=c),Array.isArray(u)&&(this.layout=u),this.type=void 0===h?"array":h}return t(r,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=Go(this.parameterMetadata.paramDefs);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(n.name)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"hasSubPanel",value:function(){if(this.parameterMetadata){var e,t=Go(this.parameterMetadata.paramDefs);try{for(t.s();!(e=t.n()).done;){if(e.value.isSubPanelEdit())return!0}}catch(e){t.e(e)}finally{t.f()}}return!1}},{key:"keyAttributeIndex",value:function(){return this.keyDefinition?0:-1}},{key:"defaultStructure",value:function(){var e=[];return this.parameterMetadata.paramDefs.forEach((function(t){e.push(t.defaultValue)})),this.keyDefinition&&e.unshift(this.keyDefinition.defaultValue),e}}],[{key:"makeStructure",value:function(e,t){return e?new r(Co(e)("id"),Mo.makeParameterDef(Co(e)("key_definition"),Co(t)("key_definition"),!0),Vo.makeParameterMetadata(Co(e)("parameters"),Co(t)("parameters")),Co(t)("moveable_rows"),Co(t)("label"),Co(t)("row_selection"),Co(t)("add_remove_rows"),Co(t)("header"),Co(t)("include_all_fields"),Co(t)("layout"),qo.makeButtonMetadata(Co(t)("buttons")),Co(e)("type")):null}}]),r}();function Xo(e,t){if(t){var r,n=Go(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.complex_type_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Ko=function(){function r(t){e(this,r),this.structures=t}return t(r,[{key:"getStructure",value:function(e){var t;return this.structures.forEach((function(r){r.name===e&&(t=r)})),t}}],[{key:"makeStructureMetadata",value:function(e,t){if(e){var n,o=[],i=Go(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=$o.makeStructure(a,Xo(a.id,t));null!==s&&o.push(s)}}catch(e){i.e(e)}finally{i.f()}return new r(o)}return null}}]),r}(),Yo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.icon=n,this.editorSize=o,this.pixelWidth=i,this.label=a,this.labelEditable=s,this.help=l,this.description=To.make(p),this.structureMetadata=c,this.parameterMetadata=u,this.groupMetadata=d,this.actionMetadata=h,this.heading=f}return t(r,[{key:"editorSizeHint",value:function(e){return this.editorSize?this.editorSize:e||p.SMALL}}],[{key:"makePropertyDef",value:function(e,t,n,o){var i=Ko.makeStructureMetadata(n,Co(o)("complex_type_info")),a=Vo.makeParameterMetadata(t,Co(o)("parameter_info"),Co(o)("ui_parameters")),s=No.makeActionMetadata(Co(o)("action_info")),l=Lo.makeGroupMetadata(Co(o)("group_info"),a.getParameters()),p=e&&e.title?e.title:null,c=e&&void 0!==e.editable?e.editable:gt;return new r(Co(o)("id"),Co(o)("icon"),Co(o)("editor_size"),Co(o)("pixel_width"),p,c,Co(o)("help"),Co(o)("description"),i,a,l,s,Co(o)("label"))}}]),r}(),Jo=t((function t(r){e(this,t),this.name=r.name,r.label&&(this.label=r.label),r.description&&(this.description=r.description),"boolean"==typeof r.labelVisible&&(this.labelVisible=r.labelVisible),r.controlType&&(this.controlType=r.controlType),r.valueDef&&(this.valueDef=r.valueDef),r.role&&(this.role=r.role),r.additionalText&&(this.additionalText=r.additionalText),r.orientation&&(this.orientation=r.orientation),r.values&&(this.values=r.values),r.valueLabels&&(this.valueLabels=r.valueLabels),r.valueDescs&&(this.valueDescs=r.valueDescs),r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"==typeof r.sortable&&(this.sortable=r.sortable),"boolean"==typeof r.filterable&&(this.filterable=r.filterable),"boolean"==typeof r.resizable&&(this.resizable=r.resizable),r.language&&(this.language=r.language),r.enableMaximize&&(this.enableMaximize=r.enableMaximize),r.charLimit&&(this.charLimit=r.charLimit),r.summary&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.generatedValues&&(this.generatedValues={},r.generatedValues.operation&&(this.generatedValues.operation=r.generatedValues.operation),r.generatedValues.start_value&&(this.generatedValues.startValue=r.generatedValues.start_value)),r.dateFormat&&(this.dateFormat=r.dateFormat),r.timeFormat&&(this.timeFormat=r.timeFormat),r.customControlId&&(this.customControlId=r.customControlId),r.data&&(this.data=r.data),r.rows&&(this.rows=r.rows),r.displayChars&&(this.displayChars=r.displayChars),r.action&&(this.action=r.action),r.structureType&&(this.structureType=r.structureType),r.subControls&&(this.subControls=r.subControls),r.childItem&&(this.childItem=r.childItem),r.layout&&(this.layout=r.layout),"number"==typeof r.keyIndex&&(this.keyIndex=r.keyIndex),r.defaultRow&&(this.defaultRow=r.defaultRow),"boolean"==typeof r.moveableRows&&(this.moveableRows=r.moveableRows),"boolean"==typeof r.required&&(this.required=r.required),r.rowSelection&&(this.rowSelection=r.rowSelection),"boolean"==typeof r.addRemoveRows&&(this.addRemoveRows=r.addRemoveRows),"boolean"==typeof r.hideEditButton&&(this.hideEditButton=r.hideEditButton),"boolean"==typeof r.header&&(this.header=r.header),"boolean"==typeof r.uionly&&(this.uionly=r.uionly),"boolean"==typeof r.includeAllFields&&(this.includeAllFields=r.includeAllFields),r.dmImage&&(this.dmImage=r.dmImage),"boolean"==typeof r.visible&&(this.visible=r.visible),"number"==typeof r.width&&(this.width=r.width),r.editStyle?this.editStyle=r.editStyle:r.isKeyField||void 0===r.structureType||(this.editStyle=_.INLINE),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.customValueAllowed&&(this.customValueAllowed=r.customValueAllowed),r.className&&(this.className=r.className),r.buttons&&(this.buttons=r.buttons),this.light=te(r,"light",!0)}));function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ei=function(){function r(t){e(this,r),this.id=Co(t)("id"),this.itemType=Co(t)("itemType"),this.tabs=Co(t)("tabs"),this.panel=Co(t)("panel"),this.control=Co(t)("control"),this.text=Co(t)("text"),this.textType=Co(t)("textType"),this.secondaryText=Co(t)("secondaryText"),this.dependsOn=Co(t)("dependsOn"),this.action=Co(t)("action"),this.className=Co(t)("className"),this.nestedPanel=Co(t)("nestedPanel")}return t(r,null,[{key:"makePrimaryTabs",value:function(e){return new r({itemType:I.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,t,n){return new r({itemType:I.SUB_TABS,tabs:e,className:t,nestedPanel:n})}},{key:"makePanelSelector",value:function(e,t,n,o){return new r({id:e,itemType:I.PANEL_SELECTOR,tabs:t,dependsOn:n,className:o})}},{key:"makePanel",value:function(e){return new r({itemType:I.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,t,n){return new r({itemType:I.ADDITIONAL_LINK,panel:n,text:e,secondaryText:t})}},{key:"makeControl",value:function(e){return new r({itemType:I.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new r({itemType:I.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new r({itemType:I.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,t){return new r({itemType:I.STATIC_TEXT,text:e,textType:t})}},{key:"makeTextPanel",value:function(e,t,n,o,i){return new r({itemType:I.TEXT_PANEL,panel:{id:e,label:t,description:n,className:o,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,t){return new r({itemType:I.CUSTOM_PANEL,panel:e,className:t})}},{key:"makeTearsheetPanel",value:function(e,t){return new r({itemType:I.TEARSHEET,panel:Zo(Zo({},e),{},{description:t})})}}]),r}(),ti=t((function t(r,n,o){e(this,t),this.text=r,this.group=n,this.content=o})),ri=function(){function r(t,n,o,i){e(this,r),this.propType=t===m.OBJECT?m.STRUCTURE:t,this.isList=n,this.isMap=o,this.defaultValue=i}return t(r,null,[{key:"make",value:function(e){return new r(e.propType(),e.isList(),e.isMapValue(),e.defaultValue)}}]),r}(),ni=t((function t(r,n){e(this,t),this.text=r,n&&(this.numberGenerator=n)})),oi=t((function t(r,n,o){e(this,t),this.text=r,n&&(this.placement=n),o&&(this.link=o)})),ii=t((function t(r,n,o,i,a,s){var l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,this.open=l,s&&(this.label=s),o&&(this.className=o)})),ai=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,o&&(this.className=o),s&&(this.label=s),l&&(this.description=l)})),si=t((function t(r,n,o,i,a,s){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.parameters=a,this.data=s,o&&(this.className=o)})),li=t((function t(r,n){e(this,t),this.text=r,n.range&&(this.range=n.range)}));function pi(e,t,r,n){var o=r.l10nLabel(t,t.name),i={light:!0,containerType:n};return new ti(o,t.name,ci(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,i))}function ci(e,t,r,n,o,i){var a=r.name,s=null,l=null,p=r.className,c=te(r,"nestedPanel",!1);switch(r.groupType()){case T.CONTROLS:return ei.makePanel(new ii(a,w.GENERAL,p,c,ui(e,t,r,n,o,i)));case T.COLUMN_SELECTION:return ei.makePanel(new ii(a,w.COLUMN_SELECTION,p,c,ui(e,t,r,n,o,i)));case T.ADDITIONAL:var u=new ii(a,w.GENERAL,p,c,ui(e,t,r,n,o,i));return l=o.l10nLabel(r,r.name),ei.makeAdditionalLink(l,l,u);case T.SUB_TABS:var d=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=r.name;s=ci(e,t,r,n,o,i),l=o.l10nLabel(r,r.name),d.push(new ti(l,a,s))})),ei.makeSubTabs(d,p,c);case T.PANEL_SELECTOR:var h=di(r,e,t,n,o,i);return ei.makePanelSelector(a,h,r.dependsOn,p);case T.PANELS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),f.push(s)})),ei.makePanel(new ii(a,w.GENERAL,p,c,f));case T.COLUMN_PANEL:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),m.push(s)})),ei.makePanel(new ii(a,w.COLUMN_PANEL,p,c,m));case T.CUSTOM_PANEL:return ei.makeCustomPanel(new si(a,w.CUSTOM,p,c,r.parameterNames(),r.data));case T.SUMMARY_PANEL:l=o.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),v.push(s)})),ei.makePanel(new ii(a,w.SUMMARY,p,c,v,l));case T.ACTION_PANEL:var y;return l=o.l10nResource(r.label),r.description&&(y=new oi(o.l10nResource(r.description),null,r.description?r.description.link:null)),ei.makePanel(new ai(a,w.ACTION_PANEL,p,c,function(e,t,r,n,o){var i=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=ei.makeAction(yi(t.getAction(e),o));i.push(r)}));return i}(0,t,r,0,o),l,y));case T.TEXT_PANEL:var b;return l=o.l10nResource(r.label),r.description&&(b=new oi(o.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),ei.makeTextPanel(a,l,b,p,c);case T.TWISTY_PANEL:l=o.l10nLabel(r,r.name);var E=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),E.push(s)})),ei.makePanel(new ii(a,w.TWISTY_PANEL,p,c,E,l,r.open));case T.TEARSHEET_PANEL:var I;l=o.l10nLabel(r,r.name),r.description&&(I=new oi(o.l10nResource(r.description)));var S=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=Object.assign({},i,{light:!1});s=ci(e,t,r,n,o,a),S.push(s)})),ei.makeTearsheetPanel(new ii(a,w.TEARSHEET,p,c,S,l,!1),I);default:return g.warn("(Unknown group type '"+r.groupType()+"')"),null}}function ui(e,t,r,n,o,i){var a=[],s=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach((function(l){var p,c=e.getParameter(l);if(c.propType()===m.STRUCTURE&&n&&(p=n.getStructure(c.baseType())),!(r instanceof $o)||r instanceof $o&&c.isSubPanelEdit()){var u=fi(e,l,r,p,o,t,n,null,i),d=ei.makeControl(u);if(c.separatorBefore()&&a.push(ei.makeHSeparator()),c.textBefore&&a.push(ei.makeStaticText(c.getTextBefore(o),c.getTextBeforeType())),a.push(d),c.textAfter&&a.push(ei.makeStaticText(c.getTextAfter(o),c.getTextAfterType())),c.separatorAfter()&&a.push(ei.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var f=0;f<r.subGroups.length;f++)d.control.controlType===h.RADIOSET&&d.control.orientation===L.VERTICAL&&r.subGroups[f].type===T.PANEL_SELECTOR&&!0===r.subGroups[f].insertPanels&&r.subGroups[f].dependsOn===d.control.name&&(s.push(r.subGroups[f].dependsOn),d.additionalItems=di(r.subGroups[f],e,t,n,o,i))}})),Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){if(!function(e,t){if(t)for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}(s,r.dependsOn)){var l=ci(e,t,r,n,o,i);a.push(l)}})),a):a}function di(e,t,r,n,o,i){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var s=e.name,l=ci(t,r,e,n,o,i),p=o.l10nLabel(e,e.name);a.push(new ti(p,s,l))})),a}function hi(e,t){var r,n=e.getRole();if(e.isList()){var o=function(e){var t={};switch(e.getRole()){case v.TEXT:t.controlType=h.TEXTAREA;break;case v.ENUM:e.getValidValueCount()<5?t.controlType=h.CHECKBOXSET:t.controlType=h.SOMEOFSELECT;break;case v.COLUMN:t.role=v.COLUMN,t.controlType=h.SELECTCOLUMNS;break;default:t.controlType=h.TEXTAREA}return t}(e);r=o.controlType,o.role&&(n=o.role)}else switch(e.getRole()){case v.TEXT:r=h.TEXTAREA;break;case v.ENUM:r=e.getValidValueCount()>4||t&&!vi(e)?h.ONEOFSELECT:h.RADIOSET;break;case v.COLUMN:n=v.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return vi(e);return!1}(e)?h.SELECTCOLUMNS:h.SELECTCOLUMN;break;case v.EXPRESSION:r=h.EXPRESSION;break;case v.EMAIL:n=v.EMAIL,r=h.TEXTFIELD;break;case v.URL:n=v.URL,r=h.TEXTFIELD;break;case v.COLOR:n=v.COLOR,r=h.TEXTFIELD;break;default:r=h.TEXTFIELD}return{controlType:r,role:n}}function fi(e,t,r,n,o,i,a,s,l){var p=void 0!==s&&s,c=p?s:e.getParameter(t),u=c.getAdditionalText(o),d=c.orientation,f=c.required;c.numberGenerator&&(c.numberGenerator=new li(o.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var y,b=new ni(o.l10nLabel(c,c.name),c.numberGenerator);c.description&&(y=new oi(o.l10nDesc(c,c.name),c.description?c.description.placement:null,c.description?c.description.link:null));var E,I,S,C,R,_,k,L,A,D,O,P,N,x,B,M=!0,F=c.moveableRows,V=c.structureType;if(p||c.getRole()!==v.CUSTOM)switch(c.propType()){case m.STRING:var U=hi(c,p);I=U.controlType,E=U.role;break;case m.PASSWORD:I=h.PASSWORDFIELD;break;case m.BOOLEAN:c.control&&c.control!==h.CHECKBOX||(M=!1,I=h.CHECKBOX);break;case m.INTEGER:case m.LONG:case m.DOUBLE:I=c.isList()?h.TEXTAREA:h.NUMBERFIELD;break;case m.DATE:E=m.DATE,I=c.control===h.DATEPICKER?h.DATEPICKER:c.control===h.DATEPICKERRANGE?h.DATEPICKERRANGE:c.isList()?h.TEXTAREA:h.DATEFIELD;break;case m.TIME:E=m.TIME,I=c.isList()?h.TEXTAREA:h.TIMEFIELD;break;case m.TIMESTAMP:I=h.TIMESTAMP;break;case m.STRUCTURE:var H=p&&a?a.getStructure(c.baseType()):n;if(H){if(H.hasSubPanel()&&(_=function(e,t,r,n){var o=new ii(e.name,w.GENERAL,"properties-editstyle-sub-panel",!1,ui(e.parameterMetadata,e.actionMetadata,e,r,t,n)),i=t.l10nLabel(e,e.name);return ei.makeAdditionalLink("...",i,o)}(H,o,a,l)),C=H.keyAttributeIndex(),R=H.defaultStructure(),S=[],H.parameterMetadata&&Array.isArray(H.parameterMetadata.paramDefs)&&H.parameterMetadata.paramDefs.forEach((function(e){var t=mi(e,o,a,l);S.push(t)})),(c.isMapValue()||c.isList())&&H.keyDefinition){var j=mi(H.keyDefinition,o,a,l);S.unshift(j)}c.isList()||c.isMapValue()?(!p&&r&&void 0!==r.groupType&&r.groupType()===T.COLUMN_SELECTION||c.control===h.STRUCTURETABLE||c.getRole()===v.COLUMN?(I=h.STRUCTURETABLE,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header,D=H.includeAllFields):(I=h.STRUCTURELISTEDITOR,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header),H.buttons&&(P=function(e,t){var r=[];return e.buttonDefs.forEach((function(n){r.push(function(e,t){var r,n;e.label&&(r=new ni(t.l10nLabel(e,e.id)));e.description&&(n=new oi(t.l10nDesc(e,e.description)));return new jo(e.id,r,n,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(n.id),t))})),r}(H.buttons,o))):(I=h.STRUCTUREEDITOR,H.layout&&(O=H.layout)),V=H.type}else I=h.TEXTFIELD;break;case m.OBJECT:if(p)(E=c.getRole())===v.COLUMN?I=h.SELECTCOLUMN:(g.warn("Complex subControl type that is not a field! Name: "+c.name),I=h.READONLY);else if(c.isCompoundField()){var z=hi(c,p);I=z.controlType,E=z.role}else g.warn("Complex parameter type that is not a field! Name: "+c.name),I=h.READONLY;break;default:E="???"+c.propType()+"???",I=h.TEXTAREA}else I=h.CUSTOM;c.getRole()===v.ENUM&&(N=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueLabel(r,String(e)))})),n}return[]}(c,o)),c.getRole()===v.ENUM&&(x=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueDesc(r,String(e)))})),n}return[]}(c,o)),!p&&c.actionRef&&(B=yi(i.getAction(c.actionRef),o));var q,G,W,$={};return $.name=c.name,$.label=b,$.description=y,$.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:M,$.controlType=c.getControl(I),$.valueDef=ri.make(c),$.structureType=V,$.role=E,$.additionalText=u,$.orientation=d,$.values=c.getValidValues(),$.valueLabels=N,$.valueDescs=x,$.valueIcons=c.valueIcons,$.sortable=c.sortable,$.filterable=c.filterable,$.resizable=c.resizable,$.charLimit=c.charLimit,$.subControls=S,$.keyIndex=C,$.defaultRow=R,$.childItem=_,$.moveableRows=F,$.required=f,$.language=c.language,$.enableMaximize=c.enableMaximize,$.summary=c.summary,$.increment=c.increment,$.rowSelection=k,$.generatedValues=c.generatedValues,$.addRemoveRows=L,$.dateFormat=c.dateFormat,$.timeFormat=c.timeFormat,$.customControlId=c.customControlId,$.data=c.data,$.rows=c.rows,$.displayChars=c.displayChars,$.header=A,$.uionly=c.uionly,$.includeAllFields=D,$.layout=O,$.dmImage=c.dmImage,$.action=B,$.customValueAllowed=c.customValueAllowed,$.className=c.className,$.buttons=P,$.light=(q=l.light,G=l.containerType,W=c.isSubPanelEdit(),q&&(G!==bt.TEARSHEET||G===bt.TEARSHEET&&W)),p&&($.visible=c.visible,$.width=c.columns(8),$.editStyle=c.editStyle,$.isKeyField=c.isKey,$.dmDefault=c.dmDefault),new Jo($)}function mi(e,t,r,n){return fi(null,null,null,e.propType()===m.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,n)}function vi(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function yi(e,t){var r,n=new ni(t.l10nLabel(e,e.id));return e.description&&(r=new oi(t.l10nDesc(e,e.id))),new Oo(e.id,n,r,e.control,e.data,e.image,e.button,e.className)}function gi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return bi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bi(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ei(e,t){for(var n in e)ee(e,n)&&"object"===r(e[n])&&null!==e[n]&&(e[n].message?e[n].message.default=t.l10nResource(e[n].message):Ei(e[n],t))}function Ii(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Si(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Si(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ci=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.componentId=t,this.label=n,this.labelEditable=o,this.help=i,this.editorSize=a,this.pixelWidth=s,this.uiItems=l,this.buttons=p,this.data=c,this.conditions=u,this.resources=d,this.icon=h,this.heading=f}return t(r,null,[{key:"makeForm",value:function(e,t){var n,o,i=Yo.makePropertyDef(Co(e)("titleDefinition"),Co(e)("parameters"),Co(e)("complex_types"),Co(e)("uihints")),a=Co(e)("resources"),s=Co(e)("conditions");if(i){var l=new Ro(a),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var u,d=Ii(i.groupMetadata.groups);try{for(d.s();!(u=d.n()).done;){var h=u.value;c.push(pi(i,h,l,t))}}catch(e){d.e(e)}finally{d.f()}}var f={currentParameters:Co(e)("current_parameters"),uiCurrentParameters:Co(e)("current_ui_parameters"),datasetMetadata:Co(e)("dataset_metadata")},m=t===bt.TEARSHEET||t===bt.MODAL?p.LARGE:p.SMALL;return new r(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(m),i.pixelWidth,[ei.makePrimaryTabs(c)],(n=new Ri("ok","OK",!0,""),o=new Ri("cancel","Cancel",!1,""),[n,o]),f,function(e,t){if(e&&Array.isArray(e)){var r,n=gi(e);try{for(n.s();!(r=n.n()).done;)Ei(r.value,t)}catch(e){n.e(e)}finally{n.f()}}return e}(s,l),a,i.icon,l.l10nResource(i.heading))}return null}}]),r}();var Ri=t((function t(r,n,o,i){e(this,t),this.id=r,this.text=n,this.isPrimary=o,this.url=i}));function Ti(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var _i=function(r){n(i,be);var o=Ti(i);function i(t,r,n,a,s){var l;return e(this,i),(l=o.call(this,t)).newValues=t,l.initialValues=r,l.appData=n,l.applyPropertyChanges=a,l.propertiesActionLabel=s,l}return t(i,[{key:"do",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"undo",value:function(){this.applyPropertyChanges(this.initialValues.properties,this.appData,this.initialValues.additionalInfo,this.initialValues.undoInfo,this.initialValues.uiProperties)}},{key:"redo",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"getLabel",value:function(){return this.propertiesActionLabel}}]),i}(),ki=re,wi=A;var Li=$,Ai=X,Di=function(e){return ki((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&wi(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Oi=ne,Pi=oe,Ni=ie,xi=Object.prototype.hasOwnProperty,Bi=Di((function(e,t){if(Pi(t)||Oi(t))Ai(t,Ni(t),e);else for(var r in t)xi.call(t,r)&&Li(e,r,t[r])}));function Mi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.property&&t.property.propertyId?t.property.propertyId:null;switch(t.type){case $r:if(null===r)return e;var n=e;return void 0!==r.row?(void 0===n[r.name]&&(n[r.name]=[]),void 0!==r.col?(void 0===n[r.name][r.row]&&(n[r.name][r.row]=[]),void 0!==r.propertyId?Fi(r.propertyId,n[r.name][r.row][r.col],t.property.value):n[r.name][r.row][r.col]=t.property.value):void 0!==r.propertyId?Fi(r.propertyId,n[r.name][r.row],t.property.value):n[r.name][r.row]=t.property.value):n[r.name]=t.property.value,Object.assign({},e,n);case Wr:return Object.assign({},t.properties);case Xr:var o=e;return null!==r&&void 0!==r.name&&delete o[r.name],Object.assign({},e,o);default:return e}}function Fi(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?Fi(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Vi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yr:var r=e,n=t.state.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]={value:t.state.value}}else r[n.name][o]={value:t.state.value}}else r[n.name]={value:t.state.value};return Object.assign({},e,r);case Kr:return Object.assign({},t.states);default:return e}}function Ui(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Qr:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case Jr:return Object.assign({},t.states);default:return e}}function Hi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case en:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case Zr:return Object.assign({},t.states);default:return e}}function ji(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case rn:var r=e,n=t.message.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]=t.message.value}else r[n.name][o]=Object.assign({},t.message.value)}else r[n.name]=Object.assign({},t.message.value);return Object.assign({},e,r);case nn:var a=e;return a[t.message.propertyId.name]&&(void 0!==t.message.propertyId.row?void 0!==t.message.propertyId.col?delete a[t.message.propertyId.name][t.message.propertyId.row][t.message.propertyId.col]:delete a[t.message.propertyId.name][t.message.propertyId.row]:(delete a[t.message.propertyId.name].type,delete a[t.message.propertyId.name].text,delete a[t.message.propertyId.name].validation_id,delete a[t.message.propertyId.name].required,delete a[t.message.propertyId.name].propertyId,delete a[t.message.propertyId.name].displayError,Z(a[t.message.propertyId.name])&&delete a[t.message.propertyId.name])),Object.assign({},e,a);case tn:return Object.assign({},t.messages);default:return e}}function zi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===on?Object.assign({},e,t.datasetMetadata):e}function qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case an:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].selectedRows=t.info.selectedRows}else r[n.name][o].selectedRows=t.info.selectedRows}else r[n.name].selectedRows=t.info.selectedRows;return Object.assign({},e,r);case sn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].selectedRows=[]:a[s.name][l].selectedRows=[]}else a[s.name].selectedRows=[];return Object.assign({},e,a)}return{};default:return e}}function Gi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case fn:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].staticRows=t.info.staticRows}else r[n.name][o].staticRows=t.info.staticRows}else r[n.name].staticRows=t.info.staticRows;return Object.assign({},e,r);case mn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].staticRows=[]:a[s.name][l].staticRows=[]}else a[s.name].staticRows=[];return Object.assign({},e,a)}return{};default:return e}}function Wi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ln:var r=e;return r.title=t.title,Object.assign({},e,r);case pn:var n=e;return n.activeTab=t.activeTab,Object.assign({},e,n);default:return e}}function $i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===cn){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function Xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===un){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===dn){var r=e;return r[t.info.panelId.name]=t.info.disableState,Object.assign({},e,r)}return e}function Yi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.info&&t.info.propertyId?t.info.propertyId:null;switch(t.type){case hn:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?Ji(r,n[r.name],"addRemoveRows",t.info.value):n[r.name].addRemoveRows=t.info.value,Object.assign({},e,n);case vn:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?Ji(r,o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):Ee(o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,o);case yn:if(null===r)return e;var i=e;return void 0===i[r.name]&&(i[r.name]={}),void 0!==r.row?Ji(r,i[r.name],"hideEditButton",t.info.value):i[r.name].hideEditButton=t.info.value,Object.assign({},e,i);default:return e}}function Ji(e,t,r,n){void 0!==e.row&&(void 0===t[e.row]&&(t[e.row]={}),void 0!==e.col?(void 0===t[e.row][e.col]&&(t[e.row][e.col]={}),void 0!==e.propertyId?Ji(e.propertyId,t[e.row][e.col],r,n):Ee(t[e.row][e.col],r,n)):void 0!==e.propertyId?Ji(e.propertyId,t[e.row],r,n):Ee(t[e.row],r,n))}function Qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===gn?Object.assign({},e,t.tearsheetId):e}var Zi=function(){function r(){e(this,r),this.combinedReducer=sr({propertiesReducer:Mi,controlStatesReducer:Vi,panelStatesReducer:Ui,errorMessagesReducer:ji,datasetMetadataReducer:zi,rowSelectionsReducer:qi,componentMetadataReducer:Wi,disableRowMoveButtonsReducer:$i,actionStatesReducer:Hi,wideFlyoutPrimaryButtonDisableReducer:Ki,tearsheetStatesReducer:Qi,saveButtonDisableReducer:Xi,propertiesSettingsReducer:Yi,rowFreezeReducer:Gi});var t=!1;"undefined"!=typeof window&&(t=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=lr(this.combinedReducer,t)}return t(r,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"getStore",value:function(){return this.store}},{key:"subscribe",value:function(e){this.store.subscribe(e)}},{key:"getPropertyValue",value:function(e){var t=this.store.getState().propertiesReducer[e.name];return this.getNestedPropertyValue(e,t)}},{key:"getNestedPropertyValue",value:function(e,t){if(void 0!==e.row&&null!=t){var r=t[e.row];return void 0!==e.col&&null!=r&&Array.isArray(r)?void 0!==e.index?r[e.col][e.index]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r[e.col]):r[e.col]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r):r}return t}},{key:"getPropertyValues",value:function(){var e=this.store.getState();return D(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:Wr,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:$r,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:Xr,property:{propertyId:e}})}},{key:"getControlState",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];if(t&&("hidden"===t.value||"disabled"===t.value))return t;var r=void 0!==e.col?e.col.toString():null,n=void 0!==e.row?e.row.toString():null;return null!==r&&t&&t[r]&&(void 0!==t[r].value||t[r][n]&&(void 0!==t[r][n].value||void 0!==t[r][n].values))&&(t=t[r],null!==n&&t&&t[n]&&(void 0!==t[n].value||void 0!==t[n].values)&&(t=t[n])),t||null}},{key:"getControlStates",value:function(){var e=this.store.getState();return D(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){O(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:Kr,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:Yr,state:{propertyId:e,value:t}})}},{key:"getPanelState",value:function(e){if(void 0===e)return null;var t=this.store.getState().panelStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getPanelStates",value:function(){var e=this.store.getState();return D(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){O(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:Jr,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:Qr,state:{panelId:e,value:t}})}},{key:"getActionState",value:function(e){if(void 0===e)return null;var t=this.store.getState().actionStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getActionStates",value:function(){var e=this.store.getState();return D(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){O(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:Zr,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:en,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:un,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:dn,info:{panelId:e,disableState:t}})}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){if(void 0===e)return null;var t=this.store.getState().wideFlyoutPrimaryButtonDisableReducer[e.name];return void 0!==t?t:null}},{key:"getFilteredEnumItems",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];return void 0!==e.col&&t&&t[e.col.toString()]&&(t=t[e.col.toString()],void 0!==e.row&&t[e.row.toString()]&&(t=t[e.row.toString()])),t?t.enumFilter:null}},{key:"getErrorMessage",value:function(e,t){if(void 0===e)return null;var r=this.store.getState().errorMessagesReducer[e.name];if(void 0!==e.row&&r){if(r=r[e.row.toString()],void 0!==e.col&&r)return r[e.col.toString()];if(r&&r.text)return r}var n=null,o=null;if(r&&r.text&&(n=r),r){var i=G(r);o=this._getTableCellErrors(i,t)}return null!==n&&null!==o?n.text=n.text+" "+o.text:null===n&&(n=o),n}},{key:"_getTableCellErrors",value:function(e,t){var r=null,n=0,o=0;for(var i in e)if(ee(e,i)&&"text"!==i){var a=e[i];if(a&&a.text&&(r=a,n+=a.type===dt.ERROR?1:0,o+=a.type===dt.WARNING?1:0),a)for(var s in a)if(ee(a,s)&&"text"!==s){var l=a[s];l&&l.text&&(r=l,n+=l.type===dt.ERROR?1:0,o+=l.type===dt.WARNING?1:0)}}return n+o!==1&&r&&(r.type=n>0?dt.ERROR:dt.WARNING,r.text=n>0?u(t,st.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=o>0?u(t,st.TABLE_SUMMARY_WARNING,{warningMsgCount:o}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return D(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){O(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:tn,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){O(this.getErrorMessage(e),t)||this.store.dispatch({type:rn,message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:nn,message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:on,datasetMetadata:e}}(e))}},{key:"getDatasetMetadata",value:function(){return this.store.getState().datasetMetadataReducer}},{key:"getSelectedRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowSelectionsReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.selectedRows?t.selectedRows:[]}},{key:"updateSelectedRows",value:function(e,t){this.store.dispatch({type:an,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:sn,info:{propertyId:e}})}},{key:"getStaticRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowFreezeReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.staticRows?t.staticRows:[]}},{key:"updateStaticRows",value:function(e,t){this.store.dispatch({type:fn,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:mn,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:cn,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(bn(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(En(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:hn,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:vn,info:{propertyId:e,buttonId:t,value:r}})}},{key:"getTableButtons",value:function(e){var t=this.store.getState(),r={};return t.propertiesSettingsReducer[e.name]?void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"tableButtons",r):t.propertiesSettingsReducer[e.name].tableButtons||r:r}},{key:"getTableButtonEnabled",value:function(e,t){var r=this.store.getState();return!!r.propertiesSettingsReducer[e.name]&&(void 0!==e.row?ea(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),false):r.propertiesSettingsReducer[e.name].tableButtons[t])}},{key:"setHideEditButton",value:function(e,t){this.store.dispatch({type:yn,info:{propertyId:e,value:t}})}},{key:"getHideEditButton",value:function(e){var t=this.store.getState();return!!t.propertiesSettingsReducer[e.name]&&(void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"hideEditButton",false):t.propertiesSettingsReducer[e.name].hideEditButton)}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:gn,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}]),r}();function ea(e,t,r,n){return void 0!==e.row&&t[e.row]?void 0!==e.col&&t[e.row][e.col]?void 0!==e.propertyId?ea(e.propertyId,t[e.row][e.col],r,n):te(t[e.row][e.col],r):void 0!==e.propertyId?ea(e.propertyId,t[e.row],r,n):te(t[e.row],r):n}function ta(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ra(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ra(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function na(e,t,r){if(e.or)!function(e,t,r){for(var n=0;n<e.length;n++)na(e[n],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var n=0;n<e.length;n++)na(e[n],t,r)}(e.and,t,r);else{if(!e.condition)throw new Error("Failed to parse definition");!function(e,t,r){e.parameter_ref?(t.push(e.parameter_ref),e.parameter_2_ref&&t.push(e.parameter_2_ref)):t.push(r)}(e.condition,t,r)}}function oa(e,t,r){if(t.label&&(t.summaryLabel=t.label.text),r&&(t.parentCategoryId=r),e.push(t),t.subControls)for(var n=0;n<t.subControls.length;n++){var o=t.subControls[n];o.parameterName=t.name,o.columnIndex=n,r&&(o.parentCategoryId=r),e.push(o)}}function ia(e,t,r,n,o){switch(r.itemType){case I.CONTROL:var i=r.control;if(n&&(i.summaryPanelId=n),o&&(i.parentCategoryId=o),oa(e,i,o),r.additionalItems){var a,s=ta(r.additionalItems);try{for(s.s();!(a=s.n()).done;){ia(e,t,a.value.content,n,o)}}catch(e){s.e(e)}finally{s.f()}}break;case I.ADDITIONAL_LINK:case I.CHECKBOX_SELECTOR:case I.TEARSHEET:case I.PANEL:if(r.panel&&r.panel.uiItems){var l=n;r.panel.panelType===w.SUMMARY&&(l=r.panel.id);var p,c=ta(r.panel.uiItems);try{for(c.s();!(p=c.n()).done;){ia(e,t,p.value,l,o)}}catch(e){c.e(e)}finally{c.f()}}break;case I.PRIMARY_TABS:case I.PANEL_SELECTOR:case I.SUB_TABS:if(r.tabs){var u,d=ta(r.tabs);try{for(d.s();!(u=d.n()).done;){var h=u.value;ia(e,t,h.content,n,r.itemType===I.PANEL_SELECTOR||r.itemType===I.SUB_TABS?o:h.group)}}catch(e){d.e(e)}finally{d.f()}}break;case I.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var f,m=ta(r.panel.parameters);try{for(m.s();!(f=m.n()).done;){var v={name:f.value,controlType:"custom"};n&&(v.summaryPanelId=n),o&&(v.parentCategoryId=o),e.push(v)}}catch(e){m.e(e)}finally{m.f()}}break;case I.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case I.STATIC_TEXT:case I.TEXT_PANEL:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function aa(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?na(t.evaluate,r,t.parameter_refs):na(t.evaluate,r,t.parameter_ref);var n=Array.from(new Set(r));return n.length>1?n:n[0]}throw new Error("Invalid validation schema")}(t[r]),o={params:n,definition:t};sa(e.controls,n,o);var i=t[r].parameter_refs;t[r].group_refs?i=t[r].group_refs:t[r].action_refs?i=t[r].action_refs:t[r].target&&t[r].target.parameter_ref&&(i=[t[r].target.parameter_ref]),i&&sa(e.refs,i,o)}catch(e){g.info("Error parsing ui conditions: "+e)}return e}function sa(e,t,r){if(!0===Array.isArray(t))for(var n=0;n<t.length;n++)void 0===e[t[n]]&&(e[t[n]]=[]),e[t[n]].push(r);else void 0===e[t]&&(e[t]=[]),e[t].push(r)}function la(e){var t={};if(e&&e.functions){var r=new Ro(Co(e)("resources")),n=G(e.functions);if(Array.isArray(n.function_info)&&Array.isArray(n.function_categories)){var o=n.parmsSet?n.function_info:function(e,t){return e.map((function(e){var r=e;if(r.locLabel=t.l10nLabel(r,r.id),r.help=t.l10nDesc(r,r.locLabel),r.value=r.locLabel,r.return_type_label){var n=To.make(r.return_type_label);r.locReturnType=t.l10nResource(n)}return Array.isArray(e.parameters)&&(r.locLabel&&-1!==r.locLabel.indexOf("?")?e.parameters.forEach((function(e){-1!==r.locLabel.indexOf("?")&&(r.locLabel=r.locLabel.replace("?"," "+t.l10nLabel(e,e.id)+" "))})):(r.value+="(",r.locLabel+="(",e.parameters.forEach((function(e,n){var o=n>0?", ":"";r.locLabel+=o+t.l10nLabel(e,e.id),r.value+=o+"?"})),r.locLabel+=")",r.value+=")")),r}))}(n.function_info,r);n.parmsSet=!0,t.functionCategories=[],n.function_categories.forEach((function(e){t.functionCategories[e.id]={},t.functionCategories[e.id].locLabel=r.l10nLabel(e,e.id),t.functionCategories[e.id].functionList=[],e.function_refs.forEach((function(r){var n=pa(r,o);n&&t.functionCategories[e.id].functionList.push(n)}))})),t.operators=[],n.operator_refs&&n.operator_refs.forEach((function(e){var r=pa(e,o);r&&t.operators.push(r)})),t.fields={field_categories:[],field_table_info:[]},e.fields&&(e.fields.field_categories&&e.fields.field_categories.forEach((function(e){e.locLabel=r.l10nLabel(e,e.id),e.field_columns.field_column_info.locLabel=r.l10nLabel(e.field_columns.field_column_info,e.id+".field_column_info"),e.field_columns.value_column_info.locLabel=r.l10nLabel(e.field_columns.value_column_info,e.id+".value_column_info");var n=r.l10nDesc(e.field_columns.field_column_info,e.id+".field_column_info");n!==e.id+".field_column_info"&&(e.field_columns.field_column_info.descLabel=n);var o=r.l10nDesc(e.field_columns.value_column_info,e.id+".value_column_info");o!==e.id+".value_column_info"&&(e.field_columns.value_column_info.descLabel=o),e.field_columns.additional_column_info&&e.field_columns.additional_column_info.forEach((function(t){t.locLabel=r.l10nLabel(t,e.id+".additional_column_info."+t.id)})),t.fields.field_categories.push(e)})),e.fields.field_table_info&&e.fields.field_table_info.forEach((function(e){t.fields.field_table_info.push(e)})))}}return e&&e.resources&&(t.resources=e.resources),t}function pa(e,t){var r=t.find((function(t){return t.id===e}));return r||(g.warn("Expression function information list, no function information found for "+e),null)}function ca(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ua(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ua(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function da(e,t,r){switch(t.itemType){case I.PRIMARY_TABS:case I.SUB_TABS:if(t.tabs){var n,o=ca(t.tabs);try{for(o.s();!(n=o.n()).done;){da(e,n.value.content,r)}}catch(e){o.e(e)}finally{o.f()}}break;case I.TEXT_PANEL:case I.PANEL:case I.CUSTOM_PANEL:case I.ADDITIONAL_LINK:case I.TEARSHEET:case I.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),ha(e,t.panel.id),t.panel.uiItems)){var i,a=ca(t.panel.uiItems);try{for(a.s();!(i=a.n()).done;){da(e,i.value,t.panel.id)}}catch(e){a.e(e)}finally{a.f()}}break;case I.CONTROL:if(e[r].controls.push(t.control.name),t.control.action&&e[r].actions.push(t.control.action.name),t.control.additionalItems){var s,l=ca(t.control.additionalItems);try{for(l.s();!(s=l.n()).done;){da(e,s.value.content,r)}}catch(e){l.e(e)}finally{l.f()}}break;case I.PANEL_SELECTOR:if(e[r].panels.push(t.id),ha(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var p,c=ca(t.tabs);try{for(c.s();!(p=c.n()).done;){da(e,p.value.content,t.id)}}catch(e){c.e(e)}finally{c.f()}}break;case I.ACTION:e[r].actions.push(t.action.name);break;case I.STATIC_TEXT:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function ha(e,t){ee(e,t)&&g.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var fa=ae,ma=Ie,va=se,ya=le,ga=re((function(e){var t=ya(e);return t="function"==typeof t?t:void 0,ma(fa(e,1,va,!0),void 0,t)})),ba=pe,Ea=he,Ia=fe,Sa=ce,Ca=ue,Ra=de,Ta=Math.min;var _a=function(e,t,r){for(var n=r?Ia:Ea,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,p=[];a--;){var c=e[a];a&&t&&(c=Sa(c,Ca(t))),l=Ta(c.length,l),s[a]=!r&&(t||o>=120&&c.length>=120)?new ba(a&&c):void 0}c=e[0];var u=-1,d=s[0];e:for(;++u<o&&p.length<l;){var h=c[u],f=t?t(h):h;if(h=r||0!==h?h:0,!(d?Ra(d,f):n(p,f,r))){for(a=i;--a;){var m=s[a];if(!(m?Ra(m,f):n(e[a],f,r)))continue e}d&&d.push(f),p.push(h)}}return p},ka=se;var wa=function(e){return ka(e)?e:[]},La=ce,Aa=_a,Da=wa,Oa=le,Pa=re((function(e){var t=Oa(e),r=La(e,Da);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?Aa(r,void 0,t):[]}));function Na(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return xa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ba(e,t,n){var o=e;if(o.validation)return function(e,t,n){if(e.fail_message&&e.evaluate){var o=e.evaluate;o.isValidation=!0;var i=Fa(o,t,n);return"object"===r(i)?i:i||function(e){if(e.focus_parameter_ref&&e.message)return{text:e.message.default,type:e.type};return"Failed to parse failedMessage"}(e.fail_message)}throw new Error("Invalid validation schema")}(o.validation,t,n);if(o.enabled)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid enabled schema")}(o.enabled,t,n);if(o.visible)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid visible schema")}(o.visible,t,n);if(o.enum_filter)return function(e,t,r){if(e.target&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid filteredEnum schema")}(o.enum_filter,t,n);if(o.allow_change)return function(e,t,r){if((e.parameter_refs||e.group_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid allow change schema")}(o.allow_change,t,n);if(o.default_value)return function(e,t,r){if(e.parameter_ref&&e.value&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid conditional default schema")}(o.default_value,t,n);throw new Error("Invalid user input validation definition schema")}function Ma(e,t,r,n){return t&&t.filter&&t.filter.evaluate?Va(e,t.filter,t.filter.evaluate,r,n):n}function Fa(e,t,n){if(e.or)return function(e,t,r){for(var n=0;n<e.length;n++){if(!0===Fa(e[n],t,r))return!0}return!1}(e.or,t,n);if(e.and)return function(e,t,n){for(var o=0;o<e.length;o++){var i=Fa(e[o],t,n);if(!1===i)return!1;if("object"===r(i))return i}return!0}(e.and,t,n);if(e.condition)return function(e,t,r,n){var o=e.op,i=e.parameter_ref,a=e.parameter_2_ref,s=e.value,l={},p=r.getPropertiesConfig();n||"null"!==p.conditionDisabledPropertyHandling||(l.filterDisabled=!0);n||"null"!==p.conditionHiddenPropertyHandling||(l.filterHidden=!0);var c,u={param:i,id:Ua(t,i)};u.value=r.getPropertyValue(u.id,l,null),u.control=r.getControl(u.id),void 0===u.control&&g.warn("Control not found when validating condition for "+i);void 0!==a&&((c={param:a,id:Ua(t,a)}).value=r.getPropertyValue(c.id,l,null),c.control=r.getControl(c.id));var d=r.getConditionOp(o);if(d)return d(u,c,s,r);return g.warn("Ignoring unknown condition operation '"+o+"' for parameter_ref "+i),!0}(e.condition,t,n,e.isValidation);throw new Error("Failed to parse definition")}function Va(e,t,r,n,o){if(r.or)return function(e,t,r,n,o){var i,a=[],s=Na(r);try{for(s.s();!(i=s.n()).done;){var l=Va(e,t,i.value,n,o);a=ga(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.or,n,o);if(r.and)return function(e,t,r,n,o){var i,a=G(o),s=Na(r);try{for(s.s();!(i=s.n()).done;){var l=Va(e,t,i.value,n,a);a=Pa(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.and,n,o);if(r.condition)return function(e,t,r,n,o){var i=r.op,a=[];void 0!==r.value&&null!==r.value?a.push(r.value):Array.isArray(r.values)&&a.push.apply(a,Se(r.values));switch(i){case"dmMeasurement":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.measure===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmType":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.type===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmModelingRole":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.modeling_role===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmSharedFields":return function(e,t,r,n){var o=n;t.parameter_refs&&(o=r.filterFieldsFromSharedProps(n,t.parameter_refs,e.name));return o}(e,t,n,o);default:var s=n.getConditionOp(i);return s&&e.name===t.parameter_ref?s(e,r,n,o):(g.warn("Ignoring unknown condition operation '"+i+"'"),o)}}(e,t,r.condition,n,o);throw new Error("Failed to parse filter definition")}function Ua(e,t){var r={},n=t.indexOf("[");return n>-1?((r=G(e)).name=t.substring(0,n),r.col=function(e){var t=e.indexOf("[");if(t>-1){var r=e.indexOf("]");return r>-1?parseInt(e.substring(t+1,r),10):-1}return-1}(t)):r.name=t,r}function Ha(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ja(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ja(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function za(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName)Ga(o.name?{name:o.name}:{name:o},e,r)}}(e,r,t)}function qa(e){var t={controls:e.getControlStates(),panels:e.getPanelStates(),actions:e.getActionStates()},r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName){var i=o.name?{name:o.name}:{name:o},a=e.getPropertyValue(i);if(o.subControls)if(o.valueDef.isList||o.valueDef.isMap){if(ts(i,r,e),Array.isArray(a))for(var s=0;s<a.length;s++)for(var l=0;l<o.subControls.length;l++)i.row=s,i.col=l,ts(i,r,e)}else for(var p={name:i.name},c=0;c<o.subControls.length;c++)p.col=c,ts(p,r,e);else ts(i,r,e)}}}(e,r,t),Za(e.panelTree,t,Ct);var n=Xa(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var o,i=Ha($a(n,Xa(e)));try{for(i.s();!(o=i.n()).done;){Wa(o.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function Ga(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.getControl(e);if(n){var o=G(e),i=t.getPropertyValue(o);if(Array.isArray(i)){if(es(o,t,n,r),n.subControls)if(n.valueDef.isList||n.valueDef.isMap)for(var a=0;a<i.length;a++)for(var s=0;s<n.subControls.length;s++)o.row=a,o.col=s,es(o,t,n.subControls[s],r);else for(var l=0;l<n.subControls.length;l++){es({name:e.name,col:l},t,n.subControls[l],r)}else if(void 0===o.row)for(var p=0;p<i.length;p++)o.row=p,o.col=0,es(o,t,n,r)}else es(o,t,n,r)}else g.warn("Control not found for "+e.name)}function Wa(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.getControl(e);if(n){var o={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},i=G(e),a=t.getPropertyValue(i);if(Array.isArray(a)&&n.subControls)if(n.valueDef.isList||n.valueDef.isMap){ts(i,o,t);for(var s=0;s<a.length;s++)for(var l=0;l<n.subControls.length;l++)i.row=s,i.col=l,ts(i,o,t)}else for(var p=0;p<n.subControls.length;p++)i.col=p,ts(i,o,t);else ts(i,o,t);var c=Xa(t);t.setControlStates(o.controls),t.setPanelStates(o.panels),t.setActionStates(o.actions);var u,d=Ha($a(c,Xa(t),r));try{for(d.s();!(u=d.n()).done;){Wa(u.value,t,r+1)}}catch(e){d.e(e)}finally{d.f()}r>0&&Za(t.panelTree,o,Ct)}else g.warn("Control not found for "+e.name)}function $a(e,t,r){var n=[];if(r>10)return g.warn("More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: "+JSON.stringify(t)),[];var o,i=Ha(Ce(Object.keys(e),Object.keys(t)));try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e[a],l=t[a];O(s,l)||n.push({name:a})}}catch(e){i.e(e)}finally{i.f()}return n}function Xa(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),Z(r)?{}:e.getPropertyValues(r)}function Ka(e,t,r,n){var o=e[t.name];o||(o={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.value!==ht.HIDDEN||r!==ht.DISABLED&&r!==ht.ENABLED?i.value=r:i.value=ht.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].value=i.value}else{o[a].value=i.value;var l="hidden"===r,p=n.getColumnVisibility(t,t.col)!==!l;void 0!==n&&p&&n.toggleColumnVisibility(t,t.col,!l)}}else o.value=i.value;e[t.name]=o}function Ya(e,t,r,n){var o=e[t.name];o||(o={}),o.values||(o.values={}),o.values[r]||(o.values[r]={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.values[r].value!==ht.HIDDEN||n!==ht.DISABLED&&n!==ht.ENABLED?i.values[r].value=n:i.values[r].value=ht.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].values||(o[a][s].values={}),o[a][s].values[r]||(o[a][s].values[r]={}),o[a][s].values[r].value=i.values[r].value}else o[a].values||(o[a].values={}),o[a].values[r]||(o[a].values[r]={}),o[a].values[r].value=i.values[r].value}else o.values[r]=i.values[r];e[t.name]=o}function Ja(e,t){var r={name:e},n=e.indexOf("[");return n>-1&&(r.name=e.substring(0,n),r.col=parseInt(e.substring(n+1,e.indexOf("]")),10)),t&&(r.row=t.row),r}function Qa(e,t,r,n){for(var o in e)if(ee(e,o)){var i=e[o],a=1e3*pr(o)();if(!0===i.required&&hs(i,t,r,o,a,n),"date"!==i.role&&"time"!==i.role||fs(i,t,o,a,n),"column"===i.role){var s=o;i.valueDef.isList&&(s+="[0]"),ms(i,t,s,a,n)}if(i.subControls){for(var l={},p=0;p<i.subControls.length;p++){l[o+"["+p+"]"]=i.subControls[p]}Qa(l,t,r,n)}}}function Za(e,t,r,n){var o=t.panels[r],i=n?o&&o.value===ht.DISABLED:o&&(o.value===ht.HIDDEN||o.value===ht.DISABLED);if(i&&e[r]){if(e[r].controls){var a,s=Ha(e[r].controls);try{for(s.s();!(a=s.n()).done;){var l=a.value;n?t.controls[l].value!==ht.HIDDEN&&Ka(t.controls,{name:l},o.value):Ka(t.controls,{name:l},o.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var p,c=Ha(e[r].actions);try{for(c.s();!(p=c.n()).done;){var u=p.value;n?t.actions[u].value!==ht.HIDDEN&&Ka(t.actions,{name:u},o.value):Ka(t.actions,{name:u},o.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var d,h=Ha(e[r].panels);try{for(h.s();!(d=h.n()).done;){var f=d.value;i&&(n?t.panels[f].value!==ht.HIDDEN&&Ka(t.panels,{name:f},o.value):Ka(t.panels,{name:f},o.value)),Za(e,t,f,n)}}catch(e){h.e(e)}finally{h.f()}}}function es(e,t,n,o){var i=!1,a=t.getDefinitions(e,Et.VALIDATION,It.CONTROLS);if(a.length>0){var s=t.getRequiredDefinitionIds();try{var l,p=!1,c=Ha(a);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=St;p=Ba(u.definition,e,t);var h=!1;"object"===r(p)&&(h=!0,d={type:p.type,text:p.text});var f=G(e);if(u.definition.validation&&u.definition.validation.fail_message&&u.definition.validation.fail_message.focus_parameter_ref&&(f=Ja(u.definition.validation.fail_message.focus_parameter_ref,f)),void 0!==f.col&&void 0===n.columnIndex&&delete f.col,d.validation_id=f.name,u.definition.validation&&u.definition.validation.id&&(d.validation_id=u.definition.validation.id),void 0===f.row&&delete f.row,d.propertyId=f,d.required=s.indexOf(u.definition.validation.id)>-1,o||u.alwaysShow||(d.displayError=!1),t.getErrorMessage(f,!0,!0,!1)||(i=!1),h&&!i)t.updateErrorMessage(f,d),h&&(i=!0);else if(!h&&!i){var m=t.getErrorMessage(f,!1,!1,!1);Z(m)||m.validation_id!==d.validation_id||t.updateErrorMessage(f,St)}}}catch(e){c.e(e)}finally{c.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}}function ts(e,t,r){rs(e,t,r,Et.VISIBLE),rs(e,t,r,Et.ENABLED),rs(e,t,r,Et.FILTEREDENUM)}function rs(e,t,r,n){ns(r.getDefinitions(e,n,It.CONTROLS),e,t,r,n)}function ns(e,t,r,n,o){if(e.length>0)try{e.forEach((function(i,a){var s=Ba(i.definition,t,n);switch(o){case Et.VISIBLE:os(s,i.definition.visible,t,r,n,!0);break;case Et.ENABLED:os(s,i.definition.enabled,t,r,n,!1);break;case Et.FILTEREDENUM:var l=function(e,t){var r=e[t],n=r.definition.enum_filter.target.parameter_ref,o=!0;return e.forEach((function(e,r){r>t&&e.definition.enum_filter.target.parameter_ref===n&&(o=!1)})),o}(e,a);!function(e,t,r,n,o){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var i=r.controls,a=Ja(e.enum_filter.target.parameter_ref,t),s=i[a.name];if(s||(s={}),void 0!==a.col){var l=a.col.toString();if(s[l]||(s[l]={}),void 0!==a.row){var p=a.row.toString();s[l][p]||(s[l][p]={});var c=us(e,n,s[l][p].enumFilter,s[l][p].enumFilterApplied,o);s[l][p].enumFilter=c.values,s[l][p].enumFilterApplied=c.filterApplied}else{var u=us(e,n,s[l].enumFilter,s[l].enumFilterApplied,o);s[l].enumFilter=u.values,s[l].enumFilterApplied=u.filterApplied}}else{var d=us(e,n,s.enumFilter,s.enumFilterApplied,o);s.enumFilter=d.values,s.enumFilterApplied=d.filterApplied}i[a.name]=s}}(i.definition,t,r,s,l)}}))}catch(e){g.warn("Error thrown in validation: "+e)}}function os(e,t,r,n,o,i){t.parameter_refs&&is(e,t,r,n,o,i,t.parameter_refs,"control"),t.action_refs&&is(e,t,r,n,o,i,t.action_refs,"action"),t.group_refs&&function(e,t,r,n,o,i){var a,s=i?ht.VISIBLE:ht.ENABLED,l=i?ht.HIDDEN:ht.DISABLED,p=i?ht.ENABLED:ht.HIDDEN,c=Ha(t.group_refs);try{for(c.s();!(a=c.n()).done;){var u=Ja(a.value),d=ds(n.panels,u);if(!0===e){if(u&&d!==s&&d!==p)ps(n,u,s,o)&&as(n,u,s,o)}else if(u&&(i||!i&&d!==p)){ps(n,u,l,o)&&as(n,u,l,o)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,n,o,i)}function is(e,t,r,n,o,i,a,s){var l,p=i?ht.VISIBLE:ht.ENABLED,c=i?ht.HIDDEN:ht.DISABLED,u=i?ht.ENABLED:ht.HIDDEN,d="control"===s?n.controls:n.actions,h=Ha(a);try{for(h.s();!(l=h.n()).done;){var f=Ja(l.value,r),m=ds(d,f);if(Array.isArray(t.values)){var v,y=Ha(t.values);try{for(y.s();!(v=y.n()).done;){var g=v.value;Ya(d,f,g,!0===e?p:c)}}catch(e){y.e(e)}finally{y.f()}}else!0===e?f&&m!==p&&m!==u&&Ka(d,f,p,o):f&&(i||!i&&m!==u)&&cs(n,f,c,d,o)}}catch(e){h.e(e)}finally{h.f()}}function as(e,t,r,n){if(n.panelTree[t.name]){var o,i=n.panelTree[t.name],a=Ha(i.panels);try{for(a.s();!(o=a.n()).done;){var s={name:o.value};Ka(e.panels,s,r),as(e,s,r,n),r===ht.ENABLED?ls(s,n,Et.ENABLED,e):r===ht.VISIBLE&&(e.panels[t.name].disabled&&Za(n.panelTree,e,t.name,!0),ls(s,n,Et.ENABLED,e),ls(s,n,Et.VISIBLE,e))}}catch(e){a.e(e)}finally{a.f()}var l,p=Ha(i.controls);try{for(p.s();!(l=p.n()).done;){ss(e,t,r,n,{name:l.value},e.controls)}}catch(e){p.e(e)}finally{p.f()}var c,u=Ha(i.actions);try{for(u.s();!(c=u.n()).done;){ss(e,t,r,n,{name:c.value},e.actions)}}catch(e){u.e(e)}finally{u.f()}}}function ss(e,t,r,n,o,i){Ka(i,o,r),r===ht.ENABLED?(ls(o,n,Et.ENABLED,e),ls(o,n,Et.VISIBLE,e)):r===ht.VISIBLE&&(rs(o,e,n,Et.VISIBLE),ls(o,n,Et.VISIBLE,e),e.panels[t.name].value===ht.DISABLED?Ka(i,o,ht.DISABLED):ls(o,n,Et.ENABLED,e))}function ls(e,t,r,n){var o=t.getDefinitions(e,r,It.REFS);o.length>0&&ns(o,e,n,t,r)}function ps(e,t,r,n,o){var i=t.name;if(!e.panels[i])return Ka(e.panels,t,r),!0;var a=e.panels[i].value;return((a===ht.ENABLED||a===ht.VISIBLE)&&(r===ht.DISABLED||r===ht.HIDDEN)||a===ht.DISABLED&&r===ht.ENABLED||a===ht.HIDDEN&&r===ht.VISIBLE)&&(Ka(e.panels,t,r),!0)}function cs(e,t,r,n,o){var i=t.name;if(n[i]){var a=n[i].value;void 0!==t.col&&(n[i][t.col]&&void 0!==t.row&&n[i][t.col][t.row]?a=n[i][t.col][t.row].value:Ka(n,t,r,o)),((a===ht.ENABLED||a===ht.VISIBLE)&&(r===ht.DISABLED||r===ht.HIDDEN)||a===ht.DISABLED&&r===ht.ENABLED||a===ht.DISABLED&&r===ht.HIDDEN||a===ht.HIDDEN&&r===ht.VISIBLE)&&Ka(n,t,r,o)}else Ka(n,t,r,o)}function us(e,t,r,n,o){var i={values:r,filterApplied:!o&&(n||!0)},a=null;return t&&(a=e.enum_filter.target.values),!a&&n||(i.values=a,i.filterApplied=!0),o&&(i.filterApplied=!1),i}function ds(e,t){var r=e[t.name];return void 0!==t.col&&r&&(r=r[t.col.toString()],void 0!==t.row&&r&&(r=r[t.row.toString()])),r?r.value:null}function hs(e,t,r,n,o,i){var a=e.label&&e.label.text?e.label.text:n,s="required_"+n+"_"+o,l={params:n,definition:{validation:{id:s,fail_message:{type:"error",message:{default:u(i,st.REQUIRED_ERROR,{label:a})},focus_parameter_ref:n},evaluate:{condition:{parameter_ref:n,op:"isNotEmpty"}}}}};t.controls[n]?t.controls[n].push(l):t.controls[n]=[l],r.push(s)}function fs(e,t,r,n,o){var i=Nn(e),a={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:u(o,st.DATETIME_FORMAT_ERROR,{role:e.role,format:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"isDateTime",value:e.role}}}}};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function ms(e,t,r,n,o){var i=e.label&&e.label.text?e.label.text:r,a={params:r,definition:{validation:{id:"validField_"+r+"_"+n,fail_message:{type:"warning",message:{default:u(o,st.INVALID_FIELD_ERROR,{label:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"colDoesExists"}}}},alwaysShow:!0};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function vs(e,t,n){if(e.value)if("string"==typeof e.value)for(var o=0;o<t.length;o++){var i=t[o];if(i.name===e.value)return"type"===n?i.type:i.metadata[n]}else if("object"===r(e.value))for(var a=0;a<t.length;a++){var s=t[a];if(s.origName===e.value.field_name&&s.schema===e.value.link_ref)return"type"===n?s.type:s.metadata[n]}return null}var ys=ce,gs=_a,bs=wa,Es=re((function(e){var t=ys(e,bs);return t.length&&t[0]===e[0]?gs(t):[]}));function Is(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ss=function(r){n(i,r);var o=Is(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){if(!this.props.messageInfo||this.props.tableOnly&&!this.props.inTable)return null;var e=this.props.inTable?null:s.createElement("span",null,this.props.messageInfo.text),t=s.createElement("div",{className:"icon"},s.createElement(nr,{type:this.props.messageInfo.type})),r=this.props.inTable?s.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},s.createElement(ir,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,n=at("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===ht.HIDDEN||this.props.state===ht.DISABLED,inTable:this.props.inTable});return s.createElement("div",{className:n},r,e)}}]),i}(s.Component),Cs=Ss,Rs={Y:"([1-9][0-9][0-9][0-9])",y:"([0-9][0-9])",m:"([0][1-9]|[1][0-2])",n:"([1-9]|[1-2][0-2])",d:"([0][1-9]|[1-2][0-9]|3[01])",j:"([1-9]|[1-2][0-9]|3[01])"};function Ts(e,t){var r=new Date(e);if(!isNaN(r)){var n=r.getFullYear().toString(),o=(r.getMonth()+1).toString();1===o.length&&(o="0"+o);var i=r.getDate().toString();1===i.length&&(i="0"+i);var a=t;return a=(a=(a=(a=(a=(a=a.replace("Y",n)).replace("y",n.substring(2))).replace("m",o)).replace("n",parseInt(o,10))).replace("d",i)).replace("j",parseInt(i,10))}return e}function _s(e,t){var r=new Date(e);if(!isNaN(r)){if(e instanceof Date)return r.toISOString();if("string"==typeof e&&e.trim().length>0&&t){var n=function(e){var t=e;return"^"+(t=(t=(t=(t=(t=(t=(t=t.replace("Y",Rs.Y)).replace("y",Rs.y)).replace("m",Rs.m)).replace("n",Rs.n)).replace("d",Rs.d)).replace("j",Rs.j)).replaceAll(".","[.]"))+"$"}(t),o=function(e,t,r){var n="",o="",i="",a=e.match(t);if(a){for(var s=1,l=0;l<r.length;l++){switch(r.charAt(l)){case"Y":case"y":n=a[s],s++;break;case"m":case"n":o=a[s],s++;break;case"d":case"j":i=a[s],s++}}return{year:n,month:o,day:i}}return null}(e,n,t),i=o.year,a=o.month,s=o.day;return new Date("".concat(i,"-").concat(a,"-").concat(s,"T00:00:00.00")).toISOString()}}return e}function ks(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ws=function(o){n(l,o);var i=ks(l);function l(t){var r;return e(this,l),(r=i.call(this,t)).updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(l,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)&&Array.isArray(this.props.controlOpts.values)&&this.props.control.controlType!==h.CUSTOM){var t=Es(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"render",value:function(){var e=this.props.value;if(this.props.control.values&&this.props.control.valueLabels){var t=this.props.control.values.indexOf(this.props.value);t>-1&&this.props.control.valueLabels[t]&&(e=this.props.control.valueLabels[t])}if(null==e?e="":"object"===r(e)&&e.link_ref?e=y(e,this.props.control):Array.isArray(e)?e=e.join(", "):"boolean"==typeof e&&(e=e.toString()),e=On(e),this.props.control.controlType===h.CUSTOM)e=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===h.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===Rt.TIMESTAMP){var n=new Date(e);e=ur(n)?this.props.tableControl?s.createElement(Ft,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):s.createElement(Ft,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===h.DATEPICKER)e=e?Ts(e,this.props.control.dateFormat):"";else if(this.props.control.controlType===h.DATEPICKERRANGE){e=[this.props.value&&this.props.value[0]?Ts(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?Ts(this.props.value[1],this.props.control.dateFormat):""].toString()}var o=s.createElement("span",{className:"properties-field-type",disabled:this.props.state===ht.DISABLED},e),i=o;if(this.props.tableControl){var a=!0;e&&(a=!1);var l=o;this.props.control.icon&&(l=s.createElement("div",{className:"properties-field-readonly"},s.createElement("div",{className:"properties-field-type-icon"},s.createElement(nr,{type:this.props.control.icon})),o)),i=s.createElement(we,{content:l,tooltipText:e,disabled:a})}return s.createElement("div",{className:at("properties-readonly",{hide:this.props.state===ht.HIDDEN}),"data-id":wn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),l}(s.Component),Ls=Vt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(ws);function As(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ds=function(r){n(i,r);var o=As(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Ln(t.control,t.controller.getMaxLengthForSingleLineControls()),r.uuid=or(),r.id=kn(t.propertyId,r.uuid),r.isList=!1,r.props.control.valueDef&&(r.props.control.valueDef.isList&&(r.isList=!0),r.defaultValue=r.props.control.valueDef.defaultValue),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.isList&&(t=An(t,", ")),0!==t.length||void 0!==this.defaultValue&&null!==this.defaultValue||(t=null),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this,t=this.props.value?this.props.value:"",r=!1;if(this.isList){var n=Dn(t,", ");t=n.value,r=n.truncated}else r=0!==(t=On(t)).length&&t.length!==this.props.value.length;var o=at("properties-textfield","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var a={text:u(this.reactIntl,st.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:ut}),type:dt.ERROR,validation_id:this.props.control.name};i=s.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,s.createElement(Ls,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),"// TODO this could conflict with the below ValidationMessage.",s.createElement(Cs,{inTable:this.props.tableControl,state:"",messageInfo:a}))}else{var l=Pn(this.props.messageInfo,this.props.tableControl);i=s.createElement(Ue,ar({},l,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===ht.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,ref:function(t){return e.textInputRef=t}}))}var p=i;if(this.props.tableControl){var c={};this.textInputRef&&(c.truncatedRef=this.textInputRef);var d=!0;t&&this.props.state!==ht.DISABLED&&(d=!1),p=s.createElement(we,ar({},c,{content:i,tooltipText:t,disabled:d}))}return s.createElement("div",{className:o,"data-id":wn(this.props.propertyId)},p,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Os=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ds);function Ps(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ns=function(r){n(i,r);var o=Ps(i);function i(t){var r;e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.valuesMap={},r.iconsMap={};for(var n=0;n<t.control.values.length;++n)r.valuesMap[t.control.values[n]]=t.control.valueLabels[n],void 0!==t.control.valueIcons&&(r.iconsMap[t.control.values[n]]=t.control.valueIcons[n]);return r}return t(i,[{key:"onClick",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId)===this.props.control.values[0]?this.props.control.values[1]:this.props.control.values[0];this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"renderIcon",value:function(){var e=null;if(void 0!==this.iconsMap[this.props.value]){var t=this.iconsMap[this.props.value];e="string"==typeof t&&".svg"===t.slice(t.length-4)?s.createElement(fr,{className:"bx--btn__icon",src:t}):s.createElement("img",{className:"bx--btn__icon",src:t,alt:""})}return e}},{key:"render",value:function(){var e=this.valuesMap[this.props.value];void 0===e&&(e=this.props.value);var t=null,r=this.props.tableControl?"ghost":"tertiary";void 0!==e&&(t=s.createElement(Ne,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:u(this.reactIntl,st.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===ht.DISABLED},e));var n=at("properties-toggletext",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{"aria-label":this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",className:n,disabled:this.props.state===ht.DISABLED,"data-id":wn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),xs=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ns);function Bs(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ms=function(r){n(i,r);var o=Bs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Ln(t.control,t.controller.getMaxLengthForMultiLineControls()),r.uuid=or(),r.id=kn(r.props.propertyId,r.uuid),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.props.control.valueDef&&this.props.control.valueDef.isList&&(t=An(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=Dn(e,"\n");e=t.value;var r=t.truncated,n=null,o=Pn(this.props.messageInfo,this.props.tableControl),i=!1;if(o.warn&&(i=!0,o={}),r){var a={text:u(this.reactIntl,st.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:ut}),type:dt.ERROR,validation_id:this.props.control.name};o=Pn(a,this.props.tableControl),n=s.createElement("div",null,s.createElement(He,ar({},o,{id:this.id,disabled:!0,placeholder:this.props.control.additionalText,value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:a}))}else n=s.createElement(He,ar({},o,{id:this.id,disabled:this.props.state===ht.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light}));var l=n;if(this.props.tableControl){var p=!0;e&&this.props.state!==ht.DISABLED&&(p=!1);var c=s.createElement("div",{className:"properties-tooltips"},String(e));l=s.createElement(ir,{id:"tooltip-column-textarea",tip:c,direction:"bottom",className:"properties-tooltips",disable:p},n)}var d=at("properties-textarea",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:d,"data-id":wn(this.props.propertyId)},l,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Fs=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ms);function Vs(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Us=function(r){n(i,r);var o=Vs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).onDirection=r.onDirection.bind(a(r)),r.generateNumber=r.generateNumber.bind(a(r)),r.id=kn(r.props.propertyId),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"onDirection",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId);null==t&&(t=0);var r=t.toString().split(".")[1];this.props.control.increment=this.props.control.increment?this.props.control.increment:1;var n=this.props.control.increment.toString().split(".")[1],o="up"===e?Number(t)+this.props.control.increment:Number(t)-this.props.control.increment;if(n){var i=n.length;r&&(i=r.length>=n.length?r.length:n.length),this.props.controller.updatePropertyValue(this.props.propertyId,Number(o.toFixed(i)))}else this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"handleChange",value:function(e,t){if("string"!=typeof t)if(e.target.validity&&e.target.validity.badInput||!isFinite(e.target.value)){if(null===this.props.controller.getErrorMessage(this.props.propertyId)){var r={type:"error",text:u(this.reactIntl,st.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,r)}}else{null!==this.props.controller.getErrorMessage(this.props.propertyId)&&"invalid_number"===this.props.controller.getErrorMessage(this.props.propertyId).validation_id&&this.props.controller.updateErrorMessage(this.props.propertyId,null);var n=e.target.value;null==n||""===n?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(n))}else this.onDirection(t)}},{key:"generateNumber",value:function(){var e=this.props.control.label.numberGenerator,t=e.range&&e.range.min?e.range.min:1e4,r=e.range&&e.range.max?e.range.max:99999,n=Math.floor(Math.random()*(r-t+1)+t);this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"render",value:function(){var e=this,t="";null!==this.props.value&&void 0!==this.props.value&&(t=this.props.value);var r,n=this.props.state===ht.DISABLED,o=this.props.state===ht.HIDDEN;ee(this.props.control,"label.numberGenerator")&&(r=s.createElement(Ne,{className:at("properties-number-generator",{hide:o}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:jt,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var i=at("properties-numberfield",{"numberfield-with-number-generator":ee(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:o},this.props.messageInfo?this.props.messageInfo.type:null),a=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:i,"data-id":wn(this.props.propertyId)},s.createElement(je,ar({},a,{ref:function(t){return e.numberInput=t},id:this.id,onChange:this.handleChange.bind(this),disabled:n,step:this.props.control.increment,value:t,placeholder:this.props.control.additionalText,label:this.props.controlItem,hideLabel:this.props.tableControl,allowEmpty:!0,light:this.props.controller.getLight()&&this.props.control.light,hideSteppers:this.props.tableControl||this.props.control.controlType===h.NUMBERFIELD})),r,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Hs=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Us),js=vr,zs=1/0;var qs=function(e){return e?(e=js(e))===zs||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var Gs=function(e){var t=qs(e),r=t%1;return t==t?r?t-r:t:0},Ws=me,$s=ke,Xs=Gs,Ks=Math.max;var Ys=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:Xs(r);return o<0&&(o=Ks(n+o,0)),Ws(e,$s(t),o)};function Js(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Qs=function(r){n(i,r);var o=Js(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getCustomButtonEnabled=r.getCustomButtonEnabled.bind(a(r)),r.customButtonIconCallback=r.customButtonIconCallback.bind(a(r)),r.customButtonOnClick=r.customButtonOnClick.bind(a(r)),r.convertToolbarConfig=r.convertToolbarConfig.bind(a(r)),r}return t(i,[{key:"getCustomButtonEnabled",value:function(e,t){var r=void 0!==e&&e===ht.DISABLED,n=this.props.customButtonsState&&void 0!==this.props.customButtonsState[t.id]?this.props.customButtonsState[t.id]:t.enabled||!1;return!r&&n}},{key:"customButtonIconCallback",value:function(e,t){var r,n=this.props.controller.getHandlers().buttonIconHandler;return n&&n({type:"customButtonIcon",propertyId:this.props.propertyId,buttonId:e,carbonIcon:t},(function(e){r=e})),r}},{key:"customButtonOnClick",value:function(e){var t=this.props.controller.getHandlers().buttonHandler;t&&t({type:"custom_button",propertyId:this.props.propertyId,buttonId:e})}},{key:"convertToolbarConfig",value:function(e){var t=this,r=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(n){var o=t.getCustomButtonEnabled(e,n),i={action:n.id,enable:o};n.icon?i.iconEnabled=n.icon:n.carbonIcon&&(i.iconEnabled=t.customButtonIconCallback(n.id,n.carbonIcon)),n.label&&(i.label=n.label.text,i.incLabelWithIcon="before",i.kind="ghost"),n.description&&(i.tooltip=n.description.text),n.divider&&"before"===n.divider&&r.push({divider:!0}),r.push(i),n.divider&&"after"===n.divider&&r.push({divider:!0})})),r}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return s.createElement("div",{className:"properties-custom-table-buttons"},s.createElement(yr,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick}))}}]),i}(s.Component);function Zs(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var el=function(r){n(i,r);var o=Zs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){e||(this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates))}},{key:"showSubPanel",value:function(){this.initialControlValue=G(this.props.controller.getPropertyValue(this.props.propertyId)),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates(),this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=void 0!==this.props.disabled&&this.props.disabled,r=u(this.props.controller.getReactIntl(),st.SUBPANEL_BUTTON_TOOLTIP),n=u(this.props.controller.getReactIntl(),st.APPLYBUTTON_LABEL),o=u(this.props.controller.getReactIntl(),st.REJECTBUTTON_LABEL);return s.createElement(qn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:o,controller:this.props.controller},s.createElement(ir,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},s.createElement(Ne,{className:"properties-subpanel-button",kind:"ghost",renderIcon:zt,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}]),i}(s.Component);function tl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return rl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rl(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function rl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ol=function(r){n(i,r);var o=nl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={filterText:null,enableRemoveIcon:!1},r.onPanelContainer=[],r.allowColumnControls=!1,r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r.indexOfColumn=r.indexOfColumn.bind(a(r)),r.setCurrentControlValueSelected=r.setCurrentControlValueSelected.bind(a(r)),r.setReadOnlyColumnValue=r.setReadOnlyColumnValue.bind(a(r)),r.removeSelected=r.removeSelected.bind(a(r)),r.updateRowSelections=r.updateRowSelections.bind(a(r)),r.handleRowClick=r.handleRowClick.bind(a(r)),r.createTable=r.createTable.bind(a(r)),r.onFilter=r.onFilter.bind(a(r)),r.onSort=r.onSort.bind(a(r)),r.setScrollToRow=r.setScrollToRow.bind(a(r)),r.includeInFilter=r.includeInFilter.bind(a(r)),r.makeAddRemoveButtonPanel=r.makeAddRemoveButtonPanel.bind(a(r)),r.makeEditButtonPanel=r.makeEditButtonPanel.bind(a(r)),r.makeCustomButtonsPanel=r.makeCustomButtonsPanel.bind(a(r)),r.buildChildItem=r.buildChildItem.bind(a(r)),r.makeCells=r.makeCells.bind(a(r)),r.checkedAll=r.checkedAll.bind(a(r)),r.isLightTheme=r.isLightTheme.bind(a(r)),t.selectedRows&&t.selectedRows.length>0&&(r.scrollToRow=t.selectedRows[t.selectedRows.length-1]),r.selectSummaryPropertyName="table-multi-select-edit-property-"+t.control.name,t.controller.saveControls([{name:r.selectSummaryPropertyName}]),r.setSelectedSummaryRowValue(t.selectedRows),r.uuid=or(),r}return t(i,[{key:"componentDidMount",value:function(){if(this.props.control.subControls){var e=this.setReadOnlyColumnValue();this.props.controller.updatePropertyValue(this.props.propertyId,e,!0,Tt.INITIAL_LOAD)}}},{key:"componentDidUpdate",value:function(){this.isSelectSummaryEdit(this.props.selectedRows)&&this.updateSelectedRowsValues()}},{key:"componentWillUnmount",value:function(){this.props.controller.removePropertyValue({name:this.selectSummaryPropertyName})}},{key:"onFilter",value:function(e){this.setState({filterText:e})}},{key:"onSort",value:function(e){for(var t=this.props.value,r=-1,n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].name===e.column){r=n;break}r>-1&&(t=E(t,(function(e){return e[r]})),e.direction===_t.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?s.createElement("div",null):s.createElement("div",{className:"properties-onpanel-container"},this.onPanelContainer[e[0]])}},{key:"getDefaultRow",value:function(){var e=[];if(this.props.control.defaultRow){var t,r=tl(this.props.control.defaultRow);try{for(r.s();!(t=r.n()).done;){var n=t.value;null!=n&&n.parameterRef?e.push(this.props.controller.getPropertyValue({name:n.parameterRef})):e.push(n)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"setScrollToRow",value:function(e){this.scrollToRow=e}},{key:"setCurrentControlValueSelected",value:function(e,t){var r=e;if(this.props.control.subControls&&(r=this.setReadOnlyColumnValue(e)),Array.isArray(r))for(var n=0;n<r.length;n++){var o=r[n];if(Array.isArray(o))for(var i=0;i<this.props.control.subControls.length;i++){var a=this.props.control.subControls[i];"column"===a.role&&"structure"===a.valueDef.propType&&(r[n][i]=P(o[i],a,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[n]=P(o,this.props.control,this.props.controller))}this.props.controller.updatePropertyValue(this.props.propertyId,r);var s=Array.isArray(t)?t:[];this.updateRowSelections(s)}},{key:"setReadOnlyColumnValue",value:function(e){var t=e||this.props.value;if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n];if(o.controlType===h.READONLY&&o.generatedValues&&"index"===o.generatedValues.operation){var i=void 0!==o.generatedValues.startValue?o.generatedValues.startValue+r:r+1;t[r][n]=i}}return t}},{key:"setSelectedSummaryRowValue",value:function(e){if(this.isSelectSummaryEdit(e)){var t={name:this.selectSummaryPropertyName},r=this.props.controller.getPropertyValue(t);r||(r=[this.getDefaultRow()],this.props.controller.updatePropertyValue(t,r,!0)),this.selectedSummaryRowValue=G(r)}}},{key:"isSelectSummaryEdit",value:function(e){return this.props.control.rowSelection===kt.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return Ys(this.props.control.subControls,(function(t){return t.name===e}))}},{key:"handleRowClick",value:function(e,t){var r=this.props.selectedRows;if(this.props.control.rowSelection===kt.SINGLE)r=[e];else if(!0===t.metaKey||!0===t.ctrlKey){var n=r.indexOf(e);n>=0?r.splice(n,1):r=r.concat(e)}else if(!0===t.shiftKey){for(var o=r.length>0?r[0]:e,i=(o>e?o:e)+1,a=[],s=o>e?e:o;s<i;s++)a.push(s);r=a}this.updateRowSelections(r)}},{key:"updateSelectedRowsValues",value:function(){var e=this,t={name:this.selectSummaryPropertyName},r=this.props.controller.getControl({name:this.props.control.name}),n=this.props.controller.getPropertyValue(t);n&&Array.isArray(n)&&(n[0].forEach((function(t,n){if(null!==t&&!O(t,e.selectedSummaryRowValue[0][n])){var o=void 0===t?null:t;e.props.selectedRows.forEach((function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:n},o,!0)})),r.subControls[n].controlType===h.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:n},null)}})),this.selectedSummaryRowValue=G(n))}},{key:"updateRowSelections",value:function(e){this.props.controller.updateSelectedRows(this.props.propertyId,e),this.props.rightFlyout&&this.setState({enableRemoveIcon:0!==e.length}),this.setSelectedSummaryRowValue(e)}},{key:"removeSelected",value:function(){for(var e=this.props.value,t=this.props.selectedRows.sort((function(e,t){return t-e})),r=0;r<t.length;r++)e.splice(t[r],1),this.props.controller.removeErrorMessageRow({name:this.props.propertyId.name,row:t[r]});this.setCurrentControlValueSelected(e)}},{key:"_makeCell",value:function(e,t,r,n,o,i,a){var l={name:r,row:n,col:o},p=G(this.props.propertyId),c=l;a||p.name===l.name||(c=this.props.controller.setChildPropertyId(p,l));var u,d={table:!0,allowColumnControls:this.allowColumnControls},h=this.props.controller.getControlFactory(),f=Object.assign({},e),m=f.className?f.className:"";if(e.dmImage){var v=this.props.controller.getDatasetMetadataFields(),g=y(this.props.controller.getPropertyValue(c),e,!0);f.icon=N(v,g,e.dmImage)}return this.isReadonlyTable()?u=s.createElement("div",{className:at("properties-table-cell-control",m)},s.createElement(Ls,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})):e.editStyle===_.SUBPANEL||e.editStyle===_.ON_PANEL?a?u=s.createElement("div",null):(u=s.createElement("div",{className:at("properties-table-cell-control",m)},s.createElement(Ls,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})),e.editStyle===_.ON_PANEL&&this.onPanelContainer[n].push(s.createElement("div",{key:o},s.createElement("br",null),h.createControlItem(e,c)))):(d.editStyle=_.INLINE,u=s.createElement("div",{className:at("properties-table-cell-control",m)},h.createControl(f,c,d))),{column:e.name,width:e.width,content:u,className:m,value:this.props.controller.getPropertyValue(c),resizable:e.resizable}}},{key:"_getCustomCtrlContent",value:function(e,t,r,n){var o=r;return t.controlType===h.CUSTOM&&(n.editStyle="summary",o=this.props.controller.getCustomControl(e,t,n)),o}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===ht.DISABLED||this.props.controller.getControlState(e)===ht.DISABLED}},{key:"includeInFilter",value:function(e){if(!this.state.filterText||0===this.state.filterText.length)return!0;for(var t=this.props.value,r=0;r<this.filterFields.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){if(this.props.control.subControls[n].name===this.filterFields[r]){var o=t[e][n];if("string"==typeof o&&o.toLowerCase().indexOf(this.state.filterText.toLowerCase())>-1)return!0;break}}return!1}},{key:"hasFilter",value:function(){var e=!1;if(this.props.control.subControls){var t,r=tl(this.props.control.subControls);try{for(r.s();!(t=r.n()).done;){if(t.value.filterable){e=!0;break}}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"addOnClick",value:function(e){this.addOnClickCallback&&this.addOnClickCallback(e,this.onFieldPickerCloseCallback)}},{key:"isLightTheme",value:function(){return this.props.controller.getLight()&&this.props.control.light}},{key:"makeSelectedEditRow",value:function(e){if(e&&Array.isArray(e)&&e.length>1){var t=u(this.props.controller.getReactIntl(),st.MULTI_SELECTED_ROW_LABEL),r=u(this.props.controller.getReactIntl(),st.MULTI_SELECTED_ROW_ACTION),n=e.length+" "+t+" "+r,o=[],i=!1===this.props.control.header?[]:this.makeHeader([],[]),a=this.props.controller.getPropertyValue({name:this.selectSummaryPropertyName});this.makeCells(o,a,null,this.selectSummaryPropertyName,!0);var l=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{className:"properties-at-selectedEditRows"},s.createElement("div",{className:"properties-selectedEditRows-title"},s.createElement("span",null,n)),s.createElement(Le,{showHeader:!1,columns:i,data:o,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:l,summaryTable:!0,rowSelection:kt.MULTIPLE,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText}))}return null}},{key:"makeAddRemoveButtonPanel",value:function(e,t){this.onFieldPickerCloseCallback=t&&t.fieldPickerCloseFunction?t.fieldPickerCloseFunction.bind(this):null;var r=t&&t.removeButtonFunction?t.removeButtonFunction:this.removeSelected,n=t&&t.removeButtonLabel?t.removeButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURETABLE_REMOVEBUTTON_LABEL),o=!this.state.enableRemoveIcon||e===ht.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var a=t&&t.addButtonLabel?t.addButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURETABLE_ADDBUTTON_LABEL);return e===ht.DISABLED&&(i=!0,this.addOnClickCallback=null),s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(Ne,{className:"properties-remove-fields-button",disabled:o,onClick:r,size:"small",kind:"ghost",renderIcon:qt},n),s.createElement(Ne,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Ht},a))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(Ne,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Gt},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t){var r=null;return t&&(r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(Qs,{controller:this.props.controller,propertyId:this.props.propertyId,tableState:e,customButtons:t,customButtonsState:this.props.tableButtons}))),r}},{key:"editOnClick",value:function(e){this.editOnClickCallback&&this.editOnClickCallback(e)}},{key:"checkedAllValue",value:function(e,t){var r=this.props.value;if(Array.isArray(r)){for(var n=0;n<r.length;n++){var o={name:this.props.control.name,row:n,col:e};this.props.controller.getControlState(o)!==ht.DISABLED&&this.props.controller.updatePropertyValue(o,t)}this.checkedAll[e]=t}}},{key:"checkedAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;for(var r=0;r<t.length;r++){var n={name:this.props.control.name,row:r,col:e};if(this.props.controller.getControlState(n)!==ht.DISABLED&&!t[r][e])return!1}return!0}},{key:"disabledAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;var r,n=tl(t);try{for(n.s();!(r=n.n()).done;){if(!1===r.value[e])return!1}}catch(e){n.e(e)}finally{n.f()}return!0}},{key:"createTable",value:function(e,t,r){var n=[],o=[],i=[];this.filterFields=i;var a=this.makeHeader(o,i),l=!1!==this.props.control.header,p=this.props.value;this.makeCells(n,p,e);var c,u=this.props.control.rowSelection===kt.MULTIPLE?this.makeSelectedEditRow(this.props.selectedRows):null,d=null;r?d=this.makeCustomButtonsPanel(e,r):this.isReadonlyTable()?this.props.hideEditButton||(d=this.makeEditButtonPanel(e,t)):this.props.addRemoveRows&&(d=this.makeAddRemoveButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(c=this.scrollToRow,delete this.scrollToRow);var h,f=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";this.isReadonlyTable()&&this.props.control.rowSelection===kt.SINGLE||(h=this.props.control.rowSelection===kt.SINGLE?this.handleRowClick:this.updateRowSelections);var m=s.createElement(Le,{sortable:o,filterable:i,columns:a,data:n,showHeader:l,scrollToRow:c,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:d,selectedEditRow:u,scrollKey:this.props.control.name,tableState:e,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId),rows:this.props.control.rows,tableLabel:f,updateRowSelections:h,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText});return s.createElement("div",null,m)}},{key:"makeHeader",value:function(e,t){for(var r=[],n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n],i=this.props.controller.getControlState({name:this.props.control.name,col:n}),a=i===ht.DISABLED||i===ht.HIDDEN,l=o.controlType===h.CHECKBOX?s.createElement(ze,{disabled:a,id:"properties-at-header-cb-".concat(this.uuid,"-").concat(this.props.control.name,"=").concat(n),checked:this.checkedAll(n),onChange:this.checkedAllValue.bind(this,n),labelText:o.label.text}):o.label.text;o.visible&&o.controlType!==h.HIDDEN&&(o.sortable&&e.push(o.name),r.push({key:o.name,label:l,width:o.width,description:o.description?o.description.text:null,resizable:!!o.resizable&&o.resizable,operation:o.generatedValues&&o.generatedValues.operation?o.generatedValues.operation:null,disabled:a}),o.filterable&&t.push(o.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:wt,staticWidth:!0}),r}},{key:"makeCells",value:function(e,t,r,n,o){if(Array.isArray(t))for(var i=n||this.props.control.name,a=0;a<t.length;a++){var s=[];if(this.onPanelContainer[a]=[],this.includeInFilter(a)||o){for(var l=0;l<this.props.control.subControls.length;l++){var p=this.props.control.subControls[l];if(p.visible||p.editStyle===_.ON_PANEL){var c=this._makeCell(p,t,i,a,l,r,o);p.visible&&s.push(c)}}if(this.props.control.childItem&&!o&&!this.isReadonlyTable()){var u=this.buildChildItem(i,a,r);s.push(u)}e.push({columns:s})}}}},{key:"buildChildItem",value:function(e,t,r){var n={name:e,row:t},o=G(this.props.propertyId),i=n;o.name!==n.name&&(i=this.props.controller.setChildPropertyId(o,n));var a=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),l=s.createElement("div",{className:"properties-table-subcell"},s.createElement(el,{label:a.props.label,title:a.props.title,panel:a.props.panel,disabled:r===ht.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:wt,content:l}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(s.Component);function il(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}ol.defaultProps={addRemoveRows:!0,hideEditButton:!1};var al=function(r){n(i,r);var o=il(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getEmptyTableText=r.getEmptyTableText.bind(a(r)),r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r}return t(i,[{key:"getEmptyTableText",value:function(){var e="".concat(this.props.control.name,".empty.table.text"),t=u(this.props.controller.getReactIntl(),st.PROPERTIES_EMPTY_TABLE_TEXT,{button_label:this.props.emptyTableButtonLabel});return this.props.controller.getResource(e,t)}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"render",value:function(){var e=this.getEmptyTableText();return s.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},s.createElement("span",null,e),s.createElement("br",null),s.createElement(Ne,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?Gt:Ht,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),i}(s.Component),sl=al;function ll(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var pl=function(r){n(i,r);var o=ll(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getTableRowMoveImages=r.getTableRowMoveImages.bind(a(r)),r.topMoveRow=r.topMoveRow.bind(a(r)),r.upMoveRow=r.upMoveRow.bind(a(r)),r.downMoveRow=r.downMoveRow.bind(a(r)),r.bottomMoveRow=r.bottomMoveRow.bind(a(r)),r.getMoveableTableRows=r.getMoveableTableRows.bind(a(r)),r.getLeastValue=r.getLeastValue.bind(a(r)),r.getMaxValue=r.getMaxValue.bind(a(r)),r}return t(i,[{key:"getMoveableTableRows",value:function(){var e=null;if(void 0!==this.props.control.moveableRows&&this.props.control.moveableRows){var t=this.getTableRowMoveImages();e=s.createElement("div",{className:"properties-mr-button-container"},t)}var r=s.createElement("table",{role:"presentation",className:"properties-mr-table-container"},s.createElement("tbody",null,s.createElement("tr",{className:at("properties-mr-table-content",{disabled:this.props.disabled})},s.createElement("td",null,this.props.tableContainer),s.createElement("td",null,e))));return s.createElement("div",null,r)}},{key:"getTableRowMoveImages",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(),t=this.props.controller.getPropertyValue(this.props.propertyId),r=!this.props.disableRowMoveButtons&&0!==e.length&&0!==e[0]&&!this.props.disabled,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled,o=this.props.controller.getStaticRows(this.props.propertyId).sort();e.length>0&&o.length>0&&o.includes(e[0])?(r=!1,n=!1):e[0]===o[o.length-1]+1?(r=!1,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled):e[0]===o[0]-1&&(n=!1);var i=u(this.props.controller.getReactIntl(),st.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),a=u(this.props.controller.getReactIntl(),st.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),l=s.createElement("div",{key:"topImages"},s.createElement(Ne,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:Wt,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(Ne,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:$t,iconDescription:a,tooltipPosition:"left",hasIconOnly:!0})),p=u(this.props.controller.getReactIntl(),st.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),c=u(this.props.controller.getReactIntl(),st.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[l,s.createElement("div",{key:"bottomImages"},s.createElement(Ne,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:Xt,iconDescription:p,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(Ne,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:Kt,iconDescription:c,tooltipPosition:"left",hasIconOnly:!0}))]}},{key:"getLeastValue",value:function(){var e=0,t=this.props.controller.getStaticRows(this.props.propertyId).sort();return t&&t.length>0&&t.includes(0)&&(e=t[t.length-1]),e}},{key:"getMaxValue",value:function(){var e=this.props.controller.getPropertyValue(this.props.propertyId),t=e.length-1,r=this.props.controller.getStaticRows(this.props.propertyId).sort();return r&&r.length>0&&r.includes(e.length-1)&&(t=r[0]-1),t}},{key:"topMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getLeastValue(),o=this.props.controller.getStaticRows(this.props.propertyId).sort(),i=t[0];i>n;i--)for(var a=0;a<=t.length-1;a++)if(o.length>0&&t[0]>n+1||0===o.length){var s=t.shift(),l=r[s-1];r[s-1]=r[s],r[s]=l,t.push(s-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,s,s-1)}t.length>0&&this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}},{key:"upMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.getLeastValue(),n=this.props.controller.getStaticRows(this.props.propertyId).sort();if(0!==t.length&&t[0]>r){for(var o=this.props.controller.getPropertyValue(this.props.propertyId),i=0;i<=t.length-1;i++)if(n.length>0&&t[0]>r+1){var a=t.shift(),s=o[a-1];o[a-1]=o[a],o[a]=s,t.push(a-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a-1)}else if(0===n.length){var l=t.shift();if(0!==l){var p=o[l-1];o[l-1]=o[l],o[l]=p,t.push(l-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,l,l-1)}}this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(o,t)}}},{key:"downMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue();if(0!==t.length&&t[t.length-1]!==r.length-1){for(var o=t.length-1;o>=0;o--){var i=t.pop();if(i!==n){var a=r[i+1];r[i+1]=r[i],r[i]=a,t.unshift(i+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i+1)}}t.length>1?this.props.setScrollToRow(t[t.length-1]):this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}}},{key:"bottomMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue(),o=t[t.length-1];o<n;o++)for(var i=t.length-1;i>=0;i--){var a=t.pop(),s=r[a+1];r[a+1]=r[a],r[a]=s,t.unshift(a+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a+1)}t.length>0&&this.props.setScrollToRow(t[t.length-1]),this.props.setCurrentControlValueSelected(r,t)}},{key:"render",value:function(){return this.props.isEmptyTable&&this.props.addRemoveRows?s.createElement(sl,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.props.emptyTableButtonLabel,emptyTableButtonClickHandler:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled}):this.getMoveableTableRows()}}]),i}(s.Component);pl.defaultProps={addRemoveRows:!0};var cl=Vt((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(pl);function ul(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var dl=[m.INTEGER,m.DOUBLE,m.LONG],hl=function(r){n(i,ol);var o=ul(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=dl.indexOf(e)>-1?null:"",r=this.props.controller.getPropertyValue(this.props.propertyId);void 0===r&&(r=[]);var n=r.concat([t]);this.setCurrentControlValueSelected(n)}},{key:"makeCell",value:function(e,t,r,n){return dl.indexOf(r)>-1?s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Hs,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0})):s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Os,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0}))}},{key:"makeRows",value:function(e,t,r){var n=[];if(e)for(var o=0;o<e.length;o++){var i=[],a={name:this.props.control.name,row:o};if(this.props.propertyId.name!==a.name){var s=Object.assign({},this.props.propertyId);a=this.props.controller.setChildPropertyId(s,{name:this.props.control.name,row:o})}var l=this.props.controller.getControlPropType(a),p=void 0===r||0===r.length?"":r[0].label,c=this.makeCell({},a,l,p);i.push({key:o+"-0-value",column:"value",content:c}),n.push({key:o,onClickCallback:this.handleRowClick.bind(this,o,!1),columns:i,className:"list-table-row"})}return n}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"value",label:u(this.reactIntl,st.LIST_TABLE_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={addButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,t),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(Le,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-list-table"},a),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,s.createElement(cl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===ht.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),i}();hl.propTypes={control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var fl=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(hl);function ml(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var vl=new RegExp("[0-9- _$]","g"),yl=function(r){n(i,r);var o=ml(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=or(),r.reactIntl=t.controller.getReactIntl(),r.valueColumn=u(r.reactIntl,st.EXPRESSION_VALUE_COLUMN),r.valueColumnDesc=u(r.reactIntl,st.EXPRESSION_VALUE_COLUMN_DESCRIPTION),r.recentUseCat=u(r.reactIntl,st.EXPRESSION_RECENTLY_USED),r.recentUseCatInfo={id:r.recentUseCat,locLabel:r.recentUseCat,field_columns:{field_column_info:{locLabel:u(r.reactIntl,st.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:r.valueColumn,descLabel:r.valueColumnDesc}}},r.inCategories=Object.keys(t.functionList),r.fields=r._makeDatasetFields(t.controller.getDatasetMetadataFields(),t.controller.getExpressionInfo().fields),r.resources=te(t.controller.getExpressionInfo(),"resources",{}),r.state={fieldSelected:0,valueSelected:0,functionSelected:0,fieldTableSortSpec:null,valuesTableSortSpec:null,functionTableSortSpec:null,functionCategory:r.inCategories[0],selectedIndex:0,fieldCategory:"fields",currentFieldDataset:r.fields.field_table_info[0].field_value_groups},r.controller=t.controller,r.onFunctionCatChange=r.onFunctionCatChange.bind(a(r)),r.onFieldCatChange=r.onFieldCatChange.bind(a(r)),r.onFieldFilter=r.onFieldFilter.bind(a(r)),r.onValueFilter=r.onValueFilter.bind(a(r)),r.onFunctionFilter=r.onFunctionFilter.bind(a(r)),r.language=t.language,r.onFieldTableClick=r.onFieldTableClick.bind(a(r)),r.onFieldTableDblClick=r.onFieldTableDblClick.bind(a(r)),r.onFunctionTableClick=r.onFunctionTableClick.bind(a(r)),r.onFunctionTableDblClick=r.onFunctionTableDblClick.bind(a(r)),r.onValueTableClick=r.onValueTableClick.bind(a(r)),r.onValueTableDblClick=r.onValueTableDblClick.bind(a(r)),r.sortTableRows=r.sortTableRows.bind(a(r)),r.shouldQuoteField=r.shouldQuoteField.bind(a(r)),r}return t(i,[{key:"onSwitch",value:function(e,t){this.setState({selectedIndex:e.index})}},{key:"onFunctionCatChange",value:function(e){this.setState({functionCategory:e.selectedItem.value,functionSelected:0})}},{key:"onFieldCatChange",value:function(e){var t=[];if(e.selectedItem.value===this.recentUseCat)t=this.props.controller.getExpressionFieldsRecentlyUsed();else for(var r=0;r<this.fields.field_table_info.length;r++)e.selectedItem.value===this.fields.field_table_info[r].id&&(t=this.fields.field_table_info[r].field_value_groups);this.setState({fieldCategory:e.selectedItem.value,fieldSelected:0,currentFieldDataset:t})}},{key:"onFieldTableClick",value:function(e,t,r){this.setState({fieldSelected:r,valueSelected:0})}},{key:"onFieldTableDblClick",value:function(e,t,r){var n=this.state.currentFieldDataset[t],o=n.id;if(this.state.fieldCategory!==this.recentUseCat&&this.props.controller.updateExpressionFieldsRecentlyUsed(n),this.props.onChange){var i="CLEM"===this.language&&"globals"!==this.state.fieldCategory?"'":"";this.shouldQuoteField(n.id)&&(o=i+n.id+i),this.props.onChange(o)}}},{key:"onFieldFilter",value:function(e){this.setState({fieldFilterText:e})}},{key:"onValueTableClick",value:function(e,t,r){this.setState({valueSelected:r})}},{key:"onValueTableDblClick",value:function(e,t,r){if(this.props.onChange){var n=this.state.currentFieldDataset[this.state.fieldSelected],o='"';if(n.values){var i=n.values[t].value,a="string"==typeof i?o+i+o:i;this.props.onChange(a)}else if(n.range){var s="string"==typeof n.range.min.value?o+n.range.min.value+o:n.range.min.value,l="string"==typeof n.range.max.value?o+n.range.max.value+o:n.range.max.value;this.props.onChange(0===t?s:l)}}this.setState({valueSelected:t})}},{key:"onValueFilter",value:function(e){this.setState({valueFilterText:e})}},{key:"onFunctionTableClick",value:function(e,t,r){this.setState({functionSelected:r})}},{key:"onFunctionTableDblClick",value:function(e,t,r){var n;this.state.functionCategory===this.recentUseCat?n=this.props.controller.getExpressionRecentlyUsed()[t]:(n=this.props.functionList[this.state.functionCategory].functionList[t],this.props.controller.updateExpressionRecentlyUsed(n));var o=n.value;this.props.onChange&&this.props.onChange(o)}},{key:"onFunctionFilter",value:function(e){this.setState({functionFilterText:e})}},{key:"setSortColumn",value:function(e,t){switch(e){case"fieldTable":this.setState({fieldTableSortSpec:t});break;case"valuesTable":this.setState({valuesTableSortSpec:t});break;case"functionTable":this.setState({functionTableSortSpec:t})}}},{key:"sortTableRows",value:function(e,t){var r=0;if(e.length>0){for(var n=e[0].columns,o=0;o<n.length;o++)if(n[o].column===t.column){r=o;break}var i=E(e,(function(e){return e.columns[r].value}));return t.direction===_t.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(vl)}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=s.createElement("span",{className:"properties-expr-table-cell"},e),n=s.createElement(we,{content:r,tooltipText:e,disabled:t});return s.createElement("div",{className:"properties-table-cell-control"},n)}},{key:"_makeDatasetFields",value:function(e,t){var r,n,o=u(this.reactIntl,st.EXPRESSION_FIELD_COLUMN),i=u(this.reactIntl,st.EXPRESSION_FIELD_COLUMN_DESCRIPTION),a=u(this.reactIntl,st.EXPRESSION_STORAGE_COLUMN),s={id:"fields",locLabel:u(this.reactIntl,st.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{field_column_info:{locLabel:o,descLabel:i},value_column_info:{locLabel:this.valueColumn,descLabel:this.valueColumnDesc},additional_column_info:[{id:"storage",locLabel:a}]}},l={id:"fields",field_value_groups:[]};e.forEach((function(e){var t={id:e.name,additional_column_entries:[{id:"storage",value:e.type}]};e.metadata.values&&(t.values=[],e.metadata.values.forEach((function(e){t.values.push({value:e})}))),e.metadata.range&&(t.range={},e.metadata.range.min&&(t.range.min={value:e.metadata.range.min}),e.metadata.range.max&&(t.range.max={value:e.metadata.range.max})),l.field_value_groups.push(t)}));for(var p=0;p<t.field_categories.length;p++)"fields"===t.field_categories[p].id&&(r=p);for(var c=0;c<t.field_table_info.length;c++)"fields"===t.field_table_info[c].id&&(n=c);return void 0!==r?t.field_categories[r]=s:t.field_categories.unshift(s),void 0!==n?t.field_table_info[n]=l:t.field_table_info.unshift(l),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],n=[],o=["fieldName"],i=null,a=null;if(this.state.fieldCategory===this.recentUseCat)i=this.recentUseCatInfo,a={id:this.recentUseCat,field_value_groups:this.props.controller.getExpressionFieldsRecentlyUsed()};else{for(var l=0;l<this.fields.field_categories.length;l++)this.state.fieldCategory===this.fields.field_categories[l].id&&(i=this.fields.field_categories[l]);for(var p=0;p<this.fields.field_table_info.length;p++)this.state.fieldCategory===this.fields.field_table_info[p].id&&(a=this.fields.field_table_info[p])}if(i&&(r.push({key:"fieldName",label:i.field_columns.field_column_info.locLabel,description:i.field_columns.field_column_info.descLabel,resizable:!0}),n.push({key:"values",label:i.field_columns.value_column_info.locLabel,description:i.field_columns.value_column_info.descLabel}),i.field_columns.additional_column_info))for(var c=0;c<i.field_columns.additional_column_info.length;c++)o.push(i.field_columns.additional_column_info[c].id),r.push({key:i.field_columns.additional_column_info[c].id,label:i.field_columns.additional_column_info[c].locLabel});var d=[],h=[];if(a&&a.field_value_groups)for(var f=0;f<a.field_value_groups.length;f++){var m=a.field_value_groups[f],v=[];(!this.state.fieldFilterText||0===this.state.fieldFilterText.length||m.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase())>-1)&&(v.push({column:"fieldName",content:this.createContentObject(m.id),value:m.id}),m.additional_column_entries&&this._makeAdditionalColumnsContent(m,v),d.push({columns:v,rowKey:f}),f===this.state.fieldSelected&&(h=this._makeValuesContent(m,h)))}var y=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(y=(d=this.sortTableRows(d,this.state.fieldTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.fieldSelected})));var g=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(g=(h=this.sortTableRows(h,this.state.valuesTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.valueSelected})));var b=u(this.reactIntl,st.EXPRESSION_FIELDS_TABLE_LABEL),E=u(this.reactIntl,st.EXPRESSION_VALUES_TABLE_LABEL),I=te(this.resources,st.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,u(this.reactIntl,st.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),S=te(this.resources,st.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,u(this.reactIntl,st.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));return s.createElement("div",{className:"properties-field-and-values-table-container"},t,s.createElement("div",{className:"properties-field-table-container"},s.createElement(Le,{columns:r,data:d,sortable:o,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:Lt,tableLabel:b,rowSelection:kt.SINGLE,updateRowSelections:this.onFieldTableClick,selectedRows:[y],onRowDoubleClick:this.onFieldTableDblClick,onSort:this.setSortColumn.bind(this,"fieldTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:I})),s.createElement("div",{className:"properties-value-table-container"},s.createElement(Le,{columns:n,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:Lt,tableLabel:E,rowSelection:kt.SINGLE,updateRowSelections:this.onValueTableClick,selectedRows:[g],onRowDoubleClick:this.onValueTableDblClick,onSort:this.setSortColumn.bind(this,"valuesTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:S})))}},{key:"_makeValuesContent",value:function(e,t){var r=u(this.reactIntl,st.EXPRESSION_MIN_LABEL),n=u(this.reactIntl,st.EXPRESSION_MAX_LABEL);if(e.values)for(var o=0;o<e.values.length;o++)this._addValueRow(e.values[o].value,o,t);else e.range&&(e.range.min&&this._addValueRow(r+": "+e.range.min.value,0,t),e.range.max&&this._addValueRow(n+": "+e.range.max.value,1,t));return t}},{key:"_addValueRow",value:function(e,t,r){if(!this.state.valueFilterText||0===this.state.valueFilterText.length||String(e).toLowerCase().indexOf(this.state.valueFilterText.toLowerCase())>-1){var n=[{column:"values",content:this.createContentObject(e),value:e}];r.push({columns:n,rowKey:t})}}},{key:"_makeFunctionsContent",value:function(){if(this.props.functionList){var e=Object.keys(this.props.functionList),t=this._makeFunctionDropdown(e),r=this._makeFunctionsTable(e);return s.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return s.createElement("span",null,"formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS);")}},{key:"_makeAdditionalColumnsContent",value:function(e,t){for(var r=0;r<e.additional_column_entries.length;r++)t.push({column:e.additional_column_entries[r].id,content:this.createContentObject(e.additional_column_entries[r].value),value:e.additional_column_entries[r].value})}},{key:"_makeFunctionDropdown",value:function(e){var t=this,r=e.map((function(e,r){return{value:e,label:t.props.functionList[e].locLabel}})),n=r.slice(0,1),o=r.slice(1);r=n.concat({value:this.recentUseCat,label:this.recentUseCat},o);var i=this.state.functionCategory===this.recentUseCat?this.recentUseCat:this.props.functionList[this.state.functionCategory].locLabel,a=u(this.reactIntl,st.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-function-select"},s.createElement(qe,{id:"properties-expression-function-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFieldDropdown",value:function(){for(var e=[],t=0;t<this.fields.field_categories.length;t++)e.push({value:this.fields.field_categories[t].id,label:this.fields.field_categories[t].locLabel});var r=e.slice(0,1),n=e.slice(1),o=r.concat({value:this.recentUseCat,label:this.recentUseCat},n),i=this.state.fieldCategory===this.recentUseCat?this.recentUseCat:e[0].label,a=u(this.reactIntl,st.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-field-select"},s.createElement(qe,{id:"properties-expression-field-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:o,onChange:this.onFieldCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],n=u(this.reactIntl,st.EXPRESSION_FUNCTION_COLUMN),o=u(this.reactIntl,st.EXPRESSION_RETURN_COLUMN);r.push({key:"function",label:n,width:73,resizable:!0}),r.push({key:"return",label:o,width:27});var i=this._buildFunctionTable(this.state.functionCategory),a=i.rows,l=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(l=(a=this.sortTableRows(a,this.state.functionTableSortSpec)).findIndex((function(e){return e.rowKey===t.state.functionSelected})));var p=u(this.reactIntl,st.EXPRESSION_FUNCTIONS_TABLE_LABEL),c=te(this.resources,st.EXPRESSION_NO_FUNCTIONS,u(this.reactIntl,st.EXPRESSION_NO_FUNCTIONS));return s.createElement("div",{className:"properties-functions-table-container"},s.createElement("div",{className:"properties-functions-table"},s.createElement(Le,{columns:r,data:a,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:Lt,tableLabel:p,rowSelection:kt.SINGLE,updateRowSelections:this.onFunctionTableClick,selectedRows:[l],onRowDoubleClick:this.onFunctionTableDblClick,onSort:this.setSortColumn.bind(this,"functionTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:c})),s.createElement("div",{className:"properties-help-table-container"},i.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:s.createElement("div",null)},r=e===this.recentUseCat?this.props.controller.getExpressionRecentlyUsed():this.props.functionList[e].functionList;if(r)for(var n=0;n<r.length;n++){var o=r[n],i=[];if(!this.state.functionFilterText||0===this.state.functionFilterText.length||o.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1){var a=o.locReturnType?o.locReturnType:o.return_type;i.push({column:"function",content:this.createContentObject(o.locLabel),value:o.locLabel}),i.push({column:"return",content:this.createContentObject(a),value:a}),t.rows.push({columns:i,rowKey:n}),n===this.state.functionSelected&&(t.helpContainer=s.createElement("div",{className:"properties-function-help-text"},s.createElement("span",{className:"properties-function-help-command"},o.locLabel,":"),s.createElement("br",null),s.createElement("br",null),s.createElement("span",null,o.help)))}}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=u(this.reactIntl,st.EXPRESSION_FIELD_TAB),n=u(this.reactIntl,st.EXPRESSION_FUNCTIONS_TAB),o=null;return 0===this.state.selectedIndex?o=e:1===this.state.selectedIndex&&(o=t),s.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},s.createElement("div",{className:"properties-expression-selection-content-switcher"},s.createElement(Ge,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},s.createElement(We,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),s.createElement(We,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),o)}}]),i}(s.Component);function gl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var bl=function(r){n(i,r);var o=gl(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"onOperatorClick",value:function(e,t){this.props.onChange&&this.props.onChange(e)}},{key:"_makeOperatorContent",value:function(){var e=this;if(this.props.operatorList){var t=[];return this.props.operatorList.forEach((function(r,n){var o="tooltip-expression-operator-".concat(n),i=s.createElement("div",{className:"properties-tooltips"},r.help);t.push(s.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+n},s.createElement(ir,{id:o,tip:i,direction:"bottom",className:"properties-tooltips"},s.createElement(Ne,{className:at("properties-operator-button",{first:n%2==0,second:!(n%2==0)}),size:"small",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},s.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))})),s.createElement("div",{className:"properties-operator-container"},t)}return s.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return s.createElement("div",{className:"properties-expression-selection-operator"},e)}}]),i}(s.Component);function El(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Il=function(r){n(i,r);var o=El(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=s.createElement(yl,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=s.createElement(bl,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return s.createElement("div",{className:"properties-expression-selection-container"},t,e)}}]),i}(s.Component);function Sl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Cl=function(r){n(i,r);var o=Sl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).selection=[],r.expressionInfo=t.controller.getExpressionInfo(),r.editorDidMount=r.editorDidMount.bind(a(r)),r.onChange=r.onChange.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r.onSelectionChange=r.onSelectionChange.bind(a(r)),r.lastCursorPos=null,r}return t(i,[{key:"onChange",value:function(e){var t="string"==typeof e?e:e.toString(),r=this.editor.getCursor(),n=1;if(this.editor.somethingSelected())n=0,this.editor.replaceSelection(t);else{var o=" ";this.lastCursorPos&&(this.editor.setCursor(this.lastCursorPos),r=this.lastCursorPos);var i=this.editor.getLine(r.line)[r.ch-1];-1!==["(","[","{"].indexOf(i)&&(o=""),this.editor.replaceSelection(o+t)}this._setSelection(t,r,n);var a=this.editor.getValue();this.props.controller.updatePropertyValue(this.props.propertyId,a,!0),this.lastCursorPos=this.editor.getCursor()}},{key:"onSelectionChange",value:function(e){this.selection=e}},{key:"onBlur",value:function(e,t){this.lastCursorPos=e.getCursor();var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.editor.getValue(),o=this.expressionSelectionPanel&&t&&this.expressionSelectionPanel.contains(t.relatedTarget);O(r,n)&&o||this.props.controller.updatePropertyValue(this.props.propertyId,n,o)}},{key:"editorDidMount",value:function(e,t){this.editor=e}},{key:"_setSelection",value:function(e,t,r){if("string"==typeof e){var n=e.indexOf("?");if(-1!==n){var o={anchor:{line:t.line,ch:t.ch+n+r+1},head:{line:t.line,ch:t.ch+n+r}};return void this.onSelectionChange([o])}}for(var i=this.editor.lineCount(),a=0;a<i;a++){var s=this.editor.getLine(a).indexOf("?");if(-1!==s){var l={anchor:{line:a,ch:s+1},head:{line:a,ch:s}};return void this.onSelectionChange([l])}}var p={anchor:{line:t.line,ch:t.ch+e.length+r},head:{line:t.line,ch:t.ch+e.length+r}};this.onSelectionChange([p])}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),st.EXPRESSION_BUILDER_LABEL);return s.createElement("div",{className:"properties-expression-builder"},s.createElement(Xl,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,builder:!1,editorDidMount:this.editorDidMount,selectionRange:this.selection,onSelectionChange:this.onSelectionChange,onBlur:this.onBlur,height:96,expressionLabel:t}),s.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},s.createElement(Il,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),i}(s.Component);function Rl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Tl,_l=Mt(function(r){n(i,r);var o=Rl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).buttonHandler=t.controller.getHandlers().buttonHandler||function(){return null},r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"render",value:function(){var e=this;return s.createElement("div",{className:"properties-expression-toggle"},s.createElement("div",{className:"properties-expression-toggle-absolute"},this.props.enableMaximize?s.createElement(Ne,{className:"maximize",type:"button",size:"small",kind:"ghost",renderIcon:Yt,hasIconOnly:!0,iconDescription:u(this.reactIntl,st.EXPRESSION_MAXIMIZE_LABEL),onClick:function(){!e.buttonHandler({type:"maximize_tearsheet",propertyId:e.props.control.data||{}})&&e.props.control.data&&e.props.control.data.tearsheet_ref&&e.props.controller.setActiveTearsheet(e.props.control.data.tearsheet_ref)}}):s.createElement(Ne,{type:"button",className:"minimize",size:"small",kind:"ghost",hasIconOnly:!0,renderIcon:Jt,iconDescription:u(this.reactIntl,st.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}]),i}(s.Component));function kl(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function wl(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"python-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){kl(Ol,o),kl(Dl,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:Tl.Pos(o.line,i.start),to:Tl.Pos(o.line,i.end)}}function Ll(e){return wl(e,0,(function(e,t){return e.getTokenAt(t)}))}var Al,Dl="and del from not while as elif global or with assert else if pass yieldbreak except import print class exec in raise continue finally is return def for lambda try".split(" "),Ol="abs divmod input open staticmethod all enumerate int ord str any eval isinstance pow sum basestring execfile issubclass print superbin file iter property tuple bool filter len range typebytearray float list raw_input unichr callable format locals reduce unicodechr frozenset long reload vars classmethod getattr map repr xrangecmp globals max reversed zip compile hasattr memoryview round __import__complex hash min set apply delattr help next setattr bufferdict hex object slice coerce dir id oct sorted intern ".split(" ").join("() ").split(" ");function Pl(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function Nl(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"r-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){Pl(Fl,o),Pl(Ml,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:Al.Pos(o.line,i.start),to:Al.Pos(o.line,i.end)}}function xl(e){return Nl(e,0,(function(e,t){return e.getTokenAt(t)}))}var Bl,Ml="function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|"),Fl="zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts withinwithCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapplyvalidUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespaceunlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigammatransform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnectiontestPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 systemswitch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sumsubstring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftimestopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf splitsource sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleErrorsimpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHooksetequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSumsrowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexecRNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeatrep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce RecallreadRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnectionraw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix printprettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parsepackBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNamesoldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncolnchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExportmonths mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply MapmakeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespacesload list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengthslazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpenISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isattyinvokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviateinteractive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv Igzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversiongetOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExportsgetNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLegetCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC formatformals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersionexpression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith EncodingencodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dirdigamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asindebugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conjconflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans colcloseAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceilingcbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote bodybitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselIbasename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA".split(" ");var Vl="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" ");function Ul(e,t){return function(e,t,r,n){var o=e.getCursor(),i=r(e,o);if(/\b(?:string|comment)\b/.test(i.type))return null;i.state=Bl.innerMode(e.getMode(),i.state).state,/^[\w$_@]*$/.test(i.string)?i.end>o.ch&&(i.end=o.ch,i.string=i.string.slice(0,o.ch-i.start)):i={start:o.ch,end:o.ch,string:"",state:i.state,type:"."===i.string?"property":null};return{list:Hl(i,t),from:Bl.Pos(o.line,i.start),to:Bl.Pos(o.line,i.end)}}(e,Vl,(function(e,t){return e.getTokenAt(t)}))}function Hl(e,t,r){for(var n=[],o=e.string,i=0;i<t.length;i++)0===t[i].lastIndexOf(o,0)&&-1===n.indexOf(t[i])&&n.push(t[i]);return n}function jl(){var e="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" "),t=/[\[\]{}\(\),;\:\.]/,r=/\d/,n=/[\w\.]/,o=/[\w\$_]/,i=/[+\-*&%=<>!?|\/]/;function a(a,s){var l=a.next();if("#"===l&&s.startOfLine)return a.skipToEnd(),"meta";if('"'===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"string";if("'"===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"variable";if(t.test(l))return null;if(r.test(l))return a.eatWhile(n),"number";if(i.test(l))return a.eatWhile(i),"operator";a.eatWhile(o);var p=a.current();return-1!==e.indexOf(p)?"keyword":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||a)(e,t)},electricChars:"{}"}}function zl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ql(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ql(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Wl=null;"undefined"!=typeof window&&void 0!==window.navigator&&(Wl=require("codemirror"),require("codemirror/addon/hint/show-hint"),require("codemirror/addon/display/placeholder"),require("codemirror/addon/display/autorefresh"),require("codemirror/mode/javascript/javascript"),require("codemirror/addon/hint/javascript-hint"),require("codemirror/addon/hint/sql-hint"),require("codemirror/mode/sql/sql"),require("codemirror/mode/python/python"),require("codemirror/mode/r/r"),function(e){(Tl=e).registerHelper("hint","python",Ll)}(Wl),function(e){(Al=e).registerHelper("hint","r",xl)}(Wl),function(e){(Bl=e).registerHelper("hint","CLEM",Ul),Bl.defineMode("CLEM",jl),Bl.defineMIME("text/x-CLEM","CLEM")}(Wl));var $l=function(r){n(i,r);var o=Gl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showExpressionBuilder:!1,validationInProgress:!1},r.origHint="",r.expressionInfo=r.props.controller.getExpressionInfo(),r.handleValidate=r.handleValidate.bind(a(r)),r.hasValidate=r.hasValidate.bind(a(r)),r.cancelExpressionBuilder=r.cancelExpressionBuilder.bind(a(r)),r.hideExpressionBuilder=r.hideExpressionBuilder.bind(a(r)),r.showExpressionBuilder=r.showExpressionBuilder.bind(a(r)),r.editorDidMount=r.editorDidMount.bind(a(r)),r.addonHints=r.addonHints.bind(a(r)),r.getDatasetFields=r.getDatasetFields.bind(a(r)),r.handleBlur=r.handleBlur.bind(a(r)),r.handleKeyDown=r.handleKeyDown.bind(a(r)),r.handleChange=function(e,t,n){if(Array.isArray(t.text)&&1===t.text.length&&1===t.text[0].length&&r.props.onSelectionChange){var o=t.removed[0].length>0?{line:t.from.line,ch:t.from.ch+1}:{line:t.to.line,ch:t.to.ch+1};r.props.onSelectionChange([{anchor:o,head:o}])}r.state.validateIcon&&(r.setState({validateIcon:null}),r.props.controller.updateErrorMessage(r.props.propertyId,St))},r}return t(i,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.selectionRange&&this.props.selectionRange.length>0&&!O(e.selectionRange,this.props.selectionRange)&&this.editor&&(this.props.selectionRange.forEach((function(e){t.editor.setSelection(e.anchor,e.head)})),this.editor.focus())}},{key:"componentWillUnmount",value:function(){this.origHint&&Wl&&Wl.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=zl(this.props.controller.getDatasetMetadataFields());try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n.name)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addonHints",value:function(e,t){var r={},n=e.getCursor(),o=e.getTokenAt(n);if(this.origHint){r=this.origHint(e,t);for(var i=this.getDatasetFields(),a=0;a<i.length;++a){var s=i[a];(0===s.lastIndexOf(o.string,0)&&-1===r.list.indexOf(s)||" "===o.string&&null===o.type)&&r.list.unshift(s)}}return r}},{key:"editorDidMount",value:function(e,t){this.editor=e;var r=this.expressionEditorDiv?this.expressionEditorDiv.clientWidth:0,n=r>0?r/8.5:30,o=this.props.control.charLimit?Math.min(this.props.control.charLimit/n*26,390):104;o=this.props.control.rows?26*this.props.control.rows:o,o=this.props.height?this.props.height:o,this.editor.setSize(null,Math.max(Math.floor(o),104)),this.origHint=e.getHelper({line:0,ch:0},"hint");var i=this.props.control.language;switch(this.props.control.language){case"text/x-hive":i="sql";break;case"text/x-python":i="python";break;case"text/x-rsrc":i="r"}Wl&&Wl.registerHelper("hint",i,this.addonHints),this.props.editorDidMount&&this.props.editorDidMount(e,t)}},{key:"showExpressionBuilder",value:function(){this.initialControlValue=this.props.controller.getPropertyValue(this.props.propertyId),this.initialMessage=this.props.controller.getErrorMessage(this.props.propertyId),this.initialState=this.props.controller.getControlState(this.props.propertyId),this.setState({showExpressionBuilder:!0})}},{key:"hideExpressionBuilder",value:function(){this.setState({showExpressionBuilder:!1})}},{key:"cancelExpressionBuilder",value:function(){this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.updateErrorMessage(this.props.propertyId,this.initialMessage),this.props.controller.updateControlState(this.props.propertyId,this.initialState),this.hideExpressionBuilder()}},{key:"handleValidate",value:function(){var e=this;this.setState({validateIcon:null,validationInProgress:!0});var t=this.props.controller.getAppData();this.props.controller.getHandlers().validationHandler(this.props.controller,this.props.propertyId,this.props.value,t,(function(t){e.props.controller.updateErrorMessage(e.props.propertyId,t),e.setState({validateIcon:t.type,validationInProgress:!1}),e.editor.display.input.blur()}))}},{key:"hasValidate",value:function(){return"function"==typeof this.props.controller.getHandlers().validationHandler}},{key:"handleKeyDown",value:function(e,t){if("Enter"===t.code&&this.props.selectionRange&&this.props.selectionRange.length>0&&this.props.onSelectionChange){var r={line:this.props.selectionRange[0].anchor.line+1,ch:0};this.props.onSelectionChange([{anchor:r,head:r}])}}},{key:"handleBlur",value:function(e,t){if(this.props.onBlur)this.props.onBlur(e,t);else{var r=this.editor.getValue(),n=t&&t.relatedTarget&&t.relatedTarget.classList.contains("properties-expression-button");this.props.controller.updatePropertyValue(this.props.propertyId,r,n)}}},{key:"_showBuilderButton",value:function(){return this.props.builder&&this.props.rightFlyout&&this.expressionInfo.functionCategories&&Object.keys(this.expressionInfo.functionCategories).length>0}},{key:"render",value:function(){var e=this,t=this.props.messageInfo,r=t?t.type:dt.INFO;r===dt.SUCCESS&&(t=null);var n=this.props.state===ht.DISABLED?"disabled":r,o=this.props.controller.getReactIntl(),i=this._showBuilderButton()?s.createElement(Ne,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===ht.DISABLED,onClick:this.showExpressionBuilder,renderIcon:Qt,iconDescription:u(o,st.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,a=null;this.state.validateIcon&&(a=s.createElement("div",{className:"icon validateIcon"},s.createElement(nr,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var l=this.state.validationInProgress?u(o,st.EXPRESSION_VALIDATING_LABEL):u(o,st.EXPRESSION_VALIDATE_LABEL),p=this.hasValidate()&&this.props.validateLink?s.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===ht.DISABLED},s.createElement(Ne,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===ht.DISABLED||this.state.validationInProgress},l),a):null,c={mode:this.props.control.language,placeholder:this.props.control.additionalText,theme:n+" custom",readOnly:this.props.state===ht.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0,lineNumbers:!0},d=u(o,st.APPLYBUTTON_LABEL),h=u(o,st.REJECTBUTTON_LABEL),f=u(o,st.EXPRESSION_BUILDER_TITLE),m=this.state.showExpressionBuilder?s.createElement(_n,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:d,rejectLabel:h,title:f,light:this.props.controller.getLight()&&this.props.control.light},s.createElement("div",null,s.createElement(Cl,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,v=at("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.control.light||!this.props.controller.getLight()}),y=s.createElement("div",{className:"properties-expression-link-container"},i,p),g=y;this.props.expressionLabel&&(g=s.createElement("div",{className:"properties-expression-header"},s.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),y));var b=null;if(this.props.control.enableMaximize){var E=this.props.controller.getActiveTearsheet()===te(this,"props.control.data.tearsheet_ref");b=s.createElement(_l,{control:this.props.control,controller:this.props.controller,enableMaximize:!E})}return s.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,m,s.createElement("div",{className:"properties-editor-container"},g,b,s.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":wn(this.props.propertyId),className:v},s.createElement(gr,{ref:function(t){return e.codeMirror=t},options:c,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,editorDidMount:this.editorDidMount,value:this.props.value}),s.createElement(Cs,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),i}(s.Component);$l.defaultProps={builder:!0,validateLink:!0};var Xl=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)($l);function Kl(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Yl=function(r){n(i,r);var o=Kl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".passwordShow.tooltip"),t="".concat(this.props.control.name,".passwordHide.tooltip"),r=u(this.reactIntl,st.SHOW_PASSWORD_TOOLTIP),n=u(this.reactIntl,st.HIDE_PASSWORD_TOOLTIP),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.value?this.props.value:"",l=at("properties-pwdfield","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),p=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:l,"data-id":wn(this.props.propertyId)},s.createElement($e,ar({},p,{autoComplete:"off",id:this.id,disabled:this.props.state===ht.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:a,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,tooltipAlignment:"end",showPasswordLabel:o,hidePasswordLabel:i})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Jl=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Yl);function Ql(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Zl=function(r){n(i,r);var o=Ql(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r.getDateFormat=r.getDateFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r.value=t.value,r.value){var n=dr(r.value,pt,new Date);ur(n)&&(r.value=hr(n,r.getDateFormat()))}else r.value="";return r}return t(i,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||pt;return e=e.replace(/Y/g,"y").replace(/D/g,"d")}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=dr(e.target.value,this.getDateFormat(),new Date);t=ur(r)?hr(r,pt):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=at("properties-datefield","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":wn(this.props.propertyId)},s.createElement(Ue,ar({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===ht.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),ep=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Zl);function tp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var rp=function(r){n(i,r);var o=tp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(t.propertyId),r.locale=t.controller.getLocale(),r.dateFormat=Nn(t.control),r.state={value:t.value?Ts(t.value,r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r}return t(i,[{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleChange",value:function(e){if(e.length>0){var t=_s(e[0]),r=Ts(e[0],this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,t),this.setState({value:r})}else this.props.controller.updatePropertyValue(this.props.propertyId,""),this.setState({value:""})}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.setState({value:t})}},{key:"render",value:function(){var e=this.props.controller.getResource("".concat(this.props.control.name,".helper"),null),t=at("properties-datepicker","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:t,"data-id":wn(this.props.propertyId)},s.createElement(Xe,{className:"properties-datepicker-wrapper-parent",datePickerType:At.SINGLE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleChange.bind(this),locale:this.locale},s.createElement(Ke,ar({},r,{id:this.id,className:"properties-datepicker-wrapper-input",placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&this.props.controlItem,disabled:this.props.state===ht.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&e}))),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),np=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(rp);function op(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ip=function(r){n(i,r);var o=op(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.id=kn(r.props.propertyId),r.locale=t.controller.getLocale(),r.uuid=or(),r.dateFormat=Nn(t.control),r.state={valueStart:t.value&&t.value[0]?Ts(t.value[0],r.dateFormat):"",valueEnd:t.value&&t.value[1]?Ts(t.value[1],r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r.createInfoDesc=r.createInfoDesc.bind(a(r)),r}return t(i,[{key:"onStartBlur",value:function(e){var t=_s(e.target.value,this.dateFormat),r=_s(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=_s(e.target.value,this.dateFormat),r=_s(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleDateRangeChange",value:function(e){if(e[0]){var t=_s(e[0]),r=Ts(e[0],this.dateFormat),n="",o="";e[1]&&(n=_s(e[1]),o=Ts(e[1],this.dateFormat)),this.props.controller.updatePropertyValue(this.props.propertyId,[t,n]),this.setState({valueStart:r,valueEnd:o})}}},{key:"handleInputStartChange",value:function(e){this.setState({valueStart:e.target.value})}},{key:"handleInputEndChange",value:function(e){this.setState({valueEnd:e.target.value})}},{key:"createInfoDesc",value:function(e,t,r){return t?s.createElement("div",{className:"properties-label-container"},e,s.createElement(ir,{id:"".concat(this.uuid,"-tooltip-label-").concat(this.props.control.name,"-").concat(r),tip:t,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:this.props.state===ht.DISABLED,showToolTipOnClick:!0},s.createElement(nr,{type:ft.INFORMATION,className:"properties-control-description-icon-info"}))):e}},{key:"render",value:function(){var e="".concat(this.props.control.name,".range.start.label"),t="".concat(this.props.control.name,".range.start.desc"),r="".concat(this.props.control.name,".range.start.helper"),n="".concat(this.props.control.name,".range.end.label"),o="".concat(this.props.control.name,".range.end.desc"),i="".concat(this.props.control.name,".range.end.helper"),a=u(this.reactIntl,st.DATEPICKER_RANGE_START_LABEL),l=u(this.reactIntl,st.DATEPICKER_RANGE_END_LABEL),p=this.props.controller.getResource(e,a),c=this.props.controller.getResource(t,null),d=this.props.controller.getResource(r,null),h=this.props.controller.getResource(n,l),f=this.props.controller.getResource(o,null),m=this.props.controller.getResource(i,null);p=this.createInfoDesc(p,c,"start"),h=this.createInfoDesc(h,f,"end");var v=at("properties-datepicker-range","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),y=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:v,"data-id":wn(this.props.propertyId)},s.createElement(Xe,{datePickerType:At.RANGE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleDateRangeChange.bind(this),locale:this.locale,allowInput:!0},s.createElement(Ke,ar({},y,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&p,disabled:this.props.state===ht.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&d})),s.createElement(Ke,ar({},y,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&h,disabled:this.props.state===ht.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputEndChange.bind(this),value:this.state.valueEnd,onBlur:this.onEndBlur.bind(this),helperText:!this.props.tableControl&&m}))),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),ap=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(ip);function sp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var lp=function(r){n(i,r);var o=sp(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=kn(t.propertyId),r.value=t.value,r.value){var n=dr(r.value,"HH:mm:ss:xxx",new Date);ur(n)&&(r.value=hr(n,r.getTimeFormat()))}else r.value="";return r.getTimeFormat=r.getTimeFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r}return t(i,[{key:"getTimeFormat",value:function(){return this.props.control.timeFormat||ct}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=dr(e.target.value,this.getTimeFormat(),new Date);t=ur(r)?hr(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=at("properties-timefield","properties-input-control",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":wn(this.props.propertyId)},s.createElement(Ue,ar({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===ht.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),pp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(lp);function cp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var up=function(r){n(i,r);var o=cp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e=this.props.control.label?this.props.control.label.text:"",t="tooltip-"+this.props.control.name,r="";this.props.control.description&&this.props.state!==ht.DISABLED&&this.props.state!==ht.HIDDEN&&!this.props.tableControl&&(r=s.createElement("span",null,this.props.control.description.text),this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId));var n=Z(r)?"":s.createElement(ir,{id:t,tip:r,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},s.createElement(nr,{type:ft.INFORMATION,className:"properties-control-description-icon-info"})),o=s.createElement("span",{className:"properties-checkbox-label"},e);return s.createElement("div",{className:at("properties-checkbox",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":wn(this.props.propertyId)},s.createElement(ze,{disabled:this.props.state===ht.DISABLED,id:this.id,labelText:o,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),n,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),i}(s.Component),dp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(up);function hp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var fp=function(r){n(i,r);var o=hp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".toggle.on.label"),t="".concat(this.props.control.name,".toggle.off.label"),r=u(this.reactIntl,st.TOGGLE_ON_LABEL),n=u(this.reactIntl,st.TOGGLE_OFF_LABEL),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.tableControl?"sm":"md",l=s.createElement(Ye,{id:this.id,size:a,disabled:this.props.state===ht.DISABLED,toggled:Boolean(this.props.value),labelB:o,labelA:i,onToggle:this.handleChange.bind(this),labelText:this.props.tableControl?null:this.props.controlItem}),p=at("properties-toggle",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:p,"data-id":wn(this.props.propertyId)},l,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),mp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(fp);function vp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var yp=function(r){n(i,r);var o=vp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=or(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)){var t=Es(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"handleChange",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId);null==r&&(r=[]);var n=r.indexOf(e);t&&n<0&&(r=r.concat([e])),!t&&n>=0&&r.splice(n,1);var o=r.concat();this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"render",value:function(){var e=this.props.state===ht.HIDDEN,t=this.props.value;null==t&&(t=[]);for(var r=[],n=0;n<this.props.control.values.length;n++){var o=this.props.control.values[n],i=this.props.state===ht.DISABLED||!this.props.controlOpts.values.includes(o),a=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[n])&&!this.props.tableControl){var l=s.createElement("span",null,this.props.control.valueDescs[n]);a=s.createElement(ir,{id:"tooltip-".concat(n),tip:l,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:e||i},s.createElement(Zt,{disabled:i,className:"properties-control-description-icon-info"}))}var p={name:this.props.propertyId.name,row:n},c=t.indexOf(o)>=0;r.push(s.createElement("div",{className:"properties-checkbox-tooltip-container",key:kn(p,this.uuid)},s.createElement(ze,{disabled:i,id:kn(p,this.uuid),key:o+n,labelText:this.props.control.valueLabels[n],onChange:this.handleChange.bind(this,o),checked:c}),a))}return s.createElement("fieldset",null,s.createElement("legend",null,this.props.controlItem),s.createElement("div",{className:at("properties-checkboxset",{hide:this.props.state===ht.HIDDEN}),"data-id":wn(this.props.propertyId)},s.createElement("div",{className:at("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},r),s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),i}(s.Component),gp=Vt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(yp);function bp(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ep(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ep(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ip(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Sp=function(r){n(i,r);var o=Ip(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=or(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Tt.INITIAL_LOAD);var e=this.props.controller.getPropertyValue(this.props.propertyId);this.setEnabledStateOfOptionalPanels(e),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"setEnabledStateOfOptionalPanels",value:function(e){if(this.props.control.optionalPanels){var t=this.props.controlOpts,r=this.props.controller.getPanelStates();this.props.controller.parsePanelTree();for(var n=0;n<t.values.length;n++){var o=t.values[n];Ka(r,{name:o},t.values[n]===e?ht.ENABLED:ht.DISABLED,o)}this.props.controller.setPanelStates(r),function(e,t){for(var r={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},n=0;n<e.length;n++){var o=t.getPanelState({name:e[n]});as(r,{name:e[n]},o,t)}t.setControlStates(r.controls),t.setPanelStates(r.panels),t.setActionStates(r.actions)}(t.values,this.props.controller)}}},{key:"getOptionalPanel",value:function(e){return this.props.control.optionalPanels?this.props.control.optionalPanels[e]:null}},{key:"updateValueFromFilterEnum",value:function(e,t){if(null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)&&(r=this.props.control.valueDef.defaultValue),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"convertTargetValue",value:function(e){return"boolean"===this.props.control.valueDef.propType?"true"===e:"integer"===this.props.control.valueDef.propType||"long"===this.props.control.valueDef.propType||"double"===this.props.control.valueDef.propType?Number(e):e}},{key:"handleChange",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.convertTargetValue(e);this.props.controller.updatePropertyValue(this.props.propertyId,r),t!==r&&this.setEnabledStateOfOptionalPanels(r)}},{key:"isRadioButtonDisabled",value:function(e){var t=this.props.valueStates;return!!(t&&t[e]&&t[e].value)&&t[e].value===ht.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==ht.DISABLED){var r,n=this.props.controller.getControl(this.props.propertyId),o=this.props.control.valueDef.defaultValue;if(o&&!this.isRadioButtonDisabled(o))r=o;else{var i,a=bp(n.values);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s!==e&&!this.isRadioButtonDisabled(s)){r=s;break}}}catch(e){a.e(e)}finally{a.f()}}r&&this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){var e=this.props.state===ht.DISABLED,t=this.props.state===ht.HIDDEN;this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var r=[],n=this.props.controlOpts,o=0;o<n.values.length;o++){var i=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[o])&&!this.props.tableControl){var a=s.createElement("span",null,this.props.control.valueDescs[o]);i=s.createElement(ir,{id:"tooltip-".concat(o),tip:a,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},s.createElement(Zt,{disabled:e,className:"properties-control-description-icon-info"}))}var l=n.values[o]===this.props.value,p="boolean"===this.props.control.valueDef.propType?String(n.values[o]):n.values[o],c=this.isRadioButtonDisabled(p),u=this.getOptionalPanel(p),d={name:this.props.propertyId.name,row:o};r.push(s.createElement("div",{key:o,className:"properties-radioset-panel"},s.createElement("div",{className:"properties-radioset-tooltip"},s.createElement(Je,{key:o,id:kn(d,this.uuid),disabled:e||c,labelText:n.valueLabels[o],value:p,onChange:this.handleChange,checked:l}),i),u))}return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:at("properties-radioset ",{hide:this.props.state===ht.HIDDEN})},s.createElement("div",{className:at("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null,{horizontal:this.props.control.orientation!==L.VERTICAL}),disabled:this.props.state===ht.DISABLED},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Cp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),valueStates:t.controller.getControlValueStates(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Sp);function Rp(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Tp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _p(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var kp=function(r){n(i,r);var o=_p(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyLabel="...",r.disableEmptyListDropdown=!1,Z(t.controlOpts)){var n="".concat(r.props.control.name,".emptyList.placeholder"),s=t.controller.getResource(n);s&&(r.emptyLabel=s,r.disableEmptyListDropdown=!0)}else t.control.additionalText&&(r.emptyLabel=t.control.additionalText);return r.id=kn(r.props.propertyId),r.handleChange=r.handleChange.bind(a(r)),r.handleComboOnChange=r.handleComboOnChange.bind(a(r)),r.handleOnInputChange=r.handleOnInputChange.bind(a(r)),r.genSchemaSelectOptions=r.genSchemaSelectOptions.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.genFieldSelectOptions=r.genFieldSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Tt.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=e.find((function(e){return e.value===r}));return(null===(n=void 0===n?null:n)&&r||this.props.control.customValueAllowed)&&(n={value:r,label:r}),n}},{key:"genSchemaSelectOptions",value:function(e){var t=[];if(t.push({value:"",label:this.emptyLabel}),Array.isArray(this.props.controlOpts)){var r,n=Rp(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o,label:o})}}catch(e){n.e(e)}finally{n.f()}}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genFieldSelectOptions",value:function(e){var t=[];t.push({value:"",label:this.emptyLabel});var r,n=Rp(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o.name,label:o.name})}}catch(e){n.e(e)}finally{n.f()}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({value:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e,t){if(this.props.control.controlType===h.ONEOFSELECT&&null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)?r=this.props.control.valueDef.defaultValue:this.props.control.customValueAllowed&&this.props.value&&(r=this.props.value),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"handleChange",value:function(e){var t=this.props.tableControl?e.target.value:e.selectedItem.value;this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleComboOnChange",value:function(e){var t=e.selectedItem&&e.selectedItem.value?e.selectedItem.value:"";this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e){if(null!==e){var t=e;this.props.controller.updatePropertyValue(this.props.propertyId,t)}}},{key:"render",value:function(){var e;e=this.props.control.controlType===h.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===h.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var t={"close.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLEARSELECTION)},r=null,n=Pn(this.props.messageInfo,this.props.tableControl);if(this.props.tableControl){var o=[],i=e.selectedOption&&e.selectedOption.value?e.selectedOption.value:"";e.selectedOption||o.push(s.createElement(Qe,{text:this.emptyLabel,key:this.id,value:""}));var a,l=Rp(e.options);try{for(l.s();!(a=l.n()).done;){var p=a.value;o.push(s.createElement(Qe,{text:p.label,key:this.id+"-"+p.value,value:p.value}))}}catch(e){l.e(e)}finally{l.f()}r=s.createElement(Ze,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===ht.DISABLED||this.disableEmptyListDropdown,onChange:this.handleChange,value:i,light:this.props.controller.getLight()&&this.props.control.light},o)}else r=this.props.control.customValueAllowed?s.createElement(et,ar({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(wn(this.props.propertyId),"-dropdown"),disabled:this.props.state===ht.DISABLED||this.disableEmptyListDropdown,placeholder:e.selectedOption.label,selectedItem:e.selectedOption.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:this.handleOnInputChange,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem})):s.createElement(qe,ar({},n,{id:"".concat(wn(this.props.propertyId),"-dropdown"),disabled:this.props.state===ht.DISABLED||this.disableEmptyListDropdown,type:"default",items:e.options,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:at("properties-dropdown",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),i}(s.Component),wp=Vt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return t.control.controlType===h.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===h.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(kp);function Lp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ap=function(r){n(i,r);var o=Lp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.getSelectedOption=r.getSelectedOption.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.handleOnChange=r.handleOnChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.setShouldRender=r.setShouldRender.bind(a(r)),r.state={shouldRender:!0},r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),this.setShouldRender(e)}},{key:"setShouldRender",value:function(e){!O(this.props.controlOpts.values,e.controlOpts.values)&&this.state.shouldRender?this.setState({shouldRender:!1}):this.state.shouldRender||this.setState({shouldRender:!0})}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=[];return r&&r.forEach((function(t){return n.push(e.find((function(e){return e.id===t})))})),n}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({id:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOptions:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e){var t=Es(this.props.value,this.props.controlOpts.values);O(t,this.props.value)||(Z(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=Es(this.props.control.valueDef.defaultValue,this.props.controlOpts.values)),this.props.controller.updatePropertyValue(this.props.propertyId,t,e))}},{key:"handleOnChange",value:function(e){for(var t=[],r=0;r<e.selectedItems.length;r++)t.push(e.selectedItems[r].id);this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.genSelectOptions(this.props.value);if(!this.state.shouldRender)return null;var t={"close.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,st.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":u(this.reactIntl,st.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=u(this.reactIntl,st.MULTISELECT_DROPDOWN_EMPTY_LABEL),o="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=u(this.reactIntl,st.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),a="";a=0===e.selectedOptions.length?this.props.controller.getResource(r,n):this.props.controller.getResource(o,i);var l=Pn(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?s.createElement(tt,ar({},l,{id:"".concat(wn(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===ht.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,placeholder:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})):s.createElement(rt,ar({},l,{id:"".concat(wn(this.props.propertyId),"-multiselect"),disabled:this.props.state===ht.DISABLED,translateWithId:function(e){return t[e]},items:e.options,selectedItems:e.selectedOptions,onChange:this.handleOnChange,label:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement("div",{"data-id":wn(this.props.propertyId),className:at("properties-dropdown",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},p,s.createElement(Cs,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Dp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Ap);function Op(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Pp=function(r){n(i,r);var o=Op(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).genSelectOptions=r.genSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.updateSelections=r.updateSelections.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Tt.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=Es(this.props.value,this.props.controlOpts.values);O(r,this.props.value)||this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}},{key:"updateSelections",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this.props.controlOpts.values[e[r]];t.push(n)}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"genSelectOptions",value:function(e){for(var t={options:[],selected:[]},r=0;r<this.props.controlOpts.values.length;r++){-1!==e.indexOf(this.props.controlOpts.values[r])&&t.selected.push(r);var n=[];n.push({column:"someofselect",state:this.props.state,content:this.props.controlOpts.valueLabels[r]}),t.options.push({className:"table-row",columns:n,disabled:this.props.state===ht.DISABLED})}return t}},{key:"render",value:function(){var e=this.props.value;null==e&&(e=[]);var t=this.genSelectOptions(e),r=this.props.control.rows?this.props.control.rows:5.5,n=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:at("properties-someofselect ",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,s.createElement(Le,{columns:[{key:"someofselect",label:""}],rows:r,data:t.options,scrollKey:this.props.control.name,tableLabel:n,selectedRows:t.selected,updateRowSelections:this.updateSelections,selectable:!0,showHeader:!1,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Np=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Pp);function xp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Bp=function(r){n(i,ol);var o=xp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,st.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"makeRows",value:function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var o=[],i=void 0!==this.props.propertyId.row?{row:this.props.propertyId.row,index:n}:{row:n},a=Object.assign({},this.props.propertyId,i),l=Object.assign({},this.props.control);if(l.dmImage){var p=this.props.controller.getDatasetMetadataFields(),c=y(this.props.controller.getPropertyValue(a),l,!0),u=N(p,c,l.dmImage);l.icon=u}var d=s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Ls,{control:l,propertyId:a,controller:this.props.controller,tableControl:!0}));o.push({key:n+"-0-field",column:"field",content:d}),r.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:o,className:"column-select-table-row"})}return r}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){this.setCurrentControlValueSelected(e,t);var r=t[t.length-1];this.setScrollToRow(r)}}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"field",label:u(this.reactIntl,st.FIELDPICKER_FIELDCOLUMN_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={fieldPickerCloseFunction:this.onFieldPickerClose},n=this.makeRows(this.props.value,this.props.state),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(Le,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-column-select-table"},a),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,s.createElement(cl,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===ht.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),i}();Bp.propTypes={control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,openFieldPicker:mr.func.isRequired,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var Mp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Bp);function Fp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Vp=function(r){n(i,r);var o=Fp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).controlFactory=new pc(r.props.controller),r.controlFactory.setFunctions(r.props.openFieldPicker,r.props.buildUIItem),r}return t(i,[{key:"_getSubControlDef",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return this.props.control.subControls[t];return null}},{key:"_getColumnIndex",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return t;return null}},{key:"_makeRow",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this._getSubControlDef(e[r]);if(n&&n.visible){var o={name:this.props.control.name,col:this._getColumnIndex(e[r])},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),t.push(this.controlFactory.createControlItem(n,a))}}return t}},{key:"_makeControls",value:function(){var e=[];if(Array.isArray(this.props.control.layout))for(var t=this.props.control.layout,r=0;r<t.length;r++)Array.isArray(t[r])&&e.push(this._makeRow(t[r]));else for(var n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].visible){var o={name:this.props.control.name,col:this._getColumnIndex(this.props.control.subControls[n].name)},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),e.push([this.controlFactory.createControlItem(this.props.control.subControls[n],a)])}return e}},{key:"_makeControlTable",value:function(e){for(var t=[],r=0;r<e.length;r++){for(var n=[],o=0;o<e[r].length;o++)n.push(s.createElement("td",{key:(1+r)*o,className:"properties-structureeditor-cell"},s.createElement("div",null,e[r][o])));t.push(s.createElement("tr",{key:1+r},n))}return s.createElement("table",{role:"presentation"},s.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this._makeControlTable(this._makeControls());return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:at("properties-structureeditor ",{hide:this.props.state===ht.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),i}(s.Component),Up=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Vp);var Hp=J,jp=Ur,zp=ke,qp=Q,Gp=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");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)}};var Wp=function(e,t){return(qp(e)?Hp:jp)(e,Gp(zp(t)))};function $p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Xp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Yp=function(r){n(i,ol);var o=Kp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.addColumns=r.addColumns.bind(a(r)),r.removeColumns=r.removeColumns.bind(a(r)),r.getDefaultRow=r.getDefaultRow.bind(a(r)),r.indexOfRow=r.indexOfRow.bind(a(r)),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,st.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return Ys(this.props.controller.getPropertyValue(this.props.propertyId),(function(r){return r[t]===e}))}},{key:"addColumns",value:function(e,t){for(var r=[],n=this.props.control.valueDef.isMap,o=0;o<e.length;o++){var i=e[o];if(this.indexOfRow(i)<0){var a=G(this.props.control.defaultRow);n?a.unshift(i):a[this.props.control.keyIndex]=i,r.push(a)}}var s=this.props.controller.getPropertyValue(this.props.propertyId).concat(r);this.setCurrentControlValueSelected(s)}},{key:"removeColumns",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.props.control.keyIndex,o=Wp(r,(function(t){return e.indexOf(t[n])>=0}));this.setCurrentControlValueSelected(o)}},{key:"getDefaultRow",value:function(e){var t=[];if(this.props.value&&e)for(var r=S(this.props.control),n=0;n<this.props.value.length;n++){if(this.props.value[n][r]===e||this.props.value[n]===e)return this.props.value[n]}for(var o=0;o<this.props.control.subControls.length;o++){var i=this.props.control.subControls[o];if(i.role===v.COLUMN)t.push(e);else if(i.role===v.NEW_COLUMN)t.push(y(e,i).replace(".","_"));else if(void 0!==i.dmDefault)t.push(x(i,e,this.props.controller.getDatasetMetadataFields()));else if(void 0!==this.props.control.defaultRow){var a=o;this.props.control.subControls.length!==this.props.control.defaultRow.length&&(a-=1);var s=this.props.control.defaultRow[a];this.props.control.subControls[a].valueDef.propType===m.STRUCTURE?t.push([]):s&&s.parameterRef?t.push(this.props.controller.getPropertyValue({name:s.parameterRef})):t.push(s)}else i.valueDef&&i.valueDef.defaultValue?i.valueDef.defaultValue.parameterRef?t.push(this.props.controller.getPropertyValue({name:i.valueDef.defaultValue.parameterRef})):t.push(i.valueDef.defaultValue):t.push(null)}return t}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){var r,n=[],o=$p(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.push(this.getDefaultRow(i))}}catch(e){o.e(e)}finally{o.f()}this.setCurrentControlValueSelected(n,t);var a=t[t.length-1];this.setScrollToRow(a)}}},{key:"render",value:function(){var e={fieldPickerCloseFunction:this.onFieldPickerClose},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-st properties-st-buttons"},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},s.createElement("div",{className:"properties-column-structure"},s.createElement(cl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===ht.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),s.createElement("div",null,o))}}]),i}();Yp.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,openFieldPicker:mr.func.isRequired,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var Jp=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Yp);function Qp(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Zp=function(r){n(i,ol);var o=Qp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.allowColumnControls=!0,r}return t(i,[{key:"addRow",value:function(){var e=this.getDefaultRow(),t=this.props.controller.getPropertyValue(this.props.propertyId).concat([e]);this.setCurrentControlValueSelected(t)}},{key:"render",value:function(){var e={addButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),st.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-sle properties-sle-buttons"},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-sle-container"},s.createElement(cl,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===ht.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),s.createElement("div",null,o))}}]),i}();Zp.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var ec=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Zp);function tc(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var rc=function(r){n(i,ol);var o=tc(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.editCallback=r.editCallback.bind(a(r)),r.buttonHandler=r.props.controller.getHandlers().buttonHandler,r}return t(i,[{key:"editCallback",value:function(){this.buttonHandler&&this.buttonHandler({type:"edit",propertyId:this.props.propertyId})}},{key:"render",value:function(){var e="".concat(this.props.control.name,".edit.button.label"),t=u(this.reactIntl,st.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),n=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,o=this.props.control&&this.props.control.buttons,i=this.createTable(this.props.state,n,o),a=s.createElement("div",null,s.createElement("div",{className:"properties-rt properties-rt-buttons"},i),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,s.createElement("div",{className:"properties-readonly-table"},s.createElement(cl,{tableContainer:a,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===ht.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),i}();rc.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object,hideEditButton:mr.bool};var nc=Vt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId),hideEditButton:t.controller.getHideEditButton(t.propertyId)}}),null)(rc);function oc(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ic=function(r){n(i,r);var o=oc(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).actionFactory=new mo(r.props.controller),r.showRequiredIndicator=!t.controller||te(t.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return t(i,[{key:"render",value:function(){if(this.props.control.controlType===h.HIDDEN)return null;var e,t,r,n,o=this.props.state===ht.HIDDEN,i=this.props.state===ht.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!Z(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?t=s.createElement("div",{className:"properties-control-description"},this.props.control.description.text):(this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId),r=s.createElement(ir,{id:"tooltip-label-".concat(this.props.control.name),tip:this.props.control.description.text,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:o||i,showToolTipOnClick:!0},s.createElement(nr,{type:ft.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),st.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),st.LABEL_INDICATOR_OPTIONAL))),e=s.createElement("div",{className:at("properties-label-container",{"table-control":!0===this.props.tableControl})},s.createElement("label",{className:"properties-control-label"},this.props.control.label.text),n,r));var a=this.actionFactory.generateAction(0,this.props.control.action),l=at("properties-control-item",{hide:o});return this.props.accessibleControls.includes(this.props.control.controlType)?s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t):s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t,this.props.controlObj,a)}}]),i}(s.Component),ac=Vt((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(ic),sc=[h.CHECKBOXSET,h.HIDDEN,h.DATEFIELD,h.DATEPICKER,h.DATEPICKERRANGE,h.NUMBERFIELD,h.SPINNER,h.PASSWORDFIELD,h.TEXTAREA,h.TEXTFIELD,h.TIMEFIELD,h.TOGGLETEXT,h.LIST,h.TOGGLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.READONLY,h.READONLYTABLE,h.TIMESTAMP,h.EXPRESSION,h.CODE,h.ONEOFSELECT,h.MULTISELECT,h.SELECTSCHEMA,h.SELECTCOLUMN],lc=[h.LIST,h.READONLYTABLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.STRUCTURETABLE,h.STRUCTURELISTEDITOR],pc=function(){function r(t){e(this,r),this.rightFlyout=!!t&&te(t.getPropertiesConfig(),"rightFlyout",!1),this.controller=t,this.actionFactory=new mo(this.controller)}return t(r,[{key:"setFunctions",value:function(e,t){this.genUIItem=t,this.openFieldPicker=e}},{key:"setRightFlyout",value:function(e){this.rightFlyout=e}},{key:"createControlItem",value:function(e,t,r){if(this.controller.getControlState(t)===ht.HIDDEN)return null;var n=this.createControl(e,t,r),o=e.className?e.className:"";return sc.includes(e.controlType)?n:s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:at("properties-ctrl-wrapper",o)},s.createElement(ac,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:n,accessibleControls:sc,tableControl:lc.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,o=wn(t),i=this.controller.getControlState(t)===ht.HIDDEN,a=this.actionFactory.generateAction(0,e.action),l={};switch(l.key=o,l.control=e,l.controller=this.controller,l.propertyId=t,l.controlItem=s.createElement(ac,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:sc,tableControl:lc.includes(e.controlType)}),r&&(l.tableControl=r.table),e.controlType){case h.HIDDEN:return null;case h.TEXTFIELD:n=s.createElement(Os,l);break;case h.READONLY:case h.TIMESTAMP:n=s.createElement(Ls,l);break;case h.TEXTAREA:n=s.createElement(Fs,l);break;case h.TOGGLE:n=s.createElement(mp,l);break;case h.LIST:n=s.createElement(fl,l);break;case h.EXPRESSION:n=s.createElement(Xl,ar({},l,{rightFlyout:this.rightFlyout}));break;case h.CODE:n=s.createElement(Xl,ar({},l,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case h.TOGGLETEXT:n=s.createElement(xs,l);break;case h.PASSWORDFIELD:n=s.createElement(Jl,l);break;case h.NUMBERFIELD:case h.SPINNER:n=s.createElement(Hs,l);break;case h.DATEFIELD:n=s.createElement(ep,l);break;case h.DATEPICKER:n=s.createElement(np,l);break;case h.DATEPICKERRANGE:n=s.createElement(ap,l);break;case h.TIMEFIELD:n=s.createElement(pp,l);break;case h.CHECKBOX:n=s.createElement(dp,l);break;case h.CHECKBOXSET:n=r?s.createElement(Ls,l):s.createElement(gp,l);break;case h.RADIOSET:n=s.createElement(Cp,l);break;case h.ONEOFSELECT:case h.SELECTSCHEMA:n=s.createElement(wp,ar({},l,{rightFlyout:this.rightFlyout}));break;case h.MULTISELECT:n=s.createElement(Dp,l);break;case h.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?s.createElement(wp,ar({},l,{rightFlyout:this.rightFlyout})):s.createElement(Ls,l);break;case h.SOMEOFSELECT:n=r?s.createElement(Ls,l):s.createElement(Np,l);break;case h.SELECTCOLUMNS:n=r?s.createElement(Ls,l):s.createElement(Mp,ar({},l,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURETABLE:n=r?s.createElement(Ls,l):s.createElement(Jp,ar({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURELISTEDITOR:n=r?s.createElement(Ls,l):s.createElement(ec,ar({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.READONLYTABLE:n=r?s.createElement(Ls,l):s.createElement(nc,ar({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.CUSTOM:n=s.createElement("div",{className:"properties-custom-ctrl",key:o},this.controller.getCustomControl(t,e,r));break;case h.STRUCTUREEDITOR:n=s.createElement(Up,ar({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=s.createElement(Ls,l)}if(sc.includes(e.controlType)){if(r)return n;var p=e.className?e.className:"";return s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:at("properties-ctrl-wrapper",{hide:i,action:ee(e,"action.image.placement")},p)},n,a)}return n}},{key:"createFormControl",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:bt.CUSTOM;if(!e)return null;var o=Yo.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(o&&o.parameterMetadata){var i,a=new Ro(e.resources),s=o.parameterMetadata.getParameter(t);s.propType()===m.STRUCTURE&&o.structureMetadata&&(i=o.structureMetadata.getStructure(s.baseType()));var l={light:r,containerType:n};return fi(o.parameterMetadata,t,null,i,a,null,null,null,l)}return null}}]),r}();function cc(e,t,r,n){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var o=f(e.value);return"undefined"!==o&&"null"!==o&&String(e.value).length>0}return g.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function uc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return dc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hc(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var o=n.getDatasetMetadataFields();if(!o)return!0;var i,a=!0,s=uc(o);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(B(e.value,l)){a=!1;break}}}catch(e){s.e(e)}finally{s.f()}if(!a){var p,c=function(e,t){var r=[];if(void 0!==e.control.columnIndex){var n=t.getPropertyValue({name:e.id.name,row:e.id.row});Array.isArray(n)&&n.forEach((function(n,o){o!==e.control.columnIndex&&(t.getControl({name:e.id.name,col:o}).role===v.COLUMN&&r.push(n))}))}return r}(e,n),u=uc(c);try{for(u.s();!(p=u.n()).done;){var d=p.value;if(O(e.value,d)){a=!0;break}}}catch(e){u.e(e)}finally{u.f()}}return a}return g.warn("Ignoring unsupported condition operation 'colNotExists' for control type "+e.control.controlType),!0}function fc(e,t,r,n){var o=n.getDatasetMetadataFields();if(!o)return!1;var i=e.control.controlType;switch(i){case"selectcolumns":case"selectcolumn":if(Array.isArray(e.value)&&void 0!==e.control.editStyle){if(e.value.length>0){var a=!0;return e.value.forEach((function(e){a=a&&void 0!==mc(o,e)})),a}return!0}return void 0!==mc(o,e.value);default:return g.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function mc(e,t){return!(null!=t&&!Z(t))||e.find((function(e){return B(t,e)}))}var vc=ce;var yc=function(e,t){return vc(t,(function(t){return e[t]}))},gc=ie;var bc=ve,Ec=ne,Ic=M,Sc=Gs,Cc=function(e){return null==e?[]:yc(e,gc(e))},Rc=Math.max;var Tc=function(e,t,r,n){e=Ec(e)?e:Cc(e),r=r&&!n?Sc(r):0;var o=e.length;return r<0&&(r=Rc(o+r,0)),Ic(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&bc(e,t,r)>-1};function _c(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!1;case"string":case"object":return Tc(e.value,t.value);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!1;case"string":case"object":return Tc(e.value,n);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation contains")}return g.warn("Ignoring unsupported condition operation 'contains' for control type "+e.control.controlType),!0}function kc(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value===t.value;switch(i){case"undefined":case"boolean":case"number":return e.value===t.value;case"string":return e.value.trim()===t.value.trim();case"object":return JSON.stringify(e.value)===JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value===n;switch(i){case"undefined":case"boolean":case"number":return e.value===n;case"string":return e.value.trim()===n.toString().trim();case"object":return JSON.stringify(e.value)===JSON.stringify(n);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation equals")}return g.warn("Ignoring unsupported condition operation 'equals' for control type "+e.control.controlType),!0}function wc(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value>t.value;if(void 0!==n)return null===n||e.value>n;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()>s.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()>l.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}throw new Error("Insufficient parameter for condition operation 'greaterThan'")}return!0;default:return g.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Lc(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!0;case"boolean":return!1;case"string":return i.trimSpaces?0===e.value.trim().length:0===e.value.length;case"number":return null===e.value;case"object":if(e.control&&e.control.controlType===h.DATEPICKERRANGE){var s=e.value[0].trim(),l=e.value[1].trim();return""===s&&""===l}return null===e.value||0===e.value.length;default:return g.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function Ac(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!1;case"boolean":return!0;case"string":return i.trimSpaces?0!==e.value.trim().length:0!==e.value.length;case"number":return null!==e.value;case"object":return e.control&&e.control.controlType===h.DATEPICKERRANGE?""!==e.value[0].trim()||""!==e.value[1].trim():null!==e.value&&0!==e.value.length;default:return g.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function Dc(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value<t.value;if(void 0!==n)return null===n||e.value<n;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()<s.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()<l.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}throw new Error("Insufficient parameter for condition operation 'lessThan'")}return!0;default:return g.warn("Ignoring condition operation 'lessThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Oc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Pc(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!0;case"string":case"object":return!Tc(e.value,t.value);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!0;case"string":case"object":return!Tc(e.value,n);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation notContains")}return g.warn("Ignoring unsupported condition operation 'notContains' for control type "+e.control.controlType),!0}function Nc(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value!==t.value;switch(i){case"undefined":case"boolean":case"number":return e.value!==t.value;case"string":return e.value.trim()!==t.value.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value!==n;switch(i){case"undefined":case"boolean":case"number":return e.value!==n;case"string":return e.value.trim()!==n.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(n);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation notEquals")}return g.warn("Ignoring unsupported condition operation 'notEquals' for control type "+e.control.controlType),!0}function xc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?!new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Bc(e,t,r,n){if(e.value){if(e.control&&e.control.controlType!==h.DATEPICKER&&e.control.controlType!==h.DATEPICKERRANGE){var o="time"===r?"HH:mm:ss:xxx":pt,i=dr(e.value,o,new Date);return ur(i)}return!0}return!0}function Mc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"type")===a:(void 0!==e.value&&g.warn("dmTypeEquals cannot handle the given type: "+r(e.value)),!1))}function Fc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"type")!==a:(void 0!==e.value&&g.warn("dmTypeNotEquals cannot handle the given type: "+r(e.value)),!1))}function Vc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"measure")===a:(void 0!==e.value&&g.warn("dmMeasurementEquals cannot handle the given type: "+r(e.value)),!1))}function Uc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"measure")!==a:(void 0!==e.value&&g.warn("dmMeasurementNotEquals cannot handle the given type: "+r(e.value)),!1))}function Hc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"modeling_role")===a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function jc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"modeling_role")!==a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function zc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o===i:(g.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function qc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o<i:(g.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function Gc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o>i:(g.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function Wc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xc(e){var t={};if(t.cellNotEmpty=cc,t.colNotExists=hc,t.colDoesExists=fc,t.contains=_c,t.equals=kc,t.greaterThan=wc,t.isEmpty=Lc,t.isNotEmpty=Ac,t.lessThan=Dc,t.matches=Oc,t.notContains=Pc,t.notEquals=Nc,t.notMatches=xc,t.isDateTime=Bc,t.dmTypeEquals=Mc,t.dmTypeNotEquals=Fc,t.dmMeasurementEquals=Vc,t.dmMeasurementNotEquals=Uc,t.dmRoleEquals=Hc,t.dmRoleNotEquals=jc,t.lengthEquals=zc,t.lengthLessThan=qc,t.lengthGreaterThan=Gc,Array.isArray(e)){var r,n=Wc(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o&&"function"==typeof o.op&&"function"==typeof o.evaluate?t[o.op()]=o.evaluate:g.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){n.e(e)}finally{n.f()}}return t}function Kc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Jc=function(){function r(){e(this,r),this.propertiesStore=new Zi,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null,tooltipLinkHandler:null},this.propertiesConfig={},this.visibleDefinitions={},this.enabledDefinitions={},this.validationDefinitions={},this.requiredDefinitionsIds=[],this.filterDefinitions={},this.filteredEnumDefinitions={},this.allowChangeDefinitions={},this.conditionalDefaultDefinitions={},this.panelTree={},this.controls={},this.actions={},this.customControls=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new cr,this.custPropSumPanelValues={},this.controlFactory=new pc(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=Xc(),this.expressionFunctionInfo={},this.expressionRecentlyUsed=[],this.expressionFieldsRecentlyUsed=[],this.selectionListeners={}}return t(r,[{key:"getStore",value:function(){return this.propertiesStore.getStore()}},{key:"subscribe",value:function(e){this.propertiesStore.subscribe(e)}},{key:"getHandlers",value:function(){return this.handlers}},{key:"setHandlers",value:function(e){this.handlers=Object.assign(this.handlers,e),this.handlers.controllerHandler&&!this.controllerHandlerCalled&&(this.handlers.controllerHandler(this),this.controllerHandlerCalled=!0)}},{key:"setCommandStack",value:function(e){this.commandStack=e}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"setEditorSize",value:function(e){this.editorSize=e}},{key:"getEditorSize",value:function(){return this.editorSize}},{key:"setLight",value:function(e){this.light=e}},{key:"getLight",value:function(){return this.light}},{key:"setPropertiesConfig",value:function(e){this.propertiesConfig=e}},{key:"getPropertiesConfig",value:function(){return this.propertiesConfig}},{key:"getLocale",value:function(){return te(this.propertiesConfig,"locale",Ot)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=te(this.getPropertiesConfig(),"containerType"),r=te(this.getPropertiesConfig(),"convertTypes"),n=Ci.makeForm(e,t,r);this.setForm(n)}},{key:"setForm",value:function(e,t){if(this.form=e,this.reactIntl=t,this.form){this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var r,n=[];!function(e,t,r){if(r.uiItems){var n,o=ta(r.uiItems);try{for(o.s();!(n=o.n()).done;)ia(e,t,n.value)}catch(e){o.e(e)}finally{o.f()}}}(n,this.actions,this.form),this.saveControls(n),this._parseSummaryControls(n),this.parsePanelTree(),Qa(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var o={};if(this.form.data&&(r=this.form.data.datasetMetadata,o=this.form.data.uiCurrentParameters?Bi({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(r),this.setPropertyValues(o,!0),this._addToControlValues(),this._addToControlValues(!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!Z(this.uiItems)&&!Z(this.uiItems[0].tabs)){var i=this.uiItems[0].tabs.filter((function(e){return e.content.itemType!==I.TEARSHEET}));i.length&&this.propertiesStore.setActiveTab(i[0].group)}this.setTitle(this.form.label)}}},{key:"getForm",value:function(){return this.form}},{key:"getResource",value:function(e,t){return this.form&&this.form.resources&&this.form.resources[e]?this.form.resources[e]:t}},{key:"setAppData",value:function(e){this.appData=e}},{key:"getAppData",value:function(){return this.appData}},{key:"_parseUiConditions",value:function(){if(this.visibleDefinitions={controls:{},refs:{}},this.enabledDefinitions={controls:{},refs:{}},this.validationDefinitions={controls:{},refs:{}},this.filterDefinitions={controls:{},refs:{}},this.filteredEnumDefinitions={controls:{},refs:{}},this.allowChangeDefinitions={controls:{},refs:{}},this.conditionalDefaultDefinitions={controls:{},refs:{}},this.form.conditions){var e,t=Kc(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?aa(this.visibleDefinitions,r,Et.VISIBLE):r.enabled?aa(this.enabledDefinitions,r,Et.ENABLED):r.validation?aa(this.validationDefinitions,r,Et.VALIDATION):r.filter?aa(this.filterDefinitions,r,Et.FILTER):r.enum_filter?aa(this.filteredEnumDefinitions,r,Et.FILTEREDENUM):r.allow_change?aa(this.allowChangeDefinitions,r,Et.ALLOWCHANGE):r.default_value?aa(this.conditionalDefaultDefinitions,r,Et.CONDITIONALDEFAULT):g.info("Invalid definition: "+JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"getDefinitions",value:function(e,t,r){var n;switch(t){case Et.VISIBLE:n=this.visibleDefinitions[r];break;case Et.ENABLED:n=this.enabledDefinitions[r];break;case Et.FILTEREDENUM:n=this.filteredEnumDefinitions[r];break;case Et.ALLOWCHANGE:n=this.allowChangeDefinitions[r];break;case Et.CONDITIONALDEFAULT:n=this.conditionalDefaultDefinitions[r];break;case Et.VALIDATION:n=this.validationDefinitions[r]}var o=[];for(var i in n)if(ee(n,i)){var a=Ja(i);a.name===e.name&&a.col===e.col&&(o=o.concat(n[i]))}return o}},{key:"getRequiredDefinitionIds",value:function(){return this.requiredDefinitionsIds}},{key:"convertPropertyId",value:function(e){return"string"==typeof e?{name:e}:this.convertNestedPropertyId(e)}},{key:"convertNestedPropertyId",value:function(e){var t;return e&&void 0!==e.col&&void 0===e.row?(void 0!==e.propertyId&&(t=this.convertNestedPropertyId(e.propertyId)),{name:e.name,row:e.col,propertyId:t}):e&&void 0!==e.col&&void 0!==e.row&&void 0!==e.propertyId?{name:e.name,row:e.row,col:e.col,propertyId:this.convertNestedPropertyId(e.propertyId)}:e}},{key:"updateLastChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.updateLastChildPropertyId(e.propertyId,t):(void 0!==t.row&&(e.row=t.row),void 0!==t.col&&(e.col=t.col),e)}},{key:"setChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.setChildPropertyId(e.propertyId,t):(e.propertyId=t,e)}},{key:"parsePanelTree",value:function(){this.panelTree={},this.panelTree[Ct]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var n,o=ca(t.uiItems);try{for(o.s();!(n=o.n()).done;)da(e,n.value,r)}catch(e){o.e(e)}finally{o.f()}}}(this.panelTree,this.form,Ct)}},{key:"_addToControlValues",value:function(e){for(var t in this.controls)if(ee(this.controls,t)){var r=this.controls[t],n={name:r.name},o=this.getPropertyValue(n);e?null!=o&&void 0!==o.parameterRef&&(o=this.getPropertyValue({name:o.parameterRef}),this.updatePropertyValue(n,o,!0,Tt.INITIAL_LOAD)):"structuretable"===r.controlType&&!1===r.addRemoveRows&&!0===r.includeAllFields?(o=this._populateFieldData(o,r),this.updatePropertyValue(n,o,!0,Tt.INITIAL_LOAD)):void 0!==r.valueDef&&void 0!==r.valueDef.defaultValue&&void 0===o?(o=r.valueDef.defaultValue,F(r)&&(o=V(r.valueDef.isList,r.subControls,o)),this.updatePropertyValue(n,o,!0,Tt.INITIAL_LOAD)):"structureeditor"===r.controlType&&(!o||Array.isArray(o)&&0===o.length)&&Array.isArray(r.defaultRow)&&this.updatePropertyValue(n,r.defaultRow,!0,Tt.INITIAL_LOAD)}}},{key:"_populateFieldData",value:function(e,t){for(var r=this.getDatasetMetadataFields(),n=this._isMultiSchemaControl(t),o=[].concat(e),i=0;i<r.length;i++){var a=[];if(-1===this._indexOfField(r[i].name,e)){for(var s=0;s<t.subControls.length;s++)if(s===t.keyIndex){var l=n?{link_ref:r[i].schema,field_name:r[i].origName}:r[i].name;a.push(l)}else a.push(this._getDefaultSubControlValue(s,r[i].name,r,t));o.push(a)}}return o}},{key:"_isMultiSchemaControl",value:function(e){if(e.role===v.COLUMN&&e.valueDef.propType===m.STRUCTURE)return!0;if("array"===f(e.subControls))for(var t in e.subControls)if(ee(e.subControls,t)){var r=e.subControls[t];if(r.role===v.COLUMN&&r.valueDef.propType===m.STRUCTURE)return!0}return!1}},{key:"_canHaveMultipleSchemas",value:function(){for(var e in this.controls)if(ee(this.controls,e)){var t=this.controls[e];if(this._isMultiSchemaControl(t))return!0}return!1}},{key:"_getDefaultSubControlValue",value:function(e,t,r,n){var o,i=n.subControls[e];return"undefined"!==f(i.dmDefault)?o=x(i,t,r):"undefined"!==f(i.valueDef.defaultValue)?(o=i.valueDef.defaultValue).parameterRef&&(o=this.getPropertyValue({name:o.parameterRef})):o=i.values?i.values[0]:"string"===i.valueDef.propType?"":"boolean"!==i.valueDef.propType&&("enum"===i.valueDef.propType?i.values[0]:"integer"===i.valueDef.propType||"long"===i.valueDef.propType||"double"===i.valueDef.propType?0:"structure"===i.valueDef.propType?{}:null),o}},{key:"_indexOfField",value:function(e,t){for(var r=0;r<t.length;r++)if(t[r][0]===e)return r;return-1}},{key:"getUiItems",value:function(){return this.uiItems}},{key:"getReactIntl",value:function(){return this.reactIntl}},{key:"addSharedControls",value:function(e,t){this.sharedCtrlInfo.push({id:e,controlNames:t})}},{key:"getSharedCtrlInfo",value:function(){return this.sharedCtrlInfo}},{key:"isSummaryPanelShowing",value:function(){return this.isSummaryPanel}},{key:"setIsSummaryPanelShowing",value:function(e){this.isSummaryPanel=e}},{key:"increaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter++}},{key:"decreaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter--}},{key:"isSubPanelsShowing",value:function(){return this.visibleSubPanelCounter>0}},{key:"getTitle",value:function(){return this.propertiesStore.getTitle()}},{key:"setTitle",value:function(e){return this.propertiesStore.setTitle(e)}},{key:"setConditionOps",value:function(e){this.conditionOps=Xc(e)}},{key:"getConditionOp",value:function(e){return this.conditionOps?this.conditionOps[e]:null}},{key:"getConditionOps",value:function(){return this.conditionOps}},{key:"getDatasetMetadata",value:function(){return this.propertiesStore.getDatasetMetadata().schemas}},{key:"getDatasetMetadataFields",value:function(){return this.propertiesStore.getDatasetMetadata().fields}},{key:"getDatasetMetadataSchemas",value:function(){return this.propertiesStore.getDatasetMetadata().schemaNames}},{key:"getFilteredDatasetMetadata",value:function(e){var t=this.getDatasetMetadataFields();return e&&(t=this._filterSharedDataset(e,t),t=function(e,t,r,n){var o=n;if(t&&Array.isArray(t[e.name]))try{for(var i=t[e.name],a=0;a<i.length;a++)o=Ma(e,t[e.name][a].definition,r,o)}catch(t){g.warn("Error thrown in filter for propertyId ("+e.name+"): "+t)}return o}(e,this.filterDefinitions.controls,this,t)),t}},{key:"_filterSharedDataset",value:function(e,t){if(!this.sharedCtrlInfo||!e)return t;var r,n=e.name,o=[],i=Kc(this.sharedCtrlInfo);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Kc(s.controlNames);try{for(l.s();!(a=l.n()).done;){if(n===a.value.controlName){o=s.controlNames;break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var p=o.map((function(e){return e.controlName}));return this.filterFieldsFromSharedProps(t,p,n)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var n,o=[],i=Kc(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a!==r){var s=this.getControl({name:a}),l=this.getPropertyValue({name:a});if(Array.isArray(l)){var p,c=Kc(l);try{for(c.s();!(p=c.n()).done;){var u=p.value;if(Array.isArray(u)){var d=S(s);d>=0&&d<u.length&&o.push(y(u[d],s))}else o.push(y(u,s))}}catch(e){c.e(e)}finally{c.f()}}else o.push(y(l,s))}}}catch(e){i.e(e)}finally{i.f()}var h=Array.from(new Set(o));return e.filter((function(e){return-1===h.indexOf(e.name)}))}catch(e){g.warn("Error filtering shared controls "+e)}return e}},{key:"setDatasetMetadata",value:function(e){var t=[],r=[];if(e){var n=G(e);Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)n[o].name||(n[o].name=o.toString()),n[o].idx=o;var i,a=Kc(n);try{var s=function(){var e=i.value,t=n.filter((function(t){return t.name===e.name}));if(t&&t.length>1)for(var r=0;r<t.length;r++)t[r].name=t[r].name+"_"+t[r].idx};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var l,p=Kc(n);try{for(p.s();!(l=p.n()).done;){var c=l.value;if(t.push(c.name),c.fields){var u,d=Kc(c.fields);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.schema=c.name,h.origName=h.name,r.push(h)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){p.e(e)}finally{p.f()}}if(void 0===this.multipleSchemas&&(this.multipleSchemas=this._canHaveMultipleSchemas()),this.multipleSchemas){var f,m=Kc(r);try{for(m.s();!(f=m.n()).done;){var v=f.value;v.name=v.schema+"."+v.origName}}catch(e){m.e(e)}finally{m.f()}}this.propertiesStore.setDatasetMetadata({schemas:e,fields:r,schemaNames:t})}},{key:"validateInput",value:function(e){Ga(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){za(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"getSelectedRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getSelectedRows(t)}},{key:"updateSelectedRows",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateSelectedRows(r,t),this._notifySelectionListener(r,t)}},{key:"clearSelectedRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearSelectedRows(t)}},{key:"setDisableRowMoveButtons",value:function(e){Array.isArray(e)&&this.propertiesStore.setDisableRowMoveButtons(e)}},{key:"getDisableRowMoveButtons",value:function(){return this.propertiesStore.getDisableRowMoveButtons()}},{key:"isDisableRowMoveButtons",value:function(e){var t=this.getDisableRowMoveButtons();return!!Array.isArray(t)&&t.some((function(t){return O(t,e)}))}},{key:"addRowSelectionListener",value:function(e,t){var r=this.convertPropertyId(e),n=r.name;if(this.selectionListeners[n]||(this.selectionListeners[n]={}),Number.isInteger(r.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[n].listener=t}},{key:"removeRowSelectionListener",value:function(e){var t=this.convertPropertyId(e),r=t.name;if(Number.isInteger(t.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[r]&&delete this.selectionListeners[r]}},{key:"_notifySelectionListener",value:function(e,t){var r=this.convertPropertyId(e).name;this.selectionListeners[r]&&this.selectionListeners[r].listener(t)}},{key:"setExpressionInfo",value:function(e){this.expressionFunctionInfo=la(e)}},{key:"getExpressionInfo",value:function(){return this.expressionFunctionInfo}},{key:"getExpressionRecentlyUsed",value:function(){return this.expressionRecentlyUsed}},{key:"updateExpressionRecentlyUsed",value:function(e){var t=this.expressionRecentlyUsed.indexOf(e);-1===t?this.expressionRecentlyUsed.splice(0,0,e):(this.expressionRecentlyUsed.splice(t,1),this.expressionRecentlyUsed.unshift(e))}},{key:"clearExpressionRecentlyUsed",value:function(){this.expressionRecentlyUsed=[]}},{key:"getExpressionFieldsRecentlyUsed",value:function(){return this.expressionFieldsRecentlyUsed}},{key:"updateExpressionFieldsRecentlyUsed",value:function(e){var t=this.expressionFieldsRecentlyUsed.indexOf(e);-1===t?this.expressionFieldsRecentlyUsed.splice(0,0,e):(this.expressionFieldsRecentlyUsed.splice(t,1),this.expressionFieldsRecentlyUsed.unshift(e))}},{key:"clearExpressionFieldsRecentlyUsed",value:function(){this.expressionFieldsRecentlyUsed=[]}},{key:"getFilteredEnumItems",value:function(e,t){var r=this.propertiesStore.getFilteredEnumItems(e);if(Array.isArray(r)){for(var n={values:[],valueLabels:[]},o=function(e){n.values.push(r[e]);var o=r[e],i=t.values.findIndex((function(t){return t===r[e]}));i>-1&&(o=t.valueLabels[i]),n.valueLabels.push(o)},i=0;i<r.length;i++)o(i);return n}return t}},{key:"updatePropertyValue",value:function(e,t,r,n){var o=this.convertPropertyId(e),i=this.getPropertyValue(o);if(void 0===t?this.removePropertyValue(o):this.propertiesStore.updatePropertyValue(o,t),function(e,t){var r=!0;if(!t.getControl(e))return g.warn("Control not found for "+e.name),r;var n=t.getDefinitions(e,Et.ALLOWCHANGE,It.CONTROLS);if(n.length>0)try{var o,i=Ha(n);try{for(i.s();!(o=i.n()).done;)if(!(r=Ba(o.value.definition,e,t)))return r}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}return r}(e,this)){if(Wa(e,this),r||Ga(e,this,!0),this.handlers.propertyListener){var a=this._convertObjectStructure(o,t),s={action:Dt.UPDATE_PROPERTY,property:o,value:a,previousValue:i};void 0!==n&&(s.type=n),this.handlers.propertyListener(s)}}else this.propertiesStore.updatePropertyValue(o,i)}},{key:"getPropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),o=this.propertiesStore.getPropertyValue(n),i=r,a=t&&(t.filterHiddenDisabled||t.filterHidden),s=t&&(t.filterHiddenDisabled||t.filterDisabled),l=t&&t.filterHiddenControls;if(a||s||l){var p=this.getControlState(n),c=this.getControlType(n);if(p===ht.DISABLED&&s||p===ht.HIDDEN&&a||c===h.HIDDEN&&l)return i;if(i=D(o),Array.isArray(i))for(var u=0;u<i.length;u++){var d=i[u];if(Array.isArray(d))for(var f=0;f<d.length;f++){var m={name:n.name,row:u,col:f},v=this.getControlState(m),y=this.getControlType(m);(v===ht.DISABLED&&s||v===ht.HIDDEN&&a||y===h.HIDDEN&&l)&&(i[u][f]=null)}}return t&&!0===t.applyProperties?this._convertObjectStructure(n,i):i}return t&&!0===t.applyProperties?this._convertObjectStructure(n,o):o}},{key:"removePropertyValue",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.removePropertyValue(t)}},{key:"_convertObjectStructure",value:function(e,t){var r=this.getControl(e);if(F(r)){var n=r.structureType&&"object"===r.structureType;return U(r.valueDef.isList,r.subControls,t,n)}return t}},{key:"getPropertyValues",value:function(e){var t=this.propertiesStore.getPropertyValues(),r=t;if(e&&(e.filterHiddenDisabled||e.filterHidden||e.filterDisabled||e.filterHiddenControls||e.valueFilters)){var n={};for(var o in t)if(ee(t,o)){var i=this.getPropertyValue({name:o},e),a=Array.isArray(e.valueFilters)?e.valueFilters:[];void 0===i||a.includes(i)||(n[o]=i)}r=n}if(e&&!0===e.applyProperties)for(var s in r)if(ee(r,s)){var l=this.convertPropertyId(s),p=this.propertiesStore.getPropertyValue(l);r[s]=this._convertObjectStructure(l,p)}return r}},{key:"setPropertyValues",value:function(e,t){var r=this,n=G(e);if(e){var o=this.getControls();Object.keys(n).forEach((function(t){if(F(o[t])){var r=e[t],i=o[t],a=V(i.valueDef.isList,i.subControls,r);n[t]=a}})),te(this.getPropertiesConfig(),"convertValueDataTypes")&&(n=H(n,o))}if(this.propertiesStore.setPropertyValues(n),t){var i={};Z(n)||(Object.keys(n).forEach((function(e){!function(e,t,r){if(!t.getControl(e))return g.warn("Control not found for "+e.name),null;var n=t.getDefinitions(e,Et.CONDITIONALDEFAULT,It.CONTROLS);if(n.length>0)try{var o,i=Ha(n);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a.definition.default_value.parameter_ref;s in r||Ba(a.definition,e,t)&&(r[s]=a.definition.default_value.value)}}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}({name:e},r,i)})),Z(i)||Object.keys(i).forEach((function(e){if(!(e in n)){var t=r.getControl({name:e});F(t)&&(i[e]=V(t.valueDef.isList,t.subControls,i[e])),r.propertiesStore.updatePropertyValue({name:e},i[e])}})))}qa(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:Dt.SET_PROPERTIES})}},{key:"setControlStates",value:function(e){this.propertiesStore.setControlStates(e)}},{key:"updateControlState",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateControlState(r,t)}},{key:"getControlState",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.value:""}},{key:"getControlStates",value:function(){return this.propertiesStore.getControlStates()}},{key:"getControlValueStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.values:{}}},{key:"getControlEnumFilterStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.enumFilter:{}}},{key:"setPanelStates",value:function(e){this.propertiesStore.setPanelStates(e)}},{key:"updatePanelState",value:function(e,t){this.propertiesStore.updatePanelState(e,t)}},{key:"getPanelState",value:function(e){return this.propertiesStore.getPanelState(e)}},{key:"getPanelStates",value:function(){return this.propertiesStore.getPanelStates()}},{key:"clearActiveTearsheet",value:function(){this.propertiesStore.setActiveTearsheetId(null)}},{key:"setActiveTearsheet",value:function(e){this.propertiesStore.setActiveTearsheetId(e)}},{key:"getActiveTearsheet",value:function(){return this.propertiesStore.getActiveTearsheetId()||null}},{key:"setActionStates",value:function(e){this.propertiesStore.setActionStates(e)}},{key:"updateActionState",value:function(e,t){this.propertiesStore.updateActionState(e,t)}},{key:"getActionState",value:function(e){return this.propertiesStore.getActionState(e)}},{key:"getActionStates",value:function(){return this.propertiesStore.getActionStates()}},{key:"getAction",value:function(e){return this.actions[e.name]}},{key:"setErrorMessages",value:function(e){this.propertiesStore.setErrorMessages(e)}},{key:"getErrorMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.convertPropertyId(e);if(t){var i=this.getControlState(o),a=this.getControlType(o);if(i===ht.DISABLED||i===ht.HIDDEN||a===h.HIDDEN)return null}var s=this.propertiesStore.getErrorMessage(o,this.reactIntl);return r&&s&&s.type===dt.SUCCESS||n&&s&&!j(s.displayError)&&!s.displayError?null:s}},{key:"getErrorMessages",value:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.propertiesStore.getErrorMessages();return n&&(o=this._filterDisplayErrors(o)),(e||t)&&(o=this._filterMessages(o,e,t,r)),o}},{key:"getAllErrorMessages",value:function(){return this.getErrorMessages(!1,!1,!1,!1)}},{key:"getRequiredErrorMessages",value:function(){var e=this.propertiesStore.getErrorMessages(),t=this._filterNonRequiredErrors(e);return this._filterHiddenDisabledErrors(t)}},{key:"_filterMessages",value:function(e,t,r,n){var o={},i=[];for(var a in e)if(ee(e,a)){var s=this.getErrorMessage({name:a},r,n);s&&s.text&&(t?i.push({id_ref:a,validation_id:s.validation_id,type:s.type,text:s.text}):o[a]=s)}return t?i:o}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,(function(e){return j(e.displayError)||e.displayError}))}},{key:"_filterNonRequiredErrors",value:function(e){return this._filterErrors(e,(function(e){return!0===e.required}))}},{key:"_filterHiddenDisabledErrors",value:function(e){var t=this;return this._filterErrors(e,(function(e,r){var n=t.getControlState(r),o=t.getControlType(r);return n!==ht.HIDDEN&&n!==ht.DISABLED&&o!==h.HIDDEN}))}},{key:"_filterErrors",value:function(e,t){var r={};return Object.keys(e).forEach((function(n){var o=e[n];if(o.text&&t(o,o.propertyId))r[n]=o;else for(var i in o)if(ee(o,i)){var a=o[i];if(a&&a.text&&t(a,a.propertyId))void 0===r[n]&&(r[n]={}),r[n][i]=a;else for(var s in a)if(ee(a,s)){var l=a[s];l&&l.text&&t(l,l.propertyId)&&(void 0===r[n]&&(r[n]={}),void 0===r[n][i]&&(r[n][i]={}),r[n][i][s]=l)}}})),r}},{key:"updateErrorMessage",value:function(e,t){var r=this.convertPropertyId(e);t&&"info"!==t.type?this.propertiesStore.updateErrorMessage(r,t):this.propertiesStore.clearErrorMessage(r)}},{key:"removeErrorMessageRow",value:function(e){var t=this.convertPropertyId(e),r=this.propertiesStore.getErrorMessages(),n=r[t.name];if(void 0!==n){for(var o=0,i=Object.keys(n);o<i.length;o++){var a=i[o],s=parseInt(a,10);s===t.row?delete r[t.name][s]:s>t.row&&(r=this._moveMessageRows(r,t.name,s,s-1))}this.setErrorMessages(r)}}},{key:"moveErrorMessageRows",value:function(e,t,r){var n=this.propertiesStore.getErrorMessages(),o=n[e];if(void 0!==o){var i=o[t],a=o[r];if(void 0!==i&&void 0!==a){(n=this._moveMessageRows(n,e,t,r))[e][t]={};for(var s=0,l=Object.keys(a);s<l.length;s++){var p=l[s];n[e][t][p]=a[p]}}else void 0!==i?n=this._moveMessageRows(n,e,t,r):void 0!==a&&(n=this._moveMessageRows(n,e,r,t));this.setErrorMessages(n)}}},{key:"_moveMessageRows",value:function(e,t,r,n){return e[t][n]=e[t][r],delete e[t][r],e}},{key:"saveControls",value:function(e){var t=this;e.forEach((function(e){void 0===e.columnIndex?(!ee(t.controls,e.name)||ee(t.controls,e.name)&&e.controlType!==h.CUSTOM)&&(t.controls[e.name]=e):t.controls[e.parameterName][e.columnIndex]=e}))}},{key:"getControl",value:function(e){var t=this.controls[e.name];if(void 0!==e.col&&t){var r=this.controls[e.name][e.col.toString()];if(r)return r}return t}},{key:"getControlPropType",value:function(e){var t=this.getControl(e);return void 0!==t.valueDef?t.valueDef.propType:null}},{key:"updateControlEnumValues",value:function(e,t){var r=this.getControl(e);Array.isArray(t)&&r?(r.values=t.map((function(e){return e.value})),r.valueLabels=t.map((function(e){return e.label?e.label:e.value}))):g.warn("properties-controller",new Error("updateControlEnumValues - control not found or valuesObj not valid"))}},{key:"getControls",value:function(){return this.controls}},{key:"setSaveButtonDisable",value:function(e){this.propertiesStore.setSaveButtonDisable(e)}},{key:"getSaveButtonDisable",value:function(){return this.propertiesStore.getSaveButtonDisable()}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.propertiesStore.setWideFlyoutPrimaryButtonDisabled(e,t)}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){return this.propertiesStore.getWideFlyoutPrimaryButtonDisabled(e)}},{key:"isRequired",value:function(e){var t=this.getControl(e);if(t){var r=t.required;return r||!1}return!1}},{key:"isSummary",value:function(e){var t=this.getControl(e);if(t){var r=t.summary;return r||!1}return!1}},{key:"getControlType",value:function(e){if(void 0===e)return null;var t=this.getControl(e);return t?t.controlType:null}},{key:"getColumnVisibility",value:function(e,t){return this.controls[e.name][t].visible}},{key:"toggleColumnVisibility",value:function(e,t,r){this.controls[e.name][t].visible=r}},{key:"_parseSummaryControls",value:function(e){var t={};e.forEach((function(e){e.summaryPanelId&&(void 0===t[e.summaryPanelId]&&(t[e.summaryPanelId]=[]),void 0===e.columnIndex&&t[e.summaryPanelId].push(e.name))})),this.setSummaryPanelControls(t)}},{key:"setSummaryPanelControls",value:function(e){this.summaryPanelControls=e}},{key:"getSummaryPanelControls",value:function(e){return this.summaryPanelControls[e]}},{key:"updateCustPropSumPanelValue",value:function(e,t){void 0!==e.name&&(this.custPropSumPanelValues[e.name]=t)}},{key:"getCustPropSumPanelValue",value:function(e){var t=this.getControlState(e);return t===ht.DISABLED||t===ht.HIDDEN?null:this.custPropSumPanelValues[e.name]}},{key:"setControlInSummary",value:function(e,t,r){var n=this.getControl(e);n&&(n.summary=!0,n.summaryLabel=t)}},{key:"createControl",value:function(e,t,r){var n=te(this.getPropertiesConfig(),"containerType"),o=this.controlFactory.createFormControl(t,r,this.getLight(),n),i=[];return oa(i,o,this.getControl(e).parentCategoryId),this.saveControls(i),this.controlFactory.createControlItem(o,e)}},{key:"getControlFactory",value:function(){return this.controlFactory}},{key:"setCustomControls",value:function(e){this.customControls=e}},{key:"getCustomControl",value:function(e,t,r){if(t.customControlId){var n,o=Kc(this.customControls);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.id()===t.customControlId)try{return new i(e,this,t.data,r).renderControl()}catch(e){return g.warn("Error thrown creating custom control: "+e),""}}}catch(e){o.e(e)}finally{o.f()}}return"Custom control not found: "+t.customControlId}},{key:"getMaxLengthForMultiLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForMultiLineControls?this.getPropertiesConfig().maxLengthForMultiLineControls:1024}},{key:"getMaxLengthForSingleLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForSingleLineControls?this.getPropertiesConfig().maxLengthForSingleLineControls:128}},{key:"setInitialAddRemoveRows",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t];if(r.valueDef&&r.valueDef.propType===m.STRUCTURE&&!j(r.addRemoveRows)){var n={name:r.name};e.setAddRemoveRows(n,r.addRemoveRows)}}))}},{key:"setAddRemoveRows",value:function(e,t){this.propertiesStore.setAddRemoveRows(e,t)}},{key:"getAddRemoveRows",value:function(e){return this.propertiesStore.getAddRemoveRows(e)}},{key:"setHideEditButton",value:function(e,t){this.propertiesStore.setHideEditButton(e,t)}},{key:"getHideEditButton",value:function(e){return this.propertiesStore.getHideEditButton(e)}},{key:"getStaticRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getStaticRows(t)}},{key:"updateStaticRows",value:function(e,t){var r=this.convertPropertyId(e),n=this.getPropertyValue(e),o=t.sort();this.validateSelectionValues(o,n)&&this.propertiesStore.updateStaticRows(r,o)}},{key:"clearStaticRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearStaticRows(t)}},{key:"setInitialTableButtonState",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t],n={name:r.name};j(r.buttons)||r.buttons.forEach((function(t){e.setTableButtonEnabled(n,t.id,t.enabled||!1)})),r.subControls&&e.setInitialTableButtonSubControlState(n,r.subControls)}))}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach((function(t){var n=r.getPropertyValue(e);j(t.buttons)||n.forEach((function(n,o){var i={name:e.name,row:o,col:t.columnIndex};t.buttons.forEach((function(e){r.setTableButtonEnabled(i,e.id,e.enabled||!1)}))}))}))}},{key:"setTableButtonEnabled",value:function(e,t,r){this.propertiesStore.setTableButtonEnabled(e,t,r)}},{key:"getTableButtons",value:function(e){return this.propertiesStore.getTableButtons(e)}},{key:"getTableButtonEnabled",value:function(e,t){return this.propertiesStore.getTableButtonEnabled(e,t)}},{key:"validateSelectionValues",value:function(e,t){var r=!1;e&&t.length>0?r=!(!e.slice(1).map((function(t,r){return t-e[r]})).every((function(e){return 1===e}))||!(e.includes(0)&&!e.includes(t.length-1)||!e.includes(0)&&e.includes(t.length-1))):r=!1;return r}}]),r}(),Qc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json",title:"Property Definitions Schema",description:"Watson Data Platform Property Definition Schema for the Common Properties editor",type:"object",properties:{titleDefinition:{type:"object",properties:{title:{type:"string"},editable:{description:"True if the title can be edited. False if the title should be readonly.",default:!0,type:"boolean"}}},current_parameters:{description:"Current parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},current_ui_parameters:{description:"Current UI only parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},parameters:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/parameters"},complex_types:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/complex_types"},uihints:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#"},conditions:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#/properties/conditions"},dataset_metadata:{oneOf:[{description:"A single datarecord object. Deprecated.",$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"},{description:"An array of datarecord objects",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"}}]},resources:{description:"Map of string resources.",type:"object",properties:{},additionalProperties:!0}}},Zc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",description:"WDP UI Hints schema",title:"WDP UI Hints schema",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"]},label:{description:"External name of operator",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Description of operator",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to operation icon",type:"string"},group_info:{type:"array",items:{$ref:"#/definitions/group_definition"}},editor_size:{description:"Editor size for node edits",enum:["small","medium","large"]},pixel_width:{description:"Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed.",type:"object",properties:{min:{description:"Minimum size in pixels for the right side editor flyout",type:"number"},max:{description:"Maximum size in pixels for the right side editor flyout",type:"number"}}},parameter_info:{items:{$ref:"#/definitions/parameter_definition"},type:"array"},complex_type_info:{items:{$ref:"#/definitions/complex_type_definition"},type:"array"},ui_parameters:{description:"List of UI only parameters",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/definitions/parameter_definition"}},action_info:{items:{$ref:"#/definitions/action_definition"},type:"array"},help:{description:"Help information",type:"object",properties:{data:{description:"Data passed in the helpClickHandler.",type:"object",additionalProperties:!0}},additionalProperties:!0}},required:["id"],definitions:{group_definition:{description:"Grouping for parameters and groups",type:"object",properties:{id:{description:"Identifier for this group",type:"string"},type:{description:"The group type to be displayed",type:"string",enum:["controls","tabs","subTabs","panels","columnSelection","columnSelectionRecursive","panelSelector","customPanel","summaryPanel","actionPanel","textPanel","twistyPanel","tearsheetPanel","columnPanel"]},depends_on_ref:{description:"Parameter name this group depends upon. Valid for panelSelector groups only.",type:"string"},insert_panels:{description:"Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter.",type:"boolean"},nested_panel:{description:"Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false.",type:"boolean"},open:{description:"Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false.",type:"boolean"},label:{description:"Group label",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Group description. Used in a textPanel and tearsheetPanel",type:"object",$ref:"#/definitions/resource_definition"},parameter_refs:{description:"List of parameters to be displayed",type:"array",items:{type:"string"}},action_refs:{description:"List of actions to be displayed. Used with an actionPanel",type:"array",items:{type:"string"}},data:{description:"Data passed to custom panel when group type is 'customPanel'",additionalProperties:!0,oneOf:[{type:"object"},{type:"array"}]},group_info:{items:{$ref:"#/definitions/group_definition"},type:"array"},class_name:{description:"Optional class name to set for this group",type:"string"}},required:["id"]},parameter_definition:{description:"Operator parameters hints",type:"object",properties:{parameter_ref:{description:"Parameter reference to base operator parameter definition",type:"string"},label:{description:"External name for parameter",type:"object",$ref:"#/definitions/resource_definition"},label_visible:{description:"Whether to display the label or not. If not displayed, the label can still be used by screen readers",type:"boolean",default:!0},description:{description:"Description of parameter with optional placement context and optional link",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{placement:{description:"Optional placement context for the text",enum:["as_tooltip","on_panel"],default:"as_tooltip"},link:{description:"Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints.",type:"object",properties:{id:{description:"link id",type:"string"},data:{description:"Data passed to the tooltipLinkHandler callback",type:"object",additionalProperties:!0}},required:["id"]}}}]},control:{description:"Which control to use. In most cases the control gets to be determined and should not be set",type:"string",enum:["readonly","readonlyTable","textfield","passwordfield","textarea","expression","numberfield","spinner","checkbox","radioset","checkboxset","toggletext","toggle","oneofselect","multiselect","someofselect","selectcolumn","selectcolumns","selectschema","structuretable","structurelisteditor","structureeditor","custom","datefield","datepicker","datepickerRange","timefield","timestampfield","code","list","hidden"]},increment:{description:"Determines the increment/decrement value for the spinner control only",type:"number",default:1},orientation:{description:"Determines how the control is displayed",type:"string",enum:["vertical","horizontal"]},width:{description:"Percentage of group width the control should use",type:"number"},char_limit:{description:"Limits the number of characters a user can enter into the control for string parameters only",type:"number"},display_chars:{description:"This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit.",type:"number",default:64},separator:{description:"Determines where to put a separator relative to the current control",type:"string",enum:["before","after"]},visible:{description:"Determines whether to display parameter in control. Used in complex structures",type:"boolean"},place_holder_text:{description:"Text hint for the user displayed input controls",type:"object",$ref:"#/definitions/resource_definition"},text_before:{description:"Static text to be displayed before the control",type:"object",$ref:"#/definitions/text_definition"},text_after:{description:"Static text to be displayed after the control",type:"object",$ref:"#/definitions/text_definition"},resource_key:{description:"Used as a key for enum value labels",type:"string"},edit_style:{description:"Editing style of elements in a table",type:"string",enum:["subpanel","inline","on_panel"]},value_icons:{description:"For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute.",type:"array",items:{type:"string"}},sortable:{description:"Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only.",type:"boolean"},filterable:{description:"Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only.",type:"boolean"},resizable:{description:"Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only.",type:"boolean",default:!1},language:{description:"The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type.",type:"string",enum:["CLEM","javascript","text/x-hive","text/x-rsrc","text/x-python","text/x-sql"]},summary:{description:"Determines if this column values will be shown in the summaryPanel",type:"boolean"},generated_values:{description:"Generates values for a column in a 'readonly' parameter.",type:"object",properties:{operation:{description:"Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value.",type:"string",enum:["index"]},start_value:{description:"Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1.",type:"integer"}},required:["operation"]},number_generator:{description:"Adds a number generation button beside the numeric control",type:"object",properties:{label:{description:"Number generator button label. It is visible on hover.",type:"object",$ref:"#/definitions/resource_definition"},range:{description:"Number generator range",type:"object",properties:{min:{description:"Maximum value for generated numbers",type:"number"}},required:["min","max"]}},required:["label"]},dm_default:{description:"Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema.",type:"string",enum:["type","description","measure","modeling_role"]},dm_icon:{description:"This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table.",type:"string",enum:["measure","none"]},custom_control_id:{description:"Used to determine which custom control to use when control=custom.",type:"string"},data:{description:"Data passed to custom control when control=custom",type:"object",additionalProperties:!0},date_format:{description:"A format string such as YYYY-MM-DD which describes the display and entry format for a date field.",type:"string"},time_format:{description:"A format string such as HH:mm:ss which describes the display and entry format for a time field.",type:"string"},moveable_rows:{description:"Determines if rows can be moved up or down in a table or array of strings",type:"boolean"},rows:{description:"Number of rows to display in tables",type:"integer",default:4},action_ref:{description:"Determines an action should be added to the control",type:"string"},custom_value_allowed:{description:"Determines if a dropdown, outside of a table, can allow a custom value to be entered",type:"boolean"},class_name:{description:"Optional class name to set for this control",type:"string"},enable_maximize:{description:"Determines if maximize/minimze buttons are shown for code control",type:"boolean"}},required:["parameter_ref"]},complex_type_definition:{type:"object",description:"Complex parameters",properties:{complex_type_ref:{type:"string",description:"Name of complex type, can be referenced in other places."},label:{description:"External name used in subpanels",type:"object",$ref:"#/definitions/resource_definition"},key_definition:{$ref:"#/definitions/parameter_definition"},layout:{description:"Array of rows containing structure element names",type:"array",items:{description:"A single row of structure parameter names for laying out horizontally",type:"array",items:{description:"A parameter name within the current structure",type:"string"}}},parameters:{type:"array",description:"List of parameters",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}},add_remove_rows:{description:"Determines if the table can have rows added and removed",type:"boolean",default:!0},row_selection:{description:"Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows.",type:"string",enum:["single","multiple","multiple-edit"]},header:{description:"Determines if the table header should be displayed",type:"boolean",default:!0},include_all_fields:{description:"Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model.",type:"boolean",default:!0},buttons:{description:"Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons.",type:"array",items:{$ref:"#/definitions/button_definition"}}},required:["complex_type_ref","parameters"]},action_definition:{description:"Actions that callback to application",type:"object",properties:{id:{description:"Identifier for this action",type:"string"},description:{description:"Description of action. Use for tooltip.",type:"object",$ref:"#/definitions/resource_definition"},control:{description:"The action type to be displayed",type:"string",enum:["button","image"]},class_name:{description:"Optional class name to set for this action",type:"string"},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},button:{description:"Properties for button kind and size. Use when control=button.",type:"object",properties:{kind:{description:"button kind",type:"string",enum:["primary","secondary","tertiary","ghost","danger","danger--tertiary","danger--ghost"],default:"tertiary"},size:{description:"button size",enum:["sm","md","lg","xl"],default:"sm"}}},image:{description:"Properties for how the image will look. Use when control=image.",type:"object",properties:{url:{description:"image url to be used for action",type:"string"},placement:{description:"placement of the action image",enum:["right","left"]},size:{description:"pixel size of the image.",type:"object",properties:{height:{description:"image height in pixels",type:"number"},width:{description:"image width in pixels",type:"number"}}},tooltip_direction:{description:"Action image tooltip direction.",enum:["right","left","top","bottom"],default:"bottom"}}},data:{description:"Data returned when action called",type:"object",additionalProperties:!0}},required:["id"]},resource_definition:{description:"Localizable string resource",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},text_definition:{description:"Static text to be displayed before or after the control",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{type:{description:"Type of text message to display",enum:["info"]}}}]},button_definition:{description:"Button to be displayed after the table's search bar",type:"object",properties:{id:{description:"Button identifier used to idenify the button in the callback function",type:"string"},label:{description:"Button label to display. If an icon is specified as well, the icon will be shown to the right of the label.",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Tooltip text to display when the button is hovered",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to .svg image to display",type:"string"},carbon_icon:{description:"Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library",type:"string"},enabled:{description:"Button will be enabled if true, disabled if false",type:"boolean",default:!1},divider:{description:"Display a divider before or after this button",type:"string",enum:["before","after"],default:"after"}},anyOf:[{required:["id","label"]},{required:["id","icon","description"]},{required:["id","carbon_icon","description"]}]}}},eu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",title:"Watson Data Platform Validation Schema",description:"User Interface Condition schema for the Watson Data Platform",type:"object",properties:{json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json"]},conditions:{type:"array",items:{$ref:"#/definitions/conditions_definition"}}},required:["conditions"],definitions:{conditions_definition:{type:"object",oneOf:[{$ref:"#/definitions/validation_definition"},{$ref:"#/definitions/enabled_definition"},{$ref:"#/definitions/visible_definition"},{$ref:"#/definitions/filter_definition"},{$ref:"#/definitions/enum_filter_definition"},{$ref:"#/definitions/allow_change_definition"},{$ref:"#/definitions/default_value_definition"}]},validation_definition:{properties:{validation:{description:"A single validation. The fail_message is displayed upon validation failure.",type:"object",properties:{id:{description:"Unique identifier. Required when multiple fail_message sections have the same focus_parameter_ref value.",type:"string"},fail_message:{description:"Error/warning",type:"object",$ref:"#/definitions/fail_message_definition"},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["fail_message","evaluate"]}},required:["validation"]},enabled_definition:{properties:{enabled:{description:"Enablement test. Disables controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["enabled"]},visible_definition:{properties:{visible:{description:"Visibility test. Hides controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["visible"]},evaluate_definition:{oneOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]},or_definition:{description:"Container for 'or' operations",type:"object",properties:{or:{description:"The 'or' condition. Any sub-condition evaluates to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["or"]},and_definition:{description:"Container for 'and' operations",type:"object",properties:{and:{description:"The 'and' condition. All sub-conditions evaluate to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["and"]},condition_definition:{description:"A parameter condition. Evaluates to true or false.",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",properties:{op:{description:"A single operator for the properties of the condition.",anyOf:[{enum:["isEmpty","isNotEmpty","greaterThan","lessThan","equals","notEquals","contains","notContains","colNotExists","cellNotEmpty","colDoesExist","isDateTime","dmTypeEquals","dmTypeNotEquals","dmMeasurementEquals","dmMeasurementNotEquals","dmRoleEquals","dmRoleNotEquals","matches","notMatches"]},{description:"The name of the custom operator",type:"string"}]},parameter_ref:{description:"The primary parameter - must be present",type:"string"},parameter_2_ref:{description:"Optional second parameter for multi-parameter validation",type:"string"},value:{description:"Optional value against which to compare the primary parameter value",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"null"}]}},required:["op","parameter_ref"]}},required:["condition"]},fail_message_definition:{properties:{focus_parameter_ref:{description:"The parameter control to get the error/warning message.",type:"string"},message:{description:"User message",type:"object",$ref:"#/definitions/message_definition"},type:{enum:["error","warning","info"]}},required:["focus_parameter_ref","message"]},message_definition:{description:"User message",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},filter_definition:{properties:{filter:{description:"Filter test. Includes support for filtering the values to be displayed in a control",type:"object",properties:{parameter_ref:{description:"Parameter affected by this operation",type:"string"},parameter_refs:{description:"Parameters affected by this operation - exclusive with parameter_ref",type:"array",items:{type:"string"}},evaluate:{description:"Evaluates to return values included in a control",type:"object",$ref:"#/definitions/evaluate_definition"}},oneOf:[{required:["evaluate","parameter_ref"]},{required:["evaluate","parameter_refs"]}]}},required:["filter"]},enum_filter_definition:{properties:{enum_filter:{description:"Allows filtering of available enumeration options",type:"object",properties:{target:{description:"The target parameter information",type:"object",properties:{parameter_ref:{description:"The enumeration parameter affected by this operation",type:"string"},values:{description:"Array of available enumeration options when the condition evaluates to 'true'",type:"array",minItems:1,uniqueItems:!0}},required:["parameter_ref","values"]},evaluate:{description:"Evaluates to return values included in an enumeration control",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["target","evaluate"]}},required:["enum_filter"]},filter_condition_definition:{description:"Allows for filtering available fields in the data record schema(s)",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",anyOf:[{properties:{op:{$ref:"#/definitions/filter_op_definition"},value:{description:"Value to compare against data record schema field attribute",type:"string"}},required:["op"]},{properties:{op:{$ref:"#/definitions/filter_op_definition"},values:{description:"Array of values which are compared to a data record schema field attribute",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0}},required:["op","values"]}]}},required:["condition"]},filter_op_definition:{description:"A single operator for comparing data record schema field attributes and sharing source fields",enum:["dmMeasurement","dmType","dmModelingRole","dmSharedFields"]},allow_change_definition:{properties:{allow_change:{description:"Allow change test. Allows a field value to be changed if evaluates to true.",type:"object",properties:{parameter_refs:{description:"Array of parameter names who values changes are allowed by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_refs","evaluate"]}},required:["allow_change"]},default_value_definition:{properties:{default_value:{description:"Set default value of the parameter_ref if condition evaluates to true.",type:"object",properties:{parameter_ref:{description:"Parameter whose default value is to be set.",type:"string"},value:{description:"This will be the default value of parameter_ref if condition evaluates to true.",type:["number","string","boolean","object","array"]},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_ref","value","evaluate"]}},required:["default_value"]}}},tu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",title:"Watson Data Platform Operator Schema",description:"Operator schema for the Watson Data Platform",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json"]},operator_type:{description:"operator type",enum:["model","transformer","estimator","dataReader","dataWriter"]},input_ports:{description:"List of input ports. If no ports are defined this is a source operator that accepts no data inputs. If the input_ports array is missing a single input port with id 'input_port' is assumed which accepts only a single connection.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},output_ports:{description:"List of output ports. If no ports are defined this is a terminal operator that provides no data outputs. If the output_ports array is missing a single output port named 'output_port' is assumed which accepts multiple connections.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","operator_type","parameters"],definitions:{parameter_definition:{description:"Operator parameters definition",type:"object",properties:{id:{description:"A unique name for the parameter.",type:"string"},required:{description:"Indication whether parameter is required or optional",type:"boolean",default:!1},role:{description:"Role of parameter",enum:["column","new_column","expression"]},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types)",type:"string"},enum:{description:"List of valid values. Can be used instead of specifying type.",type:"array"},default:{description:"default value based on type of parameter",anyOf:[{$ref:"#/definitions/parameter_ref_definition"},{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{type:"null"}]}]}},anyOf:[{required:["id","type"]},{required:["id","enum"]},{required:["id","type","enum"]}]},parameter_ref_definition:{description:"Structure for parameter refs",type:"object",properties:{parameter_ref:{description:"Reference to another parameter.",type:"string"}},required:["parameter_ref"]},complex_type_definition:{description:"Structure for complex parameters",type:"object",properties:{id:{description:"Identifier of complex type, can be referenced in other places.",type:"string"},type:{description:"Used to determine how parameters in the complex_type stored. Valid values are array and object.",type:"string"},key_definition:{$ref:"#/definitions/parameter_definition"},parameters:{description:"List of parameters",type:"array",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}}},required:["id","parameters"]},port_definition:{description:"Operator ports support multiple differentiated connections for either inputs or outputs.",type:"object",properties:{id:{description:"Unique identifier within the node",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}}}},app_data_def:{description:"Object containing application-specific data",type:"object",properties:{},additionalProperties:!0}}};function ru(e){var t=function(){var e=new br,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Qc,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(Zc,r+"operators/uihints-v3-schema.json"),e.addSchema(eu,r+"operators/conditions-v3-schema.json"),e.addSchema(tu,r+"operators/operator-v3-schema.json"),e.addSchema(Re,r+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}();!function(e,t,r,n){var o=n.validate(e,t,{nestedErrors:!0});o&&o.errors&&o.errors.length>0&&console.error(o)}(e,Qc,0,t)}function nu(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ou=function(o){n(p,l);var i=nu(p);function p(t){var r;return e(this,p),(r=i.call(this,t)).state={focused:!1,titleValidation:null},r.editTitleClickHandler=r.editTitleClickHandler.bind(a(r)),r.helpClickHandler=r.helpClickHandler.bind(a(r)),r.id=z(),r.textInputRef=s.createRef(),r.labelText=u(t.controller.getReactIntl(),st.TITLE_EDITOR_LABEL),r.textInputOnFocus=r.textInputOnFocus.bind(a(r)),r.textInputOnBlur=r.textInputOnBlur.bind(a(r)),r.headingEnabled=r.props.showHeading&&(r.props.heading||r.props.icon),r.handleTitleChange=r.handleTitleChange.bind(a(r)),r.titleChangeHandler=r.props.controller.getHandlers().titleChangeHandler,r}return t(p,[{key:"_handleKeyPress",value:function(e){"Enter"===e.key&&this.textInputRef.current.blur()}},{key:"editTitleClickHandler",value:function(){this.textInputRef.current.focus()}},{key:"helpClickHandler",value:function(){this.props.helpClickHandler&&this.props.helpClickHandler(this.props.controller.getForm().componentId,this.props.help.data,this.props.controller.getAppData())}},{key:"textInputOnFocus",value:function(){this.setState({focused:!0})}},{key:"textInputOnBlur",value:function(){this.setState({focused:!1})}},{key:"handleTitleChange",value:function(e){var t=this;null!==this.state.titleValidation&&this.setState({titleValidation:null});var n=e.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(n,(function(e){e&&"object"===r(e)&&e.type&&e.message?t.setState({titleValidation:e}):t.setState({titleValidation:null})})),this.props.setTitle(n)}},{key:"render",value:function(){var e=this;if(null===this.props.title)return null;var t=u(this.props.controller.getReactIntl(),st.TITLE_EDITOR_LABEL),r=u(this.props.controller.getReactIntl(),st.TITLE_EDITOR_HELPBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),st.PROPERTIESEDIT_CLOSEBUTTON_LABEL),o=[dt.ERROR,dt.WARNING],i=te(this.state.titleValidation,"type",null)===dt.WARNING,a=te(this.state.titleValidation,"type",null)===dt.ERROR,l=!1===this.props.labelEditable||this.state.focused?s.createElement("div",null):s.createElement(Ne,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:Gt,size:"small",iconDescription:t,hasIconOnly:!0}),p=this.props.help?s.createElement(Ne,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:er,size:"small",iconDescription:r,hasIconOnly:!0}):null,c=this.props.closeHandler?s.createElement("div",{className:"properties-close-button"},s.createElement(Ne,{kind:"ghost",size:"small","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:tr,iconDescription:n,hasIconOnly:!0})):null,d=null;if(this.headingEnabled){var h=this.props.heading?s.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,f=this.props.icon&&"string"==typeof this.props.icon?s.createElement(fr,{className:"properties-title-heading-icon",src:this.props.icon}):null;(h||f)&&(d=s.createElement("div",{className:"properties-title-heading"},f,h,p))}return s.createElement("div",{className:at("properties-title-editor",{"properties-title-with-heading":this.headingEnabled},{"properties-title-right-flyout-tabs-view":this.props.rightFlyoutTabsView})},c,d,s.createElement("div",{className:at("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!o.includes(te(this.state.titleValidation,"type")),"properties-title-editor-with-warning":i,"properties-title-editor-with-error":a})},s.createElement(Ue,ar({id:this.id,ref:this.textInputRef,value:this.props.title,onChange:this.handleTitleChange,onKeyPress:function(t){return e._handleKeyPress(t)},readOnly:!1===this.props.labelEditable,labelText:this.labelText,hideLabel:!0,size:"sm",onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,light:this.props.controller.getLight(),invalid:a,invalidText:te(this.state.titleValidation,"message"),warn:i,warnText:te(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),o.includes(te(this.state.titleValidation,"type"))?null:l),this.headingEnabled||o.includes(te(this.state.titleValidation,"type"))?null:p)}}]),p}(),iu=Vt((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e(bn(t))}}}))(ou),au='/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n:export {\n flyoutWidthSmall: 320px;\n flyoutWidthMedium: 480px;\n flyoutWidthLarge: 640px;\n flyoutWidthMax: 900px;\n}';function su(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var lu=parseInt(au.flyoutWidthSmall,10),pu=parseInt(au.flyoutWidthMedium,10),cu=parseInt(au.flyoutWidthLarge,10),uu=parseInt(au.flyoutWidthMax,10),du=function(r){n(i,r);var o=su(i);function i(t){var r;e(this,i),(r=o.call(this,t)).propertiesController=new Jc,r.propertiesController.setPropertiesConfig(r.props.propertiesConfig),r.props.propertiesInfo.initialEditorSize&&r.propertiesController.setEditorSize(r.props.propertiesInfo.initialEditorSize),r.propertiesController.setCustomControls(t.customControls),r.propertiesController.setConditionOps(t.customConditionOps),r.propertiesController.setLight(t.light),r.propertiesController.setAppData(t.propertiesInfo.appData),r.propertiesController.setExpressionInfo(t.propertiesInfo.expressionInfo),r.propertiesController.setHandlers({controllerHandler:t.callbacks.controllerHandler,propertyListener:t.callbacks.propertyListener,actionHandler:t.callbacks.actionHandler,buttonHandler:t.callbacks.buttonHandler,buttonIconHandler:t.callbacks.buttonIconHandler,validationHandler:t.callbacks.validationHandler,titleChangeHandler:t.callbacks.titleChangeHandler,tooltipLinkHandler:t.callbacks.tooltipLinkHandler}),r.setForm(t.propertiesInfo),r.previousErrorMessages={},r.propertiesController.validatePropertiesValues(!1),t.propertiesInfo.messages&&(r.propertiesController.validatePropertiesValues(!0),r.previousErrorMessages=r.propertiesController.getAllErrorMessages()),r.props.callbacks.propertyListener&&r.props.callbacks.propertyListener({action:Dt.PROPERTIES_LOADED}),r.currentParameters=r.propertiesController.getPropertyValues();var n=r.getEditorSize();return r.state={showPropertiesButtons:!0,editorSize:n},r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r.showPropertiesButtons=r.showPropertiesButtons.bind(a(r)),r.updateEditorSize=r.updateEditorSize.bind(a(r)),r.cancelHandler=r.cancelHandler.bind(a(r)),r._getOverrideSize=r._getOverrideSize.bind(a(r)),r._getResizeButton=r._getResizeButton.bind(a(r)),r._isResizeButtonRequired=r._isResizeButtonRequired.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.props.callbacks.setPropertiesHasMounted()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.propertiesInfo&&(!O(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.formData&&!O(e.propertiesInfo.formData,this.props.propertiesInfo.formData)||e.propertiesInfo.parameterDef&&!O(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!O(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){this.setForm(e.propertiesInfo);var t=this.propertiesController.getForm().editorSize;this.state.editorSize!==t&&this.setState({editorSize:t}),this.currentParameters=this.propertiesController.getPropertyValues(),this.propertiesController.setAppData(e.propertiesInfo.appData),this.propertiesController.setCustomControls(e.customControls),this.propertiesController.setConditionOps(e.customConditionOps),this.previousErrorMessages={},e.propertiesInfo.messages&&(this.propertiesController.validatePropertiesValues(),this.previousErrorMessages=this.propertiesController.getAllErrorMessages())}e.propertiesConfig&&!O(e.propertiesConfig,this.propertiesController.getPropertiesConfig())&&this.propertiesController.setPropertiesConfig(e.propertiesConfig)}},{key:"onBlur",value:function(e){!this.props.propertiesConfig.applyOnBlur||!this.commonProperties||this.commonProperties.contains(e.relatedTarget)||this.propertiesController.isSummaryPanelShowing()||this.propertiesController.isSubPanelsShowing()||this.applyPropertiesEditing(!1)}},{key:"setForm",value:function(e){var t=null;e.formData&&0!==Object.keys(e.formData).length?t=e.formData:e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&ru(e.parameterDef),t=Ci.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),t&&t.data&&t.data.inputDataModel&&!t.data.datasetMetadata&&(t.data.datasetMetadata=q(t.data.inputDataModel)),this.propertiesController.setForm(t,this.props.intl),t&&(this.originalTitle=t.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=G(e.messages)),this.initialValueInfo.undoInfo.properties=this.propertiesController.getPropertyValues(),this.initialValueInfo.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.initialValueInfo.additionalInfo.title=this.propertiesController.getTitle()}},{key:"getApplyButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.primary?this.props.propertiesConfig.buttonLabels.primary:u(this.props.intl,st.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:u(this.props.intl,st.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return u(this.props.intl,st.PROPERTIES_ACTION_LABEL,{node_label:this.propertiesController.getTitle()})}},{key:"getEditorSize",value:function(){var e=this.propertiesController.getForm().editorSize,t=this.props.propertiesInfo.initialEditorSize;return(e!==p.SMALL||t!==p.LARGE&&t!==p.MAX)&&(e!==p.MEDIUM||t!==p.SMALL&&t!==p.MAX)&&(e!==p.LARGE||t!==p.SMALL&&t!==p.MEDIUM)?e===p.MAX?e:t||e:e}},{key:"_getOverrideSize",value:function(){var e=this.propertiesController.getForm().pixelWidth,t=this.propertiesController.getForm().editorSize,r=null;return e&&(t===p.SMALL?this.state.editorSize===p.SMALL&&e.min?r=e.min:this.state.editorSize===p.MEDIUM&&e.max&&(r=e.max):t===p.MEDIUM?this.state.editorSize===p.MEDIUM&&e.min?r=e.min:this.state.editorSize===p.LARGE&&e.max&&(r=e.max):t===p.LARGE?this.state.editorSize===p.LARGE&&e.min?r=e.min:this.state.editorSize===p.MAX&&e.max&&(r=e.max):t===p.MAX&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=s.createElement(nr,{type:ft.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.MEDIUM&&(e=s.createElement(nr,{type:ft.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.LARGE&&(e=s.createElement(nr,{type:ft.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.LARGE&&this.state.editorSize===p.MAX&&(e=s.createElement(nr,{type:ft.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})),e}},{key:"_isResizeButtonRequired",value:function(){var e=this.propertiesController.getForm().pixelWidth;if(!1!==this.props.propertiesConfig.enableResize){if(e){if(!e.min&&!e.max)return g.warn("Pixel width was provided but no min or max property was found in it."),!0;if(this.propertiesController.getForm().editorSize===p.SMALL){if(e.min&&!e.max&&e.min>=pu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+pu),!1;if(!e.min&&e.max&&e.max<=lu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+lu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to pixel width max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MEDIUM){if(e.min&&!e.max&&e.min>=cu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+cu),!1;if(!e.min&&e.max&&e.max<=pu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+pu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.LARGE){if(e.min&&!e.max&&e.min>=uu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+uu),!1;if(!e.min&&e.max&&e.max<=cu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+cu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MAX)return!!e.min&&(g.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===p.MAX)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,n=this.props.propertiesConfig.conditionReturnValueHandling===Pt.NULL,o=this.propertiesController.getPropertyValues({filterHiddenDisabled:n,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=Te(o,this.uiParameterKeys),e.uiProperties=_r(o,this.uiParameterKeys)):e.properties=o,e}},{key:"_getUiOnlyKeys",value:function(){var e=[],t=this.propertiesController.getControls();if(Object.keys(t).length>0)for(var r in t){if(ee(t,r))t[r].uionly&&e.push(r)}return e}},{key:"cancelHandler",value:function(e){this.props.callbacks.closePropertiesDialog&&this.props.callbacks.closePropertiesDialog(e)}},{key:"applyPropertiesEditing",value:function(e){this.propertiesController.validatePropertiesValues();var t=this.propertiesController.getAllErrorMessages();if(this.originalTitle!==this.propertiesController.getTitle()||this.currentParameters&&JSON.stringify(this.currentParameters)!==JSON.stringify(this.propertiesController.getPropertyValues())||JSON.stringify(this.previousErrorMessages)!==JSON.stringify(t)||this.props.propertiesConfig.applyPropertiesWithoutEdit){var r={additionalInfo:{},undoInfo:{}};(r=this._setValueInforProperties(r,{applyProperties:!0})).undoInfo.properties=this.propertiesController.getPropertyValues();var n=this.propertiesController.getErrorMessages(!0,!0,!0,!1);n&&(r.additionalInfo.messages=n),r.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.propertiesController.getTitle()&&(r.additionalInfo.title=this.propertiesController.getTitle());var o=this.getPropertiesActionLabel(),i=new _i(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,o);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=G(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(Nt)}},{key:"showPropertiesButtons",value:function(e){this.setState({showPropertiesButtons:e})}},{key:"updateEditorSize",value:function(e){this.setState({editorSize:e}),this.propertiesController.setEditorSize(e)}},{key:"resize",value:function(){this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.SMALL?this.updateEditorSize(p.MEDIUM):this.updateEditorSize(p.SMALL):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.MEDIUM?this.updateEditorSize(p.LARGE):this.updateEditorSize(p.MEDIUM):this.propertiesController.getForm().editorSize===p.LARGE&&(this.state.editorSize===p.LARGE?this.updateEditorSize(p.MAX):this.updateEditorSize(p.LARGE))}},{key:"render",value:function(){var e=this,t=this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout,r=this.cancelHandler.bind(this,xt);t&&(r=null);var n=this.getApplyButtonLabel(),o=this.getRejectButtonLabel(),i=this.propertiesController.getTitle(),a=this.propertiesController.getForm();if(null!==a){var l=[],p=s.createElement("div",null),c=s.createElement("div",null),d=null,h=!1;if(this.props.propertiesConfig.rightFlyout&&(p=s.createElement(iu,{labelEditable:a.labelEditable,help:a.help,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,closeHandler:t?this.applyPropertiesEditing.bind(this,!0):null,icon:a.icon,heading:a.heading,showHeading:this.props.propertiesConfig.heading,rightFlyoutTabsView:this.props.propertiesConfig.categoryView===yt.TABS}),h=this.props.propertiesConfig.heading&&(a.icon||a.heading),c=s.createElement(Fr,{controller:this.propertiesController,okHandler:t?null:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,applyLabel:n,rejectLabel:o,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired())){var f=this._getResizeButton(),m=f.props&&"properties-resize-caret-left"===f.props.className?u(this.props.intl,st.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):u(this.props.intl,st.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);d=s.createElement(Ne,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":m},f)}var v=s.createElement(Io,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout,categoryView:this.props.propertiesConfig.categoryView});l="Editing"===this.props.propertiesConfig.containerType?s.createElement(Or,{applyLabel:n,rejectLabel:o,bsSize:this.state.editorSize,title:i,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons},v):"Custom"===this.props.propertiesConfig.containerType?s.createElement("div",{className:at("properties-custom-container",{"properties-custom-container-with-heading":!t&&h,"properties-custom-container-applyOnBlur":t&&!h,"properties-custom-container-applyOnBlur-with-heading":t&&h})},v):"Tearsheet"===this.props.propertiesConfig.containerType?s.createElement(xr,{open:!0,onCloseCallback:this.props.propertiesConfig.applyOnBlur?this.applyPropertiesEditing.bind(this,!0):null,tearsheet:{title:i,content:v},applyLabel:n,rejectLabel:o,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyOnBlur:this.props.propertiesConfig.applyOnBlur}):s.createElement(Lr,{onHide:this.props.callbacks.closePropertiesDialog,title:i,bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:n,rejectLabel:o},v);var y=at("properties-wrapper",{"properties-right-flyout":this.props.propertiesConfig.rightFlyout,"properties-light-enabled":this.props.light,"properties-light-disabled":!this.props.light},"properties-".concat(this.state.editorSize)),g=this._getOverrideSize(),b=null;return null!==g&&(b={width:g+"px"}),s.createElement(Ut,{store:this.propertiesController.getStore()},s.createElement("aside",{"aria-label":u(this.props.intl,st.PROPERTIES_LABEL,{label:i}),role:"complementary",ref:function(t){return e.commonProperties=t},className:y,onBlur:this.onBlur,style:b},d,p,l,c))}return s.createElement("div",null)}}]),i}(s.Component),hu=Mt(du,{forwardRef:!0});function fu(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var mu=function(r){n(i,r);var o=fu(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={hasError:!1,error:null,info:null},r.createPropertiesMainComponent=r.createPropertiesMainComponent.bind(a(r)),r.revertState=r.revertState.bind(a(r)),r.propertiesMainHasMounted=!1,r.setPropertiesHasMounted=r.setPropertiesHasMounted.bind(a(r)),r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r}return t(i,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"setPropertiesHasMounted",value:function(){this.propertiesMainHasMounted=!0}},{key:"applyPropertiesEditing",value:function(e){this.PropertiesMain.applyPropertiesEditing(e)}},{key:"createPropertiesMainComponent",value:function(){var e=this;return Object.assign(this.props.callbacks,{setPropertiesHasMounted:this.setPropertiesHasMounted}),s.createElement(hu,{ref:function(t){e.PropertiesMain=t},propertiesInfo:this.props.propertiesInfo,propertiesConfig:this.props.propertiesConfig,customPanels:this.props.customPanels,callbacks:this.props.callbacks,customControls:this.props.customControls,customConditionOps:this.props.customConditionOps,light:this.props.light})}},{key:"revertState",value:function(){this.setState({hasError:!1,error:null,info:null})}},{key:"displayAppropriateUIFallback",value:function(){var e,t,r={text:u(this.props.intl,st.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=s.createElement("div",{className:"properties-error-heading"},s.createElement(Cs,{messageInfo:r})),o=u(this.props.intl,st.PROPERTIES_SUPPORT_MESSAGE),i=u(this.props.intl,st.PROPERTIESEDIT_CLOSEBUTTON_LABEL),a=this.props.callbacks.closePropertiesDialog,l=u(this.props.intl,st.PROPERTIESEDIT_REVERTBUTTON_LABEL),p=this.revertState,d=u(this.props.intl,st.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,st.PROPERTIES_REVERT_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,cancelHandler:p,showPropertiesButtons:!0,applyLabel:i,rejectLabel:l}))):(e=u(this.props.intl,st.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-right-flyout properties-small"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t):s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-custom-container"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t)):(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,st.PROPERTIES_REVERT_MESSAGE),t=s.createElement(Lr,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:l,okHandler:a,cancelHandler:p,title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o))):(e=u(this.props.intl,st.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-error"},s.createElement(Lr,{okHandler:a,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}]),i}(s.Component);mu.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,categoryView:yt.ACCORDIONS,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,locale:Ot},callbacks:{},light:!0};var vu=Mt(mu,{forwardRef:!0});export{Ci as F,Jc as P,vu as c};
|
|
2
|
-
//# sourceMappingURL=common-properties-8b8a659b.js.map
|