@zealicsolutions/web-ui 1.0.140-beta.75 → 1.0.140-beta.76
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/cjs/index.js +6 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Drawer/styles.d.ts +7 -3
- package/dist/cjs/molecules/Drawer/types.d.ts +2 -0
- package/dist/esm/_virtual/index3.js +1 -1
- package/dist/esm/_virtual/index4.js +1 -1
- package/dist/esm/molecules/Drawer/Drawer.js +1 -1
- package/dist/esm/molecules/Drawer/Drawer.js.map +1 -1
- package/dist/esm/molecules/Drawer/styles.d.ts +7 -3
- package/dist/esm/molecules/Drawer/styles.js +24 -21
- package/dist/esm/molecules/Drawer/styles.js.map +1 -1
- package/dist/esm/molecules/Drawer/types.d.ts +2 -0
- package/dist/esm/node_modules/@mui/material/esm/Accordion/Accordion.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Menu/Menu.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/MenuList/MenuList.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Select/SelectInput.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/SpeedDial/SpeedDial.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Tabs/Tabs.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/dist/esm/node_modules/@mui/material/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/classnames/index.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/arrows.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/dots.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/inner-slider.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/track.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -982,11 +982,13 @@
|
|
|
982
982
|
`}
|
|
983
983
|
`,apt=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},ipt=xo.div`
|
|
984
984
|
position: relative;
|
|
985
|
-
`,spt=xo
|
|
985
|
+
`,spt=xo(If)`
|
|
986
986
|
position: relative;
|
|
987
987
|
height: 100%;
|
|
988
988
|
width: 100%;
|
|
989
|
-
|
|
989
|
+
display: flex;
|
|
990
|
+
flex-direction: column;
|
|
991
|
+
overflow: ${({scrollable:e})=>e?"hidden":"visible"}; /* Allow close icon to overflow when not scrollable */
|
|
990
992
|
`,lpt=xo.div`
|
|
991
993
|
position: absolute;
|
|
992
994
|
top: ${({top:e})=>apt(e)||"16px"};
|
|
@@ -1022,7 +1024,8 @@
|
|
|
1022
1024
|
flex: 1;
|
|
1023
1025
|
position: relative;
|
|
1024
1026
|
gap: ${({gap:e})=>e?"number"==typeof e?`${e}px`:e:"0"};
|
|
1025
|
-
`,upt=({currentWebpageId:t,anchor:r="left",variant:o="persistent",open:n=!1,onClose:a,items:i=[],withButton:s=!0,buttonText:l="",buttonVariant:c="contained",buttonTextColor:u,buttonFontSize:d,buttonFontWeight:p,buttonFontFamily:h,buttonDisabled:f=!1,buttonGap:m=0,buttonStartIcon:y,buttonEndIcon:g,buttonBorderRadius:v="0px",buttonPaddingTop:x="0px",buttonPaddingRight:b="0px",buttonPaddingBottom:w="0px",buttonPaddingLeft:k="0px",buttonMarginTop:_="0px",buttonMarginRight:C="0px",buttonMarginBottom:M="0px",buttonMarginLeft:S="0px",buttonIconOnly:D,buttonElevation:O,buttonFillColor:P,buttonFillColorDisabled:E,buttonFillColorHover:j,buttonFillColorPressed:T,buttonBorderColor:N,buttonBorderColorDisabled:R,buttonBorderColorHover:F,buttonBorderColorPressed:z,buttonTextColorDisabled:I,buttonTextColorHover:A,buttonTextColorPressed:L,buttonColor:B="#1976d2",buttonDisabledColor:V,withCloseIcon:$=!0,closeIconColor:H=Kr.colors.gray2,closeIconName:q="x",closeIconSize:W=18,closeIconBackgroundColor:U="rgba(255, 255, 255, 0.9)",closeIconVisible:G=!1,closeIconTop:K="16px",closeIconLeft:Y="16px",closeIconBorderRadius:Z="50%",closeIconElevation:X=2,moleculeId:Q,configurationItemInfo:J,sx:ee,paddingTop:te,paddingRight:re,paddingBottom:oe,paddingLeft:ne,height:ae,width:ie,mobileWidth:se,backgroundColor:le="#fff",gap:ce="8px",marginTop:ue="0px",marginRight:de="0px",marginBottom:pe="0px",marginLeft:he="0px"})=>{const fe=Ge(),{isConfigurationMode:me,selectedConfigurationItemId:ye,onConfigurationItemClicked:ge,onInternalNavigation:ve}=_C(),{updateDrawer:xe,drawerContainerRef:be,headerHeight:we,isMobile:ke}=gC(),[_e,Ce]=e.useState(n),[Me]=(()=>{try{return tpt()}catch{return[new URLSearchParams,()=>{}]}})(),Se=e.useMemo(()=>{if(t)return t;const e=Me.get(f7e),r=Me.get(h7e);let o=null,n=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);o=e.get(f7e),n=e.get(h7e)}catch(WQe){}return e||r||o||n||""},[t,Me]);e.useEffect(()=>{Ce(n)},[n]);const De=Boolean(me&&(ye===Q||i.some(e=>e.id===ye))),Oe=()=>"permanent"===o||(me?De:s?_e:n);e.useEffect(()=>{const e=Oe(),t="left"===r||"right"===r,n=ke&&void 0!==se?se:ie;let a=0;if(void 0!==n)if("number"==typeof n)a=n;else if("string"==typeof n){const e=parseFloat(n);Number.isNaN(e)||(a=e)}let i=0;if(t&&!ke)switch(o){case"permanent":i=a;break;case"persistent":default:i=e?a:0;break;case"temporary":i=0}return xe({isOpen:e,position:r,width:i}),()=>{xe({isOpen:!1,width:0})}},[_e,n,De,me,s,r,ie,se,ke,o,xe]);const Pe=()=>{"permanent"!==o&&Ce(!0)},Ee=(e,t)=>{"permanent"!==o&&(Ce(!1),a?.(e,t))},je=ke&&void 0!==se?se:ie,Te=ot(npt,{anchor:r,variant:o,open:Oe(),onClose:Ee,paddingTop:te,paddingRight:re,paddingBottom:oe,paddingLeft:ne,height:ae,width:je,backgroundColor:le,marginTop:`calc(${we} + ${ue})`,marginRight:de,marginBottom:pe,marginLeft:he,container:be,sx:ee,children:nt(spt,{...J&&Object.keys(J).length?{...J,"data-testid":"drawer-content-config","aria-label":"drawer-content"}:{},children:[(Oe()||"permanent"===o)&&i.length>0?ot(cpt,{gap:ce,children:i.map(e=>{const t=ye===e.id,r={entityId:e.id,entity:"molecule_item",entityType:e.type},o=me?{onClick:e=>{e.stopPropagation(),ge?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),ge?.(r,!0)},"data-organism-id":e.id,css:wtt({theme:fe,selected:t})}:{};switch(e.type){case"menu_item":{const t=e;e.id;const r=(e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=S7e(t.internalLink);return!(!r||!Se)&&r===Se})(t),n={backgroundColor:t.backgroundColor||"transparent",paddingTop:t.paddingTop||"8px",paddingRight:t.paddingRight||"16px",paddingBottom:t.paddingBottom||"8px",paddingLeft:t.paddingLeft||"16px",opacity:t.disabled?.6:1,pointerEvents:t.disabled?"none":"auto","&:hover":{backgroundColor:t.disabled?t.backgroundColor||"transparent":"rgba(0, 0, 0, 0.08)"}},a=t.sx?[n,t.sx]:n;return nt(ix,{sx:a,selected:r,onClick:()=>{if(t?.link){w7e(t.link)?ve?.({link:t.link?.internalLink||""}):x7e(t.link?.externalLink)}},disabled:t.disabled,...o,children:[t.startIcon&&ot(uGe,{iconName:t.startIcon,color:t.textColor}),ot(yd,{sx:{ml:t.startIcon?1:0,mr:t.endIcon?1:0,color:t.textColor||"inherit",fontSize:t.fontSize||"inherit",fontWeight:t.fontWeight||"normal",fontFamily:t.fontFamily||"inherit",whiteSpace:t.wrap?"normal":"nowrap",width:"100%",textAlign:t.textAlign||"left"},children:t.text}),t.endIcon&&ot(uGe,{iconName:t.endIcon,color:t.textColor})]},t.id)}case"divider_item":{const t=e;return ot(Odt,{moleculeId:t.id,variant:t.variant,lineWeight:t.lineWeight,orientation:t.orientation,borderColor:t.borderColor,borderRadius:t.borderRadius,marginTop:t.marginTop,marginRight:t.marginRight,marginBottom:t.marginBottom,marginLeft:t.marginLeft,configurationItemInfo:o},t.id)}case"text_item":{const t=e;return ot(Tdt,{id:t.id,text:t.text,align:t.align,color:t.color,wrap:t.wrap,variant:"string"==typeof t.variant&&["inherit","body1","body2","caption","button","overline","subtitle1","subtitle2","h1","h2","h3","h4","h5","h6"].includes(t.variant)?t.variant:void 0,fontSize:t.fontSize??"",fontWeight:["normal","bold"].includes(t.fontWeight)?t.fontWeight:void 0,fontFamily:t.fontFamily??"",marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationsItemInfo:o},t.id)}case"rich_text_item":{const t=e;return ot(jdt,{htmlElementId:t.id,text:t.text,isRichText:!0,marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationItemInfo:o},t.id)}case"image_item":{const t=e;return ot(Pdt,{src:t.src,alt:t.alt||"Drawer image",height:t.height,width:t.width,raised:t.raised,borderRadius:t.borderRadius||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",marginLeft:t.marginLeft||"0",paddingTop:t.paddingTop||"0",paddingRight:t.paddingRight||"0",paddingBottom:t.paddingBottom||"0",paddingLeft:t.paddingLeft||"0",onClick:()=>{if(t?.link){w7e(t.link)?ve?.({link:t.link?.internalLink||""}):x7e(t.link?.externalLink)}},moleculeId:t.id,configurationItemInfo:o},t.id)}default:return null}})}):null,!!$&&(!!G||Oe())&&ot(lpt,{top:K,left:Y,borderRadius:Z,elevation:X,backgroundColor:U,onClick:e=>{e.stopPropagation();Oe()?Ee(e,"closeIconClicked"):Pe()},"data-testid":"close-icon",children:ot(uGe,{"data-testid":"icon-renderer",iconName:q,size:W,color:H})})]})});return s&&"permanent"!==o?nt(rt,{children:[ot(_Ge,{moleculeId:Q,gap:m,text:l,variant:c,textColor:u,fontSize:d,fontWeight:["normal","bold"].includes(p)?p:void 0,fontFamily:h,disabled:f,startIcon:y,endIcon:g,marginTop:_,marginRight:C,marginBottom:M,marginLeft:S,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,borderRadius:v,iconOnly:D,elevation:O,fillColor:P||B,fillColorDisabled:E||V,fillColorHover:j,fillColorPressed:T,borderColor:N,borderColorDisabled:R,borderColorHover:F,borderColorPressed:z,textColorDisabled:I,textColorHover:A,textColorPressed:L,externalOnClick:e=>_e?Ee(e,"buttonClicked"):Pe(),configurationItemInfo:J}),ot(ipt,{children:Te})]}):ot(ipt,{children:Te})},dpt=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return ot(mKe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:DKe,guide:!0,placeholderChar:" "})}),ppt=({masked:e,errorMsg:t,inputSx:r,labelSx:o,sx:n,...a})=>{const i=e?{inputComponent:dpt}:{};return ot(G_,{...a,variant:"outlined",error:!!t,helperText:t||null,type:"text",sx:{...n},slotProps:{input:{sx:{...r,...n},...i},inputLabel:{sx:{...o,...n}}}})},hpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Email is required",validationErrorText:n="Invalid email address",text:a,placeholderText:i,masked:s=!1,multiLine:l=!1,backgroundColor:c,borderColor:u,color:d="inherit",fontSize:p="16px",fontFamily:h="inherit",fontWeight:f="normal",textAlign:m="left",marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,sx:E,name:j,sourceDataModelField:T,configurationItemInfo:N})=>{const R=Ut(),F=R?.control,z=!(!F||!j),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=T?B?.[T]?.value:void 0,$=T?L?.getDmfValue(T):void 0;e.useState("");const[H,q]=e.useState(""),W={required:!!r&&o,pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@(([^<>()[\]\\.,;:\s@"]+\.)+[^<>()[\]\\.,;:\s@"]{2,})$/,message:n}};if(t){let e="";e=void 0!==$?String($??""):z?R.watch(j)||"":V||"";const t=e||i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...N,children:[a&&ot(lg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...E},children:a}),ot(yd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",textAlign:m,...E},children:t})]})}const U={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-input":{textAlign:m,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_}},G={color:d,"&.Mui-focused":{color:d}},K=l?3:1,Y={...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return ot("div",z?{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:ot(Jt,{name:j,rules:W,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(ppt,{masked:s,required:r,errorMsg:t.error?.message,inputSx:U,labelSx:G,sx:{...Y,...E},label:a,placeholder:i,multiline:l,minRows:K,value:e.value||"",onChange:e.onChange,...N||{}})})}:{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:ot(ppt,{masked:s,required:r,errorMsg:void 0,inputSx:U,labelSx:G,sx:{...Y,...E},label:a,placeholder:i,multiline:l,minRows:K,value:H,onChange:e=>q(e.target.value),...N||{}})})},fpt=({src:t,text:r,type:o,link:n,sourceDataModelField:a,color:i=Kr.colors.deepBlue,disabled:s=!1,disabledColor:l,underline:c="hover",variant:u="body2",margin:d="0",padding:p="0",moleculeId:h,configurationItemInfo:f,marginTop:m="0",marginRight:y="0",marginBottom:g="0",marginLeft:v="0",paddingTop:x="0",paddingRight:b="0",paddingBottom:w="0",paddingLeft:k="0",fontFamily:_,fontWeight:C,fontSize:M,align:S,target:D,sx:O,borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,iconOnly:N,ariaLabel:R,iconName:F,iconSize:z,validationErrorText:I})=>{const{onStateChange:A}=OC(),{onInternalNavigation:L,isConfigurationMode:B,localStateObject:V}=_C(),{stateConfig:$}=DC(),H=dt(),q=V||$,W=e.useMemo(()=>{if(!a)return;const e=H?.getDmfValue(a);return null!=e?e:q?.[a]?.value},[H,a,q]),U=Boolean(a),G=e.useMemo(()=>{if(U)return W?String(W):void 0;const e=n?w7e(n):"internalLink"===o||"internal_link"===o,r=n?e?n.internalLink:n.externalLink:void 0;return t??r??void 0},[U,W,n,o,t]),K=!U&&!!n&&w7e(n),Y=U?D||"_blank":D||(K?"_self":"_blank"),Z=!!U&&!(e=>{if(!e)return!1;try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}})(G),X=Z?"#d32f2f":s?l||Wr(i):i,Q=B||s||Z?void 0:G,J=Boolean(F),ee="regular"===C?"normal":C,te=N?ot(uGe,{iconName:F||"external-link",size:z??16}):nt(rt,{children:[ot("span",{children:r}),J&&ot(uGe,{iconName:F,size:z??16})]}),{onClick:re,onDoubleClick:oe,...ne}=f||{},ae=ot(rv,{href:Q,component:"a",target:Y,onClick:e=>{A({id:h,type:"clicked"}),s||B||Z?e.preventDefault():U&&G?(e.preventDefault(),x7e(G)):K&&G?(e.preventDefault(),L?.({link:G})):!K&&G&&(e.preventDefault(),x7e(G))},onClickCapture:re||void 0,onDoubleClickCapture:oe||void 0,"aria-label":N?R||r||"link":void 0,sx:{color:X,textDecorationColor:X,margin:d,padding:p,marginTop:m,marginRight:y,marginBottom:g,marginLeft:v,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,fontFamily:_,fontWeight:ee,fontSize:M,textAlign:S,alignItems:"center",cursor:s?"not-allowed":"pointer",borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,display:N||J?"inline-flex":void 0,gap:J&&!N?"4px":void 0,"& .MuiLink-root":{color:"inherit",textDecorationColor:"inherit"},"&:hover":{color:s?X:Wr(X,.8),textDecorationColor:s?X:Wr(X,.8)},"&:active":{color:s?X:Wr(X,.6),textDecorationColor:s?X:Wr(X,.6)},"&.Mui-disabled":{color:l||Wr(i),textDecorationColor:l||Wr(i),cursor:"not-allowed"},...O},align:S,variant:u,underline:c,...ne,children:te});return Z?ot(Sw,{title:I||"Invalid link URL",arrow:!0,children:ot("span",{children:ae})}):ae},mpt=e=>({justifyContent:e.textAlign||"flex-start",backgroundColor:e.backgroundColor,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}),ypt=({popover:t=!0,items:r,marginTop:o="0",marginRight:n="0",marginBottom:a="0",marginLeft:i="0",paddingTop:s="0",paddingRight:l="0",paddingBottom:c="0",paddingLeft:u="0",cornerRadius:d="4px",backgroundColor:p="#fff",width:h="100%",height:f="auto",borderColor:m="#ccc",borderWeight:y="1px",buttonText:g="Open Menu",buttonVariant:v="contained",buttonTextColor:x,buttonFontSize:b,buttonFontWeight:w,buttonFontFamily:k,buttonDisabled:_=!1,buttonGap:C=0,buttonStartIcon:M,buttonEndIcon:S,buttonCornerRadius:D="0",buttonMarginTop:O="0",buttonMarginRight:P="0",buttonMarginBottom:E="0",buttonMarginLeft:j="0",buttonPaddingTop:T="0",buttonPaddingRight:N="0",buttonPaddingBottom:R="0",buttonPaddingLeft:F="0",buttonIconOnly:z,buttonElevation:I,buttonFillColor:A,buttonFillColorDisabled:L,buttonFillColorHover:B,buttonFillColorPressed:V,buttonBorderColor:$,buttonBorderColorDisabled:H,buttonBorderColorHover:q,buttonBorderColorPressed:W,buttonTextColorDisabled:U,buttonTextColorHover:G,buttonTextColorPressed:K,buttonColor:Y="#1976d2",anchorOriginVertical:Z="bottom",anchorOriginHorizontal:X="left",transformOriginVertical:Q="top",transformOriginHorizontal:J="left",elevation:ee=3,sx:te,moleculeId:re,configurationItemInfo:oe})=>{const ne=Ge(),{isConfigurationMode:ae,selectedConfigurationItemId:ie,onConfigurationItemClicked:se,onInternalNavigation:le}=_C(),[ce,ue]=e.useState(null),[de,pe]=e.useState(!1),[he]=(()=>{try{return tpt()}catch{return[new URLSearchParams,()=>{}]}})(),fe=e.useMemo(()=>{const e=he.get(f7e),t=he.get(h7e);let r=null,o=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);r=e.get(f7e),o=e.get(h7e)}catch(WQe){}return e||t||r||o||""},[he]),me=e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=S7e(t.internalLink);return!(!r||!fe)&&r===fe},ye=Boolean(ae&&(ie===re||r.some(e=>e.id===ie))),ge=()=>pe(!0),ve=()=>pe(!1),xe={marginTop:o,marginRight:n,marginBottom:a,marginLeft:i,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:u,"& .MuiMenu-paper":{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},"& .MuiMenu-list":{padding:0,width:h,height:f,overflow:"hidden"},"& .MuiMenuItem-root":{minHeight:"auto",paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemButton-root":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemText-primary":{fontSize:"14px",fontFamily:"inherit"},"& .MuiTypography-root":{fontSize:"14px",fontFamily:"inherit"},...t?{display:"inline-block",zIndex:ne?.zIndex?.drawer}:{width:h,height:f,backgroundColor:p,display:"block",overflow:"hidden",border:`${y} solid ${m}`,borderRadius:d},...te};return t?nt(If,{children:[ot(_Ge,{ref:ue,text:g,variant:v,moleculeId:re,textColor:x,fontSize:b,fontWeight:w,fontFamily:k,disabled:_,gap:C,startIcon:M,endIcon:S,onClick:ge,marginTop:O,marginRight:P,marginBottom:E,marginLeft:j,paddingTop:T,paddingRight:N,paddingBottom:R,paddingLeft:F,borderRadius:D,iconOnly:z,elevation:I,fillColor:A||Y,fillColorDisabled:L,fillColorHover:B,fillColorPressed:V,borderColor:$,borderColorDisabled:H,borderColorHover:q,borderColorPressed:W,textColorDisabled:U,textColorHover:G,textColorPressed:K,configurationItemInfo:oe}),ot(tx,{open:ae?ye:de,variant:"menu",anchorEl:ce,disablePortal:!0,disableScrollLock:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,onClose:ve,anchorOrigin:{vertical:Z,horizontal:X},transformOrigin:{vertical:Q,horizontal:J},elevation:ee,slotProps:{paper:{sx:{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3],"& .MuiMenu-list":xe["& .MuiMenu-list"],"& .MuiMenuItem-root":xe["& .MuiMenuItem-root"],"& .MuiListItemText-primary":xe["& .MuiListItemText-primary"],"& .MuiTypography-root":xe["& .MuiTypography-root"]}}},sx:{...xe,"& .MuiMenu-paper":xe["& .MuiMenu-paper"]},children:r.map(e=>{const t=ie===e.id,r=me(e),o={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},n=ae?e=>{e.stopPropagation(),se?.(o,!1)}:void 0,a=ae?e=>{e.stopPropagation(),se?.(o,!0)}:void 0,i=ae?{onClick:n,onDoubleClick:a,"data-organism-id":e.id,css:wtt({theme:ne,selected:t})}:{};return nt(ix,{sx:mpt(e),selected:r,onClick:()=>{e?.link&&(w7e(e.link)?le?.({link:e.link?.internalLink||""}):x7e(e.link?.externalLink)),ve()},disabled:e.disabled,...i,children:[e.startIcon&&ot(uGe,{iconName:e.startIcon,color:e.textColor}),ot(yd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",width:"100%",textAlign:e.textAlign||"left"},children:e.text}),e.endIcon&&ot(uGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})]}):ot($c,{id:re,sx:{...xe,backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},elevation:ee,...oe,children:ot(lv,{disablePadding:!0,children:r.map(e=>{const t=ie===e.id,r=me(e),o={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},n=ae?e=>{e.stopPropagation(),se?.(o,!1)}:void 0,a=ae?e=>{e.stopPropagation(),se?.(o,!0)}:void 0,i=ae?{onClick:n,onDoubleClick:a,"data-organism-id":e.id,css:wtt({theme:ne,selected:t})}:{};return nt(fv,{disabled:e.disabled,sx:mpt(e),selected:r,onClick:()=>{e?.link&&(w7e(e.link)?le?.({link:e.link?.internalLink||""}):x7e(e.link?.externalLink))},...i,children:[e.startIcon&&ot(uGe,{iconName:e.startIcon,color:e.textColor}),ot(Tv,{primary:ot(yd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",textAlign:e.textAlign||"left"},children:e.text})}),e.endIcon&&ot(uGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})})};const gpt=({errorMsg:e,stepValue:t,minValue:r,allowNegative:o,inputSx:n,labelSx:a,...i})=>ot(G_,{...i,variant:"outlined",type:"number",error:!!e,helperText:e||null,inputProps:{step:t,min:o?void 0:r},slotProps:{input:{sx:n},inputLabel:{sx:a}}}),vpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid numeric value",text:a,placeholderText:i,backgroundColor:s,borderColor:l,textColor:c="#000",fontSize:u,fontFamily:d,fontWeight:p,allowNegative:h=!1,numericPrecision:f="1",name:m,sourceDataModelField:y,marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,configurationItemInfo:D,textAlign:O,minHeight:P,maxHeight:E,minWidth:j,maxWidth:T,sx:N})=>{const R=Ut(),F=R?.control,z=!(!F||!m),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=y?B?.[y]?.value:void 0,$=y?L?.getDmfValue(y):void 0,[H,q]=e.useState(""),W=parseFloat(f),U=h?void 0:0,G={required:!!r&&o,pattern:{value:h?/^-?\d*(\.\d+)?$/:/^\d*(\.\d+)?$/,message:n}};if(h||(G.min={value:0,message:"Value cannot be less than zero"}),t){let e="";e=void 0!==$?String($??""):z?R.watch(m)||"":V;const t=e?function(e,t,r){if(!e)return"";const o=parseFloat(e);if(Number.isNaN(o))return e;if(!r&&o<0)return"0";if(t){const e=(t.split(".")[1]||"").length;if(e>0)return o.toFixed(e)}return e}(e,f,h):i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}},sx:N,...D,children:[a&&ot(lg,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,marginBottom:"4px"},children:a}),ot(yd,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,backgroundColor:s,border:`1px solid ${l||"#ccc"}`,borderRadius:"4px",minWidth:"60px"},children:t})]})}const K={backgroundColor:s,color:c,fontSize:u,fontFamily:d,fontWeight:p,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},"& .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"}},Y={color:c,"&.Mui-focused":{color:c}},Z={...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}};return ot(Uy,z?{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:ot(Jt,{name:m,rules:G,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(gpt,{errorMsg:t.error?.message,label:a,placeholder:i,stepValue:W,minValue:U,allowNegative:h,inputSx:K,labelSx:Y,sx:Z,value:e.value||"",onChange:t=>e.onChange(t.target.value)})})}:{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:ot(gpt,{errorMsg:void 0,label:a,placeholder:i,stepValue:W,minValue:U,allowNegative:h,inputSx:K,labelSx:Y,sx:Z,value:H,onChange:e=>q(e.target.value)})})},xpt=e=>{const t={text:e.label,validate:()=>!0},{rule:r}=e,o=bpt(r);if(o||wpt(r)){const e=((e,t)=>(r=0)=>e?r<=t:r>=t)(o,o?r.MAX:r.MIN);switch(r.type){case"COUNT":t.validate=t=>e(t?.length);break;case"NUMBER_COUNT":t.validate=t=>e(t?.replace(/\D/g,"").length);break;case"CAPITAL_COUNT":t.validate=t=>e((t?.match(/[A-Z]/g)||[]).length);break;case"SPECIAL_CHARACTERS_COUNT":t.validate=t=>e(t?.replace(/[a-z]|\d|\s/gi,"").length);break;case"LOWER_CASE_COUNT":t.validate=t=>e((t?.match(/[a-z]/g)||[]).length)}}return t},bpt=e=>!!e?.MAX,wpt=e=>!!e?.MIN,kpt=({gap:t="0",inputProps:r,validations:o,htmlElementId:n,validationState:a,overridesProperties:i,configurationItemInfo:s,width:l,height:c,minWidth:u,maxWidth:d,minHeight:p,maxHeight:h,marginLeft:f="0",marginTop:m="0",marginRight:y="0",marginBottom:g="0",sx:v,...x})=>{const{watch:b,formState:w,setError:k}=Ut()||{},{text:_,subText:C,placeholderText:M,subPlaceholderText:S,validationText:D}=i,O=o.map(xpt),P="password",E=`reEnter${P}`,j=b?.(P),T=b?.(E);return e.useEffect(()=>{j!==T&&k(E,{type:"manual",message:"Passwords do not match"})},[j,T,k,E]),nt(If,{id:n,sx:{width:"100%",display:"flex",flexDirection:"column",gap:t,marginLeft:f,marginTop:m,marginRight:y,marginBottom:g,...l&&{width:l},...c&&{height:c},...u&&{minWidth:u},...d&&{maxWidth:d},...p&&{minHeight:p},...h&&{maxHeight:h},...v},...s,...x,children:[ot(Ott,{...r,inputType:"password",text:_?.text,name:P,placeholderText:M?.text}),ot(Ott,{...r,inputType:"password",text:C?.text,name:E,placeholderText:S?.text}),ot(sKe,{rules:O,value:j,label:D?.text,isSubmitted:w?.isDirty,validationState:a})]})},_pt=["+"," ","(",/[0-9]/,/[0-9]/,/[0-9]/,")"," ",/[0-9]/,/[0-9]/,/[0-9]/,"-",/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],Cpt=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return ot(mKe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:_pt,guide:!0,placeholderChar:" "})});function Mpt(e){const t=(e??"").replace(/\D+/g,"");if(!t)return"";let r="",o=0;return _Ke.forEach(e=>{"string"==typeof e?r+=e:o<t.length?(r+=t[o],o+=1):r+="_"}),r}const Spt=({masked:e,errorMsg:t,inputSx:r,labelSx:o,...n})=>ot(G_,{...n,variant:"outlined",error:!!t,helperText:t||null,slotProps:{input:{sx:r,...e?{inputComponent:Cpt}:{}},inputLabel:{sx:o}}}),Dpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Phone is required",validationErrorText:n="Invalid phone number",text:a,placeholderText:i,masked:s=!0,multiLine:l=!1,backgroundColor:c,borderColor:u,textColor:d="#000",fontSize:p,fontFamily:h,fontWeight:f,textAlign:m,marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,name:E,sourceDataModelField:j,configurationItemInfo:T,sx:N})=>{const R=Ut(),F=R?.control,z=!(!F||!E),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=j?B?.[j]?.value:void 0,$=j?L?.getDmfValue(j):void 0,[H,q]=e.useState(""),W={required:!!r&&o,pattern:{value:/^\d{10}$/,message:n}};if(t){let e="";e=void 0!==$?String($??""):z?R.watch(E)||"":String(V??"");const t=(s?Mpt(e):e)||i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}},...T,children:[a&&ot(lg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...N},children:a}),ot(yd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",...N},children:t})]})}const U={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"}},G={color:d,"&.Mui-focused":{color:d}},K={marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,width:"fit-content",...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return ot(Uy,z?{required:r,sx:{...K,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:ot(Jt,{name:E,rules:W,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(Spt,{masked:s,errorMsg:t.error?.message,inputSx:U,labelSx:G,label:a,placeholder:i,value:e.value||"",onChange:t=>{const r=(t?.target?.value??"").toString().replace(/\D+/g,"");e.onChange(r)}})})}:{required:r,sx:{...K,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:ot(Spt,{masked:s,errorMsg:void 0,inputSx:U,labelSx:G,label:a,placeholder:i,value:H,onChange:e=>{const t=(e?.target?.value??"").toString();q(t.replace(/\D+/g,""))}})})},Opt=({text:t,name:r,isDisplayOnly:o=!1,required:n=!1,requiredErrorText:a="This field is required",validationErrorText:i="Invalid rating",placeholderText:s="",hoverFeedback:l=!1,sourceDataModelField:c,textAlign:u="left",color:d="black",textColor:p,selectColor:h,fontSize:f=14,fontFamily:m="Arial, sans-serif",fontWeight:y="normal",marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,minHeight:D,maxHeight:O,minWidth:P,maxWidth:E,placement:j="right",configurationItemInfo:T={},disabled:N=!1,maxValue:R=5,ratingPrecision:F=.5,sx:z,...I})=>{const A=Ut(),L=A?.control,B=!!A&&!!L&&!!r,{localStateObject:V}=_C(),{stateConfig:$}=DC(),H=dt(),q=V||$,W=c?q?.[c]?.value:void 0;!B||A.formState.errors;const[U,G]=e.useState(null),[K,Y]=e.useState(-1),Z=l&&-1!==K;if(o){const e=c?H?.getDmfValue(c):void 0;let r=null;const o=e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e;if(void 0!==e)r=o(e);else if(c&&q?.[c]){const e=q?.[c]?.value;r=o(e)}return nt(Uy,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...z},...T,children:[t&&ot(yd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),ot(ib,{value:r,max:R,precision:F,readOnly:!0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},...z},...I})]})}const X={required:!!n&&a,validate:e=>!n||null!==e&&0!==e||a};return nt(Uy,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...z},...T,children:[t&&ot(yd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),nt(If,{sx:{display:"flex",alignItems:"center"},children:["left"===j&&ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:Z?K:B?A.getValues(r)??W??"":U??W??""}),ot(Jt,{name:r,control:L,defaultValue:"number"==typeof W?W:null,rules:X,render:({field:e,fieldState:{error:t}})=>nt(rt,{children:[ot(ib,{value:e.value??W??0,max:R,precision:F,disabled:N,onChange:(t,r)=>e.onChange(r),onChangeActive:l?(e,t)=>Y(t??-1):void 0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},marginX:l?1:0,...z},...I}),t&&ot(lg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.type?a:i})]})}),"right"===j&&ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:Z?K:B?A.getValues(r)??W??"":U??W??""})]})]})},Ppt=({open:t,text:o,disabled:n,sx:a,placeholderText:i,required:s=!1,requiredErrorText:c="This field is required",validationErrorText:u="Invalid format",isDisplayOnly:d=!1,displayText:p,visible:h=!0,fontSize:f,fontFamily:m,fontWeight:y,textColor:g,textAlign:v,borderColor:x,color:b,backgroundColor:w,marginLeft:k="0",marginTop:_="0",marginRight:C="0",marginBottom:M="0",paddingLeft:S="12px",paddingTop:D="14px",paddingRight:O="12px",paddingBottom:P="14px",width:E,height:j,minHeight:T,maxHeight:N,minWidth:R,maxWidth:F,configurationItemInfo:z={},name:I,sourceDataModelField:A,predefinedValue:L,...B})=>{const V=d?void 0:A,{dataModelFieldOptions:$,isLoading:H}=(e=>{const{pickList:t}=ct(),{data:o=[],refetch:n,isLoading:a}=r.useQuery({queryKey:[dGe,e],queryFn:()=>t.get(e),select:e=>{const t=e?.data;return Array.isArray(t)?t:t&&Array.isArray(t.data)?t.data:[]},enabled:Boolean(e),refetchOnWindowFocus:!0,refetchOnMount:!0});return{dataModelFieldOptions:o,refetch:n,isLoading:a}})(V),q=Ut(),W=q?.control,U=!!q&&!!W&&!!I,{formState:G}=q||{},{localStateObject:K,localState:Y,setLocalStateValue:Z,isConfigurationMode:X,selectedConfigurationItemId:Q}=_C(),{stateConfig:J}=DC(),{isMLR:ee}=gC(),te=dt(),re=K||J,oe=A?re?.[A]:void 0,ne=oe?.value||("string"==typeof oe||"number"==typeof oe?oe:void 0),ae=A?te?.getDmfValue(A):void 0,ie="string"==typeof ae||"number"==typeof ae?ae:ae&&"object"==typeof ae?ae.value??ae.label??ae.id:void 0,[se,le]=e.useState(""),[ce,ue]=e.useState(!1),[de,pe]=e.useState(!1),he=e.useRef(null),fe=e.useRef(null),me=l.default.useCallback(e=>{fe.current=e,pe(null!==e)},[]),ye=X&&Q===z?.["data-configuration-id"];e.useEffect(()=>{X&&ue(!!ye)},[ye,X]);const ge=e.useMemo(()=>!(Boolean(n)||null!=L&&""!==L)&&(X?!!ye&&ce:ee?t||!1:void 0),[X,ye,ce,ee,t,n,L]),ve=e.useMemo(()=>null!=L&&""!==L,[L]),xe=e.useMemo(()=>Boolean(n)||ve,[n,ve]);e.useEffect(()=>{ve&&null!=L&&(U?q?.setValue(I,L):le(L))},[ve,L,U,q,I]);const be=e.useMemo(()=>({required:!!s&&c,validate:()=>!0}),[s,c]),we=e.useMemo(()=>($||[]).map(e=>"string"==typeof e?{id:e,label:e}:e),[$]),ke=!xe&&(X&&ye||ee&&t),_e=ke&&de&&null!==fe.current,Ce=e.useMemo(()=>{const e=(()=>{switch(v){case"center":return"center";case"right":return"flex-end";case"justify":return"space-between";default:return"flex-start"}})(),t=g||b||"rgba(0, 0, 0, 0.87)",r=g?`${g}50`:"rgba(0, 0, 0, 0.6)",o=g?`${g}30`:"rgba(0, 0, 0, 0.26)";return{typography:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:t},menuItem:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:t,minHeight:"48px",padding:"6px 16px",transition:"background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms","&:hover":{backgroundColor:"rgba(127, 127, 127, 0.08)"},"&.Mui-selected":{backgroundColor:"rgba(25, 118, 210, 0.12)","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.2)"}},"&.Mui-disabled":{color:o,backgroundColor:"rgba(127, 127, 127, 0.06)"}},inputSx:{fontSize:f,fontFamily:m,fontWeight:y,color:b,minHeight:"56px","& .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"& .MuiSelect-select":{display:"flex",alignItems:"center",justifyContent:e,backgroundColor:w,textAlign:v,boxSizing:"border-box",paddingLeft:S,paddingTop:D,paddingRight:O,paddingBottom:P,minHeight:"1.4375em",lineHeight:"1.4375em"}},formControlSx:{marginLeft:k,marginTop:_,marginRight:C,marginBottom:M,...E&&{width:E},...j&&{height:j},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N},...R?{minWidth:R}:E?{}:{minWidth:"240px"},...a},placeholderTypography:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:r},placeholderColor:r}},[v,f,m,b,g,y,x,w,S,D,O,P,k,_,C,M,E,j,F,R,T,N]),Me=()=>ot(ix,{disabled:!0,value:"",sx:{...Ce.menuItem,backgroundColor:"rgba(0, 0, 0, 0.06) !important","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06) !important"}},children:ot("em",{style:{fontStyle:"italic",...Ce.placeholderTypography},children:i||"Select an option"})});e.useEffect(()=>{if(!d||!U)return;const e=null!=ie?String(ie):void 0,t=null!=ne?String(ne):void 0,r=("string"==typeof p&&""!==p?p:void 0)??e??t;void 0!==r&&q?.setValue(I,r)},[d,U,p,ie,ne,q,I]);const Se=(e,t)=>H?nt(ix,{disabled:!0,value:"loading",sx:Ce.menuItem,children:[ot(qu,{size:20,sx:{mr:1}}),"Loading..."]}):we.map(r=>ot(ix,{value:r.id,selected:e===r.id,onClick:t?()=>t(r.id):void 0,sx:Ce.menuItem,children:r.label},r.id));if(d){const e=!E||"auto"===E,t=("string"==typeof p&&""!==p?p:void 0)??(null!=ie?String(ie):void 0)??(null!=ne?String(ne):void 0)??(i||"-");return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginTop:_,marginRight:C,marginBottom:M,marginLeft:k,...E?{width:E}:{width:"fit-content"},...j&&{height:j},...T&&{minHeight:T},...N&&{maxHeight:N},...R&&{minWidth:R},...F&&{maxWidth:F}},...z,children:[o&&ot("div",{style:{marginBottom:4},children:ot(lg,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:g||"#000",marginLeft:0,textAlign:v},children:o})}),ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:g,textAlign:v,paddingLeft:S,paddingTop:D,paddingRight:O,paddingBottom:P,backgroundColor:w,border:`1px solid ${x||"#ccc"}`,borderRadius:"4px",...e?{width:"fit-content"}:{}},children:t})]})}const De={slotProps:{paper:{elevation:3,sx:{borderRadius:"4px",backgroundColor:w||"background.paper",boxShadow:"0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)",...Ce.typography,..._e?{display:"none !important",visibility:"hidden !important",opacity:"0 !important",pointerEvents:"none !important",position:"absolute !important",top:"-9999px !important",left:"-9999px !important",zIndex:"-9999 !important"}:{}}}},MenuListProps:{sx:{padding:"8px 0",...w&&{backgroundColor:w},"& .MuiMenuItem-root":Ce.menuItem}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},..._e?{disableScrollLock:!0,disablePortal:!0,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,hideBackdrop:!0}:{}},Oe=(e,t)=>{t?.onChange?t.onChange(e):(le(e),A&&Z&&Z(A,{id:e}))},Pe=e=>{if(!e||""===e)return ot("em",{style:{color:Ce.placeholderColor,fontStyle:"italic"},children:i||"Select an option"});const t=we.find(t=>t.id===e);return t?t.label:e},Ee=(e,t)=>nt(kb,{...e||{},...B,...X?{open:ge}:{},...ee?{open:ge}:{},...ke?{open:!1,onClose:()=>{},onOpen:()=>{}}:{},error:t,disabled:xe,value:e?.value??se,onChange:t=>{_e||Oe(t.target.value,e)},labelId:`select-label-${I}`,input:ot(_x,{label:o}),displayEmpty:!0,renderValue:Pe,MenuProps:De,sx:{...Ce.inputSx,...E&&{width:E},...j&&{height:j},...R&&{minWidth:R},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N}},inputProps:{"aria-label":o},children:[Me(),Se()]}),je=e=>{if(!_e||xe)return null;const t=e?.value??se;return ot(nh,{open:!0,anchorEl:fe.current,placement:"bottom-start",disablePortal:!0,transition:!0,sx:{zIndex:1300},children:({TransitionProps:r})=>ot(wg,{...r,timeout:150,style:{transformOrigin:"top left"},children:ot($c,{elevation:3,sx:{borderRadius:"4px",backgroundColor:w||"background.paper",minWidth:fe.current?.offsetWidth||240,width:fe.current?.offsetWidth||240,maxHeight:300,overflowY:"auto",overflowX:"hidden",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none",width:0,height:0},boxShadow:"rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",...Ce.typography},children:nt(Av,{sx:{padding:"8px 0",...w&&{backgroundColor:w},"& .MuiMenuItem-root":Ce.menuItem},children:[Me(),Se(t,t=>Oe(t,e))]})})})})};return h?ot("div",{ref:he,style:{position:"relative",...E&&{width:E},...j&&{height:j},...R&&{minWidth:R},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N}},...z,onClick:e=>{if(X&&z&&"onClick"in z){e.stopPropagation();z.onClick()}},children:nt(Uy,{ref:me,variant:"outlined",sx:Ce.formControlSx,error:!!G?.errors?.[I],disabled:xe,required:s,children:[ot(Fg,{id:`select-label-${I}`,shrink:!0,sx:{color:g||"rgba(0, 0, 0, 0.6)",fontSize:f,fontFamily:m,fontWeight:y,"&.Mui-focused":{color:g||"rgba(0, 0, 0, 0.6)"}},children:o}),U?ot(Jt,{name:I,control:W,rules:be,render:({field:e,fieldState:{error:t}})=>nt(rt,{children:[Ee(e,!!t),je(e)]})}):nt(rt,{children:[Ee(void 0,!1),je(void 0)]}),G?.errors?.[I]&&ot(lg,{error:!0,children:G?.errors?.[I]?.message||("required"===G?.errors?.[I]?.type?c:u)})]})}):null};const Ept=({text:e,name:t,isDisplayOnly:r=!1,required:o=!1,requiredErrorText:n="This field is required",validationErrorText:a="Invalid value",placeholderText:i="",startIcon:s,endIcon:l,borderColor:c,selectLineColor:u,lineWeight:d=1,orientation:p="horizontal",textColor:h,fontSize:f,fontFamily:m,fontWeight:y,valueFormat:g,valueDisplay:v="auto",iconSize:x,selectColor:b,iconColor:w,minValue:k=0,maxValue:_=100,step:C,labelPlacement:M="top",marginLeft:S="0",marginTop:D="0",marginRight:O="0",marginBottom:P="0",paddingLeft:E="0",paddingTop:j="0",paddingRight:T="0",paddingBottom:N="0",width:R,height:F,minHeight:z,maxHeight:I,minWidth:A,maxWidth:L,sx:B,configurationItemInfo:V,sourceDataModelField:$,disabled:H=!1,...q})=>{const W=Ut(),U=W?.control,{localStateObject:G}=_C(),{stateConfig:K}=DC(),Y=dt(),Z=G||K,X=$?Z?.[$]?.value:void 0,Q=$?Y?.getDmfValue($):void 0,J={required:!!o&&n,validate:e=>!o||null!=e||n},ee=e=>function(e,t){if(null==e)return"";switch(t){case"$0.00":return`$${e.toFixed(2)}`;case"$123":return`$${e}`;case"%0.00":return`${e.toFixed(2)}%`;case"%123":return`${e}%`;case"0.0":return e.toFixed(1);case"0.00":return e.toFixed(2);default:return e.toString()}}(e,g),te={width:"100%","& .MuiSlider-root":{width:"100%"},"& .MuiSlider-rail":{backgroundColor:c||"#ccc",..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-track":{backgroundColor:u||"#2196f3",border:`1px solid ${u||"#2196f3"}`,..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-thumb":{backgroundColor:b||"#2196f3",width:x||"16px",height:x||"16px",boxShadow:"none","&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:"none"}},"& .MuiSlider-valueLabel":{backgroundColor:b||"#2196f3",color:"#ffffff",borderRadius:"4px",fontSize:"12px",fontWeight:500},"& .MuiSlider-mark":{backgroundColor:c||"#ccc",width:"2px",height:"2px",borderRadius:"50%"},"& .MuiSlider-markActive":{backgroundColor:b||"#2196f3"},...B};if(r){let t=null;const r=e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e;if(void 0!==Q)t=r(Q);else if($&&Z?.[$]){const e=Z?.[$]?.value;t=r(e)}return nt(Uy,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...z&&{minHeight:z},...I&&{maxHeight:I},...A&&{minWidth:A},...L&&{maxWidth:L},...B},...V,children:[e&&ot(fg,{children:e}),nt(If,{display:"flex",flexDirection:"top"===M?"column":"row",alignItems:"center",mt:"top"===M?1:0,children:[s&&ot(If,{mr:"horizontal"===p?1:0,mb:"vertical"===p?1:0,children:ot(uGe,{iconName:s,color:w})}),ot(nw,{value:t??void 0,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:ee,sx:te,disabled:!0,...q}),l&&ot(If,{ml:"horizontal"===p?1:0,mt:"vertical"===p?1:0,children:ot(uGe,{iconName:l,color:w})}),ot(yd,{sx:{ml:1,fontSize:f,fontFamily:m,fontWeight:y,color:h},children:t})]})]})}return nt(Uy,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...z&&{minHeight:z},...I&&{maxHeight:I},...A&&{minWidth:A},...L&&{maxWidth:L},...B},...V,children:[e&&ot(fg,{children:e}),ot(Jt,{name:t||"",control:U,defaultValue:"number"==typeof X?X:k,rules:J,render:({field:e,fieldState:t})=>nt(rt,{children:[ot(nw,{...e,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:ee,sx:te,onChange:(t,r)=>e.onChange(r),...q}),t.error&&ot(lg,{error:!0,sx:{mt:1},children:"required"===t.error.type?n:a})]})})]})},jpt=({direction:t="up",size:r="medium",ariaLabel:o="Speed Dial",openIconName:n="plus",closeIconName:a="x",openIconColor:i="#fff",closeIconColor:s="#fff",backgroundColor:l="#1976d2",items:c=[],configurationItemInfo:u={},tooltipOpen:d=!1,tooltipPlacement:p,showBackdrop:h=!1,openOnHover:f=!1,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k,moleculeId:_,gap:C,sx:M,...S})=>{const D=Ge(),[O,P]=e.useState(!1),{isConfigurationMode:E,onConfigurationItemClicked:j,selectedConfigurationItemId:T,onInternalNavigation:N}=_C();e.useEffect(()=>{if(!O)return;const e=e=>{"Escape"!==e.key||E||P(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[O,E]);const R=()=>P(!0),F=()=>P(!1);let z={};z=f&&!h?{onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F}:{onClick:e=>{P(e=>!e)}};const I={bgcolor:l,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k},A=O||E&&(T===_||c.some(e=>e.id===T));return nt("div",{role:"presentation",children:[h&&ot(Sf,{open:O}),ot(mw,{ariaLabel:o,direction:t,icon:ot(Lw,{icon:ot(uGe,{iconName:n,color:i,size:24}),openIcon:ot(uGe,{iconName:a,color:s,size:24})}),open:A,onOpen:f&&!h?R:void 0,onClose:f&&!h?F:void 0,FabProps:{color:"primary",sx:I,size:r,gap:C},slotProps:{fab:{"data-testid":"speed-dial-fab","aria-label":o}},sx:{"& .MuiSpeedDial-fab":{backgroundColor:l,...I},"& .MuiSpeedDial-actions":{gap:C||8},"& .MuiSpeedDialIcon-icon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialIcon-openIcon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialAction-fab":{backgroundColor:"#fff",color:"#757575","&:hover":{backgroundColor:"#f5f5f5"}},"& .MuiSpeedDialAction-staticTooltip":{backgroundColor:"rgba(97, 97, 97, 0.9)",color:"#fff",fontSize:"12px",padding:"4px 8px",borderRadius:"4px"},"& .MuiSpeedDialAction-staticTooltipLabel":{fontSize:"12px",fontWeight:500},...M},...z,...u,...S,children:c.map(e=>{const{text:t,link:o}=e.properties??{},{iconName:n="plus",disabled:a=!1,iconColor:i="#757575",tooltipText:s,backgroundColor:l="#fff"}=e.config?.props??{},c=String(t?.text||s||"Action"),u=E&&T===e.id,h={entityId:e.id,entity:"molecule_item",entityType:"speed_dial_action_item"},f=E?{onClick:e=>{e.stopPropagation(),j?.(h,!1)},onDoubleClick:e=>{e.stopPropagation(),j?.(h,!0)},"data-organism-id":e.id,css:wtt({theme:D,selected:u})}:{};return ot(Nw,{icon:ot(uGe,{iconName:n,color:i,size:24}),tooltipOpen:d,tooltipTitle:c,tooltipPlacement:p,FabProps:{sx:{color:i,backgroundColor:l},size:r,disabled:a,"aria-label":c,onClick:e=>{e.stopPropagation(),o?(w7e(o)?N?.({link:o.internalLink??""}):x7e(o.externalLink),P(!1)):P(!1)},...f}},e.id)})})]})},Tpt=({items:e,gap:t,stepGap:r,isMobile:o=!1,iconSize:n="24px",orientation:a="horizontal",activeStep:i=0,lineColor:s,lineWidth:l,lineRadius:c,marginTop:u="0",marginRight:d="0",marginBottom:p="0",marginLeft:h="0",paddingTop:f="0",paddingRight:m="0",paddingBottom:y="0",paddingLeft:g="0",borderRadius:v="0",configurationItemInfo:x,backgroundColor:b="transparent",sx:w,...k})=>{const _=Ge(),C=o?"vertical":a,{isConfigurationMode:M,onConfigurationItemClicked:S,selectedConfigurationItemId:D}=_C();return ot(Ok,{sx:{gap:t,width:"100%",overflow:"hidden",marginTop:u,marginRight:d,marginBottom:p,marginLeft:h,paddingTop:f,paddingRight:m,paddingBottom:y,paddingLeft:g,borderRadius:v,backgroundColor:b,"& .MuiStep-root":{padding:"8px"},"& .MuiStepLabel-root":{gap:r,alignItems:"flex-start"},"& .MuiStepLabel-label":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},"& .MuiStepConnector-root":{flex:"1 1 auto"},"& .MuiStepConnector-line":{borderColor:s,borderWidth:l,borderRadius:c},"& .MuiStepConnector-vertical":{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},"& .MuiStepConnector-horizontal":{marginLeft:"8px",marginRight:"8px"},"& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"},"& .MuiTypography-root":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},...w},activeStep:i,orientation:C,connector:ot(vk,{sx:{[`&.${fk.vertical}`]:{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},[`&.${fk.vertical} .${fk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c},[`&.${fk.horizontal} .${fk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c}}}),...x,...k,children:e.map((e,t)=>{const o=D===e.id,a=t===i,s={entityId:e.id,entity:"molecule_item",entityType:"stepper_item"},l=M?{onClick:e=>{M&&(e.stopPropagation(),S?.(s,!1))},onDoubleClick:e=>{M&&(e.stopPropagation(),S?.(s,!0))},"data-organism-id":e.id,css:wtt({theme:_,selected:o})}:{},c=e.color||(a?"#000":"#555");return ot(Yw,{...l,children:nt(pk,{sx:{gap:r,"& .MuiStepLabel-iconContainer":{marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiStepLabel-labelContainer":{display:"flex",flexDirection:"column",alignItems:"flex-start"}},icon:e?.iconName?ot(uGe,{size:n,color:e.iconColor||"#000",iconName:e.iconName,borderRadius:e?.iconBorderRadius||0,backgroundColor:e.iconBackgroundColor||"transparent"}):void 0,children:[ot(yd,{variant:"body1",sx:{padding:"4px",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",color:c,borderRadius:e.borderRadius||"0",display:"inline-block","&.MuiTypography-body1":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.title}),e.subText&&ot(_k,{sx:{margin:0,padding:0,marginTop:"4px",borderLeft:"none","& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"}},transitionDuration:{enter:400,exit:400},children:ot(yd,{variant:"body2",sx:{padding:"4px",fontSize:e.subTextFontSize||"inherit",fontWeight:e.subTextFontWeight||"normal",fontFamily:e.subTextFontFamily||"inherit",color:e.subTextColor||"#666",borderRadius:e.borderRadius||"0",display:"inline-block",..."horizontal"===C&&{maxWidth:"300px"},"&.MuiTypography-body2":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.subText})})]})},e.id)})})},Npt=nl(zk)(({thumbColor:e="#ff0000",thumbCheckedColor:t="#00ff00",trackColor:r="#0000ff",disabledThumbColor:o="#9e9e9e",sx:n})=>({"& .MuiSwitch-thumb":{backgroundColor:e,width:20,height:20},"& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb":{backgroundColor:t},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"&.Mui-disabled .MuiSwitch-thumb":{backgroundColor:o},"&.Mui-disabled .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-switchBase":{padding:"9px","&.Mui-checked":{transform:"translateX(16px)"}},"& .MuiSwitch-colorPrimary":{"&.Mui-checked":{color:t}},"& .MuiSwitch-colorSecondary":{"&.Mui-checked":{color:t}},...n})),Rpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid value",text:a="",thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,labelPlacement:u="top",marginLeft:d="0",marginTop:p="0",marginRight:h="0",marginBottom:f="0",paddingLeft:m="0",paddingTop:y="0",paddingRight:g="0",paddingBottom:v="0",width:x,height:b,minHeight:w,maxHeight:k,minWidth:_,maxWidth:C,name:M,sourceDataModelField:S,disabled:D=!1,sx:O,configurationItemInfo:P,...E})=>{const j=Ut(),T=j?.control,N=!!T&&!!M,R={required:!!r&&o,validate:e=>!(r&&!e)||o},{localStateObject:F}=_C(),{stateConfig:z}=DC(),I=dt(),A=F||z,L=S?A?.[S]?.value:void 0,[B,V]=e.useState(!1);if(t){const e=S?I?.getDmfValue(S):void 0;let t=!1;return t=void 0!==e?"true"===String(e).toLowerCase()||!0===e:N?!!j.watch(M):!!L,nt(Uy,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiTypography-root":{marginLeft:"8px",fontSize:"14px",fontWeight:500,color:"#333"},...O},...P,children:[a&&ot(fg,{component:"legend",children:a}),nt(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:[ot(Npt,{disabled:!0,checked:t,thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{pointerEvents:"none"}},...E}),ot(yd,{sx:{ml:1},children:t?"ON":"OFF"})]})]})}return nt(Uy,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiFormHelperText-root":{marginTop:"4px",fontSize:"12px",color:"#d32f2f"},...O},...P,children:[a&&ot(fg,{component:"legend",children:a}),N?ot(Jt,{name:M,rules:R,control:T,defaultValue:!1,render:({field:e,fieldState:t})=>nt(rt,{children:[ot(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:ot(Npt,{checked:!!e.value,disabled:D,onChange:(t,r)=>e.onChange(r),thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})}),t.error&&ot(lg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.error.type?o:n})]})}):ot(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:ot(Npt,{checked:B,disabled:D,onChange:(e,t)=>{V(t)},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})})]})},Fpt=({items:t,onTabChange:r,activeTabKey:o,isMobile:n=!1,marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,buttonPaddingTop:h,buttonPaddingRight:f,buttonPaddingBottom:m,buttonPaddingLeft:y,width:g,height:v,backgroundColor:x,borderRadius:b,elevation:w=1,gap:k,indicatorVisible:_=!0,indicatorColor:C,lineWidth:M="2px",orientation:S="horizontal",activeTextColor:D="#1976d2",inactiveTextColor:O="#000",fontSize:P,fontWeight:E,fontFamily:j,wrapText:T,textAlign:N,iconName:R,iconColor:F,iconSize:z,iconPlacement:I="left",hoverTextColor:A,itemBorder:L,itemBorderRadius:B,itemBackgroundColor:V,itemSelectedBackgroundColor:$,itemHoverBackgroundColor:H,selectedItemElevation:q=0,itemDisableRipple:W,configurationItemInfo:U,sx:G})=>{const K=Ge(),{isConfigurationMode:Y,onConfigurationItemClicked:Z,selectedConfigurationItemId:X}=_C(),[Q,J]=e.useState(null),ee=e=>J(e.currentTarget),te=()=>J(null),re={marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,width:g,height:v,backgroundColor:x,borderRadius:b,display:"flex",overflow:"visible !important"},oe=e=>{const t=e?D:O,r=e&&$||V;return{color:t,fontSize:P,fontWeight:E,fontFamily:j,textAlign:N,whiteSpace:T?"normal":"nowrap",border:L,borderRadius:B,backgroundColor:r,boxShadow:e?K.shadows[q]:void 0,paddingTop:h,paddingRight:f,paddingBottom:m,paddingLeft:y,"&:hover":{color:A||t,backgroundColor:H||r}}},ne=e=>{r?.({newTabKey:e.tabKey,link:e.link})},ae=e=>{if(!Y)return{};const t=e.id===X,r={entityId:e.id,entity:"molecule_item",entityType:"tabs_item"};return{onClick:e=>{e.stopPropagation(),Z?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),Z?.(r,!0)},"data-organism-id":e.id,css:wtt({theme:K,selected:t})}},ie=e=>{const t=e.tabKey===o,r=oe(t);return nt(ix,{onClick:()=>{ne(e),te()},sx:{...r,display:"flex",alignItems:"center"},...ae(e),children:[e.iconName&&ot(uGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O,mr:1}}),ot(If,{component:"span",children:e.label})]},e.id)};if(n)return nt($c,{elevation:w,style:re,sx:G,...U,children:[ot(Zu,{onClick:ee,children:ot(uGe,{size:z,color:F,iconName:R})}),ot(tx,{anchorEl:Q,open:Boolean(Q),onClose:te,children:t.map(ie)})]});const se=t.findIndex(e=>e.tabKey===o);return ot($c,{elevation:w,style:re,sx:G,...U,children:ot($_,{value:se<0?0:se,onChange:(e,r)=>Y?null:ne(t[r]),orientation:S,sx:{overflow:"visible","& .MuiTabs-flexContainer":{gap:k}},TabIndicatorProps:{style:_?{height:M,borderRadius:b,backgroundColor:C||D}:{display:"none"}},children:t.map(e=>{const t=e.tabKey===o,r={...oe(t),"&.Mui-selected":{color:t?D:O}};return ot(Vk,{label:e.label,disableRipple:W,sx:{...r,textTransform:"none"},onClick:()=>ne(e),iconPosition:"right"===I?"end":"start",icon:e.iconName?ot(uGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O}}):void 0,...ae(e)},e.id)})})})},zpt=e=>{if(!e)return null;if(e instanceof Date)return zrt(e)?e:null;if("object"==typeof e&&null!==e&&"function"==typeof e.toDate){const t=e.toDate();return t instanceof Date&&zrt(t)?t:null}if("string"==typeof e){const t=e.trim();if(!t)return null;const r=t.match(/(\d{1,2}:\d{2}(?::\d{2})?)/),o=r?r[1]:t,n=new Date,a=["HH:mm:ss","H:mm:ss","HH:mm","H:mm","hh:mm a","h:mm a","hh a","h a","HHmm","Hmm","HH","H"];for(const e of a){const t=$ot(o,e,n);if(zrt(t))return t}return null}return null},Ipt=({name:t,text:r,isDisplayOnly:o=!1,sourceDataModelField:n,configurationItemInfo:a={},placeholderText:i,displayFormat:s="HH:mm",required:l=!1,requiredErrorText:c="This field is required",validationErrorText:u,sx:d,width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,...v})=>{const x=Ut(),b=x?.control,w=!!b&&!!t,{localStateObject:k}=_C(),{stateConfig:_}=DC(),C=dt(),M=k||_,S=n?M?.[n]?.value:void 0,D=zpt(S);e.useRef();const[O,P]=e.useState(D);if(o){const e=n?C?.getDmfValue(n):void 0,o=void 0!==e?e:w?x.watch(t):S,l=zpt(o),c=l&&zrt(l)?$rt(l,s):"";return nt(If,{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiFormHelperText-root":{marginBottom:"4px"},"& .MuiTypography-root":{border:"1px solid #ced4da",borderRadius:"4px",padding:"8px",minWidth:"100px"},...d},children:[r&&ot(lg,{children:r}),ot(yd,{children:c||i||"-"})]})}return ot(If,w?{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:ot(Jt,{name:t,control:b,defaultValue:D??null,rules:{required:!!l&&(c||"This field is required"),validate:e=>{if(null==e||""===e)return!0;const t=zpt(e);return t&&zrt(t)||u||"Invalid time"}},render:({field:{onChange:e,value:t},fieldState:o})=>ot(hdt,{...v,enableAccessibleFieldDOMStructure:!1,value:zpt(t),onChange:t=>{const r=zpt(t);e(r?$rt(r,"HH:mm"):null)},slots:{textField:G_},slotProps:{textField:{label:r,placeholder:i,error:!!o.error,helperText:o.error?.message,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})}:{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:ot(hdt,{...v,enableAccessibleFieldDOMStructure:!1,value:O,onChange:e=>P(zpt(e)),slots:{textField:G_},slotProps:{textField:{label:r,placeholder:i,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})},Apt=({src:t,poster:r,controls:o=!1,loop:n=!1,autoplay:a=!1,raised:i=!1,alt:s="",height:l="100%",width:c="100%",borderRadius:u="0",margin:d=0,padding:p=0,moleculeId:h,enableCoverImage:f,configurationItemInfo:m,marginTop:y="0px",marginRight:g="0px",marginBottom:v="0px",marginLeft:x="0px",paddingTop:b="0px",paddingRight:w="0px",paddingBottom:k="0px",paddingLeft:_="0px",sx:C})=>{const[M,S]=e.useState(!1),{onStateChange:D}=OC(),O=()=>{D({id:h,type:"started"})};return ot(Lpt,{id:h,raised:i,onClick:O,sx:{borderRadius:`${u}px`,margin:d,padding:p,marginTop:y,marginRight:g,marginBottom:v,marginLeft:x,paddingTop:b,paddingRight:w,paddingBottom:k,paddingLeft:_,"& .MuiCard-root":{display:"inline-block",overflow:"hidden"},"& .MuiCardMedia-root":{height:l,width:c,objectFit:"cover"},"& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"},...C},...m,children:M?ot(yd,{component:"div",sx:{height:l,width:c,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",color:"gray",textAlign:"center"},children:s||"Video unavailable"}):ot(sm,{component:"video",src:t,poster:f?r:void 0,controls:o,loop:n,autoPlay:a,muted:a,"aria-label":s,sx:{height:l,width:c,objectFit:"cover","& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"}},onPlay:O,onEnded:()=>{D({id:h,type:"completed"})},onError:()=>{S(!0)}})})},Lpt=xo(tm)`
|
|
1027
|
+
${({scrollable:e})=>e?"\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0; /* Important for flex children to respect overflow */\n ":""}
|
|
1028
|
+
`,upt=({currentWebpageId:t,anchor:r="left",variant:o="persistent",open:n=!1,onClose:a,items:i=[],withButton:s=!0,buttonText:l="",buttonVariant:c="contained",buttonTextColor:u,buttonFontSize:d,buttonFontWeight:p,buttonFontFamily:h,buttonDisabled:f=!1,buttonGap:m=0,buttonStartIcon:y,buttonEndIcon:g,buttonBorderRadius:v="0px",buttonPaddingTop:x="0px",buttonPaddingRight:b="0px",buttonPaddingBottom:w="0px",buttonPaddingLeft:k="0px",buttonMarginTop:_="0px",buttonMarginRight:C="0px",buttonMarginBottom:M="0px",buttonMarginLeft:S="0px",buttonIconOnly:D,buttonElevation:O,buttonFillColor:P,buttonFillColorDisabled:E,buttonFillColorHover:j,buttonFillColorPressed:T,buttonBorderColor:N,buttonBorderColorDisabled:R,buttonBorderColorHover:F,buttonBorderColorPressed:z,buttonTextColorDisabled:I,buttonTextColorHover:A,buttonTextColorPressed:L,buttonColor:B="#1976d2",buttonDisabledColor:V,withCloseIcon:$=!0,closeIconColor:H=Kr.colors.gray2,closeIconName:q="x",closeIconSize:W=18,closeIconBackgroundColor:U="rgba(255, 255, 255, 0.9)",closeIconVisible:G=!1,closeIconTop:K="16px",closeIconLeft:Y="16px",closeIconBorderRadius:Z="50%",closeIconElevation:X=2,moleculeId:Q,configurationItemInfo:J,sx:ee,contentSx:te,scrollable:re=!1,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:le,mobileWidth:ce,backgroundColor:ue="#fff",gap:de="8px",marginTop:pe="0px",marginRight:he="0px",marginBottom:fe="0px",marginLeft:me="0px"})=>{const ye=Ge(),{isConfigurationMode:ge,selectedConfigurationItemId:ve,onConfigurationItemClicked:xe,onInternalNavigation:be}=_C(),{updateDrawer:we,drawerContainerRef:ke,headerHeight:_e,isMobile:Ce}=gC(),[Me,Se]=e.useState(n),[De]=(()=>{try{return tpt()}catch{return[new URLSearchParams,()=>{}]}})(),Oe=e.useMemo(()=>{if(t)return t;const e=De.get(f7e),r=De.get(h7e);let o=null,n=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);o=e.get(f7e),n=e.get(h7e)}catch(WQe){}return e||r||o||n||""},[t,De]);e.useEffect(()=>{Se(n)},[n]);const Pe=Boolean(ge&&(ve===Q||i.some(e=>e.id===ve))),Ee=()=>"permanent"===o||(ge?Pe:s?Me:n);e.useEffect(()=>{const e=Ee(),t="left"===r||"right"===r,n=Ce&&void 0!==ce?ce:le;let a=0;if(void 0!==n)if("number"==typeof n)a=n;else if("string"==typeof n){const e=parseFloat(n);Number.isNaN(e)||(a=e)}let i=0;if(t&&!Ce)switch(o){case"permanent":i=a;break;case"persistent":default:i=e?a:0;break;case"temporary":i=0}return we({isOpen:e,position:r,width:i}),()=>{we({isOpen:!1,width:0})}},[Me,n,Pe,ge,s,r,le,ce,Ce,o,we]);const je=()=>{"permanent"!==o&&Se(!0)},Te=(e,t)=>{"permanent"!==o&&(Se(!1),a?.(e,t))},Ne=Ce&&void 0!==ce?ce:le,Re=ot(npt,{anchor:r,variant:o,open:Ee(),onClose:Te,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:Ne,backgroundColor:ue,marginTop:`calc(${_e} + ${pe})`,marginRight:he,marginBottom:fe,marginLeft:me,container:ke,sx:ee,children:nt(spt,{scrollable:re,sx:te,...J&&Object.keys(J).length?{...J,"data-testid":"drawer-content-config","aria-label":"drawer-content"}:{},children:[(Ee()||"permanent"===o)&&i.length>0?ot(cpt,{gap:de,scrollable:re,children:i.map(e=>{const t=ve===e.id,r={entityId:e.id,entity:"molecule_item",entityType:e.type},o=ge?{onClick:e=>{e.stopPropagation(),xe?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),xe?.(r,!0)},"data-organism-id":e.id,css:wtt({theme:ye,selected:t})}:{};switch(e.type){case"menu_item":{const t=e;e.id;const r=(e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=S7e(t.internalLink);return!(!r||!Oe)&&r===Oe})(t),n={backgroundColor:t.backgroundColor||"transparent",paddingTop:t.paddingTop||"8px",paddingRight:t.paddingRight||"16px",paddingBottom:t.paddingBottom||"8px",paddingLeft:t.paddingLeft||"16px",opacity:t.disabled?.6:1,pointerEvents:t.disabled?"none":"auto","&:hover":{backgroundColor:t.disabled?t.backgroundColor||"transparent":"rgba(0, 0, 0, 0.08)"}},a=t.sx?[n,t.sx]:n;return nt(ix,{sx:a,selected:r,onClick:()=>{if(t?.link){w7e(t.link)?be?.({link:t.link?.internalLink||""}):x7e(t.link?.externalLink)}},disabled:t.disabled,...o,children:[t.startIcon&&ot(uGe,{iconName:t.startIcon,color:t.textColor}),ot(yd,{sx:{ml:t.startIcon?1:0,mr:t.endIcon?1:0,color:t.textColor||"inherit",fontSize:t.fontSize||"inherit",fontWeight:t.fontWeight||"normal",fontFamily:t.fontFamily||"inherit",whiteSpace:t.wrap?"normal":"nowrap",width:"100%",textAlign:t.textAlign||"left"},children:t.text}),t.endIcon&&ot(uGe,{iconName:t.endIcon,color:t.textColor})]},t.id)}case"divider_item":{const t=e;return ot(Odt,{moleculeId:t.id,variant:t.variant,lineWeight:t.lineWeight,orientation:t.orientation,borderColor:t.borderColor,borderRadius:t.borderRadius,marginTop:t.marginTop,marginRight:t.marginRight,marginBottom:t.marginBottom,marginLeft:t.marginLeft,configurationItemInfo:o},t.id)}case"text_item":{const t=e;return ot(Tdt,{id:t.id,text:t.text,align:t.align,color:t.color,wrap:t.wrap,variant:"string"==typeof t.variant&&["inherit","body1","body2","caption","button","overline","subtitle1","subtitle2","h1","h2","h3","h4","h5","h6"].includes(t.variant)?t.variant:void 0,fontSize:t.fontSize??"",fontWeight:["normal","bold"].includes(t.fontWeight)?t.fontWeight:void 0,fontFamily:t.fontFamily??"",marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationsItemInfo:o},t.id)}case"rich_text_item":{const t=e;return ot(jdt,{htmlElementId:t.id,text:t.text,isRichText:!0,marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationItemInfo:o},t.id)}case"image_item":{const t=e;return ot(Pdt,{src:t.src,alt:t.alt||"Drawer image",height:t.height,width:t.width,raised:t.raised,borderRadius:t.borderRadius||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",marginLeft:t.marginLeft||"0",paddingTop:t.paddingTop||"0",paddingRight:t.paddingRight||"0",paddingBottom:t.paddingBottom||"0",paddingLeft:t.paddingLeft||"0",onClick:()=>{if(t?.link){w7e(t.link)?be?.({link:t.link?.internalLink||""}):x7e(t.link?.externalLink)}},moleculeId:t.id,configurationItemInfo:o},t.id)}default:return null}})}):null,!!$&&(!!G||Ee())&&ot(lpt,{top:K,left:Y,borderRadius:Z,elevation:X,backgroundColor:U,onClick:e=>{e.stopPropagation();Ee()?Te(e,"closeIconClicked"):je()},"data-testid":"close-icon",children:ot(uGe,{"data-testid":"icon-renderer",iconName:q,size:W,color:H})})]})});return s&&"permanent"!==o?nt(rt,{children:[ot(_Ge,{moleculeId:Q,gap:m,text:l,variant:c,textColor:u,fontSize:d,fontWeight:["normal","bold"].includes(p)?p:void 0,fontFamily:h,disabled:f,startIcon:y,endIcon:g,marginTop:_,marginRight:C,marginBottom:M,marginLeft:S,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,borderRadius:v,iconOnly:D,elevation:O,fillColor:P||B,fillColorDisabled:E||V,fillColorHover:j,fillColorPressed:T,borderColor:N,borderColorDisabled:R,borderColorHover:F,borderColorPressed:z,textColorDisabled:I,textColorHover:A,textColorPressed:L,externalOnClick:e=>Me?Te(e,"buttonClicked"):je(),configurationItemInfo:J}),ot(ipt,{children:Re})]}):ot(ipt,{children:Re})},dpt=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return ot(mKe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:DKe,guide:!0,placeholderChar:" "})}),ppt=({masked:e,errorMsg:t,inputSx:r,labelSx:o,sx:n,...a})=>{const i=e?{inputComponent:dpt}:{};return ot(G_,{...a,variant:"outlined",error:!!t,helperText:t||null,type:"text",sx:{...n},slotProps:{input:{sx:{...r,...n},...i},inputLabel:{sx:{...o,...n}}}})},hpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Email is required",validationErrorText:n="Invalid email address",text:a,placeholderText:i,masked:s=!1,multiLine:l=!1,backgroundColor:c,borderColor:u,color:d="inherit",fontSize:p="16px",fontFamily:h="inherit",fontWeight:f="normal",textAlign:m="left",marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,sx:E,name:j,sourceDataModelField:T,configurationItemInfo:N})=>{const R=Ut(),F=R?.control,z=!(!F||!j),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=T?B?.[T]?.value:void 0,$=T?L?.getDmfValue(T):void 0;e.useState("");const[H,q]=e.useState(""),W={required:!!r&&o,pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@(([^<>()[\]\\.,;:\s@"]+\.)+[^<>()[\]\\.,;:\s@"]{2,})$/,message:n}};if(t){let e="";e=void 0!==$?String($??""):z?R.watch(j)||"":V||"";const t=e||i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...N,children:[a&&ot(lg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...E},children:a}),ot(yd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",textAlign:m,...E},children:t})]})}const U={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-input":{textAlign:m,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_}},G={color:d,"&.Mui-focused":{color:d}},K=l?3:1,Y={...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return ot("div",z?{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:ot(Jt,{name:j,rules:W,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(ppt,{masked:s,required:r,errorMsg:t.error?.message,inputSx:U,labelSx:G,sx:{...Y,...E},label:a,placeholder:i,multiline:l,minRows:K,value:e.value||"",onChange:e.onChange,...N||{}})})}:{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:ot(ppt,{masked:s,required:r,errorMsg:void 0,inputSx:U,labelSx:G,sx:{...Y,...E},label:a,placeholder:i,multiline:l,minRows:K,value:H,onChange:e=>q(e.target.value),...N||{}})})},fpt=({src:t,text:r,type:o,link:n,sourceDataModelField:a,color:i=Kr.colors.deepBlue,disabled:s=!1,disabledColor:l,underline:c="hover",variant:u="body2",margin:d="0",padding:p="0",moleculeId:h,configurationItemInfo:f,marginTop:m="0",marginRight:y="0",marginBottom:g="0",marginLeft:v="0",paddingTop:x="0",paddingRight:b="0",paddingBottom:w="0",paddingLeft:k="0",fontFamily:_,fontWeight:C,fontSize:M,align:S,target:D,sx:O,borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,iconOnly:N,ariaLabel:R,iconName:F,iconSize:z,validationErrorText:I})=>{const{onStateChange:A}=OC(),{onInternalNavigation:L,isConfigurationMode:B,localStateObject:V}=_C(),{stateConfig:$}=DC(),H=dt(),q=V||$,W=e.useMemo(()=>{if(!a)return;const e=H?.getDmfValue(a);return null!=e?e:q?.[a]?.value},[H,a,q]),U=Boolean(a),G=e.useMemo(()=>{if(U)return W?String(W):void 0;const e=n?w7e(n):"internalLink"===o||"internal_link"===o,r=n?e?n.internalLink:n.externalLink:void 0;return t??r??void 0},[U,W,n,o,t]),K=!U&&!!n&&w7e(n),Y=U?D||"_blank":D||(K?"_self":"_blank"),Z=!!U&&!(e=>{if(!e)return!1;try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}})(G),X=Z?"#d32f2f":s?l||Wr(i):i,Q=B||s||Z?void 0:G,J=Boolean(F),ee="regular"===C?"normal":C,te=N?ot(uGe,{iconName:F||"external-link",size:z??16}):nt(rt,{children:[ot("span",{children:r}),J&&ot(uGe,{iconName:F,size:z??16})]}),{onClick:re,onDoubleClick:oe,...ne}=f||{},ae=ot(rv,{href:Q,component:"a",target:Y,onClick:e=>{A({id:h,type:"clicked"}),s||B||Z?e.preventDefault():U&&G?(e.preventDefault(),x7e(G)):K&&G?(e.preventDefault(),L?.({link:G})):!K&&G&&(e.preventDefault(),x7e(G))},onClickCapture:re||void 0,onDoubleClickCapture:oe||void 0,"aria-label":N?R||r||"link":void 0,sx:{color:X,textDecorationColor:X,margin:d,padding:p,marginTop:m,marginRight:y,marginBottom:g,marginLeft:v,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,fontFamily:_,fontWeight:ee,fontSize:M,textAlign:S,alignItems:"center",cursor:s?"not-allowed":"pointer",borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,display:N||J?"inline-flex":void 0,gap:J&&!N?"4px":void 0,"& .MuiLink-root":{color:"inherit",textDecorationColor:"inherit"},"&:hover":{color:s?X:Wr(X,.8),textDecorationColor:s?X:Wr(X,.8)},"&:active":{color:s?X:Wr(X,.6),textDecorationColor:s?X:Wr(X,.6)},"&.Mui-disabled":{color:l||Wr(i),textDecorationColor:l||Wr(i),cursor:"not-allowed"},...O},align:S,variant:u,underline:c,...ne,children:te});return Z?ot(Sw,{title:I||"Invalid link URL",arrow:!0,children:ot("span",{children:ae})}):ae},mpt=e=>({justifyContent:e.textAlign||"flex-start",backgroundColor:e.backgroundColor,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}),ypt=({popover:t=!0,items:r,marginTop:o="0",marginRight:n="0",marginBottom:a="0",marginLeft:i="0",paddingTop:s="0",paddingRight:l="0",paddingBottom:c="0",paddingLeft:u="0",cornerRadius:d="4px",backgroundColor:p="#fff",width:h="100%",height:f="auto",borderColor:m="#ccc",borderWeight:y="1px",buttonText:g="Open Menu",buttonVariant:v="contained",buttonTextColor:x,buttonFontSize:b,buttonFontWeight:w,buttonFontFamily:k,buttonDisabled:_=!1,buttonGap:C=0,buttonStartIcon:M,buttonEndIcon:S,buttonCornerRadius:D="0",buttonMarginTop:O="0",buttonMarginRight:P="0",buttonMarginBottom:E="0",buttonMarginLeft:j="0",buttonPaddingTop:T="0",buttonPaddingRight:N="0",buttonPaddingBottom:R="0",buttonPaddingLeft:F="0",buttonIconOnly:z,buttonElevation:I,buttonFillColor:A,buttonFillColorDisabled:L,buttonFillColorHover:B,buttonFillColorPressed:V,buttonBorderColor:$,buttonBorderColorDisabled:H,buttonBorderColorHover:q,buttonBorderColorPressed:W,buttonTextColorDisabled:U,buttonTextColorHover:G,buttonTextColorPressed:K,buttonColor:Y="#1976d2",anchorOriginVertical:Z="bottom",anchorOriginHorizontal:X="left",transformOriginVertical:Q="top",transformOriginHorizontal:J="left",elevation:ee=3,sx:te,moleculeId:re,configurationItemInfo:oe})=>{const ne=Ge(),{isConfigurationMode:ae,selectedConfigurationItemId:ie,onConfigurationItemClicked:se,onInternalNavigation:le}=_C(),[ce,ue]=e.useState(null),[de,pe]=e.useState(!1),[he]=(()=>{try{return tpt()}catch{return[new URLSearchParams,()=>{}]}})(),fe=e.useMemo(()=>{const e=he.get(f7e),t=he.get(h7e);let r=null,o=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);r=e.get(f7e),o=e.get(h7e)}catch(WQe){}return e||t||r||o||""},[he]),me=e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=S7e(t.internalLink);return!(!r||!fe)&&r===fe},ye=Boolean(ae&&(ie===re||r.some(e=>e.id===ie))),ge=()=>pe(!0),ve=()=>pe(!1),xe={marginTop:o,marginRight:n,marginBottom:a,marginLeft:i,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:u,"& .MuiMenu-paper":{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},"& .MuiMenu-list":{padding:0,width:h,height:f,overflow:"hidden"},"& .MuiMenuItem-root":{minHeight:"auto",paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemButton-root":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemText-primary":{fontSize:"14px",fontFamily:"inherit"},"& .MuiTypography-root":{fontSize:"14px",fontFamily:"inherit"},...t?{display:"inline-block",zIndex:ne?.zIndex?.drawer}:{width:h,height:f,backgroundColor:p,display:"block",overflow:"hidden",border:`${y} solid ${m}`,borderRadius:d},...te};return t?nt(If,{children:[ot(_Ge,{ref:ue,text:g,variant:v,moleculeId:re,textColor:x,fontSize:b,fontWeight:w,fontFamily:k,disabled:_,gap:C,startIcon:M,endIcon:S,onClick:ge,marginTop:O,marginRight:P,marginBottom:E,marginLeft:j,paddingTop:T,paddingRight:N,paddingBottom:R,paddingLeft:F,borderRadius:D,iconOnly:z,elevation:I,fillColor:A||Y,fillColorDisabled:L,fillColorHover:B,fillColorPressed:V,borderColor:$,borderColorDisabled:H,borderColorHover:q,borderColorPressed:W,textColorDisabled:U,textColorHover:G,textColorPressed:K,configurationItemInfo:oe}),ot(tx,{open:ae?ye:de,variant:"menu",anchorEl:ce,disablePortal:!0,disableScrollLock:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,onClose:ve,anchorOrigin:{vertical:Z,horizontal:X},transformOrigin:{vertical:Q,horizontal:J},elevation:ee,slotProps:{paper:{sx:{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3],"& .MuiMenu-list":xe["& .MuiMenu-list"],"& .MuiMenuItem-root":xe["& .MuiMenuItem-root"],"& .MuiListItemText-primary":xe["& .MuiListItemText-primary"],"& .MuiTypography-root":xe["& .MuiTypography-root"]}}},sx:{...xe,"& .MuiMenu-paper":xe["& .MuiMenu-paper"]},children:r.map(e=>{const t=ie===e.id,r=me(e),o={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},n=ae?e=>{e.stopPropagation(),se?.(o,!1)}:void 0,a=ae?e=>{e.stopPropagation(),se?.(o,!0)}:void 0,i=ae?{onClick:n,onDoubleClick:a,"data-organism-id":e.id,css:wtt({theme:ne,selected:t})}:{};return nt(ix,{sx:mpt(e),selected:r,onClick:()=>{e?.link&&(w7e(e.link)?le?.({link:e.link?.internalLink||""}):x7e(e.link?.externalLink)),ve()},disabled:e.disabled,...i,children:[e.startIcon&&ot(uGe,{iconName:e.startIcon,color:e.textColor}),ot(yd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",width:"100%",textAlign:e.textAlign||"left"},children:e.text}),e.endIcon&&ot(uGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})]}):ot($c,{id:re,sx:{...xe,backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},elevation:ee,...oe,children:ot(lv,{disablePadding:!0,children:r.map(e=>{const t=ie===e.id,r=me(e),o={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},n=ae?e=>{e.stopPropagation(),se?.(o,!1)}:void 0,a=ae?e=>{e.stopPropagation(),se?.(o,!0)}:void 0,i=ae?{onClick:n,onDoubleClick:a,"data-organism-id":e.id,css:wtt({theme:ne,selected:t})}:{};return nt(fv,{disabled:e.disabled,sx:mpt(e),selected:r,onClick:()=>{e?.link&&(w7e(e.link)?le?.({link:e.link?.internalLink||""}):x7e(e.link?.externalLink))},...i,children:[e.startIcon&&ot(uGe,{iconName:e.startIcon,color:e.textColor}),ot(Tv,{primary:ot(yd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",textAlign:e.textAlign||"left"},children:e.text})}),e.endIcon&&ot(uGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})})};const gpt=({errorMsg:e,stepValue:t,minValue:r,allowNegative:o,inputSx:n,labelSx:a,...i})=>ot(G_,{...i,variant:"outlined",type:"number",error:!!e,helperText:e||null,inputProps:{step:t,min:o?void 0:r},slotProps:{input:{sx:n},inputLabel:{sx:a}}}),vpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid numeric value",text:a,placeholderText:i,backgroundColor:s,borderColor:l,textColor:c="#000",fontSize:u,fontFamily:d,fontWeight:p,allowNegative:h=!1,numericPrecision:f="1",name:m,sourceDataModelField:y,marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,configurationItemInfo:D,textAlign:O,minHeight:P,maxHeight:E,minWidth:j,maxWidth:T,sx:N})=>{const R=Ut(),F=R?.control,z=!(!F||!m),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=y?B?.[y]?.value:void 0,$=y?L?.getDmfValue(y):void 0,[H,q]=e.useState(""),W=parseFloat(f),U=h?void 0:0,G={required:!!r&&o,pattern:{value:h?/^-?\d*(\.\d+)?$/:/^\d*(\.\d+)?$/,message:n}};if(h||(G.min={value:0,message:"Value cannot be less than zero"}),t){let e="";e=void 0!==$?String($??""):z?R.watch(m)||"":V;const t=e?function(e,t,r){if(!e)return"";const o=parseFloat(e);if(Number.isNaN(o))return e;if(!r&&o<0)return"0";if(t){const e=(t.split(".")[1]||"").length;if(e>0)return o.toFixed(e)}return e}(e,f,h):i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}},sx:N,...D,children:[a&&ot(lg,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,marginBottom:"4px"},children:a}),ot(yd,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,backgroundColor:s,border:`1px solid ${l||"#ccc"}`,borderRadius:"4px",minWidth:"60px"},children:t})]})}const K={backgroundColor:s,color:c,fontSize:u,fontFamily:d,fontWeight:p,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},"& .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"}},Y={color:c,"&.Mui-focused":{color:c}},Z={...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}};return ot(Uy,z?{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:ot(Jt,{name:m,rules:G,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(gpt,{errorMsg:t.error?.message,label:a,placeholder:i,stepValue:W,minValue:U,allowNegative:h,inputSx:K,labelSx:Y,sx:Z,value:e.value||"",onChange:t=>e.onChange(t.target.value)})})}:{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:ot(gpt,{errorMsg:void 0,label:a,placeholder:i,stepValue:W,minValue:U,allowNegative:h,inputSx:K,labelSx:Y,sx:Z,value:H,onChange:e=>q(e.target.value)})})},xpt=e=>{const t={text:e.label,validate:()=>!0},{rule:r}=e,o=bpt(r);if(o||wpt(r)){const e=((e,t)=>(r=0)=>e?r<=t:r>=t)(o,o?r.MAX:r.MIN);switch(r.type){case"COUNT":t.validate=t=>e(t?.length);break;case"NUMBER_COUNT":t.validate=t=>e(t?.replace(/\D/g,"").length);break;case"CAPITAL_COUNT":t.validate=t=>e((t?.match(/[A-Z]/g)||[]).length);break;case"SPECIAL_CHARACTERS_COUNT":t.validate=t=>e(t?.replace(/[a-z]|\d|\s/gi,"").length);break;case"LOWER_CASE_COUNT":t.validate=t=>e((t?.match(/[a-z]/g)||[]).length)}}return t},bpt=e=>!!e?.MAX,wpt=e=>!!e?.MIN,kpt=({gap:t="0",inputProps:r,validations:o,htmlElementId:n,validationState:a,overridesProperties:i,configurationItemInfo:s,width:l,height:c,minWidth:u,maxWidth:d,minHeight:p,maxHeight:h,marginLeft:f="0",marginTop:m="0",marginRight:y="0",marginBottom:g="0",sx:v,...x})=>{const{watch:b,formState:w,setError:k}=Ut()||{},{text:_,subText:C,placeholderText:M,subPlaceholderText:S,validationText:D}=i,O=o.map(xpt),P="password",E=`reEnter${P}`,j=b?.(P),T=b?.(E);return e.useEffect(()=>{j!==T&&k(E,{type:"manual",message:"Passwords do not match"})},[j,T,k,E]),nt(If,{id:n,sx:{width:"100%",display:"flex",flexDirection:"column",gap:t,marginLeft:f,marginTop:m,marginRight:y,marginBottom:g,...l&&{width:l},...c&&{height:c},...u&&{minWidth:u},...d&&{maxWidth:d},...p&&{minHeight:p},...h&&{maxHeight:h},...v},...s,...x,children:[ot(Ott,{...r,inputType:"password",text:_?.text,name:P,placeholderText:M?.text}),ot(Ott,{...r,inputType:"password",text:C?.text,name:E,placeholderText:S?.text}),ot(sKe,{rules:O,value:j,label:D?.text,isSubmitted:w?.isDirty,validationState:a})]})},_pt=["+"," ","(",/[0-9]/,/[0-9]/,/[0-9]/,")"," ",/[0-9]/,/[0-9]/,/[0-9]/,"-",/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],Cpt=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return ot(mKe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:_pt,guide:!0,placeholderChar:" "})});function Mpt(e){const t=(e??"").replace(/\D+/g,"");if(!t)return"";let r="",o=0;return _Ke.forEach(e=>{"string"==typeof e?r+=e:o<t.length?(r+=t[o],o+=1):r+="_"}),r}const Spt=({masked:e,errorMsg:t,inputSx:r,labelSx:o,...n})=>ot(G_,{...n,variant:"outlined",error:!!t,helperText:t||null,slotProps:{input:{sx:r,...e?{inputComponent:Cpt}:{}},inputLabel:{sx:o}}}),Dpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Phone is required",validationErrorText:n="Invalid phone number",text:a,placeholderText:i,masked:s=!0,multiLine:l=!1,backgroundColor:c,borderColor:u,textColor:d="#000",fontSize:p,fontFamily:h,fontWeight:f,textAlign:m,marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,name:E,sourceDataModelField:j,configurationItemInfo:T,sx:N})=>{const R=Ut(),F=R?.control,z=!(!F||!E),{localStateObject:I}=_C(),{stateConfig:A}=DC(),L=dt(),B=I||A,V=j?B?.[j]?.value:void 0,$=j?L?.getDmfValue(j):void 0,[H,q]=e.useState(""),W={required:!!r&&o,pattern:{value:/^\d{10}$/,message:n}};if(t){let e="";e=void 0!==$?String($??""):z?R.watch(E)||"":String(V??"");const t=(s?Mpt(e):e)||i||"-";return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}},...T,children:[a&&ot(lg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...N},children:a}),ot(yd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",...N},children:t})]})}const U={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"}},G={color:d,"&.Mui-focused":{color:d}},K={marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,width:"fit-content",...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return ot(Uy,z?{required:r,sx:{...K,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:ot(Jt,{name:E,rules:W,control:F,defaultValue:"",render:({field:e,fieldState:t})=>ot(Spt,{masked:s,errorMsg:t.error?.message,inputSx:U,labelSx:G,label:a,placeholder:i,value:e.value||"",onChange:t=>{const r=(t?.target?.value??"").toString().replace(/\D+/g,"");e.onChange(r)}})})}:{required:r,sx:{...K,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:ot(Spt,{masked:s,errorMsg:void 0,inputSx:U,labelSx:G,label:a,placeholder:i,value:H,onChange:e=>{const t=(e?.target?.value??"").toString();q(t.replace(/\D+/g,""))}})})},Opt=({text:t,name:r,isDisplayOnly:o=!1,required:n=!1,requiredErrorText:a="This field is required",validationErrorText:i="Invalid rating",placeholderText:s="",hoverFeedback:l=!1,sourceDataModelField:c,textAlign:u="left",color:d="black",textColor:p,selectColor:h,fontSize:f=14,fontFamily:m="Arial, sans-serif",fontWeight:y="normal",marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,minHeight:D,maxHeight:O,minWidth:P,maxWidth:E,placement:j="right",configurationItemInfo:T={},disabled:N=!1,maxValue:R=5,ratingPrecision:F=.5,sx:z,...I})=>{const A=Ut(),L=A?.control,B=!!A&&!!L&&!!r,{localStateObject:V}=_C(),{stateConfig:$}=DC(),H=dt(),q=V||$,W=c?q?.[c]?.value:void 0;!B||A.formState.errors;const[U,G]=e.useState(null),[K,Y]=e.useState(-1),Z=l&&-1!==K;if(o){const e=c?H?.getDmfValue(c):void 0;let r=null;const o=e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e;if(void 0!==e)r=o(e);else if(c&&q?.[c]){const e=q?.[c]?.value;r=o(e)}return nt(Uy,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...z},...T,children:[t&&ot(yd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),ot(ib,{value:r,max:R,precision:F,readOnly:!0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},...z},...I})]})}const X={required:!!n&&a,validate:e=>!n||null!==e&&0!==e||a};return nt(Uy,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...z},...T,children:[t&&ot(yd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),nt(If,{sx:{display:"flex",alignItems:"center"},children:["left"===j&&ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:Z?K:B?A.getValues(r)??W??"":U??W??""}),ot(Jt,{name:r,control:L,defaultValue:"number"==typeof W?W:null,rules:X,render:({field:e,fieldState:{error:t}})=>nt(rt,{children:[ot(ib,{value:e.value??W??0,max:R,precision:F,disabled:N,onChange:(t,r)=>e.onChange(r),onChangeActive:l?(e,t)=>Y(t??-1):void 0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},marginX:l?1:0,...z},...I}),t&&ot(lg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.type?a:i})]})}),"right"===j&&ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:Z?K:B?A.getValues(r)??W??"":U??W??""})]})]})},Ppt=({open:t,text:o,disabled:n,sx:a,placeholderText:i,required:s=!1,requiredErrorText:c="This field is required",validationErrorText:u="Invalid format",isDisplayOnly:d=!1,displayText:p,visible:h=!0,fontSize:f,fontFamily:m,fontWeight:y,textColor:g,textAlign:v,borderColor:x,color:b,backgroundColor:w,marginLeft:k="0",marginTop:_="0",marginRight:C="0",marginBottom:M="0",paddingLeft:S="12px",paddingTop:D="14px",paddingRight:O="12px",paddingBottom:P="14px",width:E,height:j,minHeight:T,maxHeight:N,minWidth:R,maxWidth:F,configurationItemInfo:z={},name:I,sourceDataModelField:A,predefinedValue:L,...B})=>{const V=d?void 0:A,{dataModelFieldOptions:$,isLoading:H}=(e=>{const{pickList:t}=ct(),{data:o=[],refetch:n,isLoading:a}=r.useQuery({queryKey:[dGe,e],queryFn:()=>t.get(e),select:e=>{const t=e?.data;return Array.isArray(t)?t:t&&Array.isArray(t.data)?t.data:[]},enabled:Boolean(e),refetchOnWindowFocus:!0,refetchOnMount:!0});return{dataModelFieldOptions:o,refetch:n,isLoading:a}})(V),q=Ut(),W=q?.control,U=!!q&&!!W&&!!I,{formState:G}=q||{},{localStateObject:K,localState:Y,setLocalStateValue:Z,isConfigurationMode:X,selectedConfigurationItemId:Q}=_C(),{stateConfig:J}=DC(),{isMLR:ee}=gC(),te=dt(),re=K||J,oe=A?re?.[A]:void 0,ne=oe?.value||("string"==typeof oe||"number"==typeof oe?oe:void 0),ae=A?te?.getDmfValue(A):void 0,ie="string"==typeof ae||"number"==typeof ae?ae:ae&&"object"==typeof ae?ae.value??ae.label??ae.id:void 0,[se,le]=e.useState(""),[ce,ue]=e.useState(!1),[de,pe]=e.useState(!1),he=e.useRef(null),fe=e.useRef(null),me=l.default.useCallback(e=>{fe.current=e,pe(null!==e)},[]),ye=X&&Q===z?.["data-configuration-id"];e.useEffect(()=>{X&&ue(!!ye)},[ye,X]);const ge=e.useMemo(()=>!(Boolean(n)||null!=L&&""!==L)&&(X?!!ye&&ce:ee?t||!1:void 0),[X,ye,ce,ee,t,n,L]),ve=e.useMemo(()=>null!=L&&""!==L,[L]),xe=e.useMemo(()=>Boolean(n)||ve,[n,ve]);e.useEffect(()=>{ve&&null!=L&&(U?q?.setValue(I,L):le(L))},[ve,L,U,q,I]);const be=e.useMemo(()=>({required:!!s&&c,validate:()=>!0}),[s,c]),we=e.useMemo(()=>($||[]).map(e=>"string"==typeof e?{id:e,label:e}:e),[$]),ke=!xe&&(X&&ye||ee&&t),_e=ke&&de&&null!==fe.current,Ce=e.useMemo(()=>{const e=(()=>{switch(v){case"center":return"center";case"right":return"flex-end";case"justify":return"space-between";default:return"flex-start"}})(),t=g||b||"rgba(0, 0, 0, 0.87)",r=g?`${g}50`:"rgba(0, 0, 0, 0.6)",o=g?`${g}30`:"rgba(0, 0, 0, 0.26)";return{typography:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:t},menuItem:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:t,minHeight:"48px",padding:"6px 16px",transition:"background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms","&:hover":{backgroundColor:"rgba(127, 127, 127, 0.08)"},"&.Mui-selected":{backgroundColor:"rgba(25, 118, 210, 0.12)","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.2)"}},"&.Mui-disabled":{color:o,backgroundColor:"rgba(127, 127, 127, 0.06)"}},inputSx:{fontSize:f,fontFamily:m,fontWeight:y,color:b,minHeight:"56px","& .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:x||"inherit"},"& .MuiSelect-select":{display:"flex",alignItems:"center",justifyContent:e,backgroundColor:w,textAlign:v,boxSizing:"border-box",paddingLeft:S,paddingTop:D,paddingRight:O,paddingBottom:P,minHeight:"1.4375em",lineHeight:"1.4375em"}},formControlSx:{marginLeft:k,marginTop:_,marginRight:C,marginBottom:M,...E&&{width:E},...j&&{height:j},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N},...R?{minWidth:R}:E?{}:{minWidth:"240px"},...a},placeholderTypography:{fontSize:f||"1rem",fontFamily:"string"==typeof m?m:"inherit",color:r},placeholderColor:r}},[v,f,m,b,g,y,x,w,S,D,O,P,k,_,C,M,E,j,F,R,T,N]),Me=()=>ot(ix,{disabled:!0,value:"",sx:{...Ce.menuItem,backgroundColor:"rgba(0, 0, 0, 0.06) !important","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.06) !important"}},children:ot("em",{style:{fontStyle:"italic",...Ce.placeholderTypography},children:i||"Select an option"})});e.useEffect(()=>{if(!d||!U)return;const e=null!=ie?String(ie):void 0,t=null!=ne?String(ne):void 0,r=("string"==typeof p&&""!==p?p:void 0)??e??t;void 0!==r&&q?.setValue(I,r)},[d,U,p,ie,ne,q,I]);const Se=(e,t)=>H?nt(ix,{disabled:!0,value:"loading",sx:Ce.menuItem,children:[ot(qu,{size:20,sx:{mr:1}}),"Loading..."]}):we.map(r=>ot(ix,{value:r.id,selected:e===r.id,onClick:t?()=>t(r.id):void 0,sx:Ce.menuItem,children:r.label},r.id));if(d){const e=!E||"auto"===E,t=("string"==typeof p&&""!==p?p:void 0)??(null!=ie?String(ie):void 0)??(null!=ne?String(ne):void 0)??(i||"-");return nt("div",{style:{display:"inline-flex",flexDirection:"column",marginTop:_,marginRight:C,marginBottom:M,marginLeft:k,...E?{width:E}:{width:"fit-content"},...j&&{height:j},...T&&{minHeight:T},...N&&{maxHeight:N},...R&&{minWidth:R},...F&&{maxWidth:F}},...z,children:[o&&ot("div",{style:{marginBottom:4},children:ot(lg,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:g||"#000",marginLeft:0,textAlign:v},children:o})}),ot(yd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:g,textAlign:v,paddingLeft:S,paddingTop:D,paddingRight:O,paddingBottom:P,backgroundColor:w,border:`1px solid ${x||"#ccc"}`,borderRadius:"4px",...e?{width:"fit-content"}:{}},children:t})]})}const De={slotProps:{paper:{elevation:3,sx:{borderRadius:"4px",backgroundColor:w||"background.paper",boxShadow:"0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)",...Ce.typography,..._e?{display:"none !important",visibility:"hidden !important",opacity:"0 !important",pointerEvents:"none !important",position:"absolute !important",top:"-9999px !important",left:"-9999px !important",zIndex:"-9999 !important"}:{}}}},MenuListProps:{sx:{padding:"8px 0",...w&&{backgroundColor:w},"& .MuiMenuItem-root":Ce.menuItem}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},..._e?{disableScrollLock:!0,disablePortal:!0,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,hideBackdrop:!0}:{}},Oe=(e,t)=>{t?.onChange?t.onChange(e):(le(e),A&&Z&&Z(A,{id:e}))},Pe=e=>{if(!e||""===e)return ot("em",{style:{color:Ce.placeholderColor,fontStyle:"italic"},children:i||"Select an option"});const t=we.find(t=>t.id===e);return t?t.label:e},Ee=(e,t)=>nt(kb,{...e||{},...B,...X?{open:ge}:{},...ee?{open:ge}:{},...ke?{open:!1,onClose:()=>{},onOpen:()=>{}}:{},error:t,disabled:xe,value:e?.value??se,onChange:t=>{_e||Oe(t.target.value,e)},labelId:`select-label-${I}`,input:ot(_x,{label:o}),displayEmpty:!0,renderValue:Pe,MenuProps:De,sx:{...Ce.inputSx,...E&&{width:E},...j&&{height:j},...R&&{minWidth:R},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N}},inputProps:{"aria-label":o},children:[Me(),Se()]}),je=e=>{if(!_e||xe)return null;const t=e?.value??se;return ot(nh,{open:!0,anchorEl:fe.current,placement:"bottom-start",disablePortal:!0,transition:!0,sx:{zIndex:1300},children:({TransitionProps:r})=>ot(wg,{...r,timeout:150,style:{transformOrigin:"top left"},children:ot($c,{elevation:3,sx:{borderRadius:"4px",backgroundColor:w||"background.paper",minWidth:fe.current?.offsetWidth||240,width:fe.current?.offsetWidth||240,maxHeight:300,overflowY:"auto",overflowX:"hidden",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none",width:0,height:0},boxShadow:"rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px",...Ce.typography},children:nt(Av,{sx:{padding:"8px 0",...w&&{backgroundColor:w},"& .MuiMenuItem-root":Ce.menuItem},children:[Me(),Se(t,t=>Oe(t,e))]})})})})};return h?ot("div",{ref:he,style:{position:"relative",...E&&{width:E},...j&&{height:j},...R&&{minWidth:R},...F&&{maxWidth:F},...T&&{minHeight:T},...N&&{maxHeight:N}},...z,onClick:e=>{if(X&&z&&"onClick"in z){e.stopPropagation();z.onClick()}},children:nt(Uy,{ref:me,variant:"outlined",sx:Ce.formControlSx,error:!!G?.errors?.[I],disabled:xe,required:s,children:[ot(Fg,{id:`select-label-${I}`,shrink:!0,sx:{color:g||"rgba(0, 0, 0, 0.6)",fontSize:f,fontFamily:m,fontWeight:y,"&.Mui-focused":{color:g||"rgba(0, 0, 0, 0.6)"}},children:o}),U?ot(Jt,{name:I,control:W,rules:be,render:({field:e,fieldState:{error:t}})=>nt(rt,{children:[Ee(e,!!t),je(e)]})}):nt(rt,{children:[Ee(void 0,!1),je(void 0)]}),G?.errors?.[I]&&ot(lg,{error:!0,children:G?.errors?.[I]?.message||("required"===G?.errors?.[I]?.type?c:u)})]})}):null};const Ept=({text:e,name:t,isDisplayOnly:r=!1,required:o=!1,requiredErrorText:n="This field is required",validationErrorText:a="Invalid value",placeholderText:i="",startIcon:s,endIcon:l,borderColor:c,selectLineColor:u,lineWeight:d=1,orientation:p="horizontal",textColor:h,fontSize:f,fontFamily:m,fontWeight:y,valueFormat:g,valueDisplay:v="auto",iconSize:x,selectColor:b,iconColor:w,minValue:k=0,maxValue:_=100,step:C,labelPlacement:M="top",marginLeft:S="0",marginTop:D="0",marginRight:O="0",marginBottom:P="0",paddingLeft:E="0",paddingTop:j="0",paddingRight:T="0",paddingBottom:N="0",width:R,height:F,minHeight:z,maxHeight:I,minWidth:A,maxWidth:L,sx:B,configurationItemInfo:V,sourceDataModelField:$,disabled:H=!1,...q})=>{const W=Ut(),U=W?.control,{localStateObject:G}=_C(),{stateConfig:K}=DC(),Y=dt(),Z=G||K,X=$?Z?.[$]?.value:void 0,Q=$?Y?.getDmfValue($):void 0,J={required:!!o&&n,validate:e=>!o||null!=e||n},ee=e=>function(e,t){if(null==e)return"";switch(t){case"$0.00":return`$${e.toFixed(2)}`;case"$123":return`$${e}`;case"%0.00":return`${e.toFixed(2)}%`;case"%123":return`${e}%`;case"0.0":return e.toFixed(1);case"0.00":return e.toFixed(2);default:return e.toString()}}(e,g),te={width:"100%","& .MuiSlider-root":{width:"100%"},"& .MuiSlider-rail":{backgroundColor:c||"#ccc",..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-track":{backgroundColor:u||"#2196f3",border:`1px solid ${u||"#2196f3"}`,..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-thumb":{backgroundColor:b||"#2196f3",width:x||"16px",height:x||"16px",boxShadow:"none","&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:"none"}},"& .MuiSlider-valueLabel":{backgroundColor:b||"#2196f3",color:"#ffffff",borderRadius:"4px",fontSize:"12px",fontWeight:500},"& .MuiSlider-mark":{backgroundColor:c||"#ccc",width:"2px",height:"2px",borderRadius:"50%"},"& .MuiSlider-markActive":{backgroundColor:b||"#2196f3"},...B};if(r){let t=null;const r=e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e;if(void 0!==Q)t=r(Q);else if($&&Z?.[$]){const e=Z?.[$]?.value;t=r(e)}return nt(Uy,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...z&&{minHeight:z},...I&&{maxHeight:I},...A&&{minWidth:A},...L&&{maxWidth:L},...B},...V,children:[e&&ot(fg,{children:e}),nt(If,{display:"flex",flexDirection:"top"===M?"column":"row",alignItems:"center",mt:"top"===M?1:0,children:[s&&ot(If,{mr:"horizontal"===p?1:0,mb:"vertical"===p?1:0,children:ot(uGe,{iconName:s,color:w})}),ot(nw,{value:t??void 0,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:ee,sx:te,disabled:!0,...q}),l&&ot(If,{ml:"horizontal"===p?1:0,mt:"vertical"===p?1:0,children:ot(uGe,{iconName:l,color:w})}),ot(yd,{sx:{ml:1,fontSize:f,fontFamily:m,fontWeight:y,color:h},children:t})]})]})}return nt(Uy,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...z&&{minHeight:z},...I&&{maxHeight:I},...A&&{minWidth:A},...L&&{maxWidth:L},...B},...V,children:[e&&ot(fg,{children:e}),ot(Jt,{name:t||"",control:U,defaultValue:"number"==typeof X?X:k,rules:J,render:({field:e,fieldState:t})=>nt(rt,{children:[ot(nw,{...e,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:ee,sx:te,onChange:(t,r)=>e.onChange(r),...q}),t.error&&ot(lg,{error:!0,sx:{mt:1},children:"required"===t.error.type?n:a})]})})]})},jpt=({direction:t="up",size:r="medium",ariaLabel:o="Speed Dial",openIconName:n="plus",closeIconName:a="x",openIconColor:i="#fff",closeIconColor:s="#fff",backgroundColor:l="#1976d2",items:c=[],configurationItemInfo:u={},tooltipOpen:d=!1,tooltipPlacement:p,showBackdrop:h=!1,openOnHover:f=!1,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k,moleculeId:_,gap:C,sx:M,...S})=>{const D=Ge(),[O,P]=e.useState(!1),{isConfigurationMode:E,onConfigurationItemClicked:j,selectedConfigurationItemId:T,onInternalNavigation:N}=_C();e.useEffect(()=>{if(!O)return;const e=e=>{"Escape"!==e.key||E||P(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[O,E]);const R=()=>P(!0),F=()=>P(!1);let z={};z=f&&!h?{onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F}:{onClick:e=>{P(e=>!e)}};const I={bgcolor:l,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k},A=O||E&&(T===_||c.some(e=>e.id===T));return nt("div",{role:"presentation",children:[h&&ot(Sf,{open:O}),ot(mw,{ariaLabel:o,direction:t,icon:ot(Lw,{icon:ot(uGe,{iconName:n,color:i,size:24}),openIcon:ot(uGe,{iconName:a,color:s,size:24})}),open:A,onOpen:f&&!h?R:void 0,onClose:f&&!h?F:void 0,FabProps:{color:"primary",sx:I,size:r,gap:C},slotProps:{fab:{"data-testid":"speed-dial-fab","aria-label":o}},sx:{"& .MuiSpeedDial-fab":{backgroundColor:l,...I},"& .MuiSpeedDial-actions":{gap:C||8},"& .MuiSpeedDialIcon-icon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialIcon-openIcon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialAction-fab":{backgroundColor:"#fff",color:"#757575","&:hover":{backgroundColor:"#f5f5f5"}},"& .MuiSpeedDialAction-staticTooltip":{backgroundColor:"rgba(97, 97, 97, 0.9)",color:"#fff",fontSize:"12px",padding:"4px 8px",borderRadius:"4px"},"& .MuiSpeedDialAction-staticTooltipLabel":{fontSize:"12px",fontWeight:500},...M},...z,...u,...S,children:c.map(e=>{const{text:t,link:o}=e.properties??{},{iconName:n="plus",disabled:a=!1,iconColor:i="#757575",tooltipText:s,backgroundColor:l="#fff"}=e.config?.props??{},c=String(t?.text||s||"Action"),u=E&&T===e.id,h={entityId:e.id,entity:"molecule_item",entityType:"speed_dial_action_item"},f=E?{onClick:e=>{e.stopPropagation(),j?.(h,!1)},onDoubleClick:e=>{e.stopPropagation(),j?.(h,!0)},"data-organism-id":e.id,css:wtt({theme:D,selected:u})}:{};return ot(Nw,{icon:ot(uGe,{iconName:n,color:i,size:24}),tooltipOpen:d,tooltipTitle:c,tooltipPlacement:p,FabProps:{sx:{color:i,backgroundColor:l},size:r,disabled:a,"aria-label":c,onClick:e=>{e.stopPropagation(),o?(w7e(o)?N?.({link:o.internalLink??""}):x7e(o.externalLink),P(!1)):P(!1)},...f}},e.id)})})]})},Tpt=({items:e,gap:t,stepGap:r,isMobile:o=!1,iconSize:n="24px",orientation:a="horizontal",activeStep:i=0,lineColor:s,lineWidth:l,lineRadius:c,marginTop:u="0",marginRight:d="0",marginBottom:p="0",marginLeft:h="0",paddingTop:f="0",paddingRight:m="0",paddingBottom:y="0",paddingLeft:g="0",borderRadius:v="0",configurationItemInfo:x,backgroundColor:b="transparent",sx:w,...k})=>{const _=Ge(),C=o?"vertical":a,{isConfigurationMode:M,onConfigurationItemClicked:S,selectedConfigurationItemId:D}=_C();return ot(Ok,{sx:{gap:t,width:"100%",overflow:"hidden",marginTop:u,marginRight:d,marginBottom:p,marginLeft:h,paddingTop:f,paddingRight:m,paddingBottom:y,paddingLeft:g,borderRadius:v,backgroundColor:b,"& .MuiStep-root":{padding:"8px"},"& .MuiStepLabel-root":{gap:r,alignItems:"flex-start"},"& .MuiStepLabel-label":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},"& .MuiStepConnector-root":{flex:"1 1 auto"},"& .MuiStepConnector-line":{borderColor:s,borderWidth:l,borderRadius:c},"& .MuiStepConnector-vertical":{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},"& .MuiStepConnector-horizontal":{marginLeft:"8px",marginRight:"8px"},"& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"},"& .MuiTypography-root":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},...w},activeStep:i,orientation:C,connector:ot(vk,{sx:{[`&.${fk.vertical}`]:{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},[`&.${fk.vertical} .${fk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c},[`&.${fk.horizontal} .${fk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c}}}),...x,...k,children:e.map((e,t)=>{const o=D===e.id,a=t===i,s={entityId:e.id,entity:"molecule_item",entityType:"stepper_item"},l=M?{onClick:e=>{M&&(e.stopPropagation(),S?.(s,!1))},onDoubleClick:e=>{M&&(e.stopPropagation(),S?.(s,!0))},"data-organism-id":e.id,css:wtt({theme:_,selected:o})}:{},c=e.color||(a?"#000":"#555");return ot(Yw,{...l,children:nt(pk,{sx:{gap:r,"& .MuiStepLabel-iconContainer":{marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiStepLabel-labelContainer":{display:"flex",flexDirection:"column",alignItems:"flex-start"}},icon:e?.iconName?ot(uGe,{size:n,color:e.iconColor||"#000",iconName:e.iconName,borderRadius:e?.iconBorderRadius||0,backgroundColor:e.iconBackgroundColor||"transparent"}):void 0,children:[ot(yd,{variant:"body1",sx:{padding:"4px",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",color:c,borderRadius:e.borderRadius||"0",display:"inline-block","&.MuiTypography-body1":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.title}),e.subText&&ot(_k,{sx:{margin:0,padding:0,marginTop:"4px",borderLeft:"none","& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"}},transitionDuration:{enter:400,exit:400},children:ot(yd,{variant:"body2",sx:{padding:"4px",fontSize:e.subTextFontSize||"inherit",fontWeight:e.subTextFontWeight||"normal",fontFamily:e.subTextFontFamily||"inherit",color:e.subTextColor||"#666",borderRadius:e.borderRadius||"0",display:"inline-block",..."horizontal"===C&&{maxWidth:"300px"},"&.MuiTypography-body2":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.subText})})]})},e.id)})})},Npt=nl(zk)(({thumbColor:e="#ff0000",thumbCheckedColor:t="#00ff00",trackColor:r="#0000ff",disabledThumbColor:o="#9e9e9e",sx:n})=>({"& .MuiSwitch-thumb":{backgroundColor:e,width:20,height:20},"& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb":{backgroundColor:t},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"&.Mui-disabled .MuiSwitch-thumb":{backgroundColor:o},"&.Mui-disabled .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-switchBase":{padding:"9px","&.Mui-checked":{transform:"translateX(16px)"}},"& .MuiSwitch-colorPrimary":{"&.Mui-checked":{color:t}},"& .MuiSwitch-colorSecondary":{"&.Mui-checked":{color:t}},...n})),Rpt=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid value",text:a="",thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,labelPlacement:u="top",marginLeft:d="0",marginTop:p="0",marginRight:h="0",marginBottom:f="0",paddingLeft:m="0",paddingTop:y="0",paddingRight:g="0",paddingBottom:v="0",width:x,height:b,minHeight:w,maxHeight:k,minWidth:_,maxWidth:C,name:M,sourceDataModelField:S,disabled:D=!1,sx:O,configurationItemInfo:P,...E})=>{const j=Ut(),T=j?.control,N=!!T&&!!M,R={required:!!r&&o,validate:e=>!(r&&!e)||o},{localStateObject:F}=_C(),{stateConfig:z}=DC(),I=dt(),A=F||z,L=S?A?.[S]?.value:void 0,[B,V]=e.useState(!1);if(t){const e=S?I?.getDmfValue(S):void 0;let t=!1;return t=void 0!==e?"true"===String(e).toLowerCase()||!0===e:N?!!j.watch(M):!!L,nt(Uy,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiTypography-root":{marginLeft:"8px",fontSize:"14px",fontWeight:500,color:"#333"},...O},...P,children:[a&&ot(fg,{component:"legend",children:a}),nt(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:[ot(Npt,{disabled:!0,checked:t,thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{pointerEvents:"none"}},...E}),ot(yd,{sx:{ml:1},children:t?"ON":"OFF"})]})]})}return nt(Uy,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiFormHelperText-root":{marginTop:"4px",fontSize:"12px",color:"#d32f2f"},...O},...P,children:[a&&ot(fg,{component:"legend",children:a}),N?ot(Jt,{name:M,rules:R,control:T,defaultValue:!1,render:({field:e,fieldState:t})=>nt(rt,{children:[ot(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:ot(Npt,{checked:!!e.value,disabled:D,onChange:(t,r)=>e.onChange(r),thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})}),t.error&&ot(lg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.error.type?o:n})]})}):ot(If,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:ot(Npt,{checked:B,disabled:D,onChange:(e,t)=>{V(t)},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})})]})},Fpt=({items:t,onTabChange:r,activeTabKey:o,isMobile:n=!1,marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,buttonPaddingTop:h,buttonPaddingRight:f,buttonPaddingBottom:m,buttonPaddingLeft:y,width:g,height:v,backgroundColor:x,borderRadius:b,elevation:w=1,gap:k,indicatorVisible:_=!0,indicatorColor:C,lineWidth:M="2px",orientation:S="horizontal",activeTextColor:D="#1976d2",inactiveTextColor:O="#000",fontSize:P,fontWeight:E,fontFamily:j,wrapText:T,textAlign:N,iconName:R,iconColor:F,iconSize:z,iconPlacement:I="left",hoverTextColor:A,itemBorder:L,itemBorderRadius:B,itemBackgroundColor:V,itemSelectedBackgroundColor:$,itemHoverBackgroundColor:H,selectedItemElevation:q=0,itemDisableRipple:W,configurationItemInfo:U,sx:G})=>{const K=Ge(),{isConfigurationMode:Y,onConfigurationItemClicked:Z,selectedConfigurationItemId:X}=_C(),[Q,J]=e.useState(null),ee=e=>J(e.currentTarget),te=()=>J(null),re={marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,width:g,height:v,backgroundColor:x,borderRadius:b,display:"flex",overflow:"visible !important"},oe=e=>{const t=e?D:O,r=e&&$||V;return{color:t,fontSize:P,fontWeight:E,fontFamily:j,textAlign:N,whiteSpace:T?"normal":"nowrap",border:L,borderRadius:B,backgroundColor:r,boxShadow:e?K.shadows[q]:void 0,paddingTop:h,paddingRight:f,paddingBottom:m,paddingLeft:y,"&:hover":{color:A||t,backgroundColor:H||r}}},ne=e=>{r?.({newTabKey:e.tabKey,link:e.link})},ae=e=>{if(!Y)return{};const t=e.id===X,r={entityId:e.id,entity:"molecule_item",entityType:"tabs_item"};return{onClick:e=>{e.stopPropagation(),Z?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),Z?.(r,!0)},"data-organism-id":e.id,css:wtt({theme:K,selected:t})}},ie=e=>{const t=e.tabKey===o,r=oe(t);return nt(ix,{onClick:()=>{ne(e),te()},sx:{...r,display:"flex",alignItems:"center"},...ae(e),children:[e.iconName&&ot(uGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O,mr:1}}),ot(If,{component:"span",children:e.label})]},e.id)};if(n)return nt($c,{elevation:w,style:re,sx:G,...U,children:[ot(Zu,{onClick:ee,children:ot(uGe,{size:z,color:F,iconName:R})}),ot(tx,{anchorEl:Q,open:Boolean(Q),onClose:te,children:t.map(ie)})]});const se=t.findIndex(e=>e.tabKey===o);return ot($c,{elevation:w,style:re,sx:G,...U,children:ot($_,{value:se<0?0:se,onChange:(e,r)=>Y?null:ne(t[r]),orientation:S,sx:{overflow:"visible","& .MuiTabs-flexContainer":{gap:k}},TabIndicatorProps:{style:_?{height:M,borderRadius:b,backgroundColor:C||D}:{display:"none"}},children:t.map(e=>{const t=e.tabKey===o,r={...oe(t),"&.Mui-selected":{color:t?D:O}};return ot(Vk,{label:e.label,disableRipple:W,sx:{...r,textTransform:"none"},onClick:()=>ne(e),iconPosition:"right"===I?"end":"start",icon:e.iconName?ot(uGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O}}):void 0,...ae(e)},e.id)})})})},zpt=e=>{if(!e)return null;if(e instanceof Date)return zrt(e)?e:null;if("object"==typeof e&&null!==e&&"function"==typeof e.toDate){const t=e.toDate();return t instanceof Date&&zrt(t)?t:null}if("string"==typeof e){const t=e.trim();if(!t)return null;const r=t.match(/(\d{1,2}:\d{2}(?::\d{2})?)/),o=r?r[1]:t,n=new Date,a=["HH:mm:ss","H:mm:ss","HH:mm","H:mm","hh:mm a","h:mm a","hh a","h a","HHmm","Hmm","HH","H"];for(const e of a){const t=$ot(o,e,n);if(zrt(t))return t}return null}return null},Ipt=({name:t,text:r,isDisplayOnly:o=!1,sourceDataModelField:n,configurationItemInfo:a={},placeholderText:i,displayFormat:s="HH:mm",required:l=!1,requiredErrorText:c="This field is required",validationErrorText:u,sx:d,width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,...v})=>{const x=Ut(),b=x?.control,w=!!b&&!!t,{localStateObject:k}=_C(),{stateConfig:_}=DC(),C=dt(),M=k||_,S=n?M?.[n]?.value:void 0,D=zpt(S);e.useRef();const[O,P]=e.useState(D);if(o){const e=n?C?.getDmfValue(n):void 0,o=void 0!==e?e:w?x.watch(t):S,l=zpt(o),c=l&&zrt(l)?$rt(l,s):"";return nt(If,{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiFormHelperText-root":{marginBottom:"4px"},"& .MuiTypography-root":{border:"1px solid #ced4da",borderRadius:"4px",padding:"8px",minWidth:"100px"},...d},children:[r&&ot(lg,{children:r}),ot(yd,{children:c||i||"-"})]})}return ot(If,w?{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:ot(Jt,{name:t,control:b,defaultValue:D??null,rules:{required:!!l&&(c||"This field is required"),validate:e=>{if(null==e||""===e)return!0;const t=zpt(e);return t&&zrt(t)||u||"Invalid time"}},render:({field:{onChange:e,value:t},fieldState:o})=>ot(hdt,{...v,enableAccessibleFieldDOMStructure:!1,value:zpt(t),onChange:t=>{const r=zpt(t);e(r?$rt(r,"HH:mm"):null)},slots:{textField:G_},slotProps:{textField:{label:r,placeholder:i,error:!!o.error,helperText:o.error?.message,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})}:{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:ot(hdt,{...v,enableAccessibleFieldDOMStructure:!1,value:O,onChange:e=>P(zpt(e)),slots:{textField:G_},slotProps:{textField:{label:r,placeholder:i,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})},Apt=({src:t,poster:r,controls:o=!1,loop:n=!1,autoplay:a=!1,raised:i=!1,alt:s="",height:l="100%",width:c="100%",borderRadius:u="0",margin:d=0,padding:p=0,moleculeId:h,enableCoverImage:f,configurationItemInfo:m,marginTop:y="0px",marginRight:g="0px",marginBottom:v="0px",marginLeft:x="0px",paddingTop:b="0px",paddingRight:w="0px",paddingBottom:k="0px",paddingLeft:_="0px",sx:C})=>{const[M,S]=e.useState(!1),{onStateChange:D}=OC(),O=()=>{D({id:h,type:"started"})};return ot(Lpt,{id:h,raised:i,onClick:O,sx:{borderRadius:`${u}px`,margin:d,padding:p,marginTop:y,marginRight:g,marginBottom:v,marginLeft:x,paddingTop:b,paddingRight:w,paddingBottom:k,paddingLeft:_,"& .MuiCard-root":{display:"inline-block",overflow:"hidden"},"& .MuiCardMedia-root":{height:l,width:c,objectFit:"cover"},"& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"},...C},...m,children:M?ot(yd,{component:"div",sx:{height:l,width:c,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",color:"gray",textAlign:"center"},children:s||"Video unavailable"}):ot(sm,{component:"video",src:t,poster:f?r:void 0,controls:o,loop:n,autoPlay:a,muted:a,"aria-label":s,sx:{height:l,width:c,objectFit:"cover","& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"}},onPlay:O,onEnded:()=>{D({id:h,type:"completed"})},onError:()=>{S(!0)}})})},Lpt=xo(tm)`
|
|
1026
1029
|
display: inline-block;
|
|
1027
1030
|
overflow: hidden;
|
|
1028
1031
|
`,Bpt=({children:e,additionalInfo:t})=>{try{return ot(rt,{children:e})}catch(r){return console.error(`Render error in SafeRender - ${t} :`,r),ot("div",{style:{color:"red",padding:24},children:"Render Error"})}};function Vpt(e,t,r,o){const n={...e};return 0===r.length?{...e,...t}:(t&&o&&r.forEach(e=>{void 0!==t[e]&&(n[e]=t[e])}),n)}function $pt(e,t,r=!1){return t&&r?an(e,t):e}const Hpt=({id:t,type:r,name:o,form:n,config:a,formData:i,isMobile:s,children:l,tabsProps:c,properties:u,moleculeLibraryId:d,organismLibraryMoleculeId:p})=>{const h=Ge(),f=yC("xs"),m=s||f,{formId:y,isPreview:g=!1,validations:v,submitHandler:x,isConfigurationMode:b,onConfigurationItemClicked:w,selectedConfigurationItemId:k,currentStyleProperties:_,currentContentProperties:C,onInternalNavigation:M,organismMetadata:S,organismInfo:D,localState:O}=_C(),{stateConfig:P}=DC(),E=P,j=a?.props?.dataCaptureName||u?.dataCapture?.dataCaptureName||t,T=u?.dataCapture?.sourceDataModelFieldId,N=u?.dataCapture?.predefinedValue,R=k===t,{isStateDisabled:F,isStateVisible:z}=(({stateListenerId:e})=>{const{localStateObject:t}=_C(),{stateConfig:r}=DC(),o=t||r;let n=!0,a=!1;if(!e)return{isStateDisabled:a,isStateVisible:n};const i=o?.[e]||{},{visible:s=!0,disabled:l=!1}=i||{};return e in o&&(n=Boolean(s),a=Boolean(l)),{isStateDisabled:a,isStateVisible:n,stateValue:i}})({stateListenerId:t}),I=e.useMemo(()=>({entityType:r,entity:"molecule",entityName:o,entityId:t,organismLibraryMoleculeId:p,libraryEntityId:d}),[r,o,t,p,d]),A=e.useCallback(e=>{e?.stopPropagation(),w(I,!1)},[w,I]),L=e.useCallback(e=>{e?.stopPropagation(),w(I,!0)},[w,I]),B=b?{onClick:A,onDoubleClick:L,"data-configuration-id":t,css:wtt({theme:h,selected:R})}:{},V=b||F;if(!z)return null;return(()=>{switch(r){case"simple_text":{const e={text:u?.text},r=["text"],{text:o}=Vpt(e,C,r,R),n=$pt(a?.props,_,R);return ot(Tdt,{...n,text:o?.text||"",htmlElementId:t,configurationsItemInfo:B})}case"text":{const e={text:u?.text},r=Object.keys(e),{text:o}=Vpt(e,C,r,R),n=$pt(a?.props,_,R);return ot(jdt,{...o,...n,htmlElementId:t,configurationItemInfo:B})}case"consent":{const e=Vpt(u,C,[],R),r=$pt(a?.props,_,R)||{};return ot(Ntt,{...r,htmlElementId:t,properties:e,configurationItemInfo:B})}case"signup_password_fields":{const e={text:u?.text,subText:u?.subText,placeholderText:u?.placeholderText,subPlaceholderText:u?.subPlaceholderText,validationText:u?.validationText},r=Object.keys(e),o=Vpt(e,C,r,R),{state:n,gap:i,...s}=$pt(a?.props,_,R);return ot(kpt,{gap:i,inputProps:s,validations:v||[],htmlElementId:t,validationState:n,overridesProperties:o,configurationItemInfo:B})}case"stepper":{const e=$pt(a?.props,_,R),r=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{},a={title:r?.title,subText:r?.subText},i=Object.keys(a),{title:s,subText:l}=Vpt(a,C,i,t);return{...n,...$pt(o?.props,_,t),title:s?.text||"",subText:l?.text||""}});return ot(Tpt,{...e,items:r||[],isMobile:m,moleculeId:t,configurationItemInfo:B})}case"checklist":{const e=$pt(a?.props,_,R)||{},r=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{};switch(e.type){case"checklist_item":{const a={label:r?.label,objectState:r?.objectState},i=Object.keys(a),s=Vpt(a,C,i,t),l=$pt(o?.props,_,t)||{},c=s.label?.text||"",u=!!s.objectState?.pmiObjectId;return{...n,...l,type:"checklist_item",label:c,textColor:l.textColor||"#000",fontSize:l.fontSize||"14px",fontFamily:l.fontFamily||"inherit",fontWeight:l.fontWeight||"normal",textAlign:l.textAlign||"left",isSystemDriven:u,disabled:u,interacted:E?.[e.id]?.interacted||"unchecked"}}case"divider_item":{const e=$pt(o?.props,_,t)||{};return{...n,...e,type:"divider_item"}}case"text_item":{const e={text:r?.text},a=Object.keys(e),i=Vpt(e,C,a,t),s=$pt(o?.props,_,t)||{},l=i.text?.text||"";return{...n,...s,type:"text_item",text:l}}case"rich_text_item":{const e={text:r?.text},a=Object.keys(e),i=Vpt(e,C,a,t),s=$pt(o?.props,_,t)||{},l=i.text?.text||C4e;return{...n,...s,type:"rich_text_item",text:l}}default:return{...n,type:e.type}}});return ot(jtt,{...e,items:r||[],moleculeId:t,configurationItemInfo:B})}case"accordion":{const e=$pt(a?.props,_,R),r=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{},a={text:r?.text,subText:r?.subText,bodyText:r?.bodyText},i=Object.keys(a),{text:s,subText:l,bodyText:c}=Vpt(a,C,i,t);return{...n,...$pt(o?.props,_,t),text:s?.text||"",subText:l?.text||"",bodyText:c?.text||""}});return ot(_tt,{...e,items:r||[],moleculeId:t,configurationItemInfo:B})}case"menu":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=Vpt(e,C,r,R),i=$pt(a?.props,_,R),s=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{},a={disabled:r&&"disabled"in r?r.disabled:void 0,text:r&&"text"in r?r.text:void 0,link:r&&"link"in r?r.link:void 0},i=Object.keys(a),{text:s,disabled:l,link:c}=Vpt(a,C,i,t),u=$pt(o?.props,_,t);return{...n,...u,disabled:E?.[e.id]?E?.[e.id]?.disabled:l?.value||u?.disabled||!1,text:s?.text||"Menu Item",link:c}});return ot(ypt,{...i,items:s||[],moleculeId:t,buttonText:o?.text||"Open Menu",configurationItemInfo:B,buttonDisabled:E?.[t]?E?.[t]?.disabled:n?.value||i?.disabled||!1})}case"tabs":{const e=$pt(a?.props,_,R),r=l?.map(e=>{const t=k===e.id,{properties:r,config:o}=e||{},n={label:r?.label,link:r?.link},a=Object.keys(n),{label:i,link:s}=Vpt(n,C,a,t);return{...$pt(o?.props,_,t),id:e.id,tabKey:w7e(s)?m7e(u7e,s?.internalLink):void 0,label:i?.text||"",link:s}}),o=c?.tabs.map(e=>{const{text:t,...r}=e;return{...r,label:t||""}}),n=Boolean(e?.isTabsSystemDerived),i=n?o:r,s=c?.activeTabKey||i?.[0]?.tabKey||"";return ot(Fpt,{...e,items:i||[],isMobile:m,moleculeId:t,activeTabKey:s,configurationItemInfo:B,onTabChange:b?void 0:({newTabKey:e,link:t})=>{n?c?.onTabChange?.(e):w7e(t)?M?.({link:t?.internalLink||""}):x7e(t?.externalLink)}})}case"divider":{const e=$pt(a?.props,_,R);return ot(Odt,{moleculeId:t,configurationItemInfo:B,...e})}case"link":{const e={text:u?.text,link:u?.link},r=Object.keys(e),{text:o,link:n}=Vpt(e,C,r,R),i=n,s=$pt(a?.props,_,R);return ot(fpt,{moleculeId:t,...s,link:i,type:i?.type,src:V?void 0:C7e(i,g)||"",text:o?.text||"",disabled:s?.disabled||F,configurationItemInfo:B})}case"data_driven_link":{const e={text:u?.text},r=Object.keys(e),{text:o}=Vpt(e,C,r,R),n=$pt(a?.props,_,R);return ot(fpt,{moleculeId:t,...n,text:o?.text||"",sourceDataModelField:T,disabled:n?.disabled||F,configurationItemInfo:B})}case"video":{const e={video:u?.video,coverImage:u?.coverImage},r=Object.keys(e),{video:o,coverImage:n}=Vpt(e,C,r,R),i=$pt(a?.props,_,R);return ot(Apt,{...i,moleculeId:t,poster:n?.imageFile?.url,src:o?.videoSource??o?.videoFile?.url??"",configurationItemInfo:B})}case"badge":{const e=$pt(a?.props,_,R);return ot(Stt,{...e,configurationItemInfo:B})}case"alert":{const e={text:u?.text,subText:u?.subText},t=Object.keys(e),{text:r,subText:o}=Vpt(e,C,t,R),n=$pt(a?.props,_,R);return ot(Ctt,{text:r?.text||"",subText:o?.text||"",...n,configurationItemInfo:B})}case"chip":{const e={text:u?.text},t=Object.keys(e),{text:r}=Vpt(e,C,t,R),o=$pt(a?.props,_,R);return ot(Ttt,{text:r?.text||"",...o,configurationItemInfo:B})}case"email_display_field":case"email_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(hpt,{name:j,text:o?.text||"",placeholderText:n?.text||"",sourceDataModelField:T,required:i?.value,isDisplayOnly:"email_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,...c,configurationItemInfo:B})}case"phone_number_display_field":case"phone_number_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(Dpt,{name:j,text:o?.text||"",required:i?.value,requiredErrorText:s?.text,validationErrorText:l?.text,placeholderText:n?.text||"",sourceDataModelField:T,isDisplayOnly:"phone_number_display_field"===r,...c,configurationItemInfo:B})}case"numeric_display_field":case"numeric_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(vpt,{name:j,text:o?.text||"",required:i?.value,isDisplayOnly:"numeric_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,placeholderText:n?.text||"",sourceDataModelField:T,...c,configurationItemInfo:B})}case"currency_display_field":case"currency_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(ztt,{name:j,text:o?.text||"",required:i?.value,isDisplayOnly:"currency_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,placeholderText:n?.text||"",sourceDataModelField:T,...c,configurationItemInfo:B})}case"basic_text_display_field":case"basic_text_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(Ott,{name:j,text:o?.text||"",required:i?.value,isDisplayOnly:"basic_text_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,placeholderText:n?.text||"",sourceDataModelField:T,...c,configurationItemInfo:B})}case"rating_display_field":case"rating":{const e={text:u?.text,dataCapture:u?.dataCapture,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:i,validationErrorText:s}=Vpt(e,C,t,R),l=$pt(a?.props,_,R);return ot(Opt,{name:j,text:o?.text||"",required:n?.value,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:T,isDisplayOnly:"rating_display_field"===r,...l,configurationItemInfo:B})}case"switch_display_field":case"switch":{const e={text:u?.text,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,o,R),c=$pt(a?.props,_,R);return ot(Rpt,{name:j,moleculeId:t,text:n?.text||"",required:i?.value,isDisplayOnly:"switch_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:T,...c,configurationItemInfo:B})}case"slider_display_field":case"slider":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:i,validationErrorText:s,placeholderText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(Ept,{name:j,text:o?.text||"",required:n?.value,isDisplayOnly:"slider_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:l?.text,sourceDataModelField:T,...c,configurationItemInfo:B})}case"date_display_field":case"date_picker":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:i,placeholderText:s,requiredErrorText:l,validationErrorText:c}=Vpt(e,C,o,R),d=$pt(a?.props,_,R);return ot(Znt,{dateAdapter:Yot,children:ot(Ddt,{moleculeId:t,name:j,text:n?.text||"",required:i?.value,placeholderText:s?.text||"",isDisplayOnly:"date_display_field"===r,requiredErrorText:l?.text,validationErrorText:c?.text,sourceDataModelField:T,...d,configurationItemInfo:B})})}case"time_picker_display":case"time_picker":{const e={text:u?.text,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText,required:u?.required},t=Object.keys(e),{text:o,placeholderText:n,requiredErrorText:i,validationErrorText:s,required:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R);return ot(Znt,{dateAdapter:Yot,children:ot(Ipt,{...c,name:j,text:o?.text||"",placeholderText:n?.text||"",required:l?.value,requiredErrorText:i?.text,validationErrorText:s?.text,isDisplayOnly:"time_picker_display"===r,sourceDataModelField:T,configurationItemInfo:B})})}case"select_display_field":case"select":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,placeholderText:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,t,R),c=$pt(a?.props,_,R),d="select_display_field"===r;return ot(Ppt,{name:j,text:o?.text||"",required:n?.value,isDisplayOnly:d,predefinedValue:N,placeholderText:i?.text||"",requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:T,...c,configurationItemInfo:B})}case"image":{const e={image:u?.image,link:u?.link},r=Object.keys(e),{image:o,link:n}=Vpt(e,C,r,R),i=$pt(a?.props,_,R);return ot(Pdt,{...i,src:o?.imageSource||o?.imageFile?.url||o?.imageFile?.id||"",onClick:n?()=>w7e(n)?M?.({link:n?.internalLink||""}):x7e(n?.externalLink):void 0,moleculeId:t,configurationItemInfo:B,properties:{image:o,link:n}})}case"button":{const e={text:u?.text,action:u?.action},r=Object.keys(e),{text:o,action:n}=Vpt(e,C,r,R),i=$pt(a?.props,_,R);return ot(_Ge,{moleculeId:t,text:o?.text||"",...i,disabled:i?.disabled||F,configurationItemInfo:B,properties:{text:o,action:n}})}case"avatar":{const e=$pt(a?.props,_,R);return ot(Mtt,{...e,sourceDataModelField:T,configurationItemInfo:B})}case"drawer":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=Vpt(e,C,r,R),i=$pt(a?.props,_,R),s=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{};let a={},i=[];switch(e.type){case"menu_item":{const e=r;a={disabled:e?.disabled,text:e?.text,link:e?.link},i=Object.keys(a);break}case"text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"rich_text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"image_item":{const e=r;a={image:e?.image,alt:e?.alt,link:e?.link},i=Object.keys(a);break}default:a={},i=[]}const s=Vpt(a,C,i,t),l=$pt(o?.props,_,t),c={...n,...l};switch(e.type){case"menu_item":return{...c,disabled:E?.[e.id]?E?.[e.id]?.disabled:s?.disabled?.value||l?.disabled||!1,text:s?.text?.text||"Menu Item",link:s?.link,sx:l?.sx||c.sx};case"text_item":return{...c,text:s?.text?.text||""};case"rich_text_item":return{...c,text:s?.text?.text||C4e};case"image_item":{const e=s?.image?.imageSource||s?.image?.imageFile?.url||"";return{...c,src:e,alt:s?.alt?.text||"Drawer image",link:s?.link}}default:return c}});return ot(upt,{...i,items:s||[],moleculeId:t,buttonText:o?.text||i?.buttonText,buttonDisabled:E?.[t]?E?.[t]?.disabled:n?.value||i?.disabled||!1,configurationItemInfo:B})}case"speed_dial":{const e=$pt(a?.props,_,R),r=l?.map(e=>{const t=k===e.id,{properties:r,config:o,...n}=e||{},a={link:r?.link,text:r?.text},i=Object.keys(a),s=Vpt(a,C,i,t),l=$pt(o?.props,_,t);return{...n,config:{props:{...o?.props,...l,tooltipText:l?.tooltipText||""}},properties:{link:s?.link||r?.link,text:s?.text||r?.text}}});return ot(jpt,{...e,items:r||[],moleculeId:t,configurationItemInfo:B})}case"checkbox":case"checkbox_display":{const e={label:u?.label,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{label:n,required:i,requiredErrorText:s,validationErrorText:l}=Vpt(e,C,o,R),c=$pt(a?.props,_,R);return ot(Ett,{name:j,moleculeId:t,label:n?.text||"",required:i?.value,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:T,isDisplayOnly:"checkbox_display"===r,...c,configurationItemInfo:B})}case"binary_radio_buttons":case"binary_radio_buttons_display":{const e={confirmText:u?.confirmText,rejectText:u?.rejectText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{confirmText:n,rejectText:i,required:s,requiredErrorText:l,validationErrorText:c}=Vpt(e,C,o,R),d=$pt(a?.props,_,R);return ot(Ptt,{name:j,moleculeId:t,confirmText:n?.text||"Yes",rejectText:i?.text||"No",required:s?.value,requiredErrorText:l?.text,validationErrorText:c?.text,sourceDataModelField:T,isDisplayOnly:"binary_radio_buttons_display"===r,...d,configurationItemInfo:B})}case"date_calendar":case"date_calendar_display":{const e={required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{required:o,requiredErrorText:n,validationErrorText:i}=Vpt(e,C,t,R),s=$pt(a?.props,_,R);return ot(sst,{...s,name:j,required:o?.value,requiredErrorText:n?.text,validationErrorText:i?.text,isDisplayOnly:"date_calendar_display"===r,sourceDataModelField:T,configurationItemInfo:B})}default:return ot(rt,{children:"There is no such type of molecule yet."})}})()},qpt=e.memo(({item:t,tabsProps:r,formData:o,setFormData:n,isMobile:a,parentId:i,nestedPathSegments:s=[]})=>{const l=Ut(),{stateConfig:c}=DC(),{organismMetadata:u,localStateObject:d}=_C(),p=d||c,h="items"in t?t.items:void 0,f=e.useMemo(()=>(h||[]).filter(e=>{const t=e.config?.props?.visible??!0,r=p?.[e.id]?.visible??!0;return t&&r}),[h,p]);if("molecule"===t.instance)return ot(Bpt,{additionalInfo:`molecule: ${t.id}`,children:ot(Hpt,{...t,form:l,isMobile:a,formData:o,parentId:i,tabsProps:r,setFormData:n,metadata:{...t.metadata,stateListenerId:u?.stateListenerId||t.id}})});const m=!(!h||!h.length),y="form"===t.type&&t.config.props?.activeChildrenIds||[];return m?y.length?ot(Bpt,{additionalInfo:`form: ${t.id}`,children:ot(Qpt,{item:t,activeChildrenIds:y,formData:o,setFormData:n,isMobile:a})}):ot(Bpt,{additionalInfo:`container: ${t.id}`,children:ot(Zpt,{...t,isMobile:a,nestedPathSegments:s,config:t.config?{...t.config,props:t.config.props||{},wide:t.config.wide||{},compact:t.config.compact||{}}:{props:{},wide:{},compact:{}},children:f?.map(e=>ot(qpt,{item:e,parentId:e.id,formData:o,setFormData:n,isMobile:a,tabsProps:r,nestedPathSegments:s},e.id))})}):null}),Wpt=({order:t=0,id:r,formStepStyles:o,containerProps:n={hasOwnButton:!1}})=>{const a=Ut(),[i,s]=e.useState({}),{formId:l,submitHandler:c,isFormInEditMode:u,organismMetadata:d}=_C(),{groupStepItemsByStepContainer:p}=_C();Object.keys(d?.popupPayload??{})[0];const{currentStep:h,canGoToNextStep:f,canGoToPrevStep:m,goToNextStep:y,goToPrevStep:g,reset:v,setStep:x}=Vr(),b=p(),{submitForm:w}=mGe(),{forms:k}=ct(),_=t+1,C=b.get(r)||[];return h!==_?null:ot("div",{style:o,children:nt(rt,{children:[C.map(e=>ot(qpt,{item:e,setFormData:s,formData:i},e.id)),(!n?.hasOwnButton||d?.isFormInsidePopUp)&&u&&nt("div",{style:{display:"flex",gap:"16px"},children:[ot(_Ge,{text:m?"Back":"Cancel",variant:"outlined",onClick:()=>{m?g():(v(),x(1))}}),ot(_Ge,{text:f?"Next":"Submit",variant:"contained",onClick:async()=>{const e=await a.trigger();if(!e)return void n6e({message:"Please fill all required fields",type:"error"});if(f)return void y();const t=a.getValues();e&&l&&(c?await c({formId:l,data:t}):k?.submit&&await w({formId:l,data:t}))}})]})]})})},Upt=e=>e&&"object"==typeof e&&"value"in e&&!Array.isArray(e)?e.value:e,Gpt=e=>{const t={};for(const[r,o]of Object.entries(e))t[r]=Upt(o);return t},Kpt=e.memo(({replicatorFieldId:e,nestedPathSegments:t=[],children:r,renderWrapper:o})=>{const{localStateObject:n}=_C(),a=dt(),i=n||{},s=a?.itemDataByDmfId?a.itemDataByDmfId:((e,t)=>{if(!e)return null;let r=e;for(const o of t){if(!r||"object"!=typeof r)return null;const{dmfId:e,index:t}=o;if(r=r[e],void 0===r)return null;if(void 0!==t){if(!Array.isArray(r))return null;if(r=r[t],void 0===r)return null}}return r&&"object"==typeof r?r:null})(i,t),l=e?s?.[e]:s;if(!l||"object"!=typeof l){const n=e?[...t,{dmfId:e}]:t;return ot(pt,{value:{containerId:`replicator-${e||"default"}`,nestedPathSegments:n,itemDataByDmfId:{}},children:o?o(void 0,r):r})}if(Array.isArray(l))return ot(rt,{children:l.map((n,a)=>{const i=e?[...t,{dmfId:e,index:a}]:[...t,{index:a}],s={containerId:`replicator-${e||"default"}-${a}`,nestedPathSegments:i,itemIndex:a,itemDataByDmfId:Gpt(n),rawItemDataByDmfId:n};return ot(pt,{value:s,children:o?o(a,r):r},`${e||"default"}-${a}`)})});const c=e?[...t,{dmfId:e}]:t,u={containerId:`replicator-${e||"default"}`,nestedPathSegments:c,itemDataByDmfId:Gpt(l),rawItemDataByDmfId:l};return ot(pt,{value:u,children:o?o(void 0,r):r})}),Ypt={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},Zpt=e.memo(({id:t,type:r,name:o,config:n,children:a,metadata:i,isMobile:s,properties:l,nestedPathSegments:c=[],replicatorFieldId:u})=>{const d=Ge(),{props:p,wide:h,compact:f}=n||{},m=u||p?.replicatorFieldId,{isConfigurationMode:y,onConfigurationItemClicked:g,selectedConfigurationItemId:v,currentStyleProperties:x,currentContentProperties:b}=_C(),w=v===t,k=w?{backgroundImage:b?.backgroundImage??l?.backgroundImage??{imageFile:{url:""}}}:l,{containerProps:_={},containerStyle:C={}}=h||{};let M={...C};const{containerProps:S={},containerStyle:D={}}=f||{};let O={...D};x&&w&&(O={...D,...x},M={...C,...x});const P=yC("xs"),E=s??P,j=E?O:M,T=E?S:_,N={...p,...T,enableBackgroundImage:j?.enableBackgroundImage},R=e.useMemo(()=>({entityId:t,entityType:r,entityName:o,entity:"container",libraryEntityId:i?.containerLibraryId||void 0}),[r,o,t,i]),F=y?{onClick:e=>{e&&e.stopPropagation(),g(R,!1)},onDoubleClick:e=>{e?.stopPropagation(),g(R,!0)}}:{},z=`${t}.${E?"mobile":"desktop"}`,I=co`
|