@zealicsolutions/web-ui 1.1.42 → 1.1.43
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 +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/_virtual/index3.js +1 -1
- package/dist/esm/_virtual/index4.js +1 -1
- package/dist/esm/molecules/Select/Select.js +1 -1
- package/dist/esm/molecules/Select/Select.js.map +1 -1
- 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
|
@@ -1028,7 +1028,7 @@
|
|
|
1028
1028
|
position: relative;
|
|
1029
1029
|
gap: ${({gap:e})=>e?"number"==typeof e?`${e}px`:e:"0"};
|
|
1030
1030
|
${({scrollable:e})=>e?"\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0; /* Important for flex children to respect overflow */\n ":""}
|
|
1031
|
-
`,hht=e=>{if("menu_item"===e.type){const t=e;if(!t.sx)return!1;const r=e=>!!e&&(Array.isArray(e)?e.some(r):"function"!=typeof e&&("object"==typeof e&&("absolute"===e.position||"fixed"===e.position)));return r(t.sx)}return!1},fht=({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:P,buttonFillColor:O,buttonFillColorDisabled:E,buttonFillColorHover:j,buttonFillColorPressed:T,buttonBorderColor:N,buttonBorderColorDisabled:R,buttonBorderColorHover:F,buttonBorderColorPressed:I,buttonTextColorDisabled:A,buttonTextColorHover:z,buttonTextColorPressed:L,buttonColor:B="#1976d2",buttonDisabledColor:V,withCloseIcon:$=!0,closeIconColor:H=so.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:J,configurationItemInfo:Q,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=Ye(),{isConfigurationMode:ge,selectedConfigurationItemId:ve,onConfigurationItemClicked:xe,onInternalNavigation:be}=IC(),{updateDrawer:we,drawerContainerRef:ke,headerHeight:_e,isMobile:Ce}=EC(),[Me,Se]=e.useState(n),[De]=(()=>{try{return nht()}catch{return[new URLSearchParams,()=>{}]}})(),Pe=e.useMemo(()=>{if(t)return t;const e=De.get(l9e),r=De.get(s9e);let o=null,n=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);o=e.get(l9e),n=e.get(s9e)}catch(LQe){}return e||r||o||n||""},[t,De]);e.useEffect(()=>{Se(n)},[n]);const Oe=Boolean(ge&&(ve===J||i.some(e=>e.id===ve))),Ee=()=>"permanent"===o||(ge?Oe: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,Oe,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=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:vrt({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=w9e(t.internalLink);return!(!r||!Pe)&&r===Pe})(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 it(xx,{sx:a,selected:r,onClick:()=>{if(t?.link){m9e(t.link)?be?.({link:t.link?.internalLink||""}):h9e(t.link?.externalLink)}},disabled:t.disabled,...o,children:[t.startIcon&&at(jGe,{iconName:t.startIcon,color:t.textColor}),at(Od,{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&&at(jGe,{iconName:t.endIcon,color:t.textColor})]},t.id)}case"divider_item":{const t=e;return at(jpt,{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 at(Fpt,{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 at(Rpt,{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 at(Tpt,{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){m9e(t.link)?be?.({link:t.link?.internalLink||""}):h9e(t.link?.externalLink)}},moleculeId:t.id,configurationItemInfo:o},t.id)}default:return null}},Re=Ce&&void 0!==ce?ce:le,Fe=at(sht,{anchor:r,variant:o,open:Ee(),onClose:Te,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:Re,backgroundColor:ue,marginTop:`calc(${_e} + ${pe})`,marginRight:he,marginBottom:fe,marginLeft:me,container:ke,sx:ee,children:it(uht,{scrollable:re,sx:te,...Q&&Object.keys(Q).length?{...Q,"data-testid":"drawer-content-config","aria-label":"drawer-content"}:{},children:[(Ee()||"permanent"===o)&&i.length>0?it(nt,{children:[at(pht,{gap:de,scrollable:re,children:i.filter(e=>!hht(e)).map(Ne)}),i.filter(e=>hht(e)).map(Ne)]}):null,!!$&&(!!G||Ee())&&at(dht,{top:K,left:Y,borderRadius:Z,elevation:X,backgroundColor:U,onClick:e=>{e.stopPropagation();Ee()?Te(e,"closeIconClicked"):je()},"data-testid":"close-icon",children:at(jGe,{"data-testid":"icon-renderer",iconName:q,size:W,color:H})})]})});return s&&"permanent"!==o?it(nt,{children:[at(yKe,{moleculeId:J,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:P,fillColor:O||B,fillColorDisabled:E||V,fillColorHover:j,fillColorPressed:T,borderColor:N,borderColorDisabled:R,borderColorHover:F,borderColorPressed:I,textColorDisabled:A,textColorHover:z,textColorPressed:L,externalOnClick:e=>Me?Te(e,"buttonClicked"):je(),configurationItemInfo:Q}),at(cht,{children:Fe})]}):at(cht,{children:Fe})},mht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(cYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:wYe,guide:!0,placeholderChar:" "})}),yht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0},ght=({masked:e,errorMsg:t,inputSx:r,labelSx:o,sx:n,variant:a="outlined",...i})=>{const s=e?{inputComponent:mht}:{};return at(iC,{...i,variant:a,error:!!t,helperText:t||null,type:"text",sx:{...n},slotProps:{input:{sx:{...r,...n},...s},inputLabel:{sx:{...o,...n}}}})},vht=({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:P,maxWidth:O,sx:E,name:j,sourceDataModelField:T,configurationItemInfo:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!j),V=Srt({name:j,sourceDataModelField:T,form:z,enabled:B});e.useState("");const[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@(([^<>()[\]\\.,;:\s@"]+\.)+[^<>()[\]\\.,;:\s@"]{2,})$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=yht(w),t=yht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=yht(M)||yht(S)||yht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=yht(M)||yht(S)||yht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(j),j,"value");e=t?String(t):""}const t=e||i||"-";return it("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:P,maxWidth:O},...N,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...E},children:a}),at(Od,{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 G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...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:_}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y=l?3:1,Z={...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}};return at("div",B?{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},...E},children:at(tr,{name:j,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(ght,{masked:s,required:r,errorMsg:t.error?.message,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:zGe(e.value,j,"value")||"",onChange:e=>{LGe(z,j,e.target.value,"value")},...N||{}})})}:{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},...E},children:at(ght,{masked:s,required:r,errorMsg:void 0,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:$,onChange:e=>H(e.target.value),...N||{}})})},xht=({src:t,text:r,type:o,link:n,sourceDataModelField:a,color:i=so.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:P,borderColor:O,borderWidth:E,borderStyle:j,borderRadius:T,iconOnly:N,ariaLabel:R,iconName:F,iconSize:I,validationErrorText:A})=>{const{onStateChange:z}=YC(),{onInternalNavigation:L,isConfigurationMode:B,localStateObject:V}=IC();UC();const $=ht(),H=a?WGe(a):r,q=n&&y9e(n),W=e.useMemo(()=>q?g9e(n,$?.rawItemDataByDmfId):null,[n,q,$?.rawItemDataByDmfId]),U=q&&!W,G=e.useMemo(()=>{if(W)return W.destination;const e=n?m9e(n):"internalLink"===o||"internal_link"===o,r=n?e?n.internalLink:n.externalLink:void 0;return t??r??void 0},[W,n,o,t]),K=e.useMemo(()=>W?!W.isExternal:!!n&&m9e(n),[W,n]),Y=e.useMemo(()=>D||(W?W.isExternal?"_blank":"_self":K?"_self":"_blank"),[D,W,K]),Z=s||U,X=Z?l||no(i):i,J=B||Z?void 0:G,Q=Boolean(F),ee="regular"===C?"normal":C,te=N?at(jGe,{iconName:F||"external-link",size:I??16}):it(nt,{children:[at("span",{children:String(H||"")}),Q&&at(jGe,{iconName:F,size:I??16})]}),{onClick:re,onDoubleClick:oe,...ne}=f||{},ae=at(mv,{href:J,component:"a",target:Y,onClick:e=>{z({id:h,type:"clicked"});if(!s&&!U&&!B)return W?(e.preventDefault(),void(W.isExternal?h9e(W.destination):L?.({link:W.destination,webpageAlias:W.webpageAlias,query:W.recordId?{rwoRecordId:W.recordId}:void 0}))):K&&G?(e.preventDefault(),void L?.({link:G})):void(!K&&G&&(e.preventDefault(),h9e(G)));e.preventDefault()},onClickCapture:re||void 0,onDoubleClickCapture:oe||void 0,"aria-label":N?R||String(H||"")||"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:Z?"not-allowed":"pointer",borderColor:O,borderWidth:E,borderStyle:j,borderRadius:T,display:N||Q?"inline-flex":void 0,gap:Q&&!N?"4px":void 0,"& .MuiLink-root":{color:"inherit",textDecorationColor:"inherit"},"&:hover":{color:Z?X:no(X,.8),textDecorationColor:Z?X:no(X,.8)},"&:active":{color:Z?X:no(X,.6),textDecorationColor:Z?X:no(X,.6)},"&.Mui-disabled":{color:l||no(i),textDecorationColor:l||no(i),cursor:"not-allowed"},...P},align:S,variant:u,underline:c,...ne,children:te});return ae},bht=e=>({justifyContent:e.textAlign||"flex-start",backgroundColor:e.backgroundColor,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}),wht=({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:P="0",buttonMarginRight:O="0",buttonMarginBottom:E="0",buttonMarginLeft:j="0",buttonPaddingTop:T="0",buttonPaddingRight:N="0",buttonPaddingBottom:R="0",buttonPaddingLeft:F="0",buttonIconOnly:I,buttonElevation:A,buttonFillColor:z,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:J="top",transformOriginHorizontal:Q="left",elevation:ee=3,sx:te,moleculeId:re,configurationItemInfo:oe})=>{const ne=Ye(),{isConfigurationMode:ae,selectedConfigurationItemId:ie,onConfigurationItemClicked:se,onInternalNavigation:le}=IC(),ce=ht?.(),[ue,de]=e.useState(null),[pe,he]=e.useState(!1),[fe]=(()=>{try{return nht()}catch{return[new URLSearchParams,()=>{}]}})(),me=e.useMemo(()=>{const e=fe.get(l9e),t=fe.get(s9e);let r=null,o=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);r=e.get(l9e),o=e.get(s9e)}catch(LQe){}return e||t||r||o||""},[fe]),ye=e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=w9e(t.internalLink);return!(!r||!me)&&r===me},ge=Boolean(ae&&(ie===re||r.some(e=>e.id===ie))),ve=()=>he(!0),xe=()=>he(!1),be={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?it(Zf,{children:[at(yKe,{ref:de,text:g,variant:v,moleculeId:re,textColor:x,fontSize:b,fontWeight:w,fontFamily:k,disabled:_,gap:C,startIcon:M,endIcon:S,onClick:ve,marginTop:P,marginRight:O,marginBottom:E,marginLeft:j,paddingTop:T,paddingRight:N,paddingBottom:R,paddingLeft:F,borderRadius:D,iconOnly:I,elevation:A,fillColor:z||Y,fillColorDisabled:L,fillColorHover:B,fillColorPressed:V,borderColor:$,borderColorDisabled:H,borderColorHover:q,borderColorPressed:W,textColorDisabled:U,textColorHover:G,textColorPressed:K,configurationItemInfo:oe}),at(fx,{open:ae?ge:pe,variant:"menu",anchorEl:ue,disablePortal:!0,disableScrollLock:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,onClose:xe,anchorOrigin:{vertical:Z,horizontal:X},transformOrigin:{vertical:J,horizontal:Q},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":be["& .MuiMenu-list"],"& .MuiMenuItem-root":be["& .MuiMenuItem-root"],"& .MuiListItemText-primary":be["& .MuiListItemText-primary"],"& .MuiTypography-root":be["& .MuiTypography-root"]}}},sx:{...be,"& .MuiMenu-paper":be["& .MuiMenu-paper"]},children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&y9e(e.link)?g9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&y9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:vrt({theme:ne,selected:t})}:{};return it(xx,{sx:bht(e),selected:r,disabled:e.disabled||n,onClick:()=>{e?.link&&(o?o.isExternal?h9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):m9e(e.link)?le?.({link:e.link?.internalLink||""}):h9e(e.link?.externalLink)),xe()},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Od,{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&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})]}):at(tu,{id:re,sx:{...be,backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},elevation:ee,...oe,children:at(wv,{disablePadding:!0,children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&y9e(e.link)?g9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&y9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:vrt({theme:ne,selected:t})}:{};return it(Dv,{disabled:e.disabled||n,sx:bht(e),selected:r,onClick:()=>{e?.link&&(o?o.isExternal?h9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):m9e(e.link)?le?.({link:e.link?.internalLink||""}):h9e(e.link?.externalLink))},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Wv,{primary:at(Od,{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&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})})},kht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};const _ht=({errorMsg:e,stepValue:t,minValue:r,allowNegative:o,inputSx:n,labelSx:a,variant:i="outlined",...s})=>at(iC,{...s,variant:i,type:"number",error:!!e,helperText:e||null,inputProps:{step:t,min:o?void 0:r},slotProps:{input:{sx:n},inputLabel:{sx:a}}}),Cht=({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:P,minHeight:O,maxHeight:E,minWidth:j,maxWidth:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!m);IC(),UC();const V=Srt({name:m,sourceDataModelField:y,form:z,enabled:B}),[$,H]=e.useState(""),q=parseFloat(f),W=h?void 0:0,U={required:!!r&&o,pattern:{value:h?/^-?\d*(\.\d+)?$/:/^\d*(\.\d+)?$/,message:n}};h||(U.min={value:0,message:"Value cannot be less than zero"});const G=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=kht(k),t=kht(C);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=kht(S)||kht(O)||kht(E);if(!o&&!e&&!t)return;const n="number"==typeof u?1.5*u:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[S,O,E,F,R,u,k,C,I]),K=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=kht(S)||kht(O)||kht(E);return!t||t>=36?e:-6},[S,O,E,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(m),m,"value");e=t?String(t):""}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 it("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},...O&&{minHeight:O},...E&&{maxHeight:E}},sx:N,...D,children:[a&&at(wg,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,marginBottom:"4px"},children:a}),at(Od,{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 Y={backgroundColor:s,color:c,fontSize:u,fontFamily:d,fontWeight:p,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...O&&{minHeight:O},...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"}},Z={color:c,"&.Mui-focused":{color:c},...I&&{display:"none"},...void 0!==G&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${G}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${K}px) scale(0.75)`}}},X={...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...O&&{minHeight:O},...E&&{maxHeight:E}};return at(ag,B?{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},...O&&{minHeight:O},...E&&{maxHeight:E},...N},...D,children:at(tr,{name:m,rules:U,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(_ht,{errorMsg:t.error?.message,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:zGe(e.value,m,"value")||"",onChange:e=>{LGe(z,m,e.target.value,"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},...O&&{minHeight:O},...E&&{maxHeight:E},...N},...D,children:at(_ht,{errorMsg:void 0,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:$,onChange:e=>H(e.target.value)})})},Mht=e=>{const t={text:e.label,validate:()=>!0},{rule:r}=e,o=Sht(r);if(o||Dht(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},Sht=e=>!!e?.MAX,Dht=e=>!!e?.MIN,Pht=({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}=Kt()||{},{text:_,subText:C,placeholderText:M,subPlaceholderText:S,validationText:D}=i,P=o.map(Mht),O="password",E=`reEnter${O}`,j=b?.(O),T=b?.(E);return e.useEffect(()=>{j!==T&&k(E,{type:"manual",message:"Passwords do not match"})},[j,T,k,E]),it(Zf,{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:[at(Ort,{...r,inputType:"password",text:_?.text,name:O,placeholderText:M?.text}),at(Ort,{...r,inputType:"password",text:C?.text,name:E,placeholderText:S?.text}),at(tYe,{rules:P,value:j,label:D?.text,isSubmitted:w?.isDirty,validationState:a})]})},Oht=["+"," ","(",/[0-9]/,/[0-9]/,/[0-9]/,")"," ",/[0-9]/,/[0-9]/,/[0-9]/,"-",/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],Eht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(cYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:Oht,guide:!0,placeholderChar:" "})}),jht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};function Tht(e){const t=(e??"").replace(/\D+/g,"");if(!t)return"";let r="",o=0;return gYe.forEach(e=>{"string"==typeof e?r+=e:o<t.length?(r+=t[o],o+=1):r+="_"}),r}const Nht=({masked:e,errorMsg:t,inputSx:r,labelSx:o,variant:n="outlined",...a})=>at(iC,{...a,variant:n,error:!!t,helperText:t||null,slotProps:{input:{sx:r,...e?{inputComponent:Eht}:{}},inputLabel:{sx:o}}}),Rht=({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:P,maxWidth:O,name:E,sourceDataModelField:j,configurationItemInfo:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!E),V=Srt({name:E,sourceDataModelField:j,form:z,enabled:B}),[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^\d{10}$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=jht(w),t=jht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=jht(M)||jht(S)||jht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=jht(M)||jht(S)||jht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(E),E,"value");e=t?String(t):""}const t=(s?Tht(e):e)||i||"-";return it("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}},...T,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...N},children:a}),at(Od,{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 G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...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"}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y={marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,width:"fit-content",...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}};return at(ag,B?{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(tr,{name:E,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(Nht,{masked:s,errorMsg:t.error?.message,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:zGe(e.value,E,"value")||"",onChange:e=>{const t=(e?.target?.value??"").toString().replace(/\D+/g,"");LGe(z,E,t,"value")}})})}:{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(Nht,{masked:s,errorMsg:void 0,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:$,onChange:e=>{const t=(e?.target?.value??"").toString();H(t.replace(/\D+/g,""))}})})},Fht=({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:P,minWidth:O,maxWidth:E,placement:j="right",configurationItemInfo:T={},disabled:N=!1,maxValue:R=5,ratingPrecision:F=.5,sx:I,...A})=>{const z=Kt(),L=z?.control,B=!!z&&!!L&&!!r;IC(),UC();const V=Srt({name:r,sourceDataModelField:c,form:z,enabled:B});!B||z.formState.errors;const[$,H]=e.useState(null),[q,W]=e.useState(-1),U=l&&-1!==q;if(o){let e=null;return void 0!==V&&(e=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(V)),it(ag,{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},...P&&{maxHeight:P},...O&&{minWidth:O},...E&&{maxWidth:E},...I},...T,children:[t&&at(Od,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),at(xb,{value:e,max:R,precision:F,readOnly:!0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},...I},...A})]})}const G={required:!!n&&a,validate:e=>!n||null!==e&&0!==e||a};return it(ag,{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},...P&&{maxHeight:P},...O&&{minWidth:O},...E&&{maxWidth:E},...I},...T,children:[t&&at(Od,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),it(Zf,{sx:{display:"flex",alignItems:"center"},children:["left"===j&&at(Od,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?zGe(z.getValues(r),r,"value")??V??"":$??V??""}),at(tr,{name:r,control:L,defaultValue:"number"==typeof V?V:null,rules:G,render:({field:e,fieldState:{error:t}})=>{const o=zGe(e.value,r,"value");return it(nt,{children:[at(xb,{value:o??V??0,max:R,precision:F,disabled:N,onChange:(e,t)=>{LGe(z,r,t,"value")},onChangeActive:l?(e,t)=>W(t??-1):void 0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},marginX:l?1:0,...I},...A}),t&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.type?a:i})]})}}),"right"===j&&at(Od,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?zGe(z.getValues(r),r,"value")??V??"":$??V??""})]})]})},Iht=["value","label","id","code"],Aht=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),zht=e=>{if("string"==typeof e||"number"==typeof e)return e;if(Aht(e)){if("value"in e&&("string"==typeof e.value||"number"==typeof e.value))return e.value;for(const t of Iht){if("value"===t)continue;const r=e[t];if("string"==typeof r||"number"==typeof r)return r}}},Lht=(e,t)=>{if(null==t)return;const r=String(t);return e.find(e=>String(e.id)===r||(void 0!==e.value&&String(e.value)===r||void 0!==e.label&&String(e.label)===r))},Bht=e=>""!==e&&null!=e,Vht=({open:t,text:o,disabled:n,sx:a,placeholderText:i,required:s=!1,requiredErrorText:l="This field is required",isDisplayOnly:c=!1,displayText:u,visible:d=!0,fontSize:p,fontFamily:h,fontWeight:f,textColor:m,textAlign:y,borderColor:g,color:v,backgroundColor:x,marginLeft:b="0",marginTop:w="0",marginRight:k="0",marginBottom:_="0",paddingLeft:C,paddingTop:M,paddingRight:S,paddingBottom:D,width:P,height:O,minHeight:E,maxHeight:j,minWidth:T,maxWidth:N,configurationItemInfo:R={},name:F,sourceDataModelField:I,predefinedValue:A,hideWhenNoValue:z=!1,inputSize:L="medium",hideLabel:B=!1,variant:V="outlined",native:$=!1,options:H,publishToWebpageContext:q=!1,webpageContextKey:W,dataDrivenOptions:U})=>{const G="regular"===f?"normal":f,K=e=>{if(null==e)return!1;if("string"==typeof e&&""===e.trim())return!1;if("object"==typeof e&&null!==e){const t=e;if(0===Object.keys(t).length)return!1;const r="value"in t&&""!==t.value&&null!==t.value&&void 0!==t.value,o="id"in t&&""!==t.id&&null!==t.id&&void 0!==t.id,n=Object.keys(t).some(e=>"value"!==e&&"id"!==e&&""!==t[e]&&null!==t[e]&&void 0!==t[e]);if(!r&&!o&&!n)return!1}return!0},Y=U&&!U.isIgnored&&("variable"===U.nature&&Boolean(U.variableName)||"data_model"===U.nature&&Boolean(U.sourceDataModelFieldId)||!U.nature&&(Boolean(U.variableName)||Boolean(U.sourceDataModelFieldId))),Z=e.useMemo(()=>{if(!Y||!U)return;const e=U.nature?.toString().replace(/-/g,"_").toLowerCase()??"";return("variable"===e||!e&&U.variableName)&&U.variableName||U.sourceDataModelFieldId},[Y,U]),X=Z?qGe(Z):void 0,J=e.useMemo(()=>{if(null!=X&&("string"!=typeof X||""!==X.trim())&&!(Array.isArray(X)&&0===X.length||"object"==typeof X&&0===Object.keys(X).length))return X},[X]),Q=e=>{if(null!=e){if("string"==typeof e||"number"==typeof e)return e;if("object"==typeof e&&null!==e){const t=e;if("value"in t&&("string"==typeof t.value||"number"==typeof t.value))return t.value;if("id"in t&&("string"==typeof t.id||"number"==typeof t.id))return t.id}}},ee=e.useMemo(()=>{if(Y&&J){if(Array.isArray(J))return J.map(e=>{if("string"==typeof e||"number"==typeof e)return{id:e,value:String(e)};if(e&&"object"==typeof e){const t=e,r=Q(t.id)??Q(t.value)??Q(t.code)??Q(t.label),o=Q(t.value)??Q(t.label)??Q(t.code)??Q(t.id),n=Q(t.label)??Q(t.value)??Q(t.code)??Q(t.id);return void 0===r||void 0===o?{id:"",value:""}:{id:r,value:String(o),label:String(void 0!==n?n:o)}}return{id:"",value:""}}).filter(e=>""!==e.id&&""!==e.value);if(J&&"object"==typeof J){const e=J,t=Q(e.id)??Q(e.value)??Q(e.code)??Q(e.label),r=Q(e.value)??Q(e.label)??Q(e.code)??Q(e.id),o=Q(e.label)??Q(e.value)??Q(e.code)??Q(e.id);return void 0===t||void 0===r?[]:[{id:t,value:String(r),label:String(void 0!==o?o:r)}].filter(e=>""!==e.id&&""!==e.value)}}},[Y,J]),te=Boolean(ee&&ee.length>0),re=c||Y?void 0:I,{dataModelFieldOptions:oe,isLoading:ne}=(e=>{const{pickList:t}=dt(),{data:o=[],refetch:n,isLoading:a}=r.useQuery({queryKey:[KGe,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}})(re),ae=H&&H.length>0?H:te?ee:oe,ie=e.useMemo(()=>(ae||[]).map(e=>"string"==typeof e?{id:e,value:e}:e),[ae]),se=ie.length>0||!ne;let le;e.useEffect(()=>{U&&console.log("🔵 [Select] Data-Driven Options Debug:",{dataDrivenOptions:U,shouldUseDataDrivenOptions:Y,dataDrivenOptionsReference:Z,rawResolvedDataDrivenOptions:X,resolvedDataDrivenOptions:J,dataDrivenOptionsList:ee,hasValidDataDrivenOptions:te,effectiveOptionsLength:ae?.length,normalizedOptionsLength:ie.length,optionsReady:se})},[U,Y,Z,X,J,ee,te,ae,ie,se]);try{le=Kt()}catch(qe){le=null}const ce=!!le?.control&&!!F,[ue,de]=e.useState(""),[pe,he]=e.useState(!1),fe=e.useRef(!1),me=e.useRef(!1),ye=e.useRef(void 0),ge=e.useRef(void 0);e.useEffect(()=>{ye.current!==I&&(ye.current=I,fe.current=!1,me.current=!1,ge.current=void 0)},[I]);let ve={setLocalStateValue:null,isConfigurationMode:!1,selectedConfigurationItemId:null};try{ve=IC()}catch(qe){}let xe={stateConfig:null};try{xe=UC()}catch(qe){}let be=null;try{be=ht()}catch(qe){}const we=KC();ve.isConfigurationMode&&ve.selectedConfigurationItemId;const ke=null!=A&&""!==A,_e=Boolean(n)||ke,Ce=UGe(),Me=ce&&le?le.watch(F):void 0,Se=ce&&le&&F?zGe(Me,F,"id"):void 0,De=I?Ce(I):void 0,Pe=e.useMemo(()=>c||void 0!==De&&K(De)?De:null!=Se&&""!==Se&&K(Se)?Se:void 0,[c,De,Se]);e.useEffect(()=>{I&&!c&&console.log("🔍 [Select] Value Resolution Debug:",{name:F,sourceDataModelField:I,resolvedFromSource:De,formPrefillValue:Se,rawResolvedDataValue:Pe,isInFormContext:ce})},[F,I,De,Se,Pe,ce,c]),e.useEffect(()=>{ge.current!==Pe&&(ge.current=Pe,void 0===Pe||me.current||(fe.current=!1))},[Pe]);const Oe=be?.itemDataByDmfId?.[F],Ee=zht(Oe),je=e.useMemo(()=>{if(Pe){if(Aht(Pe)){const e=Pe.id;if("string"==typeof e||"number"==typeof e){const t=ie.length>0?Lht(ie,e):void 0;return t?{...t,...Pe}:Pe}for(const t of["value","label","code"]){const e=Pe[t];if("string"==typeof e||"number"==typeof e){const t=ie.length>0?Lht(ie,e):void 0;return t||Pe}}return Pe}if("string"==typeof Pe||"number"==typeof Pe){return(ie.length>0?Lht(ie,Pe):void 0)||{id:Pe}}}},[Pe,ie]),Te=Srt({name:F,sourceDataModelField:I,form:le,fallbackKey:void 0,enabled:!1,mapValue:()=>je}),Ne=zht(Pe)??("string"==typeof Te||"number"==typeof Te?Te:void 0);e.useEffect(()=>{ke&&null!=A&&(ce?LGe(le,F,A,"id",{shouldDirty:!1,shouldTouch:!1,shouldValidate:!1}):de(A))},[ke,A,ce,le,F]),e.useEffect(()=>{if(!ce||!le)return;if(ke)return;if(!I)return;const e=zGe(le.watch(F),F,"id"),t="object"==typeof e&&null!==e?e.id:e,r=le.formState?.dirtyFields?.[F],o=le.formState?.touchedFields?.[F];if(r||o)return me.current=!0,void(fe.current=!0);if(me.current)return;let n=Pe;if(void 0===n&&null!=Se&&""!==Se&&(n=Se),!K(n))return void console.log("⏭️ [Select] No meaningful value to prefill:",{name:F,sourceDataModelField:I,rawResolvedDataValue:Pe,rawResolvedDataValueType:typeof Pe,rawResolvedDataValueStringified:"object"==typeof Pe?JSON.stringify(Pe):String(Pe),formPrefillValue:Se,resolvedFromSource:De,resolvedFromSourceType:typeof De,resolvedFromSourceStringified:"object"==typeof De?JSON.stringify(De):String(De),valueToUse:n,valueToUseType:typeof n,valueToUseStringified:"object"==typeof n?JSON.stringify(n):String(n),isValueMeaningful:K(n)});const a=Aht(n)?n.id:n;if(null!=t&&""!==t&&void 0!==a&&String(t)!==String(a))return me.current=!0,void(fe.current=!0);if(fe.current&&void 0!==a&&void 0!==t&&String(a)===String(t))return;let i;if(je)i=je;else if(Aht(n)){const e=n.id;"string"!=typeof e&&"number"!=typeof e||(i=n)}else"string"==typeof n||"number"==typeof n?i={id:n}:null!=Se&&""!==Se&&("string"==typeof Se||"number"==typeof Se?i={id:Se}:Aht(Se)&&(i=Se));if(i){const e="object"==typeof i&&"id"in i?i.id:i,r=null==t||""===t,o=void 0!==t&&String(e)===String(t);r||o?(console.group("🟢 [Select] Applying prefill value"),console.log("📝 Field name (data capture):",F),console.log("🔑 Source field (data layer):",I),console.log("📥 Resolved from source:",De),console.log("📋 Raw resolved data value:",Pe),console.log("📋 Form prefill value:",Se),console.log("✅ Value to use:",n),console.log("📦 Payload to set:",i),console.log("🆔 Payload ID:",e),console.log("📊 Current form ID:",t),console.log("🔍 Form value empty?",r),console.log("🔍 Form value matches?",o),LGe(le,F,i,"id",{shouldDirty:!1,shouldTouch:!1,shouldValidate:!1}),fe.current=!0,console.log("✅ Prefill value applied successfully"),console.groupEnd()):console.log("⏭️ [Select] Skipping prefill - form value differs (user interaction):",{name:F,payloadId:e,formId:t})}else console.group("⏭️ [Select] No payload to set"),console.log("📝 Field name:",F),console.log("🔑 Source field:",I),console.log("📥 Resolved from source:",De),console.log("📋 Raw resolved data value:",Pe),console.log("📋 Form prefill value:",Se),console.log("✅ Value to use:",n),console.log("📦 Prefill payload:",je),console.groupEnd()},[ke,ce,le,F,I,Pe,je,Se]);const Re=Oe??Ne;if(e.useEffect(()=>{q&&W&&we?.setDynamicContextValue&&void 0!==Re&&we.setDynamicContextValue(W,Re)},[q,W,Re,we]),!d)return null;if(c&&z&&!(Oe??Ne))return null;if(c){const e=u??(null!=Ee?String(Ee):void 0)??(null!=Ne?String(Ne):void 0)??(i||"-"),{css:t,...r}=R||{};return it("div",{css:t,style:{display:"inline-flex",flexDirection:"column",...Bht(w)&&{marginTop:w},...Bht(k)&&{marginRight:k},...Bht(_)&&{marginBottom:_},...Bht(b)&&{marginLeft:b},...Bht(P)?{width:P}:{width:"fit-content"},...Bht(O)&&{height:O},...Bht(E)&&{minHeight:E},...Bht(j)&&{maxHeight:j},...Bht(T)&&{minWidth:T},...Bht(N)&&{maxWidth:N}},...r,children:[o&&at(wg,{sx:{...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},color:Bht(m)?m:"#000",marginLeft:0,marginBottom:"4px",...Bht(y)&&{textAlign:y}},children:o}),at(Od,{sx:{...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(m)&&{color:m},...Bht(y)&&{textAlign:y},...Bht(C)&&{paddingLeft:C},...Bht(M)&&{paddingTop:M},...Bht(S)&&{paddingRight:S},...Bht(D)&&{paddingBottom:D},...Bht(x)&&{backgroundColor:x},border:`1px solid ${Bht(g)?g:"#ccc"}`,borderRadius:"4px"},children:e})]})}const Fe="small"===L?40:56,Ie={position:"relative",display:Bht(P)?"block":"inline-block",...Bht(P)&&{width:P},...Bht(T)&&{minWidth:T},...Bht(N)&&{maxWidth:N},...Bht(b)&&{marginLeft:b},...Bht(w)&&{marginTop:w},...Bht(k)&&{marginRight:k},...Bht(_)&&{marginBottom:_}},Ae={width:"100%",...Bht(O)&&{height:O},...Bht(E)&&{minHeight:E},...Bht(j)&&{maxHeight:j},...!Bht(P)&&!Bht(T)&&{minWidth:"240px"},...a},ze=Bht(m)?m:Bht(v)?v:void 0,Le={..."small"===L&&!O&&{height:`${Fe}px`},...Bht(x)&&{backgroundColor:x},...ze&&{color:ze},...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(g)&&{"& .MuiOutlinedInput-notchedOutline":{borderColor:g},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:g},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:g}},..."filled"===V&&Bht(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},..."standard"===V&&Bht(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},"& .MuiSelect-select":{...Bht(y)&&{textAlign:y},...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(M)&&{paddingTop:M},...Bht(D)&&{paddingBottom:D},...Bht(C)&&{paddingLeft:C},...Bht(S)&&{paddingRight:S}}},Be={...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G}},Ve=e=>{const t=((e,t)=>e.find(e=>String(e.id)===t))(ie,e),r=t??{id:e};me.current=!0,de(e),ce&&LGe(le,F,r),I&&ve?.setLocalStateValue&&ve.setLocalStateValue(I,r)},$e=ce?zGe(le.watch(F),F,"id")||"":ue,He=ce?le.formState?.errors?.[F]:void 0;return at("div",{style:Ie,...R,onClick:e=>{ve?.isConfigurationMode&&R&&"onClick"in R&&(e.stopPropagation(),e.preventDefault(),R.onClick())},children:it(ag,{variant:V,size:L,sx:Ae,disabled:_e,required:s,error:!!He,children:[!B&&at(Kg,{id:`${F}-label`,shrink:$?pe||!!$e:void 0,sx:Be,children:o}),at(Fb,{value:$e,onChange:e=>{ve?.isConfigurationMode||Ve(e.target.value)},onFocus:()=>he(!0),onBlur:()=>he(!1),...ve?.isConfigurationMode&&{open:!1},labelId:B?void 0:`${F}-label`,label:B?void 0:o,disabled:_e,native:$,sx:Le,children:$?[at("option",{value:""},"__placeholder__"),...ne?[at("option",{disabled:!0,children:"Loading..."},"__loading__")]:ie.map(e=>at("option",{value:e.id,children:e.value},e.id))]:ne?it(xx,{disabled:!0,children:[at(od,{size:20,sx:{mr:1}}),"Loading..."]}):ie.map(e=>at(xx,{value:e.id,children:e.value},e.id))}),He&&at(wg,{error:!0,children:He?.message||l})]})})};const $ht=({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:P="0",marginBottom:O="0",paddingLeft:E="0",paddingTop:j="0",paddingRight:T="0",paddingBottom:N="0",width:R,height:F,minHeight:I,maxHeight:A,minWidth:z,maxWidth:L,sx:B,configurationItemInfo:V,sourceDataModelField:$,disabled:H=!1,...q})=>{const W=Kt(),U=W?.control,G=!!U&&!!t&&!r;IC(),UC(),ht();const K=Srt({name:t,sourceDataModelField:$,form:W,enabled:G}),Y={required:!!o&&n,validate:e=>!o||null!=e||n},Z=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),X={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;return void 0!==K&&(t=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(K)),it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:P,marginBottom:O,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),it(Zf,{display:"flex",flexDirection:"top"===M?"column":"row",alignItems:"center",mt:"top"===M?1:0,children:[s&&at(Zf,{mr:"horizontal"===p?1:0,mb:"vertical"===p?1:0,children:at(jGe,{iconName:s,color:w})}),at(gw,{value:t??void 0,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,disabled:!0,...q}),l&&at(Zf,{ml:"horizontal"===p?1:0,mt:"vertical"===p?1:0,children:at(jGe,{iconName:l,color:w})}),at(Od,{sx:{ml:1,fontSize:f,fontFamily:m,fontWeight:y,color:h},children:t})]})]})}return it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:P,marginBottom:O,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),at(tr,{name:t||"",control:U,defaultValue:"number"==typeof K?K:k,rules:Y,render:({field:e,fieldState:r})=>{const o=zGe(e.value,t,"value");return it(nt,{children:[at(gw,{...e,value:o??k,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,onChange:(e,r)=>{LGe(W,t,r,"value")},...q}),r.error&&at(wg,{error:!0,sx:{mt:1},children:"required"===r.error.type?n:a})]})}})]})},Hht=({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=Ye(),[P,O]=e.useState(!1),{isConfigurationMode:E,onConfigurationItemClicked:j,selectedConfigurationItemId:T,onInternalNavigation:N}=IC();e.useEffect(()=>{if(!P)return;const e=e=>{"Escape"!==e.key||E||O(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[P,E]);const R=()=>O(!0),F=()=>O(!1);let I={};I=f&&!h?{onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F}:{onClick:e=>{O(e=>!e)}};const A={bgcolor:l,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k},z=P||E&&(T===_||c.some(e=>e.id===T));return it("div",{role:"presentation",children:[h&&at(Lf,{open:P}),at(Pw,{ariaLabel:o,direction:t,icon:at(Jw,{icon:at(jGe,{iconName:n,color:i,size:24}),openIcon:at(jGe,{iconName:a,color:s,size:24})}),open:z,onOpen:f&&!h?R:void 0,onClose:f&&!h?F:void 0,FabProps:{color:"primary",sx:A,size:r,gap:C},slotProps:{fab:{"data-testid":"speed-dial-fab","aria-label":o}},sx:{"& .MuiSpeedDial-fab":{backgroundColor:l,...A},"& .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},...I,...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:vrt({theme:D,selected:u})}:{};return at(Uw,{icon:at(jGe,{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?(m9e(o)?N?.({link:o.internalLink??""}):h9e(o.externalLink),O(!1)):O(!1)},...f}},e.id)})})]})},qht=({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 _=Ye(),C=o?"vertical":a,{isConfigurationMode:M,onConfigurationItemClicked:S,selectedConfigurationItemId:D}=IC();return at(Vk,{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:at(jk,{sx:{[`&.${Dk.vertical}`]:{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},[`&.${Dk.vertical} .${Dk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c},[`&.${Dk.horizontal} .${Dk.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:vrt({theme:_,selected:o})}:{},c=e.color||(a?"#000":"#555");return at(lk,{...l,children:it(Mk,{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?at(jGe,{size:n,color:e.iconColor||"#000",iconName:e.iconName,borderRadius:e?.iconBorderRadius||0,backgroundColor:e.iconBackgroundColor||"transparent"}):void 0,children:[at(Od,{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&&at(Ik,{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:at(Od,{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)})})},Wht=gl(Yk)(({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})),Uht=({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:P,configurationItemInfo:O,...E})=>{const j=Kt(),T=j?.control,N=!!T&&!!M,R={required:!!r&&o,validate:e=>!(r&&!e)||o};IC(),UC(),ht();const F=Srt({name:M,sourceDataModelField:S,form:j,enabled:N}),[I,A]=e.useState(!1);if(t){let e=!1;return void 0!==F?e="true"===String(F).toLowerCase()||!0===F:N&&(e=Boolean(zGe(j.watch(M),M,"value"))),it(ag,{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"},...P},...O,children:[a&&at(Dg,{component:"legend",children:a}),it(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:[at(Wht,{disabled:!0,checked:e,thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{pointerEvents:"none"}},...E}),at(Od,{sx:{ml:1},children:e?"ON":"OFF"})]})]})}return it(ag,{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"},...P},...O,children:[a&&at(Dg,{component:"legend",children:a}),N?at(tr,{name:M,rules:R,control:T,defaultValue:!1,render:({field:e,fieldState:t})=>{const r=Boolean(zGe(e.value,M,"value"));return it(nt,{children:[at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Wht,{checked:r,disabled:D,onChange:(e,t)=>{LGe(j,M,t,"value")},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})}),t.error&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.error.type?o:n})]})}}):at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Wht,{checked:I,disabled:D,onChange:(e,t)=>{A(t)},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})})]})},Ght=({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:P="#000",fontSize:O,fontWeight:E,fontFamily:j,wrapText:T,textAlign:N,iconName:R,iconColor:F,iconSize:I,iconPlacement:A="left",hoverTextColor:z,itemBorder:L,itemBorderRadius:B,itemBackgroundColor:V,itemSelectedBackgroundColor:$,itemHoverBackgroundColor:H,selectedItemElevation:q=0,itemDisableRipple:W,configurationItemInfo:U,sx:G})=>{const K=Ye(),{isConfigurationMode:Y,onConfigurationItemClicked:Z,selectedConfigurationItemId:X}=IC(),[J,Q]=e.useState(null),ee=e=>Q(e.currentTarget),te=()=>Q(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:P,r=e&&$||V;return{color:t,fontSize:O,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:z||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:vrt({theme:K,selected:t})}},ie=e=>{const t=e.tabKey===o,r=oe(t);return it(xx,{onClick:()=>{ne(e),te()},sx:{...r,display:"flex",alignItems:"center"},...ae(e),children:[e.iconName&&at(jGe,{iconName:e.iconName,sx:{fontSize:O,color:t?D:P,mr:1}}),at(Zf,{component:"span",children:e.label})]},e.id)};if(n)return it(tu,{elevation:w,style:re,sx:G,...U,children:[at(cd,{onClick:ee,children:at(jGe,{size:I,color:F,iconName:R})}),at(fx,{anchorEl:J,open:Boolean(J),onClose:te,children:t.map(ie)})]});const se=t.findIndex(e=>e.tabKey===o);return at(tu,{elevation:w,style:re,sx:G,...U,children:at(tC,{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:P}};return at(e_,{label:e.label,disableRipple:W,sx:{...r,textTransform:"none"},onClick:()=>ne(e),iconPosition:"right"===A?"end":"start",icon:e.iconName?at(jGe,{iconName:e.iconName,sx:{fontSize:O,color:t?D:P}}):void 0,...ae(e)},e.id)})})})},Kht=e=>{if(!e)return null;if(e instanceof Date)return zot(e)?e:null;if("object"==typeof e&&null!==e&&"function"==typeof e.toDate){const t=e.toDate();return t instanceof Date&&zot(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=qnt(o,e,n);if(zot(t))return t}return null}return null},Yht=e=>{const t=Kht(e);return t?qot(t,"HH:mm"):null},Zht=({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=Kt(),b=x?.control,w=!!b&&!!t;IC();const k=Srt({name:t,sourceDataModelField:n,form:x,enabled:w,mapValue:e=>Yht(e),skipIfNull:!0}),_=Kht(k);e.useRef();const[C,M]=e.useState(_);if(o){const e=void 0!==k?k:w?zGe(x.watch(t),t,"value"):void 0,o=Kht(e),n=o&&zot(o)?qot(o,s):"";return it(Zf,{...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&&at(wg,{children:r}),at(Od,{children:n||i||"-"})]})}return at(Zf,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:at(tr,{name:t,control:b,defaultValue:Yht(k)??null,rules:{required:!!l&&(c||"This field is required"),validate:e=>{if(null==e||""===e)return!0;const t=Kht(e);return t&&zot(t)||u||"Invalid time"}},render:({field:{value:e},fieldState:o})=>{const n=zGe(e,t,"value");return at(mpt,{...v,enableAccessibleFieldDOMStructure:!1,value:Kht(n),onChange:e=>{const r=Yht(e);LGe(x,t,r,"value")},slots:{textField:iC},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:at(mpt,{...v,enableAccessibleFieldDOMStructure:!1,value:C,onChange:e=>M(Kht(e)),slots:{textField:iC},slotProps:{textField:{label:r,placeholder:i,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})},Xht=({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,sourceDataModelField:M})=>{const[S,D]=e.useState(!1),P=M?WGe(M):void 0,O=("string"==typeof P?P:void 0)||t,{onStateChange:E}=YC(),j=()=>{E({id:h,type:"started"})};return at(Jht,{id:h,raised:i,onClick:j,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:S?at(Od,{component:"div",sx:{height:l,width:c,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",color:"gray",textAlign:"center"},children:s||"Video unavailable"}):at(bm,{component:"video",src:O,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:j,onEnded:()=>{E({id:h,type:"completed"})},onError:()=>{D(!0)}})})},Jht=To(fm)`
|
|
1031
|
+
`,hht=e=>{if("menu_item"===e.type){const t=e;if(!t.sx)return!1;const r=e=>!!e&&(Array.isArray(e)?e.some(r):"function"!=typeof e&&("object"==typeof e&&("absolute"===e.position||"fixed"===e.position)));return r(t.sx)}return!1},fht=({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:P,buttonFillColor:O,buttonFillColorDisabled:E,buttonFillColorHover:j,buttonFillColorPressed:T,buttonBorderColor:N,buttonBorderColorDisabled:R,buttonBorderColorHover:F,buttonBorderColorPressed:I,buttonTextColorDisabled:A,buttonTextColorHover:z,buttonTextColorPressed:L,buttonColor:B="#1976d2",buttonDisabledColor:V,withCloseIcon:$=!0,closeIconColor:H=so.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:J,configurationItemInfo:Q,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=Ye(),{isConfigurationMode:ge,selectedConfigurationItemId:ve,onConfigurationItemClicked:xe,onInternalNavigation:be}=IC(),{updateDrawer:we,drawerContainerRef:ke,headerHeight:_e,isMobile:Ce}=EC(),[Me,Se]=e.useState(n),[De]=(()=>{try{return nht()}catch{return[new URLSearchParams,()=>{}]}})(),Pe=e.useMemo(()=>{if(t)return t;const e=De.get(l9e),r=De.get(s9e);let o=null,n=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);o=e.get(l9e),n=e.get(s9e)}catch(LQe){}return e||r||o||n||""},[t,De]);e.useEffect(()=>{Se(n)},[n]);const Oe=Boolean(ge&&(ve===J||i.some(e=>e.id===ve))),Ee=()=>"permanent"===o||(ge?Oe: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,Oe,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=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:vrt({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=w9e(t.internalLink);return!(!r||!Pe)&&r===Pe})(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 it(xx,{sx:a,selected:r,onClick:()=>{if(t?.link){m9e(t.link)?be?.({link:t.link?.internalLink||""}):h9e(t.link?.externalLink)}},disabled:t.disabled,...o,children:[t.startIcon&&at(jGe,{iconName:t.startIcon,color:t.textColor}),at(Od,{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&&at(jGe,{iconName:t.endIcon,color:t.textColor})]},t.id)}case"divider_item":{const t=e;return at(jpt,{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 at(Fpt,{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 at(Rpt,{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 at(Tpt,{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){m9e(t.link)?be?.({link:t.link?.internalLink||""}):h9e(t.link?.externalLink)}},moleculeId:t.id,configurationItemInfo:o},t.id)}default:return null}},Re=Ce&&void 0!==ce?ce:le,Fe=at(sht,{anchor:r,variant:o,open:Ee(),onClose:Te,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:Re,backgroundColor:ue,marginTop:`calc(${_e} + ${pe})`,marginRight:he,marginBottom:fe,marginLeft:me,container:ke,sx:ee,children:it(uht,{scrollable:re,sx:te,...Q&&Object.keys(Q).length?{...Q,"data-testid":"drawer-content-config","aria-label":"drawer-content"}:{},children:[(Ee()||"permanent"===o)&&i.length>0?it(nt,{children:[at(pht,{gap:de,scrollable:re,children:i.filter(e=>!hht(e)).map(Ne)}),i.filter(e=>hht(e)).map(Ne)]}):null,!!$&&(!!G||Ee())&&at(dht,{top:K,left:Y,borderRadius:Z,elevation:X,backgroundColor:U,onClick:e=>{e.stopPropagation();Ee()?Te(e,"closeIconClicked"):je()},"data-testid":"close-icon",children:at(jGe,{"data-testid":"icon-renderer",iconName:q,size:W,color:H})})]})});return s&&"permanent"!==o?it(nt,{children:[at(yKe,{moleculeId:J,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:P,fillColor:O||B,fillColorDisabled:E||V,fillColorHover:j,fillColorPressed:T,borderColor:N,borderColorDisabled:R,borderColorHover:F,borderColorPressed:I,textColorDisabled:A,textColorHover:z,textColorPressed:L,externalOnClick:e=>Me?Te(e,"buttonClicked"):je(),configurationItemInfo:Q}),at(cht,{children:Fe})]}):at(cht,{children:Fe})},mht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(cYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:wYe,guide:!0,placeholderChar:" "})}),yht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0},ght=({masked:e,errorMsg:t,inputSx:r,labelSx:o,sx:n,variant:a="outlined",...i})=>{const s=e?{inputComponent:mht}:{};return at(iC,{...i,variant:a,error:!!t,helperText:t||null,type:"text",sx:{...n},slotProps:{input:{sx:{...r,...n},...s},inputLabel:{sx:{...o,...n}}}})},vht=({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:P,maxWidth:O,sx:E,name:j,sourceDataModelField:T,configurationItemInfo:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!j),V=Srt({name:j,sourceDataModelField:T,form:z,enabled:B});e.useState("");const[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@(([^<>()[\]\\.,;:\s@"]+\.)+[^<>()[\]\\.,;:\s@"]{2,})$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=yht(w),t=yht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=yht(M)||yht(S)||yht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=yht(M)||yht(S)||yht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(j),j,"value");e=t?String(t):""}const t=e||i||"-";return it("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:P,maxWidth:O},...N,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...E},children:a}),at(Od,{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 G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...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:_}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y=l?3:1,Z={...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}};return at("div",B?{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},...E},children:at(tr,{name:j,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(ght,{masked:s,required:r,errorMsg:t.error?.message,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:zGe(e.value,j,"value")||"",onChange:e=>{LGe(z,j,e.target.value,"value")},...N||{}})})}:{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:P,maxWidth:O},...E},children:at(ght,{masked:s,required:r,errorMsg:void 0,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:$,onChange:e=>H(e.target.value),...N||{}})})},xht=({src:t,text:r,type:o,link:n,sourceDataModelField:a,color:i=so.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:P,borderColor:O,borderWidth:E,borderStyle:j,borderRadius:T,iconOnly:N,ariaLabel:R,iconName:F,iconSize:I,validationErrorText:A})=>{const{onStateChange:z}=YC(),{onInternalNavigation:L,isConfigurationMode:B,localStateObject:V}=IC();UC();const $=ht(),H=a?WGe(a):r,q=n&&y9e(n),W=e.useMemo(()=>q?g9e(n,$?.rawItemDataByDmfId):null,[n,q,$?.rawItemDataByDmfId]),U=q&&!W,G=e.useMemo(()=>{if(W)return W.destination;const e=n?m9e(n):"internalLink"===o||"internal_link"===o,r=n?e?n.internalLink:n.externalLink:void 0;return t??r??void 0},[W,n,o,t]),K=e.useMemo(()=>W?!W.isExternal:!!n&&m9e(n),[W,n]),Y=e.useMemo(()=>D||(W?W.isExternal?"_blank":"_self":K?"_self":"_blank"),[D,W,K]),Z=s||U,X=Z?l||no(i):i,J=B||Z?void 0:G,Q=Boolean(F),ee="regular"===C?"normal":C,te=N?at(jGe,{iconName:F||"external-link",size:I??16}):it(nt,{children:[at("span",{children:String(H||"")}),Q&&at(jGe,{iconName:F,size:I??16})]}),{onClick:re,onDoubleClick:oe,...ne}=f||{},ae=at(mv,{href:J,component:"a",target:Y,onClick:e=>{z({id:h,type:"clicked"});if(!s&&!U&&!B)return W?(e.preventDefault(),void(W.isExternal?h9e(W.destination):L?.({link:W.destination,webpageAlias:W.webpageAlias,query:W.recordId?{rwoRecordId:W.recordId}:void 0}))):K&&G?(e.preventDefault(),void L?.({link:G})):void(!K&&G&&(e.preventDefault(),h9e(G)));e.preventDefault()},onClickCapture:re||void 0,onDoubleClickCapture:oe||void 0,"aria-label":N?R||String(H||"")||"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:Z?"not-allowed":"pointer",borderColor:O,borderWidth:E,borderStyle:j,borderRadius:T,display:N||Q?"inline-flex":void 0,gap:Q&&!N?"4px":void 0,"& .MuiLink-root":{color:"inherit",textDecorationColor:"inherit"},"&:hover":{color:Z?X:no(X,.8),textDecorationColor:Z?X:no(X,.8)},"&:active":{color:Z?X:no(X,.6),textDecorationColor:Z?X:no(X,.6)},"&.Mui-disabled":{color:l||no(i),textDecorationColor:l||no(i),cursor:"not-allowed"},...P},align:S,variant:u,underline:c,...ne,children:te});return ae},bht=e=>({justifyContent:e.textAlign||"flex-start",backgroundColor:e.backgroundColor,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}),wht=({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:P="0",buttonMarginRight:O="0",buttonMarginBottom:E="0",buttonMarginLeft:j="0",buttonPaddingTop:T="0",buttonPaddingRight:N="0",buttonPaddingBottom:R="0",buttonPaddingLeft:F="0",buttonIconOnly:I,buttonElevation:A,buttonFillColor:z,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:J="top",transformOriginHorizontal:Q="left",elevation:ee=3,sx:te,moleculeId:re,configurationItemInfo:oe})=>{const ne=Ye(),{isConfigurationMode:ae,selectedConfigurationItemId:ie,onConfigurationItemClicked:se,onInternalNavigation:le}=IC(),ce=ht?.(),[ue,de]=e.useState(null),[pe,he]=e.useState(!1),[fe]=(()=>{try{return nht()}catch{return[new URLSearchParams,()=>{}]}})(),me=e.useMemo(()=>{const e=fe.get(l9e),t=fe.get(s9e);let r=null,o=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);r=e.get(l9e),o=e.get(s9e)}catch(LQe){}return e||t||r||o||""},[fe]),ye=e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=w9e(t.internalLink);return!(!r||!me)&&r===me},ge=Boolean(ae&&(ie===re||r.some(e=>e.id===ie))),ve=()=>he(!0),xe=()=>he(!1),be={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?it(Zf,{children:[at(yKe,{ref:de,text:g,variant:v,moleculeId:re,textColor:x,fontSize:b,fontWeight:w,fontFamily:k,disabled:_,gap:C,startIcon:M,endIcon:S,onClick:ve,marginTop:P,marginRight:O,marginBottom:E,marginLeft:j,paddingTop:T,paddingRight:N,paddingBottom:R,paddingLeft:F,borderRadius:D,iconOnly:I,elevation:A,fillColor:z||Y,fillColorDisabled:L,fillColorHover:B,fillColorPressed:V,borderColor:$,borderColorDisabled:H,borderColorHover:q,borderColorPressed:W,textColorDisabled:U,textColorHover:G,textColorPressed:K,configurationItemInfo:oe}),at(fx,{open:ae?ge:pe,variant:"menu",anchorEl:ue,disablePortal:!0,disableScrollLock:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,onClose:xe,anchorOrigin:{vertical:Z,horizontal:X},transformOrigin:{vertical:J,horizontal:Q},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":be["& .MuiMenu-list"],"& .MuiMenuItem-root":be["& .MuiMenuItem-root"],"& .MuiListItemText-primary":be["& .MuiListItemText-primary"],"& .MuiTypography-root":be["& .MuiTypography-root"]}}},sx:{...be,"& .MuiMenu-paper":be["& .MuiMenu-paper"]},children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&y9e(e.link)?g9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&y9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:vrt({theme:ne,selected:t})}:{};return it(xx,{sx:bht(e),selected:r,disabled:e.disabled||n,onClick:()=>{e?.link&&(o?o.isExternal?h9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):m9e(e.link)?le?.({link:e.link?.internalLink||""}):h9e(e.link?.externalLink)),xe()},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Od,{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&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})]}):at(tu,{id:re,sx:{...be,backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},elevation:ee,...oe,children:at(wv,{disablePadding:!0,children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&y9e(e.link)?g9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&y9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:vrt({theme:ne,selected:t})}:{};return it(Dv,{disabled:e.disabled||n,sx:bht(e),selected:r,onClick:()=>{e?.link&&(o?o.isExternal?h9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):m9e(e.link)?le?.({link:e.link?.internalLink||""}):h9e(e.link?.externalLink))},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Wv,{primary:at(Od,{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&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})})},kht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};const _ht=({errorMsg:e,stepValue:t,minValue:r,allowNegative:o,inputSx:n,labelSx:a,variant:i="outlined",...s})=>at(iC,{...s,variant:i,type:"number",error:!!e,helperText:e||null,inputProps:{step:t,min:o?void 0:r},slotProps:{input:{sx:n},inputLabel:{sx:a}}}),Cht=({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:P,minHeight:O,maxHeight:E,minWidth:j,maxWidth:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!m);IC(),UC();const V=Srt({name:m,sourceDataModelField:y,form:z,enabled:B}),[$,H]=e.useState(""),q=parseFloat(f),W=h?void 0:0,U={required:!!r&&o,pattern:{value:h?/^-?\d*(\.\d+)?$/:/^\d*(\.\d+)?$/,message:n}};h||(U.min={value:0,message:"Value cannot be less than zero"});const G=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=kht(k),t=kht(C);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=kht(S)||kht(O)||kht(E);if(!o&&!e&&!t)return;const n="number"==typeof u?1.5*u:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[S,O,E,F,R,u,k,C,I]),K=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=kht(S)||kht(O)||kht(E);return!t||t>=36?e:-6},[S,O,E,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(m),m,"value");e=t?String(t):""}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 it("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},...O&&{minHeight:O},...E&&{maxHeight:E}},sx:N,...D,children:[a&&at(wg,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,marginBottom:"4px"},children:a}),at(Od,{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 Y={backgroundColor:s,color:c,fontSize:u,fontFamily:d,fontWeight:p,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...O&&{minHeight:O},...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"}},Z={color:c,"&.Mui-focused":{color:c},...I&&{display:"none"},...void 0!==G&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${G}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${K}px) scale(0.75)`}}},X={...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...O&&{minHeight:O},...E&&{maxHeight:E}};return at(ag,B?{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},...O&&{minHeight:O},...E&&{maxHeight:E},...N},...D,children:at(tr,{name:m,rules:U,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(_ht,{errorMsg:t.error?.message,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:zGe(e.value,m,"value")||"",onChange:e=>{LGe(z,m,e.target.value,"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},...O&&{minHeight:O},...E&&{maxHeight:E},...N},...D,children:at(_ht,{errorMsg:void 0,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:$,onChange:e=>H(e.target.value)})})},Mht=e=>{const t={text:e.label,validate:()=>!0},{rule:r}=e,o=Sht(r);if(o||Dht(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},Sht=e=>!!e?.MAX,Dht=e=>!!e?.MIN,Pht=({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}=Kt()||{},{text:_,subText:C,placeholderText:M,subPlaceholderText:S,validationText:D}=i,P=o.map(Mht),O="password",E=`reEnter${O}`,j=b?.(O),T=b?.(E);return e.useEffect(()=>{j!==T&&k(E,{type:"manual",message:"Passwords do not match"})},[j,T,k,E]),it(Zf,{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:[at(Ort,{...r,inputType:"password",text:_?.text,name:O,placeholderText:M?.text}),at(Ort,{...r,inputType:"password",text:C?.text,name:E,placeholderText:S?.text}),at(tYe,{rules:P,value:j,label:D?.text,isSubmitted:w?.isDirty,validationState:a})]})},Oht=["+"," ","(",/[0-9]/,/[0-9]/,/[0-9]/,")"," ",/[0-9]/,/[0-9]/,/[0-9]/,"-",/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],Eht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(cYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:Oht,guide:!0,placeholderChar:" "})}),jht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};function Tht(e){const t=(e??"").replace(/\D+/g,"");if(!t)return"";let r="",o=0;return gYe.forEach(e=>{"string"==typeof e?r+=e:o<t.length?(r+=t[o],o+=1):r+="_"}),r}const Nht=({masked:e,errorMsg:t,inputSx:r,labelSx:o,variant:n="outlined",...a})=>at(iC,{...a,variant:n,error:!!t,helperText:t||null,slotProps:{input:{sx:r,...e?{inputComponent:Eht}:{}},inputLabel:{sx:o}}}),Rht=({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:P,maxWidth:O,name:E,sourceDataModelField:j,configurationItemInfo:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!E),V=Srt({name:E,sourceDataModelField:j,form:z,enabled:B}),[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^\d{10}$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=jht(w),t=jht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=jht(M)||jht(S)||jht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=jht(M)||jht(S)||jht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=zGe(z.watch(E),E,"value");e=t?String(t):""}const t=(s?Tht(e):e)||i||"-";return it("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}},...T,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...N},children:a}),at(Od,{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 G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...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"}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y={marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,width:"fit-content",...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D}};return at(ag,B?{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(tr,{name:E,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(Nht,{masked:s,errorMsg:t.error?.message,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:zGe(e.value,E,"value")||"",onChange:e=>{const t=(e?.target?.value??"").toString().replace(/\D+/g,"");LGe(z,E,t,"value")}})})}:{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...P&&{minWidth:P},...O&&{maxWidth:O},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(Nht,{masked:s,errorMsg:void 0,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:$,onChange:e=>{const t=(e?.target?.value??"").toString();H(t.replace(/\D+/g,""))}})})},Fht=({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:P,minWidth:O,maxWidth:E,placement:j="right",configurationItemInfo:T={},disabled:N=!1,maxValue:R=5,ratingPrecision:F=.5,sx:I,...A})=>{const z=Kt(),L=z?.control,B=!!z&&!!L&&!!r;IC(),UC();const V=Srt({name:r,sourceDataModelField:c,form:z,enabled:B});!B||z.formState.errors;const[$,H]=e.useState(null),[q,W]=e.useState(-1),U=l&&-1!==q;if(o){let e=null;return void 0!==V&&(e=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(V)),it(ag,{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},...P&&{maxHeight:P},...O&&{minWidth:O},...E&&{maxWidth:E},...I},...T,children:[t&&at(Od,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),at(xb,{value:e,max:R,precision:F,readOnly:!0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},...I},...A})]})}const G={required:!!n&&a,validate:e=>!n||null!==e&&0!==e||a};return it(ag,{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},...P&&{maxHeight:P},...O&&{minWidth:O},...E&&{maxWidth:E},...I},...T,children:[t&&at(Od,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),it(Zf,{sx:{display:"flex",alignItems:"center"},children:["left"===j&&at(Od,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?zGe(z.getValues(r),r,"value")??V??"":$??V??""}),at(tr,{name:r,control:L,defaultValue:"number"==typeof V?V:null,rules:G,render:({field:e,fieldState:{error:t}})=>{const o=zGe(e.value,r,"value");return it(nt,{children:[at(xb,{value:o??V??0,max:R,precision:F,disabled:N,onChange:(e,t)=>{LGe(z,r,t,"value")},onChangeActive:l?(e,t)=>W(t??-1):void 0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},marginX:l?1:0,...I},...A}),t&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.type?a:i})]})}}),"right"===j&&at(Od,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?zGe(z.getValues(r),r,"value")??V??"":$??V??""})]})]})},Iht=["value","label","id","code"],Aht=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),zht=e=>{if("string"==typeof e||"number"==typeof e)return e;if(Aht(e)){if("value"in e&&("string"==typeof e.value||"number"==typeof e.value))return e.value;for(const t of Iht){if("value"===t)continue;const r=e[t];if("string"==typeof r||"number"==typeof r)return r}}},Lht=(e,t)=>{if(null==t)return;const r=String(t);return e.find(e=>String(e.id)===r||(void 0!==e.value&&String(e.value)===r||void 0!==e.label&&String(e.label)===r))},Bht=e=>""!==e&&null!=e,Vht=({open:t,text:o,disabled:n,sx:a,placeholderText:i,required:s=!1,requiredErrorText:l="This field is required",isDisplayOnly:c=!1,displayText:u,visible:d=!0,fontSize:p,fontFamily:h,fontWeight:f,textColor:m,textAlign:y,borderColor:g,color:v,backgroundColor:x,marginLeft:b="0",marginTop:w="0",marginRight:k="0",marginBottom:_="0",paddingLeft:C,paddingTop:M,paddingRight:S,paddingBottom:D,width:P,height:O,minHeight:E,maxHeight:j,minWidth:T,maxWidth:N,configurationItemInfo:R={},name:F,sourceDataModelField:I,predefinedValue:A,hideWhenNoValue:z=!1,inputSize:L="medium",hideLabel:B=!1,variant:V="outlined",native:$=!1,options:H,publishToWebpageContext:q=!1,webpageContextKey:W,dataDrivenOptions:U})=>{const G="regular"===f?"normal":f,K=e=>{if(null==e)return!1;if("string"==typeof e&&""===e.trim())return!1;if("object"==typeof e&&null!==e){const t=e;if(0===Object.keys(t).length)return!1;const r="value"in t&&""!==t.value&&null!==t.value&&void 0!==t.value,o="id"in t&&""!==t.id&&null!==t.id&&void 0!==t.id,n=Object.keys(t).some(e=>"value"!==e&&"id"!==e&&""!==t[e]&&null!==t[e]&&void 0!==t[e]);if(!r&&!o&&!n)return!1}return!0},Y=U&&!U.isIgnored&&("variable"===U.nature&&Boolean(U.variableName)||"data_model"===U.nature&&Boolean(U.sourceDataModelFieldId)||!U.nature&&(Boolean(U.variableName)||Boolean(U.sourceDataModelFieldId))),Z=e.useMemo(()=>{if(!Y||!U)return;const e=U.nature?.toString().replace(/-/g,"_").toLowerCase()??"";return("variable"===e||!e&&U.variableName)&&U.variableName||U.sourceDataModelFieldId},[Y,U]),X=Z?qGe(Z):void 0,J=e.useMemo(()=>{if(null!=X&&("string"!=typeof X||""!==X.trim())&&!(Array.isArray(X)&&0===X.length||"object"==typeof X&&0===Object.keys(X).length))return X},[X]),Q=e=>{if(null!=e){if("string"==typeof e||"number"==typeof e)return e;if("object"==typeof e&&null!==e){const t=e;if("value"in t&&("string"==typeof t.value||"number"==typeof t.value))return t.value;if("id"in t&&("string"==typeof t.id||"number"==typeof t.id))return t.id}}},ee=e.useMemo(()=>{if(Y&&J){if(Array.isArray(J))return J.map(e=>{if("string"==typeof e||"number"==typeof e)return{id:e,value:String(e)};if(e&&"object"==typeof e){const t=e,r=Q(t.id)??Q(t.value)??Q(t.code)??Q(t.label),o=Q(t.value)??Q(t.label)??Q(t.code)??Q(t.id),n=Q(t.label)??Q(t.value)??Q(t.code)??Q(t.id);return void 0===r||void 0===o?{id:"",value:""}:{id:r,value:String(o),label:String(void 0!==n?n:o)}}return{id:"",value:""}}).filter(e=>""!==e.id&&""!==e.value);if(J&&"object"==typeof J){const e=J,t=Q(e.id)??Q(e.value)??Q(e.code)??Q(e.label),r=Q(e.value)??Q(e.label)??Q(e.code)??Q(e.id),o=Q(e.label)??Q(e.value)??Q(e.code)??Q(e.id);return void 0===t||void 0===r?[]:[{id:t,value:String(r),label:String(void 0!==o?o:r)}].filter(e=>""!==e.id&&""!==e.value)}}},[Y,J]),te=Boolean(ee&&ee.length>0),re=c||Y?void 0:I,{dataModelFieldOptions:oe,isLoading:ne}=(e=>{const{pickList:t}=dt(),{data:o=[],refetch:n,isLoading:a}=r.useQuery({queryKey:[KGe,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}})(re),ae=H&&H.length>0?H:te?ee:oe,ie=e.useMemo(()=>(ae||[]).map(e=>"string"==typeof e?{id:e,value:e}:e),[ae]),se=ie.length>0||!ne;let le;e.useEffect(()=>{U&&console.log("🔵 [Select] Data-Driven Options Debug:",{dataDrivenOptions:U,shouldUseDataDrivenOptions:Y,dataDrivenOptionsReference:Z,rawResolvedDataDrivenOptions:X,resolvedDataDrivenOptions:J,dataDrivenOptionsList:ee,hasValidDataDrivenOptions:te,effectiveOptionsLength:ae?.length,normalizedOptionsLength:ie.length,optionsReady:se})},[U,Y,Z,X,J,ee,te,ae,ie,se]);try{le=Kt()}catch(qe){le=null}const ce=!!le?.control&&!!F,[ue,de]=e.useState(""),[pe,he]=e.useState(!1),fe=e.useRef(!1),me=e.useRef(!1),ye=e.useRef(void 0),ge=e.useRef(void 0);e.useEffect(()=>{ye.current!==I&&(ye.current=I,fe.current=!1,me.current=!1,ge.current=void 0)},[I]);let ve={setLocalStateValue:null,isConfigurationMode:!1,selectedConfigurationItemId:null};try{ve=IC()}catch(qe){}let xe={stateConfig:null};try{xe=UC()}catch(qe){}let be=null;try{be=ht()}catch(qe){}const we=KC();ve.isConfigurationMode&&ve.selectedConfigurationItemId;const ke=null!=A&&""!==A,_e=Boolean(n)||ke,Ce=UGe(),Me=ce&&le?le.watch(F):void 0,Se=ce&&le&&F?zGe(Me,F,"id"):void 0,De=I?Ce(I):void 0,Pe=e.useMemo(()=>c||void 0!==De&&K(De)?De:null!=Se&&""!==Se&&K(Se)?Se:void 0,[c,De,Se]);e.useEffect(()=>{I&&!c&&console.log("🔍 [Select] Value Resolution Debug:",{name:F,sourceDataModelField:I,resolvedFromSource:De,formPrefillValue:Se,rawResolvedDataValue:Pe,isInFormContext:ce})},[F,I,De,Se,Pe,ce,c]),e.useEffect(()=>{ge.current!==Pe&&(ge.current=Pe,void 0===Pe||me.current||(fe.current=!1))},[Pe]);const Oe=be?.itemDataByDmfId?.[F],Ee=zht(Oe),je=e.useMemo(()=>{if(Pe){if(Aht(Pe)){const e=Pe.id;if("string"==typeof e||"number"==typeof e){const t=ie.length>0?Lht(ie,e):void 0;return t?{...t,...Pe}:Pe}for(const t of["value","label","code"]){const e=Pe[t];if("string"==typeof e||"number"==typeof e){const t=ie.length>0?Lht(ie,e):void 0;return t||Pe}}return Pe}if("string"==typeof Pe||"number"==typeof Pe){return(ie.length>0?Lht(ie,Pe):void 0)||{id:Pe}}}},[Pe,ie]),Te=Srt({name:F,sourceDataModelField:I,form:le,fallbackKey:void 0,enabled:!1,mapValue:()=>je}),Ne=zht(Pe)??("string"==typeof Te||"number"==typeof Te?Te:void 0);e.useEffect(()=>{ke&&null!=A&&F&&(ce?LGe(le,F,A,"id",{shouldDirty:!1,shouldTouch:!1,shouldValidate:!1}):de(A))},[ke,A,ce,le,F]),e.useEffect(()=>{if(!ce||!le)return;if(ke)return;if(!I)return;const e=zGe(le.watch(F),F,"id"),t="object"==typeof e&&null!==e?e.id:e,r=le.formState?.dirtyFields?.[F],o=le.formState?.touchedFields?.[F];if(r||o)return me.current=!0,void(fe.current=!0);if(me.current)return;let n=Pe;if(void 0===n&&null!=Se&&""!==Se&&(n=Se),!K(n))return void console.log("⏭️ [Select] No meaningful value to prefill:",{name:F,sourceDataModelField:I,rawResolvedDataValue:Pe,rawResolvedDataValueType:typeof Pe,rawResolvedDataValueStringified:"object"==typeof Pe?JSON.stringify(Pe):String(Pe),formPrefillValue:Se,resolvedFromSource:De,resolvedFromSourceType:typeof De,resolvedFromSourceStringified:"object"==typeof De?JSON.stringify(De):String(De),valueToUse:n,valueToUseType:typeof n,valueToUseStringified:"object"==typeof n?JSON.stringify(n):String(n),isValueMeaningful:K(n)});const a=Aht(n)?n.id:n;if(null!=t&&""!==t&&void 0!==a&&String(t)!==String(a))return me.current=!0,void(fe.current=!0);if(fe.current&&void 0!==a&&void 0!==t&&String(a)===String(t))return;let i;if(je)i=je;else if(Aht(n)){const e=n.id;"string"!=typeof e&&"number"!=typeof e||(i=n)}else"string"==typeof n||"number"==typeof n?i={id:n}:null!=Se&&""!==Se&&("string"==typeof Se||"number"==typeof Se?i={id:Se}:Aht(Se)&&(i=Se));if(i){const e="object"==typeof i&&"id"in i?i.id:i,r=null==t||""===t,o=void 0!==t&&String(e)===String(t);r||o?(console.group("🟢 [Select] Applying prefill value"),console.log("📝 Field name (data capture):",F),console.log("🔑 Source field (data layer):",I),console.log("📥 Resolved from source:",De),console.log("📋 Raw resolved data value:",Pe),console.log("📋 Form prefill value:",Se),console.log("✅ Value to use:",n),console.log("📦 Payload to set:",i),console.log("🆔 Payload ID:",e),console.log("📊 Current form ID:",t),console.log("🔍 Form value empty?",r),console.log("🔍 Form value matches?",o),LGe(le,F,i,"id",{shouldDirty:!1,shouldTouch:!1,shouldValidate:!1}),fe.current=!0,console.log("✅ Prefill value applied successfully"),console.groupEnd()):console.log("⏭️ [Select] Skipping prefill - form value differs (user interaction):",{name:F,payloadId:e,formId:t})}else console.group("⏭️ [Select] No payload to set"),console.log("📝 Field name:",F),console.log("🔑 Source field:",I),console.log("📥 Resolved from source:",De),console.log("📋 Raw resolved data value:",Pe),console.log("📋 Form prefill value:",Se),console.log("✅ Value to use:",n),console.log("📦 Prefill payload:",je),console.groupEnd()},[ke,ce,le,F,I,Pe,je,Se]);const Re=Oe??Ne;if(e.useEffect(()=>{q&&W&&we?.setDynamicContextValue&&void 0!==Re&&we.setDynamicContextValue(W,Re)},[q,W,Re,we]),!d)return null;if(c&&z&&!(Oe??Ne))return null;if(c){const e=u??(null!=Ee?String(Ee):void 0)??(null!=Ne?String(Ne):void 0)??(i||"-"),{css:t,...r}=R||{};return it("div",{css:t,style:{display:"inline-flex",flexDirection:"column",...Bht(w)&&{marginTop:w},...Bht(k)&&{marginRight:k},...Bht(_)&&{marginBottom:_},...Bht(b)&&{marginLeft:b},...Bht(P)?{width:P}:{width:"fit-content"},...Bht(O)&&{height:O},...Bht(E)&&{minHeight:E},...Bht(j)&&{maxHeight:j},...Bht(T)&&{minWidth:T},...Bht(N)&&{maxWidth:N}},...r,children:[o&&at(wg,{sx:{...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},color:Bht(m)?m:"#000",marginLeft:0,marginBottom:"4px",...Bht(y)&&{textAlign:y}},children:o}),at(Od,{sx:{...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(m)&&{color:m},...Bht(y)&&{textAlign:y},...Bht(C)&&{paddingLeft:C},...Bht(M)&&{paddingTop:M},...Bht(S)&&{paddingRight:S},...Bht(D)&&{paddingBottom:D},...Bht(x)&&{backgroundColor:x},border:`1px solid ${Bht(g)?g:"#ccc"}`,borderRadius:"4px"},children:e})]})}const Fe="small"===L?40:56,Ie={position:"relative",display:Bht(P)?"block":"inline-block",...Bht(P)&&{width:P},...Bht(T)&&{minWidth:T},...Bht(N)&&{maxWidth:N},...Bht(b)&&{marginLeft:b},...Bht(w)&&{marginTop:w},...Bht(k)&&{marginRight:k},...Bht(_)&&{marginBottom:_}},Ae={width:"100%",...Bht(O)&&{height:O},...Bht(E)&&{minHeight:E},...Bht(j)&&{maxHeight:j},...!Bht(P)&&!Bht(T)&&{minWidth:"240px"},...a},ze=Bht(m)?m:Bht(v)?v:void 0,Le={..."small"===L&&!O&&{height:`${Fe}px`},...Bht(x)&&{backgroundColor:x},...ze&&{color:ze},...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(g)&&{"& .MuiOutlinedInput-notchedOutline":{borderColor:g},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:g},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:g}},..."filled"===V&&Bht(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},..."standard"===V&&Bht(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},"& .MuiSelect-select":{...Bht(y)&&{textAlign:y},...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G},...Bht(M)&&{paddingTop:M},...Bht(D)&&{paddingBottom:D},...Bht(C)&&{paddingLeft:C},...Bht(S)&&{paddingRight:S}}},Be={...Bht(p)&&{fontSize:p},...Bht(h)&&{fontFamily:h},...G&&{fontWeight:G}},Ve=e=>{const t=((e,t)=>e.find(e=>String(e.id)===t))(ie,e),r=t??{id:e};me.current=!0,de(e),ce&&LGe(le,F,r),I&&ve?.setLocalStateValue&&ve.setLocalStateValue(I,r)},$e=ce?zGe(le.watch(F),F,"id")||"":ue,He=ce?le.formState?.errors?.[F]:void 0;return at("div",{style:Ie,...R,onClick:e=>{ve?.isConfigurationMode&&R&&"onClick"in R&&(e.stopPropagation(),e.preventDefault(),R.onClick())},children:it(ag,{variant:V,size:L,sx:Ae,disabled:_e,required:s,error:!!He,children:[!B&&at(Kg,{id:`${F}-label`,shrink:$?pe||!!$e:void 0,sx:Be,children:o}),at(Fb,{value:$e,onChange:e=>{ve?.isConfigurationMode||Ve(e.target.value)},onFocus:()=>he(!0),onBlur:()=>he(!1),...ve?.isConfigurationMode&&{open:!1},labelId:B?void 0:`${F}-label`,label:B?void 0:o,disabled:_e,native:$,sx:Le,children:$?[at("option",{value:""},"__placeholder__"),...ne?[at("option",{disabled:!0,children:"Loading..."},"__loading__")]:ie.map(e=>at("option",{value:e.id,children:e.value},e.id))]:ne?it(xx,{disabled:!0,children:[at(od,{size:20,sx:{mr:1}}),"Loading..."]}):ie.map(e=>at(xx,{value:e.id,children:e.value},e.id))}),He&&at(wg,{error:!0,children:He?.message||l})]})})};const $ht=({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:P="0",marginBottom:O="0",paddingLeft:E="0",paddingTop:j="0",paddingRight:T="0",paddingBottom:N="0",width:R,height:F,minHeight:I,maxHeight:A,minWidth:z,maxWidth:L,sx:B,configurationItemInfo:V,sourceDataModelField:$,disabled:H=!1,...q})=>{const W=Kt(),U=W?.control,G=!!U&&!!t&&!r;IC(),UC(),ht();const K=Srt({name:t,sourceDataModelField:$,form:W,enabled:G}),Y={required:!!o&&n,validate:e=>!o||null!=e||n},Z=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),X={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;return void 0!==K&&(t=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(K)),it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:P,marginBottom:O,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),it(Zf,{display:"flex",flexDirection:"top"===M?"column":"row",alignItems:"center",mt:"top"===M?1:0,children:[s&&at(Zf,{mr:"horizontal"===p?1:0,mb:"vertical"===p?1:0,children:at(jGe,{iconName:s,color:w})}),at(gw,{value:t??void 0,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,disabled:!0,...q}),l&&at(Zf,{ml:"horizontal"===p?1:0,mt:"vertical"===p?1:0,children:at(jGe,{iconName:l,color:w})}),at(Od,{sx:{ml:1,fontSize:f,fontFamily:m,fontWeight:y,color:h},children:t})]})]})}return it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:P,marginBottom:O,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),at(tr,{name:t||"",control:U,defaultValue:"number"==typeof K?K:k,rules:Y,render:({field:e,fieldState:r})=>{const o=zGe(e.value,t,"value");return it(nt,{children:[at(gw,{...e,value:o??k,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,onChange:(e,r)=>{LGe(W,t,r,"value")},...q}),r.error&&at(wg,{error:!0,sx:{mt:1},children:"required"===r.error.type?n:a})]})}})]})},Hht=({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=Ye(),[P,O]=e.useState(!1),{isConfigurationMode:E,onConfigurationItemClicked:j,selectedConfigurationItemId:T,onInternalNavigation:N}=IC();e.useEffect(()=>{if(!P)return;const e=e=>{"Escape"!==e.key||E||O(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[P,E]);const R=()=>O(!0),F=()=>O(!1);let I={};I=f&&!h?{onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F}:{onClick:e=>{O(e=>!e)}};const A={bgcolor:l,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k},z=P||E&&(T===_||c.some(e=>e.id===T));return it("div",{role:"presentation",children:[h&&at(Lf,{open:P}),at(Pw,{ariaLabel:o,direction:t,icon:at(Jw,{icon:at(jGe,{iconName:n,color:i,size:24}),openIcon:at(jGe,{iconName:a,color:s,size:24})}),open:z,onOpen:f&&!h?R:void 0,onClose:f&&!h?F:void 0,FabProps:{color:"primary",sx:A,size:r,gap:C},slotProps:{fab:{"data-testid":"speed-dial-fab","aria-label":o}},sx:{"& .MuiSpeedDial-fab":{backgroundColor:l,...A},"& .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},...I,...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:vrt({theme:D,selected:u})}:{};return at(Uw,{icon:at(jGe,{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?(m9e(o)?N?.({link:o.internalLink??""}):h9e(o.externalLink),O(!1)):O(!1)},...f}},e.id)})})]})},qht=({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 _=Ye(),C=o?"vertical":a,{isConfigurationMode:M,onConfigurationItemClicked:S,selectedConfigurationItemId:D}=IC();return at(Vk,{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:at(jk,{sx:{[`&.${Dk.vertical}`]:{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},[`&.${Dk.vertical} .${Dk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c},[`&.${Dk.horizontal} .${Dk.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:vrt({theme:_,selected:o})}:{},c=e.color||(a?"#000":"#555");return at(lk,{...l,children:it(Mk,{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?at(jGe,{size:n,color:e.iconColor||"#000",iconName:e.iconName,borderRadius:e?.iconBorderRadius||0,backgroundColor:e.iconBackgroundColor||"transparent"}):void 0,children:[at(Od,{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&&at(Ik,{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:at(Od,{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)})})},Wht=gl(Yk)(({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})),Uht=({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:P,configurationItemInfo:O,...E})=>{const j=Kt(),T=j?.control,N=!!T&&!!M,R={required:!!r&&o,validate:e=>!(r&&!e)||o};IC(),UC(),ht();const F=Srt({name:M,sourceDataModelField:S,form:j,enabled:N}),[I,A]=e.useState(!1);if(t){let e=!1;return void 0!==F?e="true"===String(F).toLowerCase()||!0===F:N&&(e=Boolean(zGe(j.watch(M),M,"value"))),it(ag,{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"},...P},...O,children:[a&&at(Dg,{component:"legend",children:a}),it(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:[at(Wht,{disabled:!0,checked:e,thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{pointerEvents:"none"}},...E}),at(Od,{sx:{ml:1},children:e?"ON":"OFF"})]})]})}return it(ag,{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"},...P},...O,children:[a&&at(Dg,{component:"legend",children:a}),N?at(tr,{name:M,rules:R,control:T,defaultValue:!1,render:({field:e,fieldState:t})=>{const r=Boolean(zGe(e.value,M,"value"));return it(nt,{children:[at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Wht,{checked:r,disabled:D,onChange:(e,t)=>{LGe(j,M,t,"value")},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})}),t.error&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.error.type?o:n})]})}}):at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Wht,{checked:I,disabled:D,onChange:(e,t)=>{A(t)},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})})]})},Ght=({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:P="#000",fontSize:O,fontWeight:E,fontFamily:j,wrapText:T,textAlign:N,iconName:R,iconColor:F,iconSize:I,iconPlacement:A="left",hoverTextColor:z,itemBorder:L,itemBorderRadius:B,itemBackgroundColor:V,itemSelectedBackgroundColor:$,itemHoverBackgroundColor:H,selectedItemElevation:q=0,itemDisableRipple:W,configurationItemInfo:U,sx:G})=>{const K=Ye(),{isConfigurationMode:Y,onConfigurationItemClicked:Z,selectedConfigurationItemId:X}=IC(),[J,Q]=e.useState(null),ee=e=>Q(e.currentTarget),te=()=>Q(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:P,r=e&&$||V;return{color:t,fontSize:O,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:z||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:vrt({theme:K,selected:t})}},ie=e=>{const t=e.tabKey===o,r=oe(t);return it(xx,{onClick:()=>{ne(e),te()},sx:{...r,display:"flex",alignItems:"center"},...ae(e),children:[e.iconName&&at(jGe,{iconName:e.iconName,sx:{fontSize:O,color:t?D:P,mr:1}}),at(Zf,{component:"span",children:e.label})]},e.id)};if(n)return it(tu,{elevation:w,style:re,sx:G,...U,children:[at(cd,{onClick:ee,children:at(jGe,{size:I,color:F,iconName:R})}),at(fx,{anchorEl:J,open:Boolean(J),onClose:te,children:t.map(ie)})]});const se=t.findIndex(e=>e.tabKey===o);return at(tu,{elevation:w,style:re,sx:G,...U,children:at(tC,{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:P}};return at(e_,{label:e.label,disableRipple:W,sx:{...r,textTransform:"none"},onClick:()=>ne(e),iconPosition:"right"===A?"end":"start",icon:e.iconName?at(jGe,{iconName:e.iconName,sx:{fontSize:O,color:t?D:P}}):void 0,...ae(e)},e.id)})})})},Kht=e=>{if(!e)return null;if(e instanceof Date)return zot(e)?e:null;if("object"==typeof e&&null!==e&&"function"==typeof e.toDate){const t=e.toDate();return t instanceof Date&&zot(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=qnt(o,e,n);if(zot(t))return t}return null}return null},Yht=e=>{const t=Kht(e);return t?qot(t,"HH:mm"):null},Zht=({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=Kt(),b=x?.control,w=!!b&&!!t;IC();const k=Srt({name:t,sourceDataModelField:n,form:x,enabled:w,mapValue:e=>Yht(e),skipIfNull:!0}),_=Kht(k);e.useRef();const[C,M]=e.useState(_);if(o){const e=void 0!==k?k:w?zGe(x.watch(t),t,"value"):void 0,o=Kht(e),n=o&&zot(o)?qot(o,s):"";return it(Zf,{...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&&at(wg,{children:r}),at(Od,{children:n||i||"-"})]})}return at(Zf,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:at(tr,{name:t,control:b,defaultValue:Yht(k)??null,rules:{required:!!l&&(c||"This field is required"),validate:e=>{if(null==e||""===e)return!0;const t=Kht(e);return t&&zot(t)||u||"Invalid time"}},render:({field:{value:e},fieldState:o})=>{const n=zGe(e,t,"value");return at(mpt,{...v,enableAccessibleFieldDOMStructure:!1,value:Kht(n),onChange:e=>{const r=Yht(e);LGe(x,t,r,"value")},slots:{textField:iC},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:at(mpt,{...v,enableAccessibleFieldDOMStructure:!1,value:C,onChange:e=>M(Kht(e)),slots:{textField:iC},slotProps:{textField:{label:r,placeholder:i,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})},Xht=({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,sourceDataModelField:M})=>{const[S,D]=e.useState(!1),P=M?WGe(M):void 0,O=("string"==typeof P?P:void 0)||t,{onStateChange:E}=YC(),j=()=>{E({id:h,type:"started"})};return at(Jht,{id:h,raised:i,onClick:j,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:S?at(Od,{component:"div",sx:{height:l,width:c,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",color:"gray",textAlign:"center"},children:s||"Video unavailable"}):at(bm,{component:"video",src:O,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:j,onEnded:()=>{E({id:h,type:"completed"})},onError:()=>{D(!0)}})})},Jht=To(fm)`
|
|
1032
1032
|
display: inline-block;
|
|
1033
1033
|
overflow: hidden;
|
|
1034
1034
|
`,Qht=({width:e="100%",height:t,fontSize:r="16px",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e,height:t||("number"==typeof r?1.5*r+"px":"24px"),marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,...s}}),eft=Qht,tft=({text:e,width:t,height:r,fontSize:o="16px",borderColor:n="#ccc",backgroundColor:a,marginLeft:i="0",marginTop:s="0",marginRight:l="0",marginBottom:c="0",paddingLeft:u,paddingTop:d,paddingRight:p,paddingBottom:h,sx:f})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:i,marginTop:s,marginRight:l,marginBottom:c,width:t||"fit-content",...f},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"150px",height:(()=>{if(r)return r;const e="number"==typeof o?o:parseInt(o,10);return Number.isNaN(e)?"32px":`${Math.round(1.2*e+16)}px`})(),borderRadius:"4px",backgroundColor:a,border:`1px solid ${n}`}})]}),rft=tft,oft=tft,nft=tft,aft=tft,ift=({text:e,width:t,height:r,borderColor:o="#ccc",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",paddingLeft:c,paddingTop:u,paddingRight:d,paddingBottom:p,sx:h})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...h},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"180px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),sft=({text:e,maxValue:t=5,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"20px",marginBottom:"4px"}}),at(Zf,{sx:{display:"flex",gap:"4px"},children:Array.from({length:t}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"24px",height:"24px"}},t))})]}),lft=({text:e,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"42px",height:"26px",borderRadius:"13px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"30px",height:"16px"}})]})]}),cft=({text:e,width:t,orientation:r="horizontal",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,width:t||"200px",...s},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",flexDirection:"vertical"===r?"column":"row",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"horizontal"===r?"100%":"4px",height:"horizontal"===r?"4px":"100px",borderRadius:"2px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"24px",height:"16px"}})]})]}),uft=({text:e,width:t,height:r,borderColor:o="#ced4da",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...c},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"120px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),dft=({text:e,width:t,height:r,borderColor:o="#ced4da",marginLeft:n="0",marginTop:a="0",marginRight:i="0",marginBottom:s="0",sx:l})=>it(Zf,{sx:{marginLeft:n,marginTop:a,marginRight:i,marginBottom:s,width:t||"fit-content",...l},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"100px",height:r||"32px",borderRadius:"4px",border:`1px solid ${o}`}})]}),pft=({width:e,height:t,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,width:e||"320px",...i},children:[at(Hb,{variant:"rectangular",animation:"wave",sx:{width:"100%",height:"48px",borderRadius:"8px 8px 0 0",marginBottom:"8px"}}),at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"8px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"24px"}},t))}),Array.from({length:6}).map((e,t)=>at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"32px"}},t))},t))]}),hft=({text:e,subText:t,width:r,height:o,backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:r||"100%",height:o||(e&&t?"72px":"48px"),borderRadius:"4px",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,backgroundColor:n,...c}}),fft=({size:e=24,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{position:"relative",display:"inline-flex",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e}}),at(Hb,{variant:"circular",animation:"wave",sx:{position:"absolute",top:-4,right:-4,width:16,height:16}})]}),mft=({size:e="medium",width:t,backgroundColor:r,marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||("small"===e?"60px":"80px"),height:"small"===e?"24px":"32px",borderRadius:"16px",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,backgroundColor:r,...s}}),yft=({width:e,fontSize:t="14px",marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e||"100px",height:"number"==typeof t?1.2*t+"px":"18px",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i}}),gft=({size:e=40,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e,marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a}}),vft=["simple_text","text","basic_text_display_field","email_display_field","phone_number_display_field","numeric_display_field","currency_display_field","select_display_field","rating_display_field","switch_display_field","slider_display_field","date_display_field","time_picker_display","date_calendar_display","alert","badge","chip","link","avatar"],xft=e=>vft.includes(e),bft=({type:e,props:t={}})=>{const r={width:t.width,height:t.height,marginLeft:t.marginLeft||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",sx:t.sx};switch(e){case"simple_text":case"text":return at(Qht,{...r,fontSize:t.fontSize});case"basic_text_display_field":return at(tft,{...r,text:t.text,fontSize:t.fontSize,borderColor:t.borderColor,backgroundColor:t.backgroundColor,paddingLeft:t.paddingLeft,paddingTop:t.paddingTop,paddingRight:t.paddingRight,paddingBottom:t.paddingBottom});case"email_display_field":return at(rft,{...r,text:t.text,borderColor:t.borderColor});case"phone_number_display_field":return at(oft,{...r,text:t.text,borderColor:t.borderColor});case"numeric_display_field":return at(nft,{...r,text:t.text,borderColor:t.borderColor});case"currency_display_field":return at(aft,{...r,text:t.text,borderColor:t.borderColor});case"select_display_field":return at(ift,{...r,text:t.text,borderColor:t.borderColor});case"rating_display_field":return at(sft,{...r,text:t.text,maxValue:t.maxValue});case"switch_display_field":return at(lft,{...r,text:t.text});case"slider_display_field":return at(cft,{...r,text:t.text,orientation:t.orientation});case"date_display_field":return at(uft,{...r,text:t.text,borderColor:t.borderColor});case"time_picker_display":return at(dft,{...r,text:t.text,borderColor:t.borderColor});case"date_calendar_display":return at(pft,{...r});case"alert":return at(hft,{...r,text:t.text,subText:t.subText,backgroundColor:t.backgroundColor});case"badge":return at(fft,{...r,size:t.size});case"chip":return at(mft,{...r,size:t.size,backgroundColor:t.backgroundColor});case"link":return at(yft,{...r,fontSize:t.fontSize});case"avatar":return at(gft,{...r,size:t.size});default:return at(Hb,{variant:"rounded",animation:"wave",sx:{width:r.width||"100%",height:r.height||"40px",marginLeft:r.marginLeft,marginTop:r.marginTop,marginRight:r.marginRight,marginBottom:r.marginBottom,...r.sx}})}},wft=({children:e,additionalInfo:t})=>{try{return at(nt,{children:e})}catch(r){return console.error(`Render error in SafeRender - ${t} :`,r),at("div",{style:{color:"red",padding:24},children:"Render Error"})}};function kft(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 _ft(e,t,r=!1){return t&&r?xn(e,t):e}const Cft=({id:t,type:r,name:o,form:n,config:a,formData:i,isMobile:s,children:l,tabsProps:c,properties:u,moleculeLibraryId:d,organismLibraryMoleculeId:p,parentStyleVariantConfig:h,parentContainerWithVariantsId:f,parentContainerActiveVariant:m})=>{const y=Ye(),g=OC("xs"),v=s||g,{formId:x,isPreview:b=!1,validations:w,submitHandler:k,isConfigurationMode:_,onConfigurationItemClicked:C,selectedConfigurationItemId:M,currentStyleProperties:S,currentContentProperties:D,onInternalNavigation:P,organismMetadata:O,organismInfo:E,localState:j}=IC(),{stateConfig:T}=UC(),N=KC(),R=T,F=ht(),I=F?.isLoading??N?.isSingleRecordLoading??!1,A=m??F.activeVariant,z=e.useMemo(()=>((e,t)=>{if(!e)return{};if(t){const r=e[t];if(r&&"object"==typeof r&&"props"in r){const e=r.props;if(e&&"object"==typeof e)return e}}return e.props||{}})(a,A??null),[a,A]),L=u?.dataCapture,B=a?.props?.dataCaptureName||L?.dataCaptureName||L?.variableName||t,V=e.useMemo(()=>{if(!x||!F?.nestedPathSegments?.length)return B;const e=(t=F.nestedPathSegments,r=B,t&&0!==t.length?[...t.map(e=>{const t=e.sourceDataPointerId||e.dmfId;return void 0!==e.index?`${t}.${e.index}`:t}),r].filter(Boolean).join("."):r);var t,r;return console.log("🔵 [BaseMolecule] Built formDataCaptureName:",{baseDataCaptureName:B,nestedPathSegments:F.nestedPathSegments,formDataCaptureName:e,formId:x}),e},[x,F?.nestedPathSegments,B]),$=u?.dataCapture,H=$?.nature?.toString().replace(/-/g,"_").toLowerCase()??"",q="variable"===H&&$?.variableName||$?.sourceDataModelFieldId,W=$?.predefinedValue,U=!$?.isIgnored&&("variable"===H&&Boolean($?.variableName)||"data_model"===H&&Boolean($?.sourceDataModelFieldId)),G=e=>{if(!e||e.isIgnored)return;return"variable"===(e.nature?.toString().replace(/-/g,"_").toLowerCase()??"")?e.variableName||e.sourceDataModelFieldId||void 0:e.sourceDataModelFieldId||void 0},K=M===t,{isStateDisabled:Y,isStateVisible:Z}=(({stateListenerId:e})=>{const{localStateObject:t}=IC(),{stateConfig:r}=UC(),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}),X=e.useMemo(()=>({entityType:r,entity:"molecule",entityName:o,entityId:t,organismType:E?.type,organismSubtype:E?.subtype,organismLibraryMoleculeId:p,libraryEntityId:d,activeStyleVariant:A,parentReplicatorWithVariants:f||F.containerId||null,parentStyleVariantConfig:h||void 0}),[r,o,t,p,d,A,F.containerId,f,h]),J=e.useCallback(e=>{e?.stopPropagation(),C(X,!1)},[C,X]),Q=e.useCallback(e=>{e?.stopPropagation(),C(X,!0)},[C,X]),ee=_?{onClick:J,onDoubleClick:Q,"data-configuration-id":t,css:vrt({theme:y,selected:K})}:{},te=_||Y;if(!Z)return null;if(I&&(xft(r)||U)){const e={width:z.width,height:z.height,marginLeft:z.marginLeft||"0",marginTop:z.marginTop||"0",marginRight:z.marginRight||"0",marginBottom:z.marginBottom||"0",paddingLeft:z.paddingLeft,paddingTop:z.paddingTop,paddingRight:z.paddingRight,paddingBottom:z.paddingBottom,fontSize:z.fontSize,borderColor:z.borderColor,backgroundColor:z.backgroundColor,size:z.size,text:u?.text?.text,subText:u?.subText?.text,maxValue:z.maxValue,orientation:z.orientation,sx:z.sx};return at(bft,{type:r,props:e})}return(()=>{switch(r){case"simple_text":{const e={text:u?.text},r=["text"],{text:o}=kft(e,D,r,K),n=_ft(z,S,K);return at(Fpt,{...n,text:o?.text||"",htmlElementId:t,configurationsItemInfo:ee})}case"text":{const e={text:u?.text},r=Object.keys(e),{text:o}=kft(e,D,r,K),n=_ft(z,S,K);return at(Rpt,{...o,...n,htmlElementId:t,configurationItemInfo:ee})}case"consent":{const e=kft(u,D,[],K),r=_ft(z,S,K)||{};return at(Rrt,{...r,htmlElementId:t,properties:e,configurationItemInfo:ee})}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=kft(e,D,r,K),{state:n,gap:i,...s}=_ft(a?.props,S,K);return at(Pht,{gap:i,inputProps:s,validations:w||[],htmlElementId:t,validationState:n,overridesProperties:o,configurationItemInfo:ee})}case"stepper":{const e=_ft(z,S,K),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={title:r?.title,subText:r?.subText},i=Object.keys(a),{title:s,subText:l}=kft(a,D,i,t);return{...n,..._ft(o?.props,S,t),title:s?.text||"",subText:l?.text||""}});return at(qht,{...e,items:r||[],isMobile:v,moleculeId:t,configurationItemInfo:ee})}case"checklist":{const e=_ft(z,S,K)||{},r=l?.map(e=>{const t=M===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=kft(a,D,i,t),l=_ft(o?.props,S,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:R?.[e.id]?.interacted||"unchecked"}}case"divider_item":{const e=_ft(o?.props,S,t)||{};return{...n,...e,type:"divider_item"}}case"text_item":{const e={text:r?.text},a=Object.keys(e),i=kft(e,D,a,t),s=_ft(o?.props,S,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=kft(e,D,a,t),s=_ft(o?.props,S,t)||{},l=i.text?.text||v5e;return{...n,...s,type:"rich_text_item",text:l}}default:return{...n,type:e.type}}});return at(Trt,{...e,items:r||[],moleculeId:t,configurationItemInfo:ee})}case"accordion":{const e=_ft(z,S,K),r=l?.map(e=>{const t=M===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}=kft(a,D,i,t);return{...n,..._ft(o?.props,S,t),text:s?.text||"",subText:l?.text||"",bodyText:c?.text||""}});return at(brt,{...e,items:r||[],moleculeId:t,configurationItemInfo:ee})}case"menu":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=kft(e,D,r,K),a=_ft(z,S,K),i=l?.map(e=>{const t=M===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}=kft(a,D,i,t),u=_ft(o?.props,S,t);return{...n,...u,disabled:R?.[e.id]?R?.[e.id]?.disabled:l?.value||u?.disabled||!1,text:s?.text||"Menu Item",link:c}});return at(wht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||"Open Menu",configurationItemInfo:ee,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1})}case"tabs":{const e=_ft(z,S,K),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o}=e||{},n={label:r?.label,link:r?.link},a=Object.keys(n),{label:i,link:s}=kft(n,D,a,t);return{..._ft(o?.props,S,t),id:e.id,tabKey:m9e(s)?c9e(n9e,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),a=n?o:r,i=c?.activeTabKey||a?.[0]?.tabKey||"";return at(Ght,{...e,items:a||[],isMobile:v,moleculeId:t,activeTabKey:i,configurationItemInfo:ee,onTabChange:_?void 0:({newTabKey:e,link:t})=>{n?c?.onTabChange?.(e):m9e(t)?P?.({link:t?.internalLink||""}):h9e(t?.externalLink)}})}case"divider":{const e=_ft(z,S,K);return at(jpt,{moleculeId:t,configurationItemInfo:ee,...e})}case"link":{const e={text:u?.text,link:u?.link},r=Object.keys(e),{text:o,link:n}=kft(e,D,r,K),a=n,i=_ft(z,S,K);return at(xht,{moleculeId:t,...i,link:a,type:a?.type,src:te?void 0:x9e(a,b)||"",text:o?.text||"",disabled:i?.disabled||Y,configurationItemInfo:ee})}case"data_driven_link":{const e={text:u?.text},r=Object.keys(e),{text:o}=kft(e,D,r,K),n=_ft(z,S,K);return at(xht,{moleculeId:t,...n,text:o?.text||"",sourceDataModelField:q,disabled:n?.disabled||Y,configurationItemInfo:ee})}case"video":{const e={video:u?.video,coverImage:u?.coverImage,dataCapture:u?.dataCapture},r=Object.keys(e),{video:o,coverImage:n,dataCapture:a}=kft(e,D,r,K),i=_ft(z,S,K),s=G(a);return at(Xht,{...i,moleculeId:t,poster:n?.imageFile?.url,src:o?.videoSource??o?.videoFile?.url??"",sourceDataModelField:s,configurationItemInfo:ee})}case"badge":{const e={text:u?.text,dataCapture:u?.dataCapture},t=Object.keys(e),{dataCapture:r}=kft(e,D,t,K),o=_ft(z,S,K),n=G(r);return at(_rt,{sourceDataModelField:n,...o,configurationItemInfo:ee})}case"alert":{const e={text:u?.text,subText:u?.subText},t=Object.keys(e),{text:r,subText:o}=kft(e,D,t,K),n=_ft(z,S,K);return at(wrt,{text:r?.text||"",subText:o?.text||"",...n,configurationItemInfo:ee})}case"chip":{const e={text:u?.text,dataCapture:u?.dataCapture},t=Object.keys(e),{text:r,dataCapture:o}=kft(e,D,t,K),n=_ft(z,S,K),a=G(o);return at(Nrt,{text:r?.text||"",sourceDataModelField:a,...n,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(vht,{name:V,text:o?.text||"",placeholderText:n?.text||"",sourceDataModelField:q,required:a?.value,isDisplayOnly:"email_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,...l,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(Rht,{name:V,text:o?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,isDisplayOnly:"phone_number_display_field"===r,...l,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(Cht,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"numeric_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(zrt,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"currency_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(Ort,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"basic_text_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:ee})}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:a,validationErrorText:i}=kft(e,D,t,K),s=_ft(z,S,K);return at(Fht,{name:V,text:o?.text||"",required:n?.value,requiredErrorText:a?.text,validationErrorText:i?.text,sourceDataModelField:q,isDisplayOnly:"rating_display_field"===r,...s,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,o,K),l=_ft(z,S,K);return at(Uht,{name:V,moleculeId:t,text:n?.text||"",required:a?.value,isDisplayOnly:"switch_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:ee})}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:a,validationErrorText:i,placeholderText:s}=kft(e,D,t,K),l=_ft(z,S,K);return at($ht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:"slider_display_field"===r,requiredErrorText:a?.text,validationErrorText:i?.text,placeholderText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:ee})}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:a,placeholderText:i,requiredErrorText:s,validationErrorText:l}=kft(e,D,o,K),c=_ft(z,S,K);return at(Jat,{dateAdapter:Xnt,children:at(Ept,{moleculeId:t,name:V,text:n?.text||"",required:a?.value,placeholderText:i?.text||"",isDisplayOnly:"date_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,...c,configurationItemInfo:ee})})}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:a,validationErrorText:i,required:s}=kft(e,D,t,K),l=_ft(z,S,K);return at(Jat,{dateAdapter:Xnt,children:at(Zht,{...l,name:V,text:o?.text||"",placeholderText:n?.text||"",required:s?.value,requiredErrorText:a?.text,validationErrorText:i?.text,isDisplayOnly:"time_picker_display"===r,sourceDataModelField:q,configurationItemInfo:ee})})}case"select_display_field":case"select":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText,dataDrivenOptions:u?.dataDrivenOptions},t=Object.keys(e),{text:o,required:n,placeholderText:a,requiredErrorText:i,validationErrorText:s,dataDrivenOptions:l}=kft(e,D,t,K),c=_ft(z,S,K),d="select_display_field"===r;return at(Vht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:d,predefinedValue:W,placeholderText:a?.text||"",requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,dataDrivenOptions:l,...c,configurationItemInfo:ee})}case"image":{const e={image:u?.image,link:u?.link,dataCapture:u?.dataCapture},r=Object.keys(e),{image:o,link:n,dataCapture:a}=kft(e,D,r,K),i=_ft(z,S,K),s=G(a);return at(Tpt,{...i,src:o?.imageSource||o?.imageFile?.url||o?.imageFile?.id||"",sourceDataModelField:s,onClick:n?()=>m9e(n)?P?.({link:n?.internalLink||""}):h9e(n?.externalLink):void 0,moleculeId:t,configurationItemInfo:ee,properties:{image:o,link:n}})}case"button":{const e={text:u?.text,action:u?.action},r=Object.keys(e),{text:o,action:n}=kft(e,D,r,K),a=_ft(z,S,K);return at(yKe,{moleculeId:t,text:o?.text||"",sourceDataModelField:q,...a,disabled:a?.disabled||Y,configurationItemInfo:ee,properties:{text:o,action:n}})}case"avatar":{const e=_ft(z,S,K);return at(krt,{...e,sourceDataModelField:q,configurationItemInfo:ee})}case"drawer":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=kft(e,D,r,K),a=_ft(z,S,K),i=l?.map(e=>{const t=M===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=kft(a,D,i,t),l=_ft(o?.props,S,t),c={...n,...l};switch(e.type){case"menu_item":return{...c,disabled:R?.[e.id]?R?.[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||v5e};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 at(fht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||a?.buttonText,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1,configurationItemInfo:ee})}case"speed_dial":{const e=_ft(z,S,K),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={link:r?.link,text:r?.text},i=Object.keys(a),s=kft(a,D,i,t),l=_ft(o?.props,S,t);return{...n,config:{props:{...o?.props,...l,tooltipText:l?.tooltipText||""}},properties:{link:s?.link||r?.link,text:s?.text||r?.text}}});return at(Hht,{...e,items:r||[],moleculeId:t,configurationItemInfo:ee})}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:a,requiredErrorText:i,validationErrorText:s}=kft(e,D,o,K),l=_ft(z,S,K);return at(jrt,{name:V,moleculeId:t,label:n?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,isDisplayOnly:"checkbox_display"===r,...l,configurationItemInfo:ee})}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:a,required:i,requiredErrorText:s,validationErrorText:l}=kft(e,D,o,K),c=_ft(z,S,K);return at(Ert,{name:V,moleculeId:t,confirmText:n?.text||"Yes",rejectText:a?.text||"No",required:i?.value,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,isDisplayOnly:"binary_radio_buttons_display"===r,...c,configurationItemInfo:ee})}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:a}=kft(e,D,t,K),i=_ft(z,S,K);return at(clt,{...i,name:V,required:o?.value,requiredErrorText:n?.text,validationErrorText:a?.text,isDisplayOnly:"date_calendar_display"===r,sourceDataModelField:q,configurationItemInfo:ee})}default:return at(nt,{children:"There is no such type of molecule yet."})}})()},Mft=({nestedPathSegments:t})=>{const{localStateObject:r}=IC(),o=ht();return e.useMemo(()=>{if(o?.itemDataByDmfId)return o.itemDataByDmfId;const e=(e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)&&"viewType"in e&&"data"in e){const t=e.data;if(null==t)return;return t}return e}})(r);return void 0!==e?0===t.length||Array.isArray(e)?e:GGe(e,t):void 0},[o?.itemDataByDmfId,r,t])},Sft=e=>"container"===e.instance&&"empty_state"===e.type,Dft=e=>{if("container"!==e.instance)return;const t=e;return t.sourceDataPointerId||t.config?.props?.sourceDataPointerId||t.targetRwoId||t.config?.props?.targetRwoId||t.replicatorFieldId},Pft=(e,t)=>{if(!e)return!0;if(Array.isArray(e))return 0===e.length;return(e=>null==e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e[t])},Oft=e.memo(({item:t,tabsProps:r,formData:o,setFormData:n,isMobile:a,parentId:i,nestedPathSegments:s=[],parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})=>{const d=Kt(),{organismMetadata:p}=IC(),h="items"in t?t.items:void 0,f=(({items:t})=>{const{stateConfig:r}=UC(),{localStateObject:o}=IC(),n=o||r;return e.useMemo(()=>t&&0!==t.length?t.filter(e=>{const t=e.config?.props?.visible??!0,r=n?.[e.id]?.visible??!0;return t&&r}):[],[t,n])})({items:h}),{filteredItems:m}=(({containerItems:t,visibleItems:r,nestedPathSegments:o})=>{const{isLoadingData:n,isEmptyDataState:a,forceEmptyStatePreview:i,previewingEmptyStates:s,isConfigurationMode:l}=IC(),c=Mft({nestedPathSegments:o});return e.useMemo(()=>{if(!t||0===t.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const e=t.filter(Sft);if(0===e.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const o=s&&s.length>0;if(l&&!i&&!o)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};if(n&&!i&&!o)return{filteredItems:r.filter(e=>!Sft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const u=new Set;let d=!1;return e.forEach(e=>{const t=Dft(e);i||(t?s?.includes(t):s?.includes("__organism__"))?t?u.add(t):d=!0:l||(t?Pft(c,t)&&u.add(t):a&&(d=!0))}),d||0!==u.size?{filteredItems:r.filter(e=>{if(Sft(e)){const t=Dft(e);return t?u.has(t):d}return!1}),showingEmptyStateForFields:u,showOrganismLevelEmptyState:d}:{filteredItems:r.filter(e=>!Sft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1}},[t,r,c,n,a,i,s,l])})({containerItems:h,visibleItems:f,nestedPathSegments:s});if("molecule"===t.instance)return at(wft,{additionalInfo:`molecule: ${t.id}`,children:at(Cft,{...t,form:d,isMobile:a,formData:o,parentId:i,tabsProps:r,setFormData:n,metadata:{...t.metadata,stateListenerId:p?.stateListenerId||t.id},parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})});const y=!(!h||!h.length),g="form"===t.type&&t.config.props?.activeChildrenIds||[];return y?g.length?at(wft,{additionalInfo:`form: ${t.id}`,children:at(Bft,{item:t,activeChildrenIds:g,formData:o,setFormData:n,isMobile:a})}):at(wft,{additionalInfo:`container: ${t.id}`,children:at(zft,{...t,isMobile:a,nestedPathSegments:s,parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u,config:t.config?{...t.config,props:t.config.props||{},wide:t.config.wide||{},compact:t.config.compact||{}}:{props:{},wide:{},compact:{}},children:m?.map(e=>at(Oft,{item:e,parentId:e.id,formData:o,setFormData:n,isMobile:a,tabsProps:r,nestedPathSegments:s},e.id))})}):null}),Eft=({order:t=0,id:r,formStepStyles:o,containerProps:n={hasOwnButton:!1}})=>{const a=Kt(),[i,s]=e.useState({}),{formId:l,submitHandler:c,isFormInEditMode:u,organismMetadata:d,organismInfo:p}=IC(),{groupStepItemsByStepContainer:h}=IC();Object.keys(d?.popupPayload??{})[0];const{currentStep:f,canGoToNextStep:m,canGoToPrevStep:y,goToNextStep:g,goToPrevStep:v,reset:x,setStep:b}=eo(),w=h(),{submitForm:k}=XGe(),{forms:_}=dt(),C=t+1,M=w.get(r)||[];return f!==C?null:at("div",{style:o,children:it(nt,{children:[M.map(e=>at(Oft,{item:e,setFormData:s,formData:i},e.id)),(!n?.hasOwnButton||d?.isFormInsidePopUp)&&u&&it("div",{style:{display:"flex",gap:"16px"},children:[at(yKe,{text:y?"Back":"Cancel",variant:"outlined",onClick:()=>{y?v():(x(),b(1))}}),at(yKe,{text:m?"Next":"Submit",variant:"contained",onClick:async()=>{const e=await a.trigger();if(!e)return void J6e({message:"Please fill all required fields",type:"error"});if(m)return void g();const t=a?.getValues?.()||{};if(e&&l){const e={formId:l,data:t,pmiObjectId:p?.pmiObjectId};c?await c(e):_?.submit&&await k(e)}}})]})]})})},jft=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]=(e=>e&&"object"==typeof e&&"value"in e&&!Array.isArray(e)?e.value:e)(r),e),{}),Tft=(e,t)=>{if(!e?.enabled)return null;const r="data_model"===(e.nature||(e.sourceDataModelFieldId?"data_model":"variable"))?e.sourceDataModelFieldId:e.variableName;if(!r)return null;if(!t)return null;const o=t[r];if(null==o)return null;let n=null;if("string"==typeof o)n=o;else if("object"==typeof o&&null!==o){const e=o;void 0!==e.id&&null!==e.id&&"string"==typeof e.id?n=e.id:void 0!==e.value&&null!==e.value&&(n=String(e.value))}return n},Nft=(e,t,r)=>{if(!e)return{};if(t){const o=e[t];if(o&&"object"==typeof o&&r in o){const e=o[r];if(e&&"object"==typeof e){const{containerStyle:t}=e;return t&&"object"==typeof t?t:e}}}const o=e[r];if(o&&"object"==typeof o){const{containerStyle:e}=o;return e&&"object"==typeof e?e:o}return{}},Rft=e.memo(({containerId:t,sourceDataPointerId:r,nestedPathSegments:o=[],children:n,properties:a,config:i,renderWrapper:s})=>{const{formId:l}=IC(),c=KC(),u=ht(),d=BC(),p=UGe(),h=r||u?.sourceDataPointerId,f=h||"default",m=h&&c?.queryResults?c.queryResults[h]?.isLoading??c.isSingleRecordLoading??!1:c?.isSingleRecordLoading??!1,y=a?.styleVariantConfig||i?.styleVariantConfig,g=e.useMemo(()=>{if(!y)return"";return"data_model"===(y.nature||(y.sourceDataModelFieldId?"data_model":"variable"))?y.sourceDataModelFieldId||"":y.variableName||""},[y]),v=g?qGe(g):void 0;if(Boolean(l&&d)&&d){const{fieldArrayMethods:{fields:e}}=d;return at(nt,{children:e.map((e,a)=>{const i=[...o,{dmfId:f,index:a,sourceDataPointerId:h}],l=e;let c=l;"variable"===(y?.nature||(y?.sourceDataModelFieldId?"data_model":"variable"))&&g&&void 0!==v&&(c={...l,[g]:v});const d=Tft(y,c),p={containerId:t||`replicator-${f}-${a}`,nestedPathSegments:i,itemIndex:a,itemDataByDmfId:l,rawItemDataByDmfId:l,activeVariant:d,isLoading:m,sourceDataPointerId:r||u?.sourceDataPointerId},x=s?s(a,n,d):n;return at("div",{"data-replicator-instance":`${f}-${a}`,children:at(ft,{value:p,children:x})},e.id)})})}if(m)return at(nt,{children:Array.from({length:3}).map((e,r)=>{const a=[...o,{dmfId:f,index:r,sourceDataPointerId:h}];return at(ft,{value:{containerId:t||`replicator-${f}-${r}`,nestedPathSegments:a,itemIndex:r,itemDataByDmfId:{},rawItemDataByDmfId:{},activeVariant:null,isLoading:m,sourceDataPointerId:h},children:s?s(r,n,null):n},`${f}-loading-${r}`)})});const x=h?p(h):void 0;let b;if(h&&u?.itemDataByDmfId&&(b=u.itemDataByDmfId[h]),void 0===b&&h&&(b=x),b&&"object"==typeof b&&!Array.isArray(b)&&h&&h in b){const e=b[h];Array.isArray(e)&&(b=e)}if(!b||"object"!=typeof b){const e=[...o,{dmfId:f,sourceDataPointerId:h}];return at(ft,{value:{containerId:t||`replicator-${f}`,nestedPathSegments:e,itemDataByDmfId:{},activeVariant:null,isLoading:!1,sourceDataPointerId:h},children:s?s(void 0,n,null):n})}if(Array.isArray(b))return at(nt,{children:b.map((e,r)=>{const a=[...o,{dmfId:f,index:r,sourceDataPointerId:h}],i=jft(e);let l=e;"variable"===(y?.nature||(y?.sourceDataModelFieldId?"data_model":"variable"))&&g&&void 0!==v&&(l={...l,[g]:v});const c=Tft(y,l);return at(ft,{value:{containerId:t||`replicator-${f}-${r}`,nestedPathSegments:a,itemIndex:r,itemDataByDmfId:i,rawItemDataByDmfId:e,activeVariant:c,isLoading:m,sourceDataPointerId:h},children:s?s(r,n,c):n},`${f}-${r}`)})});const w=[...o,{dmfId:f,sourceDataPointerId:h}],k=jft(b);let _=b;"variable"===(y?.nature||(y?.sourceDataModelFieldId?"data_model":"variable"))&&g&&void 0!==v&&(_={..._,[g]:v});const C=Tft(y,_);return at(ft,{value:{containerId:t||`replicator-${f}`,nestedPathSegments:w,itemDataByDmfId:k,rawItemDataByDmfId:b,activeVariant:C,isLoading:m,sourceDataPointerId:h},children:s?s(void 0,n,C):n})}),Fft=e=>!(!e||"object"!=typeof e)&&Object.keys(e).some(e=>"id"!==e),Ift=({sourceDataPointerId:t,nestedPathSegments:r=[],minInstances:o=1,maxInstances:n=50,children:a})=>{const i=Kt(),{control:s,getValues:c}=i||{},u=HC(),{prefillData:d}=IC(),p=ht(),h=UGe(),f=e.useRef(!1),m=r.map(e=>{const t=e.sourceDataPointerId||e.dmfId;return void 0!==e.index?`${t}.${e.index}`:t}).filter(Boolean).join(".");const y=m?`${m}.${t}`:t,g=function(e){const t=Kt(),{control:r=t.control,name:o,keyName:n="id",shouldUnregister:a,rules:i}=e,[s,c]=l.default.useState(r._getFieldArray(o)),u=l.default.useRef(r._getFieldArray(o).map(Vr)),d=l.default.useRef(s),p=l.default.useRef(o),h=l.default.useRef(!1);p.current=o,d.current=s,r._names.array.add(o),i&&r.register(o,i),Xt(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===p.current||!t){const t=Ot(e,p.current);Array.isArray(t)&&(c(t),u.current=t.map(Vr))}}}).unsubscribe,[r]);const f=l.default.useCallback(e=>{h.current=!0,r._setFieldArray(o,e)},[r,o]);return l.default.useEffect(()=>{if(r._state.action=!1,jr(o,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!Pr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Pr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([o]).then(e=>{const t=Ot(e.errors,o),n=Ot(r._formState.errors,o);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?jt(r._formState.errors,o,t):fr(r._formState.errors,o),r._subjects.state.next({errors:r._formState.errors}))});else{const e=Ot(r._fields,o);!e||!e._f||Pr(r._options.reValidateMode).isOnSubmit&&Pr(r._options.mode).isOnSubmit||zr(e,r._names.disabled,r._formValues,r._options.criteriaMode===Lt,r._options.shouldUseNativeValidation,!0).then(e=>!sr(e)&&r._subjects.state.next({errors:Rr(r._formState.errors,e,o)}))}r._subjects.state.next({name:o,values:Ct(r._formValues)}),r._names.focus&&Tr(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus)return e.focus(),1}),r._names.focus="",r._setValid(),h.current=!1},[s,o,r]),l.default.useEffect(()=>(!Ot(r._formValues,o)&&r._setFieldArray(o),()=>{r._options.shouldUnregister||a?r.unregister(o):((e,t)=>{const o=Ot(r._fields,e);o&&o._f&&(o._f.mount=t)})(o,!1)}),[o,r,n,a]),{swap:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Yr(n,e,t),Yr(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Yr,{argA:e,argB:t},!1)},[f,o,r]),move:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Ur(n,e,t),Ur(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Ur,{argA:e,argB:t},!1)},[f,o,r]),prepend:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Gr(r._getFieldArray(o),n);r._names.focus=$r(o,0,t),u.current=Gr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Gr,{argA:qr(e)})},[f,o,r]),append:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Hr(r._getFieldArray(o),n);r._names.focus=$r(o,a.length-1,t),u.current=Hr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Hr,{argA:qr(e)})},[f,o,r]),remove:l.default.useCallback(e=>{const t=Kr(r._getFieldArray(o),e);u.current=Kr(u.current,e),f(t),c(t),!Array.isArray(Ot(r._fields,o))&&jt(r._fields,o,void 0),r._setFieldArray(o,t,Kr,{argA:e})},[f,o,r]),insert:l.default.useCallback((e,t,n)=>{const a=or(Ct(t)),i=Wr(r._getFieldArray(o),e,a);r._names.focus=$r(o,e,n),u.current=Wr(u.current,e,a.map(Vr)),f(i),c(i),r._setFieldArray(o,i,Wr,{argA:e,argB:qr(t)})},[f,o,r]),update:l.default.useCallback((e,t)=>{const n=Ct(t),a=Zr(r._getFieldArray(o),e,n);u.current=[...a].map((t,r)=>t&&r!==e?u.current[r]:Vr()),f(a),c([...a]),r._setFieldArray(o,a,Zr,{argA:e,argB:n},!0,!1)},[f,o,r]),replace:l.default.useCallback(e=>{const t=or(Ct(e));u.current=t.map(Vr),f([...t]),c([...t]),r._setFieldArray(o,[...t],e=>e,{},!0,!1)},[f,o,r]),fields:l.default.useMemo(()=>s.map((e,t)=>({...e,[n]:u.current[t]||Vr()})),[s,n])}}({control:s,name:y}),{fields:v,append:x,replace:b}=g,w=((e,t)=>{if(e&&t)return t.split(".").reduce((e,t)=>{if(e&&"object"==typeof e)return e[t]},e)})(d,y),k=Array.isArray(w)&&w.length>0,_=t?h(t):void 0;let C;if(t&&p?.itemDataByDmfId&&(C=p.itemDataByDmfId[t]),void 0===C&&t&&(C=_),C&&"object"==typeof C&&!Array.isArray(C)&&t&&t in C){const e=C[t];Array.isArray(e)&&(C=e)}const M=e.useMemo(()=>Array.isArray(C)?C:C&&"object"==typeof C&&!Array.isArray(C)?[C]:void 0,[C]),S=Array.isArray(M)&&M.length>0;return e.useEffect(()=>{if(f.current)return;f.current=!0;const e=c?.(y);Array.isArray(e)&&e.length;const t=!!Array.isArray(e)&&e.some(Fft);if(!(k||t||v.length>0))if(S&&M)b(M);else if(o>0){Array.from({length:o},()=>({})).forEach(e=>{x(e,{shouldFocus:!1})})}},[]),e.useEffect(()=>{if(!S||!M)return;if(k)return;const e=c?.(y);!!Array.isArray(e)&&e.some(Fft)||b(M)},[S,M,k,c,y,b]),e.useEffect(()=>{k&&(console.group("🟡 [ReplicatorFormSetup] Syncing Prefill Array Data"),console.log("📋 Field Array Name:",y),console.log("📦 Prefill Array Value:",JSON.stringify(w,null,2)),console.log("🔢 Current Fields Length:",v.length),console.log("🔢 Prefill Array Length:",w.length),v.length!==w.length?(console.log("🔄 Replacing field array with prefill data"),b(w),console.log("✅ Field array replaced")):console.log("⏭️ Skipping replace - lengths match"),console.groupEnd())},[k,w,v.length,b,y]),e.useEffect(()=>{if(u)return u.register({replicatorId:t,fieldArrayName:y,fieldArrayMethods:g,minInstances:o,maxInstances:n}),()=>{u.unregister(t)}},[u,t,y,g,o,n]),at(VC,{replicatorFieldId:t,fieldArrayName:y,fieldArrayMethods:g,minInstances:o,maxInstances:n,children:a})},Aft={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},zft=e.memo(({id:t,type:r,name:o,config:n,children:a,metadata:i,isMobile:s,properties:l,nestedPathSegments:c=[],sourceDataPointerId:u,parentStyleVariantConfig:d,parentContainerWithVariantsId:p,parentContainerActiveVariant:h})=>{const f=Ye(),{props:m,wide:y,compact:g}=n||{},v=u||m?.sourceDataPointerId,{isConfigurationMode:x,onConfigurationItemClicked:b,selectedConfigurationItemId:w,currentStyleProperties:k,currentContentProperties:_,formId:C,localState:M,organismInfo:S}=IC(),D=ht(),{activeVariant:P,containerId:O}=D,E=Kt(),j=Boolean(C&&E),T=e.useMemo(()=>{if("replicator"===r)return;const e=l?.styleVariantConfig,t=e&&"object"==typeof e&&"data"in e?e.data:e;if(!t?.enabled)return;return("data_model"===(t.nature||(t.sourceDataModelFieldId?"data_model":"variable"))?Boolean(t.sourceDataModelFieldId):Boolean(t.variableName))?t:void 0},[r,l]),N=e.useMemo(()=>{if(!T)return"";return"data_model"===(T.nature||(T.sourceDataModelFieldId?"data_model":"variable"))?T.sourceDataModelFieldId||"":T.variableName||""},[T]),R=e.useMemo(()=>{if(!N)return"";if(!j)return"";return"data_model"!==(T?.nature||(T?.sourceDataModelFieldId?"data_model":"variable"))?"":(e=D.nestedPathSegments||c,t=N,e&&0!==e.length?[...e.map(e=>{const t=e.sourceDataPointerId||e.dmfId;return void 0!==e.index?`${t}.${e.index}`:t}),t].filter(Boolean).join("."):t);var e,t},[N,T?.nature,T?.sourceDataModelFieldId,j,D.nestedPathSegments,c]);R&&E?.watch?.(R);const F=qGe(N),I=e.useMemo(()=>{if(!N||!T)return null;if(null!=F){let e=null;if("string"==typeof F||"number"==typeof F)e={id:String(F),value:F};else if(F&&"object"==typeof F){const t=F,r=t.value??null,o=void 0!==t.id&&null!==t.id?String(t.id):null!==r?String(r):null;null!==o&&(e={id:o,value:r})}if(!e)return null;const t=Tft(T,{[N]:e});if(t)return t}return null},[T,N,F]),A=d,z=I??(h??P??null),L=(T&&T.enabled?t:p)||O||null,B=e.useMemo(()=>{const r=T&&T.enabled,o=r?T:A,n=z,i=(r?t:p)||t;return void 0!==o||null!==n||void 0!==p?e.Children.map(a,t=>e.isValidElement(t)?e.cloneElement(t,{...t.props,parentStyleVariantConfig:o,parentContainerWithVariantsId:i,parentContainerActiveVariant:n,sourceDataPointerId:v,nestedPathSegments:c}):t):a},[a,T,z,A,t,p]),V=w===t,$=V?{backgroundImage:_?.backgroundImage??l?.backgroundImage??{imageFile:{url:""}}}:l,{containerProps:H={},containerStyle:q={}}=y||{};let W={...q};const{containerProps:U={},containerStyle:G={}}=g||{};let K={...G};k&&V&&(K={...G,...k},W={...q,...k});const Y=OC("xs"),Z=s??Y;let X=Z?K:W;if(z&&n){const e=Nft(n,z,Z?"compact":"wide");Object.keys(e).length>0&&(X={...X,...e})}const J=Z?U:H,Q={...m,...J,enableBackgroundImage:X?.enableBackgroundImage},ee=e.useMemo(()=>({entityId:t,entityType:r,entityName:o,entity:"container",organismType:S?.type,organismSubtype:S?.subtype,libraryEntityId:i?.containerLibraryId||void 0,activeStyleVariant:z,parentReplicatorWithVariants:L,parentStyleVariantConfig:T&&T.enabled?T:A}),[r,o,t,i,z,L,T,A]),te=x?{onClick:e=>{e&&e.stopPropagation(),b(ee,!1)},onDoubleClick:e=>{e?.stopPropagation(),b(ee,!0)}}:{},re=`${t}.${Z?"mobile":"desktop"}`,oe=_o`
|