slice-machine-ui 1.19.2-dev-next-release.3 → 1.19.2-dev-next-release.4

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.
Files changed (34) hide show
  1. package/components/Navigation/ChangesListItem.tsx +0 -4
  2. package/components/Navigation/VideoItem.tsx +82 -76
  3. package/components/Navigation/index.test.tsx +2 -13
  4. package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +5 -20
  5. package/lib/consts.ts +0 -7
  6. package/out/404.html +1 -1
  7. package/out/_next/static/{sVN8SG2Rfq9IshnbTCNsD → 4sLbpIu3gX8jUmr0j0Shc}/_buildManifest.js +1 -1
  8. package/out/_next/static/chunks/{840-4e395e66a2b2f394.js → 840-c317c8ff8de0f202.js} +1 -1
  9. package/out/_next/static/chunks/{904-cfe9632d3f82e990.js → 904-d5dfccdb4d9ab010.js} +1 -1
  10. package/out/_next/static/chunks/pages/{_app-37aead075684fb8d.js → _app-ee40681cde62eb80.js} +2 -2
  11. package/out/_next/static/chunks/pages/{changelog-11c9e241f5a8a4cb.js → changelog-75b0bf58d1f3045d.js} +1 -1
  12. package/out/_next/static/chunks/pages/{changes-cacc63c37e28fbbd.js → changes-9dcb1cdaa8b10560.js} +1 -1
  13. package/out/_next/static/chunks/pages/{labs-083545e0987b7886.js → labs-2349c21fbac1bd23.js} +1 -1
  14. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c9b5ff7076d2b19b.js +1 -0
  15. package/out/_next/static/chunks/pages/{slices-f77df402117379c6.js → slices-247c480530e98426.js} +1 -1
  16. package/out/changelog.html +1 -1
  17. package/out/changes.html +1 -1
  18. package/out/custom-types/[customTypeId].html +1 -1
  19. package/out/custom-types.html +1 -1
  20. package/out/index.html +1 -1
  21. package/out/labs.html +1 -1
  22. package/out/page-types/[pageTypeId].html +1 -1
  23. package/out/prismic-academy-101.png +0 -0
  24. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  25. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  26. package/out/slices.html +1 -1
  27. package/package.json +4 -4
  28. package/public/prismic-academy-101.png +0 -0
  29. package/src/components/HoverCard/HoverCard.stories.tsx +1 -1
  30. package/src/hooks/useMarketingContent.ts +65 -0
  31. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-3d4698bb55b09014.js +0 -1
  32. package/out/phil.png +0 -0
  33. package/public/phil.png +0 -0
  34. /package/out/_next/static/{sVN8SG2Rfq9IshnbTCNsD → 4sLbpIu3gX8jUmr0j0Shc}/_ssgManifest.js +0 -0
@@ -18,7 +18,6 @@ import {
18
18
  import {
19
19
  userHasSeenChangesToolTip,
20
20
  userHasSeenSimulatorToolTip,
21
- userHasSeenTutorialsToolTip,
22
21
  } from "@src/modules/userContext";
23
22
  import useSliceMachineActions from "@src/modules/useSliceMachineActions";
24
23
  import { ChangesRightElement } from "./ChangesRightElement";
@@ -68,13 +67,11 @@ const useOpenChangesHoverCard = () => {
68
67
  const {
69
68
  hasSeenChangesToolTip,
70
69
  hasSeenSimulatorToolTip,
71
- hasSeenTutorialsToolTip,
72
70
  isSavingCustomType,
73
71
  isSavingSlice,
74
72
  } = useSelector((store: SliceMachineStoreType) => ({
75
73
  hasSeenChangesToolTip: userHasSeenChangesToolTip(store),
76
74
  hasSeenSimulatorToolTip: userHasSeenSimulatorToolTip(store),
77
- hasSeenTutorialsToolTip: userHasSeenTutorialsToolTip(store),
78
75
  isSavingCustomType: isLoading(store, LoadingKeysEnum.SAVE_CUSTOM_TYPE),
79
76
  isSavingSlice: isLoading(store, LoadingKeysEnum.SAVE_SLICE),
80
77
  }));
@@ -88,7 +85,6 @@ const useOpenChangesHoverCard = () => {
88
85
 
89
86
  return (
90
87
  !hasSeenChangesToolTip &&
91
- hasSeenTutorialsToolTip &&
92
88
  hasSeenSimulatorToolTip &&
93
89
  !isSaving &&
94
90
  prevIsSaving
@@ -5,11 +5,12 @@ import {
5
5
  RefCallback,
6
6
  ReactNode,
7
7
  forwardRef,
8
+ PropsWithChildren,
8
9
  } from "react";
10
+ import { useSelector } from "react-redux";
9
11
  import ReactTooltip from "react-tooltip";
10
12
  import { Close, Flex, Paragraph } from "theme-ui";
11
13
  import { ReactTooltipPortal } from "@components/ReactTooltipPortal";
12
- import { VIDEO_YOUTUBE_PLAYLIST_LINK, PRISMIC_ACADEMY_URL } from "@lib/consts";
13
14
  import { telemetry } from "@src/apiClient";
14
15
  import { SideNavLink, SideNavListItem } from "@src/components/SideNav";
15
16
  import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
@@ -20,7 +21,9 @@ import {
20
21
  HoverCardMedia,
21
22
  HoverCardTitle,
22
23
  } from "@src/components/HoverCard";
23
- import { useAdapterName } from "@src/hooks/useAdapterName";
24
+ import { getUserReview } from "@src/modules/userContext";
25
+ import { SliceMachineStoreType } from "@src/redux/type";
26
+ import { useMarketingContent } from "@src/hooks/useMarketingContent";
24
27
 
25
28
  import style from "./VideoItem.module.css";
26
29
 
@@ -31,27 +34,23 @@ type VideoItemProps = {
31
34
 
32
35
  export const VideoItem = forwardRef<HTMLLIElement, VideoItemProps>(
33
36
  ({ onClose, hasSeenTutorialsToolTip }, ref) => {
34
- const adapterName = useAdapterName();
35
-
36
- const isNext = adapterName === "@slicemachine/adapter-next";
37
- const videoUrl = isNext ? PRISMIC_ACADEMY_URL : VIDEO_YOUTUBE_PLAYLIST_LINK;
37
+ const { tutorial } = useMarketingContent();
38
38
 
39
39
  return (
40
40
  <MaybeVideoTooltipWrapper
41
41
  onClose={onClose}
42
- isNext={isNext}
43
42
  hasSeenTutorialsToolTip={hasSeenTutorialsToolTip}
44
43
  >
45
44
  <SideNavListItem ref={ref}>
46
45
  <SideNavLink
47
- title="Tutorial"
48
- href={videoUrl}
46
+ title={tutorial.link.title}
47
+ href={tutorial.link.url}
49
48
  target="_blank"
50
49
  Icon={(props) => <PlayCircleIcon {...props} />}
51
50
  onClick={() => {
52
51
  void telemetry.track({
53
52
  event: "open-video-tutorials",
54
- video: videoUrl,
53
+ video: tutorial.link.url,
55
54
  });
56
55
  onClose();
57
56
  }}
@@ -63,20 +62,26 @@ export const VideoItem = forwardRef<HTMLLIElement, VideoItemProps>(
63
62
  );
64
63
 
65
64
  type MaybeVideoTooltipWrapperProps = VideoItemProps & {
66
- isNext: boolean;
67
65
  children: ReactNode;
68
66
  };
69
67
 
70
68
  const MaybeVideoTooltipWrapper: FC<MaybeVideoTooltipWrapperProps> = ({
71
- isNext,
72
69
  children,
73
70
  onClose,
74
71
  hasSeenTutorialsToolTip,
75
72
  }) => {
76
- if (isNext) {
73
+ const { tutorial } = useMarketingContent();
74
+ const { userReview } = useSelector((store: SliceMachineStoreType) => ({
75
+ userReview: getUserReview(store),
76
+ }));
77
+ const open =
78
+ !hasSeenTutorialsToolTip &&
79
+ (userReview.onboarding || userReview.advancedRepository);
80
+
81
+ if (tutorial.tooltip.video !== undefined) {
77
82
  return (
78
83
  <HoverCard
79
- open={!hasSeenTutorialsToolTip}
84
+ open={open}
80
85
  side="right"
81
86
  onClose={onClose}
82
87
  trigger={children}
@@ -84,40 +89,37 @@ const MaybeVideoTooltipWrapper: FC<MaybeVideoTooltipWrapperProps> = ({
84
89
  align="end"
85
90
  alignOffset={8}
86
91
  >
87
- <HoverCardTitle>Need help?</HoverCardTitle>
92
+ <HoverCardTitle>{tutorial.tooltip.title}</HoverCardTitle>
88
93
  <HoverCardMedia
89
94
  component="video"
90
- cloudName="dmtf1daqp"
91
- publicId="Tooltips/pa-course-overview_eaopsn"
92
- poster="/phil.png"
95
+ cloudName={tutorial.tooltip.video.cloudName}
96
+ publicId={tutorial.tooltip.video.publicId}
97
+ poster={tutorial.tooltip.video.poster}
93
98
  controls
94
99
  />
95
100
  <HoverCardDescription>
96
- Learn how to turn a Next.js website into a page builder powered by
97
- Prismic.
101
+ {tutorial.tooltip.description}
98
102
  </HoverCardDescription>
99
- <HoverCardCloseButton>Got It</HoverCardCloseButton>
103
+ <HoverCardCloseButton>
104
+ {tutorial.tooltip.closeButton}
105
+ </HoverCardCloseButton>
100
106
  </HoverCard>
101
107
  );
102
108
  }
103
109
 
104
110
  return (
105
- <OldVideoItem
106
- onClose={onClose}
107
- hasSeenTutorialsToolTip={hasSeenTutorialsToolTip}
108
- >
111
+ <OldVideoItem onClose={onClose} open={open}>
109
112
  {children}
110
113
  </OldVideoItem>
111
114
  );
112
115
  };
113
116
 
114
- type OldVideoItemProps = VideoItemProps & { children: ReactNode };
117
+ type OldVideoItemProps = PropsWithChildren<{
118
+ open: boolean;
119
+ onClose: () => void;
120
+ }>;
115
121
 
116
- const OldVideoItem: FC<OldVideoItemProps> = ({
117
- hasSeenTutorialsToolTip,
118
- onClose,
119
- children,
120
- }) => {
122
+ const OldVideoItem: FC<OldVideoItemProps> = ({ open, onClose, children }) => {
121
123
  const id = "video-tool-tip";
122
124
  const ref = useRef<HTMLDivElement | null>(null);
123
125
 
@@ -126,12 +128,12 @@ const OldVideoItem: FC<OldVideoItemProps> = ({
126
128
  if (ref.current) {
127
129
  return;
128
130
  }
129
- if (node && !hasSeenTutorialsToolTip) {
131
+ if (node && open) {
130
132
  setTimeout(() => ReactTooltip.show(node), 5000);
133
+ ref.current = node;
131
134
  }
132
- ref.current = node;
133
135
  },
134
- [hasSeenTutorialsToolTip],
136
+ [open],
135
137
  );
136
138
 
137
139
  return (
@@ -144,7 +146,7 @@ const OldVideoItem: FC<OldVideoItemProps> = ({
144
146
  >
145
147
  {children}
146
148
 
147
- {!hasSeenTutorialsToolTip && <ToolTip id={id} onClose={onClose} />}
149
+ {open && <ToolTip id={id} onClose={onClose} />}
148
150
  </div>
149
151
  );
150
152
  };
@@ -154,53 +156,57 @@ type ToolTipProps = {
154
156
  onClose: VideoItemProps["onClose"];
155
157
  };
156
158
 
157
- const ToolTip: FC<ToolTipProps> = ({ id, onClose }) => (
158
- <ReactTooltipPortal>
159
- <ReactTooltip
160
- id={id}
161
- effect="solid"
162
- place="right"
163
- backgroundColor="#5741c3"
164
- clickable
165
- className={style.videoTutorialsContainer}
166
- afterHide={onClose}
167
- offset={{
168
- left: 80,
169
- }}
170
- role="tooltip"
171
- getContent={() => (
172
- <Flex
173
- sx={{
174
- maxWidth: "268px",
175
- flexDirection: "column",
176
- }}
177
- >
159
+ const ToolTip: FC<ToolTipProps> = ({ id, onClose }) => {
160
+ const { tutorial } = useMarketingContent();
161
+
162
+ return (
163
+ <ReactTooltipPortal>
164
+ <ReactTooltip
165
+ id={id}
166
+ effect="solid"
167
+ place="right"
168
+ backgroundColor="#5741c3"
169
+ clickable
170
+ className={style.videoTutorialsContainer}
171
+ afterHide={onClose}
172
+ offset={{
173
+ left: 80,
174
+ }}
175
+ role="tooltip"
176
+ getContent={() => (
178
177
  <Flex
179
178
  sx={{
180
- flexDirection: "row",
181
- alignItems: "center",
182
- justifyContent: "space-between",
183
- mb: 1,
179
+ maxWidth: "268px",
180
+ flexDirection: "column",
184
181
  }}
185
182
  >
186
- <Paragraph sx={{ color: "#FFF", fontWeight: 700 }}>
187
- Need Help?
188
- </Paragraph>
189
- <Close
190
- data-testid="video-tooltip-close-button"
191
- onClick={onClose}
183
+ <Flex
192
184
  sx={{
193
- width: "26px",
185
+ flexDirection: "row",
186
+ alignItems: "center",
187
+ justifyContent: "space-between",
188
+ mb: 1,
194
189
  }}
195
- />
190
+ >
191
+ <Paragraph sx={{ color: "#FFF", fontWeight: 700 }}>
192
+ {tutorial.tooltip.title}
193
+ </Paragraph>
194
+ <Close
195
+ data-testid="video-tooltip-close-button"
196
+ onClick={onClose}
197
+ sx={{
198
+ width: "26px",
199
+ }}
200
+ />
201
+ </Flex>
202
+ <Paragraph sx={{ color: "#FFF", fontWeight: 400 }}>
203
+ {tutorial.tooltip.description}
204
+ </Paragraph>
196
205
  </Flex>
197
- <Paragraph sx={{ color: "#FFF", fontWeight: 400 }}>
198
- Follow our Quick Start guide to learn the basics of Slice Machine
199
- </Paragraph>
200
- </Flex>
201
- )}
202
- />
203
- </ReactTooltipPortal>
204
- );
206
+ )}
207
+ />
208
+ </ReactTooltipPortal>
209
+ );
210
+ };
205
211
 
206
212
  export default VideoItem;
@@ -270,7 +270,7 @@ describe("Side Navigation", () => {
270
270
 
271
271
  renderSideNavigation({ canUpdate: true });
272
272
 
273
- const link = (await screen.findByText("Tutorial")).parentElement
273
+ const link = (await screen.findByText("Academy")).parentElement
274
274
  ?.parentElement as HTMLElement;
275
275
 
276
276
  await waitFor(() =>
@@ -284,7 +284,7 @@ describe("Side Navigation", () => {
284
284
  });
285
285
 
286
286
  test("Video Item not next", async () => {
287
- const { user } = renderSideNavigation({ canUpdate: true });
287
+ renderSideNavigation({ canUpdate: true });
288
288
 
289
289
  const link = (await screen.findByText("Tutorial")).parentElement
290
290
  ?.parentElement as HTMLElement;
@@ -293,16 +293,5 @@ describe("Side Navigation", () => {
293
293
  "https://youtube.com/playlist?list=PLUVZjQltoA3wnaQudcqQ3qdZNZ6hyfyhH",
294
294
  );
295
295
  expect(link).toHaveAttribute("target", "_blank");
296
-
297
- await user.hover(link);
298
-
299
- const tooltip = await screen.findByRole("tooltip");
300
- expect(tooltip).toBeVisible();
301
- const closeButton = await within(tooltip).findByTestId(
302
- "video-tooltip-close-button",
303
- );
304
- await user.click(closeButton);
305
-
306
- expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
307
296
  });
308
297
  });
@@ -7,10 +7,7 @@ import { useRouter } from "next/router";
7
7
  import ReactTooltip from "react-tooltip";
8
8
 
9
9
  import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
10
- import {
11
- userHasSeenSimulatorToolTip,
12
- userHasSeenTutorialsToolTip,
13
- } from "@src/modules/userContext";
10
+ import { userHasSeenSimulatorToolTip } from "@src/modules/userContext";
14
11
  import { useSelector } from "react-redux";
15
12
  import { SliceMachineStoreType } from "@src/redux/type";
16
13
  import useSliceMachineActions from "@src/modules/useSliceMachineActions";
@@ -97,28 +94,18 @@ const SimulatorButton: React.FC<{
97
94
 
98
95
  const { setSeenSimulatorToolTip } = useSliceMachineActions();
99
96
 
100
- const { hasSeenSimulatorTooltip, hasSeenTutorialsToolTip } = useSelector(
97
+ const { hasSeenSimulatorTooltip } = useSelector(
101
98
  (store: SliceMachineStoreType) => ({
102
99
  hasSeenSimulatorTooltip: userHasSeenSimulatorToolTip(store),
103
- hasSeenTutorialsToolTip: userHasSeenTutorialsToolTip(store),
104
100
  }),
105
101
  );
106
102
 
107
103
  useEffect(() => {
108
104
  const node = ref.current;
109
- if (
110
- node &&
111
- isSimulatorAvailableForFramework &&
112
- !hasSeenSimulatorTooltip &&
113
- hasSeenTutorialsToolTip
114
- ) {
105
+ if (node && isSimulatorAvailableForFramework && !hasSeenSimulatorTooltip) {
115
106
  setTimeout(() => ReactTooltip.show(node), 5000);
116
107
  }
117
- }, [
118
- isSimulatorAvailableForFramework,
119
- hasSeenSimulatorTooltip,
120
- hasSeenTutorialsToolTip,
121
- ]);
108
+ }, [isSimulatorAvailableForFramework, hasSeenSimulatorTooltip]);
122
109
 
123
110
  const onCloseToolTip = () => {
124
111
  setSeenSimulatorToolTip();
@@ -131,9 +118,7 @@ const SimulatorButton: React.FC<{
131
118
  const disabled = !isSimulatorAvailableForFramework || isTouched;
132
119
 
133
120
  const shouldShowSimulatorTooltip =
134
- isSimulatorAvailableForFramework &&
135
- !hasSeenSimulatorTooltip &&
136
- hasSeenTutorialsToolTip;
121
+ isSimulatorAvailableForFramework && !hasSeenSimulatorTooltip;
137
122
 
138
123
  const shouldShowNeedToSaveTooltip =
139
124
  isSimulatorAvailableForFramework &&
package/lib/consts.ts CHANGED
@@ -10,13 +10,6 @@ export const API_ID_REGEX = /^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/;
10
10
  export const API_ID_RETRO_COMPATIBLE_REGEX =
11
11
  /^[A-Za-z0-9]+(?:[_-][A-Za-z0-9]+)*$/;
12
12
 
13
- export const PRISMIC_ACADEMY_URL =
14
- "https://prismic.io/academy/prismic-and-nextjs";
15
-
16
- // VIDEOS
17
- export const VIDEO_YOUTUBE_PLAYLIST_LINK =
18
- "https://youtube.com/playlist?list=PLUVZjQltoA3wnaQudcqQ3qdZNZ6hyfyhH";
19
-
20
13
  export const VIDEO_WHAT_ARE_SLICES = "placeholders/What_are_Slices_mrvome";
21
14
  export const VIDEO_WHAT_ARE_CUSTOM_TYPES = "placeholders/CUSTOM_TYPE__0.5.0";
22
15
 
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-37aead075684fb8d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/sVN8SG2Rfq9IshnbTCNsD/_buildManifest.js" defer=""></script><script src="/_next/static/sVN8SG2Rfq9IshnbTCNsD/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"sVN8SG2Rfq9IshnbTCNsD","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-ee40681cde62eb80.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/4sLbpIu3gX8jUmr0j0Shc/_buildManifest.js" defer=""></script><script src="/_next/static/4sLbpIu3gX8jUmr0j0Shc/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"4sLbpIu3gX8jUmr0j0Shc","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,c,e,a,t,i,n,b,d,f){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,n,"static/chunks/pages/index-5266b7f0ca55025a.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-11c9e241f5a8a4cb.js"],"/changes":[e,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,a,"static/css/f585032018f6024b.css","static/chunks/pages/changes-cacc63c37e28fbbd.js"],"/custom-types":[c,i,n,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[b,s,c,t,d,f,"static/chunks/pages/custom-types/[customTypeId]-aa37e07c96c8f9b5.js"],"/labs":["static/chunks/pages/labs-083545e0987b7886.js"],"/page-types/[pageTypeId]":[b,s,c,t,d,f,"static/chunks/pages/page-types/[pageTypeId]-d445f5cabeb460c0.js"],"/slices":[e,s,a,"static/css/22d69420bda374a7.css","static/chunks/pages/slices-f77df402117379c6.js"],"/slices/[lib]/[sliceName]/[variation]":[e,s,a,t,"static/css/e4f4acc81f000d9c.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-3d4698bb55b09014.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[e,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-1bb05c8aa7db2bc2.js","static/chunks/585-f3dca093db4b3792.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5e441f8b049cf91b.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-2b881a5b68ff11ba.js","static/chunks/550-1dafbcec5d50b384.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-c513d12da6156fb7.js","static/chunks/482-e6bbd1fcdcdf79ad.js","static/chunks/840-4e395e66a2b2f394.js","static/css/26b51745402a92af.css","static/chunks/125-e3857af2068bbedf.js","static/chunks/904-cfe9632d3f82e990.js","static/css/1fbd45881dcf43c4.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,c,e,a,t,i,b,n,f,u){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,b,"static/chunks/pages/index-5266b7f0ca55025a.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-75b0bf58d1f3045d.js"],"/changes":[e,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,a,"static/css/f585032018f6024b.css","static/chunks/pages/changes-9dcb1cdaa8b10560.js"],"/custom-types":[c,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[n,s,c,t,f,u,"static/chunks/pages/custom-types/[customTypeId]-aa37e07c96c8f9b5.js"],"/labs":["static/chunks/pages/labs-2349c21fbac1bd23.js"],"/page-types/[pageTypeId]":[n,s,c,t,f,u,"static/chunks/pages/page-types/[pageTypeId]-d445f5cabeb460c0.js"],"/slices":[e,s,a,"static/css/22d69420bda374a7.css","static/chunks/pages/slices-247c480530e98426.js"],"/slices/[lib]/[sliceName]/[variation]":[e,s,a,t,"static/css/e4f4acc81f000d9c.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c9b5ff7076d2b19b.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[e,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-1bb05c8aa7db2bc2.js","static/chunks/585-f3dca093db4b3792.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5e441f8b049cf91b.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-2b881a5b68ff11ba.js","static/chunks/550-1dafbcec5d50b384.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-c513d12da6156fb7.js","static/chunks/482-e6bbd1fcdcdf79ad.js","static/chunks/840-c317c8ff8de0f202.js","static/css/26b51745402a92af.css","static/chunks/125-e3857af2068bbedf.js","static/chunks/904-d5dfccdb4d9ab010.js","static/css/1fbd45881dcf43c4.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[840],{80131:function(e,n,t){"use strict";t.d(n,{M:function(){return w}});var r=t(62230),s=t(85244),a=t(52322),l=t(2784),c=t(75289),i=t(56580),d=t(68780),o=t(70041),u=t(17064),h=t(63397),x=t(78656),C=t(98240),f=function(e){var n=e.selected,t=(0,C.Z)(e,["selected"]);return(0,a.jsx)(c.kC,(0,r.Z)({sx:{p:"24px",mb:3,alignItems:"top",cursor:"pointer",borderRadius:"6px",backgroundColor:"grayLight",boxShadow:n?function(e){var n;return"0 0 0 2px ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.primary))}:"none","&:hover":{boxShadow:function(e){var n;return"0 0 0 2px ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.primary))}}}},t))},p=function(e){var n=e.format,t=(0,u.Z)((0,h.U$)("repeatable"),3),r=t[0],s=t[2],l=x.$[n];return(0,a.jsxs)(c.xu,{mb:2,children:[(0,a.jsxs)(f,{selected:r.value,onClick:function(){return s.setValue(!0)},children:[(0,a.jsx)(c.Y8,{checked:r.value,onChange:function(){},"data-cy":"repeatable-type-radio-btn"}),(0,a.jsxs)(c.xu,{sx:{marginLeft:2},children:["Reusable type",(0,a.jsx)(c.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:l.hintRepeatable})]})]}),(0,a.jsxs)(f,{selected:!r.value,onClick:function(){return s.setValue(!1)},children:[(0,a.jsx)(c.Y8,{checked:!r.value,onChange:function(){},"data-cy":"single-type-radio-btn"}),(0,a.jsxs)(c.xu,{sx:{marginLeft:2},children:["Single type",(0,a.jsx)(c.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:l.hintSingle})]})]})]})},m=t(90374),j=t(49471),g=t(77174),v=t(24340),b=t(32665),_=t(3098),y=t(82770),T=t(38876),L=t(75329),w=function(e){var n=e.format,t=e.origin,u=void 0===t?"table":t,h=(0,m.Z)(),C=h.createCustomType,f=h.closeModals,w=(0,i.v9)(function(e){return{customTypeIds:(0,j.W6)(e),customTypeLabels:(0,j.YS)(e),isCreateCustomTypeModalOpen:(0,g.gP)(e,v.q.CREATE_CUSTOM_TYPE),isCreatingCustomType:(0,b.hg)(e,_.z.CREATE_CUSTOM_TYPE)}}),S=w.customTypeIds,k=w.isCreateCustomTypeModalOpen,Z=w.isCreatingCustomType,H=w.customTypeLabels,M=x.$[n],N=(0,l.useState)(!0),E=N[0],I=N[1],R=function(e){var t=e.id,r=e.label,s=e.repeatable,a=r||t;y.Xe.track({event:"custom-type:created",id:t,name:a,format:n,type:s?"repeatable":"single",origin:u}),C(t,a,s,n),f(),I(!0)},V=function(e,n,t){t(E?(0,s.Z)((0,r.Z)({},n),{label:e.target.value,id:(0,T.lV)(e.target.value)}):(0,s.Z)((0,r.Z)({},n),{label:e.target.value}))},z=function(e,n){n("id",e.target.value),I(!1)};return(0,a.jsx)(d.Z,{dataCy:"create-ct-modal",isOpen:k,widthInPx:"530px",formId:"create-custom-type",buttonLabel:"Create",close:function(){f(),I(!0)},onSubmit:R,isLoading:Z,initialValues:{repeatable:!0,id:"",label:""},validate:function(e){var n=e.id,t=e.label,r={};return t&&t.length||(r.label="Cannot be empty."),!r.label&&H.includes(t)&&(r.label="".concat(M.name({start:!0,plural:!1})," name is already taken.")),n&&n.length||(r.id="ID cannot be empty."),r.id||!n||L.xo.exec(n)||(r.id="Invalid id: No special characters allowed."),!r.id&&n&&S.map(function(e){return e.toLowerCase()}).includes(n)&&(r.id='ID "'.concat(n,'" exists already.')),Object.keys(r).length>0?r:void 0},content:{title:"Create a new ".concat(M.name({start:!1,plural:!1}))},children:function(e){var t=e.errors,r=e.setValues,s=e.setFieldValue,l=e.values,i=e.touched;return(0,a.jsxs)(c.xu,{children:[(0,a.jsx)(p,{format:n}),(0,a.jsx)(o.W,{name:"label",label:"".concat(M.name({start:!0,plural:!1})," Name"),dataCy:"ct-name-input",placeholder:"A display name for the ".concat(M.name({start:!1,plural:!1})),error:i.label?t.label:void 0,onChange:function(e){return V(e,l,r)}}),(0,a.jsx)(o.W,{name:"id",dataCy:"ct-id-input",label:"".concat(M.name({start:!0,plural:!1})," ID"),placeholder:M.inputPlaceholder,error:i.id?t.id:void 0,onChange:function(e){return z(e,s)}})]})}})}},840:function(e,n,t){"use strict";t.d(n,{F:function(){return D}});var r=t(52322),s=t(2784),a=t(71651),l=t(97729),c=t.n(l),i=t(56580),d=t(25251),o=t(90374),u=t(32665),h=t(3098),x=t(80131),C=t(78656),f=t(5632),p=t(67557),m=t(50002),j=t(6277);t(57274);var g=function(e){var n=e.children;return(0,r.jsx)("div",{className:"_1ecs97d9bi _1ecs97d9bn _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c9",children:(0,r.jsx)("table",{className:"gdfsm51 _1ecs97d9bi _1ecs97d9bn _1ecs97d9g4 _1ecs97d9h6",children:n})})},v=(0,s.createContext)("body");function b(){return(0,s.useContext)(v)}var _=function(e){var n=e.children;return(0,r.jsx)(v.Provider,{value:"head",children:(0,r.jsx)("thead",{className:"gdfsm52 _1ecs97d9bi _1ecs97d9bn _1ecs97d18 _1ecs97d8l",children:n})})},y=function(e){var n=e.children;return(0,r.jsx)(v.Provider,{value:"body",children:(0,r.jsx)("tbody",{className:"gdfsm53 _1ecs97d9bi _1ecs97d9bn",children:n})})},T=function(e){var n,t=e.children,s=e.onClick,a=b();return(0,r.jsx)("tr",{className:(0,j.W)("_1ecs97d9bi _1ecs97d9bn _1ecs97d9jc",(n={},(0,p.Z)(n,"_1ecs97d9gd",!!s),(0,p.Z)(n,"_1ecs97dm _1ecs97d7z _1ecs97d3c _1ecs97dap _1ecs97d2w _1ecs97da9 _1ecs97d9jf _1ecs97d9ux _1ecs97d9cv _1ecs97d9v0","body"===a),n)),onClick:function(e){var n,t=e.target;if(s&&e.currentTarget.contains(t)){var r=(0,m.J)(t);(null===(n=null==r?void 0:r.contains(e.currentTarget))||void 0===n||n)&&s(e)}},children:t})},L=function(e){var n=e.children,t=b();return(0,r.jsx)("head"===t?"th":"td",{className:"gdfsm55 _1ecs97d9bi _1ecs97d9bn _1ecs97d268 _1ecs97d2dl _1ecs97d9ex _1ecs97d9bj _1ecs97d6ee _1ecs97d6lr _1ecs97d9gh _1ecs97d9ta",children:(0,r.jsx)("div",{className:"gdfsm56 _1ecs97d9bi _1ecs97d9bk",children:n})})},w=function(){return(0,r.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8 28H24C25.1046 28 26 27.1046 26 26V9L21 4H8C6.89543 4 6 4.89543 6 6V26C6 27.1046 6.89543 28 8 28Z",fill:"#6E56CF"}),(0,r.jsx)("path",{d:"M23 9H26L21 4V7C21 8.10457 21.8954 9 23 9Z",fill:"#9E8CFC"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0912 12C13.2794 12 11 14.2794 11 17.0912C11 19.903 13.2794 22.1824 16.0912 22.1824C17.9763 22.1824 19.6215 21.1577 20.501 19.6372C20.6563 19.3688 20.7878 19.0849 20.8926 18.7883C20.9846 18.5279 20.8482 18.2422 20.5878 18.1502C20.3275 18.0582 20.0418 18.1947 19.9498 18.455C19.8657 18.693 19.7601 18.9209 19.6354 19.1365C18.9273 20.3606 17.6049 21.1824 16.0912 21.1824C13.8317 21.1824 12 19.3507 12 17.0912C12 14.8317 13.8317 13 16.0912 13C17.4478 13 18.6507 13.66 19.3955 14.6782H17.6216C17.3455 14.6782 17.1216 14.9021 17.1216 15.1782C17.1216 15.4544 17.3455 15.6782 17.6216 15.6782H20.2998C20.576 15.6782 20.7998 15.4544 20.7998 15.1782V12.5C20.7998 12.2239 20.576 12 20.2998 12C20.0237 12 19.7998 12.2239 19.7998 12.5V13.6032C18.8717 12.6167 17.5536 12 16.0912 12Z",fill:"white"})]})},S=function(){return(0,r.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8 28H24C25.1046 28 26 27.1046 26 26V9L21 4H8C6.89543 4 6 4.89543 6 6V26C6 27.1046 6.89543 28 8 28Z",fill:"#6E56CF"}),(0,r.jsx)("path",{d:"M23 9H26L21 4V7C21 8.10457 21.8954 9 23 9Z",fill:"#9E8CFC"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0869 14.6818L14.6627 12.3787C14.7183 12.1561 14.9183 12 15.1477 12C15.473 12 15.7117 12.3057 15.6328 12.6213L15.1177 14.6818H17.7232L18.299 12.3787C18.3547 12.1561 18.5547 12 18.7841 12C19.1094 12 19.3481 12.3057 19.2692 12.6213L18.754 14.6818H21C21.2761 14.6818 21.5 14.9057 21.5 15.1818C21.5 15.458 21.2761 15.6818 21 15.6818H18.504L17.8449 18.3182H20C20.2761 18.3182 20.5 18.542 20.5 18.8182C20.5 19.0943 20.2761 19.3182 20 19.3182H17.5949L17.0192 21.6213C16.9635 21.8439 16.7635 22 16.5341 22C16.2088 22 15.9701 21.6943 16.049 21.3787L16.5642 19.3182H13.9586L13.3828 21.6213C13.3272 21.8439 13.1272 22 12.8977 22C12.5724 22 12.3338 21.6943 12.4127 21.3787L12.9278 19.3182H11C10.7239 19.3182 10.5 19.0943 10.5 18.8182C10.5 18.542 10.7239 18.3182 11 18.3182H13.1778L13.8369 15.6818H12C11.7239 15.6818 11.5 15.458 11.5 15.1818C11.5 14.9057 11.7239 14.6818 12 14.6818H14.0869ZM16.8142 18.3182L17.4732 15.6818H14.8677L14.2086 18.3182H16.8142Z",fill:"white"})]})},k=t(67445),Z=t(22710),H=t(99267),M=t(17329),N=t(40147),E=t(49471),I=t(7819),R=t(75708);function V(e){return z.apply(this,arguments)}function z(){return(z=(0,Z.Z)(function(e){var n,t,r;return(0,H.__generator)(this,function(s){switch(s.label){case 0:return[4,N.j.customTypes.readAllCustomTypes({format:e})];case 1:if(t=(n=s.sent()).errors,r=n.models,t.length>0)throw t;return[2,r.map(function(e){return e.model})]}})})).apply(this,arguments)}var P=t(2754),O=t(62607),A=function(e){var n,t,l,c,d,u,h=e.format,x=e.isCreatingCustomType,p=(0,o.Z)().openCreateCustomTypeModal,m=(0,f.useRouter)(),j=(t=(0,s.useCallback)(function(e){return(0,M.VA)(V,[h],e)},[h]),{customTypes:(0,M.QT)(V,[h]),updateCustomTypes:t}),v=j.customTypes,b=j.updateCustomTypes,Z=v.sort(function(e,n){return e.id.localeCompare(n.id)}),H=k.cd[h],N=C.$[h];return(u=(0,i.v9)(function(e){return{storeCustomTypes:(0,E.Ch)(e).filter(I.TG)}}).storeCustomTypes,(0,s.useEffect)(function(){var e=u.filter(function(e){return e.local.format===h});(e.length!==v.length||e.some(function(e){var n=v.find(function(n){return n.id===e.local.id});return!n||JSON.stringify(R.Dc.fromSM(e.local))!==JSON.stringify(n)}))&&b(e.map(function(e){var n=e.local;return R.Dc.fromSM(n)}))},[h,b,v,u]),0===Z.length)?(0,r.jsxs)(P.R$,{style:{alignSelf:"center",marginTop:a.TV.size[72]},children:[(0,r.jsx)(P.u2,{children:(0,r.jsx)(a.Ee,{src:H.blankSlateImage,sizing:"cover"})}),(0,r.jsxs)(P.T9,{children:[(0,r.jsx)(P._T,{children:N.name({start:!0,plural:!0})}),(0,r.jsx)(P.nf,{children:N.blankSlateDescription}),(0,r.jsx)(P.Qj,{children:(0,r.jsx)(a.zx,{onClick:p,loading:x,children:"Create"})})]})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g,{children:[(0,r.jsx)(_,{children:(0,r.jsxs)(T,{children:[(0,r.jsx)(L,{children:(0,r.jsx)(a.I5,{name:"notes",size:"medium"})}),(0,r.jsx)(L,{children:"Label"}),(0,r.jsx)(L,{children:"API ID"}),(0,r.jsx)(L,{children:"Limit"}),(0,r.jsx)(L,{})]})}),(0,r.jsx)(y,{children:Z.map(function(e){var n=e.repeatable,t=e.label,s=e.id;return(0,r.jsxs)(T,{onClick:function(){m.push(k.cd[h].getBuilderPagePathname(s))},children:[(0,r.jsx)(L,{children:n?(0,r.jsx)(w,{}):(0,r.jsx)(S,{})}),(0,r.jsx)(L,{children:t}),(0,r.jsx)(L,{children:s}),(0,r.jsx)(L,{children:n?"Reusable":"Single"}),(0,r.jsx)(L,{children:(0,r.jsx)(O._,{isChangesLocal:!1,format:h,customType:e})})]},s)})})]})})},D=function(e){var n=e.format,t=C.$[n],l=(0,o.Z)().openCreateCustomTypeModal,f=(0,i.v9)(function(e){return{isCreatingCustomType:(0,u.hg)(e,h.z.CREATE_CUSTOM_TYPE)}}).isCreatingCustomType;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsxs)("title",{children:[t.name({start:!0,plural:!0})," - Slice Machine"]})}),(0,r.jsx)(a.SV,{renderError:function(){return(0,r.jsx)(d.LN,{children:(0,r.jsx)(d.RN,{children:(0,r.jsx)(a.xu,{alignItems:"center",justifyContent:"center",children:(0,r.jsx)(a.Iq,{title:"Request failed",description:"An error occurred while fetching your ".concat(t.name({start:!1,plural:!0}),".")})})})})},children:(0,r.jsx)(s.Suspense,{fallback:(0,r.jsxs)(d.LN,{children:[(0,r.jsxs)(d.wd,{children:[(0,r.jsx)(d.Cx,{folder:t.name({start:!0,plural:!0})}),(0,r.jsx)(d.K2,{children:(0,r.jsx)(a.zx,{disabled:!0,startIcon:"add",children:"Create"})})]}),(0,r.jsx)(d.RN,{children:(0,r.jsx)(a._3,{})})]}),children:(0,r.jsxs)(d.LN,{children:[(0,r.jsxs)(d.wd,{children:[(0,r.jsx)(d.Cx,{folder:t.name({start:!0,plural:!0})}),(0,r.jsx)(d.K2,{children:(0,r.jsx)(a.zx,{"data-cy":"create-ct",loading:f,onClick:l,startIcon:"add",children:"Create"})})]}),(0,r.jsx)(d.RN,{children:(0,r.jsxs)(a.xu,{flexDirection:"column",children:[(0,r.jsx)(A,{format:n,isCreatingCustomType:f}),(0,r.jsx)(x.M,{format:n})]})})]})})})]})}},57274:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[840],{80131:function(e,n,t){"use strict";t.d(n,{M:function(){return w}});var r=t(62230),s=t(85244),a=t(52322),l=t(2784),c=t(75289),i=t(56580),d=t(68780),o=t(70041),u=t(17064),h=t(63397),x=t(78656),C=t(98240),f=function(e){var n=e.selected,t=(0,C.Z)(e,["selected"]);return(0,a.jsx)(c.kC,(0,r.Z)({sx:{p:"24px",mb:3,alignItems:"top",cursor:"pointer",borderRadius:"6px",backgroundColor:"grayLight",boxShadow:n?function(e){var n;return"0 0 0 2px ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.primary))}:"none","&:hover":{boxShadow:function(e){var n;return"0 0 0 2px ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.primary))}}}},t))},p=function(e){var n=e.format,t=(0,u.Z)((0,h.U$)("repeatable"),3),r=t[0],s=t[2],l=x.$[n];return(0,a.jsxs)(c.xu,{mb:2,children:[(0,a.jsxs)(f,{selected:r.value,onClick:function(){return s.setValue(!0)},children:[(0,a.jsx)(c.Y8,{checked:r.value,onChange:function(){},"data-cy":"repeatable-type-radio-btn"}),(0,a.jsxs)(c.xu,{sx:{marginLeft:2},children:["Reusable type",(0,a.jsx)(c.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:l.hintRepeatable})]})]}),(0,a.jsxs)(f,{selected:!r.value,onClick:function(){return s.setValue(!1)},children:[(0,a.jsx)(c.Y8,{checked:!r.value,onChange:function(){},"data-cy":"single-type-radio-btn"}),(0,a.jsxs)(c.xu,{sx:{marginLeft:2},children:["Single type",(0,a.jsx)(c.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:l.hintSingle})]})]})]})},m=t(90374),j=t(49471),g=t(77174),v=t(24340),b=t(32665),_=t(3098),y=t(82770),T=t(38876),L=t(75329),w=function(e){var n=e.format,t=e.origin,u=void 0===t?"table":t,h=(0,m.Z)(),C=h.createCustomType,f=h.closeModals,w=(0,i.v9)(function(e){return{customTypeIds:(0,j.W6)(e),customTypeLabels:(0,j.YS)(e),isCreateCustomTypeModalOpen:(0,g.gP)(e,v.q.CREATE_CUSTOM_TYPE),isCreatingCustomType:(0,b.hg)(e,_.z.CREATE_CUSTOM_TYPE)}}),S=w.customTypeIds,k=w.isCreateCustomTypeModalOpen,Z=w.isCreatingCustomType,H=w.customTypeLabels,M=x.$[n],N=(0,l.useState)(!0),E=N[0],I=N[1],R=function(e){var t=e.id,r=e.label,s=e.repeatable,a=r||t;y.Xe.track({event:"custom-type:created",id:t,name:a,format:n,type:s?"repeatable":"single",origin:u}),C(t,a,s,n),f(),I(!0)},V=function(e,n,t){t(E?(0,s.Z)((0,r.Z)({},n),{label:e.target.value,id:(0,T.lV)(e.target.value)}):(0,s.Z)((0,r.Z)({},n),{label:e.target.value}))},z=function(e,n){n("id",e.target.value),I(!1)};return(0,a.jsx)(d.Z,{dataCy:"create-ct-modal",isOpen:k,widthInPx:"530px",formId:"create-custom-type",buttonLabel:"Create",close:function(){f(),I(!0)},onSubmit:R,isLoading:Z,initialValues:{repeatable:!0,id:"",label:""},validate:function(e){var n=e.id,t=e.label,r={};return t&&t.length||(r.label="Cannot be empty."),!r.label&&H.includes(t)&&(r.label="".concat(M.name({start:!0,plural:!1})," name is already taken.")),n&&n.length||(r.id="ID cannot be empty."),r.id||!n||L.xo.exec(n)||(r.id="Invalid id: No special characters allowed."),!r.id&&n&&S.map(function(e){return e.toLowerCase()}).includes(n)&&(r.id='ID "'.concat(n,'" exists already.')),Object.keys(r).length>0?r:void 0},content:{title:"Create a new ".concat(M.name({start:!1,plural:!1}))},children:function(e){var t=e.errors,r=e.setValues,s=e.setFieldValue,l=e.values,i=e.touched;return(0,a.jsxs)(c.xu,{children:[(0,a.jsx)(p,{format:n}),(0,a.jsx)(o.W,{name:"label",label:"".concat(M.name({start:!0,plural:!1})," Name"),dataCy:"ct-name-input",placeholder:"A display name for the ".concat(M.name({start:!1,plural:!1})),error:i.label?t.label:void 0,onChange:function(e){return V(e,l,r)}}),(0,a.jsx)(o.W,{name:"id",dataCy:"ct-id-input",label:"".concat(M.name({start:!0,plural:!1})," ID"),placeholder:M.inputPlaceholder,error:i.id?t.id:void 0,onChange:function(e){return z(e,s)}})]})}})}},840:function(e,n,t){"use strict";t.d(n,{F:function(){return D}});var r=t(52322),s=t(2784),a=t(71651),l=t(97729),c=t.n(l),i=t(56580),d=t(22031),o=t(90374),u=t(32665),h=t(3098),x=t(80131),C=t(78656),f=t(5632),p=t(67557),m=t(50002),j=t(6277);t(57274);var g=function(e){var n=e.children;return(0,r.jsx)("div",{className:"_1ecs97d9bi _1ecs97d9bn _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c9",children:(0,r.jsx)("table",{className:"gdfsm51 _1ecs97d9bi _1ecs97d9bn _1ecs97d9g4 _1ecs97d9h6",children:n})})},v=(0,s.createContext)("body");function b(){return(0,s.useContext)(v)}var _=function(e){var n=e.children;return(0,r.jsx)(v.Provider,{value:"head",children:(0,r.jsx)("thead",{className:"gdfsm52 _1ecs97d9bi _1ecs97d9bn _1ecs97d18 _1ecs97d8l",children:n})})},y=function(e){var n=e.children;return(0,r.jsx)(v.Provider,{value:"body",children:(0,r.jsx)("tbody",{className:"gdfsm53 _1ecs97d9bi _1ecs97d9bn",children:n})})},T=function(e){var n,t=e.children,s=e.onClick,a=b();return(0,r.jsx)("tr",{className:(0,j.W)("_1ecs97d9bi _1ecs97d9bn _1ecs97d9jc",(n={},(0,p.Z)(n,"_1ecs97d9gd",!!s),(0,p.Z)(n,"_1ecs97dm _1ecs97d7z _1ecs97d3c _1ecs97dap _1ecs97d2w _1ecs97da9 _1ecs97d9jf _1ecs97d9ux _1ecs97d9cv _1ecs97d9v0","body"===a),n)),onClick:function(e){var n,t=e.target;if(s&&e.currentTarget.contains(t)){var r=(0,m.J)(t);(null===(n=null==r?void 0:r.contains(e.currentTarget))||void 0===n||n)&&s(e)}},children:t})},L=function(e){var n=e.children,t=b();return(0,r.jsx)("head"===t?"th":"td",{className:"gdfsm55 _1ecs97d9bi _1ecs97d9bn _1ecs97d268 _1ecs97d2dl _1ecs97d9ex _1ecs97d9bj _1ecs97d6ee _1ecs97d6lr _1ecs97d9gh _1ecs97d9ta",children:(0,r.jsx)("div",{className:"gdfsm56 _1ecs97d9bi _1ecs97d9bk",children:n})})},w=function(){return(0,r.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8 28H24C25.1046 28 26 27.1046 26 26V9L21 4H8C6.89543 4 6 4.89543 6 6V26C6 27.1046 6.89543 28 8 28Z",fill:"#6E56CF"}),(0,r.jsx)("path",{d:"M23 9H26L21 4V7C21 8.10457 21.8954 9 23 9Z",fill:"#9E8CFC"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0912 12C13.2794 12 11 14.2794 11 17.0912C11 19.903 13.2794 22.1824 16.0912 22.1824C17.9763 22.1824 19.6215 21.1577 20.501 19.6372C20.6563 19.3688 20.7878 19.0849 20.8926 18.7883C20.9846 18.5279 20.8482 18.2422 20.5878 18.1502C20.3275 18.0582 20.0418 18.1947 19.9498 18.455C19.8657 18.693 19.7601 18.9209 19.6354 19.1365C18.9273 20.3606 17.6049 21.1824 16.0912 21.1824C13.8317 21.1824 12 19.3507 12 17.0912C12 14.8317 13.8317 13 16.0912 13C17.4478 13 18.6507 13.66 19.3955 14.6782H17.6216C17.3455 14.6782 17.1216 14.9021 17.1216 15.1782C17.1216 15.4544 17.3455 15.6782 17.6216 15.6782H20.2998C20.576 15.6782 20.7998 15.4544 20.7998 15.1782V12.5C20.7998 12.2239 20.576 12 20.2998 12C20.0237 12 19.7998 12.2239 19.7998 12.5V13.6032C18.8717 12.6167 17.5536 12 16.0912 12Z",fill:"white"})]})},S=function(){return(0,r.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8 28H24C25.1046 28 26 27.1046 26 26V9L21 4H8C6.89543 4 6 4.89543 6 6V26C6 27.1046 6.89543 28 8 28Z",fill:"#6E56CF"}),(0,r.jsx)("path",{d:"M23 9H26L21 4V7C21 8.10457 21.8954 9 23 9Z",fill:"#9E8CFC"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0869 14.6818L14.6627 12.3787C14.7183 12.1561 14.9183 12 15.1477 12C15.473 12 15.7117 12.3057 15.6328 12.6213L15.1177 14.6818H17.7232L18.299 12.3787C18.3547 12.1561 18.5547 12 18.7841 12C19.1094 12 19.3481 12.3057 19.2692 12.6213L18.754 14.6818H21C21.2761 14.6818 21.5 14.9057 21.5 15.1818C21.5 15.458 21.2761 15.6818 21 15.6818H18.504L17.8449 18.3182H20C20.2761 18.3182 20.5 18.542 20.5 18.8182C20.5 19.0943 20.2761 19.3182 20 19.3182H17.5949L17.0192 21.6213C16.9635 21.8439 16.7635 22 16.5341 22C16.2088 22 15.9701 21.6943 16.049 21.3787L16.5642 19.3182H13.9586L13.3828 21.6213C13.3272 21.8439 13.1272 22 12.8977 22C12.5724 22 12.3338 21.6943 12.4127 21.3787L12.9278 19.3182H11C10.7239 19.3182 10.5 19.0943 10.5 18.8182C10.5 18.542 10.7239 18.3182 11 18.3182H13.1778L13.8369 15.6818H12C11.7239 15.6818 11.5 15.458 11.5 15.1818C11.5 14.9057 11.7239 14.6818 12 14.6818H14.0869ZM16.8142 18.3182L17.4732 15.6818H14.8677L14.2086 18.3182H16.8142Z",fill:"white"})]})},k=t(67445),Z=t(22710),H=t(99267),M=t(17329),N=t(40147),E=t(49471),I=t(7819),R=t(75708);function V(e){return z.apply(this,arguments)}function z(){return(z=(0,Z.Z)(function(e){var n,t,r;return(0,H.__generator)(this,function(s){switch(s.label){case 0:return[4,N.j.customTypes.readAllCustomTypes({format:e})];case 1:if(t=(n=s.sent()).errors,r=n.models,t.length>0)throw t;return[2,r.map(function(e){return e.model})]}})})).apply(this,arguments)}var P=t(2754),O=t(62607),A=function(e){var n,t,l,c,d,u,h=e.format,x=e.isCreatingCustomType,p=(0,o.Z)().openCreateCustomTypeModal,m=(0,f.useRouter)(),j=(t=(0,s.useCallback)(function(e){return(0,M.VA)(V,[h],e)},[h]),{customTypes:(0,M.QT)(V,[h]),updateCustomTypes:t}),v=j.customTypes,b=j.updateCustomTypes,Z=v.sort(function(e,n){return e.id.localeCompare(n.id)}),H=k.cd[h],N=C.$[h];return(u=(0,i.v9)(function(e){return{storeCustomTypes:(0,E.Ch)(e).filter(I.TG)}}).storeCustomTypes,(0,s.useEffect)(function(){var e=u.filter(function(e){return e.local.format===h});(e.length!==v.length||e.some(function(e){var n=v.find(function(n){return n.id===e.local.id});return!n||JSON.stringify(R.Dc.fromSM(e.local))!==JSON.stringify(n)}))&&b(e.map(function(e){var n=e.local;return R.Dc.fromSM(n)}))},[h,b,v,u]),0===Z.length)?(0,r.jsxs)(P.R$,{style:{alignSelf:"center",marginTop:a.TV.size[72]},children:[(0,r.jsx)(P.u2,{children:(0,r.jsx)(a.Ee,{src:H.blankSlateImage,sizing:"cover"})}),(0,r.jsxs)(P.T9,{children:[(0,r.jsx)(P._T,{children:N.name({start:!0,plural:!0})}),(0,r.jsx)(P.nf,{children:N.blankSlateDescription}),(0,r.jsx)(P.Qj,{children:(0,r.jsx)(a.zx,{onClick:p,loading:x,children:"Create"})})]})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g,{children:[(0,r.jsx)(_,{children:(0,r.jsxs)(T,{children:[(0,r.jsx)(L,{children:(0,r.jsx)(a.I5,{name:"notes",size:"medium"})}),(0,r.jsx)(L,{children:"Label"}),(0,r.jsx)(L,{children:"API ID"}),(0,r.jsx)(L,{children:"Limit"}),(0,r.jsx)(L,{})]})}),(0,r.jsx)(y,{children:Z.map(function(e){var n=e.repeatable,t=e.label,s=e.id;return(0,r.jsxs)(T,{onClick:function(){m.push(k.cd[h].getBuilderPagePathname(s))},children:[(0,r.jsx)(L,{children:n?(0,r.jsx)(w,{}):(0,r.jsx)(S,{})}),(0,r.jsx)(L,{children:t}),(0,r.jsx)(L,{children:s}),(0,r.jsx)(L,{children:n?"Reusable":"Single"}),(0,r.jsx)(L,{children:(0,r.jsx)(O._,{isChangesLocal:!1,format:h,customType:e})})]},s)})})]})})},D=function(e){var n=e.format,t=C.$[n],l=(0,o.Z)().openCreateCustomTypeModal,f=(0,i.v9)(function(e){return{isCreatingCustomType:(0,u.hg)(e,h.z.CREATE_CUSTOM_TYPE)}}).isCreatingCustomType;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsxs)("title",{children:[t.name({start:!0,plural:!0})," - Slice Machine"]})}),(0,r.jsx)(a.SV,{renderError:function(){return(0,r.jsx)(d.LN,{children:(0,r.jsx)(d.RN,{children:(0,r.jsx)(a.xu,{alignItems:"center",justifyContent:"center",children:(0,r.jsx)(a.Iq,{title:"Request failed",description:"An error occurred while fetching your ".concat(t.name({start:!1,plural:!0}),".")})})})})},children:(0,r.jsx)(s.Suspense,{fallback:(0,r.jsxs)(d.LN,{children:[(0,r.jsxs)(d.wd,{children:[(0,r.jsx)(d.Cx,{folder:t.name({start:!0,plural:!0})}),(0,r.jsx)(d.K2,{children:(0,r.jsx)(a.zx,{disabled:!0,startIcon:"add",children:"Create"})})]}),(0,r.jsx)(d.RN,{children:(0,r.jsx)(a._3,{})})]}),children:(0,r.jsxs)(d.LN,{children:[(0,r.jsxs)(d.wd,{children:[(0,r.jsx)(d.Cx,{folder:t.name({start:!0,plural:!0})}),(0,r.jsx)(d.K2,{children:(0,r.jsx)(a.zx,{"data-cy":"create-ct",loading:f,onClick:l,startIcon:"add",children:"Create"})})]}),(0,r.jsx)(d.RN,{children:(0,r.jsxs)(a.xu,{flexDirection:"column",children:[(0,r.jsx)(A,{format:n,isCreatingCustomType:f}),(0,r.jsx)(x.M,{format:n})]})})]})})})]})}},57274:function(){}}]);