@producteca/producteca-ui-kit 1.82.1 → 1.82.2

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.
@@ -6975,7 +6975,7 @@ key:displayIndex,displayIndex:displayIndex,calendarMonth:calendarMonth},navLayou
6975
6975
  * The system prop that allows defining system overrides as well as additional CSS styles.
6976
6976
  */sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),/**
6977
6977
  * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
6978
- */title:PropTypes.node}:void 0;var OverflowChecker=function OverflowChecker2(_ref3){var children=_ref3.children;var ref=useRef(null);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),showTooltip=_useState2[0],setShowTooltip=_useState2[1];useEffect(function(){var checkOverflow=function checkOverflow2(){if(ref.current){setShowTooltip(ref.current.scrollWidth>ref.current.offsetWidth);}};checkOverflow();window.addEventListener("resize",checkOverflow);return function(){return window.removeEventListener("resize",checkOverflow);};},[children]);return/* @__PURE__ */jsx$1(Fragment$1,{children:children(ref,showTooltip)});};var _excluded$6=["children","content","placement","arrow","maxWidth","trigger","shouldShowTooltip","slotProps"],_excluded2=["content","children"];var WithTooltip=function WithTooltip2(_ref3){var _customSlotProps$popp;var children=_ref3.children,content2=_ref3.content,_ref$placement=_ref3.placement,placement=_ref$placement===void 0?"top":_ref$placement,_ref$arrow=_ref3.arrow,arrow2=_ref$arrow===void 0?false:_ref$arrow,_ref$maxWidth=_ref3.maxWidth,maxWidth2=_ref$maxWidth===void 0?"284px":_ref$maxWidth,_ref$trigger=_ref3.trigger,trigger=_ref$trigger===void 0?"hover":_ref$trigger,_ref$shouldShowToolti=_ref3.shouldShowTooltip,shouldShowTooltip=_ref$shouldShowToolti===void 0?true:_ref$shouldShowToolti,customSlotProps=_ref3.slotProps,otherProps=_objectWithoutProperties$1(_ref3,_excluded$6);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),open=_useState2[0],setOpen=_useState2[1];var enhancedChildren=/* @__PURE__ */React__default.cloneElement(children,_objectSpread2$1({style:_objectSpread2$1(_objectSpread2$1({},children.props.style||{}),{},{cursor:"pointer"})},trigger==="click"&&shouldShowTooltip&&{onClick:function onClick(e){if(children.props.onClick){children.props.onClick(e);}setOpen(!open);}}));var tooltipProps=trigger==="click"?{open:shouldShowTooltip?open:false,onClose:function onClose(){return setOpen(false);},disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var disabledListeners=!shouldShowTooltip?{disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};return/* @__PURE__ */jsx$1(Tooltip,_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({title:shouldShowTooltip?content2:"",placement:placement,arrow:arrow2,slots:{transition:Zoom},slotProps:{popper:{sx:_objectSpread2$1(_objectSpread2$1({},(customSlotProps===null||customSlotProps===void 0||(_customSlotProps$popp=customSlotProps.popper)===null||_customSlotProps$popp===void 0?void 0:_customSlotProps$popp.sx)||{}),{},_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.tooltip),{fontFamily:"var(--primary-font-family)",background:"var(--grey-800)",padding:"9px 9px 8px 12px",fontSize:"var(--body-small)",fontWeight:"400",color:"white !important",borderRadius:"4px",maxWidth:maxWidth2}),"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.arrow),{color:"var(--grey-800)"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="top"] .').concat(tooltipClasses.tooltip),{marginBottom:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="bottom"] .').concat(tooltipClasses.tooltip),{marginTop:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="left"] .').concat(tooltipClasses.tooltip),{marginRight:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="right"] .').concat(tooltipClasses.tooltip),{marginLeft:"8px"}))}}},tooltipProps),disabledListeners),otherProps),{},{children:enhancedChildren}));};var WithOverflowTooltip=function WithOverflowTooltip2(_ref22){var content2=_ref22.content,_children=_ref22.children,tooltipProps=_objectWithoutProperties$1(_ref22,_excluded2);return/* @__PURE__ */jsx$1(OverflowChecker,{children:function children(ref,showTooltip){var childrenWithRef=/* @__PURE__ */React__default.cloneElement(_children,{ref:ref});return showTooltip&&content2?/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({content:content2},tooltipProps),{},{children:childrenWithRef})):childrenWithRef;}});};var styles$k={"help-link":"helpArticleLink-module_help-link_Tne5b"};var HelpArticleLink=/* @__PURE__ */React__default.memo(function(_ref3){var href=_ref3.href,tooltip=_ref3.tooltip;if(!href)return null;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltip,placement:"left",children:/* @__PURE__ */jsx$1(Link,{href:href,target:"_blank","aria-label":tooltip,className:styles$k["help-link"],children:/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(AutoStoriesIcon,{"data-testid":"AutoStoriesIcon"})})})});});HelpArticleLink.displayName="HelpArticleLink";var styles$j={"maintenance-wrapper":"maintenance-module_maintenance-wrapper_21CSu","maintenance-content":"maintenance-module_maintenance-content_csxiz","maintenance-icon":"maintenance-module_maintenance-icon_4Jqjc","maintenance-title":"maintenance-module_maintenance-title_6ALRO","maintenance-text":"maintenance-module_maintenance-text_P-UPr"};var Maintenance=function Maintenance2(_ref3){var _ref$title=_ref3.title,title2=_ref$title===void 0?locale("maintenance.title"):_ref$title,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("maintenance.description"):_ref$description,_ref$subtitle=_ref3.subtitle,subtitle2=_ref$subtitle===void 0?locale("maintenance.subtitle"):_ref$subtitle;return/* @__PURE__ */jsx$1("div",{className:styles$j["maintenance-wrapper"],children:/* @__PURE__ */jsxs("div",{className:styles$j["maintenance-content"],children:[/* @__PURE__ */jsx$1("div",{className:styles$j["maintenance-icon"],children:/* @__PURE__ */jsx$1(MaintenanceIcon,{})}),/* @__PURE__ */jsx$1("h1",{className:styles$j["maintenance-title"],children:title2}),/* @__PURE__ */jsxs("div",{className:styles$j["maintenance-text"],children:[/* @__PURE__ */jsx$1("p",{children:description2}),/* @__PURE__ */jsx$1("p",{children:subtitle2})]})]})});};var modal$1="pickChannelModal-module_modal_YGDD7";var body="pickChannelModal-module_body_X7L60";var compact="pickChannelModal-module_compact_hD7b-";var sections="pickChannelModal-module_sections_VGJ6N";var section="pickChannelModal-module_section_BklUc";var section__title="pickChannelModal-module_section__title_fBRgI";var section__description="pickChannelModal-module_section__description_Pgidd";var styles$i={modal:modal$1,body:body,compact:compact,sections:sections,section:section,section__title:section__title,section__description:section__description,"cards-grid":"pickChannelModal-module_cards-grid_kLH1X"};var overlay="modal-module_overlay_tuS3y";var modal="modal-module_modal_pwYxH";var sm$3="modal-module_sm_yWHmZ";var md$1="modal-module_md_rV0w9";var lg$3="modal-module_lg_sy6Md";var xl="modal-module_xl_UbiWN";var styles$h={overlay:overlay,"modal-backdrop-fade-in":"modal-module_modal-backdrop-fade-in_ipnEv",modal:modal,"modal-enter":"modal-module_modal-enter_uufyU",sm:sm$3,md:md$1,lg:lg$3,xl:xl,"fit-content":"modal-module_fit-content_CBdg6"};var ModalContext=/* @__PURE__ */createContext({isLoading:false});var ModalBase=function ModalBase2(_ref3){var open=_ref3.open,onClose=_ref3.onClose,children=_ref3.children,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?false:_ref$fitContent,ariaLabel=_ref3.ariaLabel;return/* @__PURE__ */jsx$1(Modal$2,{open:open,onClose:onClose,className:styles$h["overlay"],children:/* @__PURE__ */jsx$1("div",{role:"dialog","aria-modal":"true","aria-label":ariaLabel||locale("a11y.dialog"),"aria-busy":isLoading||void 0,className:clsx(styles$h["modal"],styles$h[size2],className,_defineProperty$2({},styles$h["fit-content"],fitContent)),children:/* @__PURE__ */jsx$1(ModalContext.Provider,{value:{isLoading:isLoading},children:children})})});};var Modal$1=withDebugHandlers(ModalBase,"Modal");var icon$1="modalTitle-module_icon_jKB-M";var title$3="modalTitle-module_title_U2a2X";var subtitle="modalTitle-module_subtitle_DTIpI";var styles$g={"title-modal":"modalTitle-module_title-modal_Q-5aj","title-with-icon":"modalTitle-module_title-with-icon_qaofY",icon:icon$1,"title-group":"modalTitle-module_title-group_glQK9",title:title$3,subtitle:subtitle};var ModalTitle=function ModalTitle2(_ref3){var icon2=_ref3.icon,title2=_ref3.title,subtitle2=_ref3.subtitle,helpArticleUrl=_ref3.helpArticleUrl,_ref$helpTooltip=_ref3.helpTooltip,helpTooltip=_ref$helpTooltip===void 0?locale("modalTitle.instructive"):_ref$helpTooltip;return/* @__PURE__ */jsxs("div",{className:styles$g["title-modal"],children:[/* @__PURE__ */jsxs("div",{className:styles$g["title-with-icon"],children:[icon2&&/* @__PURE__ */jsx$1("span",{className:styles$g["icon"],"aria-hidden":"true",children:icon2}),/* @__PURE__ */jsxs("div",{className:styles$g["title-group"],children:[/* @__PURE__ */jsx$1("span",{className:styles$g["title"],children:title2}),subtitle2&&/* @__PURE__ */jsx$1("div",{className:styles$g["subtitle"],children:subtitle2})]})]}),/* @__PURE__ */jsx$1(HelpArticleLink,{href:helpArticleUrl,tooltip:helpTooltip})]});};var styles$f={"modal-body":"modalBody-module_modal-body_EvgIj","modal-body--loading":"modalBody-module_modal-body--loading_SG8wG"};var ModalBody=function ModalBody2(_ref3){var children=_ref3.children,className=_ref3.className;var _useContext=useContext(ModalContext),isLoading=_useContext.isLoading;if(isLoading){return/* @__PURE__ */jsx$1("div",{className:clsx(styles$f["modal-body"],styles$f["modal-body--loading"],className),children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})});}return/* @__PURE__ */jsx$1("div",{className:clsx(styles$f["modal-body"],className),children:children});};var ModalFooter=function ModalFooter2(props){return/* @__PURE__ */jsx$1(ActionBar,_objectSpread2$1({variant:"modal"},props));};var Modal2=Modal$1;Modal2.Title=ModalTitle;Modal2.Body=ModalBody;Modal2.Footer=ModalFooter;var InsertPhotoRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.9 13.98l2.1 2.53 3.1-3.99c.2-.26.6-.26.8.01l3.51 4.68c.25.33.01.8-.4.8H6.02c-.42 0-.65-.48-.39-.81L8.12 14c.19-.26.57-.27.78-.02"}),"InsertPhotoRounded");var image="image-module_image_y02P7";var error$1="image-module_error_QtQOy";var styles$e={"image-container":"image-module_image-container_ZhlhW","show-border":"image-module_show-border_LV5sz",image:image,error:error$1};var Image=function Image2(_ref3){var sx=_ref3.sx,src=_ref3.src,alt=_ref3.alt,imageSx=_ref3.imageSx,errorIcon=_ref3.errorIcon,_ref$showBorder=_ref3.showBorder,showBorder=_ref$showBorder===void 0?true:_ref$showBorder;var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),hasError3=_useState2[0],setHasError=_useState2[1];useEffect(function(){setHasError(false);},[src]);var handleImageError=function handleImageError2(){setHasError(true);};return/* @__PURE__ */jsx$1("div",{className:clsx(styles$e["image-container"],_defineProperty$2({},styles$e["show-border"],showBorder)),style:_objectSpread2$1({},sx),children:hasError3?!!errorIcon?errorIcon:/* @__PURE__ */jsx$1(InsertPhotoRoundedIcon,{className:styles$e.error}):/* @__PURE__ */jsx$1("img",{src:src,alt:alt||src,className:styles$e.image,style:_objectSpread2$1({},imageSx),onError:handleImageError})});};var card="card-module_card_HG0v6";var header$1="card-module_header_Jtd2-";var title$2="card-module_title_9LIjW";var description="card-module_description_nxqlH";var disabled$3="card-module_disabled_Zdzj7";var active$3="card-module_active_dTNAe";var styles$d={card:card,header:header$1,title:title$2,description:description,disabled:disabled$3,active:active$3};var CardBase=function CardBase2(_ref3){var sx=_ref3.sx,icon2=_ref3.icon,title2=_ref3.title,onClick=_ref3.onClick,children=_ref3.children,description2=_ref3.description,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled;return/* @__PURE__ */jsxs("div",{style:sx,onClick:onClick,className:clsx(styles$d.card,_defineProperty$2(_defineProperty$2({},styles$d.disabled,disabled2),styles$d.active,isActive)),children:[/* @__PURE__ */jsxs("div",{className:styles$d.header,children:[!!icon2&&icon2,!!title2&&/* @__PURE__ */jsx$1("div",{className:styles$d.title,children:title2})]}),!!description2&&/* @__PURE__ */jsx$1("span",{className:styles$d.description,children:description2}),children]});};var Card=withDebugHandlers(CardBase,"Card");var ChannelIcon=function ChannelIcon2(_ref3){var iconUrl=_ref3.iconUrl,name=_ref3.name;return/* @__PURE__ */jsx$1(Image,{alt:name,src:iconUrl,showBorder:false,imageSx:{objectFit:"contain"},sx:{height:"36px",maxHeight:"36px",maxWidth:"128px",width:"128px"}});};var ChannelCard=function ChannelCard2(_ref22){var channel=_ref22.channel,onSelect=_ref22.onSelect;var name=channel.name,iconUrl=channel.iconUrl,disabled2=channel.disabled,tooltipMessage=channel.tooltipMessage;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltipMessage,shouldShowTooltip:!!tooltipMessage,children:/* @__PURE__ */jsx$1("div",{children:/* @__PURE__ */jsx$1(Card,{disabled:disabled2,description:name,sx:{width:"200px",height:"88px"},onClick:function onClick(){return!disabled2&&onSelect(channel);},icon:/* @__PURE__ */jsx$1(ChannelIcon,{iconUrl:iconUrl,name:name})})})});};var productecaStrategy={clientId:1,iconUrl:"https://imagesproducteca.blob.core.windows.net/producteca/isologo-producteca.svg"};var COMPACT_CARD_THRESHOLD=6;var PickChannelModalBase=function PickChannelModalBase2(_ref3){var _channels$length;var open=_ref3.open,onClose=_ref3.onClose,channels=_ref3.channels,fitContent=_ref3.fitContent,generalEditionTitle=_ref3.generalEditionTitle,channelEditionTitle=_ref3.channelEditionTitle,generalEditionDescription=_ref3.generalEditionDescription,channelEditionDescription=_ref3.channelEditionDescription,_ref3$showGeneralEdit=_ref3.showGeneralEdition,showGeneralEdition=_ref3$showGeneralEdit===void 0?false:_ref3$showGeneralEdit,_ref3$onSelectChannel=_ref3.onSelectChannel,onSelectChannel=_ref3$onSelectChannel===void 0?function(){}:_ref3$onSelectChannel,_ref3$titleProps=_ref3.titleProps,titleProps=_ref3$titleProps===void 0?{title:locale("pickChannelModal.title")}:_ref3$titleProps;var cardCount=((_channels$length=channels===null||channels===void 0?void 0:channels.length)!==null&&_channels$length!==void 0?_channels$length:0)+(showGeneralEdition?1:0);var isCompact=!fitContent&&cardCount<=COMPACT_CARD_THRESHOLD;return/* @__PURE__ */jsxs(Modal2,{open:open,onClose:onClose,size:"md",fitContent:fitContent,className:clsx(styles$i["modal"],_defineProperty$2({},styles$i["compact"],isCompact)),children:[/* @__PURE__ */jsx$1(Modal2.Title,_objectSpread2$1({},titleProps)),/* @__PURE__ */jsx$1(Modal2.Body,{className:styles$i["body"],children:/* @__PURE__ */jsxs("div",{className:styles$i["sections"],children:[showGeneralEdition&&/* @__PURE__ */jsxs("section",{className:styles$i["section"],children:[generalEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$i["section__title"],children:generalEditionTitle}),generalEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$i["section__description"],children:generalEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$i["cards-grid"],children:/* @__PURE__ */jsx$1(ChannelCard,{channel:productecaStrategy,onSelect:onSelectChannel})})]}),/* @__PURE__ */jsxs("section",{className:styles$i["section"],children:[channelEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$i["section__title"],children:channelEditionTitle}),channelEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$i["section__description"],children:channelEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$i["cards-grid"],children:(channels||[]).map(function(channel){return/* @__PURE__ */jsx$1(ChannelCard,{channel:channel,onSelect:onSelectChannel},channel.clientId);})})]})]})})]});};var PickChannelModal=withDebugHandlers(PickChannelModalBase,"PickChannelModal");var EditRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var VisibilityRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");var VisibilityOffRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var label$2="permissionOption-module_label_Vxb8a";var active$2="permissionOption-module_active_adte8";var clickable="permissionOption-module_clickable_qJgeM";var disabled$2="permissionOption-module_disabled_GSgD5";var styles$c={"permission-option":"permissionOption-module_permission-option_n5PwJ",label:label$2,active:active$2,"no-background":"permissionOption-module_no-background_IsIRU",clickable:clickable,disabled:disabled$2};var permissionConfig={read:{icon:/* @__PURE__ */jsx$1(VisibilityRoundedIcon,{}),labelKey:"permissions.read"},edit:{icon:/* @__PURE__ */jsx$1(EditRoundedIcon,{}),labelKey:"permissions.edit"},noAccess:{icon:/* @__PURE__ */jsx$1(VisibilityOffRoundedIcon,{}),labelKey:"permissions.noAccess"}};var PermissionOptionBase=function PermissionOptionBase2(_ref3){var permission=_ref3.permission,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$showBackground=_ref3.showBackground,showBackground=_ref$showBackground===void 0?true:_ref$showBackground,label2=_ref3.label,icon2=_ref3.icon,_ref$onClick=_ref3.onClick,onClick=_ref$onClick===void 0?void 0:_ref$onClick;var _permissionConfig$per=permissionConfig[permission],defaultIcon=_permissionConfig$per.icon,labelKey=_permissionConfig$per.labelKey;var resolvedIcon=icon2!==null&&icon2!==void 0?icon2:defaultIcon;var resolvedLabel=label2!==null&&label2!==void 0?label2:locale(labelKey);var isClickable=!!onClick&&!disabled2;var iconColor=isActive?getColor("primary","500"):getColor("grey","800");return/* @__PURE__ */jsxs("div",{className:clsx(styles$c["permission-option"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$c.active,isActive),styles$c.disabled,disabled2),styles$c.clickable,isClickable),styles$c["no-background"],!showBackground)),role:isClickable?"button":void 0,tabIndex:isClickable?0:void 0,"aria-pressed":isClickable?isActive:void 0,"aria-disabled":disabled2||void 0,onClick:isClickable?onClick:void 0,children:[/* @__PURE__ */jsx$1(CustomIcon,{size:"16",color:iconColor,children:resolvedIcon}),/* @__PURE__ */jsx$1("span",{className:styles$c.label,children:resolvedLabel})]});};var PermissionOption=withDebugHandlers(PermissionOptionBase,"PermissionOption");var styles$b={"permission-selector":"permissionSelector-module_permission-selector_4Bgcp"};var DEFAULT_ITEMS=[{permission:"noAccess"},{permission:"read"},{permission:"edit"}];var PermissionSelectorBase=function PermissionSelectorBase2(_ref3){var sx=_ref3.sx,value=_ref3.value,name=_ref3.name,onChange2=_ref3.onChange,_ref$items=_ref3.items,items=_ref$items===void 0?DEFAULT_ITEMS:_ref$items,_ref$defaultValue=_ref3.defaultValue,defaultValue2=_ref$defaultValue===void 0?"noAccess":_ref$defaultValue;var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeValue=value!==null&&value!==void 0?value:internalValue;var combinedSx=useMemo(function(){return sxTabs$1(sx);},[sx]);var _handleChange=function _handleChange2(_event,newValue){if(value===void 0)setInternalValue(newValue);var fakeEvent={target:{name:name,value:newValue}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);};return/* @__PURE__ */jsx$1("div",{className:styles$b["permission-selector"],children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeValue,onChange:_handleChange,"aria-label":locale("permissionSelector.ariaLabel"),children:map$2(items,function(item2){return/* @__PURE__ */jsx$1(Tab,{value:item2.permission,sx:sxTab$1,disableRipple:true,disabled:item2.disabled,label:/* @__PURE__ */jsx$1(PermissionOption,{icon:item2.icon,label:item2.label,showBackground:false,disabled:item2.disabled,permission:item2.permission,isActive:item2.permission===activeValue})},item2.permission);})})});};var sxTabs$1=function sxTabs(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"2px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:0,minHeight:0,padding:0,zIndex:1,textTransform:"none"},"& .MuiTabs-indicator":{bottom:0,height:"100%",zIndex:0,borderRadius:"var(--radius-md)",backgroundColor:getColor("primary","50")}};};var sxTab$1={padding:0,minHeight:0};var PermissionSelector=withDebugHandlers(PermissionSelectorBase,"PermissionSelector");function getLinearProgressUtilityClass(slot){return generateUtilityClass("MuiLinearProgress",slot);}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var TRANSITION_DURATION=4;var indeterminate1Keyframe=keyframes(_templateObject0||(_templateObject0=_taggedTemplateLiteral2(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])));var indeterminate1Animation=typeof indeterminate1Keyframe!=="string"?css$2(_templateObject1||(_templateObject1=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "])),indeterminate1Keyframe):null;var indeterminate2Keyframe=keyframes(_templateObject10||(_templateObject10=_taggedTemplateLiteral2(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])));var indeterminate2Animation=typeof indeterminate2Keyframe!=="string"?css$2(_templateObject11||(_templateObject11=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "])),indeterminate2Keyframe):null;var bufferKeyframe=keyframes(_templateObject12||(_templateObject12=_taggedTemplateLiteral2(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])));var bufferAnimation=typeof bufferKeyframe!=="string"?css$2(_templateObject13||(_templateObject13=_taggedTemplateLiteral2(["\n animation: "," 3s infinite linear;\n "])),bufferKeyframe):null;var useUtilityClasses=function useUtilityClasses(ownerState){var classes=ownerState.classes,variant=ownerState.variant,color2=ownerState.color;var slots={root:["root","color".concat(capitalize$1(color2)),variant],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2",variant==="buffer"&&"color".concat(capitalize$1(color2))]};return composeClasses(slots,getLinearProgressUtilityClass,classes);};var getColorShade=function getColorShade(theme,color2){if(theme.vars){return theme.vars.palette.LinearProgress["".concat(color2,"Bg")];}return theme.palette.mode==="light"?theme.lighten(theme.palette[color2].main,0.62):theme.darken(theme.palette[color2].main,0.5);};var LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function overridesResolver(props,styles2){var ownerState=props.ownerState;return[styles2.root,styles2["color".concat(capitalize$1(ownerState.color))],styles2[ownerState.variant]];}})(memoTheme(function(_ref234){var theme=_ref234.theme;return{position:"relative",overflow:"hidden",display:"block",height:4,// Fix Safari's bug during composition of different paint.
6978
+ */title:PropTypes.node}:void 0;var OverflowChecker=function OverflowChecker2(_ref3){var children=_ref3.children;var ref=useRef(null);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),showTooltip=_useState2[0],setShowTooltip=_useState2[1];useEffect(function(){var checkOverflow=function checkOverflow2(){if(ref.current){setShowTooltip(ref.current.scrollWidth>ref.current.offsetWidth);}};checkOverflow();window.addEventListener("resize",checkOverflow);return function(){return window.removeEventListener("resize",checkOverflow);};},[children]);return/* @__PURE__ */jsx$1(Fragment$1,{children:children(ref,showTooltip)});};var _excluded$6=["children","content","placement","arrow","maxWidth","trigger","shouldShowTooltip","slotProps"],_excluded2=["content","children"];var WithTooltip=function WithTooltip2(_ref3){var _customSlotProps$popp;var children=_ref3.children,content2=_ref3.content,_ref$placement=_ref3.placement,placement=_ref$placement===void 0?"top":_ref$placement,_ref$arrow=_ref3.arrow,arrow2=_ref$arrow===void 0?false:_ref$arrow,_ref$maxWidth=_ref3.maxWidth,maxWidth2=_ref$maxWidth===void 0?"284px":_ref$maxWidth,_ref$trigger=_ref3.trigger,trigger=_ref$trigger===void 0?"hover":_ref$trigger,_ref$shouldShowToolti=_ref3.shouldShowTooltip,shouldShowTooltip=_ref$shouldShowToolti===void 0?true:_ref$shouldShowToolti,customSlotProps=_ref3.slotProps,otherProps=_objectWithoutProperties$1(_ref3,_excluded$6);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),open=_useState2[0],setOpen=_useState2[1];var enhancedChildren=/* @__PURE__ */React__default.cloneElement(children,_objectSpread2$1({style:_objectSpread2$1(_objectSpread2$1({},children.props.style||{}),{},{cursor:"pointer"})},trigger==="click"&&shouldShowTooltip&&{onClick:function onClick(e){if(children.props.onClick){children.props.onClick(e);}setOpen(!open);}}));var tooltipProps=trigger==="click"?{open:shouldShowTooltip?open:false,onClose:function onClose(){return setOpen(false);},disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var disabledListeners=!shouldShowTooltip?{disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};return/* @__PURE__ */jsx$1(Tooltip,_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({title:shouldShowTooltip?content2:"",placement:placement,arrow:arrow2,slots:{transition:Zoom},slotProps:{popper:{sx:_objectSpread2$1(_objectSpread2$1({},(customSlotProps===null||customSlotProps===void 0||(_customSlotProps$popp=customSlotProps.popper)===null||_customSlotProps$popp===void 0?void 0:_customSlotProps$popp.sx)||{}),{},_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.tooltip),{fontFamily:"var(--primary-font-family)",background:"var(--grey-800)",padding:"9px 9px 8px 12px",fontSize:"var(--body-small)",fontWeight:"400",color:"white !important",borderRadius:"4px",maxWidth:maxWidth2}),"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.arrow),{color:"var(--grey-800)"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="top"] .').concat(tooltipClasses.tooltip),{marginBottom:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="bottom"] .').concat(tooltipClasses.tooltip),{marginTop:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="left"] .').concat(tooltipClasses.tooltip),{marginRight:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="right"] .').concat(tooltipClasses.tooltip),{marginLeft:"8px"}))}}},tooltipProps),disabledListeners),otherProps),{},{children:enhancedChildren}));};var WithOverflowTooltip=function WithOverflowTooltip2(_ref22){var content2=_ref22.content,_children=_ref22.children,tooltipProps=_objectWithoutProperties$1(_ref22,_excluded2);return/* @__PURE__ */jsx$1(OverflowChecker,{children:function children(ref,showTooltip){var childrenWithRef=/* @__PURE__ */React__default.cloneElement(_children,{ref:ref});return showTooltip&&content2?/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({content:content2},tooltipProps),{},{children:childrenWithRef})):childrenWithRef;}});};var styles$k={"help-link":"helpArticleLink-module_help-link_Tne5b"};var HelpArticleLink=/* @__PURE__ */React__default.memo(function(_ref3){var href=_ref3.href,tooltip=_ref3.tooltip;if(!href)return null;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltip,placement:"left",children:/* @__PURE__ */jsx$1(Link,{href:href,target:"_blank","aria-label":tooltip,className:styles$k["help-link"],children:/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(AutoStoriesIcon,{"data-testid":"AutoStoriesIcon"})})})});});HelpArticleLink.displayName="HelpArticleLink";var styles$j={"maintenance-wrapper":"maintenance-module_maintenance-wrapper_21CSu","maintenance-content":"maintenance-module_maintenance-content_csxiz","maintenance-icon":"maintenance-module_maintenance-icon_4Jqjc","maintenance-title":"maintenance-module_maintenance-title_6ALRO","maintenance-text":"maintenance-module_maintenance-text_P-UPr"};var Maintenance=function Maintenance2(_ref3){var _ref$title=_ref3.title,title2=_ref$title===void 0?locale("maintenance.title"):_ref$title,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("maintenance.description"):_ref$description,_ref$subtitle=_ref3.subtitle,subtitle2=_ref$subtitle===void 0?locale("maintenance.subtitle"):_ref$subtitle;return/* @__PURE__ */jsx$1("div",{className:styles$j["maintenance-wrapper"],children:/* @__PURE__ */jsxs("div",{className:styles$j["maintenance-content"],children:[/* @__PURE__ */jsx$1("div",{className:styles$j["maintenance-icon"],children:/* @__PURE__ */jsx$1(MaintenanceIcon,{})}),/* @__PURE__ */jsx$1("h1",{className:styles$j["maintenance-title"],children:title2}),/* @__PURE__ */jsxs("div",{className:styles$j["maintenance-text"],children:[/* @__PURE__ */jsx$1("p",{children:description2}),/* @__PURE__ */jsx$1("p",{children:subtitle2})]})]})});};var modal$1="pickChannelModal-module_modal_YGDD7";var body="pickChannelModal-module_body_X7L60";var compact="pickChannelModal-module_compact_hD7b-";var sections="pickChannelModal-module_sections_VGJ6N";var section="pickChannelModal-module_section_BklUc";var section__title="pickChannelModal-module_section__title_fBRgI";var section__description="pickChannelModal-module_section__description_Pgidd";var styles$i={modal:modal$1,body:body,compact:compact,sections:sections,section:section,section__title:section__title,section__description:section__description,"cards-grid":"pickChannelModal-module_cards-grid_kLH1X"};var overlay="modal-module_overlay_tuS3y";var modal="modal-module_modal_pwYxH";var sm$3="modal-module_sm_yWHmZ";var md$1="modal-module_md_rV0w9";var lg$3="modal-module_lg_sy6Md";var xl="modal-module_xl_UbiWN";var styles$h={overlay:overlay,"modal-backdrop-fade-in":"modal-module_modal-backdrop-fade-in_ipnEv",modal:modal,"modal-enter":"modal-module_modal-enter_uufyU",sm:sm$3,md:md$1,lg:lg$3,xl:xl,"fit-content":"modal-module_fit-content_CBdg6"};var ModalContext=/* @__PURE__ */createContext({isLoading:false});var ModalBase=function ModalBase2(_ref3){var open=_ref3.open,onClose=_ref3.onClose,children=_ref3.children,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?false:_ref$fitContent,ariaLabel=_ref3.ariaLabel;return/* @__PURE__ */jsx$1(Modal$2,{open:open,onClose:onClose,className:styles$h["overlay"],children:/* @__PURE__ */jsx$1("div",{role:"dialog","aria-modal":"true","aria-label":ariaLabel||locale("a11y.dialog"),"aria-busy":isLoading||void 0,className:clsx(styles$h["modal"],styles$h[size2],className,_defineProperty$2({},styles$h["fit-content"],fitContent)),children:/* @__PURE__ */jsx$1(ModalContext.Provider,{value:{isLoading:isLoading},children:children})})});};var Modal$1=withDebugHandlers(ModalBase,"Modal");var icon$1="modalTitle-module_icon_jKB-M";var title$3="modalTitle-module_title_U2a2X";var subtitle="modalTitle-module_subtitle_DTIpI";var styles$g={"title-modal":"modalTitle-module_title-modal_Q-5aj","title-with-icon":"modalTitle-module_title-with-icon_qaofY",icon:icon$1,"title-group":"modalTitle-module_title-group_glQK9",title:title$3,subtitle:subtitle};var ModalTitle=function ModalTitle2(_ref3){var icon2=_ref3.icon,title2=_ref3.title,subtitle2=_ref3.subtitle,helpArticleUrl=_ref3.helpArticleUrl,_ref$helpTooltip=_ref3.helpTooltip,helpTooltip=_ref$helpTooltip===void 0?locale("modalTitle.instructive"):_ref$helpTooltip;return/* @__PURE__ */jsxs("div",{className:styles$g["title-modal"],children:[/* @__PURE__ */jsxs("div",{className:styles$g["title-with-icon"],children:[icon2&&/* @__PURE__ */jsx$1("span",{className:styles$g["icon"],"aria-hidden":"true",children:icon2}),/* @__PURE__ */jsxs("div",{className:styles$g["title-group"],children:[/* @__PURE__ */jsx$1("span",{className:styles$g["title"],children:title2}),subtitle2&&/* @__PURE__ */jsx$1("div",{className:styles$g["subtitle"],children:subtitle2})]})]}),/* @__PURE__ */jsx$1(HelpArticleLink,{href:helpArticleUrl,tooltip:helpTooltip})]});};var styles$f={"modal-body":"modalBody-module_modal-body_EvgIj","modal-body--loading":"modalBody-module_modal-body--loading_SG8wG"};var ModalBody=function ModalBody2(_ref3){var children=_ref3.children,className=_ref3.className;var _useContext=useContext(ModalContext),isLoading=_useContext.isLoading;if(isLoading){return/* @__PURE__ */jsx$1("div",{className:clsx(styles$f["modal-body"],styles$f["modal-body--loading"],className),children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})});}return/* @__PURE__ */jsx$1("div",{className:clsx(styles$f["modal-body"],className),children:children});};var ModalFooter=function ModalFooter2(props){return/* @__PURE__ */jsx$1(ActionBar,_objectSpread2$1({variant:"modal"},props));};var Modal2=Modal$1;Modal2.Title=ModalTitle;Modal2.Body=ModalBody;Modal2.Footer=ModalFooter;var InsertPhotoRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.9 13.98l2.1 2.53 3.1-3.99c.2-.26.6-.26.8.01l3.51 4.68c.25.33.01.8-.4.8H6.02c-.42 0-.65-.48-.39-.81L8.12 14c.19-.26.57-.27.78-.02"}),"InsertPhotoRounded");var image="image-module_image_y02P7";var error$1="image-module_error_QtQOy";var styles$e={"image-container":"image-module_image-container_ZhlhW","show-border":"image-module_show-border_LV5sz",image:image,error:error$1};var Image=function Image2(_ref3){var sx=_ref3.sx,src=_ref3.src,alt=_ref3.alt,imageSx=_ref3.imageSx,errorIcon=_ref3.errorIcon,_ref$showBorder=_ref3.showBorder,showBorder=_ref$showBorder===void 0?true:_ref$showBorder;var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),hasError3=_useState2[0],setHasError=_useState2[1];useEffect(function(){setHasError(false);},[src]);var handleImageError=function handleImageError2(){setHasError(true);};return/* @__PURE__ */jsx$1("div",{className:clsx(styles$e["image-container"],_defineProperty$2({},styles$e["show-border"],showBorder)),style:_objectSpread2$1({},sx),children:hasError3?!!errorIcon?errorIcon:/* @__PURE__ */jsx$1(InsertPhotoRoundedIcon,{className:styles$e.error}):/* @__PURE__ */jsx$1("img",{src:src,alt:alt||src,className:styles$e.image,style:_objectSpread2$1({},imageSx),onError:handleImageError})});};var card="card-module_card_HG0v6";var header$1="card-module_header_Jtd2-";var title$2="card-module_title_9LIjW";var description="card-module_description_nxqlH";var disabled$3="card-module_disabled_Zdzj7";var active$3="card-module_active_dTNAe";var styles$d={card:card,header:header$1,title:title$2,description:description,disabled:disabled$3,active:active$3};var CardBase=function CardBase2(_ref3){var sx=_ref3.sx,icon2=_ref3.icon,title2=_ref3.title,onClick=_ref3.onClick,children=_ref3.children,description2=_ref3.description,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled;return/* @__PURE__ */jsxs("div",{style:sx,onClick:onClick,className:clsx(styles$d.card,_defineProperty$2(_defineProperty$2({},styles$d.disabled,disabled2),styles$d.active,isActive)),children:[/* @__PURE__ */jsxs("div",{className:styles$d.header,children:[!!icon2&&icon2,!!title2&&/* @__PURE__ */jsx$1("div",{className:styles$d.title,children:title2})]}),!!description2&&/* @__PURE__ */jsx$1("span",{className:styles$d.description,children:description2}),children]});};var Card=withDebugHandlers(CardBase,"Card");var ChannelIcon=function ChannelIcon2(_ref3){var iconUrl=_ref3.iconUrl,name=_ref3.name;return/* @__PURE__ */jsx$1(Image,{alt:name,src:iconUrl,showBorder:false,imageSx:{objectFit:"contain"},sx:{height:"36px",maxHeight:"36px",maxWidth:"128px",width:"128px"}});};var ChannelCard=function ChannelCard2(_ref22){var channel=_ref22.channel,onSelect=_ref22.onSelect;var name=channel.name,iconUrl=channel.iconUrl,disabled2=channel.disabled,tooltipMessage=channel.tooltipMessage;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltipMessage,shouldShowTooltip:!!tooltipMessage,children:/* @__PURE__ */jsx$1("div",{children:/* @__PURE__ */jsx$1(Card,{disabled:disabled2,description:name,sx:{width:"200px",height:"88px"},onClick:function onClick(){return!disabled2&&onSelect(channel);},icon:/* @__PURE__ */jsx$1(ChannelIcon,{iconUrl:iconUrl,name:name})})})});};var productecaStrategy={clientId:1,iconUrl:"https://imagesproducteca.blob.core.windows.net/producteca/isologo-producteca.svg"};var COMPACT_CARD_THRESHOLD=6;var PickChannelModalBase=function PickChannelModalBase2(_ref3){var _channels$length;var open=_ref3.open,onClose=_ref3.onClose,channels=_ref3.channels,fitContent=_ref3.fitContent,generalEditionTitle=_ref3.generalEditionTitle,channelEditionTitle=_ref3.channelEditionTitle,generalEditionDescription=_ref3.generalEditionDescription,channelEditionDescription=_ref3.channelEditionDescription,_ref3$showGeneralEdit=_ref3.showGeneralEdition,showGeneralEdition=_ref3$showGeneralEdit===void 0?false:_ref3$showGeneralEdit,_ref3$onSelectChannel=_ref3.onSelectChannel,onSelectChannel=_ref3$onSelectChannel===void 0?function(){}:_ref3$onSelectChannel,_ref3$titleProps=_ref3.titleProps,titleProps=_ref3$titleProps===void 0?{title:locale("pickChannelModal.title")}:_ref3$titleProps;var cardCount=((_channels$length=channels===null||channels===void 0?void 0:channels.length)!==null&&_channels$length!==void 0?_channels$length:0)+(showGeneralEdition?1:0);var isCompact=!fitContent&&cardCount<=COMPACT_CARD_THRESHOLD;return/* @__PURE__ */jsxs(Modal2,{open:open,onClose:onClose,size:"md",fitContent:fitContent,className:clsx(styles$i["modal"],_defineProperty$2({},styles$i["compact"],isCompact)),children:[/* @__PURE__ */jsx$1(Modal2.Title,_objectSpread2$1({},titleProps)),/* @__PURE__ */jsx$1(Modal2.Body,{className:styles$i["body"],children:/* @__PURE__ */jsxs("div",{className:styles$i["sections"],children:[showGeneralEdition&&/* @__PURE__ */jsxs("section",{className:styles$i["section"],children:[generalEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$i["section__title"],children:generalEditionTitle}),generalEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$i["section__description"],children:generalEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$i["cards-grid"],children:/* @__PURE__ */jsx$1(ChannelCard,{channel:productecaStrategy,onSelect:onSelectChannel})})]}),/* @__PURE__ */jsxs("section",{className:styles$i["section"],children:[channelEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$i["section__title"],children:channelEditionTitle}),channelEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$i["section__description"],children:channelEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$i["cards-grid"],children:(channels||[]).map(function(channel){return/* @__PURE__ */jsx$1(ChannelCard,{channel:channel,onSelect:onSelectChannel},channel.clientId);})})]})]})})]});};var PickChannelModal=withDebugHandlers(PickChannelModalBase,"PickChannelModal");var EditRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var VisibilityRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");var VisibilityOffRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var label$2="permissionOption-module_label_Vxb8a";var active$2="permissionOption-module_active_adte8";var clickable="permissionOption-module_clickable_qJgeM";var disabled$2="permissionOption-module_disabled_GSgD5";var styles$c={"permission-option":"permissionOption-module_permission-option_n5PwJ",label:label$2,active:active$2,"no-background":"permissionOption-module_no-background_IsIRU",clickable:clickable,disabled:disabled$2};var permissionConfig={read:{icon:/* @__PURE__ */jsx$1(VisibilityRoundedIcon,{}),labelKey:"permissions.read"},edit:{icon:/* @__PURE__ */jsx$1(EditRoundedIcon,{}),labelKey:"permissions.edit"},noAccess:{icon:/* @__PURE__ */jsx$1(VisibilityOffRoundedIcon,{}),labelKey:"permissions.noAccess"}};var PermissionOptionBase=function PermissionOptionBase2(_ref3){var permission=_ref3.permission,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$showBackground=_ref3.showBackground,showBackground=_ref$showBackground===void 0?true:_ref$showBackground,label2=_ref3.label,icon2=_ref3.icon,_ref$onClick=_ref3.onClick,onClick=_ref$onClick===void 0?void 0:_ref$onClick;var _permissionConfig$per=permissionConfig[permission],defaultIcon=_permissionConfig$per.icon,labelKey=_permissionConfig$per.labelKey;var resolvedIcon=icon2!==null&&icon2!==void 0?icon2:defaultIcon;var resolvedLabel=label2!==null&&label2!==void 0?label2:locale(labelKey);var isClickable=!!onClick&&!disabled2;var iconColor=isActive?getColor("primary","500"):getColor("grey","800");return/* @__PURE__ */jsxs("div",{className:clsx(styles$c["permission-option"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$c.active,isActive),styles$c.disabled,disabled2),styles$c.clickable,isClickable),styles$c["no-background"],!showBackground)),role:isClickable?"button":void 0,tabIndex:isClickable?0:void 0,"aria-pressed":isClickable?isActive:void 0,"aria-disabled":disabled2||void 0,onClick:isClickable?onClick:void 0,children:[/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:iconColor,children:resolvedIcon}),/* @__PURE__ */jsx$1("span",{className:styles$c.label,children:resolvedLabel})]});};var PermissionOption=withDebugHandlers(PermissionOptionBase,"PermissionOption");var styles$b={"permission-selector":"permissionSelector-module_permission-selector_4Bgcp"};var DEFAULT_ITEMS=[{permission:"noAccess"},{permission:"read"},{permission:"edit"}];var PermissionSelectorBase=function PermissionSelectorBase2(_ref3){var sx=_ref3.sx,value=_ref3.value,name=_ref3.name,onChange2=_ref3.onChange,_ref$items=_ref3.items,items=_ref$items===void 0?DEFAULT_ITEMS:_ref$items,_ref$defaultValue=_ref3.defaultValue,defaultValue2=_ref$defaultValue===void 0?"noAccess":_ref$defaultValue;var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeValue=value!==null&&value!==void 0?value:internalValue;var combinedSx=useMemo(function(){return sxTabs$1(sx);},[sx]);var _handleChange=function _handleChange2(_event,newValue){if(value===void 0)setInternalValue(newValue);var fakeEvent={target:{name:name,value:newValue}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);};return/* @__PURE__ */jsx$1("div",{className:styles$b["permission-selector"],children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeValue,onChange:_handleChange,"aria-label":locale("permissionSelector.ariaLabel"),children:map$2(items,function(item2){return/* @__PURE__ */jsx$1(Tab,{value:item2.permission,sx:sxTab$1,disableRipple:true,disabled:item2.disabled,label:/* @__PURE__ */jsx$1(PermissionOption,{icon:item2.icon,label:item2.label,showBackground:false,disabled:item2.disabled,permission:item2.permission,isActive:item2.permission===activeValue})},item2.permission);})})});};var sxTabs$1=function sxTabs(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"2px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:0,minHeight:0,padding:0,zIndex:1,textTransform:"none"},"& .MuiTabs-indicator":{bottom:0,height:"100%",zIndex:0,borderRadius:"var(--radius-md)",backgroundColor:getColor("primary","50")}};};var sxTab$1={padding:0,minHeight:0};var PermissionSelector=withDebugHandlers(PermissionSelectorBase,"PermissionSelector");function getLinearProgressUtilityClass(slot){return generateUtilityClass("MuiLinearProgress",slot);}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var TRANSITION_DURATION=4;var indeterminate1Keyframe=keyframes(_templateObject0||(_templateObject0=_taggedTemplateLiteral2(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])));var indeterminate1Animation=typeof indeterminate1Keyframe!=="string"?css$2(_templateObject1||(_templateObject1=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "])),indeterminate1Keyframe):null;var indeterminate2Keyframe=keyframes(_templateObject10||(_templateObject10=_taggedTemplateLiteral2(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])));var indeterminate2Animation=typeof indeterminate2Keyframe!=="string"?css$2(_templateObject11||(_templateObject11=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "])),indeterminate2Keyframe):null;var bufferKeyframe=keyframes(_templateObject12||(_templateObject12=_taggedTemplateLiteral2(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])));var bufferAnimation=typeof bufferKeyframe!=="string"?css$2(_templateObject13||(_templateObject13=_taggedTemplateLiteral2(["\n animation: "," 3s infinite linear;\n "])),bufferKeyframe):null;var useUtilityClasses=function useUtilityClasses(ownerState){var classes=ownerState.classes,variant=ownerState.variant,color2=ownerState.color;var slots={root:["root","color".concat(capitalize$1(color2)),variant],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2",variant==="buffer"&&"color".concat(capitalize$1(color2))]};return composeClasses(slots,getLinearProgressUtilityClass,classes);};var getColorShade=function getColorShade(theme,color2){if(theme.vars){return theme.vars.palette.LinearProgress["".concat(color2,"Bg")];}return theme.palette.mode==="light"?theme.lighten(theme.palette[color2].main,0.62):theme.darken(theme.palette[color2].main,0.5);};var LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function overridesResolver(props,styles2){var ownerState=props.ownerState;return[styles2.root,styles2["color".concat(capitalize$1(ownerState.color))],styles2[ownerState.variant]];}})(memoTheme(function(_ref234){var theme=_ref234.theme;return{position:"relative",overflow:"hidden",display:"block",height:4,// Fix Safari's bug during composition of different paint.
6979
6979
  zIndex:0,"@media print":{colorAdjust:"exact"},variants:[].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref250){var _ref254=_slicedToArray2(_ref250,1),color2=_ref254[0];return{props:{color:color2},style:{backgroundColor:getColorShade(theme,color2)}};})),[{props:function props(_ref255){var ownerState=_ref255.ownerState;return ownerState.color==="inherit"&&ownerState.variant!=="buffer";},style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:0.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}])};}));var LinearProgressDashed=styled("span",{name:"MuiLinearProgress",slot:"Dashed"})(memoTheme(function(_ref263){var theme=_ref263.theme;return{position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:0.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}}].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref264){var _ref266=_slicedToArray2(_ref264,1),color2=_ref266[0];var backgroundColor2=getColorShade(theme,color2);return{props:{color:color2},style:{backgroundImage:"radial-gradient(".concat(backgroundColor2," 0%, ").concat(backgroundColor2," 16%, transparent 42%)")}};})))};}),bufferAnimation||{// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
6980
6980
  animation:"".concat(bufferKeyframe," 3s infinite linear")});var LinearProgressBar1=styled("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function overridesResolver(props,styles2){return[styles2.bar,styles2.bar1];}})(memoTheme(function(_ref289){var theme=_ref289.theme;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}}].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref290){var _ref291=_slicedToArray2(_ref290,1),color2=_ref291[0];return{props:{color:color2},style:{backgroundColor:(theme.vars||theme).palette[color2].main}};})),[{props:{variant:"determinate"},style:{transition:"transform .".concat(TRANSITION_DURATION,"s linear")}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .".concat(TRANSITION_DURATION,"s linear")}},{props:function props(_ref292){var ownerState=_ref292.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:{width:"auto"}},{props:function props(_ref293){var ownerState=_ref293.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:indeterminate1Animation||{animation:"".concat(indeterminate1Keyframe," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite")}}])};}));var LinearProgressBar2=styled("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function overridesResolver(props,styles2){return[styles2.bar,styles2.bar2];}})(memoTheme(function(_ref294){var theme=_ref294.theme;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref302){var _ref318=_slicedToArray2(_ref302,1),color2=_ref318[0];return{props:{color:color2},style:{"--LinearProgressBar2-barColor":(theme.vars||theme).palette[color2].main}};})),[{props:function props(_ref336){var ownerState=_ref336.ownerState;return ownerState.variant!=="buffer"&&ownerState.color!=="inherit";},style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:function props(_ref344){var ownerState=_ref344.ownerState;return ownerState.variant!=="buffer"&&ownerState.color==="inherit";},style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:0.3}}],_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref345){var _ref348=_slicedToArray2(_ref345,1),color2=_ref348[0];return{props:{color:color2,variant:"buffer"},style:{backgroundColor:getColorShade(theme,color2),transition:"transform .".concat(TRANSITION_DURATION,"s linear")}};})),[{props:function props(_ref349){var ownerState=_ref349.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:{width:"auto"}},{props:function props(_ref350){var ownerState=_ref350.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:indeterminate2Animation||{animation:"".concat(indeterminate2Keyframe," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite")}}])};}));var LinearProgress=/* @__PURE__ */React.forwardRef(function LinearProgress2(inProps,ref){var props=useDefaultProps({props:inProps,name:"MuiLinearProgress"});var _a=props,className=_a.className,_a$color7=_a.color,color2=_a$color7===void 0?"primary":_a$color7,maxProp=_a.max,minProp=_a.min,value=_a.value,valueBuffer=_a.valueBuffer,_a$variant12=_a.variant,variant=_a$variant12===void 0?"indeterminate":_a$variant12,other=__objRest(_a,["className","color","max","min","value","valueBuffer","variant"]);var ownerState=__spreadProps(__spreadValues({},props),{color:color2,variant:variant});if(process.env.NODE_ENV!=="production"){if(["indeterminate","query"].includes(variant)&&(minProp!==void 0||maxProp!==void 0)){console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' or 'query' variant. These props will have no effect.");}}var min2=minProp!=null?minProp:0;var max2=maxProp!=null?maxProp:100;var classes=useUtilityClasses(ownerState);var isRtl=useRtl();var rootProps={};var inlineStyles={bar1:{},bar2:{}};if(variant==="determinate"||variant==="buffer"){if(value!==void 0){if(process.env.NODE_ENV!=="production"){if(value<min2||value>max2||min2>=max2){console.error("MUI: The min, max, and value props in LinearProgress should be numbers where min < max and min <= value <= max. Received min=".concat(min2,", max=").concat(max2,", value=").concat(value,"."));}}var range=max2-min2;var transform=(value-min2)/range*100-100;if(isRtl){transform=-transform;}inlineStyles.bar1.transform=range>0?"translateX(".concat(transform,"%)"):"translateX(-100%)";rootProps["aria-valuenow"]=value;rootProps["aria-valuemin"]=min2;rootProps["aria-valuemax"]=max2;}else if(process.env.NODE_ENV!=="production"){console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress.");}}if(variant==="buffer"){if(valueBuffer!==void 0){if(process.env.NODE_ENV!=="production"){if(valueBuffer<min2||valueBuffer>max2||valueBuffer<value||min2>=max2){console.error("MUI: The min, max, value, and valueBuffer props in LinearProgress should be numbers where min < max and min <= value <= valueBuffer <= max. Received min=".concat(min2,", max=").concat(max2,", value=").concat(value,", valueBuffer=").concat(valueBuffer,"."));}}var _range=max2-min2;var _transform=(valueBuffer-min2)/_range*100-100;if(isRtl){_transform=-_transform;}inlineStyles.bar2.transform=_range>0?"translateX(".concat(_transform,"%)"):"translateX(-100%)";}else if(process.env.NODE_ENV!=="production"){console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");}}return/* @__PURE__ */jsxs(LinearProgressRoot,__spreadProps(__spreadValues(__spreadProps(__spreadValues({className:clsx(classes.root,className),ownerState:ownerState,role:"progressbar"},rootProps),{ref:ref}),other),{children:[variant==="buffer"?/* @__PURE__ */jsx$1(LinearProgressDashed,{className:classes.dashed,ownerState:ownerState}):null,/* @__PURE__ */jsx$1(LinearProgressBar1,{className:classes.bar1,ownerState:ownerState,style:inlineStyles.bar1}),variant==="determinate"?null:/* @__PURE__ */jsx$1(LinearProgressBar2,{className:classes.bar2,ownerState:ownerState,style:inlineStyles.bar2})]}));});process.env.NODE_ENV!=="production"?LinearProgress.propTypes={// ┌────────────────────────────── Warning ──────────────────────────────┐
6981
6981
  // │ These PropTypes are generated from the TypeScript type definitions. │