"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6240],{26240:(e,r,t)=>{t.d(r,{s:()=>f});var n,l=t(21102),i=t(42494);let o={horizontalrule:(0,l.jsx)("hr",{})},s={linebreak:(0,l.jsx)("br",{})},c={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};for(var a=new Uint8Array(16),d=[],I=0;I{let t=r({nodes:e.children});return t?.length?(0,l.jsx)("p",{children:t}):(0,l.jsx)("p",{children:(0,l.jsx)("br",{})})},text:({node:e})=>{let r=e.text;return e.format&h.IS_BOLD&&(r=(0,l.jsx)("strong",{children:r})),e.format&h.IS_ITALIC&&(r=(0,l.jsx)("em",{children:r})),e.format&h.IS_STRIKETHROUGH&&(r=(0,l.jsx)("span",{style:{textDecoration:"line-through"},children:r})),e.format&h.IS_UNDERLINE&&(r=(0,l.jsx)("span",{style:{textDecoration:"underline"},children:r})),e.format&h.IS_CODE&&(r=(0,l.jsx)("code",{children:r})),e.format&h.IS_SUBSCRIPT&&(r=(0,l.jsx)("sub",{children:r})),e.format&h.IS_SUPERSCRIPT&&(r=(0,l.jsx)("sup",{children:r})),r},...s,quote:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children});return(0,l.jsx)("blockquote",{children:t})},table:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children});return(0,l.jsx)("div",{className:"lexical-table-container",children:(0,l.jsx)("table",{className:"lexical-table",style:{borderCollapse:"collapse"},children:(0,l.jsx)("tbody",{children:t})})})},tablecell:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children}),n=e.headerState>0?"th":"td",i=`lexical-table-cell-header-${e.headerState}`,o={backgroundColor:e.backgroundColor||void 0,border:"1px solid #ccc",padding:"8px"},s=e.colSpan&&e.colSpan>1?e.colSpan:void 0,c=e.rowSpan&&e.rowSpan>1?e.rowSpan:void 0;return(0,l.jsx)(n,{className:`lexical-table-cell ${i}`,colSpan:s,rowSpan:c,style:o,children:t})},tablerow:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children});return(0,l.jsx)("tr",{className:"lexical-table-row",children:t})},heading:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children}),n=e.tag;return(0,l.jsx)(n,{children:t})},...o,list:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children}),n=e.tag;return(0,l.jsx)(n,{className:`list-${e?.listType}`,children:t})},listitem:({node:e,nodesToJSX:r,parent:t})=>{let n=e.children.some(e=>"list"===e.type),i=r({nodes:e.children});if(!("listType"in t)||t?.listType!=="check")return(0,l.jsx)("li",{className:`${n?"nestedListItem":""}`,style:n?{listStyleType:"none"}:void 0,value:e?.value,children:i});{let r=S();return(0,l.jsx)("li",{"aria-checked":e.checked?"true":"false",className:`list-item-checkbox${e.checked?" list-item-checkbox-checked":" list-item-checkbox-unchecked"}${n?" nestedListItem":""}`,role:"checkbox",style:{listStyleType:"none"},tabIndex:-1,value:e?.value,children:n?i:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{checked:e.checked,id:r,readOnly:!0,type:"checkbox"}),(0,l.jsx)("label",{htmlFor:r,children:i}),(0,l.jsx)("br",{})]})})}},...(({internalDocToHref:e})=>({autolink:({node:e,nodesToJSX:r})=>{let t=r({nodes:e.children}),n=e.fields.newTab?"noopener noreferrer":void 0,i=e.fields.newTab?"_blank":void 0;return(0,l.jsx)("a",{href:e.fields.url,rel:n,target:i,children:t})},link:({node:r,nodesToJSX:t})=>{let n=t({nodes:r.children}),i=r.fields.newTab?"noopener noreferrer":void 0,o=r.fields.newTab?"_blank":void 0,s=r.fields.url??"";return"internal"===r.fields.linkType&&(e?s=e({linkNode:r}):(console.error("Lexical => JSX converter: Link converter: found internal link, but internalDocToHref is not provided"),s="#")),(0,l.jsx)("a",{href:s,rel:i,target:o,children:n})}}))({}),upload:({node:e})=>{if("object"!=typeof e.value)return null;let r=e.value,t=r.url;if(!r.mimeType.startsWith("image"))return(0,l.jsx)("a",{href:t,rel:"noopener noreferrer",children:r.filename});if(!r.sizes||!Object.keys(r.sizes).length)return(0,l.jsx)("img",{alt:r.filename,height:r.height,src:t,width:r.width});let n=[];for(let e in r.sizes){let t=r.sizes[e];if(!t||!t.width||!t.height||!t.mimeType||!t.filesize||!t.filename||!t.url)continue;let i=t?.url;n.push((0,l.jsx)("source",{media:`(max-width: ${t.width}px)`,srcSet:i,type:t.mimeType},e))}return n.push((0,l.jsx)("img",{alt:r?.filename,height:r?.height,src:t,width:r?.width},"image")),(0,l.jsx)("picture",{children:n})},tab:" "},f=({className:e,converters:r,data:t,disableContainer:n,disableIndent:o,disableTextAlign:s})=>{if(!t)return null;let c={};c=r?"function"==typeof r?r({defaultConverters:_}):r:_;let a=t&&!Array.isArray(t)&&"object"==typeof t&&"root"in t&&function({converters:e,data:r,disableIndent:t,disableTextAlign:n}){return!function(e){let r=!!e?.root?.children?.length,t=!1;if(e?.root?.children?.length===1&&e?.root?.children[0]?.type==="paragraph"){let r=e?.root?.children[0];if(r?.children&&r?.children?.length!==0){if(r?.children?.length===1){let e=r?.children[0];e?.type!=="text"||e?.text?.length||(t=!0)}}else t=!0}return!!r&&!t}(r)?(0,l.jsx)(l.Fragment,{}):function e({converters:r,disableIndent:t,disableTextAlign:n,nodes:o,parent:s}){let c=r.unknown;return o.map((o,a)=>{let d;"block"===o.type?(d=r?.blocks?.[o?.fields?.blockType])||c||console.error(`Lexical => JSX converter: Blocks converter: found ${o?.fields?.blockType} block, but no converter is provided`):"inlineBlock"===o.type?(d=r?.inlineBlocks?.[o?.fields?.blockType])||c||console.error(`Lexical => JSX converter: Inline Blocks converter: found ${o?.fields?.blockType} inline block, but no converter is provided`):d=r[o.type];try{let I;!d&&c&&(d=c),I=d?"function"==typeof d?d({childIndex:a,converters:r,node:o,nodesToJSX:l=>e({converters:l.converters??r,disableIndent:l.disableIndent??t,disableTextAlign:l.disableTextAlign??n,nodes:l.nodes,parent:l.parent??{...o,parent:s}}),parent:s}):d:(0,l.jsx)("span",{children:"unknown node"},a);let S={};if(!n&&(!Array.isArray(n)||!n?.includes(o.type))&&"format"in o&&o.format)switch(o.format){case"center":S.textAlign="center";break;case"end":case"right":S.textAlign="right";break;case"justify":S.textAlign="justify";break;case"left":break;case"start":S.textAlign="left"}if(!t&&(!Array.isArray(t)||!t?.includes(o.type))&&"indent"in o&&o.indent&&"listitem"!==o.type&&(S.paddingInlineStart=`${40*Number(o.indent)}px`),i.isValidElement(I)){if(S.textAlign||S.paddingInlineStart){let e={...S,...I?.props?.style??{}};return i.cloneElement(I,{key:a,style:e})}return i.cloneElement(I,{key:a})}return I}catch(e){return console.error("Error converting lexical node to JSX:",e,"node:",o),null}}).filter(Boolean)}({converters:e,disableIndent:t,disableTextAlign:n,nodes:r?.root?.children,parent:r?.root})}({converters:c,data:t,disableIndent:o,disableTextAlign:s});return n?(0,l.jsx)(l.Fragment,{children:a}):(0,l.jsx)("div",{className:e??"payload-richtext",children:a})}}}]);