| 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														      const fileThumbnail = documentId ? fileThumbnails[documentId] : ''; | 
														 | 
														 | 
														      const fileThumbnail = documentId ? fileThumbnails[documentId] : ''; | 
													
													
												
													
														 | 
														 | 
														      const fileExtension = documentId ? getExtension(document?.doc_name) : ''; | 
														 | 
														 | 
														      const fileExtension = documentId ? getExtension(document?.doc_name) : ''; | 
													
													
												
													
														 | 
														 | 
														      const imageId = chunkItem?.image_id; | 
														 | 
														 | 
														      const imageId = chunkItem?.image_id; | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														      return ( | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														        <Image id={imageId} className={styles.referenceChunkImage}></Image> | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														      ); | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														      return ( | 
														 | 
														 | 
														      return ( | 
													
													
												
													
														 | 
														 | 
														        <div key={chunkItem?.id} className="flex gap-2"> | 
														 | 
														 | 
														        <div key={chunkItem?.id} className="flex gap-2"> | 
													
													
												
													
														 | 
														 | 
														          {imageId && ( | 
														 | 
														 | 
														          {imageId && ( | 
													
													
												
											
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														    (text: string) => { | 
														 | 
														 | 
														    (text: string) => { | 
													
													
												
													
														 | 
														 | 
														      let replacedText = reactStringReplace(text, reg, (match, i) => { | 
														 | 
														 | 
														      let replacedText = reactStringReplace(text, reg, (match, i) => { | 
													
													
												
													
														 | 
														 | 
														        const chunkIndex = getChunkIndex(match); | 
														 | 
														 | 
														        const chunkIndex = getChunkIndex(match); | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														        return getPopoverContent(chunkIndex); | 
													
													
												
													
														 | 
														 | 
														        return ( | 
														 | 
														 | 
														        return ( | 
													
													
												
													
														 | 
														 | 
														          <Popover content={getPopoverContent(chunkIndex)} key={i}> | 
														 | 
														 | 
														          <Popover content={getPopoverContent(chunkIndex)} key={i}> | 
													
													
												
													
														 | 
														 | 
														            <InfoCircleOutlined className={styles.referenceIcon} /> | 
														 | 
														 | 
														            <InfoCircleOutlined className={styles.referenceIcon} /> |