slack-blocks-to-jsx 1.1.1 → 1.1.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.
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +15 -0
- package/dist/index.d.mts +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +17 -17
- package/release-please-config.json +9 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.1.2](https://github.com/themashcodee/slack-blocks-to-jsx/compare/v1.1.1...v1.1.2) (2026-08-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 🐛 match release-please tags to the repo's existing v* tags ([02baa54](https://github.com/themashcodee/slack-blocks-to-jsx/commit/02baa54b0fa6df6eec1b06522981e97de31925ee))
|
|
9
|
+
* 🐛 match release-please tags to the repo's existing v* tags ([cb52ff0](https://github.com/themashcodee/slack-blocks-to-jsx/commit/cb52ff0634758cd800e370ef033558e15898c7f4))
|
|
10
|
+
* 🐛 repair pnpm playground:build and run it in CI ([790ad85](https://github.com/themashcodee/slack-blocks-to-jsx/commit/790ad85a69f3ac77007a1a629e7235b0a4c8991b))
|
|
11
|
+
* 🐛 stack rich_text sections on their own lines ([54846bf](https://github.com/themashcodee/slack-blocks-to-jsx/commit/54846bfdc5c738965325e4a8883a90beebe39b62))
|
|
12
|
+
* 🐛 stack rich_text sections on their own lines ([93a7515](https://github.com/themashcodee/slack-blocks-to-jsx/commit/93a75153bbee13a38f81deb4f1035b55efb4575d))
|
|
13
|
+
* 🐛 stop bullet lists from seeding ordered list numbering ([c7da9f5](https://github.com/themashcodee/slack-blocks-to-jsx/commit/c7da9f5f1795001103d9b626a0e217b7d3f19e85))
|
|
14
|
+
* 🐛 stop bullet lists from seeding ordered list numbering ([6d4ccaa](https://github.com/themashcodee/slack-blocks-to-jsx/commit/6d4ccaaf4c2d36fa17ddea114964e0e9875bf92b))
|
|
15
|
+
* repair pnpm playground:build and run it in CI ([ed2733a](https://github.com/themashcodee/slack-blocks-to-jsx/commit/ed2733ad14e50ae5cad7abd87f8c6f3852e8c058))
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | FeedbackButtonsElement | FileInputElement | IconButtonElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | RichTextInputElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement | UrlSourceElement | WorkflowButtonElement | RichTextBlockElement;
|
|
@@ -1070,6 +1070,9 @@ type TableBlock = {
|
|
|
1070
1070
|
/**
|
|
1071
1071
|
* Available in surfaces: **Messages**
|
|
1072
1072
|
*
|
|
1073
|
+
* Note: Slack's blocks.json lists Home tabs too, but our testing shows the table block only
|
|
1074
|
+
* renders in Messages — Modals and Home tabs don't support it.
|
|
1075
|
+
*
|
|
1073
1076
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/table-block/ View here}
|
|
1074
1077
|
*
|
|
1075
1078
|
* A ***table*** block displays data in a structured table format. It supports up to 100 rows with 20 cells each. Only one table is allowed per message.
|
|
@@ -1129,22 +1132,51 @@ type RichTextBlock = {
|
|
|
1129
1132
|
elements: RichTextBlockElement[];
|
|
1130
1133
|
};
|
|
1131
1134
|
type ContextActionsBlock = {
|
|
1135
|
+
/**
|
|
1136
|
+
* Available in surfaces: **Messages**
|
|
1137
|
+
*
|
|
1138
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/context-actions-block/ View here}
|
|
1139
|
+
*
|
|
1140
|
+
* Displays actions as contextual info, which can include both feedback buttons and icon buttons.
|
|
1141
|
+
*/
|
|
1132
1142
|
type: "context_actions";
|
|
1133
1143
|
elements: Element[];
|
|
1134
1144
|
block_id?: string;
|
|
1135
1145
|
};
|
|
1136
1146
|
type MarkdownBlock = {
|
|
1147
|
+
/**
|
|
1148
|
+
* Available in surfaces: **Messages**
|
|
1149
|
+
*
|
|
1150
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/markdown-block/ View here}
|
|
1151
|
+
*
|
|
1152
|
+
* Displays formatted markdown text.
|
|
1153
|
+
*/
|
|
1137
1154
|
type: "markdown";
|
|
1138
1155
|
text: string;
|
|
1139
1156
|
block_id?: string;
|
|
1140
1157
|
};
|
|
1141
1158
|
type PlanBlock = {
|
|
1159
|
+
/**
|
|
1160
|
+
* Available in surfaces: **Messages**
|
|
1161
|
+
*
|
|
1162
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/plan-block/ View here}
|
|
1163
|
+
*
|
|
1164
|
+
* Displays a plan made up of one or more {@link TaskCardBlock task cards}.
|
|
1165
|
+
*/
|
|
1142
1166
|
type: "plan";
|
|
1143
1167
|
title: string;
|
|
1144
1168
|
tasks?: TaskCardBlock[];
|
|
1145
1169
|
block_id?: string;
|
|
1146
1170
|
};
|
|
1147
1171
|
type TaskCardBlock = {
|
|
1172
|
+
/**
|
|
1173
|
+
* Available in surfaces: **Messages**
|
|
1174
|
+
*
|
|
1175
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/task-card-block/ View here}
|
|
1176
|
+
*
|
|
1177
|
+
* Displays a single task with a status, optional details, output, and sources. Task cards can
|
|
1178
|
+
* stand alone or be nested inside a {@link PlanBlock}.
|
|
1179
|
+
*/
|
|
1148
1180
|
type: "task_card";
|
|
1149
1181
|
task_id: string;
|
|
1150
1182
|
title: string;
|
|
@@ -1160,7 +1192,7 @@ type TaskCardBlock = {
|
|
|
1160
1192
|
type AlertLevel = "default" | "info" | "warning" | "error" | "success";
|
|
1161
1193
|
type AlertBlock = {
|
|
1162
1194
|
/**
|
|
1163
|
-
* Available in surfaces: **
|
|
1195
|
+
* Available in surfaces: **Modals**
|
|
1164
1196
|
*
|
|
1165
1197
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/alert-block/ View here}
|
|
1166
1198
|
*
|
|
@@ -1204,7 +1236,7 @@ type CardImage = {
|
|
|
1204
1236
|
};
|
|
1205
1237
|
type CardBlock = {
|
|
1206
1238
|
/**
|
|
1207
|
-
* Available in surfaces: **Messages**
|
|
1239
|
+
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
1208
1240
|
*
|
|
1209
1241
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/card-block/ View here}
|
|
1210
1242
|
*
|
|
@@ -1247,7 +1279,7 @@ type CardBlock = {
|
|
|
1247
1279
|
};
|
|
1248
1280
|
type CarouselBlock = {
|
|
1249
1281
|
/**
|
|
1250
|
-
* Available in surfaces: **Messages**
|
|
1282
|
+
* Available in surfaces: **Messages**, **Home tabs**
|
|
1251
1283
|
*
|
|
1252
1284
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/carousel-block/ View here}
|
|
1253
1285
|
*
|
|
@@ -1653,6 +1685,6 @@ type Props = {
|
|
|
1653
1685
|
withoutWrapper?: boolean;
|
|
1654
1686
|
};
|
|
1655
1687
|
type MessageProps = Props;
|
|
1656
|
-
declare const Message: (props: Props) =>
|
|
1688
|
+
declare const Message: (props: Props) => React$1.JSX.Element;
|
|
1657
1689
|
|
|
1658
1690
|
export { type ActionsBlock, type AlertBlock, type AlertLevel, type Block, type ButtonElement, type CardBlock, type CardImage, type CarouselBlock, type ChannelsSelectElement, type CheckboxesElement, type ConfirmDialogObject, type ContainerBlock, type ContextActionsBlock, type ContextBlock, type ConversationsSelectElement, type DataVisualizationBlock, type DataVizAxisConfig, type DataVizCartesianChart, type DataVizChart, type DataVizDataPoint, type DataVizPieChart, type DataVizSegment, type DataVizSeries, type DatePickerElement, type DateTimePickerElement, type DispatchActionConfigObject, type DividerBlock, type Element, type EmailInputElement, type ExternalSelectElement, type FeedbackButtonsElement, type FileBlock, type FileInputElement, type FilterObject, type HeaderBlock, type IconButtonElement, type ImageBlock, type ImageElement, type InputBlock, type MarkdownBlock, Message, type MessageProps, type MultiChannelsSelectElement, type MultiConversationsSelectElement, type MultiExternalSelectElement, type MultiStaticSelectElement, type MultiUsersSelectElement, type NumberInputElement, type OptionGroupObject, type OptionObject, type OptionObjectWithoutUrl, type OverflowMenuElement, type PlainTextInputElement, type PlanBlock, type RadioButtonsElement, type RichTextBlock, type RichTextBlockElement, type RichTextBlockSubElement, type RichTextInputElement, type RichTextList, type RichTextPreformatted, type RichTextQuote, type RichTextSection, type RichTextSectionBroadcast, type RichTextSectionChannel, type RichTextSectionColor, type RichTextSectionDate, type RichTextSectionElement, type RichTextSectionElementStyle, type RichTextSectionElementStyleCode, type RichTextSectionEmoji, type RichTextSectionLink, type RichTextSectionText, type RichTextSectionUser, type RichTextSectionUsergroup, type SectionBlock, type SlackFileObject, type StaticSelectElement, type Style, type TableBlock, type TableCell, type TableColumnSetting, type TaskCardBlock, type TextObject, type TextObjectTextType, type TimePickerElement, type TriggerObject, type UrlSourceElement, type UrlTextInputElement, type UsersSelectElement, type VideoBlock, type WorkflowButtonElement, type WorkflowObject };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | FeedbackButtonsElement | FileInputElement | IconButtonElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | RichTextInputElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement | UrlSourceElement | WorkflowButtonElement | RichTextBlockElement;
|
|
@@ -1070,6 +1070,9 @@ type TableBlock = {
|
|
|
1070
1070
|
/**
|
|
1071
1071
|
* Available in surfaces: **Messages**
|
|
1072
1072
|
*
|
|
1073
|
+
* Note: Slack's blocks.json lists Home tabs too, but our testing shows the table block only
|
|
1074
|
+
* renders in Messages — Modals and Home tabs don't support it.
|
|
1075
|
+
*
|
|
1073
1076
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/table-block/ View here}
|
|
1074
1077
|
*
|
|
1075
1078
|
* A ***table*** block displays data in a structured table format. It supports up to 100 rows with 20 cells each. Only one table is allowed per message.
|
|
@@ -1129,22 +1132,51 @@ type RichTextBlock = {
|
|
|
1129
1132
|
elements: RichTextBlockElement[];
|
|
1130
1133
|
};
|
|
1131
1134
|
type ContextActionsBlock = {
|
|
1135
|
+
/**
|
|
1136
|
+
* Available in surfaces: **Messages**
|
|
1137
|
+
*
|
|
1138
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/context-actions-block/ View here}
|
|
1139
|
+
*
|
|
1140
|
+
* Displays actions as contextual info, which can include both feedback buttons and icon buttons.
|
|
1141
|
+
*/
|
|
1132
1142
|
type: "context_actions";
|
|
1133
1143
|
elements: Element[];
|
|
1134
1144
|
block_id?: string;
|
|
1135
1145
|
};
|
|
1136
1146
|
type MarkdownBlock = {
|
|
1147
|
+
/**
|
|
1148
|
+
* Available in surfaces: **Messages**
|
|
1149
|
+
*
|
|
1150
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/markdown-block/ View here}
|
|
1151
|
+
*
|
|
1152
|
+
* Displays formatted markdown text.
|
|
1153
|
+
*/
|
|
1137
1154
|
type: "markdown";
|
|
1138
1155
|
text: string;
|
|
1139
1156
|
block_id?: string;
|
|
1140
1157
|
};
|
|
1141
1158
|
type PlanBlock = {
|
|
1159
|
+
/**
|
|
1160
|
+
* Available in surfaces: **Messages**
|
|
1161
|
+
*
|
|
1162
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/plan-block/ View here}
|
|
1163
|
+
*
|
|
1164
|
+
* Displays a plan made up of one or more {@link TaskCardBlock task cards}.
|
|
1165
|
+
*/
|
|
1142
1166
|
type: "plan";
|
|
1143
1167
|
title: string;
|
|
1144
1168
|
tasks?: TaskCardBlock[];
|
|
1145
1169
|
block_id?: string;
|
|
1146
1170
|
};
|
|
1147
1171
|
type TaskCardBlock = {
|
|
1172
|
+
/**
|
|
1173
|
+
* Available in surfaces: **Messages**
|
|
1174
|
+
*
|
|
1175
|
+
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/task-card-block/ View here}
|
|
1176
|
+
*
|
|
1177
|
+
* Displays a single task with a status, optional details, output, and sources. Task cards can
|
|
1178
|
+
* stand alone or be nested inside a {@link PlanBlock}.
|
|
1179
|
+
*/
|
|
1148
1180
|
type: "task_card";
|
|
1149
1181
|
task_id: string;
|
|
1150
1182
|
title: string;
|
|
@@ -1160,7 +1192,7 @@ type TaskCardBlock = {
|
|
|
1160
1192
|
type AlertLevel = "default" | "info" | "warning" | "error" | "success";
|
|
1161
1193
|
type AlertBlock = {
|
|
1162
1194
|
/**
|
|
1163
|
-
* Available in surfaces: **
|
|
1195
|
+
* Available in surfaces: **Modals**
|
|
1164
1196
|
*
|
|
1165
1197
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/alert-block/ View here}
|
|
1166
1198
|
*
|
|
@@ -1204,7 +1236,7 @@ type CardImage = {
|
|
|
1204
1236
|
};
|
|
1205
1237
|
type CardBlock = {
|
|
1206
1238
|
/**
|
|
1207
|
-
* Available in surfaces: **Messages**
|
|
1239
|
+
* Available in surfaces: **Modals**, **Messages**, **Home tabs**
|
|
1208
1240
|
*
|
|
1209
1241
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/card-block/ View here}
|
|
1210
1242
|
*
|
|
@@ -1247,7 +1279,7 @@ type CardBlock = {
|
|
|
1247
1279
|
};
|
|
1248
1280
|
type CarouselBlock = {
|
|
1249
1281
|
/**
|
|
1250
|
-
* Available in surfaces: **Messages**
|
|
1282
|
+
* Available in surfaces: **Messages**, **Home tabs**
|
|
1251
1283
|
*
|
|
1252
1284
|
* * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/carousel-block/ View here}
|
|
1253
1285
|
*
|
|
@@ -1653,6 +1685,6 @@ type Props = {
|
|
|
1653
1685
|
withoutWrapper?: boolean;
|
|
1654
1686
|
};
|
|
1655
1687
|
type MessageProps = Props;
|
|
1656
|
-
declare const Message: (props: Props) =>
|
|
1688
|
+
declare const Message: (props: Props) => React$1.JSX.Element;
|
|
1657
1689
|
|
|
1658
1690
|
export { type ActionsBlock, type AlertBlock, type AlertLevel, type Block, type ButtonElement, type CardBlock, type CardImage, type CarouselBlock, type ChannelsSelectElement, type CheckboxesElement, type ConfirmDialogObject, type ContainerBlock, type ContextActionsBlock, type ContextBlock, type ConversationsSelectElement, type DataVisualizationBlock, type DataVizAxisConfig, type DataVizCartesianChart, type DataVizChart, type DataVizDataPoint, type DataVizPieChart, type DataVizSegment, type DataVizSeries, type DatePickerElement, type DateTimePickerElement, type DispatchActionConfigObject, type DividerBlock, type Element, type EmailInputElement, type ExternalSelectElement, type FeedbackButtonsElement, type FileBlock, type FileInputElement, type FilterObject, type HeaderBlock, type IconButtonElement, type ImageBlock, type ImageElement, type InputBlock, type MarkdownBlock, Message, type MessageProps, type MultiChannelsSelectElement, type MultiConversationsSelectElement, type MultiExternalSelectElement, type MultiStaticSelectElement, type MultiUsersSelectElement, type NumberInputElement, type OptionGroupObject, type OptionObject, type OptionObjectWithoutUrl, type OverflowMenuElement, type PlainTextInputElement, type PlanBlock, type RadioButtonsElement, type RichTextBlock, type RichTextBlockElement, type RichTextBlockSubElement, type RichTextInputElement, type RichTextList, type RichTextPreformatted, type RichTextQuote, type RichTextSection, type RichTextSectionBroadcast, type RichTextSectionChannel, type RichTextSectionColor, type RichTextSectionDate, type RichTextSectionElement, type RichTextSectionElementStyle, type RichTextSectionElementStyleCode, type RichTextSectionEmoji, type RichTextSectionLink, type RichTextSectionText, type RichTextSectionUser, type RichTextSectionUsergroup, type SectionBlock, type SlackFileObject, type StaticSelectElement, type Style, type TableBlock, type TableCell, type TableColumnSetting, type TaskCardBlock, type TextObject, type TextObjectTextType, type TimePickerElement, type TriggerObject, type UrlSourceElement, type UrlTextInputElement, type UsersSelectElement, type VideoBlock, type WorkflowButtonElement, type WorkflowObject };
|
package/dist/index.js
CHANGED
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
`+"LBKS".repeat(s.length)),n=n.replace(/^>.*$(?!\n>)/gm,`$&
|
|
14
14
|
`),n=n.replace(/<!here>/g,"@here"),n=n.replace(/<!everyone>/g,"@everyone"),n=n.replace(/<!channel>/g,"@channel");let a=R_.parse(n).children;return(0,kt.jsx)("div",{children:a.map((l,s)=>l.type==="paragraph"?(0,kt.jsx)(qn,{element:l,isFirst:s===0},s):l.type==="blockquote"?(0,kt.jsx)(Hr,{element:l},s):l.type==="code"?(0,kt.jsx)(Cr,{element:l},s):null)})};var Ur=e=>e.type==="button"?!1:e.type==="checkboxes"?!0:(e.type==="datepicker"||e.type==="datetimepicker"||e.type==="email_text_input"||e.type==="image"||e.type==="multi_static_select"||e.type==="multi_external_select"||e.type==="multi_users_select"||e.type==="multi_conversations_select"||e.type==="multi_channels_select"||e.type==="number_input"||e.type==="overflow"||e.type==="plain_text_input"||e.type==="radio_buttons"||e.type==="static_select"||e.type==="external_select"||e.type==="users_select"||e.type==="conversations_select"||e.type==="channels_select"||e.type==="timepicker"||e.type==="url_text_input",!1);var Y=e=>e.map(r=>r.replace(/ +/g," ").trim()).filter(r=>!!r).join(" ");function Pr(e){if(e<1||e>3999||!Number.isInteger(e))throw new Error("Input must be a positive integer between 1 and 3999");let r=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],n="";for(let[t,a]of r)for(;e>=t;)n+=a,e-=t;return n}function el(e){if(e<1||!Number.isInteger(e))throw new Error("Input must be a positive integer");let r="";for(;e>0;)e--,r=String.fromCharCode(97+e%26)+r,e=Math.floor(e/26);return r}var tl=e=>e.map(nl),nl=e=>{if(e.type==="image"){let r=e,{image_width:t,image_height:a,image_bytes:l,is_animated:s,fallback:i}=r;return Ze(r,["image_width","image_height","image_bytes","is_animated","fallback"])}if(e.type==="video"){let n=e,{iframeProps:t}=n;return Ze(n,["iframeProps"])}return e.type==="section"&&e.accessory?W(S({},e),{accessory:ja(e.accessory)}):e.type==="actions"?W(S({},e),{elements:e.elements.map(ja)}):e.type==="container"?W(S({},e),{child_blocks:e.child_blocks.map(nl)}):e.type==="input"?W(S({},e),{element:ja(e.element)}):e},ja=e=>{if(!e||typeof e!="object")return e;if(e.type==="users_select"||e.type==="multi_users_select"){let r=e,{people:n}=r;return Ze(r,["people"])}return e};var Ya=require("react/jsx-runtime"),N=e=>{let{type:r,text:n,verbatim:t=!1}=e.data,{className:a=""}=e,{channels:l,users:s,hooks:i}=z(),u=n.replace(/>/g,"> ").replace(/</g,"<");return r==="plain_text"?(0,Ya.jsx)("div",{className:a+" dark:text-dark-text-primary",children:Wt(u,{markdown:!1,verbatim:t,users:s,channels:l,hooks:i})}):(0,Ya.jsx)("div",{className:a+" dark:text-dark-text-primary",children:Wt(u,{markdown:!0,verbatim:t,users:s,channels:l,hooks:i})})};var ye=require("react/jsx-runtime"),ct=e=>{let{data:r,onConfirm:n,onCancel:t}=e,{title:a,text:l,confirm:s,deny:i,style:u}=r;return(0,ye.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center slack_blocks_to_jsx__confirm_dialog",onClick:o=>{o.target===o.currentTarget&&t()},children:[(0,ye.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 dark:bg-opacity-70"}),(0,ye.jsxs)("div",{className:"relative z-10 w-full max-w-[400px] bg-white dark:bg-dark-bg-secondary rounded-lg shadow-lg border border-gray-primary dark:border-dark-border",children:[(0,ye.jsx)("div",{className:"px-5 pt-4 pb-3 border-b border-gray-primary dark:border-dark-border",children:(0,ye.jsx)("div",{className:"font-semibold text-black-primary dark:text-dark-text-primary",children:(0,ye.jsx)(N,{data:a})})}),(0,ye.jsx)("div",{className:"px-5 py-4 text-small text-black-primary dark:text-dark-text-primary",children:(0,ye.jsx)(N,{data:l})}),(0,ye.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-4",children:[(0,ye.jsx)("button",{type:"button",className:"px-3 py-1.5 text-small font-semibold rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",onClick:t,children:(0,ye.jsx)(N,{data:i})}),(0,ye.jsx)("button",{type:"button",className:Y(["px-3 py-1.5 text-small font-semibold rounded",u==="danger"?"bg-red-primary text-white-primary":"bg-green-primary text-white-primary"]),onClick:n,children:(0,ye.jsx)(N,{data:s})})]})]})]})};var se=require("react/jsx-runtime"),al={default:{containerClass:"border-black-primary/[0.13] bg-gray-secondary dark:border-dark-border dark:bg-dark-bg-secondary",iconClass:"text-black-secondary dark:text-dark-text-secondary",label:"Notice",icon:(0,se.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[(0,se.jsx)("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),(0,se.jsx)("path",{d:"M8 5v3.5M8 11h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},info:{containerClass:"border-blue-primary/30 bg-blue-primary/[0.08] dark:border-dark-link/40 dark:bg-dark-link/[0.1]",iconClass:"text-blue-primary dark:text-dark-link",label:"Info",icon:(0,se.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[(0,se.jsx)("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),(0,se.jsx)("path",{d:"M8 7v4M8 5h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{containerClass:"border-orange-primary/40 bg-orange-primary/[0.1] dark:border-orange-primary/50 dark:bg-orange-primary/[0.12]",iconClass:"text-orange-primary",label:"Warning",icon:(0,se.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[(0,se.jsx)("path",{d:"M8 2.25 14.5 13.5h-13L8 2.25Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),(0,se.jsx)("path",{d:"M8 6v3.5M8 11.5h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},error:{containerClass:"border-red-primary/40 bg-red-primary/[0.08] dark:border-red-primary/50 dark:bg-red-primary/[0.12]",iconClass:"text-red-primary",label:"Error",icon:(0,se.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[(0,se.jsx)("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),(0,se.jsx)("path",{d:"m5.5 5.5 5 5M10.5 5.5l-5 5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})},success:{containerClass:"border-green-primary/40 bg-green-primary/[0.08] dark:border-green-secondary/50 dark:bg-green-secondary/[0.12]",iconClass:"text-green-primary dark:text-green-secondary",label:"Success",icon:(0,se.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[(0,se.jsx)("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),(0,se.jsx)("path",{d:"m5 8.25 2.25 2.25L11 6.75",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}},rl=e=>{var l;let{text:r,level:n="default",block_id:t}=e.data,a=(l=al[n])!=null?l:al.default;return(0,se.jsxs)("div",{id:t,role:"status","aria-label":a.label,"data-level":n,className:`my-2 flex items-start gap-2 rounded-md border px-3 py-2 text-base slack_blocks_to_jsx__alert slack_blocks_to_jsx__alert_${n} ${a.containerClass}`,children:[(0,se.jsx)("span",{className:`mt-[2px] shrink-0 slack_blocks_to_jsx__alert_icon ${a.iconClass}`,children:a.icon}),(0,se.jsx)("div",{className:"flex-1 min-w-0 slack_blocks_to_jsx__alert_text text-black-primary dark:text-dark-text-primary",children:(0,se.jsx)(N,{data:r})})]})};var ll=require("react");var S1=require("react/jsx-runtime"),ta=e=>{let{text:r,action_id:n,url:t,style:a,accessibility_label:l,confirm:s}=e.data,[i,u]=(0,ll.useState)(!1),o=()=>{s?u(!0):t&&window.open(t,"_blank")},k=()=>{u(!1),t&&window.open(t,"_blank")},m=()=>{u(!1)};return(0,S1.jsxs)(S1.Fragment,{children:[(0,S1.jsx)("button",{type:"button",id:n,"aria-label":l,className:Y(["px-2 pt-0 pb-[1px] text-small h-[28px] min-w-[56px] border rounded whitespace-nowrap font-semibold","slack_blocks_to_jsx__button_element",a==="primary"?"bg-green-primary text-white-primary":a==="danger"?"bg-red-primary text-white-primary":"border-black-primary.3 text-black-primary dark:border-dark-border dark:text-dark-text-primary"]),onClick:o,children:(0,S1.jsx)(N,{data:r})}),i&&s&&(0,S1.jsx)(ct,{data:s,onConfirm:k,onCancel:m})]})};var Ee=require("react/jsx-runtime"),sl=e=>{var r;if(e)return e.image_url||((r=e.slack_file)==null?void 0:r.url)},na=e=>{var c;let{title:r,subtitle:n,body:t,hero_image:a,icon:l,actions:s,block_id:i}=e.data,u=(c=e.inCarousel)!=null?c:!1,o=sl(a),k=sl(l),m=s?s.slice(0,5):void 0;return(0,Ee.jsxs)("div",{id:i,className:["slack_blocks_to_jsx__card","flex flex-col rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary overflow-hidden",u?"slack_blocks_to_jsx__card--in_carousel shrink-0 w-[260px] snap-start":"my-2 max-w-[420px]"].join(" "),children:[o&&(0,Ee.jsx)("div",{className:"slack_blocks_to_jsx__card_hero w-full aspect-[16/9] bg-gray-secondary dark:bg-dark-bg-primary overflow-hidden",children:(0,Ee.jsx)("img",{src:o,alt:(a==null?void 0:a.alt_text)||"",className:"w-full h-full object-cover"})}),(0,Ee.jsxs)("div",{className:"p-3 flex flex-col gap-1 slack_blocks_to_jsx__card_body_wrap",children:[(r||k)&&(0,Ee.jsxs)("div",{className:"flex items-start gap-2 slack_blocks_to_jsx__card_header",children:[k&&(0,Ee.jsx)("img",{src:k,alt:(l==null?void 0:l.alt_text)||"",className:"w-5 h-5 rounded shrink-0 mt-[1px] slack_blocks_to_jsx__card_icon"}),(0,Ee.jsxs)("div",{className:"flex-1 min-w-0",children:[r&&(0,Ee.jsx)("div",{className:"text-base font-semibold text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__card_title",children:(0,Ee.jsx)(N,{data:r})}),n&&(0,Ee.jsx)("div",{className:"text-small text-black-secondary dark:text-dark-text-secondary slack_blocks_to_jsx__card_subtitle",children:(0,Ee.jsx)(N,{data:n})})]})]}),t&&(0,Ee.jsx)("div",{className:"text-base text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__card_body mt-1",children:(0,Ee.jsx)(N,{data:t})}),m&&m.length>0&&(0,Ee.jsx)("div",{className:"flex flex-wrap gap-2 mt-2 slack_blocks_to_jsx__card_actions",children:m.map((p,A)=>(0,Ee.jsx)(ta,{data:p},p.action_id||A))})]})]})};var r1=require("react");var Ce=require("react/jsx-runtime"),il=e=>{let{elements:r,block_id:n}=e.data,t=r.slice(0,10),a=(0,r1.useRef)(null),[l,s]=(0,r1.useState)(!1),[i,u]=(0,r1.useState)(!1),o=(0,r1.useCallback)(()=>{let m=a.current;if(!m)return;let{scrollLeft:c,scrollWidth:p,clientWidth:A}=m,E=8;s(c>E),u(c+A<p-E)},[]);(0,r1.useEffect)(()=>{let m=a.current;if(!m)return;o(),m.addEventListener("scroll",o,{passive:!0});let c=typeof ResizeObserver!="undefined"?new ResizeObserver(o):null;return c==null||c.observe(m),window.addEventListener("resize",o),()=>{m.removeEventListener("scroll",o),c==null||c.disconnect(),window.removeEventListener("resize",o)}},[o,t.length]);let k=m=>{let c=a.current;if(!c)return;let p=c.clientWidth*.8*(m==="left"?-1:1);c.scrollBy({left:p,behavior:"smooth"})};return t.length===0?null:(0,Ce.jsxs)("div",{id:n,className:"my-2 relative slack_blocks_to_jsx__carousel",role:"region","aria-label":"Carousel",children:[(0,Ce.jsx)("div",{ref:a,className:"flex gap-3 overflow-x-auto snap-x snap-mandatory pb-2 -mx-1 px-1 slack_blocks_to_jsx__carousel_track",style:{scrollbarWidth:"thin"},children:t.map((m,c)=>(0,Ce.jsx)(na,{data:m,inCarousel:!0},m.block_id||c))}),l&&(0,Ce.jsx)("button",{type:"button","aria-label":"Scroll left",onClick:()=>k("left"),className:"absolute left-1 top-1/2 -translate-y-1/2 w-8 h-8 rounded-full flex items-center justify-center bg-white-primary dark:bg-dark-bg-secondary text-black-primary dark:text-dark-text-primary border border-black-primary/[0.13] dark:border-dark-border shadow-md hover:bg-gray-secondary dark:hover:bg-dark-bg-primary slack_blocks_to_jsx__carousel_arrow slack_blocks_to_jsx__carousel_arrow--left",children:(0,Ce.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",className:"w-5 h-5",children:(0,Ce.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.03 5.72a.75.75 0 0 1 0 1.06L8.81 10l3.22 3.22a.75.75 0 1 1-1.06 1.06l-3.75-3.75a.75.75 0 0 1 0-1.06l3.75-3.75a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}),i&&(0,Ce.jsx)("button",{type:"button","aria-label":"Scroll right",onClick:()=>k("right"),className:"absolute right-1 top-1/2 -translate-y-1/2 w-8 h-8 rounded-full flex items-center justify-center bg-white-primary dark:bg-dark-bg-secondary text-black-primary dark:text-dark-text-primary border border-black-primary/[0.13] dark:border-dark-border shadow-md hover:bg-gray-secondary dark:hover:bg-dark-bg-primary slack_blocks_to_jsx__carousel_arrow slack_blocks_to_jsx__carousel_arrow--right",children:(0,Ce.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",className:"w-5 h-5",children:(0,Ce.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.72 5.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1 0 1.06l-3.75 3.75a.75.75 0 0 1-1.06-1.06L10.94 10 7.72 6.78a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})})]})};var ul=require("react");var ke=require("react/jsx-runtime"),S_={narrow:"max-w-[320px]",standard:"max-w-[440px]",wide:"max-w-[520px]",full:"w-full"},_l=e=>{let{title:r,subtitle:n,icon:t,child_blocks:a,width:l="standard",is_collapsible:s=!1,default_collapsed:i=!1,block_id:u}=e.data,[o,k]=(0,ul.useState)(!(s&&i)),m=s&&!o,c=(0,ke.jsxs)(ke.Fragment,{children:[(t==null?void 0:t.image_url)&&(0,ke.jsx)("span",{className:"shrink-0 slack_blocks_to_jsx__container_icon",children:(0,ke.jsx)("img",{src:t.image_url,alt:t.alt_text||"",className:"w-5 h-5 rounded object-cover"})}),(0,ke.jsxs)("span",{className:"flex flex-col min-w-0 flex-1 slack_blocks_to_jsx__container_title_group",children:[r&&(0,ke.jsx)("span",{className:"font-bold text-black-primary dark:text-dark-text-primary truncate slack_blocks_to_jsx__container_title",children:(0,ke.jsx)(N,{data:r})}),n&&(0,ke.jsx)("span",{className:"text-small text-black-secondary dark:text-dark-text-secondary truncate slack_blocks_to_jsx__container_subtitle",children:(0,ke.jsx)(N,{data:n})})]}),s&&(0,ke.jsx)("span",{"aria-hidden":"true",className:Y(["shrink-0 transition-transform slack_blocks_to_jsx__container_caret",m?"-rotate-90":""]),children:(0,ke.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:"w-4 h-4",children:(0,ke.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.72 7.47a.75.75 0 0 1 1.06 0L10 10.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0L5.72 8.53a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})})]});return(0,ke.jsxs)("div",{id:u,role:"group","aria-label":r==null?void 0:r.text,className:Y(["my-2 rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary overflow-hidden slack_blocks_to_jsx__container",S_[l]]),children:[s?(0,ke.jsx)("button",{type:"button","aria-expanded":o,onClick:()=>k(p=>!p),className:"w-full flex items-center gap-2 p-3 text-left slack_blocks_to_jsx__container_header",children:c}):(0,ke.jsx)("div",{className:"flex items-center gap-2 p-3 slack_blocks_to_jsx__container_header",children:c}),!m&&(0,ke.jsx)("div",{className:"px-3 pb-3 slack_blocks_to_jsx--blocks slack_blocks_to_jsx__container_content",children:a.map((p,A)=>{let E=zt(p);return E?(0,ke.jsx)("div",{children:E},p.block_id||A):null})})]})};var Qa=require("react/jsx-runtime"),aa=e=>{let{inside:r="section"}=e,{alt_text:n,image_url:t}=e.data;return(0,Qa.jsx)("div",{className:"relative",children:(0,Qa.jsx)("img",{src:t,alt:n,className:`overflow-hidden object-cover slack_blocks_to_jsx__image_element ${r==="context"?"w-[20px] h-[20px] rounded-sm mr-1 mb-[5px]":"w-[88px] h-[88px] rounded-lg"}`})})};var qe=require("react");var re=require("react/jsx-runtime"),ol=e=>{let{action_id:r,options:n,confirm:t,focus_on_load:a,initial_option:l,option_groups:s,placeholder:i}=e.data,[u,o]=(0,qe.useState)(a!=null?a:!1),[k,m]=(0,qe.useState)(""),[c,p]=(0,qe.useState)(l&&"value"in l?l.value:""),[A,E]=(0,qe.useState)(""),[f,I]=(0,qe.useState)(!1);(0,qe.useEffect)(()=>{let w=ee=>{var we,C;let ce=ee.target;ce.id!=="static_select_popup"&&ce.id!=="static_select_dropdown_button"&&((we=ce.parentElement)==null?void 0:we.id)!=="static_select_popup"&&((C=ce.parentElement)==null?void 0:C.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]);let g=(0,qe.useMemo)(()=>s&&s.length>0?s.flatMap(w=>w.options):n,[n,s]).filter(w=>w.text.text.toLowerCase().includes(k.toLowerCase())),v=w=>{t?(E(w),I(!0)):(o(!1),p(w))},L=()=>{I(!1),o(!1),p(A),E("")},K=()=>{I(!1),E("")};return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:0,children:[u&&(0,re.jsx)("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:(0,re.jsx)("div",{className:"flex flex-col",children:s&&s.length>0?s.map((w,ee)=>(0,re.jsxs)("div",{children:[(0,re.jsx)("div",{className:"px-6 py-1 text-xs font-semibold text-black-secondary dark:text-dark-text-secondary uppercase",children:(0,re.jsx)(N,{data:w.label})}),w.options.filter(ce=>ce.text.text.toLowerCase().includes(k.toLowerCase())).map((ce,we)=>(0,re.jsx)("div",{className:"h-7 px-6 flex items-center select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,onClick:()=>v(ce.value),children:(0,re.jsx)(N,{data:ce.text})},`${ee}-${we}`))]},ee)):g.map((w,ee)=>(0,re.jsx)("div",{className:"h-7 px-6 flex items-center select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,onClick:()=>v(w.value),children:(0,re.jsx)(N,{data:w.text})},ee))})}),(0,re.jsx)("input",{type:"text",value:k,onChange:w=>m(w.currentTarget.value),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select an item"}),!k&&(0,re.jsx)("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,re.jsx)(N,{data:i!=null?i:{type:"plain_text",text:"Pick an option"}})}),(0,re.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(w=>!w)},children:(0,re.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,re.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]}),f&&t&&(0,re.jsx)(ct,{data:t,onConfirm:L,onCancel:K})]})};var O1=require("react");var Ne=require("react/jsx-runtime"),kl=e=>{let{action_id:r,options:n,focus_on_load:t,initial_options:a,confirm:l}=e.data,[s,i]=(0,O1.useState)(a?a.map(I=>I.value):[]),u=(0,O1.useRef)(null),[o,k]=(0,O1.useState)(null),[m,c]=(0,O1.useState)(!1);(0,O1.useEffect)(()=>{var T;let I=(T=n[0])==null?void 0:T.value;t&&u.current&&I&&!s.includes(I)&&u.current.focus()},[t]);let p=(I,T)=>{i(T?[...s,I]:s.filter(g=>g!==I))},A=(I,T)=>{l?(k({value:I,checked:T}),c(!0)):p(I,T)},E=()=>{o&&p(o.value,o.checked),c(!1),k(null)},f=()=>{c(!1),k(null)};return(0,Ne.jsxs)(Ne.Fragment,{children:[(0,Ne.jsx)("div",{id:r,className:"my-1 flex w-full slack_blocks_to_jsx__checkboxes_element",children:(0,Ne.jsx)("fieldset",{className:"flex flex-col gap-2",children:n.map((I,T)=>{let{text:g,value:v,description:L}=I;return(0,Ne.jsxs)("label",{className:"flex cursor-pointer items-baseline gap-3 select-none",htmlFor:`checkboxes-${r}-value-${v}-${T}`,children:[(0,Ne.jsx)("div",{children:(0,Ne.jsx)("input",{type:"checkbox",ref:T===0?u:void 0,id:`checkboxes-${r}-value-${v}-${T}`,checked:s.includes(v),onChange:K=>{A(v,K.target.checked)}})}),(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)(N,{data:g}),L&&(0,Ne.jsx)(N,{className:"text-black-secondary dark:text-dark-text-secondary",data:L})]})]},T)})})}),m&&l&&(0,Ne.jsx)(ct,{data:l,onConfirm:E,onCancel:f})]})};var Vt=require("react");var b1=require("react/jsx-runtime"),cl=e=>{let{action_id:r,dispatch_action_config:n,focus_on_load:t,initial_value:a,max_length:l,min_length:s,multiline:i,placeholder:u}=e.data,[o,k]=(0,Vt.useState)(t!=null?t:!1),[m,c]=(0,Vt.useState)(a||"");return(0,Vt.useEffect)(()=>{let p=A=>{var f,I;let E=A.target;E.id!=="static_select_popup"&&E.id!=="static_select_dropdown_button"&&((f=E.parentElement)==null?void 0:f.id)!=="static_select_popup"&&((I=E.parentElement)==null?void 0:I.id)!=="static_select_dropdown_button"&&k(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),(0,b1.jsxs)("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__plain_text_input_element",tabIndex:0,children:[!m&&u&&(0,b1.jsx)("div",{className:"absolute left-2 top-2 text-black-primary.3 dark:text-dark-text-secondary",children:(0,b1.jsx)(N,{data:u})}),!m&&!u&&(0,b1.jsx)("div",{className:"absolute left-2 top-2 text-black-primary.3 dark:text-dark-text-secondary",children:(0,b1.jsx)(N,{data:{type:"plain_text",text:"Write something"}})}),(0,b1.jsx)("textarea",{value:m,onChange:p=>c(p.target.value),className:"w-full focus:outline-none rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary p-2",minLength:s,maxLength:l,style:{maxHeight:"200px",minHeight:"80px",height:"100px"},"aria-label":"Select an item"})]})};var mt=require("react");var ie=require("react/jsx-runtime"),ml=e=>{let{action_id:r,focus_on_load:n,placeholder:t,type:a,confirm:l,initial_user:s,people:i=[]}=e.data,[u,o]=(0,mt.useState)(n||!1),[k,m]=(0,mt.useState)(""),[c,p]=(0,mt.useState)("");(0,mt.useEffect)(()=>{let E=f=>{var T,g;let I=f.target;I.id!=="static_select_popup"&&I.id!=="static_select_dropdown_button"&&((T=I.parentElement)==null?void 0:T.id)!=="static_select_popup"&&((g=I.parentElement)==null?void 0:g.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]);let A=i.filter(E=>{let f=k.toLowerCase().trim();return f?E.name.toLowerCase().includes(f):!0},[]);return(0,ie.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__users_select_element",tabIndex:0,children:[u&&(0,ie.jsx)("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:(0,ie.jsx)("div",{className:"flex flex-col",children:A.map((E,f)=>(0,ie.jsxs)("button",{className:"h-7 px-6 flex group items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,type:"button",onClick:()=>{o(!1),p(E.id)},children:[E.image&&(0,ie.jsx)("img",{src:E.image,alt:E.name,className:"w-5 h-5 rounded-md overflow-hidden"}),!E.image&&(0,ie.jsx)("div",{className:"w-5 h-5 rounded-md overflow-hidden bg-gray-300 dark:bg-dark-text-high text-black-primary dark:text-dark-text-primary font-semibold flex items-center justify-center",children:(0,ie.jsx)("span",{children:E.name[0]||""})}),(0,ie.jsx)(N,{data:{type:"mrkdwn",text:`*${E.name}*`}}),(0,ie.jsxs)("div",{className:"relative",children:[E.online&&(0,ie.jsx)("div",{className:"bg-green-secondary w-[9px] h-[9px] rounded-full shrink-0"}),!E.online&&(0,ie.jsx)("div",{className:"w-[9px] h-[9px] rounded-full border-[1.5px] shrink-0 border-black-secondary group-hover:border-white-primary"}),E.sleeping&&(0,ie.jsx)("div",{className:"absolute -top-[5px] -right-[5px] h-[10px] w-[10px] rounded-full bg-white-secondary flex justify-center z-[10] text-[8px] leading-[8px] font-semibold group-hover:bg-blue-primary",children:"z"})]}),(0,ie.jsx)("div",{className:"text-black-primary dark:text-dark-text-primary group-hover:text-white-primary",children:E.name})]},f))})}),(0,ie.jsx)("input",{type:"text",value:k,onClick:()=>o(!0),onChange:E=>m(E.currentTarget.value),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select an item"}),!k&&(0,ie.jsx)("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,ie.jsx)(N,{data:t!=null?t:{type:"plain_text",text:"Pick an option"}})}),(0,ie.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(E=>!E)},children:(0,ie.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,ie.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var At=require("react");var pt=require("react/jsx-runtime"),pl=e=>{let{action_id:r,initial_date:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=(0,At.useState)(n||""),i=(0,At.useRef)(null);return(0,At.useEffect)(()=>{t&&i.current&&i.current.focus()},[t]),(0,pt.jsxs)("div",{id:r,className:"relative text-small w-[190px] slack_blocks_to_jsx__date_picker_element",children:[!l&&a&&(0,pt.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,pt.jsx)(N,{data:a})}),(0,pt.jsx)("input",{ref:i,type:"date",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a date"})]})};var ft=require("react");var Et=require("react/jsx-runtime"),Al=e=>{let{action_id:r,initial_time:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=(0,ft.useState)(n||""),i=(0,ft.useRef)(null);return(0,ft.useEffect)(()=>{t&&i.current&&i.current.focus()},[t]),(0,Et.jsxs)("div",{id:r,className:"relative text-small w-[190px] slack_blocks_to_jsx__time_picker_element",children:[!l&&a&&(0,Et.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,Et.jsx)(N,{data:a})}),(0,Et.jsx)("input",{ref:i,type:"time",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a time"})]})};var Q1=require("react"),jt=require("react/jsx-runtime"),O_=e=>{if(!e)return{date:"",time:""};let r=new Date(e*1e3),n=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),a=String(r.getDate()).padStart(2,"0"),l=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0");return{date:`${n}-${t}-${a}`,time:`${l}:${s}`}},El=e=>{let{action_id:r,initial_date_time:n,focus_on_load:t}=e.data,a=O_(n),[l,s]=(0,Q1.useState)(a.date),[i,u]=(0,Q1.useState)(a.time),o=(0,Q1.useRef)(null);return(0,Q1.useEffect)(()=>{t&&o.current&&o.current.focus()},[t]),(0,jt.jsxs)("div",{id:r,className:"flex items-center gap-2 text-small slack_blocks_to_jsx__datetime_picker_element",children:[(0,jt.jsx)("input",{ref:o,type:"date",value:l,onChange:k=>s(k.target.value),className:"py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a date"}),(0,jt.jsx)("input",{type:"time",value:i,onChange:k=>u(k.target.value),className:"py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a time"})]})};var It=require("react");var x1=require("react/jsx-runtime"),fl=e=>{let{action_id:r,initial_value:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=(0,It.useState)(n||""),i=(0,It.useRef)(null);return(0,It.useEffect)(()=>{t&&i.current&&i.current.focus()},[t]),(0,x1.jsxs)("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__email_input_element",children:[!l&&a&&(0,x1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,x1.jsx)(N,{data:a})}),!l&&!a&&(0,x1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,x1.jsx)(N,{data:{type:"plain_text",text:"Enter an email address"}})}),(0,x1.jsx)("input",{ref:i,type:"email",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter an email address"})]})};var yt=require("react");var L1=require("react/jsx-runtime"),Il=e=>{let{action_id:r,initial_value:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=(0,yt.useState)(n||""),i=(0,yt.useRef)(null);return(0,yt.useEffect)(()=>{t&&i.current&&i.current.focus()},[t]),(0,L1.jsxs)("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__url_input_element",children:[!l&&a&&(0,L1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,L1.jsx)(N,{data:a})}),!l&&!a&&(0,L1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,L1.jsx)(N,{data:{type:"plain_text",text:"Enter a URL"}})}),(0,L1.jsx)("input",{ref:i,type:"url",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter a URL"})]})};var Tt=require("react");var D1=require("react/jsx-runtime"),yl=e=>{let{action_id:r,is_decimal_allowed:n,initial_value:t,min_value:a,max_value:l,focus_on_load:s,placeholder:i}=e.data,[u,o]=(0,Tt.useState)(t||""),k=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{s&&k.current&&k.current.focus()},[s]),(0,D1.jsxs)("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__number_input_element",children:[!u&&i&&(0,D1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,D1.jsx)(N,{data:i})}),!u&&!i&&(0,D1.jsx)("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,D1.jsx)(N,{data:{type:"plain_text",text:"Enter a number"}})}),(0,D1.jsx)("input",{ref:k,type:"number",value:u,onChange:m=>o(m.target.value),step:n?"any":"1",min:a,max:l,className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter a number"})]})};var ht=require("react");var Xe=require("react/jsx-runtime"),Tl=e=>{let{action_id:r,options:n,initial_option:t,focus_on_load:a}=e.data,[l,s]=(0,ht.useState)((t==null?void 0:t.value)||""),i=(0,ht.useRef)(null);return(0,ht.useEffect)(()=>{a&&i.current&&i.current.focus()},[a]),(0,Xe.jsx)("div",{id:r,className:"my-1 flex w-full slack_blocks_to_jsx__radio_buttons_element",children:(0,Xe.jsx)("fieldset",{className:"flex flex-col gap-2",children:n.map((u,o)=>{let{text:k,value:m,description:c}=u;return(0,Xe.jsxs)("label",{className:"flex cursor-pointer items-baseline gap-3 select-none",htmlFor:`radio-${r}-value-${m}-${o}`,children:[(0,Xe.jsx)("div",{children:(0,Xe.jsx)("input",{type:"radio",ref:o===0?i:void 0,id:`radio-${r}-value-${m}-${o}`,name:r,checked:l===m,onChange:()=>s(m)})}),(0,Xe.jsxs)("div",{children:[(0,Xe.jsx)(N,{data:k}),c&&(0,Xe.jsx)(N,{className:"text-black-secondary dark:text-dark-text-secondary",data:c})]})]},o)})})})};var ra=require("react");var Le=require("react/jsx-runtime"),hl=e=>{let{action_id:r,options:n}=e.data,[t,a]=(0,ra.useState)(!1);return(0,ra.useEffect)(()=>{let l=s=>{var u,o;let i=s.target;i.id!==`overflow_menu_popup_${r}`&&i.id!==`overflow_menu_button_${r}`&&((u=i.parentElement)==null?void 0:u.id)!==`overflow_menu_popup_${r}`&&((o=i.parentElement)==null?void 0:o.id)!==`overflow_menu_button_${r}`&&a(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[r]),(0,Le.jsxs)("div",{id:r,className:"relative inline-flex slack_blocks_to_jsx__overflow_menu_element",children:[(0,Le.jsx)("button",{type:"button",id:`overflow_menu_button_${r}`,className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",onClick:()=>a(l=>!l),"aria-label":"More options",children:(0,Le.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",className:"w-4 h-4",children:[(0,Le.jsx)("circle",{cx:"8",cy:"3",r:"1.5"}),(0,Le.jsx)("circle",{cx:"8",cy:"8",r:"1.5"}),(0,Le.jsx)("circle",{cx:"8",cy:"13",r:"1.5"})]})}),t&&(0,Le.jsx)("div",{id:`overflow_menu_popup_${r}`,className:"absolute top-[30px] right-0 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[200px] max-h-[240px] overflow-auto py-1 z-20",children:(0,Le.jsx)("div",{className:"flex flex-col",children:n.slice(0,5).map((l,s)=>(0,Le.jsx)("div",{className:"h-7 px-4 flex items-center select-none cursor-pointer text-small hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link text-black-primary dark:text-dark-text-primary",tabIndex:0,onClick:()=>{a(!1),l.url&&window.open(l.url,"_blank")},children:(0,Le.jsx)(N,{data:l.text})},s))})})]})};var l1=require("react/jsx-runtime"),Nl=e=>{let{action_id:r,placeholder:n}=e.data;return(0,l1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__external_select_element",tabIndex:0,children:[(0,l1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,l1.jsx)(N,{data:n!=null?n:{type:"plain_text",text:"Pick an option"}})}),(0,l1.jsx)("div",{className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",children:(0,l1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,l1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}),(0,l1.jsx)("div",{className:"absolute -bottom-5 left-0 text-[10px] text-black-secondary dark:text-dark-text-secondary",children:"Requires external data source"})]})};var la=require("react");var w1=require("react/jsx-runtime"),gl=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=(0,la.useState)(n||!1);return(0,la.useEffect)(()=>{let s=i=>{var o,k;let u=i.target;u.id!=="static_select_popup"&&u.id!=="static_select_dropdown_button"&&((o=u.parentElement)==null?void 0:o.id)!=="static_select_popup"&&((k=u.parentElement)==null?void 0:k.id)!=="static_select_dropdown_button"&&l(!1)};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[]),(0,w1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__conversations_select_element",tabIndex:0,children:[(0,w1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,w1.jsx)(N,{data:t!=null?t:{type:"plain_text",text:"Select a conversation"}})}),(0,w1.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{l(s=>!s)},children:(0,w1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,w1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var sa=require("react");var M1=require("react/jsx-runtime"),dl=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=(0,sa.useState)(n||!1);return(0,sa.useEffect)(()=>{let s=i=>{var o,k;let u=i.target;u.id!=="static_select_popup"&&u.id!=="static_select_dropdown_button"&&((o=u.parentElement)==null?void 0:o.id)!=="static_select_popup"&&((k=u.parentElement)==null?void 0:k.id)!=="static_select_dropdown_button"&&l(!1)};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[]),(0,M1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__channels_select_element",tabIndex:0,children:[(0,M1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,M1.jsx)(N,{data:t!=null?t:{type:"plain_text",text:"Select a channel"}})}),(0,M1.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{l(s=>!s)},children:(0,M1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,M1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var Nt=require("react");var Te=require("react/jsx-runtime"),vl=e=>{let{action_id:r,options:n,option_groups:t,initial_options:a,focus_on_load:l,placeholder:s,max_selected_items:i}=e.data,[u,o]=(0,Nt.useState)(l!=null?l:!1),[k,m]=(0,Nt.useState)(a?a.map(I=>I.value):[]),[c,p]=(0,Nt.useState)("");(0,Nt.useEffect)(()=>{let I=T=>{var v,L;let g=T.target;g.id!=="static_select_popup"&&g.id!=="static_select_dropdown_button"&&((v=g.parentElement)==null?void 0:v.id)!=="static_select_popup"&&((L=g.parentElement)==null?void 0:L.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]);let E=(t?t.flatMap(I=>I.options):n).filter(I=>I.text.text.toLowerCase().includes(c.toLowerCase())),f=I=>{if(k.includes(I))m(k.filter(T=>T!==I));else{if(i&&k.length>=i)return;m([...k,I])}};return(0,Te.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_static_select_element",tabIndex:0,children:[u&&(0,Te.jsx)("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:(0,Te.jsx)("div",{className:"flex flex-col",children:E.map((I,T)=>(0,Te.jsxs)("label",{className:"h-7 px-6 flex items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,children:[(0,Te.jsx)("input",{type:"checkbox",checked:k.includes(I.value),onChange:()=>f(I.value),className:"shrink-0"}),(0,Te.jsx)(N,{data:I.text})]},T))})}),(0,Te.jsx)("input",{type:"text",value:c,onChange:I=>p(I.currentTarget.value),onClick:()=>o(!0),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select items"}),!c&&(0,Te.jsx)("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:k.length>0?(0,Te.jsxs)("span",{className:"text-black-primary dark:text-dark-text-primary",children:[k.length," selected"]}):(0,Te.jsx)(N,{data:s!=null?s:{type:"plain_text",text:"Select options"}})}),(0,Te.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(I=>!I)},children:(0,Te.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,Te.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var s1=require("react/jsx-runtime"),Rl=e=>{let{action_id:r,placeholder:n}=e.data;return(0,s1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_external_select_element",tabIndex:0,children:[(0,s1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:(0,s1.jsx)(N,{data:n!=null?n:{type:"plain_text",text:"Select options"}})}),(0,s1.jsx)("div",{className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",children:(0,s1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,s1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}),(0,s1.jsx)("div",{className:"absolute -bottom-5 left-0 text-[10px] text-black-secondary dark:text-dark-text-secondary",children:"External data source"})]})};var i1=require("react/jsx-runtime"),Sl=e=>{let{action_id:r,placeholder:n,initial_users:t}=e.data;return(0,i1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_users_select_element",tabIndex:0,children:[(0,i1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?(0,i1.jsxs)("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):(0,i1.jsx)(N,{data:n!=null?n:{type:"plain_text",text:"Select users"}})}),(0,i1.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:(0,i1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,i1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var u1=require("react/jsx-runtime"),Ol=e=>{let{action_id:r,placeholder:n,initial_conversations:t}=e.data;return(0,u1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_conversations_select_element",tabIndex:0,children:[(0,u1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?(0,u1.jsxs)("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):(0,u1.jsx)(N,{data:n!=null?n:{type:"plain_text",text:"Select conversations"}})}),(0,u1.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:(0,u1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,u1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var _1=require("react/jsx-runtime"),bl=e=>{let{action_id:r,placeholder:n,initial_channels:t}=e.data;return(0,_1.jsxs)("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_channels_select_element",tabIndex:0,children:[(0,_1.jsx)("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?(0,_1.jsxs)("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):(0,_1.jsx)(N,{data:n!=null?n:{type:"plain_text",text:"Select channels"}})}),(0,_1.jsx)("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:(0,_1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:(0,_1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};var o1=require("react/jsx-runtime"),xl=e=>{let{action_id:r,positive_button:n,negative_button:t}=e.data;return(0,o1.jsxs)("div",{id:r,className:"flex items-center gap-1 slack_blocks_to_jsx__feedback_buttons_element",children:[(0,o1.jsx)("button",{type:"button","aria-label":n.accessibility_label||"Positive feedback",className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-green-50 dark:hover:bg-dark-bg-secondary",children:(0,o1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:(0,o1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V3a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z"})})}),(0,o1.jsx)("button",{type:"button","aria-label":t.accessibility_label||"Negative feedback",className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-red-50 dark:hover:bg-dark-bg-secondary",children:(0,o1.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:(0,o1.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54"})})})]})};var gt=require("react/jsx-runtime"),Ll=e=>{let{action_id:r,icon:n,text:t,accessibility_label:a}=e.data;return(0,gt.jsxs)("button",{type:"button",id:r,"aria-label":a||t.text,title:t.text,className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary slack_blocks_to_jsx__icon_button_element",children:[n==="trash"&&(0,gt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:(0,gt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})}),n!=="trash"&&(0,gt.jsx)("span",{className:"text-xs font-medium",children:n})]})};var B1=require("react/jsx-runtime"),Dl=e=>{let{action_id:r,filetypes:n,max_files:t}=e.data;return(0,B1.jsxs)("div",{id:r,className:"flex flex-col gap-2 text-small w-full slack_blocks_to_jsx__file_input_element",children:[(0,B1.jsx)("div",{className:"flex items-center justify-center w-full h-[80px] rounded border-2 border-dashed border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary",children:(0,B1.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,B1.jsx)("button",{type:"button",className:"px-3 py-1 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary text-small font-medium hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",children:"Choose file"}),t&&(0,B1.jsxs)("span",{className:"text-[10px] text-black-secondary dark:text-dark-text-secondary",children:["Max ",t," file",t>1?"s":""]})]})}),n&&n.length>0&&(0,B1.jsxs)("div",{className:"text-[11px] text-black-secondary dark:text-dark-text-secondary",children:["Accepted: ",n.join(", ")]})]})};var dt=require("react");var H1=require("react/jsx-runtime"),wl=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=(0,dt.useState)(""),s=(0,dt.useRef)(null);return(0,dt.useEffect)(()=>{n&&s.current&&s.current.focus()},[n]),(0,H1.jsxs)("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__rich_text_input_element",children:[!a&&t&&(0,H1.jsx)("div",{className:"absolute left-2 top-2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,H1.jsx)(N,{data:t})}),!a&&!t&&(0,H1.jsx)("div",{className:"absolute left-2 top-2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:(0,H1.jsx)(N,{data:{type:"plain_text",text:"Write something..."}})}),(0,H1.jsx)("div",{ref:s,contentEditable:!0,suppressContentEditableWarning:!0,onInput:i=>l(i.target.textContent||""),className:"w-full focus:outline-none rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary p-2",style:{maxHeight:"200px",minHeight:"80px",overflowY:"auto"},role:"textbox","aria-label":"Rich text editor"})]})};var Bl=require("react/jsx-runtime"),Ml=e=>{let{url:r,text:n}=e.data;return(0,Bl.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-blue-primary dark:text-dark-link hover:underline text-small slack_blocks_to_jsx__url_source_element",children:n})};var $a=require("react/jsx-runtime"),Hl=e=>{let{text:r,action_id:n,style:t,accessibility_label:a}=e.data;return(0,$a.jsx)("button",{type:"button",id:n,"aria-label":a,className:Y(["px-2 pt-0 pb-[1px] text-small h-[28px] min-w-[56px] border rounded whitespace-nowrap font-semibold","slack_blocks_to_jsx__workflow_button_element",t==="primary"?"bg-green-primary text-white-primary":t==="danger"?"bg-red-primary text-white-primary":"border-black-primary.3 text-black-primary dark:border-dark-border dark:text-dark-text-primary"]),children:(0,$a.jsx)(N,{data:r})})};var Yt=require("react/jsx-runtime"),Cl=e=>{let{elements:r,block_id:n}=e.data;return(0,Yt.jsx)("div",{id:n,className:"my-1 text-primary flex w-full text-black-primary dark:text-dark-text-primary flex-wrap items-center overflow-hidden slack_blocks_to_jsx__context",children:r.slice(0,10).map((t,a)=>t.type!=="image"?(0,Yt.jsx)("div",{className:"text-black-secondary dark:text-dark-text-secondary text-small pr-3 flex items-center",children:(0,Yt.jsx)(N,{data:t})},a):(0,Yt.jsx)(aa,{inside:"context",data:t},a))})};var ia=require("react/jsx-runtime"),Fl=e=>{let{elements:r,block_id:n}=e.data;return(0,ia.jsx)("div",{id:n,className:"my-1 text-primary flex w-full text-black-primary dark:text-dark-text-primary items-center slack_blocks_to_jsx__context_actions",children:(0,ia.jsx)("div",{className:"flex flex-wrap",children:r.slice(0,5).map((t,a)=>(0,ia.jsx)("div",{className:"mt-2 mr-2",children:m1(t)},a))})})};var k1=require("react");var R=require("react/jsx-runtime"),Gl=["rgb(191, 77, 26)","rgb(38, 59, 156)","rgb(16, 111, 77)","rgb(217, 76, 117)"],ql=e=>Gl[e%Gl.length],Xa=(e,r,n)=>Math.max(r,Math.min(n,e)),ne=e=>Math.round(e*100)/100,Kl=(e,r)=>{let n=Math.floor(Math.log10(e||1)),t=e/Math.pow(10,n),a;return r?t<1.5?a=1:t<3?a=2:t<7?a=5:a=10:t<=1?a=1:t<=2?a=2:t<=5?a=5:a=10,a*Math.pow(10,n)},b_=(e,r,n=5)=>{if(!isFinite(e)||!isFinite(r))return[0,1];if(e===r){if(e===0)return[0,1];e=Math.min(0,e),r=Math.max(0,r)}let t=Kl(r-e,!1),a=Kl(t/Math.max(1,n-1),!0),l=Math.floor(e/a)*a,s=Math.ceil(r/a)*a,i=[];for(let u=l;u<=s+a*.5;u+=a)i.push(Math.round(u*1e6)/1e6);return i},Wl=e=>String(Math.round(e*100)/100),x_=e=>{if(e===0)return"0";let r=Math.abs(e);return r>=1e6?Wl(e/1e6)+"M":r>=1e4?Wl(e/1e3)+"k":e.toLocaleString("en-US")},Xl=e=>e.toLocaleString("en-US"),zl=(e,r)=>e.length===0?"":e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}${r?",":""} and ${e[e.length-1]}`,L_=e=>{let r=e.length;if(r===0)return"";if(r===1)return`M ${ne(e[0][0])} ${ne(e[0][1])}`;if(r===2)return`M ${ne(e[0][0])} ${ne(e[0][1])} L ${ne(e[1][0])} ${ne(e[1][1])}`;let n=e.map(u=>u[0]),t=e.map(u=>u[1]),a=[],l=[];for(let u=0;u<r-1;u++)a[u]=n[u+1]-n[u],l[u]=a[u]===0?0:(t[u+1]-t[u])/a[u];let s=new Array(r);s[0]=l[0],s[r-1]=l[r-2];for(let u=1;u<r-1;u++)l[u-1]*l[u]<=0?s[u]=0:s[u]=(l[u-1]+l[u])/2;for(let u=0;u<r-1;u++){if(l[u]===0){s[u]=0,s[u+1]=0;continue}let o=s[u]/l[u],k=s[u+1]/l[u],m=Math.hypot(o,k);if(m>3){let c=3/m;s[u]=c*o*l[u],s[u+1]=c*k*l[u]}}let i=[`M ${ne(n[0])} ${ne(t[0])}`];for(let u=0;u<r-1;u++){let o=n[u]+a[u]/3,k=t[u]+s[u]*a[u]/3,m=n[u+1]-a[u]/3,c=t[u+1]-s[u+1]*a[u]/3;i.push(`C ${ne(o)} ${ne(k)} ${ne(m)} ${ne(c)} ${ne(n[u+1])} ${ne(t[u+1])}`)}return i.join(" ")},D_=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e,w_=(e,r,n)=>{if(typeof document=="undefined")return;let t=[r,...n].map(i=>i.map(D_).join(",")).join(`
|
|
15
15
|
`),a=new Blob([t],{type:"text/csv;charset=utf-8"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(l)},M_=e=>{var l,s;let r=e.series||[],n=e.axis_config||{},t=n.categories&&n.categories.length>0?n.categories.slice():[];if(t.length===0){let i;for(let u of r)(!i||(((l=u.data)==null?void 0:l.length)||0)>(((s=i.data)==null?void 0:s.length)||0))&&(i=u);t=((i==null?void 0:i.data)||[]).map(u=>u.label)}let a=r.map((i,u)=>{var m;let o=new Map;(i.data||[]).forEach(c=>o.set(c.label,c.value));let k=t.map((c,p)=>{if(o.has(c))return o.get(c);let A=(i.data||[])[p];return A?A.value:null});return{name:(m=i.name)!=null?m:`Series ${u+1}`,color:ql(u),values:k}});return{categories:t,series:a,xLabel:n.x_label,yLabel:n.y_label}},B_=e=>{let r=(e.segments||[]).filter(a=>typeof a.value=="number"),n=r.reduce((a,l)=>a+Math.max(0,l.value),0);return{segments:r.map((a,l)=>({label:a.label,value:a.value,color:ql(l),pct:n>0?Math.round(Math.max(0,a.value)/n*100):0})),total:n}},Jl=e=>(0,R.jsxs)("div",{className:"absolute z-20 pointer-events-none whitespace-nowrap rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary px-3 py-2 text-small shadow-lg slack_blocks_to_jsx__data_visualization_tooltip",style:{left:e.left,top:e.top,transform:`translate(${e.flip?"calc(-100% - 12px)":"12px"}, -50%)`},children:[e.header&&(0,R.jsx)("div",{className:"mb-1 font-medium text-black-primary dark:text-dark-text-primary",children:e.header}),(0,R.jsx)("div",{className:"flex flex-col gap-1",children:e.rows.map((r,n)=>(0,R.jsxs)("div",{className:"flex items-center justify-between gap-6",children:[(0,R.jsxs)("span",{className:"flex items-center gap-2",children:[(0,R.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:r.color}}),(0,R.jsx)("span",{className:"text-black-secondary dark:text-dark-text-secondary",children:r.name})]}),(0,R.jsx)("span",{className:"font-semibold tabular-nums text-black-primary dark:text-dark-text-primary",children:r.value})]},n))})]}),ua=520,qa=300,_a={top:14,right:16,bottom:48,left:60},Vl=e=>(0,R.jsx)("path",{d:e.d,fill:"none",stroke:e.color,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),H_=e=>{let{model:r,type:n,ariaLabel:t}=e,{categories:a,series:l,xLabel:s,yLabel:i}=r,u=(0,k1.useRef)(null),[o,k]=(0,k1.useState)(null),m=(0,k1.useMemo)(()=>{let b=_a.left,h=ua-_a.right,O=_a.top,G=qa-_a.bottom,F=h-b,$=G-O,U=[];l.forEach(Ke=>Ke.values.forEach(We=>We!=null&&U.push(We)));let ge=U.length?Math.min(...U):0,F1=U.length?Math.max(...U):1;n!=="line"?(ge=Math.min(0,ge),F1=Math.max(0,F1)):ge<0&&(F1=Math.max(0,F1));let qt=b_(ge,F1,5),Xt=qt[0],pa=qt[qt.length-1],vs=pa-Xt||1,Aa=Ke=>O+(1-(Ke-Xt)/vs)*$,xt=a.length,er=Ke=>xt<=1?b+F/2:b+Ke/(xt-1)*F,Ea=xt>0?F/xt:F,Rs=Ke=>b+(Ke+.5)*Ea,fa=Aa(Math.min(Math.max(0,Xt),pa)),Ss=Xt<0&&pa>0,Ia=Ea*.7,Os=l.length>0?Ia/l.length:Ia,bs=l.map(Ke=>{let We=[];Ke.values.forEach((nr,Ls)=>{nr!=null&&We.push([er(Ls),Aa(nr)])});let tr=We.length>0?L_(We):"",xs=We.length>0?`${tr} L ${ne(We[We.length-1][0])} ${ne(fa)} L ${ne(We[0][0])} ${ne(fa)} Z`:"";return{color:Ke.color,line:tr,area:xs}});return{plotLeft:b,plotRight:h,plotTop:O,plotBottom:G,plotW:F,ticks:qt,yOf:Aa,count:xt,xPoint:er,bandWidth:Ea,xBand:Rs,baselineY:fa,showZeroLine:Ss,groupWidth:Ia,barWidth:Os,seriesPaths:bs}},[r,n]),{plotLeft:c,plotRight:p,plotTop:A,plotBottom:E,plotW:f,ticks:I,yOf:T,count:g,xPoint:v,bandWidth:L,xBand:K,baselineY:w,showZeroLine:ee,groupWidth:ce,barWidth:we,seriesPaths:C}=m,_e=b=>{let h=u.current;if(!h||g===0)return;let O=h.getBoundingClientRect();if(O.width===0)return;let G=b.clientX-O.left,F=Xa(b.clientY-O.top,44,Math.max(44,O.height-44)),$=G/O.width*ua,U=n==="bar"?Math.floor(($-c)/L):g<=1?0:Math.round(($-c)/(f/(g-1)));U=Xa(U,0,g-1),k({index:U,x:G,y:F})},Z=o?n==="bar"?K(o.index):v(o.index):null,me=Z!=null?Z/ua*100:0,te=me>58;return(0,R.jsxs)("div",{ref:u,className:"relative slack_blocks_to_jsx__data_visualization_plot",onPointerMove:_e,onPointerDown:_e,onPointerLeave:()=>k(null),children:[(0,R.jsxs)("svg",{viewBox:`0 0 ${ua} ${qa}`,role:"img","aria-label":t,preserveAspectRatio:"xMidYMid meet",className:"w-full h-auto text-black-secondary dark:text-dark-text-max slack_blocks_to_jsx__data_visualization_chart",style:{fontFamily:"Lato, Slack-Lato, sans-serif"},children:[I.map((b,h)=>{let O=T(b);return(0,R.jsxs)("g",{children:[(0,R.jsx)("line",{x1:c,y1:O,x2:p,y2:O,stroke:"currentColor",strokeOpacity:b===0&&ee?.45:.16}),(0,R.jsx)("text",{x:c-8,y:O,textAnchor:"end",dominantBaseline:"central",fill:"currentColor",fontSize:11,children:x_(b)})]},`grid-${h}`)}),n==="area"&&C.map((b,h)=>b.area?(0,R.jsxs)("g",{children:[(0,R.jsx)("path",{d:b.area,fill:b.color,fillOpacity:.22}),(0,R.jsx)(Vl,{d:b.line,color:b.color})]},`area-${h}`):null),n==="line"&&C.map((b,h)=>b.line?(0,R.jsx)(Vl,{d:b.line,color:b.color},`line-${h}`):null),n==="bar"&&l.map((b,h)=>(0,R.jsx)("g",{children:b.values.map((O,G)=>{if(O==null)return null;let $=K(G)-ce/2+h*we,U=T(O),ge=Math.min(U,w),F1=Math.max(1,Math.abs(U-w));return(0,R.jsx)("rect",{x:$,y:ge,width:Math.max(1,we-1),height:F1,rx:2,fill:b.color},G)})},`bar-${h}`)),a.map((b,h)=>(0,R.jsx)("text",{x:n==="bar"?K(h):v(h),y:E+16,textAnchor:"middle",fill:"currentColor",fontSize:11,children:b},`x-${h}`)),s&&(0,R.jsx)("text",{x:(c+p)/2,y:qa-6,textAnchor:"middle",fill:"currentColor",fontSize:12,children:s}),i&&(0,R.jsx)("text",{transform:`translate(14 ${(A+E)/2}) rotate(-90)`,textAnchor:"middle",fill:"currentColor",fontSize:12,children:i}),Z!=null&&(0,R.jsx)("line",{x1:Z,y1:A,x2:Z,y2:E,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4",strokeOpacity:.7}),o&&n!=="bar"&&l.map((b,h)=>{let O=b.values[o.index];return O==null?null:(0,R.jsx)("circle",{cx:v(o.index),cy:T(O),r:4,style:{fill:b.color},strokeWidth:1.5,className:"stroke-white-primary dark:stroke-dark-bg-secondary"},`dot-${h}`)})]}),o&&(0,R.jsx)(Jl,{left:`${me}%`,top:o.y,flip:te,header:a[o.index],rows:l.map(b=>({name:b.name,value:b.values[o.index]==null?"\u2014":Xl(b.values[o.index]),color:b.color}))})]})},jl=(e,r,n,t)=>{let a=(t-90)*Math.PI/180;return[e+n*Math.cos(a),r+n*Math.sin(a)]},C_=(e,r,n,t,a)=>{let[l,s]=jl(e,r,n,t),[i,u]=jl(e,r,n,a),o=a-t>180?1:0;return`M ${ne(e)} ${ne(r)} L ${ne(l)} ${ne(s)} A ${n} ${n} 0 ${o} 1 ${ne(i)} ${ne(u)} Z`},Yl=110,Ql=110,$l=92,F_=e=>{var A,E;let{model:r,ariaLabel:n}=e,t=(0,k1.useRef)(null),[a,l]=(0,k1.useState)(null),s=r.segments.filter(f=>Math.max(0,f.value)>0);if(s.length===0||r.total<=0)return null;let i=0,u=s.map((f,I)=>{let T=Math.max(0,f.value)/r.total,g=i,v=i+T*360;return i=v,{seg:f,index:I,start:g,end:v,full:T>=.999}}),o=(f,I)=>{let T=t.current;if(!T)return;let g=T.getBoundingClientRect(),v=I.clientX-g.left,L=Xa(I.clientY-g.top,18,Math.max(18,g.height-18));l({seg:f,x:v,y:L})},k=a?[...u.filter(f=>f.index!==a.seg),u.find(f=>f.index===a.seg)]:u,m=a?u.find(f=>f.index===a.seg):void 0,c=(E=(A=t.current)==null?void 0:A.clientWidth)!=null?E:200,p=a?a.x>c*.58:!1;return(0,R.jsxs)("div",{ref:t,className:"relative inline-block",onPointerLeave:()=>l(null),children:[(0,R.jsx)("svg",{viewBox:"0 0 220 220",role:"img","aria-label":n,preserveAspectRatio:"xMidYMid meet",className:"w-[200px] h-[200px] max-w-full text-white-primary dark:text-dark-bg-secondary slack_blocks_to_jsx__data_visualization_chart",children:k.map(f=>{let I=a&&a.seg===f.index?$l*1.07:$l,T={onPointerEnter:g=>o(f.index,g),onPointerMove:g=>o(f.index,g)};return f.full?(0,R.jsx)("circle",S({cx:Yl,cy:Ql,r:I,style:{fill:f.seg.color},stroke:"currentColor",strokeWidth:2},T),f.index):(0,R.jsx)("path",S({d:C_(Yl,Ql,I,f.start,f.end),style:{fill:f.seg.color},stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"},T),f.index)})}),a&&m&&(0,R.jsx)(Jl,{left:`${a.x}px`,top:a.y,flip:p,rows:[{name:m.seg.label,value:Xl(m.seg.value),color:m.seg.color}]})]})},G_=e=>e.items.length===0?null:(0,R.jsx)("div",{"aria-hidden":"true",className:"mt-2 flex flex-wrap items-center justify-center gap-x-4 gap-y-1 slack_blocks_to_jsx__data_visualization_legend",children:e.items.map((r,n)=>(0,R.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-small text-black-secondary dark:text-dark-text-secondary",children:[(0,R.jsx)("span",{className:"inline-block w-2.5 h-2.5 rounded-sm shrink-0 slack_blocks_to_jsx__data_visualization_swatch",style:{backgroundColor:r.color}}),r.name]},n))}),K_=e=>(0,R.jsx)("div",{className:"overflow-x-auto slack_blocks_to_jsx__data_visualization_table",children:(0,R.jsxs)("table",{className:"border-collapse text-small",children:[(0,R.jsx)("thead",{children:(0,R.jsx)("tr",{children:e.header.map((r,n)=>(0,R.jsx)("th",{className:"px-2.5 py-1.5 text-left font-semibold border-b border-gray-200 dark:border-dark-border whitespace-nowrap",children:r},n))})}),(0,R.jsx)("tbody",{children:e.rows.map((r,n)=>(0,R.jsx)("tr",{children:r.map((t,a)=>(0,R.jsx)("td",{className:"px-2.5 py-1.5 border-b border-gray-100 dark:border-dark-border/60 whitespace-nowrap",children:t},a))},n))})]})}),W_=()=>(0,R.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"w-4 h-4",children:[(0,R.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),(0,R.jsx)("path",{d:"M2 6.5h12M6.5 6.5V13",stroke:"currentColor",strokeWidth:"1.3"})]}),z_=()=>(0,R.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"w-4 h-4",children:[(0,R.jsx)("path",{d:"M8 2.5v7m0 0 2.5-2.5M8 9.5 5.5 7",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,R.jsx)("path",{d:"M3 11v1.5A1.5 1.5 0 0 0 4.5 14h7a1.5 1.5 0 0 0 1.5-1.5V11",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),Zl=e=>{let{title:r,chart:n,block_id:t}=e.data,[a,l]=(0,k1.useState)(!1);if(!n||!n.type)return null;let s=null,i=[],u=[],o=[];if(n.type==="pie"){let k=B_(n);if(k.segments.length===0)return null;let m=`Pie chart${r?`: ${r}`:""}, with ${k.segments.length} segment${k.segments.length===1?"":"s"}. Segments: ${zl(k.segments.map(c=>`${c.label} (${c.pct}%)`),!0)}.`;s=(0,R.jsx)("div",{className:"flex flex-col items-center",children:(0,R.jsx)(F_,{model:k,ariaLabel:m})}),i=k.segments.map(c=>({name:`${c.label} \xB7 ${c.pct}%`,color:c.color})),u=["Segment","Value","Percent"],o=k.segments.map(c=>[c.label,String(c.value),`${c.pct}%`])}else{let k=M_(n);if(k.series.length===0||k.categories.length===0)return null;let m=n.type==="line"?"Line":n.type==="bar"?"Bar":"Area",c=k.series.map(E=>E.name),p=k.xLabel&&k.yLabel?` The X axis is ${k.xLabel}, the Y axis is ${k.yLabel}.`:"",A=`${m} chart${r?`: ${r}`:""}.${p} There ${c.length===1?"is":"are"} ${c.length} series: ${zl(c,!1)}.`;s=(0,R.jsx)(H_,{model:k,type:n.type,ariaLabel:A}),i=k.series.map(E=>({name:E.name,color:E.color})),u=[k.xLabel||"",...k.series.map(E=>E.name)],o=k.categories.map((E,f)=>[E,...k.series.map(I=>{let T=I.values[f];return T==null?"":String(T)})])}return(0,R.jsxs)("div",{id:t,className:"my-2 w-full max-w-[540px] rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary px-3 py-2.5 slack_blocks_to_jsx__data_visualization",children:[(0,R.jsxs)("div",{className:"flex items-start gap-2",children:[r&&(0,R.jsx)("h3",{className:"flex-1 min-w-0 m-0 text-header font-semibold leading-snug text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__data_visualization_title",children:r}),(0,R.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0 ml-auto",role:"group",children:[(0,R.jsx)("button",{type:"button","aria-label":"View as table","aria-pressed":a,onClick:()=>l(k=>!k),className:`p-1 rounded text-black-secondary dark:text-dark-text-secondary hover:bg-black-primary/[0.06] dark:hover:bg-white-primary/[0.08] slack_blocks_to_jsx__data_visualization_action ${a?"bg-black-primary/[0.08] dark:bg-white-primary/[0.1]":""}`,children:(0,R.jsx)(W_,{})}),(0,R.jsx)("button",{type:"button","aria-label":"Download chart data",onClick:()=>w_(`${r||"chart"}.csv`,u,o),className:"p-1 rounded text-black-secondary dark:text-dark-text-secondary hover:bg-black-primary/[0.06] dark:hover:bg-white-primary/[0.08] slack_blocks_to_jsx__data_visualization_action",children:(0,R.jsx)(z_,{})})]})]}),(0,R.jsx)("div",{className:"mt-1.5",children:a?(0,R.jsx)(K_,{header:u,rows:o}):(0,R.jsxs)(R.Fragment,{children:[s,(0,R.jsx)(G_,{items:i})]})})]})};var Pl=require("react/jsx-runtime"),Ul=e=>{let{data:r}=e,{block_id:n}=r;return(0,Pl.jsx)("div",{id:n,className:"border-b border-gray-primary dark:border-dark-border border-solid w-full mt-1 mb-2 slack_blocks_to_jsx__divider"})};var es=e=>{let{type:r}=e.data;return null};var oa=require("react/jsx-runtime"),V_={1:"text-[28px] leading-[1.2]",2:"text-[22px] leading-[1.27]",3:"text-header",4:"text-base"},ts=e=>{let{text:r,block_id:n,level:t}=e.data,a=t?V_[t]:"text-header",l=t?`h${t}`:"h3";return(0,oa.jsx)("div",{id:n,className:"mt-1 slack_blocks_to_jsx__header",children:(0,oa.jsx)(l,{className:`${a} font-semibold text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__header_heading`,"data-header-level":t!=null?t:3,children:(0,oa.jsx)(N,{data:r})})})};var ns=require("react"),Fe=require("react/jsx-runtime"),as=e=>{let{block_id:r,alt_text:n,image_url:t,slack_file:a,image_bytes:l,image_height:s,image_width:i,title:u}=e.data,o=t||(a==null?void 0:a.url),[k,m]=(0,ns.useState)(!0),c=u==null?void 0:u.text;return(0,Fe.jsxs)("div",{id:r,className:"my-2 flex flex-col gap-2 slack_blocks_to_jsx__image",children:[(0,Fe.jsxs)("div",{className:"slack_blocks_to_jsx__image_media_trigger text-black-secondary dark:text-dark-text-secondary text-small flex gap-1 items-center",children:[c&&(0,Fe.jsx)("span",{className:"slack_blocks_to_jsx__image_title",children:c}),l&&(0,Fe.jsx)("span",{className:"slack_blocks_to_jsx__image_size",children:`(${Math.round(l/1e3)} kB)`}),(0,Fe.jsx)("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>m(p=>!p),children:(0,Fe.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:k?"rotate(0deg)":"rotate(-90deg)"},children:(0,Fe.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),k&&(0,Fe.jsx)("div",{className:"rounded-md overflow-hidden relative max-w-max",children:(0,Fe.jsx)("img",{src:o,style:{width:i,height:s},alt:n})})]})};var De=require("react/jsx-runtime"),rs=e=>{let{element:r,label:n,block_id:t,hint:a}=e.data,l=r?m1(r):null;return(0,De.jsx)("div",{id:t,className:"mt-2 mb-1 text-primary slack_blocks_to_jsx__input flex w-full text-black-primary dark:text-dark-text-primary",children:(0,De.jsx)("div",{className:"grow",children:(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(N,{data:{type:"mrkdwn",text:`*${n.text}*`,emoji:n.emoji,verbatim:n.verbatim}}),(0,De.jsxs)("div",{className:"mb-1 flex flex-col gap-1",children:[(0,De.jsx)("div",{className:"relative shrink-0",children:l}),(a||(r==null?void 0:r.type)==="plain_text_input")&&(0,De.jsxs)("div",{className:"text-black-secondary dark:text-dark-text-secondary text-small flex gap-1",children:[a&&(0,De.jsx)("div",{className:"inline",children:(0,De.jsx)(N,{data:a})}),(r==null?void 0:r.type)==="plain_text_input"&&(0,De.jsx)("p",{children:"\u21B5 Please 'enter' to submit"})]})]})]})})})};var is=lr(require("react-markdown")),us=lr(require("remark-gfm"));var Za="slack-emoji",Ja=/:([a-zA-Z0-9_\-+']+):/g;function j_(e){var a,l;Ja.lastIndex=0;let r=Ja.exec(e);if(!r)return null;let n=[],t=0;for(;r;){let s=(a=r[0])!=null?a:"",i=(l=r[1])!=null?l:"",u=r.index;u>t&&n.push({type:"text",value:e.slice(t,u)}),n.push({type:"slackEmoji",value:s,data:{hName:Za,hProperties:{name:i}}}),t=u+s.length,r=Ja.exec(e)}return t<e.length&&n.push({type:"text",value:e.slice(t)}),n}function ls(e){let r=e.children;if(!r)return;let n=[];for(let t of r){if(t.type==="code"||t.type==="inlineCode"){n.push(t);continue}if(t.type==="text"&&t.value){let a=j_(t.value);if(a){n.push(...a);continue}}ls(t),n.push(t)}e.children=n}function ss(){return e=>{ls(e)}}var Q=require("react/jsx-runtime"),Y_=({node:e})=>{var n;let r=typeof((n=e==null?void 0:e.properties)==null?void 0:n.name)=="string"?e.properties.name:"";return(0,Q.jsx)(Re,{element:{type:"slack_emoji",value:r}})},Q_={[Za]:Y_},_s=e=>{let{text:r,block_id:n}=e.data,t=r.replace(/\n/g,`
|
|
16
|
-
`);return(0,Q.jsx)("div",{id:n,className:"mt-2 mb-1 text-primary text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__markdown_block",children:(0,Q.jsx)(is.default,{remarkPlugins:[us.default,ss],components:W(S({},Q_),{h1:({children:a})=>(0,Q.jsx)("h1",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h2:({children:a})=>(0,Q.jsx)("h2",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h3:({children:a})=>(0,Q.jsx)("h3",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h4:({children:a})=>(0,Q.jsx)("h4",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h5:({children:a})=>(0,Q.jsx)("h5",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h6:({children:a})=>(0,Q.jsx)("h6",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),p:({children:a})=>(0,Q.jsx)("p",{className:"mb-0.5",children:a}),ul:({children:a})=>(0,Q.jsx)("ul",{className:"list-disc pl-6 mb-0.5",children:a}),ol:({children:a})=>(0,Q.jsx)("ol",{className:"list-decimal pl-6 mb-0.5",children:a}),li:s=>{var i=s,{children:a}=i,l=Ze(i,["children"]);return l.className==="task-list-item"?(0,Q.jsx)("li",{className:"list-none flex items-start gap-1",children:a}):(0,Q.jsx)("li",{className:"mb-0.5",children:a})},input:s=>{var i=s,{checked:a}=i,l=Ze(i,["checked"]);return l.type==="checkbox"?(0,Q.jsx)("input",{type:"checkbox",checked:a,readOnly:!0,className:"mt-1 mr-1"}):(0,Q.jsx)("input",S({},l))},a:({href:a,children:l})=>(0,Q.jsx)("a",{href:a,target:"_blank",rel:"noreferrer noopener",className:"text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:l}),code:({children:a,className:l})=>(l==null?void 0:l.includes("language-"))?(0,Q.jsx)("code",{className:"slack_code block p-2 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg dark:text-dark-text-primary w-full my-1 font-mono",children:a}):(0,Q.jsx)("code",{className:"slack_code_inline inline-block px-1 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg text-red-primary dark:text-dark-text-primary font-mono",children:a}),pre:({children:a})=>(0,Q.jsx)("pre",{className:"my-0.5",children:a}),blockquote:({children:a})=>(0,Q.jsx)("blockquote",{className:"relative pl-4 my-0.5",children:a}),table:({children:a})=>(0,Q.jsx)("table",{className:"border-collapse my-1 w-full",children:a}),thead:({children:a})=>(0,Q.jsx)("thead",{className:"border-b border-black-primary/30 dark:border-dark-border",children:a}),tbody:({children:a})=>(0,Q.jsx)("tbody",{children:a}),tr:({children:a})=>(0,Q.jsx)("tr",{className:"border-b border-black-primary/[0.13] dark:border-dark-border",children:a}),th:({children:a})=>(0,Q.jsx)("th",{className:"px-2 py-1 text-left font-semibold border border-black-primary/[0.13] dark:border-dark-border",children:a}),td:({children:a})=>(0,Q.jsx)("td",{className:"px-2 py-1 border border-black-primary/[0.13] dark:border-dark-border",children:a}),hr:()=>(0,Q.jsx)("hr",{className:"border-black-primary/[0.13] dark:border-dark-border my-1"}),strong:({children:a})=>(0,Q.jsx)("strong",{className:"font-semibold",children:a}),em:({children:a})=>(0,Q.jsx)("em",{className:"italic",children:a}),del:({children:a})=>(0,Q.jsx)("del",{className:"line-through",children:a})}),children:t})})};var Ua=require("react/jsx-runtime"),os=e=>{let a=e,{element:r,children:n}=a,t=Ze(a,["element","children"]);return r.style==="bullet"?(0,Ua.jsx)("ul",W(S({},t),{children:n})):(0,Ua.jsx)("ol",W(S({start:r.offset!=null?r.offset+1:void 0},t),{children:n}))};var Je=require("react/jsx-runtime"),ks=e=>{let{range:r,style:n}=e,{hooks:t}=z();return r==="channel"&&t.atChannel?(0,Je.jsx)(Je.Fragment,{children:t.atChannel(n)}):r==="everyone"&&t.atEveryone?(0,Je.jsx)(Je.Fragment,{children:t.atEveryone(n)}):r==="here"&&t.atHere?(0,Je.jsx)(Je.Fragment,{children:t.atHere(n)}):(0,Je.jsxs)("span",{className:Y(["slack_broadcast","slack_blocks_to_jsx__rich_text_section_element_broadcast",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",r]})};var vt=require("react/jsx-runtime"),cs=e=>{let{channel_id:r,style:n}=e,{channels:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.channel?(0,vt.jsx)(vt.Fragment,{children:a.channel(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,vt.jsxs)("span",{"data-channel-id":(l==null?void 0:l.id)||r,className:Y(["slack_channel","slack_blocks_to_jsx__rich_text_section_element_channel",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["#",s]})};var Qt=require("react/jsx-runtime"),ms=e=>{let{value:r,style:n}=e;return(0,Qt.jsxs)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_color inline-flex items-center gap-1",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:[(0,Qt.jsx)("span",{className:"inline-block w-3 h-3 rounded-sm border border-black-primary/[0.13] dark:border-dark-border",style:{backgroundColor:r}}),(0,Qt.jsx)("span",{children:r})]})};var Pa=require("react/jsx-runtime"),ps=e=>{let r=e,{hooks:n}=z();return n.emoji?(0,Pa.jsx)("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:n.emoji(r,t=>q1(t))}):(0,Pa.jsx)("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:q1(r)})};var $t=require("react/jsx-runtime"),As=e=>{let{url:r,style:n,text:t}=e,{hooks:a}=z(),l=t||r;return a.link?(0,$t.jsx)($t.Fragment,{children:a.link({href:r,target:"_blank",rel:"noreferrer noopener",className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})}):(0,$t.jsx)("a",{target:"_blank",rel:"noreferrer noopener",href:r,className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})};var Rt=require("react/jsx-runtime"),Es=e=>{let{user_id:r,style:n}=e,{users:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.user?(0,Rt.jsx)(Rt.Fragment,{children:a.user(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,Rt.jsxs)("span",{"data-user-id":(l==null?void 0:l.id)||r,className:Y(["slack_user","slack_blocks_to_jsx__rich_text_section_element_user",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};var St=require("react/jsx-runtime"),fs=e=>{let{usergroup_id:r,style:n}=e,{user_groups:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.usergroup?(0,St.jsx)(St.Fragment,{children:a.usergroup(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,St.jsxs)("span",{"data-usergroup-id":(l==null?void 0:l.id)||r,className:Y(["slack_user_group","slack_blocks_to_jsx__rich_text_section_element_user_group",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};var Ge=require("react/jsx-runtime"),ka=e=>{let{element:r}=e;if(r.type==="user")return(0,Ge.jsx)(Es,S({},r));if(r.type==="channel")return(0,Ge.jsx)(cs,S({},r));if(r.type==="broadcast")return(0,Ge.jsx)(ks,S({},r));if(r.type==="color")return(0,Ge.jsx)(ms,S({},r));if(r.type==="emoji")return(0,Ge.jsx)(ps,S({},r));if(r.type==="usergroup")return(0,Ge.jsx)(fs,S({},r));if(r.type==="link")return(0,Ge.jsx)(As,S({},r));if(r.type==="text"){let{text:n,style:t}=r;return(0,Ge.jsx)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_text",t!=null&&t.italic?"italic":"",t!=null&&t.strike?"line-through":"",t!=null&&t.underline?"underline":"",t!=null&&t.code?"slack_inline_code":"",t!=null&&t.bold?"font-semibold":""]),children:n})}if(r.type==="date"){let{timestamp:n,format:t,style:a}=r;return(0,Ge.jsx)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_date",a!=null&&a.italic?"italic":"",a!=null&&a.strike?"line-through":"",a!=null&&a.underline?"underline":"",a!=null&&a.code?"slack_inline_code":"",a!=null&&a.bold?"font-semibold":""]),children:(0,Ge.jsx)($e,{element:{type:"slack_date",value:{fallbackText:"",optionalLink:"",timestamp:n.toString(),tokenString:t}}})})}return null};var P=require("react/jsx-runtime"),$1=e=>{let{elements:r,block_id:n}=e.data,t={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0};return(0,P.jsx)("div",{id:n,className:"slack_blocks_to_jsx__rich_text",children:r.map((a,l)=>{let s=0;if(a.type!=="rich_text_list")for(let i=0;i<=8;i++)t[i]=0;else{let i=a.indent||0;for(let u=i+1;u<=8;u++)t[u]=0;s=t[i],t[i]+=a.elements.length}return(0,P.jsx)(Is,{element:a,consecutive_index:s},`${a.type}__${l}`)})})},Is=e=>{let{element:r,consecutive_index:n}=e;if(r.type==="rich_text_list"){let{elements:t,style:a,border:l=0,indent:s,offset:i=0}=r,u=a==="ordered"&&i||0;return(0,P.jsxs)("div",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_list_element",children:[l===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)(os,{element:r,className:"list-none",children:t.map((o,k)=>(0,P.jsxs)("li",{className:"flex",style:{marginLeft:s?s>5?0:s*28:0},children:[a==="ordered"&&(0,P.jsxs)("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&`${n+u+k+1}.`,(s===1||s===4||s===7)&&`${el(n+u+k+1)}.`,(s===2||s===5||s===8)&&`${Pr(n+u+k+1)}.`]}),a==="bullet"&&(0,P.jsxs)("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),(s===1||s===4||s===7)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-full border border-current"}),(s===2||s===5||s===8)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-[1.5px] bg-current"})]}),(0,P.jsx)("div",{style:{marginLeft:6},children:(0,P.jsx)(Is,{element:o,consecutive_index:0},`${r.type}__${k}`)})]},`${o.type}__${k}`))})]})}if(r.type==="rich_text_preformatted"){let{elements:t,border:a}=r;return(0,P.jsxs)("code",{className:"flex gap-2 w-full slack_blocks_to_jsx__rich_text_preformatted_element",children:[a===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)("pre",{className:"p-2 rounded-lg mt-2 mb-1 ml-1 whitespace-pre-wrap bg-gray-secondary dark:bg-dark-bg-secondary text-xs leading-[1.50001] border dark:border-dark-border grow",style:{wordWrap:"break-word",wordBreak:"break-all"},children:t.map((l,s)=>(0,P.jsx)(ka,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_quote"){let{elements:t,border:a}=r;return(0,P.jsxs)("blockquote",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_quote_element",children:[a===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)("p",{children:t.map((l,s)=>(0,P.jsx)(ka,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_section"){let{elements:t}=r;return(0,P.jsx)("p",{className:"inline-block slack_blocks_to_jsx__rich_text_section_element",children:t.map((a,l)=>(0,P.jsx)(ka,{element:a},`${a.type}__${l}`))})}return null};var ue=require("react/jsx-runtime"),$_=({status:e})=>e==="complete"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_complete",children:(0,ue.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4 text-green-600 dark:text-green-400",children:(0,ue.jsx)("path",{d:"M13.25 4.75L6 12 2.75 8.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}):e==="in_progress"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_in_progress",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500 dark:bg-blue-400 animate-pulse"})}):e==="error"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_error",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-red-600 dark:bg-red-400"})}):(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_pending",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-gray-400 dark:bg-gray-500"})}),ca=e=>{let{task_id:r,title:n,details:t,output:a,sources:l,status:s="pending",block_id:i}=e.data;return(0,ue.jsxs)("div",{id:i,"data-task-id":r,className:"my-1 p-3 rounded border border-black-primary/[0.13] dark:border-dark-border text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__task_card",children:[(0,ue.jsxs)("div",{className:"flex items-start gap-2",children:[(0,ue.jsx)($_,{status:s}),(0,ue.jsx)("span",{className:"font-semibold text-primary slack_blocks_to_jsx__task_card_title",children:n})]}),t&&(0,ue.jsx)("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_details",children:(0,ue.jsx)($1,{data:t})}),a&&(0,ue.jsx)("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_output",children:(0,ue.jsx)($1,{data:a})}),l&&l.length>0&&(0,ue.jsx)("div",{className:"mt-2 pl-7 flex flex-wrap gap-2 slack_blocks_to_jsx__task_card_sources",children:l.map((u,o)=>(0,ue.jsx)("a",{href:u.url,target:"_blank",rel:"noreferrer noopener",className:"text-small text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:u.text},o))})]})};var Ot=require("react/jsx-runtime"),ys=e=>{let{title:r,tasks:n,block_id:t}=e.data;return(0,Ot.jsxs)("div",{id:t,className:"mt-2 mb-1 text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__plan",children:[(0,Ot.jsx)("h3",{className:"text-header font-semibold mb-2 slack_blocks_to_jsx__plan_title",children:r}),n&&n.length>0&&(0,Ot.jsx)("div",{className:"flex flex-col gap-1 slack_blocks_to_jsx__plan_tasks",children:n.map((a,l)=>(0,Ot.jsx)(ca,{data:a},a.task_id||l))})]})};var c1=require("react/jsx-runtime"),Ts=e=>{let{accessory:r,fields:n,text:t,block_id:a,expand:l}=e.data,s=r?m1(r):null,i=r?Ur(r):!1;return(0,c1.jsxs)("div",{id:a,className:Y(["mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary dark:text-dark-text-primary",i?"flex-col":""]),children:[(0,c1.jsx)("div",{className:"grow",children:(0,c1.jsxs)("div",{className:"flex flex-col gap-3",children:[t&&(0,c1.jsx)(N,{data:t}),n&&(0,c1.jsx)("div",{className:"grid grid-cols-2 w-full",children:n.map((u,o)=>(0,c1.jsx)(N,{data:u},o))})]})}),s&&i?s:(0,c1.jsx)("div",{className:"ml-2 mb-1 relative shrink-0",children:s})]})};var C1=require("react/jsx-runtime"),hs=e=>{let{rows:r,column_settings:n,block_id:t}=e.data,{channels:a,users:l,hooks:s}=z();return!r||r.length===0?null:(0,C1.jsx)("div",{id:t,className:"mt-2 mb-1 slack_blocks_to_jsx__table inline-block border border-gray-300 dark:border-dark-border rounded",children:(0,C1.jsx)("table",{className:"border-none",children:(0,C1.jsx)("tbody",{children:r.map((i,u)=>(0,C1.jsx)("tr",{className:Y(["border-b border-gray-200 dark:border-dark-border",u===r.length-1?"border-b-0":""]),children:i.map((o,k)=>{let m=n==null?void 0:n[k],c=(m==null?void 0:m.align)||"left",p=(m==null?void 0:m.is_wrapped)||!1,E=Y(["px-3 py-2 border-r border-gray-200 dark:border-dark-border last:border-r-0",c==="center"?"text-center":"",c==="right"?"text-right":"text-left",p?"break-words":"whitespace-nowrap overflow-hidden text-ellipsis",u===0?"font-semibold":""]);return(0,C1.jsx)("td",{className:E,children:o.type==="raw_text"?(0,C1.jsx)("div",{children:Wt(o.text.replace(/>/g,"> ").replace(/</g,"<"),{markdown:!1,verbatim:!1,users:l,channels:a,hooks:s})}):(0,C1.jsx)($1,{data:o})},k)})},u))})})})};var Ns=require("react");var le=require("react/jsx-runtime"),gs=e=>{let{alt_text:r,title:n,video_url:t,author_name:a,block_id:l,description:s,title_url:i,iframeProps:u={}}=e.data,[o,k]=(0,Ns.useState)(!0);return(0,le.jsxs)("div",{className:"py-2 slack_blocks_to_jsx__video",id:l,children:[a&&(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_author text-black-primary dark:text-dark-text-primary",children:(0,le.jsx)("span",{className:"font-semibold",children:a})}),s&&(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_description text-black-primary dark:text-dark-text-primary",children:(0,le.jsx)(N,{data:s})}),(0,le.jsxs)("div",{className:"flex flex-wrap items-center gap-1 slack_blocks_to_jsx__video_title text-black-primary dark:text-dark-text-primary",children:[i?(0,le.jsx)(q_,{title:n,url:i}):(0,le.jsx)("p",{children:(0,le.jsx)(N,{data:n})}),(0,le.jsx)("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>k(m=>!m),children:(0,le.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:o?"rotate(0deg)":"rotate(-90deg)"},children:(0,le.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_container max-w-max",children:o&&(0,le.jsx)("iframe",S({title:r,className:"max-w-[360px] bg-gray-100 dark:bg-dark-bg-secondary w-full aspect-video",src:t},u))})]})},q_=({url:e,title:r})=>{let{hooks:n}=z();return n.link?(0,le.jsx)(le.Fragment,{children:n.link({href:e,children:(0,le.jsx)(N,{data:r}),className:"text-blue-primary dark:text-dark-link",rel:"noopener noreferrer",target:"_blank"})}):(0,le.jsx)("a",{href:e,className:"text-blue-primary dark:text-dark-link",target:"_blank",rel:"noopener noreferrer",children:(0,le.jsx)(N,{data:r})})};var x=require("react/jsx-runtime"),zt=e=>e.type==="divider"?(0,x.jsx)(Ul,{data:e}):e.type==="section"?(0,x.jsx)(Ts,{data:e}):e.type==="image"?(0,x.jsx)(as,{data:e}):e.type==="context"?(0,x.jsx)(Cl,{data:e}):e.type==="actions"?(0,x.jsx)(ir,{data:e}):e.type==="context_actions"?(0,x.jsx)(Fl,{data:e}):e.type==="file"?(0,x.jsx)(es,{data:e}):e.type==="header"?(0,x.jsx)(ts,{data:e}):e.type==="input"?(0,x.jsx)(rs,{data:e}):e.type==="video"?(0,x.jsx)(gs,{data:e}):e.type==="rich_text"?(0,x.jsx)($1,{data:e}):e.type==="table"?(0,x.jsx)(hs,{data:e}):e.type==="markdown"?(0,x.jsx)(_s,{data:e}):e.type==="plan"?(0,x.jsx)(ys,{data:e}):e.type==="task_card"?(0,x.jsx)(ca,{data:e}):e.type==="alert"?(0,x.jsx)(rl,{data:e}):e.type==="card"?(0,x.jsx)(na,{data:e}):e.type==="carousel"?(0,x.jsx)(il,{data:e}):e.type==="container"?(0,x.jsx)(_l,{data:e}):e.type==="data_visualization"?(0,x.jsx)(Zl,{data:e}):null,m1=e=>e.type==="button"?(0,x.jsx)(ta,{data:e}):e.type==="checkboxes"?(0,x.jsx)(kl,{data:e}):e.type==="image"?(0,x.jsx)(aa,{data:e}):e.type==="plain_text_input"?(0,x.jsx)(cl,{data:e}):e.type==="users_select"?(0,x.jsx)(ml,{data:e}):e.type==="datepicker"?(0,x.jsx)(pl,{data:e}):e.type==="timepicker"?(0,x.jsx)(Al,{data:e}):e.type==="datetimepicker"?(0,x.jsx)(El,{data:e}):e.type==="email_text_input"?(0,x.jsx)(fl,{data:e}):e.type==="url_text_input"?(0,x.jsx)(Il,{data:e}):e.type==="number_input"?(0,x.jsx)(yl,{data:e}):e.type==="radio_buttons"?(0,x.jsx)(Tl,{data:e}):e.type==="overflow"?(0,x.jsx)(hl,{data:e}):e.type==="static_select"?(0,x.jsx)(ol,{data:e}):e.type==="external_select"?(0,x.jsx)(Nl,{data:e}):e.type==="conversations_select"?(0,x.jsx)(gl,{data:e}):e.type==="channels_select"?(0,x.jsx)(dl,{data:e}):e.type==="multi_static_select"?(0,x.jsx)(vl,{data:e}):e.type==="multi_external_select"?(0,x.jsx)(Rl,{data:e}):e.type==="multi_users_select"?(0,x.jsx)(Sl,{data:e}):e.type==="multi_conversations_select"?(0,x.jsx)(Ol,{data:e}):e.type==="multi_channels_select"?(0,x.jsx)(bl,{data:e}):e.type==="feedback_buttons"?(0,x.jsx)(xl,{data:e}):e.type==="icon_button"?(0,x.jsx)(Ll,{data:e}):e.type==="file_input"?(0,x.jsx)(Dl,{data:e}):e.type==="rich_text_input"?(0,x.jsx)(wl,{data:e}):e.type==="url"?(0,x.jsx)(Ml,{data:e}):e.type==="workflow_button"?(0,x.jsx)(Hl,{data:e}):null;var bt=require("react/jsx-runtime"),ds=e=>{let{name:r,time:n}=e;return(0,bt.jsxs)("div",{className:"flex gap-[5px] items-center w-full slack_blocks_to_jsx--header",children:[(0,bt.jsx)("h3",{className:"font-black text-[15px] dark:text-dark-text-primary",children:r}),(0,bt.jsx)("div",{className:"h-[14px] w-[27px] leading-[12.5px] py-[1px] px-[3px] uppercase text-[10px] text-black-primary/[0.7] bg-black-primary/[0.13] dark:text-dark-text-primary/[0.7] dark:bg-dark-text-primary/[0.13] font-semibold rounded-[2px] text-center",children:"APP"}),(0,bt.jsx)("div",{className:"text-xs text-black-secondary dark:text-dark-text-secondary uppercase leading-[17.6px]",children:or(n)})]})};var fe=require("react/jsx-runtime"),X_=e=>{let{blocks:r,logo:n,name:t,time:a=new Date,className:l="",style:s,showBlockKitDebug:i=!1,unstyled:u=!1,data:o,hooks:k,withoutWrapper:m=!1,theme:c}=e,[p,A]=(0,ma.useState)(!1);(0,ma.useEffect)(()=>{if(c===void 0){let f=window.matchMedia("(prefers-color-scheme: dark)");A(f.matches);let I=T=>A(T.matches);return f.addEventListener("change",I),()=>f.removeEventListener("change",I)}},[c]);let E=c!=null?c:p?"dark":"light";return m?(0,fe.jsx)(Na,{data:o,hooks:k,children:(0,fe.jsx)("div",{id:"slack_blocks_to_jsx","data-theme":E,className:Y(["slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:(0,fe.jsx)("div",{className:"flex flex-col w-full",children:(0,fe.jsx)("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=zt(f);return T?(0,fe.jsx)(ha,{children:T},I):null})})})})}):(0,fe.jsx)(Na,{data:o,hooks:k,children:(0,fe.jsx)("div",{id:"slack_blocks_to_jsx","data-theme":E,className:"dark:text-dark-text-primary dark:bg-dark-bg-primary",children:(0,fe.jsxs)("section",{className:Y(["dark:text-dark-text-primary dark:bg-dark-bg-primary","slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:[i&&(0,fe.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:`https://app.slack.com/block-kit-builder#${encodeURIComponent(JSON.stringify({blocks:tl(r)}))}`,className:"text-xs absolute right-0 top-0 text-blue-500 underline",children:"Open in Slack Block Kit Builder"}),(0,fe.jsx)("div",{className:"shrink-0",children:(0,fe.jsx)("img",{src:n,className:"w-9 h-9",alt:t})}),(0,fe.jsxs)("div",{className:"flex flex-col w-full",children:[(0,fe.jsx)(ds,{name:t,time:a}),(0,fe.jsx)("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=zt(f);return T?(0,fe.jsx)(ha,{children:T},I):null})})]})]})})})};0&&(module.exports={Message});
|
|
16
|
+
`);return(0,Q.jsx)("div",{id:n,className:"mt-2 mb-1 text-primary text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__markdown_block",children:(0,Q.jsx)(is.default,{remarkPlugins:[us.default,ss],components:W(S({},Q_),{h1:({children:a})=>(0,Q.jsx)("h1",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h2:({children:a})=>(0,Q.jsx)("h2",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h3:({children:a})=>(0,Q.jsx)("h3",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h4:({children:a})=>(0,Q.jsx)("h4",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h5:({children:a})=>(0,Q.jsx)("h5",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h6:({children:a})=>(0,Q.jsx)("h6",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),p:({children:a})=>(0,Q.jsx)("p",{className:"mb-0.5",children:a}),ul:({children:a})=>(0,Q.jsx)("ul",{className:"list-disc pl-6 mb-0.5",children:a}),ol:({children:a})=>(0,Q.jsx)("ol",{className:"list-decimal pl-6 mb-0.5",children:a}),li:s=>{var i=s,{children:a}=i,l=Ze(i,["children"]);return l.className==="task-list-item"?(0,Q.jsx)("li",{className:"list-none flex items-start gap-1",children:a}):(0,Q.jsx)("li",{className:"mb-0.5",children:a})},input:s=>{var i=s,{checked:a}=i,l=Ze(i,["checked"]);return l.type==="checkbox"?(0,Q.jsx)("input",{type:"checkbox",checked:a,readOnly:!0,className:"mt-1 mr-1"}):(0,Q.jsx)("input",S({},l))},a:({href:a,children:l})=>(0,Q.jsx)("a",{href:a,target:"_blank",rel:"noreferrer noopener",className:"text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:l}),code:({children:a,className:l})=>(l==null?void 0:l.includes("language-"))?(0,Q.jsx)("code",{className:"slack_code block p-2 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg dark:text-dark-text-primary w-full my-1 font-mono",children:a}):(0,Q.jsx)("code",{className:"slack_code_inline inline-block px-1 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg text-red-primary dark:text-dark-text-primary font-mono",children:a}),pre:({children:a})=>(0,Q.jsx)("pre",{className:"my-0.5",children:a}),blockquote:({children:a})=>(0,Q.jsx)("blockquote",{className:"relative pl-4 my-0.5",children:a}),table:({children:a})=>(0,Q.jsx)("table",{className:"border-collapse my-1 w-full",children:a}),thead:({children:a})=>(0,Q.jsx)("thead",{className:"border-b border-black-primary/30 dark:border-dark-border",children:a}),tbody:({children:a})=>(0,Q.jsx)("tbody",{children:a}),tr:({children:a})=>(0,Q.jsx)("tr",{className:"border-b border-black-primary/[0.13] dark:border-dark-border",children:a}),th:({children:a})=>(0,Q.jsx)("th",{className:"px-2 py-1 text-left font-semibold border border-black-primary/[0.13] dark:border-dark-border",children:a}),td:({children:a})=>(0,Q.jsx)("td",{className:"px-2 py-1 border border-black-primary/[0.13] dark:border-dark-border",children:a}),hr:()=>(0,Q.jsx)("hr",{className:"border-black-primary/[0.13] dark:border-dark-border my-1"}),strong:({children:a})=>(0,Q.jsx)("strong",{className:"font-semibold",children:a}),em:({children:a})=>(0,Q.jsx)("em",{className:"italic",children:a}),del:({children:a})=>(0,Q.jsx)("del",{className:"line-through",children:a})}),children:t})})};var Ua=require("react/jsx-runtime"),os=e=>{let a=e,{element:r,children:n}=a,t=Ze(a,["element","children"]);return r.style==="bullet"?(0,Ua.jsx)("ul",W(S({},t),{children:n})):(0,Ua.jsx)("ol",W(S({start:r.offset!=null?r.offset+1:void 0},t),{children:n}))};var Je=require("react/jsx-runtime"),ks=e=>{let{range:r,style:n}=e,{hooks:t}=z();return r==="channel"&&t.atChannel?(0,Je.jsx)(Je.Fragment,{children:t.atChannel(n)}):r==="everyone"&&t.atEveryone?(0,Je.jsx)(Je.Fragment,{children:t.atEveryone(n)}):r==="here"&&t.atHere?(0,Je.jsx)(Je.Fragment,{children:t.atHere(n)}):(0,Je.jsxs)("span",{className:Y(["slack_broadcast","slack_blocks_to_jsx__rich_text_section_element_broadcast",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",r]})};var vt=require("react/jsx-runtime"),cs=e=>{let{channel_id:r,style:n}=e,{channels:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.channel?(0,vt.jsx)(vt.Fragment,{children:a.channel(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,vt.jsxs)("span",{"data-channel-id":(l==null?void 0:l.id)||r,className:Y(["slack_channel","slack_blocks_to_jsx__rich_text_section_element_channel",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["#",s]})};var Qt=require("react/jsx-runtime"),ms=e=>{let{value:r,style:n}=e;return(0,Qt.jsxs)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_color inline-flex items-center gap-1",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:[(0,Qt.jsx)("span",{className:"inline-block w-3 h-3 rounded-sm border border-black-primary/[0.13] dark:border-dark-border",style:{backgroundColor:r}}),(0,Qt.jsx)("span",{children:r})]})};var Pa=require("react/jsx-runtime"),ps=e=>{let r=e,{hooks:n}=z();return n.emoji?(0,Pa.jsx)("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:n.emoji(r,t=>q1(t))}):(0,Pa.jsx)("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:q1(r)})};var $t=require("react/jsx-runtime"),As=e=>{let{url:r,style:n,text:t}=e,{hooks:a}=z(),l=t||r;return a.link?(0,$t.jsx)($t.Fragment,{children:a.link({href:r,target:"_blank",rel:"noreferrer noopener",className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})}):(0,$t.jsx)("a",{target:"_blank",rel:"noreferrer noopener",href:r,className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})};var Rt=require("react/jsx-runtime"),Es=e=>{let{user_id:r,style:n}=e,{users:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.user?(0,Rt.jsx)(Rt.Fragment,{children:a.user(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,Rt.jsxs)("span",{"data-user-id":(l==null?void 0:l.id)||r,className:Y(["slack_user","slack_blocks_to_jsx__rich_text_section_element_user",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};var St=require("react/jsx-runtime"),fs=e=>{let{usergroup_id:r,style:n}=e,{user_groups:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.usergroup?(0,St.jsx)(St.Fragment,{children:a.usergroup(l?W(S({},l),{style:n}):{id:r,name:s,style:n})}):(0,St.jsxs)("span",{"data-usergroup-id":(l==null?void 0:l.id)||r,className:Y(["slack_user_group","slack_blocks_to_jsx__rich_text_section_element_user_group",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};var Ge=require("react/jsx-runtime"),ka=e=>{let{element:r}=e;if(r.type==="user")return(0,Ge.jsx)(Es,S({},r));if(r.type==="channel")return(0,Ge.jsx)(cs,S({},r));if(r.type==="broadcast")return(0,Ge.jsx)(ks,S({},r));if(r.type==="color")return(0,Ge.jsx)(ms,S({},r));if(r.type==="emoji")return(0,Ge.jsx)(ps,S({},r));if(r.type==="usergroup")return(0,Ge.jsx)(fs,S({},r));if(r.type==="link")return(0,Ge.jsx)(As,S({},r));if(r.type==="text"){let{text:n,style:t}=r;return(0,Ge.jsx)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_text",t!=null&&t.italic?"italic":"",t!=null&&t.strike?"line-through":"",t!=null&&t.underline?"underline":"",t!=null&&t.code?"slack_inline_code":"",t!=null&&t.bold?"font-semibold":""]),children:n})}if(r.type==="date"){let{timestamp:n,format:t,style:a}=r;return(0,Ge.jsx)("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_date",a!=null&&a.italic?"italic":"",a!=null&&a.strike?"line-through":"",a!=null&&a.underline?"underline":"",a!=null&&a.code?"slack_inline_code":"",a!=null&&a.bold?"font-semibold":""]),children:(0,Ge.jsx)($e,{element:{type:"slack_date",value:{fallbackText:"",optionalLink:"",timestamp:n.toString(),tokenString:t}}})})}return null};var P=require("react/jsx-runtime"),$1=e=>{let{elements:r,block_id:n}=e.data,t={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0};return(0,P.jsx)("div",{id:n,className:"slack_blocks_to_jsx__rich_text",children:r.map((a,l)=>{let s=0;if(a.type!=="rich_text_list")for(let i=0;i<=8;i++)t[i]=0;else{let i=a.indent||0;for(let u=i+1;u<=8;u++)t[u]=0;a.style==="ordered"?(s=t[i],t[i]+=a.elements.length):t[i]=0}return(0,P.jsx)(Is,{element:a,consecutive_index:s},`${a.type}__${l}`)})})},Is=e=>{let{element:r,consecutive_index:n}=e;if(r.type==="rich_text_list"){let{elements:t,style:a,border:l=0,indent:s,offset:i=0}=r,u=a==="ordered"&&i||0;return(0,P.jsxs)("div",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_list_element",children:[l===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)(os,{element:r,className:"list-none",children:t.map((o,k)=>(0,P.jsxs)("li",{className:"flex",style:{marginLeft:s?s>5?0:s*28:0},children:[a==="ordered"&&(0,P.jsxs)("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&`${n+u+k+1}.`,(s===1||s===4||s===7)&&`${el(n+u+k+1)}.`,(s===2||s===5||s===8)&&`${Pr(n+u+k+1)}.`]}),a==="bullet"&&(0,P.jsxs)("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),(s===1||s===4||s===7)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-full border border-current"}),(s===2||s===5||s===8)&&(0,P.jsx)("span",{className:"w-1.5 h-1.5 rounded-[1.5px] bg-current"})]}),(0,P.jsx)("div",{style:{marginLeft:6},children:(0,P.jsx)(Is,{element:o,consecutive_index:0},`${r.type}__${k}`)})]},`${o.type}__${k}`))})]})}if(r.type==="rich_text_preformatted"){let{elements:t,border:a}=r;return(0,P.jsxs)("code",{className:"flex gap-2 w-full slack_blocks_to_jsx__rich_text_preformatted_element",children:[a===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)("pre",{className:"p-2 rounded-lg mt-2 mb-1 ml-1 whitespace-pre-wrap bg-gray-secondary dark:bg-dark-bg-secondary text-xs leading-[1.50001] border dark:border-dark-border grow",style:{wordWrap:"break-word",wordBreak:"break-all"},children:t.map((l,s)=>(0,P.jsx)(ka,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_quote"){let{elements:t,border:a}=r;return(0,P.jsxs)("blockquote",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_quote_element",children:[a===1&&(0,P.jsx)("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),(0,P.jsx)("p",{children:t.map((l,s)=>(0,P.jsx)(ka,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_section"){let{elements:t}=r;return(0,P.jsx)("p",{className:"block slack_blocks_to_jsx__rich_text_section_element",children:t.map((a,l)=>(0,P.jsx)(ka,{element:a},`${a.type}__${l}`))})}return null};var ue=require("react/jsx-runtime"),$_=({status:e})=>e==="complete"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_complete",children:(0,ue.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4 text-green-600 dark:text-green-400",children:(0,ue.jsx)("path",{d:"M13.25 4.75L6 12 2.75 8.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}):e==="in_progress"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_in_progress",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500 dark:bg-blue-400 animate-pulse"})}):e==="error"?(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_error",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-red-600 dark:bg-red-400"})}):(0,ue.jsx)("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_pending",children:(0,ue.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-gray-400 dark:bg-gray-500"})}),ca=e=>{let{task_id:r,title:n,details:t,output:a,sources:l,status:s="pending",block_id:i}=e.data;return(0,ue.jsxs)("div",{id:i,"data-task-id":r,className:"my-1 p-3 rounded border border-black-primary/[0.13] dark:border-dark-border text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__task_card",children:[(0,ue.jsxs)("div",{className:"flex items-start gap-2",children:[(0,ue.jsx)($_,{status:s}),(0,ue.jsx)("span",{className:"font-semibold text-primary slack_blocks_to_jsx__task_card_title",children:n})]}),t&&(0,ue.jsx)("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_details",children:(0,ue.jsx)($1,{data:t})}),a&&(0,ue.jsx)("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_output",children:(0,ue.jsx)($1,{data:a})}),l&&l.length>0&&(0,ue.jsx)("div",{className:"mt-2 pl-7 flex flex-wrap gap-2 slack_blocks_to_jsx__task_card_sources",children:l.map((u,o)=>(0,ue.jsx)("a",{href:u.url,target:"_blank",rel:"noreferrer noopener",className:"text-small text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:u.text},o))})]})};var Ot=require("react/jsx-runtime"),ys=e=>{let{title:r,tasks:n,block_id:t}=e.data;return(0,Ot.jsxs)("div",{id:t,className:"mt-2 mb-1 text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__plan",children:[(0,Ot.jsx)("h3",{className:"text-header font-semibold mb-2 slack_blocks_to_jsx__plan_title",children:r}),n&&n.length>0&&(0,Ot.jsx)("div",{className:"flex flex-col gap-1 slack_blocks_to_jsx__plan_tasks",children:n.map((a,l)=>(0,Ot.jsx)(ca,{data:a},a.task_id||l))})]})};var c1=require("react/jsx-runtime"),Ts=e=>{let{accessory:r,fields:n,text:t,block_id:a,expand:l}=e.data,s=r?m1(r):null,i=r?Ur(r):!1;return(0,c1.jsxs)("div",{id:a,className:Y(["mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary dark:text-dark-text-primary",i?"flex-col":""]),children:[(0,c1.jsx)("div",{className:"grow",children:(0,c1.jsxs)("div",{className:"flex flex-col gap-3",children:[t&&(0,c1.jsx)(N,{data:t}),n&&(0,c1.jsx)("div",{className:"grid grid-cols-2 w-full",children:n.map((u,o)=>(0,c1.jsx)(N,{data:u},o))})]})}),s&&i?s:(0,c1.jsx)("div",{className:"ml-2 mb-1 relative shrink-0",children:s})]})};var C1=require("react/jsx-runtime"),hs=e=>{let{rows:r,column_settings:n,block_id:t}=e.data,{channels:a,users:l,hooks:s}=z();return!r||r.length===0?null:(0,C1.jsx)("div",{id:t,className:"mt-2 mb-1 slack_blocks_to_jsx__table inline-block border border-gray-300 dark:border-dark-border rounded",children:(0,C1.jsx)("table",{className:"border-none",children:(0,C1.jsx)("tbody",{children:r.map((i,u)=>(0,C1.jsx)("tr",{className:Y(["border-b border-gray-200 dark:border-dark-border",u===r.length-1?"border-b-0":""]),children:i.map((o,k)=>{let m=n==null?void 0:n[k],c=(m==null?void 0:m.align)||"left",p=(m==null?void 0:m.is_wrapped)||!1,E=Y(["px-3 py-2 border-r border-gray-200 dark:border-dark-border last:border-r-0",c==="center"?"text-center":"",c==="right"?"text-right":"text-left",p?"break-words":"whitespace-nowrap overflow-hidden text-ellipsis",u===0?"font-semibold":""]);return(0,C1.jsx)("td",{className:E,children:o.type==="raw_text"?(0,C1.jsx)("div",{children:Wt(o.text.replace(/>/g,"> ").replace(/</g,"<"),{markdown:!1,verbatim:!1,users:l,channels:a,hooks:s})}):(0,C1.jsx)($1,{data:o})},k)})},u))})})})};var Ns=require("react");var le=require("react/jsx-runtime"),gs=e=>{let{alt_text:r,title:n,video_url:t,author_name:a,block_id:l,description:s,title_url:i,iframeProps:u={}}=e.data,[o,k]=(0,Ns.useState)(!0);return(0,le.jsxs)("div",{className:"py-2 slack_blocks_to_jsx__video",id:l,children:[a&&(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_author text-black-primary dark:text-dark-text-primary",children:(0,le.jsx)("span",{className:"font-semibold",children:a})}),s&&(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_description text-black-primary dark:text-dark-text-primary",children:(0,le.jsx)(N,{data:s})}),(0,le.jsxs)("div",{className:"flex flex-wrap items-center gap-1 slack_blocks_to_jsx__video_title text-black-primary dark:text-dark-text-primary",children:[i?(0,le.jsx)(q_,{title:n,url:i}):(0,le.jsx)("p",{children:(0,le.jsx)(N,{data:n})}),(0,le.jsx)("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>k(m=>!m),children:(0,le.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:o?"rotate(0deg)":"rotate(-90deg)"},children:(0,le.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),(0,le.jsx)("div",{className:"slack_blocks_to_jsx__video_container max-w-max",children:o&&(0,le.jsx)("iframe",S({title:r,className:"max-w-[360px] bg-gray-100 dark:bg-dark-bg-secondary w-full aspect-video",src:t},u))})]})},q_=({url:e,title:r})=>{let{hooks:n}=z();return n.link?(0,le.jsx)(le.Fragment,{children:n.link({href:e,children:(0,le.jsx)(N,{data:r}),className:"text-blue-primary dark:text-dark-link",rel:"noopener noreferrer",target:"_blank"})}):(0,le.jsx)("a",{href:e,className:"text-blue-primary dark:text-dark-link",target:"_blank",rel:"noopener noreferrer",children:(0,le.jsx)(N,{data:r})})};var x=require("react/jsx-runtime"),zt=e=>e.type==="divider"?(0,x.jsx)(Ul,{data:e}):e.type==="section"?(0,x.jsx)(Ts,{data:e}):e.type==="image"?(0,x.jsx)(as,{data:e}):e.type==="context"?(0,x.jsx)(Cl,{data:e}):e.type==="actions"?(0,x.jsx)(ir,{data:e}):e.type==="context_actions"?(0,x.jsx)(Fl,{data:e}):e.type==="file"?(0,x.jsx)(es,{data:e}):e.type==="header"?(0,x.jsx)(ts,{data:e}):e.type==="input"?(0,x.jsx)(rs,{data:e}):e.type==="video"?(0,x.jsx)(gs,{data:e}):e.type==="rich_text"?(0,x.jsx)($1,{data:e}):e.type==="table"?(0,x.jsx)(hs,{data:e}):e.type==="markdown"?(0,x.jsx)(_s,{data:e}):e.type==="plan"?(0,x.jsx)(ys,{data:e}):e.type==="task_card"?(0,x.jsx)(ca,{data:e}):e.type==="alert"?(0,x.jsx)(rl,{data:e}):e.type==="card"?(0,x.jsx)(na,{data:e}):e.type==="carousel"?(0,x.jsx)(il,{data:e}):e.type==="container"?(0,x.jsx)(_l,{data:e}):e.type==="data_visualization"?(0,x.jsx)(Zl,{data:e}):null,m1=e=>e.type==="button"?(0,x.jsx)(ta,{data:e}):e.type==="checkboxes"?(0,x.jsx)(kl,{data:e}):e.type==="image"?(0,x.jsx)(aa,{data:e}):e.type==="plain_text_input"?(0,x.jsx)(cl,{data:e}):e.type==="users_select"?(0,x.jsx)(ml,{data:e}):e.type==="datepicker"?(0,x.jsx)(pl,{data:e}):e.type==="timepicker"?(0,x.jsx)(Al,{data:e}):e.type==="datetimepicker"?(0,x.jsx)(El,{data:e}):e.type==="email_text_input"?(0,x.jsx)(fl,{data:e}):e.type==="url_text_input"?(0,x.jsx)(Il,{data:e}):e.type==="number_input"?(0,x.jsx)(yl,{data:e}):e.type==="radio_buttons"?(0,x.jsx)(Tl,{data:e}):e.type==="overflow"?(0,x.jsx)(hl,{data:e}):e.type==="static_select"?(0,x.jsx)(ol,{data:e}):e.type==="external_select"?(0,x.jsx)(Nl,{data:e}):e.type==="conversations_select"?(0,x.jsx)(gl,{data:e}):e.type==="channels_select"?(0,x.jsx)(dl,{data:e}):e.type==="multi_static_select"?(0,x.jsx)(vl,{data:e}):e.type==="multi_external_select"?(0,x.jsx)(Rl,{data:e}):e.type==="multi_users_select"?(0,x.jsx)(Sl,{data:e}):e.type==="multi_conversations_select"?(0,x.jsx)(Ol,{data:e}):e.type==="multi_channels_select"?(0,x.jsx)(bl,{data:e}):e.type==="feedback_buttons"?(0,x.jsx)(xl,{data:e}):e.type==="icon_button"?(0,x.jsx)(Ll,{data:e}):e.type==="file_input"?(0,x.jsx)(Dl,{data:e}):e.type==="rich_text_input"?(0,x.jsx)(wl,{data:e}):e.type==="url"?(0,x.jsx)(Ml,{data:e}):e.type==="workflow_button"?(0,x.jsx)(Hl,{data:e}):null;var bt=require("react/jsx-runtime"),ds=e=>{let{name:r,time:n}=e;return(0,bt.jsxs)("div",{className:"flex gap-[5px] items-center w-full slack_blocks_to_jsx--header",children:[(0,bt.jsx)("h3",{className:"font-black text-[15px] dark:text-dark-text-primary",children:r}),(0,bt.jsx)("div",{className:"h-[14px] w-[27px] leading-[12.5px] py-[1px] px-[3px] uppercase text-[10px] text-black-primary/[0.7] bg-black-primary/[0.13] dark:text-dark-text-primary/[0.7] dark:bg-dark-text-primary/[0.13] font-semibold rounded-[2px] text-center",children:"APP"}),(0,bt.jsx)("div",{className:"text-xs text-black-secondary dark:text-dark-text-secondary uppercase leading-[17.6px]",children:or(n)})]})};var fe=require("react/jsx-runtime"),X_=e=>{let{blocks:r,logo:n,name:t,time:a=new Date,className:l="",style:s,showBlockKitDebug:i=!1,unstyled:u=!1,data:o,hooks:k,withoutWrapper:m=!1,theme:c}=e,[p,A]=(0,ma.useState)(!1);(0,ma.useEffect)(()=>{if(c===void 0){let f=window.matchMedia("(prefers-color-scheme: dark)");A(f.matches);let I=T=>A(T.matches);return f.addEventListener("change",I),()=>f.removeEventListener("change",I)}},[c]);let E=c!=null?c:p?"dark":"light";return m?(0,fe.jsx)(Na,{data:o,hooks:k,children:(0,fe.jsx)("div",{id:"slack_blocks_to_jsx","data-theme":E,className:Y(["slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:(0,fe.jsx)("div",{className:"flex flex-col w-full",children:(0,fe.jsx)("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=zt(f);return T?(0,fe.jsx)(ha,{children:T},I):null})})})})}):(0,fe.jsx)(Na,{data:o,hooks:k,children:(0,fe.jsx)("div",{id:"slack_blocks_to_jsx","data-theme":E,className:"dark:text-dark-text-primary dark:bg-dark-bg-primary",children:(0,fe.jsxs)("section",{className:Y(["dark:text-dark-text-primary dark:bg-dark-bg-primary","slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:[i&&(0,fe.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:`https://app.slack.com/block-kit-builder#${encodeURIComponent(JSON.stringify({blocks:tl(r)}))}`,className:"text-xs absolute right-0 top-0 text-blue-500 underline",children:"Open in Slack Block Kit Builder"}),(0,fe.jsx)("div",{className:"shrink-0",children:(0,fe.jsx)("img",{src:n,className:"w-9 h-9",alt:t})}),(0,fe.jsxs)("div",{className:"flex flex-col w-full",children:[(0,fe.jsx)(ds,{name:t,time:a}),(0,fe.jsx)("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=zt(f);return T?(0,fe.jsx)(ha,{children:T},I):null})})]})]})})})};0&&(module.exports={Message});
|
package/dist/index.mjs
CHANGED
|
@@ -13,4 +13,4 @@ var Ss=Object.defineProperty,Os=Object.defineProperties;var bs=Object.getOwnProp
|
|
|
13
13
|
`+"LBKS".repeat(s.length)),n=n.replace(/^>.*$(?!\n>)/gm,`$&
|
|
14
14
|
`),n=n.replace(/<!here>/g,"@here"),n=n.replace(/<!everyone>/g,"@everyone"),n=n.replace(/<!channel>/g,"@channel");let a=C_.parse(n).children;return et("div",{children:a.map((l,s)=>l.type==="paragraph"?et(An,{element:l,isFirst:s===0},s):l.type==="blockquote"?et(fr,{element:l},s):l.type==="code"?et(Ir,{element:l},s):null)})};var Dr=e=>e.type==="button"?!1:e.type==="checkboxes"?!0:(e.type==="datepicker"||e.type==="datetimepicker"||e.type==="email_text_input"||e.type==="image"||e.type==="multi_static_select"||e.type==="multi_external_select"||e.type==="multi_users_select"||e.type==="multi_conversations_select"||e.type==="multi_channels_select"||e.type==="number_input"||e.type==="overflow"||e.type==="plain_text_input"||e.type==="radio_buttons"||e.type==="static_select"||e.type==="external_select"||e.type==="users_select"||e.type==="conversations_select"||e.type==="channels_select"||e.type==="timepicker"||e.type==="url_text_input",!1);var Y=e=>e.map(r=>r.replace(/ +/g," ").trim()).filter(r=>!!r).join(" ");function wr(e){if(e<1||e>3999||!Number.isInteger(e))throw new Error("Input must be a positive integer between 1 and 3999");let r=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],n="";for(let[t,a]of r)for(;e>=t;)n+=a,e-=t;return n}function Mr(e){if(e<1||!Number.isInteger(e))throw new Error("Input must be a positive integer");let r="";for(;e>0;)e--,r=String.fromCharCode(97+e%26)+r,e=Math.floor(e/26);return r}var Br=e=>e.map(Hr),Hr=e=>{if(e.type==="image"){let r=e,{image_width:t,image_height:a,image_bytes:l,is_animated:s,fallback:i}=r;return ze(r,["image_width","image_height","image_bytes","is_animated","fallback"])}if(e.type==="video"){let n=e,{iframeProps:t}=n;return ze(n,["iframeProps"])}return e.type==="section"&&e.accessory?W(R({},e),{accessory:ka(e.accessory)}):e.type==="actions"?W(R({},e),{elements:e.elements.map(ka)}):e.type==="container"?W(R({},e),{child_blocks:e.child_blocks.map(Hr)}):e.type==="input"?W(R({},e),{element:ka(e.element)}):e},ka=e=>{if(!e||typeof e!="object")return e;if(e.type==="users_select"||e.type==="multi_users_select"){let r=e,{people:n}=r;return ze(r,["people"])}return e};import{jsx as Cr}from"react/jsx-runtime";var N=e=>{let{type:r,text:n,verbatim:t=!1}=e.data,{className:a=""}=e,{channels:l,users:s,hooks:i}=z(),u=n.replace(/>/g,"> ").replace(/</g,"<");return r==="plain_text"?Cr("div",{className:a+" dark:text-dark-text-primary",children:tt(u,{markdown:!1,verbatim:t,users:s,channels:l,hooks:i})}):Cr("div",{className:a+" dark:text-dark-text-primary",children:tt(u,{markdown:!0,verbatim:t,users:s,channels:l,hooks:i})})};import{jsx as Ge,jsxs as ca}from"react/jsx-runtime";var M1=e=>{let{data:r,onConfirm:n,onCancel:t}=e,{title:a,text:l,confirm:s,deny:i,style:u}=r;return ca("div",{className:"fixed inset-0 z-50 flex items-center justify-center slack_blocks_to_jsx__confirm_dialog",onClick:o=>{o.target===o.currentTarget&&t()},children:[Ge("div",{className:"absolute inset-0 bg-black bg-opacity-50 dark:bg-opacity-70"}),ca("div",{className:"relative z-10 w-full max-w-[400px] bg-white dark:bg-dark-bg-secondary rounded-lg shadow-lg border border-gray-primary dark:border-dark-border",children:[Ge("div",{className:"px-5 pt-4 pb-3 border-b border-gray-primary dark:border-dark-border",children:Ge("div",{className:"font-semibold text-black-primary dark:text-dark-text-primary",children:Ge(N,{data:a})})}),Ge("div",{className:"px-5 py-4 text-small text-black-primary dark:text-dark-text-primary",children:Ge(N,{data:l})}),ca("div",{className:"flex justify-end gap-2 px-5 pb-4",children:[Ge("button",{type:"button",className:"px-3 py-1.5 text-small font-semibold rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",onClick:t,children:Ge(N,{data:i})}),Ge("button",{type:"button",className:Y(["px-3 py-1.5 text-small font-semibold rounded",u==="danger"?"bg-red-primary text-white-primary":"bg-green-primary text-white-primary"]),onClick:n,children:Ge(N,{data:s})})]})]})]})};import{jsx as Ne,jsxs as B1}from"react/jsx-runtime";var Fr={default:{containerClass:"border-black-primary/[0.13] bg-gray-secondary dark:border-dark-border dark:bg-dark-bg-secondary",iconClass:"text-black-secondary dark:text-dark-text-secondary",label:"Notice",icon:B1("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[Ne("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),Ne("path",{d:"M8 5v3.5M8 11h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},info:{containerClass:"border-blue-primary/30 bg-blue-primary/[0.08] dark:border-dark-link/40 dark:bg-dark-link/[0.1]",iconClass:"text-blue-primary dark:text-dark-link",label:"Info",icon:B1("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[Ne("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),Ne("path",{d:"M8 7v4M8 5h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{containerClass:"border-orange-primary/40 bg-orange-primary/[0.1] dark:border-orange-primary/50 dark:bg-orange-primary/[0.12]",iconClass:"text-orange-primary",label:"Warning",icon:B1("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[Ne("path",{d:"M8 2.25 14.5 13.5h-13L8 2.25Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),Ne("path",{d:"M8 6v3.5M8 11.5h.01",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})},error:{containerClass:"border-red-primary/40 bg-red-primary/[0.08] dark:border-red-primary/50 dark:bg-red-primary/[0.12]",iconClass:"text-red-primary",label:"Error",icon:B1("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[Ne("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),Ne("path",{d:"m5.5 5.5 5 5M10.5 5.5l-5 5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})},success:{containerClass:"border-green-primary/40 bg-green-primary/[0.08] dark:border-green-secondary/50 dark:bg-green-secondary/[0.12]",iconClass:"text-green-primary dark:text-green-secondary",label:"Success",icon:B1("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4",children:[Ne("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1.4"}),Ne("path",{d:"m5 8.25 2.25 2.25L11 6.75",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}},Gr=e=>{var l;let{text:r,level:n="default",block_id:t}=e.data,a=(l=Fr[n])!=null?l:Fr.default;return B1("div",{id:t,role:"status","aria-label":a.label,"data-level":n,className:`my-2 flex items-start gap-2 rounded-md border px-3 py-2 text-base slack_blocks_to_jsx__alert slack_blocks_to_jsx__alert_${n} ${a.containerClass}`,children:[Ne("span",{className:`mt-[2px] shrink-0 slack_blocks_to_jsx__alert_icon ${a.iconClass}`,children:a.icon}),Ne("div",{className:"flex-1 min-w-0 slack_blocks_to_jsx__alert_text text-black-primary dark:text-dark-text-primary",children:Ne(N,{data:r})})]})};import{useState as F_}from"react";import{Fragment as G_,jsx as ma,jsxs as K_}from"react/jsx-runtime";var Nn=e=>{let{text:r,action_id:n,url:t,style:a,accessibility_label:l,confirm:s}=e.data,[i,u]=F_(!1),o=()=>{s?u(!0):t&&window.open(t,"_blank")},k=()=>{u(!1),t&&window.open(t,"_blank")},m=()=>{u(!1)};return K_(G_,{children:[ma("button",{type:"button",id:n,"aria-label":l,className:Y(["px-2 pt-0 pb-[1px] text-small h-[28px] min-w-[56px] border rounded whitespace-nowrap font-semibold","slack_blocks_to_jsx__button_element",a==="primary"?"bg-green-primary text-white-primary":a==="danger"?"bg-red-primary text-white-primary":"border-black-primary.3 text-black-primary dark:border-dark-border dark:text-dark-text-primary"]),onClick:o,children:ma(N,{data:r})}),i&&s&&ma(M1,{data:s,onConfirm:k,onCancel:m})]})};import{jsx as Le,jsxs as gn}from"react/jsx-runtime";var Kr=e=>{var r;if(e)return e.image_url||((r=e.slack_file)==null?void 0:r.url)},dn=e=>{var c;let{title:r,subtitle:n,body:t,hero_image:a,icon:l,actions:s,block_id:i}=e.data,u=(c=e.inCarousel)!=null?c:!1,o=Kr(a),k=Kr(l),m=s?s.slice(0,5):void 0;return gn("div",{id:i,className:["slack_blocks_to_jsx__card","flex flex-col rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary overflow-hidden",u?"slack_blocks_to_jsx__card--in_carousel shrink-0 w-[260px] snap-start":"my-2 max-w-[420px]"].join(" "),children:[o&&Le("div",{className:"slack_blocks_to_jsx__card_hero w-full aspect-[16/9] bg-gray-secondary dark:bg-dark-bg-primary overflow-hidden",children:Le("img",{src:o,alt:(a==null?void 0:a.alt_text)||"",className:"w-full h-full object-cover"})}),gn("div",{className:"p-3 flex flex-col gap-1 slack_blocks_to_jsx__card_body_wrap",children:[(r||k)&&gn("div",{className:"flex items-start gap-2 slack_blocks_to_jsx__card_header",children:[k&&Le("img",{src:k,alt:(l==null?void 0:l.alt_text)||"",className:"w-5 h-5 rounded shrink-0 mt-[1px] slack_blocks_to_jsx__card_icon"}),gn("div",{className:"flex-1 min-w-0",children:[r&&Le("div",{className:"text-base font-semibold text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__card_title",children:Le(N,{data:r})}),n&&Le("div",{className:"text-small text-black-secondary dark:text-dark-text-secondary slack_blocks_to_jsx__card_subtitle",children:Le(N,{data:n})})]})]}),t&&Le("div",{className:"text-base text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__card_body mt-1",children:Le(N,{data:t})}),m&&m.length>0&&Le("div",{className:"flex flex-wrap gap-2 mt-2 slack_blocks_to_jsx__card_actions",children:m.map((p,A)=>Le(Nn,{data:p},p.action_id||A))})]})]})};import{useCallback as W_,useEffect as z_,useRef as V_,useState as Wr}from"react";import{jsx as l1,jsxs as j_}from"react/jsx-runtime";var zr=e=>{let{elements:r,block_id:n}=e.data,t=r.slice(0,10),a=V_(null),[l,s]=Wr(!1),[i,u]=Wr(!1),o=W_(()=>{let m=a.current;if(!m)return;let{scrollLeft:c,scrollWidth:p,clientWidth:A}=m,E=8;s(c>E),u(c+A<p-E)},[]);z_(()=>{let m=a.current;if(!m)return;o(),m.addEventListener("scroll",o,{passive:!0});let c=typeof ResizeObserver!="undefined"?new ResizeObserver(o):null;return c==null||c.observe(m),window.addEventListener("resize",o),()=>{m.removeEventListener("scroll",o),c==null||c.disconnect(),window.removeEventListener("resize",o)}},[o,t.length]);let k=m=>{let c=a.current;if(!c)return;let p=c.clientWidth*.8*(m==="left"?-1:1);c.scrollBy({left:p,behavior:"smooth"})};return t.length===0?null:j_("div",{id:n,className:"my-2 relative slack_blocks_to_jsx__carousel",role:"region","aria-label":"Carousel",children:[l1("div",{ref:a,className:"flex gap-3 overflow-x-auto snap-x snap-mandatory pb-2 -mx-1 px-1 slack_blocks_to_jsx__carousel_track",style:{scrollbarWidth:"thin"},children:t.map((m,c)=>l1(dn,{data:m,inCarousel:!0},m.block_id||c))}),l&&l1("button",{type:"button","aria-label":"Scroll left",onClick:()=>k("left"),className:"absolute left-1 top-1/2 -translate-y-1/2 w-8 h-8 rounded-full flex items-center justify-center bg-white-primary dark:bg-dark-bg-secondary text-black-primary dark:text-dark-text-primary border border-black-primary/[0.13] dark:border-dark-border shadow-md hover:bg-gray-secondary dark:hover:bg-dark-bg-primary slack_blocks_to_jsx__carousel_arrow slack_blocks_to_jsx__carousel_arrow--left",children:l1("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",className:"w-5 h-5",children:l1("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.03 5.72a.75.75 0 0 1 0 1.06L8.81 10l3.22 3.22a.75.75 0 1 1-1.06 1.06l-3.75-3.75a.75.75 0 0 1 0-1.06l3.75-3.75a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})})}),i&&l1("button",{type:"button","aria-label":"Scroll right",onClick:()=>k("right"),className:"absolute right-1 top-1/2 -translate-y-1/2 w-8 h-8 rounded-full flex items-center justify-center bg-white-primary dark:bg-dark-bg-secondary text-black-primary dark:text-dark-text-primary border border-black-primary/[0.13] dark:border-dark-border shadow-md hover:bg-gray-secondary dark:hover:bg-dark-bg-primary slack_blocks_to_jsx__carousel_arrow slack_blocks_to_jsx__carousel_arrow--right",children:l1("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",className:"w-5 h-5",children:l1("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.72 5.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1 0 1.06l-3.75 3.75a.75.75 0 0 1-1.06-1.06L10.94 10 7.72 6.78a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})})]})};import{useState as Y_}from"react";import{Fragment as $_,jsx as ge,jsxs as pa}from"react/jsx-runtime";var Q_={narrow:"max-w-[320px]",standard:"max-w-[440px]",wide:"max-w-[520px]",full:"w-full"},Vr=e=>{let{title:r,subtitle:n,icon:t,child_blocks:a,width:l="standard",is_collapsible:s=!1,default_collapsed:i=!1,block_id:u}=e.data,[o,k]=Y_(!(s&&i)),m=s&&!o,c=pa($_,{children:[(t==null?void 0:t.image_url)&&ge("span",{className:"shrink-0 slack_blocks_to_jsx__container_icon",children:ge("img",{src:t.image_url,alt:t.alt_text||"",className:"w-5 h-5 rounded object-cover"})}),pa("span",{className:"flex flex-col min-w-0 flex-1 slack_blocks_to_jsx__container_title_group",children:[r&&ge("span",{className:"font-bold text-black-primary dark:text-dark-text-primary truncate slack_blocks_to_jsx__container_title",children:ge(N,{data:r})}),n&&ge("span",{className:"text-small text-black-secondary dark:text-dark-text-secondary truncate slack_blocks_to_jsx__container_subtitle",children:ge(N,{data:n})})]}),s&&ge("span",{"aria-hidden":"true",className:Y(["shrink-0 transition-transform slack_blocks_to_jsx__container_caret",m?"-rotate-90":""]),children:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:"w-4 h-4",children:ge("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.72 7.47a.75.75 0 0 1 1.06 0L10 10.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0L5.72 8.53a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})})]});return pa("div",{id:u,role:"group","aria-label":r==null?void 0:r.text,className:Y(["my-2 rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary overflow-hidden slack_blocks_to_jsx__container",Q_[l]]),children:[s?ge("button",{type:"button","aria-expanded":o,onClick:()=>k(p=>!p),className:"w-full flex items-center gap-2 p-3 text-left slack_blocks_to_jsx__container_header",children:c}):ge("div",{className:"flex items-center gap-2 p-3 slack_blocks_to_jsx__container_header",children:c}),!m&&ge("div",{className:"px-3 pb-3 slack_blocks_to_jsx--blocks slack_blocks_to_jsx__container_content",children:a.map((p,A)=>{let E=nt(p);return E?ge("div",{children:E},p.block_id||A):null})})]})};import{jsx as jr}from"react/jsx-runtime";var vn=e=>{let{inside:r="section"}=e,{alt_text:n,image_url:t}=e.data;return jr("div",{className:"relative",children:jr("img",{src:t,alt:n,className:`overflow-hidden object-cover slack_blocks_to_jsx__image_element ${r==="context"?"w-[20px] h-[20px] rounded-sm mr-1 mb-[5px]":"w-[88px] h-[88px] rounded-lg"}`})})};import{useEffect as q_,useMemo as X_,useState as at}from"react";import{Fragment as J_,jsx as pe,jsxs as Aa}from"react/jsx-runtime";var Yr=e=>{let{action_id:r,options:n,confirm:t,focus_on_load:a,initial_option:l,option_groups:s,placeholder:i}=e.data,[u,o]=at(a!=null?a:!1),[k,m]=at(""),[c,p]=at(l&&"value"in l?l.value:""),[A,E]=at(""),[f,I]=at(!1);q_(()=>{let w=P=>{var Re,C;let re=P.target;re.id!=="static_select_popup"&&re.id!=="static_select_dropdown_button"&&((Re=re.parentElement)==null?void 0:Re.id)!=="static_select_popup"&&((C=re.parentElement)==null?void 0:C.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]);let g=X_(()=>s&&s.length>0?s.flatMap(w=>w.options):n,[n,s]).filter(w=>w.text.text.toLowerCase().includes(k.toLowerCase())),v=w=>{t?(E(w),I(!0)):(o(!1),p(w))},b=()=>{I(!1),o(!1),p(A),E("")},K=()=>{I(!1),E("")};return Aa(J_,{children:[Aa("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:0,children:[u&&pe("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:pe("div",{className:"flex flex-col",children:s&&s.length>0?s.map((w,P)=>Aa("div",{children:[pe("div",{className:"px-6 py-1 text-xs font-semibold text-black-secondary dark:text-dark-text-secondary uppercase",children:pe(N,{data:w.label})}),w.options.filter(re=>re.text.text.toLowerCase().includes(k.toLowerCase())).map((re,Re)=>pe("div",{className:"h-7 px-6 flex items-center select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,onClick:()=>v(re.value),children:pe(N,{data:re.text})},`${P}-${Re}`))]},P)):g.map((w,P)=>pe("div",{className:"h-7 px-6 flex items-center select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,onClick:()=>v(w.value),children:pe(N,{data:w.text})},P))})}),pe("input",{type:"text",value:k,onChange:w=>m(w.currentTarget.value),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select an item"}),!k&&pe("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:pe(N,{data:i!=null?i:{type:"plain_text",text:"Pick an option"}})}),pe("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(w=>!w)},children:pe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]}),f&&t&&pe(M1,{data:t,onConfirm:b,onCancel:K})]})};import{useEffect as Z_,useRef as U_,useState as Ea}from"react";import{Fragment as P_,jsx as E1,jsxs as fa}from"react/jsx-runtime";var Qr=e=>{let{action_id:r,options:n,focus_on_load:t,initial_options:a,confirm:l}=e.data,[s,i]=Ea(a?a.map(I=>I.value):[]),u=U_(null),[o,k]=Ea(null),[m,c]=Ea(!1);Z_(()=>{var T;let I=(T=n[0])==null?void 0:T.value;t&&u.current&&I&&!s.includes(I)&&u.current.focus()},[t]);let p=(I,T)=>{i(T?[...s,I]:s.filter(g=>g!==I))},A=(I,T)=>{l?(k({value:I,checked:T}),c(!0)):p(I,T)},E=()=>{o&&p(o.value,o.checked),c(!1),k(null)},f=()=>{c(!1),k(null)};return fa(P_,{children:[E1("div",{id:r,className:"my-1 flex w-full slack_blocks_to_jsx__checkboxes_element",children:E1("fieldset",{className:"flex flex-col gap-2",children:n.map((I,T)=>{let{text:g,value:v,description:b}=I;return fa("label",{className:"flex cursor-pointer items-baseline gap-3 select-none",htmlFor:`checkboxes-${r}-value-${v}-${T}`,children:[E1("div",{children:E1("input",{type:"checkbox",ref:T===0?u:void 0,id:`checkboxes-${r}-value-${v}-${T}`,checked:s.includes(v),onChange:K=>{A(v,K.target.checked)}})}),fa("div",{children:[E1(N,{data:g}),b&&E1(N,{className:"text-black-secondary dark:text-dark-text-secondary",data:b})]})]},T)})})}),m&&l&&E1(M1,{data:l,onConfirm:E,onCancel:f})]})};import{useEffect as eo,useState as $r}from"react";import{jsx as rt,jsxs as to}from"react/jsx-runtime";var qr=e=>{let{action_id:r,dispatch_action_config:n,focus_on_load:t,initial_value:a,max_length:l,min_length:s,multiline:i,placeholder:u}=e.data,[o,k]=$r(t!=null?t:!1),[m,c]=$r(a||"");return eo(()=>{let p=A=>{var f,I;let E=A.target;E.id!=="static_select_popup"&&E.id!=="static_select_dropdown_button"&&((f=E.parentElement)==null?void 0:f.id)!=="static_select_popup"&&((I=E.parentElement)==null?void 0:I.id)!=="static_select_dropdown_button"&&k(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),to("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__plain_text_input_element",tabIndex:0,children:[!m&&u&&rt("div",{className:"absolute left-2 top-2 text-black-primary.3 dark:text-dark-text-secondary",children:rt(N,{data:u})}),!m&&!u&&rt("div",{className:"absolute left-2 top-2 text-black-primary.3 dark:text-dark-text-secondary",children:rt(N,{data:{type:"plain_text",text:"Write something"}})}),rt("textarea",{value:m,onChange:p=>c(p.target.value),className:"w-full focus:outline-none rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary p-2",minLength:s,maxLength:l,style:{maxHeight:"200px",minHeight:"80px",height:"100px"},"aria-label":"Select an item"})]})};import{useEffect as no,useState as Ia}from"react";import{jsx as oe,jsxs as ya}from"react/jsx-runtime";var Xr=e=>{let{action_id:r,focus_on_load:n,placeholder:t,type:a,confirm:l,initial_user:s,people:i=[]}=e.data,[u,o]=Ia(n||!1),[k,m]=Ia(""),[c,p]=Ia("");no(()=>{let E=f=>{var T,g;let I=f.target;I.id!=="static_select_popup"&&I.id!=="static_select_dropdown_button"&&((T=I.parentElement)==null?void 0:T.id)!=="static_select_popup"&&((g=I.parentElement)==null?void 0:g.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]);let A=i.filter(E=>{let f=k.toLowerCase().trim();return f?E.name.toLowerCase().includes(f):!0},[]);return ya("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__users_select_element",tabIndex:0,children:[u&&oe("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:oe("div",{className:"flex flex-col",children:A.map((E,f)=>ya("button",{className:"h-7 px-6 flex group items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,type:"button",onClick:()=>{o(!1),p(E.id)},children:[E.image&&oe("img",{src:E.image,alt:E.name,className:"w-5 h-5 rounded-md overflow-hidden"}),!E.image&&oe("div",{className:"w-5 h-5 rounded-md overflow-hidden bg-gray-300 dark:bg-dark-text-high text-black-primary dark:text-dark-text-primary font-semibold flex items-center justify-center",children:oe("span",{children:E.name[0]||""})}),oe(N,{data:{type:"mrkdwn",text:`*${E.name}*`}}),ya("div",{className:"relative",children:[E.online&&oe("div",{className:"bg-green-secondary w-[9px] h-[9px] rounded-full shrink-0"}),!E.online&&oe("div",{className:"w-[9px] h-[9px] rounded-full border-[1.5px] shrink-0 border-black-secondary group-hover:border-white-primary"}),E.sleeping&&oe("div",{className:"absolute -top-[5px] -right-[5px] h-[10px] w-[10px] rounded-full bg-white-secondary flex justify-center z-[10] text-[8px] leading-[8px] font-semibold group-hover:bg-blue-primary",children:"z"})]}),oe("div",{className:"text-black-primary dark:text-dark-text-primary group-hover:text-white-primary",children:E.name})]},f))})}),oe("input",{type:"text",value:k,onClick:()=>o(!0),onChange:E=>m(E.currentTarget.value),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select an item"}),!k&&oe("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:oe(N,{data:t!=null?t:{type:"plain_text",text:"Pick an option"}})}),oe("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(E=>!E)},children:oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:oe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{useEffect as ao,useRef as ro,useState as lo}from"react";import{jsx as Ta,jsxs as so}from"react/jsx-runtime";var Jr=e=>{let{action_id:r,initial_date:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=lo(n||""),i=ro(null);return ao(()=>{t&&i.current&&i.current.focus()},[t]),so("div",{id:r,className:"relative text-small w-[190px] slack_blocks_to_jsx__date_picker_element",children:[!l&&a&&Ta("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:Ta(N,{data:a})}),Ta("input",{ref:i,type:"date",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a date"})]})};import{useEffect as io,useRef as uo,useState as _o}from"react";import{jsx as ha,jsxs as oo}from"react/jsx-runtime";var Zr=e=>{let{action_id:r,initial_time:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=_o(n||""),i=uo(null);return io(()=>{t&&i.current&&i.current.focus()},[t]),oo("div",{id:r,className:"relative text-small w-[190px] slack_blocks_to_jsx__time_picker_element",children:[!l&&a&&ha("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:ha(N,{data:a})}),ha("input",{ref:i,type:"time",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a time"})]})};import{useEffect as ko,useRef as co,useState as Ur}from"react";import{jsx as Pr,jsxs as po}from"react/jsx-runtime";var mo=e=>{if(!e)return{date:"",time:""};let r=new Date(e*1e3),n=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),a=String(r.getDate()).padStart(2,"0"),l=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0");return{date:`${n}-${t}-${a}`,time:`${l}:${s}`}},el=e=>{let{action_id:r,initial_date_time:n,focus_on_load:t}=e.data,a=mo(n),[l,s]=Ur(a.date),[i,u]=Ur(a.time),o=co(null);return ko(()=>{t&&o.current&&o.current.focus()},[t]),po("div",{id:r,className:"flex items-center gap-2 text-small slack_blocks_to_jsx__datetime_picker_element",children:[Pr("input",{ref:o,type:"date",value:l,onChange:k=>s(k.target.value),className:"py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a date"}),Pr("input",{type:"time",value:i,onChange:k=>u(k.target.value),className:"py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Select a time"})]})};import{useEffect as Ao,useRef as Eo,useState as fo}from"react";import{jsx as lt,jsxs as Io}from"react/jsx-runtime";var tl=e=>{let{action_id:r,initial_value:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=fo(n||""),i=Eo(null);return Ao(()=>{t&&i.current&&i.current.focus()},[t]),Io("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__email_input_element",children:[!l&&a&<("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:lt(N,{data:a})}),!l&&!a&<("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:lt(N,{data:{type:"plain_text",text:"Enter an email address"}})}),lt("input",{ref:i,type:"email",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter an email address"})]})};import{useEffect as yo,useRef as To,useState as ho}from"react";import{jsx as st,jsxs as No}from"react/jsx-runtime";var nl=e=>{let{action_id:r,initial_value:n,focus_on_load:t,placeholder:a}=e.data,[l,s]=ho(n||""),i=To(null);return yo(()=>{t&&i.current&&i.current.focus()},[t]),No("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__url_input_element",children:[!l&&a&&st("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:st(N,{data:a})}),!l&&!a&&st("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:st(N,{data:{type:"plain_text",text:"Enter a URL"}})}),st("input",{ref:i,type:"url",value:l,onChange:u=>s(u.target.value),className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter a URL"})]})};import{useEffect as go,useRef as vo,useState as Ro}from"react";import{jsx as it,jsxs as So}from"react/jsx-runtime";var al=e=>{let{action_id:r,is_decimal_allowed:n,initial_value:t,min_value:a,max_value:l,focus_on_load:s,placeholder:i}=e.data,[u,o]=Ro(t||""),k=vo(null);return go(()=>{s&&k.current&&k.current.focus()},[s]),So("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__number_input_element",children:[!u&&i&&it("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:it(N,{data:i})}),!u&&!i&&it("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:it(N,{data:{type:"plain_text",text:"Enter a number"}})}),it("input",{ref:k,type:"number",value:u,onChange:m=>o(m.target.value),step:n?"any":"1",min:a,max:l,className:"w-full py-1 px-2 h-7 min-h-[28px] rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary focus:outline-none","aria-label":"Enter a number"})]})};import{useEffect as Oo,useRef as bo,useState as xo}from"react";import{jsx as H1,jsxs as rl}from"react/jsx-runtime";var ll=e=>{let{action_id:r,options:n,initial_option:t,focus_on_load:a}=e.data,[l,s]=xo((t==null?void 0:t.value)||""),i=bo(null);return Oo(()=>{a&&i.current&&i.current.focus()},[a]),H1("div",{id:r,className:"my-1 flex w-full slack_blocks_to_jsx__radio_buttons_element",children:H1("fieldset",{className:"flex flex-col gap-2",children:n.map((u,o)=>{let{text:k,value:m,description:c}=u;return rl("label",{className:"flex cursor-pointer items-baseline gap-3 select-none",htmlFor:`radio-${r}-value-${m}-${o}`,children:[H1("div",{children:H1("input",{type:"radio",ref:o===0?i:void 0,id:`radio-${r}-value-${m}-${o}`,name:r,checked:l===m,onChange:()=>s(m)})}),rl("div",{children:[H1(N,{data:k}),c&&H1(N,{className:"text-black-secondary dark:text-dark-text-secondary",data:c})]})]},o)})})})};import{useEffect as Lo,useState as Do}from"react";import{jsx as s1,jsxs as sl}from"react/jsx-runtime";var il=e=>{let{action_id:r,options:n}=e.data,[t,a]=Do(!1);return Lo(()=>{let l=s=>{var u,o;let i=s.target;i.id!==`overflow_menu_popup_${r}`&&i.id!==`overflow_menu_button_${r}`&&((u=i.parentElement)==null?void 0:u.id)!==`overflow_menu_popup_${r}`&&((o=i.parentElement)==null?void 0:o.id)!==`overflow_menu_button_${r}`&&a(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[r]),sl("div",{id:r,className:"relative inline-flex slack_blocks_to_jsx__overflow_menu_element",children:[s1("button",{type:"button",id:`overflow_menu_button_${r}`,className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",onClick:()=>a(l=>!l),"aria-label":"More options",children:sl("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",className:"w-4 h-4",children:[s1("circle",{cx:"8",cy:"3",r:"1.5"}),s1("circle",{cx:"8",cy:"8",r:"1.5"}),s1("circle",{cx:"8",cy:"13",r:"1.5"})]})}),t&&s1("div",{id:`overflow_menu_popup_${r}`,className:"absolute top-[30px] right-0 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[200px] max-h-[240px] overflow-auto py-1 z-20",children:s1("div",{className:"flex flex-col",children:n.slice(0,5).map((l,s)=>s1("div",{className:"h-7 px-4 flex items-center select-none cursor-pointer text-small hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link text-black-primary dark:text-dark-text-primary",tabIndex:0,onClick:()=>{a(!1),l.url&&window.open(l.url,"_blank")},children:s1(N,{data:l.text})},s))})})]})};import{jsx as C1,jsxs as wo}from"react/jsx-runtime";var ul=e=>{let{action_id:r,placeholder:n}=e.data;return wo("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__external_select_element",tabIndex:0,children:[C1("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:C1(N,{data:n!=null?n:{type:"plain_text",text:"Pick an option"}})}),C1("div",{className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",children:C1("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:C1("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}),C1("div",{className:"absolute -bottom-5 left-0 text-[10px] text-black-secondary dark:text-dark-text-secondary",children:"Requires external data source"})]})};import{useEffect as Mo,useState as Bo}from"react";import{jsx as ut,jsxs as Ho}from"react/jsx-runtime";var _l=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=Bo(n||!1);return Mo(()=>{let s=i=>{var o,k;let u=i.target;u.id!=="static_select_popup"&&u.id!=="static_select_dropdown_button"&&((o=u.parentElement)==null?void 0:o.id)!=="static_select_popup"&&((k=u.parentElement)==null?void 0:k.id)!=="static_select_dropdown_button"&&l(!1)};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[]),Ho("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__conversations_select_element",tabIndex:0,children:[ut("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:ut(N,{data:t!=null?t:{type:"plain_text",text:"Select a conversation"}})}),ut("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{l(s=>!s)},children:ut("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:ut("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{useEffect as Co,useState as Fo}from"react";import{jsx as _t,jsxs as Go}from"react/jsx-runtime";var ol=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=Fo(n||!1);return Co(()=>{let s=i=>{var o,k;let u=i.target;u.id!=="static_select_popup"&&u.id!=="static_select_dropdown_button"&&((o=u.parentElement)==null?void 0:o.id)!=="static_select_popup"&&((k=u.parentElement)==null?void 0:k.id)!=="static_select_dropdown_button"&&l(!1)};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[]),Go("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__channels_select_element",tabIndex:0,children:[_t("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:_t(N,{data:t!=null?t:{type:"plain_text",text:"Select a channel"}})}),_t("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{l(s=>!s)},children:_t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:_t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{useEffect as Ko,useState as Na}from"react";import{jsx as Ke,jsxs as ga}from"react/jsx-runtime";var kl=e=>{let{action_id:r,options:n,option_groups:t,initial_options:a,focus_on_load:l,placeholder:s,max_selected_items:i}=e.data,[u,o]=Na(l!=null?l:!1),[k,m]=Na(a?a.map(I=>I.value):[]),[c,p]=Na("");Ko(()=>{let I=T=>{var v,b;let g=T.target;g.id!=="static_select_popup"&&g.id!=="static_select_dropdown_button"&&((v=g.parentElement)==null?void 0:v.id)!=="static_select_popup"&&((b=g.parentElement)==null?void 0:b.id)!=="static_select_dropdown_button"&&o(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]);let E=(t?t.flatMap(I=>I.options):n).filter(I=>I.text.text.toLowerCase().includes(c.toLowerCase())),f=I=>{if(k.includes(I))m(k.filter(T=>T!==I));else{if(i&&k.length>=i)return;m([...k,I])}};return ga("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_static_select_element",tabIndex:0,children:[u&&Ke("div",{className:"absolute top-[24px] -left-3 bg-white-secondary dark:bg-dark-bg-secondary border border-gray-primary dark:border-dark-border rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",id:"static_select_popup",children:Ke("div",{className:"flex flex-col",children:E.map((I,T)=>ga("label",{className:"h-7 px-6 flex items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary dark:hover:bg-dark-link",tabIndex:0,children:[Ke("input",{type:"checkbox",checked:k.includes(I.value),onChange:()=>f(I.value),className:"shrink-0"}),Ke(N,{data:I.text})]},T))})}),Ke("input",{type:"text",value:c,onChange:I=>p(I.currentTarget.value),onClick:()=>o(!0),className:"w-full py-1 pr-7 focus:outline-none dark:bg-dark-bg-secondary dark:text-dark-text-primary",tabIndex:-1,"aria-label":"Select items"}),!c&&Ke("div",{className:"absolute w-full h-full pointer-events-none flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:k.length>0?ga("span",{className:"text-black-primary dark:text-dark-text-primary",children:[k.length," selected"]}):Ke(N,{data:s!=null?s:{type:"plain_text",text:"Select options"}})}),Ke("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",id:"static_select_dropdown_button",onClick:()=>{o(I=>!I)},children:Ke("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:Ke("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{jsx as F1,jsxs as Wo}from"react/jsx-runtime";var cl=e=>{let{action_id:r,placeholder:n}=e.data;return Wo("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_external_select_element",tabIndex:0,children:[F1("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:F1(N,{data:n!=null?n:{type:"plain_text",text:"Select options"}})}),F1("div",{className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",children:F1("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:F1("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}),F1("div",{className:"absolute -bottom-5 left-0 text-[10px] text-black-secondary dark:text-dark-text-secondary",children:"External data source"})]})};import{jsx as ot,jsxs as ml}from"react/jsx-runtime";var pl=e=>{let{action_id:r,placeholder:n,initial_users:t}=e.data;return ml("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_users_select_element",tabIndex:0,children:[ot("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?ml("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):ot(N,{data:n!=null?n:{type:"plain_text",text:"Select users"}})}),ot("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:ot("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:ot("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{jsx as kt,jsxs as Al}from"react/jsx-runtime";var El=e=>{let{action_id:r,placeholder:n,initial_conversations:t}=e.data;return Al("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_conversations_select_element",tabIndex:0,children:[kt("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?Al("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):kt(N,{data:n!=null?n:{type:"plain_text",text:"Select conversations"}})}),kt("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:kt("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:kt("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{jsx as ct,jsxs as fl}from"react/jsx-runtime";var Il=e=>{let{action_id:r,placeholder:n,initial_channels:t}=e.data;return fl("div",{id:r,className:"py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary slack_blocks_to_jsx__multi_channels_select_element",tabIndex:0,children:[ct("div",{className:"w-full flex items-center text-black-primary.3 dark:text-dark-text-secondary",children:t&&t.length>0?fl("span",{className:"text-black-primary dark:text-dark-text-primary",children:[t.length," selected"]}):ct(N,{data:n!=null?n:{type:"plain_text",text:"Select channels"}})}),ct("button",{type:"button",className:"absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary dark:text-dark-text-secondary z-10 h-full",onClick:()=>{},children:ct("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"3",stroke:"currentColor",className:"w-3 h-3",children:ct("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})};import{jsx as G1,jsxs as zo}from"react/jsx-runtime";var yl=e=>{let{action_id:r,positive_button:n,negative_button:t}=e.data;return zo("div",{id:r,className:"flex items-center gap-1 slack_blocks_to_jsx__feedback_buttons_element",children:[G1("button",{type:"button","aria-label":n.accessibility_label||"Positive feedback",className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-green-50 dark:hover:bg-dark-bg-secondary",children:G1("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:G1("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V3a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z"})})}),G1("button",{type:"button","aria-label":t.accessibility_label||"Negative feedback",className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-red-50 dark:hover:bg-dark-bg-secondary",children:G1("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:G1("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54"})})})]})};import{jsx as da,jsxs as Vo}from"react/jsx-runtime";var Tl=e=>{let{action_id:r,icon:n,text:t,accessibility_label:a}=e.data;return Vo("button",{type:"button",id:r,"aria-label":a||t.text,title:t.text,className:"flex items-center justify-center w-7 h-7 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary hover:bg-gray-100 dark:hover:bg-dark-bg-secondary slack_blocks_to_jsx__icon_button_element",children:[n==="trash"&&da("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:da("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})}),n!=="trash"&&da("span",{className:"text-xs font-medium",children:n})]})};import{jsx as hl,jsxs as Rn}from"react/jsx-runtime";var Nl=e=>{let{action_id:r,filetypes:n,max_files:t}=e.data;return Rn("div",{id:r,className:"flex flex-col gap-2 text-small w-full slack_blocks_to_jsx__file_input_element",children:[hl("div",{className:"flex items-center justify-center w-full h-[80px] rounded border-2 border-dashed border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary",children:Rn("div",{className:"flex flex-col items-center gap-1",children:[hl("button",{type:"button",className:"px-3 py-1 rounded border border-black-primary.3 dark:border-dark-border text-black-primary dark:text-dark-text-primary text-small font-medium hover:bg-gray-100 dark:hover:bg-dark-bg-secondary",children:"Choose file"}),t&&Rn("span",{className:"text-[10px] text-black-secondary dark:text-dark-text-secondary",children:["Max ",t," file",t>1?"s":""]})]})}),n&&n.length>0&&Rn("div",{className:"text-[11px] text-black-secondary dark:text-dark-text-secondary",children:["Accepted: ",n.join(", ")]})]})};import{useEffect as jo,useRef as Yo,useState as Qo}from"react";import{jsx as mt,jsxs as $o}from"react/jsx-runtime";var gl=e=>{let{action_id:r,focus_on_load:n,placeholder:t}=e.data,[a,l]=Qo(""),s=Yo(null);return jo(()=>{n&&s.current&&s.current.focus()},[n]),$o("div",{id:r,className:"relative text-small w-full slack_blocks_to_jsx__rich_text_input_element",children:[!a&&t&&mt("div",{className:"absolute left-2 top-2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:mt(N,{data:t})}),!a&&!t&&mt("div",{className:"absolute left-2 top-2 pointer-events-none text-black-primary.3 dark:text-dark-text-secondary",children:mt(N,{data:{type:"plain_text",text:"Write something..."}})}),mt("div",{ref:s,contentEditable:!0,suppressContentEditableWarning:!0,onInput:i=>l(i.target.textContent||""),className:"w-full focus:outline-none rounded border border-black-primary.3 dark:border-dark-border dark:bg-dark-bg-secondary dark:text-dark-text-primary text-black-primary p-2",style:{maxHeight:"200px",minHeight:"80px",overflowY:"auto"},role:"textbox","aria-label":"Rich text editor"})]})};import{jsx as qo}from"react/jsx-runtime";var dl=e=>{let{url:r,text:n}=e.data;return qo("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-blue-primary dark:text-dark-link hover:underline text-small slack_blocks_to_jsx__url_source_element",children:n})};import{jsx as vl}from"react/jsx-runtime";var Rl=e=>{let{text:r,action_id:n,style:t,accessibility_label:a}=e.data;return vl("button",{type:"button",id:n,"aria-label":a,className:Y(["px-2 pt-0 pb-[1px] text-small h-[28px] min-w-[56px] border rounded whitespace-nowrap font-semibold","slack_blocks_to_jsx__workflow_button_element",t==="primary"?"bg-green-primary text-white-primary":t==="danger"?"bg-red-primary text-white-primary":"border-black-primary.3 text-black-primary dark:border-dark-border dark:text-dark-text-primary"]),children:vl(N,{data:r})})};import{jsx as Sn}from"react/jsx-runtime";var Sl=e=>{let{elements:r,block_id:n}=e.data;return Sn("div",{id:n,className:"my-1 text-primary flex w-full text-black-primary dark:text-dark-text-primary flex-wrap items-center overflow-hidden slack_blocks_to_jsx__context",children:r.slice(0,10).map((t,a)=>t.type!=="image"?Sn("div",{className:"text-black-secondary dark:text-dark-text-secondary text-small pr-3 flex items-center",children:Sn(N,{data:t})},a):Sn(vn,{inside:"context",data:t},a))})};import{jsx as va}from"react/jsx-runtime";var Ol=e=>{let{elements:r,block_id:n}=e.data;return va("div",{id:n,className:"my-1 text-primary flex w-full text-black-primary dark:text-dark-text-primary items-center slack_blocks_to_jsx__context_actions",children:va("div",{className:"flex flex-wrap",children:r.slice(0,5).map((t,a)=>va("div",{className:"mt-2 mr-2",children:qe(t)},a))})})};import{useMemo as Xo,useRef as Fl,useState as Oa}from"react";import{Fragment as o0,jsx as L,jsxs as ke}from"react/jsx-runtime";var bl=["rgb(191, 77, 26)","rgb(38, 59, 156)","rgb(16, 111, 77)","rgb(217, 76, 117)"],Gl=e=>bl[e%bl.length],Sa=(e,r,n)=>Math.max(r,Math.min(n,e)),te=e=>Math.round(e*100)/100,xl=(e,r)=>{let n=Math.floor(Math.log10(e||1)),t=e/Math.pow(10,n),a;return r?t<1.5?a=1:t<3?a=2:t<7?a=5:a=10:t<=1?a=1:t<=2?a=2:t<=5?a=5:a=10,a*Math.pow(10,n)},Jo=(e,r,n=5)=>{if(!isFinite(e)||!isFinite(r))return[0,1];if(e===r){if(e===0)return[0,1];e=Math.min(0,e),r=Math.max(0,r)}let t=xl(r-e,!1),a=xl(t/Math.max(1,n-1),!0),l=Math.floor(e/a)*a,s=Math.ceil(r/a)*a,i=[];for(let u=l;u<=s+a*.5;u+=a)i.push(Math.round(u*1e6)/1e6);return i},Ll=e=>String(Math.round(e*100)/100),Zo=e=>{if(e===0)return"0";let r=Math.abs(e);return r>=1e6?Ll(e/1e6)+"M":r>=1e4?Ll(e/1e3)+"k":e.toLocaleString("en-US")},Kl=e=>e.toLocaleString("en-US"),Dl=(e,r)=>e.length===0?"":e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}${r?",":""} and ${e[e.length-1]}`,Uo=e=>{let r=e.length;if(r===0)return"";if(r===1)return`M ${te(e[0][0])} ${te(e[0][1])}`;if(r===2)return`M ${te(e[0][0])} ${te(e[0][1])} L ${te(e[1][0])} ${te(e[1][1])}`;let n=e.map(u=>u[0]),t=e.map(u=>u[1]),a=[],l=[];for(let u=0;u<r-1;u++)a[u]=n[u+1]-n[u],l[u]=a[u]===0?0:(t[u+1]-t[u])/a[u];let s=new Array(r);s[0]=l[0],s[r-1]=l[r-2];for(let u=1;u<r-1;u++)l[u-1]*l[u]<=0?s[u]=0:s[u]=(l[u-1]+l[u])/2;for(let u=0;u<r-1;u++){if(l[u]===0){s[u]=0,s[u+1]=0;continue}let o=s[u]/l[u],k=s[u+1]/l[u],m=Math.hypot(o,k);if(m>3){let c=3/m;s[u]=c*o*l[u],s[u+1]=c*k*l[u]}}let i=[`M ${te(n[0])} ${te(t[0])}`];for(let u=0;u<r-1;u++){let o=n[u]+a[u]/3,k=t[u]+s[u]*a[u]/3,m=n[u+1]-a[u]/3,c=t[u+1]-s[u+1]*a[u]/3;i.push(`C ${te(o)} ${te(k)} ${te(m)} ${te(c)} ${te(n[u+1])} ${te(t[u+1])}`)}return i.join(" ")},Po=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e,e0=(e,r,n)=>{if(typeof document=="undefined")return;let t=[r,...n].map(i=>i.map(Po).join(",")).join(`
|
|
15
15
|
`),a=new Blob([t],{type:"text/csv;charset=utf-8"}),l=URL.createObjectURL(a),s=document.createElement("a");s.href=l,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(l)},t0=e=>{var l,s;let r=e.series||[],n=e.axis_config||{},t=n.categories&&n.categories.length>0?n.categories.slice():[];if(t.length===0){let i;for(let u of r)(!i||(((l=u.data)==null?void 0:l.length)||0)>(((s=i.data)==null?void 0:s.length)||0))&&(i=u);t=((i==null?void 0:i.data)||[]).map(u=>u.label)}let a=r.map((i,u)=>{var m;let o=new Map;(i.data||[]).forEach(c=>o.set(c.label,c.value));let k=t.map((c,p)=>{if(o.has(c))return o.get(c);let A=(i.data||[])[p];return A?A.value:null});return{name:(m=i.name)!=null?m:`Series ${u+1}`,color:Gl(u),values:k}});return{categories:t,series:a,xLabel:n.x_label,yLabel:n.y_label}},n0=e=>{let r=(e.segments||[]).filter(a=>typeof a.value=="number"),n=r.reduce((a,l)=>a+Math.max(0,l.value),0);return{segments:r.map((a,l)=>({label:a.label,value:a.value,color:Gl(l),pct:n>0?Math.round(Math.max(0,a.value)/n*100):0})),total:n}},Wl=e=>ke("div",{className:"absolute z-20 pointer-events-none whitespace-nowrap rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary px-3 py-2 text-small shadow-lg slack_blocks_to_jsx__data_visualization_tooltip",style:{left:e.left,top:e.top,transform:`translate(${e.flip?"calc(-100% - 12px)":"12px"}, -50%)`},children:[e.header&&L("div",{className:"mb-1 font-medium text-black-primary dark:text-dark-text-primary",children:e.header}),L("div",{className:"flex flex-col gap-1",children:e.rows.map((r,n)=>ke("div",{className:"flex items-center justify-between gap-6",children:[ke("span",{className:"flex items-center gap-2",children:[L("span",{className:"inline-block w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:r.color}}),L("span",{className:"text-black-secondary dark:text-dark-text-secondary",children:r.name})]}),L("span",{className:"font-semibold tabular-nums text-black-primary dark:text-dark-text-primary",children:r.value})]},n))})]}),On=520,Ra=300,bn={top:14,right:16,bottom:48,left:60},wl=e=>L("path",{d:e.d,fill:"none",stroke:e.color,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),a0=e=>{let{model:r,type:n,ariaLabel:t}=e,{categories:a,series:l,xLabel:s,yLabel:i}=r,u=Fl(null),[o,k]=Oa(null),m=Xo(()=>{let O=bn.left,h=On-bn.right,S=bn.top,G=Ra-bn.bottom,F=h-O,$=G-S,U=[];l.forEach(De=>De.values.forEach(we=>we!=null&&U.push(we)));let Ee=U.length?Math.min(...U):0,i1=U.length?Math.max(...U):1;n!=="line"?(Ee=Math.min(0,Ee),i1=Math.max(0,i1)):Ee<0&&(i1=Math.max(0,i1));let At=Jo(Ee,i1,5),Et=At[0],Dn=At[At.length-1],Ts=Dn-Et||1,wn=De=>S+(1-(De-Et)/Ts)*$,W1=a.length,Ca=De=>W1<=1?O+F/2:O+De/(W1-1)*F,Mn=W1>0?F/W1:F,hs=De=>O+(De+.5)*Mn,Bn=wn(Math.min(Math.max(0,Et),Dn)),Ns=Et<0&&Dn>0,Hn=Mn*.7,gs=l.length>0?Hn/l.length:Hn,ds=l.map(De=>{let we=[];De.values.forEach((Ga,Rs)=>{Ga!=null&&we.push([Ca(Rs),wn(Ga)])});let Fa=we.length>0?Uo(we):"",vs=we.length>0?`${Fa} L ${te(we[we.length-1][0])} ${te(Bn)} L ${te(we[0][0])} ${te(Bn)} Z`:"";return{color:De.color,line:Fa,area:vs}});return{plotLeft:O,plotRight:h,plotTop:S,plotBottom:G,plotW:F,ticks:At,yOf:wn,count:W1,xPoint:Ca,bandWidth:Mn,xBand:hs,baselineY:Bn,showZeroLine:Ns,groupWidth:Hn,barWidth:gs,seriesPaths:ds}},[r,n]),{plotLeft:c,plotRight:p,plotTop:A,plotBottom:E,plotW:f,ticks:I,yOf:T,count:g,xPoint:v,bandWidth:b,xBand:K,baselineY:w,showZeroLine:P,groupWidth:re,barWidth:Re,seriesPaths:C}=m,ae=O=>{let h=u.current;if(!h||g===0)return;let S=h.getBoundingClientRect();if(S.width===0)return;let G=O.clientX-S.left,F=Sa(O.clientY-S.top,44,Math.max(44,S.height-44)),$=G/S.width*On,U=n==="bar"?Math.floor(($-c)/b):g<=1?0:Math.round(($-c)/(f/(g-1)));U=Sa(U,0,g-1),k({index:U,x:G,y:F})},Z=o?n==="bar"?K(o.index):v(o.index):null,le=Z!=null?Z/On*100:0,ee=le>58;return ke("div",{ref:u,className:"relative slack_blocks_to_jsx__data_visualization_plot",onPointerMove:ae,onPointerDown:ae,onPointerLeave:()=>k(null),children:[ke("svg",{viewBox:`0 0 ${On} ${Ra}`,role:"img","aria-label":t,preserveAspectRatio:"xMidYMid meet",className:"w-full h-auto text-black-secondary dark:text-dark-text-max slack_blocks_to_jsx__data_visualization_chart",style:{fontFamily:"Lato, Slack-Lato, sans-serif"},children:[I.map((O,h)=>{let S=T(O);return ke("g",{children:[L("line",{x1:c,y1:S,x2:p,y2:S,stroke:"currentColor",strokeOpacity:O===0&&P?.45:.16}),L("text",{x:c-8,y:S,textAnchor:"end",dominantBaseline:"central",fill:"currentColor",fontSize:11,children:Zo(O)})]},`grid-${h}`)}),n==="area"&&C.map((O,h)=>O.area?ke("g",{children:[L("path",{d:O.area,fill:O.color,fillOpacity:.22}),L(wl,{d:O.line,color:O.color})]},`area-${h}`):null),n==="line"&&C.map((O,h)=>O.line?L(wl,{d:O.line,color:O.color},`line-${h}`):null),n==="bar"&&l.map((O,h)=>L("g",{children:O.values.map((S,G)=>{if(S==null)return null;let $=K(G)-re/2+h*Re,U=T(S),Ee=Math.min(U,w),i1=Math.max(1,Math.abs(U-w));return L("rect",{x:$,y:Ee,width:Math.max(1,Re-1),height:i1,rx:2,fill:O.color},G)})},`bar-${h}`)),a.map((O,h)=>L("text",{x:n==="bar"?K(h):v(h),y:E+16,textAnchor:"middle",fill:"currentColor",fontSize:11,children:O},`x-${h}`)),s&&L("text",{x:(c+p)/2,y:Ra-6,textAnchor:"middle",fill:"currentColor",fontSize:12,children:s}),i&&L("text",{transform:`translate(14 ${(A+E)/2}) rotate(-90)`,textAnchor:"middle",fill:"currentColor",fontSize:12,children:i}),Z!=null&&L("line",{x1:Z,y1:A,x2:Z,y2:E,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4",strokeOpacity:.7}),o&&n!=="bar"&&l.map((O,h)=>{let S=O.values[o.index];return S==null?null:L("circle",{cx:v(o.index),cy:T(S),r:4,style:{fill:O.color},strokeWidth:1.5,className:"stroke-white-primary dark:stroke-dark-bg-secondary"},`dot-${h}`)})]}),o&&L(Wl,{left:`${le}%`,top:o.y,flip:ee,header:a[o.index],rows:l.map(O=>({name:O.name,value:O.values[o.index]==null?"\u2014":Kl(O.values[o.index]),color:O.color}))})]})},Ml=(e,r,n,t)=>{let a=(t-90)*Math.PI/180;return[e+n*Math.cos(a),r+n*Math.sin(a)]},r0=(e,r,n,t,a)=>{let[l,s]=Ml(e,r,n,t),[i,u]=Ml(e,r,n,a),o=a-t>180?1:0;return`M ${te(e)} ${te(r)} L ${te(l)} ${te(s)} A ${n} ${n} 0 ${o} 1 ${te(i)} ${te(u)} Z`},Bl=110,Hl=110,Cl=92,l0=e=>{var A,E;let{model:r,ariaLabel:n}=e,t=Fl(null),[a,l]=Oa(null),s=r.segments.filter(f=>Math.max(0,f.value)>0);if(s.length===0||r.total<=0)return null;let i=0,u=s.map((f,I)=>{let T=Math.max(0,f.value)/r.total,g=i,v=i+T*360;return i=v,{seg:f,index:I,start:g,end:v,full:T>=.999}}),o=(f,I)=>{let T=t.current;if(!T)return;let g=T.getBoundingClientRect(),v=I.clientX-g.left,b=Sa(I.clientY-g.top,18,Math.max(18,g.height-18));l({seg:f,x:v,y:b})},k=a?[...u.filter(f=>f.index!==a.seg),u.find(f=>f.index===a.seg)]:u,m=a?u.find(f=>f.index===a.seg):void 0,c=(E=(A=t.current)==null?void 0:A.clientWidth)!=null?E:200,p=a?a.x>c*.58:!1;return ke("div",{ref:t,className:"relative inline-block",onPointerLeave:()=>l(null),children:[L("svg",{viewBox:"0 0 220 220",role:"img","aria-label":n,preserveAspectRatio:"xMidYMid meet",className:"w-[200px] h-[200px] max-w-full text-white-primary dark:text-dark-bg-secondary slack_blocks_to_jsx__data_visualization_chart",children:k.map(f=>{let I=a&&a.seg===f.index?Cl*1.07:Cl,T={onPointerEnter:g=>o(f.index,g),onPointerMove:g=>o(f.index,g)};return f.full?L("circle",R({cx:Bl,cy:Hl,r:I,style:{fill:f.seg.color},stroke:"currentColor",strokeWidth:2},T),f.index):L("path",R({d:r0(Bl,Hl,I,f.start,f.end),style:{fill:f.seg.color},stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"},T),f.index)})}),a&&m&&L(Wl,{left:`${a.x}px`,top:a.y,flip:p,rows:[{name:m.seg.label,value:Kl(m.seg.value),color:m.seg.color}]})]})},s0=e=>e.items.length===0?null:L("div",{"aria-hidden":"true",className:"mt-2 flex flex-wrap items-center justify-center gap-x-4 gap-y-1 slack_blocks_to_jsx__data_visualization_legend",children:e.items.map((r,n)=>ke("span",{className:"inline-flex items-center gap-1.5 text-small text-black-secondary dark:text-dark-text-secondary",children:[L("span",{className:"inline-block w-2.5 h-2.5 rounded-sm shrink-0 slack_blocks_to_jsx__data_visualization_swatch",style:{backgroundColor:r.color}}),r.name]},n))}),i0=e=>L("div",{className:"overflow-x-auto slack_blocks_to_jsx__data_visualization_table",children:ke("table",{className:"border-collapse text-small",children:[L("thead",{children:L("tr",{children:e.header.map((r,n)=>L("th",{className:"px-2.5 py-1.5 text-left font-semibold border-b border-gray-200 dark:border-dark-border whitespace-nowrap",children:r},n))})}),L("tbody",{children:e.rows.map((r,n)=>L("tr",{children:r.map((t,a)=>L("td",{className:"px-2.5 py-1.5 border-b border-gray-100 dark:border-dark-border/60 whitespace-nowrap",children:t},a))},n))})]})}),u0=()=>ke("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"w-4 h-4",children:[L("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.3"}),L("path",{d:"M2 6.5h12M6.5 6.5V13",stroke:"currentColor",strokeWidth:"1.3"})]}),_0=()=>ke("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"w-4 h-4",children:[L("path",{d:"M8 2.5v7m0 0 2.5-2.5M8 9.5 5.5 7",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),L("path",{d:"M3 11v1.5A1.5 1.5 0 0 0 4.5 14h7a1.5 1.5 0 0 0 1.5-1.5V11",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]}),zl=e=>{let{title:r,chart:n,block_id:t}=e.data,[a,l]=Oa(!1);if(!n||!n.type)return null;let s=null,i=[],u=[],o=[];if(n.type==="pie"){let k=n0(n);if(k.segments.length===0)return null;let m=`Pie chart${r?`: ${r}`:""}, with ${k.segments.length} segment${k.segments.length===1?"":"s"}. Segments: ${Dl(k.segments.map(c=>`${c.label} (${c.pct}%)`),!0)}.`;s=L("div",{className:"flex flex-col items-center",children:L(l0,{model:k,ariaLabel:m})}),i=k.segments.map(c=>({name:`${c.label} \xB7 ${c.pct}%`,color:c.color})),u=["Segment","Value","Percent"],o=k.segments.map(c=>[c.label,String(c.value),`${c.pct}%`])}else{let k=t0(n);if(k.series.length===0||k.categories.length===0)return null;let m=n.type==="line"?"Line":n.type==="bar"?"Bar":"Area",c=k.series.map(E=>E.name),p=k.xLabel&&k.yLabel?` The X axis is ${k.xLabel}, the Y axis is ${k.yLabel}.`:"",A=`${m} chart${r?`: ${r}`:""}.${p} There ${c.length===1?"is":"are"} ${c.length} series: ${Dl(c,!1)}.`;s=L(a0,{model:k,type:n.type,ariaLabel:A}),i=k.series.map(E=>({name:E.name,color:E.color})),u=[k.xLabel||"",...k.series.map(E=>E.name)],o=k.categories.map((E,f)=>[E,...k.series.map(I=>{let T=I.values[f];return T==null?"":String(T)})])}return ke("div",{id:t,className:"my-2 w-full max-w-[540px] rounded-lg border border-black-primary/[0.13] dark:border-dark-border bg-white-primary dark:bg-dark-bg-secondary px-3 py-2.5 slack_blocks_to_jsx__data_visualization",children:[ke("div",{className:"flex items-start gap-2",children:[r&&L("h3",{className:"flex-1 min-w-0 m-0 text-header font-semibold leading-snug text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__data_visualization_title",children:r}),ke("div",{className:"flex items-center gap-0.5 shrink-0 ml-auto",role:"group",children:[L("button",{type:"button","aria-label":"View as table","aria-pressed":a,onClick:()=>l(k=>!k),className:`p-1 rounded text-black-secondary dark:text-dark-text-secondary hover:bg-black-primary/[0.06] dark:hover:bg-white-primary/[0.08] slack_blocks_to_jsx__data_visualization_action ${a?"bg-black-primary/[0.08] dark:bg-white-primary/[0.1]":""}`,children:L(u0,{})}),L("button",{type:"button","aria-label":"Download chart data",onClick:()=>e0(`${r||"chart"}.csv`,u,o),className:"p-1 rounded text-black-secondary dark:text-dark-text-secondary hover:bg-black-primary/[0.06] dark:hover:bg-white-primary/[0.08] slack_blocks_to_jsx__data_visualization_action",children:L(_0,{})})]})]}),L("div",{className:"mt-1.5",children:a?L(i0,{header:u,rows:o}):ke(o0,{children:[s,L(s0,{items:i})]})})]})};import{jsx as k0}from"react/jsx-runtime";var Vl=e=>{let{data:r}=e,{block_id:n}=r;return k0("div",{id:n,className:"border-b border-gray-primary dark:border-dark-border border-solid w-full mt-1 mb-2 slack_blocks_to_jsx__divider"})};var jl=e=>{let{type:r}=e.data;return null};import{jsx as ba}from"react/jsx-runtime";var c0={1:"text-[28px] leading-[1.2]",2:"text-[22px] leading-[1.27]",3:"text-header",4:"text-base"},Yl=e=>{let{text:r,block_id:n,level:t}=e.data,a=t?c0[t]:"text-header",l=t?`h${t}`:"h3";return ba("div",{id:n,className:"mt-1 slack_blocks_to_jsx__header",children:ba(l,{className:`${a} font-semibold text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__header_heading`,"data-header-level":t!=null?t:3,children:ba(N,{data:r})})})};import{useState as m0}from"react";import{jsx as f1,jsxs as Ql}from"react/jsx-runtime";var $l=e=>{let{block_id:r,alt_text:n,image_url:t,slack_file:a,image_bytes:l,image_height:s,image_width:i,title:u}=e.data,o=t||(a==null?void 0:a.url),[k,m]=m0(!0),c=u==null?void 0:u.text;return Ql("div",{id:r,className:"my-2 flex flex-col gap-2 slack_blocks_to_jsx__image",children:[Ql("div",{className:"slack_blocks_to_jsx__image_media_trigger text-black-secondary dark:text-dark-text-secondary text-small flex gap-1 items-center",children:[c&&f1("span",{className:"slack_blocks_to_jsx__image_title",children:c}),l&&f1("span",{className:"slack_blocks_to_jsx__image_size",children:`(${Math.round(l/1e3)} kB)`}),f1("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>m(p=>!p),children:f1("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:k?"rotate(0deg)":"rotate(-90deg)"},children:f1("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),k&&f1("div",{className:"rounded-md overflow-hidden relative max-w-max",children:f1("img",{src:o,style:{width:i,height:s},alt:n})})]})};import{jsx as I1,jsxs as xa}from"react/jsx-runtime";var ql=e=>{let{element:r,label:n,block_id:t,hint:a}=e.data,l=r?qe(r):null;return I1("div",{id:t,className:"mt-2 mb-1 text-primary slack_blocks_to_jsx__input flex w-full text-black-primary dark:text-dark-text-primary",children:I1("div",{className:"grow",children:xa("div",{className:"flex flex-col gap-2",children:[I1(N,{data:{type:"mrkdwn",text:`*${n.text}*`,emoji:n.emoji,verbatim:n.verbatim}}),xa("div",{className:"mb-1 flex flex-col gap-1",children:[I1("div",{className:"relative shrink-0",children:l}),(a||(r==null?void 0:r.type)==="plain_text_input")&&xa("div",{className:"text-black-secondary dark:text-dark-text-secondary text-small flex gap-1",children:[a&&I1("div",{className:"inline",children:I1(N,{data:a})}),(r==null?void 0:r.type)==="plain_text_input"&&I1("p",{children:"\u21B5 Please 'enter' to submit"})]})]})]})})})};import A0 from"react-markdown";import E0 from"remark-gfm";var Da="slack-emoji",La=/:([a-zA-Z0-9_\-+']+):/g;function p0(e){var a,l;La.lastIndex=0;let r=La.exec(e);if(!r)return null;let n=[],t=0;for(;r;){let s=(a=r[0])!=null?a:"",i=(l=r[1])!=null?l:"",u=r.index;u>t&&n.push({type:"text",value:e.slice(t,u)}),n.push({type:"slackEmoji",value:s,data:{hName:Da,hProperties:{name:i}}}),t=u+s.length,r=La.exec(e)}return t<e.length&&n.push({type:"text",value:e.slice(t)}),n}function Xl(e){let r=e.children;if(!r)return;let n=[];for(let t of r){if(t.type==="code"||t.type==="inlineCode"){n.push(t);continue}if(t.type==="text"&&t.value){let a=p0(t.value);if(a){n.push(...a);continue}}Xl(t),n.push(t)}e.children=n}function Jl(){return e=>{Xl(e)}}import{jsx as Q}from"react/jsx-runtime";var f0=({node:e})=>{var n;let r=typeof((n=e==null?void 0:e.properties)==null?void 0:n.name)=="string"?e.properties.name:"";return Q(ye,{element:{type:"slack_emoji",value:r}})},I0={[Da]:f0},Zl=e=>{let{text:r,block_id:n}=e.data,t=r.replace(/\n/g,`
|
|
16
|
-
`);return Q("div",{id:n,className:"mt-2 mb-1 text-primary text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__markdown_block",children:Q(A0,{remarkPlugins:[E0,Jl],components:W(R({},I0),{h1:({children:a})=>Q("h1",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h2:({children:a})=>Q("h2",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h3:({children:a})=>Q("h3",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h4:({children:a})=>Q("h4",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h5:({children:a})=>Q("h5",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h6:({children:a})=>Q("h6",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),p:({children:a})=>Q("p",{className:"mb-0.5",children:a}),ul:({children:a})=>Q("ul",{className:"list-disc pl-6 mb-0.5",children:a}),ol:({children:a})=>Q("ol",{className:"list-decimal pl-6 mb-0.5",children:a}),li:s=>{var i=s,{children:a}=i,l=ze(i,["children"]);return l.className==="task-list-item"?Q("li",{className:"list-none flex items-start gap-1",children:a}):Q("li",{className:"mb-0.5",children:a})},input:s=>{var i=s,{checked:a}=i,l=ze(i,["checked"]);return l.type==="checkbox"?Q("input",{type:"checkbox",checked:a,readOnly:!0,className:"mt-1 mr-1"}):Q("input",R({},l))},a:({href:a,children:l})=>Q("a",{href:a,target:"_blank",rel:"noreferrer noopener",className:"text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:l}),code:({children:a,className:l})=>(l==null?void 0:l.includes("language-"))?Q("code",{className:"slack_code block p-2 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg dark:text-dark-text-primary w-full my-1 font-mono",children:a}):Q("code",{className:"slack_code_inline inline-block px-1 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg text-red-primary dark:text-dark-text-primary font-mono",children:a}),pre:({children:a})=>Q("pre",{className:"my-0.5",children:a}),blockquote:({children:a})=>Q("blockquote",{className:"relative pl-4 my-0.5",children:a}),table:({children:a})=>Q("table",{className:"border-collapse my-1 w-full",children:a}),thead:({children:a})=>Q("thead",{className:"border-b border-black-primary/30 dark:border-dark-border",children:a}),tbody:({children:a})=>Q("tbody",{children:a}),tr:({children:a})=>Q("tr",{className:"border-b border-black-primary/[0.13] dark:border-dark-border",children:a}),th:({children:a})=>Q("th",{className:"px-2 py-1 text-left font-semibold border border-black-primary/[0.13] dark:border-dark-border",children:a}),td:({children:a})=>Q("td",{className:"px-2 py-1 border border-black-primary/[0.13] dark:border-dark-border",children:a}),hr:()=>Q("hr",{className:"border-black-primary/[0.13] dark:border-dark-border my-1"}),strong:({children:a})=>Q("strong",{className:"font-semibold",children:a}),em:({children:a})=>Q("em",{className:"italic",children:a}),del:({children:a})=>Q("del",{className:"line-through",children:a})}),children:t})})};import{jsx as Ul}from"react/jsx-runtime";var Pl=e=>{let a=e,{element:r,children:n}=a,t=ze(a,["element","children"]);return r.style==="bullet"?Ul("ul",W(R({},t),{children:n})):Ul("ol",W(R({start:r.offset!=null?r.offset+1:void 0},t),{children:n}))};import{Fragment as wa,jsx as Ma,jsxs as y0}from"react/jsx-runtime";var es=e=>{let{range:r,style:n}=e,{hooks:t}=z();return r==="channel"&&t.atChannel?Ma(wa,{children:t.atChannel(n)}):r==="everyone"&&t.atEveryone?Ma(wa,{children:t.atEveryone(n)}):r==="here"&&t.atHere?Ma(wa,{children:t.atHere(n)}):y0("span",{className:Y(["slack_broadcast","slack_blocks_to_jsx__rich_text_section_element_broadcast",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",r]})};import{Fragment as T0,jsx as h0,jsxs as N0}from"react/jsx-runtime";var ts=e=>{let{channel_id:r,style:n}=e,{channels:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.channel?h0(T0,{children:a.channel(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):N0("span",{"data-channel-id":(l==null?void 0:l.id)||r,className:Y(["slack_channel","slack_blocks_to_jsx__rich_text_section_element_channel",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["#",s]})};import{jsx as ns,jsxs as g0}from"react/jsx-runtime";var as=e=>{let{value:r,style:n}=e;return g0("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_color inline-flex items-center gap-1",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:[ns("span",{className:"inline-block w-3 h-3 rounded-sm border border-black-primary/[0.13] dark:border-dark-border",style:{backgroundColor:r}}),ns("span",{children:r})]})};import{jsx as rs}from"react/jsx-runtime";var ls=e=>{let r=e,{hooks:n}=z();return n.emoji?rs("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:n.emoji(r,t=>h1(t))}):rs("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:h1(r)})};import{Fragment as d0,jsx as ss}from"react/jsx-runtime";var is=e=>{let{url:r,style:n,text:t}=e,{hooks:a}=z(),l=t||r;return a.link?ss(d0,{children:a.link({href:r,target:"_blank",rel:"noreferrer noopener",className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})}):ss("a",{target:"_blank",rel:"noreferrer noopener",href:r,className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})};import{Fragment as v0,jsx as R0,jsxs as S0}from"react/jsx-runtime";var us=e=>{let{user_id:r,style:n}=e,{users:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.user?R0(v0,{children:a.user(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):S0("span",{"data-user-id":(l==null?void 0:l.id)||r,className:Y(["slack_user","slack_blocks_to_jsx__rich_text_section_element_user",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};import{Fragment as O0,jsx as b0,jsxs as x0}from"react/jsx-runtime";var _s=e=>{let{usergroup_id:r,style:n}=e,{user_groups:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.usergroup?b0(O0,{children:a.usergroup(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):x0("span",{"data-usergroup-id":(l==null?void 0:l.id)||r,className:Y(["slack_user_group","slack_blocks_to_jsx__rich_text_section_element_user_group",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};import{jsx as We}from"react/jsx-runtime";var xn=e=>{let{element:r}=e;if(r.type==="user")return We(us,R({},r));if(r.type==="channel")return We(ts,R({},r));if(r.type==="broadcast")return We(es,R({},r));if(r.type==="color")return We(as,R({},r));if(r.type==="emoji")return We(ls,R({},r));if(r.type==="usergroup")return We(_s,R({},r));if(r.type==="link")return We(is,R({},r));if(r.type==="text"){let{text:n,style:t}=r;return We("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_text",t!=null&&t.italic?"italic":"",t!=null&&t.strike?"line-through":"",t!=null&&t.underline?"underline":"",t!=null&&t.code?"slack_inline_code":"",t!=null&&t.bold?"font-semibold":""]),children:n})}if(r.type==="date"){let{timestamp:n,format:t,style:a}=r;return We("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_date",a!=null&&a.italic?"italic":"",a!=null&&a.strike?"line-through":"",a!=null&&a.underline?"underline":"",a!=null&&a.code?"slack_inline_code":"",a!=null&&a.bold?"font-semibold":""]),children:We(Fe,{element:{type:"slack_date",value:{fallbackText:"",optionalLink:"",timestamp:n.toString(),tokenString:t}}})})}return null};import{jsx as ie,jsxs as K1}from"react/jsx-runtime";var y1=e=>{let{elements:r,block_id:n}=e.data,t={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0};return ie("div",{id:n,className:"slack_blocks_to_jsx__rich_text",children:r.map((a,l)=>{let s=0;if(a.type!=="rich_text_list")for(let i=0;i<=8;i++)t[i]=0;else{let i=a.indent||0;for(let u=i+1;u<=8;u++)t[u]=0;s=t[i],t[i]+=a.elements.length}return ie(os,{element:a,consecutive_index:s},`${a.type}__${l}`)})})},os=e=>{let{element:r,consecutive_index:n}=e;if(r.type==="rich_text_list"){let{elements:t,style:a,border:l=0,indent:s,offset:i=0}=r,u=a==="ordered"&&i||0;return K1("div",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_list_element",children:[l===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie(Pl,{element:r,className:"list-none",children:t.map((o,k)=>K1("li",{className:"flex",style:{marginLeft:s?s>5?0:s*28:0},children:[a==="ordered"&&K1("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&`${n+u+k+1}.`,(s===1||s===4||s===7)&&`${Mr(n+u+k+1)}.`,(s===2||s===5||s===8)&&`${wr(n+u+k+1)}.`]}),a==="bullet"&&K1("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&ie("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),(s===1||s===4||s===7)&&ie("span",{className:"w-1.5 h-1.5 rounded-full border border-current"}),(s===2||s===5||s===8)&&ie("span",{className:"w-1.5 h-1.5 rounded-[1.5px] bg-current"})]}),ie("div",{style:{marginLeft:6},children:ie(os,{element:o,consecutive_index:0},`${r.type}__${k}`)})]},`${o.type}__${k}`))})]})}if(r.type==="rich_text_preformatted"){let{elements:t,border:a}=r;return K1("code",{className:"flex gap-2 w-full slack_blocks_to_jsx__rich_text_preformatted_element",children:[a===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie("pre",{className:"p-2 rounded-lg mt-2 mb-1 ml-1 whitespace-pre-wrap bg-gray-secondary dark:bg-dark-bg-secondary text-xs leading-[1.50001] border dark:border-dark-border grow",style:{wordWrap:"break-word",wordBreak:"break-all"},children:t.map((l,s)=>ie(xn,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_quote"){let{elements:t,border:a}=r;return K1("blockquote",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_quote_element",children:[a===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie("p",{children:t.map((l,s)=>ie(xn,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_section"){let{elements:t}=r;return ie("p",{className:"inline-block slack_blocks_to_jsx__rich_text_section_element",children:t.map((a,l)=>ie(xn,{element:a},`${a.type}__${l}`))})}return null};import{jsx as ue,jsxs as ks}from"react/jsx-runtime";var L0=({status:e})=>e==="complete"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_complete",children:ue("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4 text-green-600 dark:text-green-400",children:ue("path",{d:"M13.25 4.75L6 12 2.75 8.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}):e==="in_progress"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_in_progress",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500 dark:bg-blue-400 animate-pulse"})}):e==="error"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_error",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-red-600 dark:bg-red-400"})}):ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_pending",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-gray-400 dark:bg-gray-500"})}),Ln=e=>{let{task_id:r,title:n,details:t,output:a,sources:l,status:s="pending",block_id:i}=e.data;return ks("div",{id:i,"data-task-id":r,className:"my-1 p-3 rounded border border-black-primary/[0.13] dark:border-dark-border text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__task_card",children:[ks("div",{className:"flex items-start gap-2",children:[ue(L0,{status:s}),ue("span",{className:"font-semibold text-primary slack_blocks_to_jsx__task_card_title",children:n})]}),t&&ue("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_details",children:ue(y1,{data:t})}),a&&ue("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_output",children:ue(y1,{data:a})}),l&&l.length>0&&ue("div",{className:"mt-2 pl-7 flex flex-wrap gap-2 slack_blocks_to_jsx__task_card_sources",children:l.map((u,o)=>ue("a",{href:u.url,target:"_blank",rel:"noreferrer noopener",className:"text-small text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:u.text},o))})]})};import{jsx as Ba,jsxs as D0}from"react/jsx-runtime";var cs=e=>{let{title:r,tasks:n,block_id:t}=e.data;return D0("div",{id:t,className:"mt-2 mb-1 text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__plan",children:[Ba("h3",{className:"text-header font-semibold mb-2 slack_blocks_to_jsx__plan_title",children:r}),n&&n.length>0&&Ba("div",{className:"flex flex-col gap-1 slack_blocks_to_jsx__plan_tasks",children:n.map((a,l)=>Ba(Ln,{data:a},a.task_id||l))})]})};import{jsx as pt,jsxs as ms}from"react/jsx-runtime";var ps=e=>{let{accessory:r,fields:n,text:t,block_id:a,expand:l}=e.data,s=r?qe(r):null,i=r?Dr(r):!1;return ms("div",{id:a,className:Y(["mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary dark:text-dark-text-primary",i?"flex-col":""]),children:[pt("div",{className:"grow",children:ms("div",{className:"flex flex-col gap-3",children:[t&&pt(N,{data:t}),n&&pt("div",{className:"grid grid-cols-2 w-full",children:n.map((u,o)=>pt(N,{data:u},o))})]})}),s&&i?s:pt("div",{className:"ml-2 mb-1 relative shrink-0",children:s})]})};import{jsx as T1}from"react/jsx-runtime";var As=e=>{let{rows:r,column_settings:n,block_id:t}=e.data,{channels:a,users:l,hooks:s}=z();return!r||r.length===0?null:T1("div",{id:t,className:"mt-2 mb-1 slack_blocks_to_jsx__table inline-block border border-gray-300 dark:border-dark-border rounded",children:T1("table",{className:"border-none",children:T1("tbody",{children:r.map((i,u)=>T1("tr",{className:Y(["border-b border-gray-200 dark:border-dark-border",u===r.length-1?"border-b-0":""]),children:i.map((o,k)=>{let m=n==null?void 0:n[k],c=(m==null?void 0:m.align)||"left",p=(m==null?void 0:m.is_wrapped)||!1,E=Y(["px-3 py-2 border-r border-gray-200 dark:border-dark-border last:border-r-0",c==="center"?"text-center":"",c==="right"?"text-right":"text-left",p?"break-words":"whitespace-nowrap overflow-hidden text-ellipsis",u===0?"font-semibold":""]);return T1("td",{className:E,children:o.type==="raw_text"?T1("div",{children:tt(o.text.replace(/>/g,"> ").replace(/</g,"<"),{markdown:!1,verbatim:!1,users:l,channels:a,hooks:s})}):T1(y1,{data:o})},k)})},u))})})})};import{useState as w0}from"react";import{Fragment as B0,jsx as ce,jsxs as Es}from"react/jsx-runtime";var fs=e=>{let{alt_text:r,title:n,video_url:t,author_name:a,block_id:l,description:s,title_url:i,iframeProps:u={}}=e.data,[o,k]=w0(!0);return Es("div",{className:"py-2 slack_blocks_to_jsx__video",id:l,children:[a&&ce("div",{className:"slack_blocks_to_jsx__video_author text-black-primary dark:text-dark-text-primary",children:ce("span",{className:"font-semibold",children:a})}),s&&ce("div",{className:"slack_blocks_to_jsx__video_description text-black-primary dark:text-dark-text-primary",children:ce(N,{data:s})}),Es("div",{className:"flex flex-wrap items-center gap-1 slack_blocks_to_jsx__video_title text-black-primary dark:text-dark-text-primary",children:[i?ce(M0,{title:n,url:i}):ce("p",{children:ce(N,{data:n})}),ce("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>k(m=>!m),children:ce("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:o?"rotate(0deg)":"rotate(-90deg)"},children:ce("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),ce("div",{className:"slack_blocks_to_jsx__video_container max-w-max",children:o&&ce("iframe",R({title:r,className:"max-w-[360px] bg-gray-100 dark:bg-dark-bg-secondary w-full aspect-video",src:t},u))})]})},M0=({url:e,title:r})=>{let{hooks:n}=z();return n.link?ce(B0,{children:n.link({href:e,children:ce(N,{data:r}),className:"text-blue-primary dark:text-dark-link",rel:"noopener noreferrer",target:"_blank"})}):ce("a",{href:e,className:"text-blue-primary dark:text-dark-link",target:"_blank",rel:"noopener noreferrer",children:ce(N,{data:r})})};import{jsx as x}from"react/jsx-runtime";var nt=e=>e.type==="divider"?x(Vl,{data:e}):e.type==="section"?x(ps,{data:e}):e.type==="image"?x($l,{data:e}):e.type==="context"?x(Sl,{data:e}):e.type==="actions"?x(za,{data:e}):e.type==="context_actions"?x(Ol,{data:e}):e.type==="file"?x(jl,{data:e}):e.type==="header"?x(Yl,{data:e}):e.type==="input"?x(ql,{data:e}):e.type==="video"?x(fs,{data:e}):e.type==="rich_text"?x(y1,{data:e}):e.type==="table"?x(As,{data:e}):e.type==="markdown"?x(Zl,{data:e}):e.type==="plan"?x(cs,{data:e}):e.type==="task_card"?x(Ln,{data:e}):e.type==="alert"?x(Gr,{data:e}):e.type==="card"?x(dn,{data:e}):e.type==="carousel"?x(zr,{data:e}):e.type==="container"?x(Vr,{data:e}):e.type==="data_visualization"?x(zl,{data:e}):null,qe=e=>e.type==="button"?x(Nn,{data:e}):e.type==="checkboxes"?x(Qr,{data:e}):e.type==="image"?x(vn,{data:e}):e.type==="plain_text_input"?x(qr,{data:e}):e.type==="users_select"?x(Xr,{data:e}):e.type==="datepicker"?x(Jr,{data:e}):e.type==="timepicker"?x(Zr,{data:e}):e.type==="datetimepicker"?x(el,{data:e}):e.type==="email_text_input"?x(tl,{data:e}):e.type==="url_text_input"?x(nl,{data:e}):e.type==="number_input"?x(al,{data:e}):e.type==="radio_buttons"?x(ll,{data:e}):e.type==="overflow"?x(il,{data:e}):e.type==="static_select"?x(Yr,{data:e}):e.type==="external_select"?x(ul,{data:e}):e.type==="conversations_select"?x(_l,{data:e}):e.type==="channels_select"?x(ol,{data:e}):e.type==="multi_static_select"?x(kl,{data:e}):e.type==="multi_external_select"?x(cl,{data:e}):e.type==="multi_users_select"?x(pl,{data:e}):e.type==="multi_conversations_select"?x(El,{data:e}):e.type==="multi_channels_select"?x(Il,{data:e}):e.type==="feedback_buttons"?x(yl,{data:e}):e.type==="icon_button"?x(Tl,{data:e}):e.type==="file_input"?x(Nl,{data:e}):e.type==="rich_text_input"?x(gl,{data:e}):e.type==="url"?x(dl,{data:e}):e.type==="workflow_button"?x(Rl,{data:e}):null;import{jsx as Ha,jsxs as H0}from"react/jsx-runtime";var Is=e=>{let{name:r,time:n}=e;return H0("div",{className:"flex gap-[5px] items-center w-full slack_blocks_to_jsx--header",children:[Ha("h3",{className:"font-black text-[15px] dark:text-dark-text-primary",children:r}),Ha("div",{className:"h-[14px] w-[27px] leading-[12.5px] py-[1px] px-[3px] uppercase text-[10px] text-black-primary/[0.7] bg-black-primary/[0.13] dark:text-dark-text-primary/[0.7] dark:bg-dark-text-primary/[0.13] font-semibold rounded-[2px] text-center",children:"APP"}),Ha("div",{className:"text-xs text-black-secondary dark:text-dark-text-secondary uppercase leading-[17.6px]",children:ja(n)})]})};import{jsx as de,jsxs as ys}from"react/jsx-runtime";var FN=e=>{let{blocks:r,logo:n,name:t,time:a=new Date,className:l="",style:s,showBlockKitDebug:i=!1,unstyled:u=!1,data:o,hooks:k,withoutWrapper:m=!1,theme:c}=e,[p,A]=F0(!1);C0(()=>{if(c===void 0){let f=window.matchMedia("(prefers-color-scheme: dark)");A(f.matches);let I=T=>A(T.matches);return f.addEventListener("change",I),()=>f.removeEventListener("change",I)}},[c]);let E=c!=null?c:p?"dark":"light";return m?de(Kn,{data:o,hooks:k,children:de("div",{id:"slack_blocks_to_jsx","data-theme":E,className:Y(["slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:de("div",{className:"flex flex-col w-full",children:de("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=nt(f);return T?de(Fn,{children:T},I):null})})})})}):de(Kn,{data:o,hooks:k,children:de("div",{id:"slack_blocks_to_jsx","data-theme":E,className:"dark:text-dark-text-primary dark:bg-dark-bg-primary",children:ys("section",{className:Y(["dark:text-dark-text-primary dark:bg-dark-bg-primary","slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:[i&&de("a",{target:"_blank",rel:"noopener noreferrer",href:`https://app.slack.com/block-kit-builder#${encodeURIComponent(JSON.stringify({blocks:Br(r)}))}`,className:"text-xs absolute right-0 top-0 text-blue-500 underline",children:"Open in Slack Block Kit Builder"}),de("div",{className:"shrink-0",children:de("img",{src:n,className:"w-9 h-9",alt:t})}),ys("div",{className:"flex flex-col w-full",children:[de(Is,{name:t,time:a}),de("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=nt(f);return T?de(Fn,{children:T},I):null})})]})]})})})};export{FN as Message};
|
|
16
|
+
`);return Q("div",{id:n,className:"mt-2 mb-1 text-primary text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__markdown_block",children:Q(A0,{remarkPlugins:[E0,Jl],components:W(R({},I0),{h1:({children:a})=>Q("h1",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h2:({children:a})=>Q("h2",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h3:({children:a})=>Q("h3",{className:"text-header font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h4:({children:a})=>Q("h4",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h5:({children:a})=>Q("h5",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),h6:({children:a})=>Q("h6",{className:"font-semibold text-black-primary dark:text-dark-text-primary mb-0.5",children:a}),p:({children:a})=>Q("p",{className:"mb-0.5",children:a}),ul:({children:a})=>Q("ul",{className:"list-disc pl-6 mb-0.5",children:a}),ol:({children:a})=>Q("ol",{className:"list-decimal pl-6 mb-0.5",children:a}),li:s=>{var i=s,{children:a}=i,l=ze(i,["children"]);return l.className==="task-list-item"?Q("li",{className:"list-none flex items-start gap-1",children:a}):Q("li",{className:"mb-0.5",children:a})},input:s=>{var i=s,{checked:a}=i,l=ze(i,["checked"]);return l.type==="checkbox"?Q("input",{type:"checkbox",checked:a,readOnly:!0,className:"mt-1 mr-1"}):Q("input",R({},l))},a:({href:a,children:l})=>Q("a",{href:a,target:"_blank",rel:"noreferrer noopener",className:"text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:l}),code:({children:a,className:l})=>(l==null?void 0:l.includes("language-"))?Q("code",{className:"slack_code block p-2 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg dark:text-dark-text-primary w-full my-1 font-mono",children:a}):Q("code",{className:"slack_code_inline inline-block px-1 text-xs whitespace-pre-wrap break-words rounded-[3px] border border-black-primary/[0.13] dark:border-dark-code-border bg-black-primary/[0.04] dark:bg-dark-code-bg text-red-primary dark:text-dark-text-primary font-mono",children:a}),pre:({children:a})=>Q("pre",{className:"my-0.5",children:a}),blockquote:({children:a})=>Q("blockquote",{className:"relative pl-4 my-0.5",children:a}),table:({children:a})=>Q("table",{className:"border-collapse my-1 w-full",children:a}),thead:({children:a})=>Q("thead",{className:"border-b border-black-primary/30 dark:border-dark-border",children:a}),tbody:({children:a})=>Q("tbody",{children:a}),tr:({children:a})=>Q("tr",{className:"border-b border-black-primary/[0.13] dark:border-dark-border",children:a}),th:({children:a})=>Q("th",{className:"px-2 py-1 text-left font-semibold border border-black-primary/[0.13] dark:border-dark-border",children:a}),td:({children:a})=>Q("td",{className:"px-2 py-1 border border-black-primary/[0.13] dark:border-dark-border",children:a}),hr:()=>Q("hr",{className:"border-black-primary/[0.13] dark:border-dark-border my-1"}),strong:({children:a})=>Q("strong",{className:"font-semibold",children:a}),em:({children:a})=>Q("em",{className:"italic",children:a}),del:({children:a})=>Q("del",{className:"line-through",children:a})}),children:t})})};import{jsx as Ul}from"react/jsx-runtime";var Pl=e=>{let a=e,{element:r,children:n}=a,t=ze(a,["element","children"]);return r.style==="bullet"?Ul("ul",W(R({},t),{children:n})):Ul("ol",W(R({start:r.offset!=null?r.offset+1:void 0},t),{children:n}))};import{Fragment as wa,jsx as Ma,jsxs as y0}from"react/jsx-runtime";var es=e=>{let{range:r,style:n}=e,{hooks:t}=z();return r==="channel"&&t.atChannel?Ma(wa,{children:t.atChannel(n)}):r==="everyone"&&t.atEveryone?Ma(wa,{children:t.atEveryone(n)}):r==="here"&&t.atHere?Ma(wa,{children:t.atHere(n)}):y0("span",{className:Y(["slack_broadcast","slack_blocks_to_jsx__rich_text_section_element_broadcast",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",r]})};import{Fragment as T0,jsx as h0,jsxs as N0}from"react/jsx-runtime";var ts=e=>{let{channel_id:r,style:n}=e,{channels:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.channel?h0(T0,{children:a.channel(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):N0("span",{"data-channel-id":(l==null?void 0:l.id)||r,className:Y(["slack_channel","slack_blocks_to_jsx__rich_text_section_element_channel",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["#",s]})};import{jsx as ns,jsxs as g0}from"react/jsx-runtime";var as=e=>{let{value:r,style:n}=e;return g0("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_color inline-flex items-center gap-1",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:[ns("span",{className:"inline-block w-3 h-3 rounded-sm border border-black-primary/[0.13] dark:border-dark-border",style:{backgroundColor:r}}),ns("span",{children:r})]})};import{jsx as rs}from"react/jsx-runtime";var ls=e=>{let r=e,{hooks:n}=z();return n.emoji?rs("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:n.emoji(r,t=>h1(t))}):rs("span",{className:"slack_blocks_to_jsx__rich_text_section_element_emoji",children:h1(r)})};import{Fragment as d0,jsx as ss}from"react/jsx-runtime";var is=e=>{let{url:r,style:n,text:t}=e,{hooks:a}=z(),l=t||r;return a.link?ss(d0,{children:a.link({href:r,target:"_blank",rel:"noreferrer noopener",className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})}):ss("a",{target:"_blank",rel:"noreferrer noopener",href:r,className:Y(["slack_blocks_to_jsx__rich_text_section_element_link","text-blue-primary dark:text-dark-link hover:underline underline-offset-4",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.code?"slack_inline_code":"",n!=null&&n.bold?"font-semibold":""]),children:l})};import{Fragment as v0,jsx as R0,jsxs as S0}from"react/jsx-runtime";var us=e=>{let{user_id:r,style:n}=e,{users:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.user?R0(v0,{children:a.user(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):S0("span",{"data-user-id":(l==null?void 0:l.id)||r,className:Y(["slack_user","slack_blocks_to_jsx__rich_text_section_element_user",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};import{Fragment as O0,jsx as b0,jsxs as x0}from"react/jsx-runtime";var _s=e=>{let{usergroup_id:r,style:n}=e,{user_groups:t,hooks:a}=z(),l=t.find(i=>i.id===r||i.name===r),s=(l==null?void 0:l.name)||r;return a.usergroup?b0(O0,{children:a.usergroup(l?W(R({},l),{style:n}):{id:r,name:s,style:n})}):x0("span",{"data-usergroup-id":(l==null?void 0:l.id)||r,className:Y(["slack_user_group","slack_blocks_to_jsx__rich_text_section_element_user_group",n!=null&&n.italic?"italic":"",n!=null&&n.strike?"line-through":"",n!=null&&n.underline?"underline":"",n!=null&&n.bold?"font-semibold":""]),children:["@",s]})};import{jsx as We}from"react/jsx-runtime";var xn=e=>{let{element:r}=e;if(r.type==="user")return We(us,R({},r));if(r.type==="channel")return We(ts,R({},r));if(r.type==="broadcast")return We(es,R({},r));if(r.type==="color")return We(as,R({},r));if(r.type==="emoji")return We(ls,R({},r));if(r.type==="usergroup")return We(_s,R({},r));if(r.type==="link")return We(is,R({},r));if(r.type==="text"){let{text:n,style:t}=r;return We("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_text",t!=null&&t.italic?"italic":"",t!=null&&t.strike?"line-through":"",t!=null&&t.underline?"underline":"",t!=null&&t.code?"slack_inline_code":"",t!=null&&t.bold?"font-semibold":""]),children:n})}if(r.type==="date"){let{timestamp:n,format:t,style:a}=r;return We("span",{className:Y(["slack_blocks_to_jsx__rich_text_section_element_date",a!=null&&a.italic?"italic":"",a!=null&&a.strike?"line-through":"",a!=null&&a.underline?"underline":"",a!=null&&a.code?"slack_inline_code":"",a!=null&&a.bold?"font-semibold":""]),children:We(Fe,{element:{type:"slack_date",value:{fallbackText:"",optionalLink:"",timestamp:n.toString(),tokenString:t}}})})}return null};import{jsx as ie,jsxs as K1}from"react/jsx-runtime";var y1=e=>{let{elements:r,block_id:n}=e.data,t={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0};return ie("div",{id:n,className:"slack_blocks_to_jsx__rich_text",children:r.map((a,l)=>{let s=0;if(a.type!=="rich_text_list")for(let i=0;i<=8;i++)t[i]=0;else{let i=a.indent||0;for(let u=i+1;u<=8;u++)t[u]=0;a.style==="ordered"?(s=t[i],t[i]+=a.elements.length):t[i]=0}return ie(os,{element:a,consecutive_index:s},`${a.type}__${l}`)})})},os=e=>{let{element:r,consecutive_index:n}=e;if(r.type==="rich_text_list"){let{elements:t,style:a,border:l=0,indent:s,offset:i=0}=r,u=a==="ordered"&&i||0;return K1("div",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_list_element",children:[l===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie(Pl,{element:r,className:"list-none",children:t.map((o,k)=>K1("li",{className:"flex",style:{marginLeft:s?s>5?0:s*28:0},children:[a==="ordered"&&K1("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&`${n+u+k+1}.`,(s===1||s===4||s===7)&&`${Mr(n+u+k+1)}.`,(s===2||s===5||s===8)&&`${wr(n+u+k+1)}.`]}),a==="bullet"&&K1("span",{className:"w-[22px] h-[22px] shrink-0 flex items-center justify-center",children:[(s===void 0||s===0||s===3||s===6)&&ie("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),(s===1||s===4||s===7)&&ie("span",{className:"w-1.5 h-1.5 rounded-full border border-current"}),(s===2||s===5||s===8)&&ie("span",{className:"w-1.5 h-1.5 rounded-[1.5px] bg-current"})]}),ie("div",{style:{marginLeft:6},children:ie(os,{element:o,consecutive_index:0},`${r.type}__${k}`)})]},`${o.type}__${k}`))})]})}if(r.type==="rich_text_preformatted"){let{elements:t,border:a}=r;return K1("code",{className:"flex gap-2 w-full slack_blocks_to_jsx__rich_text_preformatted_element",children:[a===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie("pre",{className:"p-2 rounded-lg mt-2 mb-1 ml-1 whitespace-pre-wrap bg-gray-secondary dark:bg-dark-bg-secondary text-xs leading-[1.50001] border dark:border-dark-border grow",style:{wordWrap:"break-word",wordBreak:"break-all"},children:t.map((l,s)=>ie(xn,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_quote"){let{elements:t,border:a}=r;return K1("blockquote",{className:"flex gap-2 slack_blocks_to_jsx__rich_text_quote_element",children:[a===1&&ie("div",{className:"w-1 rounded bg-gray-primary dark:bg-dark-text-high self-stretch"}),ie("p",{children:t.map((l,s)=>ie(xn,{element:l},`${l.type}__${s}`))})]})}if(r.type==="rich_text_section"){let{elements:t}=r;return ie("p",{className:"block slack_blocks_to_jsx__rich_text_section_element",children:t.map((a,l)=>ie(xn,{element:a},`${a.type}__${l}`))})}return null};import{jsx as ue,jsxs as ks}from"react/jsx-runtime";var L0=({status:e})=>e==="complete"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_complete",children:ue("svg",{viewBox:"0 0 16 16",fill:"none",className:"w-4 h-4 text-green-600 dark:text-green-400",children:ue("path",{d:"M13.25 4.75L6 12 2.75 8.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}):e==="in_progress"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_in_progress",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500 dark:bg-blue-400 animate-pulse"})}):e==="error"?ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_error",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-red-600 dark:bg-red-400"})}):ue("span",{className:"flex items-center justify-center w-5 h-5 shrink-0 slack_blocks_to_jsx__task_card_status_pending",children:ue("span",{className:"w-2.5 h-2.5 rounded-full bg-gray-400 dark:bg-gray-500"})}),Ln=e=>{let{task_id:r,title:n,details:t,output:a,sources:l,status:s="pending",block_id:i}=e.data;return ks("div",{id:i,"data-task-id":r,className:"my-1 p-3 rounded border border-black-primary/[0.13] dark:border-dark-border text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__task_card",children:[ks("div",{className:"flex items-start gap-2",children:[ue(L0,{status:s}),ue("span",{className:"font-semibold text-primary slack_blocks_to_jsx__task_card_title",children:n})]}),t&&ue("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_details",children:ue(y1,{data:t})}),a&&ue("div",{className:"mt-2 pl-7 slack_blocks_to_jsx__task_card_output",children:ue(y1,{data:a})}),l&&l.length>0&&ue("div",{className:"mt-2 pl-7 flex flex-wrap gap-2 slack_blocks_to_jsx__task_card_sources",children:l.map((u,o)=>ue("a",{href:u.url,target:"_blank",rel:"noreferrer noopener",className:"text-small text-blue-primary dark:text-dark-link hover:underline underline-offset-4",children:u.text},o))})]})};import{jsx as Ba,jsxs as D0}from"react/jsx-runtime";var cs=e=>{let{title:r,tasks:n,block_id:t}=e.data;return D0("div",{id:t,className:"mt-2 mb-1 text-black-primary dark:text-dark-text-primary slack_blocks_to_jsx__plan",children:[Ba("h3",{className:"text-header font-semibold mb-2 slack_blocks_to_jsx__plan_title",children:r}),n&&n.length>0&&Ba("div",{className:"flex flex-col gap-1 slack_blocks_to_jsx__plan_tasks",children:n.map((a,l)=>Ba(Ln,{data:a},a.task_id||l))})]})};import{jsx as pt,jsxs as ms}from"react/jsx-runtime";var ps=e=>{let{accessory:r,fields:n,text:t,block_id:a,expand:l}=e.data,s=r?qe(r):null,i=r?Dr(r):!1;return ms("div",{id:a,className:Y(["mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary dark:text-dark-text-primary",i?"flex-col":""]),children:[pt("div",{className:"grow",children:ms("div",{className:"flex flex-col gap-3",children:[t&&pt(N,{data:t}),n&&pt("div",{className:"grid grid-cols-2 w-full",children:n.map((u,o)=>pt(N,{data:u},o))})]})}),s&&i?s:pt("div",{className:"ml-2 mb-1 relative shrink-0",children:s})]})};import{jsx as T1}from"react/jsx-runtime";var As=e=>{let{rows:r,column_settings:n,block_id:t}=e.data,{channels:a,users:l,hooks:s}=z();return!r||r.length===0?null:T1("div",{id:t,className:"mt-2 mb-1 slack_blocks_to_jsx__table inline-block border border-gray-300 dark:border-dark-border rounded",children:T1("table",{className:"border-none",children:T1("tbody",{children:r.map((i,u)=>T1("tr",{className:Y(["border-b border-gray-200 dark:border-dark-border",u===r.length-1?"border-b-0":""]),children:i.map((o,k)=>{let m=n==null?void 0:n[k],c=(m==null?void 0:m.align)||"left",p=(m==null?void 0:m.is_wrapped)||!1,E=Y(["px-3 py-2 border-r border-gray-200 dark:border-dark-border last:border-r-0",c==="center"?"text-center":"",c==="right"?"text-right":"text-left",p?"break-words":"whitespace-nowrap overflow-hidden text-ellipsis",u===0?"font-semibold":""]);return T1("td",{className:E,children:o.type==="raw_text"?T1("div",{children:tt(o.text.replace(/>/g,"> ").replace(/</g,"<"),{markdown:!1,verbatim:!1,users:l,channels:a,hooks:s})}):T1(y1,{data:o})},k)})},u))})})})};import{useState as w0}from"react";import{Fragment as B0,jsx as ce,jsxs as Es}from"react/jsx-runtime";var fs=e=>{let{alt_text:r,title:n,video_url:t,author_name:a,block_id:l,description:s,title_url:i,iframeProps:u={}}=e.data,[o,k]=w0(!0);return Es("div",{className:"py-2 slack_blocks_to_jsx__video",id:l,children:[a&&ce("div",{className:"slack_blocks_to_jsx__video_author text-black-primary dark:text-dark-text-primary",children:ce("span",{className:"font-semibold",children:a})}),s&&ce("div",{className:"slack_blocks_to_jsx__video_description text-black-primary dark:text-dark-text-primary",children:ce(N,{data:s})}),Es("div",{className:"flex flex-wrap items-center gap-1 slack_blocks_to_jsx__video_title text-black-primary dark:text-dark-text-primary",children:[i?ce(M0,{title:n,url:i}):ce("p",{children:ce(N,{data:n})}),ce("button",{type:"button",className:"w-[15px] h-[15px]",onClick:()=>k(m=>!m),children:ce("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"text-blue-primary dark:text-dark-link",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",width:6,height:6,style:{transform:o?"rotate(0deg)":"rotate(-90deg)"},children:ce("path",{fill:"currentColor",fillRule:"nonzero",d:"M42.47.01L469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z"})})})]}),ce("div",{className:"slack_blocks_to_jsx__video_container max-w-max",children:o&&ce("iframe",R({title:r,className:"max-w-[360px] bg-gray-100 dark:bg-dark-bg-secondary w-full aspect-video",src:t},u))})]})},M0=({url:e,title:r})=>{let{hooks:n}=z();return n.link?ce(B0,{children:n.link({href:e,children:ce(N,{data:r}),className:"text-blue-primary dark:text-dark-link",rel:"noopener noreferrer",target:"_blank"})}):ce("a",{href:e,className:"text-blue-primary dark:text-dark-link",target:"_blank",rel:"noopener noreferrer",children:ce(N,{data:r})})};import{jsx as x}from"react/jsx-runtime";var nt=e=>e.type==="divider"?x(Vl,{data:e}):e.type==="section"?x(ps,{data:e}):e.type==="image"?x($l,{data:e}):e.type==="context"?x(Sl,{data:e}):e.type==="actions"?x(za,{data:e}):e.type==="context_actions"?x(Ol,{data:e}):e.type==="file"?x(jl,{data:e}):e.type==="header"?x(Yl,{data:e}):e.type==="input"?x(ql,{data:e}):e.type==="video"?x(fs,{data:e}):e.type==="rich_text"?x(y1,{data:e}):e.type==="table"?x(As,{data:e}):e.type==="markdown"?x(Zl,{data:e}):e.type==="plan"?x(cs,{data:e}):e.type==="task_card"?x(Ln,{data:e}):e.type==="alert"?x(Gr,{data:e}):e.type==="card"?x(dn,{data:e}):e.type==="carousel"?x(zr,{data:e}):e.type==="container"?x(Vr,{data:e}):e.type==="data_visualization"?x(zl,{data:e}):null,qe=e=>e.type==="button"?x(Nn,{data:e}):e.type==="checkboxes"?x(Qr,{data:e}):e.type==="image"?x(vn,{data:e}):e.type==="plain_text_input"?x(qr,{data:e}):e.type==="users_select"?x(Xr,{data:e}):e.type==="datepicker"?x(Jr,{data:e}):e.type==="timepicker"?x(Zr,{data:e}):e.type==="datetimepicker"?x(el,{data:e}):e.type==="email_text_input"?x(tl,{data:e}):e.type==="url_text_input"?x(nl,{data:e}):e.type==="number_input"?x(al,{data:e}):e.type==="radio_buttons"?x(ll,{data:e}):e.type==="overflow"?x(il,{data:e}):e.type==="static_select"?x(Yr,{data:e}):e.type==="external_select"?x(ul,{data:e}):e.type==="conversations_select"?x(_l,{data:e}):e.type==="channels_select"?x(ol,{data:e}):e.type==="multi_static_select"?x(kl,{data:e}):e.type==="multi_external_select"?x(cl,{data:e}):e.type==="multi_users_select"?x(pl,{data:e}):e.type==="multi_conversations_select"?x(El,{data:e}):e.type==="multi_channels_select"?x(Il,{data:e}):e.type==="feedback_buttons"?x(yl,{data:e}):e.type==="icon_button"?x(Tl,{data:e}):e.type==="file_input"?x(Nl,{data:e}):e.type==="rich_text_input"?x(gl,{data:e}):e.type==="url"?x(dl,{data:e}):e.type==="workflow_button"?x(Rl,{data:e}):null;import{jsx as Ha,jsxs as H0}from"react/jsx-runtime";var Is=e=>{let{name:r,time:n}=e;return H0("div",{className:"flex gap-[5px] items-center w-full slack_blocks_to_jsx--header",children:[Ha("h3",{className:"font-black text-[15px] dark:text-dark-text-primary",children:r}),Ha("div",{className:"h-[14px] w-[27px] leading-[12.5px] py-[1px] px-[3px] uppercase text-[10px] text-black-primary/[0.7] bg-black-primary/[0.13] dark:text-dark-text-primary/[0.7] dark:bg-dark-text-primary/[0.13] font-semibold rounded-[2px] text-center",children:"APP"}),Ha("div",{className:"text-xs text-black-secondary dark:text-dark-text-secondary uppercase leading-[17.6px]",children:ja(n)})]})};import{jsx as de,jsxs as ys}from"react/jsx-runtime";var FN=e=>{let{blocks:r,logo:n,name:t,time:a=new Date,className:l="",style:s,showBlockKitDebug:i=!1,unstyled:u=!1,data:o,hooks:k,withoutWrapper:m=!1,theme:c}=e,[p,A]=F0(!1);C0(()=>{if(c===void 0){let f=window.matchMedia("(prefers-color-scheme: dark)");A(f.matches);let I=T=>A(T.matches);return f.addEventListener("change",I),()=>f.removeEventListener("change",I)}},[c]);let E=c!=null?c:p?"dark":"light";return m?de(Kn,{data:o,hooks:k,children:de("div",{id:"slack_blocks_to_jsx","data-theme":E,className:Y(["slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:de("div",{className:"flex flex-col w-full",children:de("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=nt(f);return T?de(Fn,{children:T},I):null})})})})}):de(Kn,{data:o,hooks:k,children:de("div",{id:"slack_blocks_to_jsx","data-theme":E,className:"dark:text-dark-text-primary dark:bg-dark-bg-primary",children:ys("section",{className:Y(["dark:text-dark-text-primary dark:bg-dark-bg-primary","slack_blocks_to_jsx relative flex gap-2 w-full max-w-[600px]",u?"styles_disabled":"styles_enabled",l]),style:s,children:[i&&de("a",{target:"_blank",rel:"noopener noreferrer",href:`https://app.slack.com/block-kit-builder#${encodeURIComponent(JSON.stringify({blocks:Br(r)}))}`,className:"text-xs absolute right-0 top-0 text-blue-500 underline",children:"Open in Slack Block Kit Builder"}),de("div",{className:"shrink-0",children:de("img",{src:n,className:"w-9 h-9",alt:t})}),ys("div",{className:"flex flex-col w-full",children:[de(Is,{name:t,time:a}),de("div",{className:"slack_blocks_to_jsx--blocks",children:r.map((f,I)=>{let T=nt(f);return T?de(Fn,{children:T},I):null})})]})]})})})};export{FN as Message};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"repository": "https://github.com/themashcodee/slack-blocks-to-jsx.git",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"version": "1.1.
|
|
14
|
+
"version": "1.1.2",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"module": "dist/index.mjs",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
@@ -19,6 +19,21 @@
|
|
|
19
19
|
"url": "https://github.com/themashcodee/slack-blocks-to-jsx/issues"
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/themashcodee/slack-blocks-to-jsx#readme",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup && npm run build:css",
|
|
24
|
+
"build:css": "postcss ./src/style.css -o ./dist/style.css",
|
|
25
|
+
"dev:css": "postcss ./src/style.css -o ./dist/style.css --watch",
|
|
26
|
+
"dev": "tsup --watch",
|
|
27
|
+
"lint": "tsc",
|
|
28
|
+
"test": "node --test \"test/**/*.test.mjs\"",
|
|
29
|
+
"release": "node scripts/release.mjs",
|
|
30
|
+
"release:dry": "node scripts/release.mjs --dry-run",
|
|
31
|
+
"release:beta": "node scripts/release.mjs prerelease --preid=beta",
|
|
32
|
+
"release:alpha": "node scripts/release.mjs prerelease --preid=alpha",
|
|
33
|
+
"playground:install": "cd playground && npm install",
|
|
34
|
+
"playground": "cd playground && npm run dev",
|
|
35
|
+
"playground:build": "npm run build && cd playground && npm run build"
|
|
36
|
+
},
|
|
22
37
|
"dependencies": {
|
|
23
38
|
"node-emoji": "^2.1.3",
|
|
24
39
|
"react-markdown": "^9.1.0",
|
|
@@ -43,20 +58,5 @@
|
|
|
43
58
|
"tailwindcss": "^3.4.1",
|
|
44
59
|
"tsup": "^8.5.0",
|
|
45
60
|
"typescript": "^5.2.2"
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsup && npm run build:css",
|
|
49
|
-
"build:css": "postcss ./src/style.css -o ./dist/style.css",
|
|
50
|
-
"dev:css": "postcss ./src/style.css -o ./dist/style.css --watch",
|
|
51
|
-
"dev": "tsup --watch",
|
|
52
|
-
"lint": "tsc",
|
|
53
|
-
"test": "node --test \"test/**/*.test.mjs\"",
|
|
54
|
-
"release": "node scripts/release.mjs",
|
|
55
|
-
"release:dry": "node scripts/release.mjs --dry-run",
|
|
56
|
-
"release:beta": "node scripts/release.mjs prerelease --preid=beta",
|
|
57
|
-
"release:alpha": "node scripts/release.mjs prerelease --preid=alpha",
|
|
58
|
-
"playground:install": "cd playground && npm install",
|
|
59
|
-
"playground": "cd playground && npm run dev",
|
|
60
|
-
"playground:build": "cd playground && npm run build"
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|