@saasquatch/mint-components 1.5.0-64 → 1.5.0-65
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/dist/cjs/{AutoColor-b11cfa86.js → AutoColor-86984176.js} +112 -12
- package/dist/cjs/sqm-brand_27.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +4 -12
- package/dist/esm/{AutoColor-237cc98b.js → AutoColor-8f7bfd93.js} +112 -12
- package/dist/esm/sqm-brand_27.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -1
- package/dist/esm-es5/AutoColor-8f7bfd93.js +1 -0
- package/dist/esm-es5/sqm-brand_27.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-192f8fc8.system.js +1 -0
- package/dist/mint-components/{p-f213a257.system.entry.js → p-30772880.system.entry.js} +1 -1
- package/dist/mint-components/p-500c1068.system.entry.js +1 -0
- package/dist/mint-components/{p-2b76e82d.entry.js → p-5cff9730.entry.js} +1 -1
- package/dist/mint-components/p-73d800ed.js +30 -0
- package/dist/mint-components/p-8d74871c.system.js +1 -1
- package/dist/mint-components/{p-cfc16fc9.entry.js → p-b3c4a2aa.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/AutoColor-237cc98b.js +0 -1
- package/dist/mint-components/p-67a980ab.system.js +0 -1
- package/dist/mint-components/p-a1a29168.js +0 -30
- package/dist/mint-components/p-daa938e2.system.entry.js +0 -1
|
@@ -7,6 +7,7 @@ const index_module = require('./index.module-54724339.js');
|
|
|
7
7
|
const mixins = require('./mixins-7b7c59fe.js');
|
|
8
8
|
const JSS = require('./JSS-c65a40f1.js');
|
|
9
9
|
const luxon = require('./luxon-59ca7d19.js');
|
|
10
|
+
const utils = require('./utils-01dbfd4a.js');
|
|
10
11
|
const sqmTextSpanView = require('./sqm-text-span-view-f101dedf.js');
|
|
11
12
|
const sqmPortalContainerView = require('./sqm-portal-container-view-185b4bd0.js');
|
|
12
13
|
const sqmPortalSectionView = require('./sqm-portal-section-view-7ce92f61.js');
|
|
@@ -587,7 +588,17 @@ const style$4 = {
|
|
|
587
588
|
},
|
|
588
589
|
};
|
|
589
590
|
const sheet$4 = JSS.createStyleSheet(style$4);
|
|
590
|
-
const styleString$4 = sheet$4.toString();
|
|
591
|
+
const styleString$4 = sheet$4.toString();
|
|
592
|
+
function Details(props) {
|
|
593
|
+
const rid = Math.random().toString(36).slice(2);
|
|
594
|
+
return (index.h("div", null,
|
|
595
|
+
index.h("style", { type: "text/css" }, styleString$4),
|
|
596
|
+
index.h("span", { class: sheet$4.classes.Description },
|
|
597
|
+
index.h("input", { type: "checkbox", id: "details-" + rid }),
|
|
598
|
+
index.h("label", { class: "details", htmlFor: "details-" + rid },
|
|
599
|
+
index.h("sl-icon", { name: "chevron-down" })),
|
|
600
|
+
index.h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
601
|
+
}
|
|
591
602
|
|
|
592
603
|
const Gift = () => {
|
|
593
604
|
return (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -1166,9 +1177,9 @@ function TaskCardView(props) {
|
|
|
1166
1177
|
console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
|
|
1167
1178
|
console.log({ props });
|
|
1168
1179
|
const { callbacks, states, content } = props;
|
|
1169
|
-
const dateStart = content.
|
|
1180
|
+
const dateStart = content.showExpiry &&
|
|
1170
1181
|
luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
1171
|
-
const dateEnd = content.
|
|
1182
|
+
const dateEnd = content.showExpiry &&
|
|
1172
1183
|
luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
|
|
1173
1184
|
const dateToday = luxon.luxon.DateTime.now();
|
|
1174
1185
|
if (content.displayDuration) {
|
|
@@ -1183,16 +1194,105 @@ function TaskCardView(props) {
|
|
|
1183
1194
|
const checkmark_circle$1 = checkmark_circle();
|
|
1184
1195
|
const checkmark_filled$1 = checkmark_filled();
|
|
1185
1196
|
const arrow_left_right$1 = arrow_left_right();
|
|
1186
|
-
const
|
|
1187
|
-
const
|
|
1197
|
+
const showComplete = states.progress >= content.goal;
|
|
1198
|
+
const repetitions = content.showProgressBar
|
|
1199
|
+
? Math.floor(states.progress / content.goal)
|
|
1200
|
+
: states.progress;
|
|
1201
|
+
const taskComplete = (showComplete && content.repeatable === false) ||
|
|
1202
|
+
(content.finite && states.progress >= content.finite * content.goal);
|
|
1203
|
+
const taskEnded = content.showExpiry && dateEnd <= dateToday;
|
|
1204
|
+
const taskNotStarted = content.showExpiry && dateToday <= dateStart;
|
|
1188
1205
|
const taskUnavailable = taskEnded || taskNotStarted;
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
return index.h("div",
|
|
1206
|
+
const vanillaStyle = `
|
|
1207
|
+
:host{
|
|
1208
|
+
display: block;
|
|
1209
|
+
margin-bottom: var(--sl-spacing-large);
|
|
1210
|
+
}
|
|
1211
|
+
`;
|
|
1212
|
+
return (index.h("div", { class: sheet$6.classes.TaskCard },
|
|
1213
|
+
index.h("style", { type: "text/css" },
|
|
1214
|
+
styleString$6,
|
|
1215
|
+
vanillaStyle),
|
|
1216
|
+
!states.loading && taskNotStarted && (index.h("div", { class: sheet$6.classes.NotStarted },
|
|
1217
|
+
index.h("span", { class: "icon" },
|
|
1218
|
+
index.h("sl-icon", { name: "info-circle-fill" })),
|
|
1219
|
+
global.intl.formatMessage({
|
|
1220
|
+
id: "startsOnMessage",
|
|
1221
|
+
defaultMessage: content.startsOnMessage,
|
|
1222
|
+
}, {
|
|
1223
|
+
startDate: dateStart
|
|
1224
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1225
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1226
|
+
}))),
|
|
1227
|
+
!states.loading && taskEnded && (index.h("div", { class: sheet$6.classes.Ended },
|
|
1228
|
+
index.h("span", { class: "icon" },
|
|
1229
|
+
index.h("sl-icon", { name: "exclamation-triangle-fill" })),
|
|
1230
|
+
global.intl.formatMessage({
|
|
1231
|
+
id: "endedMessage",
|
|
1232
|
+
defaultMessage: content.endedMessage,
|
|
1233
|
+
}, {
|
|
1234
|
+
endDate: dateEnd
|
|
1235
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1236
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1237
|
+
}))),
|
|
1238
|
+
index.h("div", { style: {
|
|
1239
|
+
borderRadius: taskUnavailable &&
|
|
1240
|
+
"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
|
|
1241
|
+
}, class: taskUnavailable
|
|
1242
|
+
? "main expired"
|
|
1243
|
+
: taskComplete
|
|
1244
|
+
? "main complete"
|
|
1245
|
+
: "main" },
|
|
1246
|
+
index.h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
|
|
1247
|
+
index.h("div", { class: sheet$6.classes.Header }, states.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (index.h("div", null,
|
|
1248
|
+
showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
1249
|
+
index.h("span", { class: "value" }, content.rewardAmount),
|
|
1250
|
+
index.h("span", { class: "text" }, content.rewardUnit)))),
|
|
1251
|
+
states.loading ? (index.h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (index.h("div", { class: "title", style: {
|
|
1252
|
+
marginBottom: !content.description
|
|
1253
|
+
? content.steps
|
|
1254
|
+
? "var(--sl-spacing-x-large)"
|
|
1255
|
+
: content.showProgressBar
|
|
1256
|
+
? "var(--sl-spacing-xx-large)"
|
|
1257
|
+
: ""
|
|
1258
|
+
: "",
|
|
1259
|
+
} }, content.cardTitle)),
|
|
1260
|
+
states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && index.h(Details, Object.assign({}, props))),
|
|
1261
|
+
content.showProgressBar && states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (index.h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
|
|
1262
|
+
index.h("div", { class: sheet$6.classes.Footer }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
|
|
1263
|
+
index.h("span", { class: "text" },
|
|
1264
|
+
content.repeatable && (index.h("div", null,
|
|
1265
|
+
index.h("span", { class: repetitions > 0
|
|
1266
|
+
? taskUnavailable
|
|
1267
|
+
? "icon neutral"
|
|
1268
|
+
: "icon success"
|
|
1269
|
+
: "icon" }, arrow_left_right$1),
|
|
1270
|
+
index.h("span", { class: repetitions > 0
|
|
1271
|
+
? taskUnavailable
|
|
1272
|
+
? "neutral"
|
|
1273
|
+
: "success"
|
|
1274
|
+
: "" }, global.intl.formatMessage({
|
|
1275
|
+
id: "completedMessage",
|
|
1276
|
+
defaultMessage: content.completedText,
|
|
1277
|
+
}, {
|
|
1278
|
+
finite: content.finite,
|
|
1279
|
+
count: content.finite
|
|
1280
|
+
? Math.min(repetitions, content.finite)
|
|
1281
|
+
: repetitions,
|
|
1282
|
+
})))),
|
|
1283
|
+
content.showExpiry && !taskUnavailable && (index.h("span", { class: "datetime" }, global.intl.formatMessage({
|
|
1284
|
+
id: "expiryMessage",
|
|
1285
|
+
defaultMessage: content.expiryMessage,
|
|
1286
|
+
}, {
|
|
1287
|
+
endDate: dateEnd
|
|
1288
|
+
.setLocale(utils.luxonLocale(states.locale))
|
|
1289
|
+
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
1290
|
+
})))),
|
|
1291
|
+
index.h("sl-button", { class: taskUnavailable
|
|
1292
|
+
? "action neutral"
|
|
1293
|
+
: taskComplete
|
|
1294
|
+
? "action disabled"
|
|
1295
|
+
: "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
|
|
1196
1296
|
}
|
|
1197
1297
|
|
|
1198
1298
|
function ReferralIframeView(props) {
|
|
@@ -19,7 +19,7 @@ const utils = require('./utils-01dbfd4a.js');
|
|
|
19
19
|
require('./sqm-text-span-view-f101dedf.js');
|
|
20
20
|
const useDemoBigStat = require('./useDemoBigStat-426e3319.js');
|
|
21
21
|
require('./sqm-portal-container-view-185b4bd0.js');
|
|
22
|
-
const AutoColor = require('./AutoColor-
|
|
22
|
+
const AutoColor = require('./AutoColor-86984176.js');
|
|
23
23
|
require('./sqm-portal-section-view-7ce92f61.js');
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -14,6 +14,7 @@ require('./mixins-7b7c59fe.js');
|
|
|
14
14
|
const JSS = require('./JSS-c65a40f1.js');
|
|
15
15
|
const GenericTableView = require('./GenericTableView-c8f8f3fe.js');
|
|
16
16
|
const luxon = require('./luxon-59ca7d19.js');
|
|
17
|
+
require('./utils-01dbfd4a.js');
|
|
17
18
|
require('./sqm-text-span-view-f101dedf.js');
|
|
18
19
|
const sqmAssetCardView = require('./sqm-asset-card-view-d9ac6a95.js');
|
|
19
20
|
const sqmBigStatView = require('./sqm-big-stat-view-e5dc0877.js');
|
|
@@ -32,7 +33,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-04eaaac9.js');
|
|
|
32
33
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-1fdc957e.js');
|
|
33
34
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-4c78e231.js');
|
|
34
35
|
const sqmStatContainerView = require('./sqm-stat-container-view-5b2db929.js');
|
|
35
|
-
const AutoColor = require('./AutoColor-
|
|
36
|
+
const AutoColor = require('./AutoColor-86984176.js');
|
|
36
37
|
const sqmPortalSectionView = require('./sqm-portal-section-view-7ce92f61.js');
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -163,9 +163,9 @@ export function TaskCardView(props) {
|
|
|
163
163
|
console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
|
|
164
164
|
console.log({ props });
|
|
165
165
|
const { callbacks, states, content } = props;
|
|
166
|
-
const dateStart = content.
|
|
166
|
+
const dateStart = content.showExpiry &&
|
|
167
167
|
DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
168
|
-
const dateEnd = content.
|
|
168
|
+
const dateEnd = content.showExpiry &&
|
|
169
169
|
DateTime.fromISO(content.rewardDuration.split("/")[1]);
|
|
170
170
|
const dateToday = DateTime.now();
|
|
171
171
|
if (content.displayDuration) {
|
|
@@ -186,17 +186,9 @@ export function TaskCardView(props) {
|
|
|
186
186
|
: states.progress;
|
|
187
187
|
const taskComplete = (showComplete && content.repeatable === false) ||
|
|
188
188
|
(content.finite && states.progress >= content.finite * content.goal);
|
|
189
|
-
const taskEnded =
|
|
190
|
-
const taskNotStarted = dateToday
|
|
189
|
+
const taskEnded = content.showExpiry && dateEnd <= dateToday;
|
|
190
|
+
const taskNotStarted = content.showExpiry && dateToday <= dateStart;
|
|
191
191
|
const taskUnavailable = taskEnded || taskNotStarted;
|
|
192
|
-
console.log("dateToday: " + dateToday);
|
|
193
|
-
console.log("dateEnd: " + dateEnd);
|
|
194
|
-
console.log("dateStart: " + dateStart);
|
|
195
|
-
console.log("taskEnded: " + taskEnded);
|
|
196
|
-
console.log("taskNotStarted: " + taskNotStarted);
|
|
197
|
-
console.log("taskUnavailable: " + taskUnavailable);
|
|
198
|
-
if (1 == 1)
|
|
199
|
-
return h("div", null, "hello world!");
|
|
200
192
|
const vanillaStyle = `
|
|
201
193
|
:host{
|
|
202
194
|
display: block;
|
|
@@ -5,6 +5,7 @@ import { d as dist, M, n as ne, x, b as mn, D as De, f as D } from './index.modu
|
|
|
5
5
|
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-10353a39.js';
|
|
6
6
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
7
7
|
import { l as luxon } from './luxon-5fa22651.js';
|
|
8
|
+
import { l as luxonLocale } from './utils-1d345130.js';
|
|
8
9
|
import { T as TextSpanView } from './sqm-text-span-view-7e61c95c.js';
|
|
9
10
|
import { P as PortalContainerView } from './sqm-portal-container-view-cf79ed90.js';
|
|
10
11
|
import { P as PortalSectionView } from './sqm-portal-section-view-6649c4c6.js';
|
|
@@ -585,7 +586,17 @@ const style$4 = {
|
|
|
585
586
|
},
|
|
586
587
|
};
|
|
587
588
|
const sheet$4 = createStyleSheet(style$4);
|
|
588
|
-
const styleString$4 = sheet$4.toString();
|
|
589
|
+
const styleString$4 = sheet$4.toString();
|
|
590
|
+
function Details(props) {
|
|
591
|
+
const rid = Math.random().toString(36).slice(2);
|
|
592
|
+
return (h("div", null,
|
|
593
|
+
h("style", { type: "text/css" }, styleString$4),
|
|
594
|
+
h("span", { class: sheet$4.classes.Description },
|
|
595
|
+
h("input", { type: "checkbox", id: "details-" + rid }),
|
|
596
|
+
h("label", { class: "details", htmlFor: "details-" + rid },
|
|
597
|
+
h("sl-icon", { name: "chevron-down" })),
|
|
598
|
+
h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
|
|
599
|
+
}
|
|
589
600
|
|
|
590
601
|
const Gift = () => {
|
|
591
602
|
return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -1164,9 +1175,9 @@ function TaskCardView(props) {
|
|
|
1164
1175
|
console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
|
|
1165
1176
|
console.log({ props });
|
|
1166
1177
|
const { callbacks, states, content } = props;
|
|
1167
|
-
const dateStart = content.
|
|
1178
|
+
const dateStart = content.showExpiry &&
|
|
1168
1179
|
luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
1169
|
-
const dateEnd = content.
|
|
1180
|
+
const dateEnd = content.showExpiry &&
|
|
1170
1181
|
luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
|
|
1171
1182
|
const dateToday = luxon.DateTime.now();
|
|
1172
1183
|
if (content.displayDuration) {
|
|
@@ -1181,16 +1192,105 @@ function TaskCardView(props) {
|
|
|
1181
1192
|
const checkmark_circle$1 = checkmark_circle();
|
|
1182
1193
|
const checkmark_filled$1 = checkmark_filled();
|
|
1183
1194
|
const arrow_left_right$1 = arrow_left_right();
|
|
1184
|
-
const
|
|
1185
|
-
const
|
|
1195
|
+
const showComplete = states.progress >= content.goal;
|
|
1196
|
+
const repetitions = content.showProgressBar
|
|
1197
|
+
? Math.floor(states.progress / content.goal)
|
|
1198
|
+
: states.progress;
|
|
1199
|
+
const taskComplete = (showComplete && content.repeatable === false) ||
|
|
1200
|
+
(content.finite && states.progress >= content.finite * content.goal);
|
|
1201
|
+
const taskEnded = content.showExpiry && dateEnd <= dateToday;
|
|
1202
|
+
const taskNotStarted = content.showExpiry && dateToday <= dateStart;
|
|
1186
1203
|
const taskUnavailable = taskEnded || taskNotStarted;
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
return h("div",
|
|
1204
|
+
const vanillaStyle = `
|
|
1205
|
+
:host{
|
|
1206
|
+
display: block;
|
|
1207
|
+
margin-bottom: var(--sl-spacing-large);
|
|
1208
|
+
}
|
|
1209
|
+
`;
|
|
1210
|
+
return (h("div", { class: sheet$6.classes.TaskCard },
|
|
1211
|
+
h("style", { type: "text/css" },
|
|
1212
|
+
styleString$6,
|
|
1213
|
+
vanillaStyle),
|
|
1214
|
+
!states.loading && taskNotStarted && (h("div", { class: sheet$6.classes.NotStarted },
|
|
1215
|
+
h("span", { class: "icon" },
|
|
1216
|
+
h("sl-icon", { name: "info-circle-fill" })),
|
|
1217
|
+
intl.formatMessage({
|
|
1218
|
+
id: "startsOnMessage",
|
|
1219
|
+
defaultMessage: content.startsOnMessage,
|
|
1220
|
+
}, {
|
|
1221
|
+
startDate: dateStart
|
|
1222
|
+
.setLocale(luxonLocale(states.locale))
|
|
1223
|
+
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
1224
|
+
}))),
|
|
1225
|
+
!states.loading && taskEnded && (h("div", { class: sheet$6.classes.Ended },
|
|
1226
|
+
h("span", { class: "icon" },
|
|
1227
|
+
h("sl-icon", { name: "exclamation-triangle-fill" })),
|
|
1228
|
+
intl.formatMessage({
|
|
1229
|
+
id: "endedMessage",
|
|
1230
|
+
defaultMessage: content.endedMessage,
|
|
1231
|
+
}, {
|
|
1232
|
+
endDate: dateEnd
|
|
1233
|
+
.setLocale(luxonLocale(states.locale))
|
|
1234
|
+
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
1235
|
+
}))),
|
|
1236
|
+
h("div", { style: {
|
|
1237
|
+
borderRadius: taskUnavailable &&
|
|
1238
|
+
"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
|
|
1239
|
+
}, class: taskUnavailable
|
|
1240
|
+
? "main expired"
|
|
1241
|
+
: taskComplete
|
|
1242
|
+
? "main complete"
|
|
1243
|
+
: "main" },
|
|
1244
|
+
h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
|
|
1245
|
+
h("div", { class: sheet$6.classes.Header }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
|
|
1246
|
+
showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
1247
|
+
h("span", { class: "value" }, content.rewardAmount),
|
|
1248
|
+
h("span", { class: "text" }, content.rewardUnit)))),
|
|
1249
|
+
states.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (h("div", { class: "title", style: {
|
|
1250
|
+
marginBottom: !content.description
|
|
1251
|
+
? content.steps
|
|
1252
|
+
? "var(--sl-spacing-x-large)"
|
|
1253
|
+
: content.showProgressBar
|
|
1254
|
+
? "var(--sl-spacing-xx-large)"
|
|
1255
|
+
: ""
|
|
1256
|
+
: "",
|
|
1257
|
+
} }, content.cardTitle)),
|
|
1258
|
+
states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && h(Details, Object.assign({}, props))),
|
|
1259
|
+
content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
|
|
1260
|
+
h("div", { class: sheet$6.classes.Footer }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
|
|
1261
|
+
h("span", { class: "text" },
|
|
1262
|
+
content.repeatable && (h("div", null,
|
|
1263
|
+
h("span", { class: repetitions > 0
|
|
1264
|
+
? taskUnavailable
|
|
1265
|
+
? "icon neutral"
|
|
1266
|
+
: "icon success"
|
|
1267
|
+
: "icon" }, arrow_left_right$1),
|
|
1268
|
+
h("span", { class: repetitions > 0
|
|
1269
|
+
? taskUnavailable
|
|
1270
|
+
? "neutral"
|
|
1271
|
+
: "success"
|
|
1272
|
+
: "" }, intl.formatMessage({
|
|
1273
|
+
id: "completedMessage",
|
|
1274
|
+
defaultMessage: content.completedText,
|
|
1275
|
+
}, {
|
|
1276
|
+
finite: content.finite,
|
|
1277
|
+
count: content.finite
|
|
1278
|
+
? Math.min(repetitions, content.finite)
|
|
1279
|
+
: repetitions,
|
|
1280
|
+
})))),
|
|
1281
|
+
content.showExpiry && !taskUnavailable && (h("span", { class: "datetime" }, intl.formatMessage({
|
|
1282
|
+
id: "expiryMessage",
|
|
1283
|
+
defaultMessage: content.expiryMessage,
|
|
1284
|
+
}, {
|
|
1285
|
+
endDate: dateEnd
|
|
1286
|
+
.setLocale(luxonLocale(states.locale))
|
|
1287
|
+
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
1288
|
+
})))),
|
|
1289
|
+
h("sl-button", { class: taskUnavailable
|
|
1290
|
+
? "action neutral"
|
|
1291
|
+
: taskComplete
|
|
1292
|
+
? "action disabled"
|
|
1293
|
+
: "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
|
|
1194
1294
|
}
|
|
1195
1295
|
|
|
1196
1296
|
function ReferralIframeView(props) {
|
|
@@ -15,7 +15,7 @@ import { g as getProps, a as getMissingProps } from './utils-1d345130.js';
|
|
|
15
15
|
import './sqm-text-span-view-7e61c95c.js';
|
|
16
16
|
import { p as pathToRegexp, u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-022e116d.js';
|
|
17
17
|
import './sqm-portal-container-view-cf79ed90.js';
|
|
18
|
-
import { h as autoColorScaleCss, C as CardFeedView, E as EditProfileView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, T as TaskCardView } from './AutoColor-
|
|
18
|
+
import { h as autoColorScaleCss, C as CardFeedView, E as EditProfileView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, T as TaskCardView } from './AutoColor-8f7bfd93.js';
|
|
19
19
|
import './sqm-portal-section-view-6649c4c6.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -10,6 +10,7 @@ import './mixins-10353a39.js';
|
|
|
10
10
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
11
11
|
import { G as GenericTableView } from './GenericTableView-24f2dcb2.js';
|
|
12
12
|
import { l as luxon } from './luxon-5fa22651.js';
|
|
13
|
+
import './utils-1d345130.js';
|
|
13
14
|
import './sqm-text-span-view-7e61c95c.js';
|
|
14
15
|
import { A as AssetCardView } from './sqm-asset-card-view-f9ca5345.js';
|
|
15
16
|
import { B as BigStatView } from './sqm-big-stat-view-309f7c1f.js';
|
|
@@ -28,7 +29,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-827776f5.js';
|
|
|
28
29
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-73e14282.js';
|
|
29
30
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-cbf1cfdc.js';
|
|
30
31
|
import { S as StatContainerView } from './sqm-stat-container-view-8a565c5a.js';
|
|
31
|
-
import { S as ShareButtonView, a as ShareLinkView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss } from './AutoColor-
|
|
32
|
+
import { S as ShareButtonView, a as ShareLinkView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss } from './AutoColor-8f7bfd93.js';
|
|
32
33
|
import { P as PortalSectionView } from './sqm-portal-section-view-6649c4c6.js';
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __extends=this&&this.__extends||function(){var e=function(t,a){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]};return e(t,a)};return function(t,a){e(t,a);function r(){this.constructor=t}t.prototype=a===null?Object.create(a):(r.prototype=a.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++){t=arguments[a];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,a=arguments.length;t<a;t++)e+=arguments[t].length;for(var r=Array(e),s=0,t=0;t<a;t++)for(var i=arguments[t],l=0,n=i.length;l<n;l++,s++)r[s]=i[l];return r};import{h,c as Host,d as getAssetPath}from"./index-17b4da69.js";import{k as useState}from"./stencil-hooks.module-2f159754.js";import{i as intl}from"./global-58010a55.js";import{d as dist,M,n as ne,x,b as mn,D as De,f as D}from"./index.module-ec3dcc82.js";import{H as HostBlock,A as AuthWrapper,a as AuthColumn,b as AuthButtonsContainer,E as ErrorStyles}from"./mixins-10353a39.js";import{c as createStyleSheet}from"./JSS-96eeab98.js";import{l as luxon}from"./luxon-5fa22651.js";import{l as luxonLocale}from"./utils-1d345130.js";import{T as TextSpanView}from"./sqm-text-span-view-7e61c95c.js";import{P as PortalContainerView}from"./sqm-portal-container-view-cf79ed90.js";import{P as PortalSectionView}from"./sqm-portal-section-view-6649c4c6.js";var medium={facebook:"#1877f2",twitter:"#1da1f2",email:"#666666",direct:"#00008B",linkedin:"#0077b5",sms:"#34DA50",fbmessenger:"#0084ff",whatsapp:"#25d366",linemessenger:"#00B300",pinterest:"#e60023"};var medium_text={facebook:"#fff",twitter:"#fff",email:"#fff",direct:"#fff",linkedin:"#fff",sms:"#fff",fbmessenger:"#fff",whatsapp:"#fff",linemessenger:"#fff",pinterest:"#fff"};var medium_icon={facebook:"facebook",twitter:"twitter",email:"envelope",direct:"send",linkedin:"linkedin",sms:"chat",fbmessenger:"messenger",whatsapp:"whatsapp",linemessenger:"line",pinterest:"pinterest"};function ShareButtonView(e,t){var a="\n *::part(base) {\n\t\t\t--sl-focus-ring-color-primary: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"80!important;\n\n background: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+";\n color: "+(e.textcolor?e.textcolor:e.medium?medium_text[e.medium]:"")+";\n border-radius: "+(e.borderradius?e.borderradius+"px":"")+";\n }\n\n\t*::part(base):hover {\n\t\tborder-color: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"D1!important;\n\t}\n\t\n\t*::part(base):focus {\n\t\tborder-color: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"D1!important;\n\t}\n\n\t*::part(label) {\n\t\tposition: relative;\n\t\ttop: 2%;\n\t}\n ";var r={HostBlock:HostBlock,buttonStyle:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"}};var s=createStyleSheet(r);var i=s.toString();return e.hide?h(Host,{style:{display:"none"}}):h("div",null,h("style",{type:"text/css"},i),h("style",{type:"text/css"},a),h("sl-button",{class:s.classes.buttonStyle,loading:e.loading,disabled:e.disabled,pill:e.pill,size:e.size,type:e.type,onClick:e.onClick,exportparts:"base: "+e.type+"sharebutton-base"},!e.hideicon&&h("sl-icon",{slot:e.iconslot||"prefix",name:e.icon?e.icon:medium_icon[e.medium],exportparts:"icon"}),!e.hidetext&&t))}var style={HostBlock:HostBlock,inputStyle:{"&::part(base)":{background:"white",opacity:"1",cursor:"pointer"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();function ShareLinkView(e){return h("div",null,h("style",{type:"text/css"},styleString),h("sl-tooltip",{trigger:"manual",content:e.tooltiptext,placement:"top-end",disabled:e.disabled,open:e.open},h("sl-input",{class:sheet.classes.inputStyle,exportparts:"label: input-label",value:e.shareString,readonly:true},h("sl-icon-button",{onClick:function(){var t;return(t=e.onClick)===null||t===void 0?void 0:t.call(e)},slot:"suffix",name:"files",disabled:e.disabled}))))}var style$1={HostBlock:HostBlock,":host":{"min-height":"100vh"},Frame:{"min-height":"100vh",display:"flex","flex-direction":"column","box-sizing":"border-box"},FooterWrapper:{width:"100%","max-width":"100%",padding:"var(--sl-spacing-medium) var(--sl-spacing-x-large)",background:"var(--sqm-footer-background)",display:"flex","justify-content":"flex-end","align-items":"center","box-sizing":"border-box","margin-top":"auto"},HeaderWrapper:{width:"100%","max-width":"100%","box-sizing":"border-box",display:"flex","justify-content":"space-between",padding:"var(--sl-spacing-small) var(--sl-spacing-large)","align-items":"center","background-color":"var(--sqm-header-background)","@media screen and (max-width: 499px)":{"flex-direction":"row-reverse","justify-content":"flex-end",padding:"0"}}};var sheet$1=createStyleSheet(style$1);var styleString$1=sheet$1.toString();function PortalFrameView(e,t){var a=e.data;return h("div",{class:sheet$1.classes.Frame},h("style",{type:"text/css"},styleString$1),h("div",{class:sheet$1.classes.HeaderWrapper},a.header,h("slot",{name:"sqm-navigation-menu"})),t,h("div",{class:sheet$1.classes.FooterWrapper},a.footer))}var EditProfileView=function(e){var t,a,r,s;var i=e.states,l=e.callbacks;var n=i.text;var o=i.formState.errors;if(i.showEdit){return h("div",{class:"CardWrapper "+(!i.showEdit&&"ShowEdit")},h("h2",{style:{fontSize:"var(--sl-font-size-x-large)",margin:"0px",textAlign:"center"}},n.editprofileheader),h("form",{class:"FormWrapper",onSubmit:l.onSubmit},h("div",{class:"FormSection"},i.formState.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},i.formState.error)),h("sl-input",Object.assign({exportparts:"label: input-label",value:i.formState.firstName,onInput:l.onChange,label:n.firstnametext,disabled:i.loading},o.firstName&&o.firstName.status!=="valid"?{class:"ErrorStyles",helpText:"Cannot be empty"}:[],{id:"firstName",name:"firstName",error:o.firstName&&o.firstName.status!=="valid"?o.firstName.message:undefined})),h("sl-input",Object.assign({exportparts:"label: input-label",value:i.formState.lastName,onInput:l.onChange,label:n.lastnametext,disabled:i.loading,id:"lastName",name:"lastName"},o.lastName&&o.lastName.status!=="valid"?{class:"ErrorStyles",helpText:"Cannot be empty"}:[],{error:o.lastName&&o.lastName.status!=="valid"?o.lastName.message:undefined}))),n.showregion&&i.formState.currentRegion&&h("sl-input",{exportparts:"label: input-label",disabled:true,value:i.formState.currentRegion,label:n.currentregiontext,id:"currentRegion",name:"currentRegion"}),h("div",{class:"ButtonWrapper"},h("sl-button",{onClick:function(){l.setShowEdit(false)},exportparts:"base: defaultbutton-base"},n.canceltext),h("sl-button",{type:"primary",loading:i.loading,disabled:i.submitDisabled,onClick:function(e){l.onSubmit(e)},submit:true,exportparts:"base: primarybutton-base"},n.updatetext))))}return h("div",{class:"CardWrapper FormWrapper "+(!i.showEdit&&"ShowEdit")},h("div",{class:"FormSection"},h("h2",{style:{fontSize:"var(--sl-font-size-x-large",marginBottom:"0px",textAlign:"center"}},n.editprofileheader),h("div",null,h("p",{style:{fontSize:"var(--sl-font-size-medium)"}},(t=i.user)===null||t===void 0?void 0:t.firstName," ",(a=i.user)===null||a===void 0?void 0:a.lastName),h("p",{style:{fontSize:"var(--sl-font-size-medium)"},title:(r=i.user)===null||r===void 0?void 0:r.email},(s=i.user)===null||s===void 0?void 0:s.email))),h("sl-button",{type:"primary",loading:i.loading,onClick:function(){l.resetForm();l.setShowEdit(true)},exportparts:"base: primarybutton-base"},n.editprofiletext))};var MessageLinkQuery=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query ($programId: ID) {\n user: viewer {\n ... on User {\n shareLink(programId: $programId)\n }\n }\n }\n"],["\n query ($programId: ID) {\n user: viewer {\n ... on User {\n shareLink(programId: $programId)\n }\n }\n }\n"])));var WIDGET_ENGAGEMENT_EVENT=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));function useShareLink(e){var t,a;var r=e.programId,s=r===void 0?M():r;var i=ne();var l=x();var n=mn(MessageLinkQuery,{programId:s},!(i===null||i===void 0?void 0:i.jwt)).data;var o=De(WIDGET_ENGAGEMENT_EVENT)[0];var d=(a=(t=n===null||n===void 0?void 0:n.user)===null||t===void 0?void 0:t.shareLink)!==null&&a!==void 0?a:"...";var c=useState(false),u=c[0],p=c[1];function h(){navigator.clipboard.writeText(d);p(true);setTimeout((function(){return p(false)}),e.tooltiplifespan);o({eventMeta:{programId:s,id:i===null||i===void 0?void 0:i.id,accountId:i===null||i===void 0?void 0:i.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}})}return __assign(__assign({},e),{onClick:h,open:u,shareString:d})}var MessageLinkQuery$1=dist.gql(templateObject_3||(templateObject_3=__makeTemplateObject(["\n query (\n $programId: ID\n $engagementMedium: UserEngagementMedium!\n $shareMedium: ReferralShareMedium!\n ) {\n viewer {\n ... on User {\n messageLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: $shareMedium\n )\n shareLink(programId: $programId, engagementMedium: $engagementMedium)\n }\n }\n }\n"],["\n query (\n $programId: ID\n $engagementMedium: UserEngagementMedium!\n $shareMedium: ReferralShareMedium!\n ) {\n viewer {\n ... on User {\n messageLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: $shareMedium\n )\n shareLink(programId: $programId, engagementMedium: $engagementMedium)\n }\n }\n }\n"])));function NativeShare(e,t){var a=e.sharetitle||"Share title";var r=e.sharetext||"Share text";if(t==="undefined"){return alert("error: message link undefined!")}if(window.navigator.share){window.navigator.share({title:a,text:r,url:t}).catch((function(e){return console.error("Error on web share",e)}))}else{alert("Not on a supported device")}}function FacebookShare(e,t){var a,r;if(((r=(a=t.data)===null||a===void 0?void 0:a.viewer)===null||r===void 0?void 0:r.messageLink)==="undefined"||e==="undefined"){return alert("error: message link undefined!")}if(typeof SquatchAndroid.shareOnFacebook!=="undefined"){return SquatchAndroid.shareOnFacebook(e,t.data.viewer.messageLink)}else{return GenericShare(t)}}function GenericShare(e){var t,a;return((a=(t=e.data)===null||t===void 0?void 0:t.viewer)===null||a===void 0?void 0:a.messageLink)?window.open(e.data.viewer.messageLink):alert("error: message link undefined!")}function useShareButton(e){var t,a;var r=e.sharetitle,s=e.sharetext,i=e.medium;var l=e.programId?e.programId:M();var n=ne();var o={engagementMedium:x(),programId:l,shareMedium:i.toUpperCase()};var d=mn(MessageLinkQuery$1,o,!(n===null||n===void 0?void 0:n.jwt)||!l);var c=(a=(t=d===null||d===void 0?void 0:d.data)===null||t===void 0?void 0:t.viewer)===null||a===void 0?void 0:a.shareLink;var u=D();var p=i.toLocaleUpperCase()==="SMS"&&window.orientation===undefined||i.toLocaleUpperCase()==="DIRECT"&&!window.navigator.share;function h(){if(i.toLocaleUpperCase()==="FACEBOOK"&&u.type==="SquatchAndroid"){FacebookShare(c,d)}else if(i.toLocaleUpperCase()==="DIRECT"){NativeShare({sharetitle:r,sharetext:s},c)}else{GenericShare(d)}}return __assign(__assign({},e),{loading:d.loading,onClick:h,hide:p})}function PortalChangePasswordView(e){var t=e.states,a=e.callbacks;var r={Dialog:{padding:"0","&::part(close-button)":{"margin-top":"var(--sl-spacing-medium)"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"15px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"15px"}},InputContainer:{"& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-x-large)"}},CancelButton:{width:"25%",margin:"var(--sl-spacing-large) auto"},PasswordField:{marginBottom:"var(--sl-spacing-large) !important",display:"block"},ChangePasswordButton:{paddingTop:"var(--sl-spacing-x-large)"}};var s=createStyleSheet(r);var i=s.toString();return h("div",null,h("style",{type:"text/css"},i),h("sl-dialog",{class:s.classes.Dialog,open:t.open,"onSl-hide":function(){return a.setOpen(false)}},h(PortalSectionView,Object.assign({},{labelMargin:"x-large",padding:"none",label:h(TextSpanView,Object.assign({},{type:"h2"}),t.content.modalChangePasswordHeader),content:h(PortalContainerView,Object.assign({},{direction:"column",padding:"none",gap:"32px"}),t.error&&h("sqm-form-message",{class:s.classes.Error,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},t.error)),t.success&&h("sqm-form-message",{class:s.classes.Success,type:"success",exportparts:"successalert-icon"},h("div",{part:"successalert-text"},t.content.successMessage)),h("sl-form",{"onSl-submit":a.submit},h("div",{class:s.classes.InputContainer},h("sqm-password-field",{exportparts:"input-label: input-label",class:s.classes.PasswordField,fieldLabel:t.content.passwordFieldLabel}),h("sl-input",{exportparts:"label: input-label",name:"/confirmPassword",label:t.content.confirmPasswordFieldLabel,required:true,togglePassword:true,disabled:t.loading,type:"password"})),h(PortalContainerView,Object.assign({},{direction:"row",padding:"none",gap:"20px"}),h("sl-button",{class:s.classes.ChangePasswordButton,type:"primary",submit:true,loading:t.loading},t.content.changePasswordButtonText),h("sl-button",{class:s.classes.CancelButton,type:"text",onClick:function(){return a.setOpen(false)}},t.content.cancelText))))}))),h(PortalSectionView,Object.assign({},{labelMargin:"x-large",padding:"xxx-large",label:h(TextSpanView,Object.assign({},{type:"h2"}),t.content.portalChangePasswordHeader),content:h("sl-button",{onClick:function(){return a.setOpen(true)}},t.content.portalChangePasswordButtonText)}),h("style",{type:"text/css"},i)))}var style$2={Wrapper:AuthWrapper,Column:AuthColumn,ForgotButtonContainer:{display:"inline",cursor:"pointer","font-size":"13px","font-weight":"600",color:"#AAAAAA",margin:"0"},ButtonsContainer:AuthButtonsContainer};var vanillaStyle="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet$2=createStyleSheet(style$2);var styleString$2=sheet$2.toString();function PortalLoginView(e){var t=e.states,a=e.callbacks,r=e.content;return h("div",{class:sheet$2.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle,styleString$2),h(TextSpanView,{type:"h3"},r.pageLabel),h("sl-form",{class:sheet$2.classes.Column,"onSl-submit":a.submit},e.states.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),h("sl-input",{exportparts:"label: input-label",type:"email",name:"/email",label:r.emailLabel||"Email",disabled:t.loading,required:true}),h("div",null,h("sl-input",{exportparts:"label: input-label",type:"password",name:"/password",label:r.passwordLabel||"Password",disabled:t.loading,required:true}),h("div",{class:sheet$2.classes.ForgotButtonContainer},r.forgotPasswordButton)),h("div",{class:sheet$2.classes.ButtonsContainer},h("sl-button",{submit:true,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},r.submitLabel||"Login"),r.secondaryButton)))}var style$3={Wrapper:__assign(__assign({},AuthWrapper),{"max-width":"600px"}),Column:AuthColumn,HostBlock:HostBlock,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:AuthButtonsContainer,ErrorStyle:ErrorStyles};var vanillaStyle$1="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n";var sheet$3=createStyleSheet(style$3);var styleString$3=sheet$3.toString();function PortalRegisterView(e){var t,a,r,s,i,l,n,o;var d=e.states,c=e.refs,u=e.callbacks,p=e.content;if(d.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return h("div",{class:sheet$3.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle$1,styleString$3),h(TextSpanView,{type:"h3"},p.pageLabel),h("sl-form",{class:sheet$3.classes.Column,"onSl-submit":u.submit,ref:function(e){return c.formRef.current=e},novalidate:true},d.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),p.formData,!d.hideInputs&&h("sl-input",Object.assign({exportparts:"label: input-label",type:"email",name:"/email",label:p.emailLabel||"Email",disabled:d.loading,required:true,validationError:function(e){var t=e.value;if(!t){return"Cannot be empty"}if(!t.includes("@")){return"Must be a valid email address"}}},((a=(t=d.validationState)===null||t===void 0?void 0:t.validationErrors)===null||a===void 0?void 0:a.email)?{class:sheet$3.classes.ErrorStyle,helpText:((s=(r=d.validationState)===null||r===void 0?void 0:r.validationErrors)===null||s===void 0?void 0:s.email)||"Cannot be empty"}:[])),!d.hideInputs&&h("sqm-password-field",{fieldLabel:p.passwordLabel,"enable-validation":d.enablePasswordValidation}),p.passwordField,!d.hideInputs&&d.confirmPassword&&h("sl-input",Object.assign({exportparts:"label: input-label",type:"password",name:"/confirmPassword",label:p.confirmPasswordLabel,disabled:d.loading,required:true},((l=(i=d.validationState)===null||i===void 0?void 0:i.validationErrors)===null||l===void 0?void 0:l.confirmPassword)?{class:sheet$3.classes.ErrorStyle,helpText:((o=(n=d.validationState)===null||n===void 0?void 0:n.validationErrors)===null||o===void 0?void 0:o.confirmPassword)||"Cannot be empty"}:[])),p.terms,h("div",{class:sheet$3.classes.ButtonsContainer},h("sl-button",{submit:true,loading:d.loading,exportparts:"base: primarybutton-base",type:"primary"},p.submitLabel||"Register"),p.secondaryButton)))}var style$4={Description:{"& input[type=checkbox]":{display:"none"},"& input:checked ~ .details":{transform:"rotate(-180deg)"},"& .details":{position:"absolute",top:"var(--sl-spacing-medium)",right:"var(--sl-spacing-medium)",color:"var(--sl-color-neutral-700)",fontSize:"var(--sl-font-size-large)","& :hover":{color:"var(--sl-color-primary-700)"},transformOrigin:"50% 37%",transition:"transform var(--sl-transition-medium) ease",cursor:"pointer"},"& input:checked ~ .summary":{transition:"all var(--sl-transition-medium) ease",maxHeight:"300px",marginBottom:"var(--sl-spacing-x-large)"},"& input:checked ~ .summary[progress-bar]":{marginBottom:"var(--sl-spacing-xx-large)"},"& .summary":{display:"block",overflow:"hidden",fontSize:"var(--sl-font-size-small)",maxHeight:"0px",transition:"all var(--sl-transition-fast) ease-out",marginBottom:"var(--sl-spacing-medium)"}}};var sheet$4=createStyleSheet(style$4);var styleString$4=sheet$4.toString();function Details(e){var t=Math.random().toString(36).slice(2);return h("div",null,h("style",{type:"text/css"},styleString$4),h("span",{class:sheet$4.classes.Description},h("input",{type:"checkbox",id:"details-"+t}),h("label",{class:"details",htmlFor:"details-"+t},h("sl-icon",{name:"chevron-down"})),h("span",{class:"summary","progress-bar":e.progressBar},e.content.description)))}var Gift=function(){return h("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z",fill:"#F2C94C"}),h("path",{d:"M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z",fill:"#F2C94C"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.5 9V10H14.5V9H1.5Z",fill:"#BE9720"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z",fill:"#EB5757"}))};var style$5={ProgressBar:{"& .progress-bar":{height:"0",marginTop:"var(--sl-spacing-large)",marginBottom:"var(--sl-spacing-xxx-large)",marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-small)",display:"grid",lineHeight:"45px",userSelect:"none"},"&[data-steps]":{marginTop:"calc(-1*var(--sl-spacing-x-small))"},"&[data-steps] .progress-bar":{marginTop:"var(--sl-spacing-medium)"},"&[data-expired] .progress-bar":{filter:"grayscale(1)"},"& .progress-bar.repeatable-steps":{marginLeft:"var(--sl-spacing-x-small)"},"& .filled:after":{content:'""',display:"flex",width:"100%",height:"4px",borderRadius:"4px",backgroundColor:"var(--sl-color-primary-300)"},"& .progress":{display:"block",textAlign:"center",marginLeft:"-100px",marginRight:"-100px"},"& .progress::after":{content:'""',width:"12px",height:"12px",display:"flex",backgroundColor:"var(--sl-color-primary-300)",borderRadius:"50%",position:"relative",left:"47%",top:"-85%"},"& .progress.bg:after":{width:"0",height:"0",border:"none"},"& .progress.top":{position:"relative",top:"-40px"},"& .progress.top:after":{top:"-16%"},"& .empty":{display:"block",textAlign:"center",marginLeft:"-100px",marginRight:"-100px"},"& .empty::after":{content:'""',width:"12px",height:"12px",border:"2px solid #E0E0E0",margin:"-2px",display:"flex",backgroundColor:"white",borderRadius:"50%",position:"relative",left:"47%",top:"-85%"},"& .empty.bg:after":{width:"0",height:"0",border:"none"},"& .remain:after":{content:'""',display:"flex",width:"100%",height:"4px",borderRadius:"4px",backgroundColor:"#E0E0E0"},"& .gift.bw":{filter:"grayscale(100%)"},"& .gift.start":{transform:"scale(80%)",top:"-20px"},"& .gift":{textAlign:"center",marginLeft:"-100px",marginRight:"-100px",position:"relative",top:"-18px"}}};var sheet$5=createStyleSheet(style$5,{classNamePrefix:"sqm-prog-bar"});var styleString$5=sheet$5.toString();function ProgressBarView(e){var t;var a=e.progress,r=a===void 0?0:a,s=e.goal,i=s===void 0?1:s,l=e.steps,n=l===void 0?false:l,o=e.progressBarUnit,d=o===void 0?"":o,c=e.repeatable,u=c===void 0?false:c,p=e.expired,g=p===void 0?false:p,v=e.finite,m=v===void 0?0:v;var f=buildProgressBar(u,n,e);var x=f.columns,b=f.items;console.log("PROGRESS BAR PROPS "+((t=e===null||e===void 0?void 0:e.content)===null||t===void 0?void 0:t.cardTitle));console.log({props:e});return h("div",{class:sheet$5.classes.ProgressBar,"data-expired":g,"data-steps":n,"data-done":i<=r},h("style",{type:"text/css"},styleString$5),h("div",{class:!Boolean(m)&&r>=2*i||Boolean(m)&&r>2*i?"progress-bar repeatable-steps":"progress-bar",style:{gridTemplateColumns:x,marginLeft:r===0&&!n?"var(--sl-spacing-x-small)":""}},b))}function buildProgressBar(e,t,a){if(e){if(t){return addStepsRepeatable(a)}else{return addLinearRepeatable(a)}}else{if(t){return addSteps(a)}else{return addLinear(a)}}}function addSteps(e){var t=e.progress,a=e.goal;var r=[];var s=[];var i=1/a;for(var l=1;l<a;l++){s.push(i+"fr");s.push("0fr");if(l>t){r.push(h("div",{class:"remain"}));r.push(h("div",{class:"empty"},l))}else{r.push(h("div",{class:"filled"}));r.push(h("div",{class:"progress"},l))}}s.push(i+"fr");s.push("0fr");if(a<=t){s.push("0fr");r.push(h("div",{class:"filled"}));r.push(h("div",{class:"progress bg"},a));r.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push("0fr");r.push(h("div",{class:"remain"}));r.push(h("div",{class:"empty bg"},a));r.push(h("div",{class:"gift bw"},h(Gift,null)))}return{items:r,columns:s.join(" ")}}function addLinearRepeatable(e){var t=e.progress,a=e.goal,r=e.progressBarUnit,s=e.finite;var i=Math.floor(t/a);var l=t%a/a*.5;var n=[];var o="";if(i==0){o=l+"fr 0fr "+(.5-l)+"fr 0fr 0fr 0.5fr 0fr 0fr";n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a?"progress top bg":"progress top"},r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a));n.push(h("div",{class:t==a?"gift":"gift bw"},h(Gift,null)));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*2));n.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(i==1){o="0.5fr 0fr 0fr "+l+"fr 0fr "+(.5-l)+"fr 0fr 0fr";n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a?"progress top bg":"progress top"},t==a?"":r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*2));n.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(s&&i>=s){if(i>2){n.push(h("div",{class:"progress bg"},r+a*(s-2)));n.push(h("div",{class:"gift start"},h(Gift,null)));o="0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr"}else{o="0.5fr 0fr 0fr 0.5fr 0fr 0fr"}n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*(s-1)));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*s));n.push(h("div",{class:"gift"},h(Gift,null)))}else{o="0fr 0fr 0.5fr 0fr 0fr "+l+"fr 0fr "+(.5-l)+"fr 0fr 0fr";n.push(h("div",{class:"progress bg"},r+a*(i-1)));n.push(h("div",{class:"gift start"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*i));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a*i?"progress top bg":"progress top"},t==a*i?"":r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*(i+1)));n.push(h("div",{class:"gift bw"},h(Gift,null)))}return{items:n,columns:o}}function addStepsRepeatable(e){var t=e.progress,a=e.goal,r=e.finite;var s=[];var i=[];var l=Math.floor(t/a);if(l<2){var n=1/a;for(var o=1;o<a*2+1;o++){i.push(n+"fr");i.push("0fr");if(o>t){if(o==a){i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},a));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(o==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},a*2));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else{s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty"},o))}}else if(o==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},o));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},o))}}}else if(r&&l>=r){var n=1/a;if(l>2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"progress bg"},a*(r-2)));s.push(h("div",{class:"gift start"},h(Gift,null)))}for(var d=1;d<a*2+1;d++){i.push(n+"fr");i.push("0fr");if(d>t){if(d==a){i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"progress bg"},a*(r-1)));s.push(h("div",{class:"gift bw"},h(Gift,null)))}}else if(d==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},a*(r-1)));s.push(h("div",{class:"gift"},h(Gift,null)))}else if(d==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},a*r));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},d+a*(r-2)))}}}else{var c=t%a+a;var n=1/a;i.push("0fr");i.push("0fr");s.push(h("div",{class:"progress bg"},a*(l-1)));s.push(h("div",{class:"gift start"},h(Gift,null)));for(var u=1;u<a*2+1;u++){i.push(n+"fr");i.push("0fr");if(u<=a){if(u==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},u+a*(l-1)));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},u+a*(l-1)))}}else if(u>c){if(u==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},u+a*(l-1)));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else{s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty"},u+a*(l-1)))}}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},u+a*(l-1)))}}}return{items:s,columns:i.join(" ")}}function addLinear(e){var t=e.progress,a=e.goal,r=e.progressBarUnit;var s=[];var i="";var l=t/a;i=clamp(l,0,1)+"fr 0fr "+clamp(1-l,0,1)+"fr 0fr 0fr";s.push(h("div",{class:"filled"}));s.push(h("div",{class:clamp(t,0,a)==a?"progress top bg":"progress top"},clamp(t,0,a)==a?"":r+clamp(t,0,a)));s.push(h("div",{class:"remain"}));s.push(h("div",{class:"progress bg"},r+a));s.push(h("div",{class:clamp(t,0,a)==a?"gift":"gift bw"},h(Gift,null)));return{items:s,columns:i}}function clamp(e,t,a){return Math.min(Math.max(e,t),a)}var checkmark_circle=function(){return h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.81818 10C1.81818 5.48131 5.48131 1.81818 10 1.81818C14.5187 1.81818 18.1818 5.48131 18.1818 10C18.1818 14.5187 14.5187 18.1818 10 18.1818C5.48131 18.1818 1.81818 14.5187 1.81818 10ZM10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0ZM15.7692 6.96189C16.1398 6.48683 16.0551 5.80132 15.58 5.43077C15.1049 5.06022 14.4194 5.14495 14.0489 5.62001L8.72994 12.4391L5.86229 9.5715C5.43627 9.14548 4.74554 9.14548 4.31952 9.5715C3.89349 9.99752 3.89349 10.6882 4.31952 11.1143L8.05976 14.8545C8.28083 15.0756 8.58613 15.1912 8.89818 15.172C9.21023 15.1528 9.49905 15.0006 9.69133 14.7541L15.7692 6.96189Z",fill:"currentColor"}))};var checkmark_filled=function(){return h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.65 6.19231C15.0459 6.5011 15.1165 7.07236 14.8077 7.46825L9.74277 13.9617C9.58254 14.1672 9.34186 14.294 9.08182 14.31C8.82178 14.326 8.56736 14.2297 8.38314 14.0454L5.26627 10.9286C4.91124 10.5735 4.91124 9.99794 5.26627 9.64292C5.62129 9.2879 6.19689 9.2879 6.55191 9.64292L8.94162 12.0326L13.3741 6.35001C13.6828 5.95412 14.2541 5.88352 14.65 6.19231Z",fill:"white"}))};var arrow_left_right=function(){return h("svg",{width:11,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z",fill:"currentColor"}))};var style$6={TaskCard:{display:"inline-block",width:"100%","& .main":{position:"relative",boxSizing:"border-box",background:"var(--sl-color-neutral-0)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium)",boxShadow:"1px 2px 4px rgba(211, 211, 211, 0.2)",fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",color:"var(--sl-color-neutral-600)"},"& .main.complete":{background:"var(--sl-color-primary-50)",borderColor:"var(--sl-color-primary-500)"},"& .main.expired":{color:"var(--sl-color-neutral-600)",background:"var(--sl-color-neutral-50)"},"& .title":{fontSize:"var(--sl-font-size-medium)",color:"var(--sl-color-neutral-950)"},"& .container":{margin:"var(--sl-spacing-medium)"},"& .container.subdued":{opacity:"0.45"},"& .container > div":{margin:"var(--sl-spacing-medium) 0"}},NotStarted:{fontSize:"var(--sl-font-size-small)",padding:"var(--sl-spacing-medium)",color:"var(--sl-color-primary-600)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",borderBottom:"none",background:"var(--sl-color-primary-50)",fontWeight:"var(--sl-font-weight-semibold)",lineHeight:"var(--sl-line-height-dense)","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-small)",color:"var(--sl-color-primary-500)"}},Ended:{fontSize:"var(--sl-font-size-small)",padding:"var(--sl-spacing-medium)",color:"var(--sl-color-warning-600)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",borderBottom:"none",background:"var(--sl-color-warning-50)",fontWeight:"var(--sl-font-weight-semibold)",lineHeight:"var(--sl-line-height-dense)","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-small)",color:"var(--sl-color-warning-500)"}},Header:{display:"flex","& .icon":{position:"relative",top:"5%",alignSelf:"center",lineHeight:"0",color:"var(--sl-color-primary-400)",fontSize:"var(--sl-font-size-large)",marginRight:"var(--sl-spacing-x-small)"},"& .value":{alignSelf:"center",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-950)",lineHeight:"100%",marginRight:"var(--sl-spacing-xx-small)"},"& .text":{alignSelf:"end",textTransform:"uppercase",fontSize:"var(--sl-font-size-x-small)",color:"var(--sl-color-neutral-950)",lineHeight:"var(--sl-font-size-medium)",marginRight:"var(--sl-spacing-xx-small)"},"& .end":{color:"var(--sl-color-warning-500)",fontWeight:"var(--sl-font-weight-semibold)",marginBottom:"var(--sl-spacing-xx-small)"},"& .neutral":{color:"var(--sl-color-neutral-400)"}},Footer:{display:"flex","& .icon":{fontSize:"var(--sl-font-size-xx-small)",marginRight:"var(--sl-spacing-xx-small)",verticalAlign:"middle"},"& .text":{marginTop:"auto",verticalAlign:"text-bottom",fontSize:"var(--sl-font-size-x-small)",color:"var(--sl-color-neutral-400)"},"& .success":{color:"var(--sl-color-primary-500)",fontWeight:"var(--sl-font-weight-semibold)"},"& .action":{marginTop:"auto",marginLeft:"auto","&::part(base)":{color:"var(--sl-color-neutral-0)",borderRadius:"var(--sl-border-radius-medium)"},"&.disabled::part(base)":{border:"1px solid var(--sl-color-primary-400)",background:"var(--sl-color-primary-400)"},"&.neutral::part(base)":{border:"1px solid var(--sl-color-neutral-400)",background:"var(--sl-color-neutral-400)"}},"& .neutral":{color:"var(--sl-color-neutral-400)"},"& .datetime":{display:"block",marginTop:"var(--sl-spacing-xx-small)",color:"var(--sl-color-neutral-400)"}}};var sheet$6=createStyleSheet(style$6);var styleString$6=sheet$6.toString();function TaskCardView(e){var t,a,r;console.log("TASK CARD PROPS "+((t=e===null||e===void 0?void 0:e.content)===null||t===void 0?void 0:t.cardTitle));console.log({props:e});var s=e.callbacks,i=e.states,l=e.content;var n=l.showExpiry&&luxon.DateTime.fromISO(l.rewardDuration.split("/")[0]);var o=l.showExpiry&&luxon.DateTime.fromISO(l.rewardDuration.split("/")[1]);var d=luxon.DateTime.now();if(l.displayDuration){var c=(a=l.displayDuration.split("/"))===null||a===void 0?void 0:a[0];var u=(r=l.displayDuration.split("/"))===null||r===void 0?void 0:r[1];var p=c?luxon.DateTime.fromISO(c):d;var g=u?luxon.DateTime.fromISO(u):d;console.log({displayDateStart:p,dateToday:d,displayDateEnd:g});if(d<p||d>g)return h("span",null)}var v=checkmark_circle();var m=checkmark_filled();var f=arrow_left_right();var x=i.progress>=l.goal;var b=l.showProgressBar?Math.floor(i.progress/l.goal):i.progress;var y=x&&l.repeatable===false||l.finite&&i.progress>=l.finite*l.goal;var w=l.showExpiry&&o<=d;var S=l.showExpiry&&d<=n;var _=w||S;var C="\n\t:host{\n\t\tdisplay: block;\n\t\tmargin-bottom: var(--sl-spacing-large);\n\t}\n ";return h("div",{class:sheet$6.classes.TaskCard},h("style",{type:"text/css"},styleString$6,C),!i.loading&&S&&h("div",{class:sheet$6.classes.NotStarted},h("span",{class:"icon"},h("sl-icon",{name:"info-circle-fill"})),intl.formatMessage({id:"startsOnMessage",defaultMessage:l.startsOnMessage},{startDate:n.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)})),!i.loading&&w&&h("div",{class:sheet$6.classes.Ended},h("span",{class:"icon"},h("sl-icon",{name:"exclamation-triangle-fill"})),intl.formatMessage({id:"endedMessage",defaultMessage:l.endedMessage},{endDate:o.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)})),h("div",{style:{borderRadius:_&&"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)"},class:_?"main expired":y?"main complete":"main"},h("div",{class:y||_?"container subdued":"container"},h("div",{class:sheet$6.classes.Header},i.loading?h("sl-skeleton",{style:{width:"22%",margin:"0"}}):h("div",null,x&&h("span",{class:_?"icon neutral":"icon"},y?m:v),h("span",{class:"value"},l.rewardAmount),h("span",{class:"text"},l.rewardUnit))),i.loading?h("sl-skeleton",{style:{width:"42%",margin:"var(--sl-spacing-medium) 0"}}):h("div",{class:"title",style:{marginBottom:!l.description?l.steps?"var(--sl-spacing-x-large)":l.showProgressBar?"var(--sl-spacing-xx-large)":"":""}},l.cardTitle),i.loading?h("sl-skeleton",{style:{margin:"var(--sl-spacing-medium) 0"}}):l.description&&h(Details,Object.assign({},e)),l.showProgressBar&&i.loading?h("sl-skeleton",{style:{margin:"var(--sl-spacing-medium) 0"}}):l.showProgressBar&&h(ProgressBarView,Object.assign({},e.content,e.states,{complete:y,expired:_})),h("div",{class:sheet$6.classes.Footer},i.loading?h("sl-skeleton",{style:{width:"25%",marginLeft:"auto"}}):h("div",{style:{display:"contents"}},h("span",{class:"text"},l.repeatable&&h("div",null,h("span",{class:b>0?_?"icon neutral":"icon success":"icon"},f),h("span",{class:b>0?_?"neutral":"success":""},intl.formatMessage({id:"completedMessage",defaultMessage:l.completedText},{finite:l.finite,count:l.finite?Math.min(b,l.finite):b}))),l.showExpiry&&!_&&h("span",{class:"datetime"},intl.formatMessage({id:"expiryMessage",defaultMessage:l.expiryMessage},{endDate:o.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)}))),h("sl-button",{class:_?"action neutral":y?"action disabled":"action",type:"primary",size:"small",onClick:s.onClick,loading:i.loadingEvent,disabled:y||_},l.buttonText))))))}function ReferralIframeView(e){var t=e.states,a=e.data;var r=t.content;var s={Container:{position:"relative",width:r.iframeWidth,height:r.iframeHeight},IFrame:{position:"absolute",width:"100%",height:"100%",border:"0",top:"0",left:"0",right:"0"}};var i=createStyleSheet(s);var l=i.toString();return h("div",{class:i.classes.Container},h("style",{type:"text/css"},l),h("iframe",{class:i.classes.IFrame,src:r.iframeSrc+"?rsCode="+a.shareCode}))}var CheckMark=function(){return h("svg",{width:12,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z",fill:"#fff"}))};var CheckmarkFilled=function(){return h("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z",fill:"currentColor"}),h("path",{d:"M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z",fill:"white"}))};var Gift$1=function(){return h("svg",{width:156,height:157,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z",fill:"#FFD34F"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M37.18 73.862v7.966h89.663v-7.966H37.18Z",fill:"#E9BB30"}),h("path",{d:"M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z",fill:"#FFC000"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z",fill:"#EB5757"}),h("path",{d:"M75.086 74.224h13.85v7.604h-13.85v-7.604Z",fill:"#DD4747"}),h("g",{filter:"url(#a)"},h("ellipse",{cx:82.008,cy:141.207,rx:36.813,ry:5.793,fill:"#E0DDDD","fill-opacity":.8})),h("path",{d:"M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z",fill:"#FAB6B6"}),h("path",{d:"M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z",fill:"#F4EFBC"}),h("path",{d:"m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z",fill:"#FDA802"}),h("path",{d:"m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z",fill:"#E4599C"}),h("defs",null,h("filter",{id:"a",x:35.195,y:125.414,width:93.625,height:31.586,filterUnits:"userSpaceOnUse","color-interpolation-filters":"s-rGB"},h("feFlood",{"flood-opacity":0,result:"BackgroundImageFix"}),h("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),h("feGaussianBlur",{stdDeviation:5,result:"effect1_foregroundBlur_653_17907"}))))};function Dot(e){var t=e.active,a=e.completed,r=e.incomplete,s=e.stage;return h("div",{style:{display:"flex"}},h("div",{style:{backgroundColor:a?"var(--sl-color-success-500)":r?"var(--sl-color-neutral-200)":"var(--sl-color-neutral-0)",border:t?"1px solid var(--sl-color-success-500)":r?"1px solid var(--sl-color-neutral-200)":"1px solid var(--sl-color-success-500)",borderRadius:"50%",width:"23px",height:"23px",margin:"-11px",zIndex:"1",boxSizing:"content-box"}},a?h("div",{style:{top:"-10.5%",left:"23.5%",position:"relative"}},h(CheckMark,null)):h("div",{style:{color:t?"var(--sl-color-success-500)":"var(--sl-color-neutral-50)",width:"23px",lineHeight:"24px",textAlign:"center",position:"relative"}},s+1)))}function ProgressLine(e){var t=e.incomplete,a=t===void 0?false:t,r=e.active,s=r===void 0?false:r,i=e.invisible,l=i===void 0?false:i;return h("div",{style:{content:"''",flex:"0.5 0.5 0",height:"4px",borderRadius:"4px",background:a||s?"var(--sl-color-neutral-200)":"var(--sl-color-success-500)",position:"relative",bottom:"0",left:"0",display:"flex",justifyContent:"center",columnGap:"50px",marginRight:"-2px",boxSizing:"content-box",opacity:l?"0":"1"}})}function Progress(e){var t=e.active,a=e.completed,r=e.incomplete,s=e.stage;return[h(ProgressLine,{incomplete:r,invisible:s===0}),h(Dot,{active:t,completed:a,incomplete:r,stage:s}),h(ProgressLine,{incomplete:r,active:t,invisible:s===2})]}function ProgressBar(e){var t=e.stageCount,a=e.currentStage;return h("div",{style:{display:"flex",columnGap:"-2px"}},Array.from(Array(t).keys()).map((function(e){return h(Progress,{active:a===e,completed:a>e,incomplete:a<e,stage:e})})))}var stageList=["chooseReward","chooseAmount","confirmation","success"];function RewardExchangeView(e){var t=e.states,a=e.data,r=e.callbacks,s=e.refs;var i=t.selectedItem,l=t.selectedStep;var n={chooseReward:t.content.text.chooseRewardTitle,chooseAmount:t.content.text.chooseAmountTitle,confirmation:t.content.text.confirmationTitle};var o={HostBlock:HostBlock,Container:{minWidth:"300px",position:"relative"},FullImage:{objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex",margin:"0 auto"},Select:{"&::part(label)":{color:"var(--sl-color-primary-500)"},"&::part(menu)":{maxHeight:"50vh"},"& sl-menu-item::part(checked-icon)":{top:"8px"},"& sl-menu-item::part(base)":{flexDirection:"column"},"& sl-menu-item::part(base):focus":{background:"transparent",color:"var(--sl-color-gray-700)"}},ProgressBar:{maxWidth:"350px",width:"100%",margin:"auto",marginBottom:"var(--sl-spacing-xxx-large)","& .text-area":{marginTop:"5px",display:"flex",justifyContent:"center",textAlign:"center",whiteSpace:"nowrap",marginBottom:"6px","& .text":{marginBottom:"var(--sl-spacing-x-small)",flex:"1 1 0"},"& .text.subdued":{color:"var(--sl-color-neutral-200)"}}},CardLayout:{display:"flex",width:"100%",borderRadius:"3px",background:"rgba(0, 0, 0, 0)"},Card:{display:"flex",userSelect:"none",height:"120px","&::part(base)":{boxShadow:"none",width:"100%"},"&::part(body)":{display:"flex",padding:0},"& .selected":{position:"relative",top:"-2%",left:"100%",color:"var(--sl-color-primary-500)",margin:"-9px"}},Image:{padding:"var(--sl-spacing-small)",minWidth:"96px",maxWidth:"96px","& .image":{width:"100%",height:"100%",objectFit:"contain",borderRadius:"4px"},"& .image.subdued":{filter:"brightness(0.95)",opacity:"0.5"}},Square:{width:"120px",height:"118px",borderRadius:"3px 0 0 3px","& .image":{width:"100%",height:"100%",objectFit:"contain",borderRadius:"inherit"}},TextArea:{textAlign:"left",padding:"var(--sl-spacing-small)",paddingLeft:"0","& .title":{fontSize:"var(--sl-font-size-medium)",lineHeight:"var(--sl-line-height-dense)",fontWeight:"600",color:"var(--sl-color-neutral-1000)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .amount":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",color:"var(--sl-color-neutral-500)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .error":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",fontWeight:"600",color:"var(--sl-color-warning-600)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-xx-small)"}}},ChooseAmount:{display:"flex",alignItems:"center",justifyContent:"center",margin:"var(--sl-spacing-medium) 0","& .wrapper":{display:"flex",justifyContent:"center",alignItems:"center",gap:"var(--sl-spacing-xx-large)","@media (max-width: 799px)":{flexDirection:"column"}},"& .image":{width:"50%",objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex","@media (max-width: 799px)":{width:"auto"}},"& .text":{width:"50%",maxWidth:"400px","@media (max-width: 799px)":{width:"auto",margin:"auto"}},"& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-1000)"},"& .points":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-primary-500)"},"& .description":{fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-500)",margin:"var(--sl-spacing-medium) 0",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-xx-small)"},"& .space":{marginBottom:"var(--sl-spacing-xxx-large)"},"& sl-menu-item[disabled]::part(label)":{color:"var(--sl-color-neutral-200)"},"& sl-menu-item[disabled]":{"& .step-cost":{color:"var(--sl-color-neutral-200)"}}},SelectItem:{display:"flex",flexDirection:"column","& > .step-cost":{color:"var(--sl-color-neutral-400)",height:"0",marginBottom:"5px"},"& > .step-value":{margin:"0"}},Success:{textAlign:"center","& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-1000)"},"& .description":{color:"var(--sl-color-neutral-400)",width:"100%",maxWidth:"350px",margin:"0 auto",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-xx-large)",marginTop:"var(--sl-spacing-xx-small)"}},Grid:{display:"grid",justifyContent:"center",gap:"20px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"},Confirmation:{maxWidth:"800px",margin:"auto","& .wrapper":{display:"flex","@media (max-width: 499px)":{flexDirection:"column"}},"& .reward-item-container":{"@media (max-width: 499px)":{display:"flex",flexDirection:"row-reverse",justifyContent:"flex-end",alignItems:"center"}},"& .reward-item-container .reward-title":{paddingBottom:"var(--sl-spacing-medium)",lineHeight:"20px","@media (max-width: 499px)":{paddingBottom:"none",paddingLeft:"var(--sl-spacing-small)"}},"& .padding":{padding:"var(--sl-spacing-medium) 0","@media (max-width: 499px)":{padding:"var(--sl-spacing-small) 0"}},"& .field":{width:"30%",textTransform:"uppercase",fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-400)",textAlign:"left",paddingRight:"var(--sl-spacing-xxx-large)","@media (max-width: 499px)":{width:"100%",paddingRight:"0",paddingBottom:"0"}},"& .value":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .top-border":{borderTop:"1px solid var(--sl-color-neutral-200)"},"& .image":{width:"200px","@media (max-width: 499px)":{width:"100px"}}},Button:{display:"flex",flexWrap:"wrap-reverse",margin:"var(--sl-spacing-medium) 0","& .cancel":{marginLeft:"auto",marginRight:"var(--sl-spacing-medium)","&::part(base)":{fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-1000)"},"@media (max-width: 499px)":{width:"100%",marginRight:"0",marginTop:"var(--sl-spacing-small)"}},"& .continue":{"&::part(base)":{background:"var(--sl-color-primary-500)",borderColor:"var(--sl-color-primary-500)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-0)"},"@media (max-width: 499px)":{width:"100%"}},"& .continue.right":{marginLeft:"auto"},"& .continue.center":{margin:"0 auto"}},Confetti:{pointerEvents:"none",position:"absolute",width:"100%",height:"100%",top:"0%",left:"0%",zIndex:"1"}};var d=createStyleSheet(o);var c=d.toString();function u(){var e,a,s;var i=t.selectedItem;if(!i||(i===null||i===void 0?void 0:i.ruleType)==="FIXED_GLOBAL_REWARD")return h("span",null,i===null||i===void 0?void 0:i.prettySourceValue);if(!((e=i.steps)===null||e===void 0?void 0:e.length)){return h("p",null,intl.formatMessage({id:"notEnoughError",defaultMessage:t.content.text.notEnoughError},{sourceUnit:i.sourceUnit}))}console.log("SELECTED ITEM ",t.selectedStep);console.log("CALLBACKS ",r);return h("sl-select",{style:{width:"auto"},label:(a=t===null||t===void 0?void 0:t.content)===null||a===void 0?void 0:a.text.selectText,class:d.classes.Select,value:t.selectedStep,"onSl-select":function(e){var t,a,s,i,l;return r.setExchangeState({amount:(s=(a=(t=e.detail)===null||t===void 0?void 0:t.item)===null||a===void 0?void 0:a.value)===null||s===void 0?void 0:s.sourceValue,selectedStep:(l=(i=e.detail)===null||i===void 0?void 0:i.item)===null||l===void 0?void 0:l.value})}},(s=i.steps)===null||s===void 0?void 0:s.map((function(e){var a,r;console.log(i.steps);return h("sl-menu-item",{value:e.prettyDestinationValue,disabled:!e.available},e.prettyDestinationValue," ",h("br",null),e.unavailableReasonCode&&h("p",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-warning-500)",margin:"0"}},intl.formatMessage({id:"unavailableCode",defaultMessage:(r=(a=t.content)===null||a===void 0?void 0:a.text)===null||r===void 0?void 0:r.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:i.sourceUnit,sourceValue:e.prettySourceValue||i.prettySourceMinValue})),h("div",{class:"step-cost",slot:"suffix"},e.prettySourceValue))})))}function p(){var e;return[h("div",null,h("h2",{style:{margin:"var(--sl-spacing-large) 0"}},t.content.text.rewardTitle),t.loading?y():h("div",{class:d.classes.Grid},(e=a.exchangeList)===null||e===void 0?void 0:e.map((function(e){var a,s,l,n,o;var c={boxShadow:e.key===(i===null||i===void 0?void 0:i.key)?"0 0 0 2px var(--sl-color-primary-500)":"none",borderRadius:"4px"};return h("div",{key:e.key,style:c},h("sl-card",{class:d.classes.Card,style:{cursor:e.unavailableReasonCode?"not-allowed":"pointer"},onClick:function(){return e.available&&r.setExchangeState({selectedItem:e})}},e.key===(i===null||i===void 0?void 0:i.key)&&h("div",{class:"selected"},h(CheckmarkFilled,null)),h("div",{style:{display:"flex",width:"100%",height:"120px",borderRadius:"3px",background:e.unavailableReasonCode?"rgba(0, 0, 0, 0.05)":"rgba(0, 0, 0, 0)"}},h("div",{class:d.classes.Image,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},h("img",{class:e.unavailableReasonCode?"image subdued":"image",src:(e===null||e===void 0?void 0:e.imageUrl)||getAssetPath("./assets/placeholder.png")})),h("div",{class:d.classes.TextArea,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},h("div",{class:"title",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},(a=e.name)!==null&&a!==void 0?a:""),h("div",{class:"amount",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},intl.formatMessage({id:"sourceAmountMessage",defaultMessage:(l=(s=t.content)===null||s===void 0?void 0:s.text)===null||l===void 0?void 0:l.sourceAmountMessage},{ruleType:e.ruleType,sourceValue:e.prettySourceValue,sourceMinValue:e.prettySourceMinValue,sourceMaxValue:e.prettySourceMaxValue})),e.unavailableReasonCode&&h("div",{class:"error"},h("sl-icon",{class:"icon",name:"exclamation-triangle-fill"}),intl.formatMessage({id:"unavailableCode",defaultMessage:(o=(n=t.content)===null||n===void 0?void 0:n.text)===null||o===void 0?void 0:o.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:e.sourceUnit,sourceValue:e.prettySourceValue||e.prettySourceMinValue}))))))}))),h("div",{class:d.classes.Button},h("sl-button",{class:"continue right",size:"large",onClick:function(){return r.setStage("chooseAmount")},loading:t.loading,disabled:!t.selectedItem},t.content.text.continueText)))]}function g(){var e,a,s,l;var n=u();var o=((e=t.selectedItem)===null||e===void 0?void 0:e.ruleType)==="FIXED_GLOBAL_REWARD"?false:n&&!t.amount;return h("div",null,h("div",{class:d.classes.ChooseAmount},h("div",{class:"wrapper"},h("img",{class:"image",src:(i===null||i===void 0?void 0:i.imageUrl)||getAssetPath("./assets/placeholder.png")}),h("div",{class:"text"},h("div",{class:"title"},(a=i===null||i===void 0?void 0:i.name)!==null&&a!==void 0?a:""),((s=t.selectedItem)===null||s===void 0?void 0:s.ruleType)==="FIXED_GLOBAL_REWARD"?h("div",{class:"points"},n):h("div",{class:"description"},i===null||i===void 0?void 0:i.description),((l=t.selectedItem)===null||l===void 0?void 0:l.ruleType)==="FIXED_GLOBAL_REWARD"?h("div",{class:"description"},i===null||i===void 0?void 0:i.description):h("div",{class:"points"},n),h("div",{class:"space"}),h("div",{class:d.classes.Button},h("sl-button",{class:"cancel",size:"large",type:"text",onClick:function(){return r.resetState()}},t.content.text.cancelText),h("sl-button",{class:"continue",size:"large",onClick:function(){return r.setStage("confirmation")},disabled:o},t.content.text.continueToConfirmationText))))))}function v(){console.log(i);console.log(l);var e=(l===null||l===void 0?void 0:l.prettySourceValue)||i.prettySourceValue;var a=l===null||l===void 0?void 0:l.prettyDestinationValue;return h("div",null,h("h2",{style:{margin:"var(--sl-spacing-large) 0",textAlign:"center"}},t.content.text.redeemTitle),h("div",{class:d.classes.Confirmation},h("div",{class:"wrapper"},h("div",{class:"field"},t.content.text.rewardNameTitle),h("div",{class:"reward-item-container"},h("div",{class:"reward-title"},i.name),h("img",{class:"image",src:(i===null||i===void 0?void 0:i.imageUrl)||getAssetPath("./assets/placeholder.png")}))),h("div",{class:"wrapper padding"},h("div",{class:"field"})),a&&h("div",{class:"wrapper top-border padding"},h("div",{class:"field"},t.content.text.rewardAmountTitle),h("div",null,a)),h("div",{class:"wrapper top-border padding"},h("div",{class:"field"},t.content.text.costTitle),h("div",{class:"value"},e)),h("div",{class:d.classes.Button},h("sl-button",{class:"cancel",type:"text",size:"large",onClick:function(){return r.setStage("chooseAmount")}},t.content.text.backText),h("sl-button",{class:"continue",size:"large",loading:t.loading,onClick:r.exchangeReward},t.content.text.redeemText))))}function m(){var e,s,i,l,n;console.log("success");return h("div",{class:d.classes.Success},h(Gift$1,null),h(_,null),h("div",{class:"title"},t.content.text.rewardRedeemedText),h("div",{class:"description"},intl.formatMessage({id:"successMessage",defaultMessage:t.content.text.redemptionSuccessText},{sourceValue:(e=t.selectedItem.prettySourceValue)!==null&&e!==void 0?e:(s=t.selectedStep)===null||s===void 0?void 0:s.prettySourceValue,destinationValue:((i=t.selectedStep)===null||i===void 0?void 0:i.prettyDestinationValue)||((l=t.selectedItem)===null||l===void 0?void 0:l.name)||t.selectedItem.globalRewardKey})),(a===null||a===void 0?void 0:a.fuelTankCode)&&h("div",{style:{width:"40%",margin:"-30px auto var(--sl-spacing-xxx-large) auto",textAlign:"left",color:"var(--sl-color-neutral-700)"}},t.content.text.promoCode,h(ShareLinkView,{shareString:a.fuelTankCode,tooltiptext:(n=t===null||t===void 0?void 0:t.content)===null||n===void 0?void 0:n.text.toopTipText,open:t.open,onClick:r.copyFuelTankCode})),h("div",{class:d.classes.Button},h("sl-button",{class:"continue center",type:"primary",size:"large",onClick:function(){return r.resetState(true)}},t.content.text.doneText)))}var f={chooseReward:function(){return p()},chooseAmount:function(){return g()},confirmation:function(){return v()},success:function(){return m()}};var x=f[t.redeemStage];function b(){var e=stageList.indexOf(t.redeemStage);return h("div",{class:d.classes.ProgressBar},h("div",{class:"text-area"},Object.keys(n).map((function(t){if(stageList.indexOf(t)<=e){return h("span",{class:"text"},n[t])}else{return h("span",{class:"text subdued"},n[t])}}))),h(ProgressBar,{stageCount:3,currentStage:e}))}function y(){return h("div",{class:d.classes.Grid},__spreadArrays(Array(t.content.text.skeletonCardNum)).map((function(){return h("div",null,h("sl-card",{class:d.classes.Card},h("div",{class:d.classes.CardLayout},h("div",null,h("sl-skeleton",{style:{width:"100px",height:"100px",margin:"9px","--border-radius":"4px"}})),h("div",{style:{margin:"var(--sl-spacing-small) var(--sl-spacing-small) 0 0",width:"100%"}},h("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),h("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),h("sl-skeleton",{style:{width:"45%"}})))))})))}function w(){return h("sl-alert",{type:"danger",open:true},h("sl-icon",{slot:"icon",name:"exclamation-octagon"}),t.content.text.redemptionError)}function S(){return h("sl-alert",{type:"danger",open:true},h("sl-icon",{slot:"icon",name:"exclamation-octagon"}),t.content.text.queryError)}function _(){return h("canvas",{ref:function(e){if(!(s===null||s===void 0?void 0:s.canvasRef))return;s.canvasRef.current=e},id:"my-canvas",class:d.classes.Confetti})}return h("div",{class:d.classes.Container},h("style",{type:"text/css"},c),h("div",null,console.log(e),b(),t.exchangeError&&w(),t.queryError&&S(),x&&x(),t.redeemStage==="success"))}function CardFeedView(e,t){var a={Container:{columnGap:e.gap+"px",columnWidth:e.width+"px","& > div":{marginBottom:"24px"}}};var r=createStyleSheet(a);var s=r.toString();console.log(e);var i="\n :host{\n display: block; \n }\n\n ";return h("div",null,h("style",{type:"text/css"},s,i),h("div",{class:r.classes.Container},t))}function t(e,t,a){return Math.min(Math.max(e,a),t)}var n=function(e){__extends(t,e);function t(t){return e.call(this,'Failed to parse color: "'+t+'"')||this}return t}(Error);function r(e){if("string"!=typeof e)throw new n(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];var r=e.trim();r=u.test(e)?function(e){var t=e.toLowerCase().trim(),a=o[function(e){var t=5381,a=e.length;for(;a;)t=33*t^e.charCodeAt(--a);return(t>>>0)%2341}(t)];if(!a)throw new n(e);return"#"+a}(e):e;var d=s.exec(r);if(d){var p=Array.from(d).slice(1);return __spreadArrays(p.slice(0,3).map((function(e){return parseInt(_(e,2),16)})),[parseInt(_(p[3]||"f",2),16)/255])}var h=i.exec(r);if(h){var g=Array.from(h).slice(1);return __spreadArrays(g.slice(0,3).map((function(e){return parseInt(e,16)})),[parseInt(g[3]||"ff",16)/255])}var v=a.exec(r);if(v){var m=Array.from(v).slice(1);return __spreadArrays(m.slice(0,3).map((function(e){return parseInt(e,10)})),[parseFloat(m[3]||"1")])}var f=c.exec(r);if(f){var x=Array.from(f).slice(1).map(parseFloat),b=x[0],y=x[1],w=x[2],S=x[3];if(t(0,100,y)!==y)throw new n(e);if(t(0,100,w)!==w)throw new n(e);return __spreadArrays(l(b,y,w),[S||1])}throw new n(e)}var e=function(e){return parseInt(e.replace(/_/g,""),36)},o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((function(t,a){var r=e(a.substring(0,3)),s=e(a.substring(3)).toString(16);var i="";for(var l=0;l<6-s.length;l++)i+="0";return t[r]=""+i+s,t}),{}),_=function(e,t){return Array.from(Array(t)).map((function(){return e})).join("")},s=new RegExp("^#"+_("([a-f0-9])",3)+"([a-f0-9])?$","i"),i=new RegExp("^#"+_("([a-f0-9]{2})",3)+"([a-f0-9]{2})?$","i"),a=new RegExp("^rgba?\\(\\s*(\\d+)\\s*"+_(",\\s*(\\d+)\\s*",2)+"(?:,\\s*([\\d.]+))?\\s*\\)$","i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=function(e){return Math.round(255*e)},l=function(e,t,a){var r=a/100;if(0===t)return[r,r,r].map(f);var s=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),l=i*(1-Math.abs(s%2-1));var n=0,o=0,d=0;s>=0&&s<1?(n=i,o=l):s>=1&&s<2?(n=l,o=i):s>=2&&s<3?(o=i,d=l):s>=3&&s<4?(o=l,d=i):s>=4&&s<5?(n=l,d=i):s>=5&&s<6&&(n=i,d=l);var c=r-i/2;return[n+c,o+c,d+c].map(f)};function p(e){var t=r(e).map((function(e,t){return 3===t?e:e/255})),a=t[0],s=t[1],i=t[2],l=t[3],n=Math.max(a,s,i),o=Math.min(a,s,i),d=(n+o)/2;if(n===o)return[0,0,d,l];var c=n-o;return[60*(a===n?(s-i)/c+(s<i?6:0):s===n?(i-a)/c+2:(a-s)/c+4),d>.5?c/(2-n-o):c/(n+o),d,l]}function z(e,a,r,s){return"hsla("+(e%360).toFixed()+", "+t(0,100,100*a).toFixed()+"%, "+t(0,100,100*r).toFixed()+"%, "+parseFloat(t(0,1,s).toFixed(3))+")"}var colorScale=[50,100,200,300,400,500,600,700,800,900,950];var lScale=[.95,.86,.76,.66,.56,.46,.39,.32,.25,.18,.15];var hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;function niceParseToHsla(e){var a=e.trim();var r=hslaRegex.exec(a);if(r){var s=Array.from(r).slice(1).map(parseFloat),i=s[0],l=s[1],o=s[2],d=s[3];if(t(0,100,l)!==l)throw new n(e);if(t(0,100,o)!==o)throw new n(e);return[i,l/100,o,d||1]}return p(e)}function generateScale(e,t){if(t===void 0){t="primary"}var a=niceParseToHsla(e),r=a[0],s=a[1],i=a[2],l=a[3];return lScale.map((function(e){return z(r,s,e,l)})).map((function(e,a){return"--sl-color-"+t+"-"+colorScale[a]+": "+e+";\n"}))}function autoColorScaleCss(e,t){if(t===void 0){t="primary"}return generateScale(e,t).join("\n")}export{CardFeedView as C,EditProfileView as E,PortalFrameView as P,ReferralIframeView as R,ShareButtonView as S,TaskCardView as T,ShareLinkView as a,useShareButton as b,PortalChangePasswordView as c,PortalLoginView as d,PortalRegisterView as e,ProgressBarView as f,RewardExchangeView as g,autoColorScaleCss as h,useShareLink as u};var templateObject_1,templateObject_2,templateObject_3;
|