northants-design-system 3.0.0 → 3.1.1
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/build/index.js +863 -175
- package/build/index.js.map +1 -1
- package/build/index.mjs.js +864 -177
- package/build/index.mjs.js.map +1 -1
- package/build/library/components/SummaryList/SummaryList.types.d.ts +4 -0
- package/build/library/slices/BlockLinks/BlockLinks.d.ts +4 -0
- package/build/library/slices/BlockLinks/BlockLinks.test.d.ts +1 -0
- package/build/library/slices/BlockLinks/BlockLinks.types.d.ts +40 -0
- package/build/library/slices/LinkBlock/LinkBlock.d.ts +4 -0
- package/build/library/slices/LinkBlock/LinkBlock.test.d.ts +1 -0
- package/build/library/slices/LinkBlock/LinkBlock.types.d.ts +36 -0
- package/build/library/structure/PageStructures.d.ts +2 -1
- package/build/library/structure/WebChatAssistant/WebChatAssistant.d.ts +4 -0
- package/build/library/structure/WebChatAssistant/WebChatAssistant.test.d.ts +1 -0
- package/build/library/structure/WebChatAssistant/WebChatAssistant.types.d.ts +24 -0
- package/build/library/structure/WebChatAssistant/useWs.d.ts +1 -0
- package/package.json +4 -3
package/build/index.js
CHANGED
|
@@ -3715,7 +3715,7 @@ var Autocomplete = function (_a) {
|
|
|
3715
3715
|
})));
|
|
3716
3716
|
};
|
|
3717
3717
|
|
|
3718
|
-
const Container$
|
|
3718
|
+
const Container$1u = styled__default.default.div`
|
|
3719
3719
|
display: block;
|
|
3720
3720
|
`;
|
|
3721
3721
|
|
|
@@ -3801,7 +3801,7 @@ var BackToTop = function (_a) {
|
|
|
3801
3801
|
React.useEffect(function () {
|
|
3802
3802
|
window.addEventListener('scroll', toggleVisible);
|
|
3803
3803
|
});
|
|
3804
|
-
return (React__namespace.default.createElement(Container$
|
|
3804
|
+
return (React__namespace.default.createElement(Container$1u, { "data-testid": "BackToTop" }, isActive && (React__namespace.default.createElement(BackToTopButton, { onClick: scrollToTop, "$visible": visible, "data-testid": "BackToTopButton", type: "button", "aria-label": "Go to the top of the page" },
|
|
3805
3805
|
React__namespace.default.createElement(ChevronIcon, { colourFill: theme.theme_vars.colours.white, direction: "up" })))));
|
|
3806
3806
|
};
|
|
3807
3807
|
|
|
@@ -3894,7 +3894,7 @@ var Button$5 = function (_a) {
|
|
|
3894
3894
|
return (React__namespace.default.createElement(StyledButton$1, __assign({ className: ["button--".concat(size), mode].join(' ') }, href, { title: title ? title : text, "$colourOverride": colourOverride && colourOverride }, props), text ? text : children));
|
|
3895
3895
|
};
|
|
3896
3896
|
|
|
3897
|
-
const Container$
|
|
3897
|
+
const Container$1t = styled__default.default.div`
|
|
3898
3898
|
display: block;
|
|
3899
3899
|
background-color: ${(props) =>
|
|
3900
3900
|
props.$isOpen ? props.theme.theme_vars.colours.positive : props.theme.theme_vars.colours.negative}16;
|
|
@@ -3927,9 +3927,25 @@ const SummaryList$1 = styled__default.default.dl`
|
|
|
3927
3927
|
border-collapse: collapse;
|
|
3928
3928
|
`;
|
|
3929
3929
|
|
|
3930
|
+
const wrapOnMobile = (props) => {
|
|
3931
|
+
if (props.$hasWrapOnMobile) {
|
|
3932
|
+
return styled.css`
|
|
3933
|
+
display: block;
|
|
3934
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
3935
|
+
`;
|
|
3936
|
+
} else {
|
|
3937
|
+
return styled.css`
|
|
3938
|
+
display: grid;
|
|
3939
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3940
|
+
margin: 0;
|
|
3941
|
+
`;
|
|
3942
|
+
}
|
|
3943
|
+
};
|
|
3944
|
+
|
|
3930
3945
|
const SummaryRow = styled__default.default.div`
|
|
3931
3946
|
border-bottom: ${(props) => (props.$hasBorders ? `1px solid ${props.theme.theme_vars.colours.grey}` : `none`)};
|
|
3932
|
-
|
|
3947
|
+
|
|
3948
|
+
${wrapOnMobile};
|
|
3933
3949
|
|
|
3934
3950
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
3935
3951
|
display: table-row;
|
|
@@ -3941,9 +3957,24 @@ const SummaryRow = styled__default.default.div`
|
|
|
3941
3957
|
}
|
|
3942
3958
|
`;
|
|
3943
3959
|
|
|
3960
|
+
const summaryTermHasWrap = (props) => {
|
|
3961
|
+
if (props.$hasWrapOnMobile) {
|
|
3962
|
+
return styled.css`
|
|
3963
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
3964
|
+
`;
|
|
3965
|
+
} else {
|
|
3966
|
+
return styled.css`
|
|
3967
|
+
grid-column-start: 1;
|
|
3968
|
+
grid-column-end: 1;
|
|
3969
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
3970
|
+
margin: 0;
|
|
3971
|
+
`;
|
|
3972
|
+
}
|
|
3973
|
+
};
|
|
3974
|
+
|
|
3944
3975
|
const SummaryTerm = styled__default.default.dt`
|
|
3945
|
-
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
3946
3976
|
font-weight: bold;
|
|
3977
|
+
${summaryTermHasWrap};
|
|
3947
3978
|
|
|
3948
3979
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
3949
3980
|
display: table-cell;
|
|
@@ -3958,10 +3989,25 @@ const SummaryTerm = styled__default.default.dt`
|
|
|
3958
3989
|
}
|
|
3959
3990
|
`;
|
|
3960
3991
|
|
|
3992
|
+
const summaryDetailHasWrap = (props) => {
|
|
3993
|
+
if (props.$hasWrapOnMobile) {
|
|
3994
|
+
return styled.css`
|
|
3995
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
3996
|
+
`;
|
|
3997
|
+
} else {
|
|
3998
|
+
return styled.css`
|
|
3999
|
+
grid-column-start: 2;
|
|
4000
|
+
grid-column-end: 2;
|
|
4001
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
4002
|
+
margin: 0;
|
|
4003
|
+
`;
|
|
4004
|
+
}
|
|
4005
|
+
};
|
|
4006
|
+
|
|
3961
4007
|
const SummaryDetail = styled__default.default.dd`
|
|
3962
4008
|
overflow-wrap: break-word;
|
|
3963
4009
|
width: 100%;
|
|
3964
|
-
|
|
4010
|
+
${summaryDetailHasWrap};
|
|
3965
4011
|
|
|
3966
4012
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
3967
4013
|
display: table-cell;
|
|
@@ -19900,13 +19946,13 @@ var Heading$1 = function (_a) {
|
|
|
19900
19946
|
};
|
|
19901
19947
|
|
|
19902
19948
|
var SummaryList = function (_a) {
|
|
19903
|
-
var terms = _a.terms, _b = _a.hasMargin, hasMargin = _b === void 0 ? true : _b, _c = _a.hasBorders, hasBorders = _c === void 0 ? true : _c, heading = _a.heading;
|
|
19949
|
+
var terms = _a.terms, _b = _a.hasMargin, hasMargin = _b === void 0 ? true : _b, _c = _a.hasBorders, hasBorders = _c === void 0 ? true : _c, heading = _a.heading, _d = _a.hasWrapOnMobile, hasWrapOnMobile = _d === void 0 ? true : _d;
|
|
19904
19950
|
return (React__namespace.default.createElement(SummaryContainer, { "$hasHeading": heading, "$hasMargin": hasMargin },
|
|
19905
19951
|
heading && (React__namespace.default.createElement(SummaryHeading, null,
|
|
19906
19952
|
React__namespace.default.createElement(Heading$1, { level: 3, text: heading }))),
|
|
19907
|
-
React__namespace.default.createElement(SummaryList$1, { "data-testid": "SummaryList" }, terms.map(function (summaryRow, summaryIndex) { return (React__namespace.default.createElement(SummaryRow, { key: summaryIndex, "$hasBorders": hasBorders },
|
|
19908
|
-
React__namespace.default.createElement(SummaryTerm,
|
|
19909
|
-
React__namespace.default.createElement(SummaryDetail, { dangerouslySetInnerHTML: { __html: sanitizeHtml(summaryRow.detail) } }))); }))));
|
|
19953
|
+
React__namespace.default.createElement(SummaryList$1, { "data-testid": "SummaryList" }, terms.map(function (summaryRow, summaryIndex) { return (React__namespace.default.createElement(SummaryRow, { key: summaryIndex, "$hasBorders": hasBorders, "$hasWrapOnMobile": hasWrapOnMobile },
|
|
19954
|
+
React__namespace.default.createElement(SummaryTerm, { "$hasWrapOnMobile": hasWrapOnMobile }, summaryRow.term),
|
|
19955
|
+
React__namespace.default.createElement(SummaryDetail, { dangerouslySetInnerHTML: { __html: sanitizeHtml(summaryRow.detail) }, "$hasWrapOnMobile": hasWrapOnMobile }))); }))));
|
|
19910
19956
|
};
|
|
19911
19957
|
|
|
19912
19958
|
var ConsultationStatus = function (_a) {
|
|
@@ -19922,8 +19968,8 @@ var ConsultationStatus = function (_a) {
|
|
|
19922
19968
|
detail: new Date(closeDate).toLocaleDateString('en-GB'),
|
|
19923
19969
|
},
|
|
19924
19970
|
];
|
|
19925
|
-
return (React__namespace.default.createElement(Container$
|
|
19926
|
-
React__namespace.default.createElement(SummaryList, { terms: terms, hasBorders: false, hasMargin: false })));
|
|
19971
|
+
return (React__namespace.default.createElement(Container$1t, { "data-testid": "ConsultationStatus", "$isOpen": isOpen },
|
|
19972
|
+
React__namespace.default.createElement(SummaryList, { terms: terms, hasBorders: false, hasMargin: false, hasWrapOnMobile: false })));
|
|
19927
19973
|
};
|
|
19928
19974
|
|
|
19929
19975
|
const Icon$4 = styled__default.default.span`
|
|
@@ -22135,7 +22181,7 @@ var DynamicIcon = function (_a) {
|
|
|
22135
22181
|
React__namespace.default.createElement(DynamicComponent, { name: icon, isHover: true }))))));
|
|
22136
22182
|
};
|
|
22137
22183
|
|
|
22138
|
-
const Container$
|
|
22184
|
+
const Container$1s = styled__default.default.div`
|
|
22139
22185
|
display: block;
|
|
22140
22186
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
22141
22187
|
border-bottom: ${(props) => (props.$hasBorder ? `1px solid ${props.theme.theme_vars.colours.grey}` : 'none')};
|
|
@@ -22307,14 +22353,14 @@ var formatDateRange = function (startDate, endDate) {
|
|
|
22307
22353
|
|
|
22308
22354
|
var EventDetails = function (_a) {
|
|
22309
22355
|
var startTime = _a.startTime, endTime = _a.endTime, location = _a.location, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, _c = _a.hasMargin, hasMargin = _c === void 0 ? true : _c;
|
|
22310
|
-
return (React__namespace.default.createElement(Container$
|
|
22356
|
+
return (React__namespace.default.createElement(Container$1s, { "data-testid": "EventDetails", "$hasBorder": hasBorder, "$hasMargin": hasMargin },
|
|
22311
22357
|
React__namespace.default.createElement(EventRow, null,
|
|
22312
22358
|
React__namespace.default.createElement(HeadingWithIcon, { icon: "events", level: 4, text: formatDateRange(startTime, endTime), hasHover: false })),
|
|
22313
22359
|
React__namespace.default.createElement(EventRow, null,
|
|
22314
22360
|
React__namespace.default.createElement(HeadingWithIcon, { icon: "address", level: 4, text: location, hasHover: false }))));
|
|
22315
22361
|
};
|
|
22316
22362
|
|
|
22317
|
-
const Container$
|
|
22363
|
+
const Container$1r = styled__default.default.div`
|
|
22318
22364
|
display: flex;
|
|
22319
22365
|
width: 100%;
|
|
22320
22366
|
min-height: 400px;
|
|
@@ -22338,7 +22384,7 @@ var Map$1 = function (_a) {
|
|
|
22338
22384
|
setMap(new window.google.maps.Map(ref.current, { center: center, zoom: zoom }));
|
|
22339
22385
|
}
|
|
22340
22386
|
}, [ref, map]);
|
|
22341
|
-
return (React__namespace.default.createElement(Container$
|
|
22387
|
+
return (React__namespace.default.createElement(Container$1r, { "data-testid": "Map" },
|
|
22342
22388
|
React__namespace.default.createElement("div", { ref: ref }),
|
|
22343
22389
|
React__namespace.default.Children.map(children, function (child) {
|
|
22344
22390
|
if (React__namespace.default.isValidElement(child)) {
|
|
@@ -22395,7 +22441,7 @@ var MapMarker = function (options) {
|
|
|
22395
22441
|
return null;
|
|
22396
22442
|
};
|
|
22397
22443
|
|
|
22398
|
-
const Container$
|
|
22444
|
+
const Container$1q = styled__default.default.div`
|
|
22399
22445
|
${(props) => props.theme.fontStyles};
|
|
22400
22446
|
display: block;
|
|
22401
22447
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -23181,7 +23227,7 @@ var Pagination = function (_a) {
|
|
|
23181
23227
|
}
|
|
23182
23228
|
};
|
|
23183
23229
|
if (numbers.length > 1) {
|
|
23184
|
-
return (React__namespace.default.createElement(Container$
|
|
23230
|
+
return (React__namespace.default.createElement(Container$1q, { "data-testid": "Pagination", role: "navigation", "aria-label": "Pagination" },
|
|
23185
23231
|
currentPage > 1 && (React__namespace.default.createElement(Previous, { onClick: function () { return buttonClick(currentPage - 1); }, title: "Go back a page" }, "Previous")),
|
|
23186
23232
|
React__namespace.default.createElement(NumbersContainer, null, numbers.map(function (v, i) { return (React__namespace.default.createElement(NumberContainer, { key: i },
|
|
23187
23233
|
v === '...' && React__namespace.default.createElement(Ellipsis, null, "..."),
|
|
@@ -23193,7 +23239,7 @@ var Pagination = function (_a) {
|
|
|
23193
23239
|
return null;
|
|
23194
23240
|
};
|
|
23195
23241
|
|
|
23196
|
-
const Container$
|
|
23242
|
+
const Container$1p = styled__default.default.div`
|
|
23197
23243
|
${(props) => props.theme.fontStyles};
|
|
23198
23244
|
margin-bottom: 30px;
|
|
23199
23245
|
`;
|
|
@@ -23376,8 +23422,8 @@ var CheckboxListFilter = function (_a) {
|
|
|
23376
23422
|
handleParams('news', [{ key: NewsArticleFilterFields.articleType.queryParamKey, value: articleTypes }], ['page']);
|
|
23377
23423
|
}
|
|
23378
23424
|
};
|
|
23379
|
-
var backupLabel =
|
|
23380
|
-
return (React__namespace.default.createElement(Container$
|
|
23425
|
+
var backupLabel = React.useId();
|
|
23426
|
+
return (React__namespace.default.createElement(Container$1p, { "data-testid": "CheckboxListFilter" },
|
|
23381
23427
|
React__namespace.default.createElement(Fieldset$2, { "aria-describedby": hintId },
|
|
23382
23428
|
React__namespace.default.createElement(Legend$4, { "$labelHidden": labelHidden, "data-testid": "CheckboxListFilterLegend" }, label),
|
|
23383
23429
|
React__namespace.default.createElement(Hint$1, { id: hintId, "$hintHidden": hintHidden, "data-testid": "CheckboxListFilterHint" }, hint),
|
|
@@ -23386,11 +23432,11 @@ var CheckboxListFilter = function (_a) {
|
|
|
23386
23432
|
React__namespace.default.createElement(CheckboxLabel, { "$isChecked": option.checked, htmlFor: option.value }, option.title))); })))));
|
|
23387
23433
|
};
|
|
23388
23434
|
|
|
23389
|
-
const Container$
|
|
23435
|
+
const Container$1o = styled__default.default.div`
|
|
23390
23436
|
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.small : 0)};
|
|
23391
23437
|
`;
|
|
23392
23438
|
|
|
23393
|
-
const Container$
|
|
23439
|
+
const Container$1n = styled__default.default.div`
|
|
23394
23440
|
${(props) => props.theme.fontStyles};
|
|
23395
23441
|
width: ${(props) => (props.$isFullWidth ? '100%' : 'auto')};
|
|
23396
23442
|
`;
|
|
@@ -23457,7 +23503,7 @@ const ErrorText$2 = styled__default.default.p`
|
|
|
23457
23503
|
|
|
23458
23504
|
var DropDownSelect = function (_a) {
|
|
23459
23505
|
var id = _a.id, label = _a.label, options = _a.options, onChange = _a.onChange, selected = _a.selected, _b = _a.hideLabel, hideLabel = _b === void 0 ? false : _b, _c = _a.isErrored, isErrored = _c === void 0 ? false : _c, errorText = _a.errorText, _d = _a.value, value = _d === void 0 ? undefined : _d, _e = _a.hasBottomMargin, hasBottomMargin = _e === void 0 ? false : _e, _f = _a.hasBoldLabel, hasBoldLabel = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g;
|
|
23460
|
-
return (React__namespace.default.createElement(Container$
|
|
23506
|
+
return (React__namespace.default.createElement(Container$1n, { "$isFullWidth": isFullWidth },
|
|
23461
23507
|
React__namespace.default.createElement(Label$a, { htmlFor: id, "$hideLabel": hideLabel, "$hasBoldLabel": hasBoldLabel }, label),
|
|
23462
23508
|
errorText && React__namespace.default.createElement(ErrorText$2, { id: "".concat(id, "Error") }, errorText),
|
|
23463
23509
|
typeof value !== 'undefined' ? (React__namespace.default.createElement(Select, { id: id, name: id, onChange: onChange && onChange, value: value, "$isErrored": isErrored, "$hasBottomMargin": hasBottomMargin, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React__namespace.default.createElement(Option, { key: i, value: option.value }, option.title)); }))) : (React__namespace.default.createElement(Select, { id: id, name: id, onChange: onChange && onChange, defaultValue: selected && selected, "$isErrored": isErrored, "$isFullWidth": isFullWidth }, options.map(function (option, i) { return (React__namespace.default.createElement(Option, { key: i, value: option.value }, option.title)); })))));
|
|
@@ -23470,7 +23516,7 @@ var DropDownFilter = function (_a) {
|
|
|
23470
23516
|
setValue(e.target.value);
|
|
23471
23517
|
handleParams('news', [{ key: NewsArticleFilterFields[filterKey].queryParamKey, value: e.target.value }], ['page']);
|
|
23472
23518
|
};
|
|
23473
|
-
return (React__namespace.default.createElement(Container$
|
|
23519
|
+
return (React__namespace.default.createElement(Container$1o, { "$hasMargin": hasMargin },
|
|
23474
23520
|
React__namespace.default.createElement(DropDownSelect, { id: id, label: label, options: options, onChange: optionPicked, selected: value, hideLabel: hideLabel })));
|
|
23475
23521
|
};
|
|
23476
23522
|
|
|
@@ -23615,7 +23661,7 @@ const ListItem$3 = styled__default.default.li`
|
|
|
23615
23661
|
}
|
|
23616
23662
|
`;
|
|
23617
23663
|
|
|
23618
|
-
const Container$
|
|
23664
|
+
const Container$1m = styled__default.default.div`
|
|
23619
23665
|
box-sizing: border-box;
|
|
23620
23666
|
display: flex;
|
|
23621
23667
|
flex-wrap: wrap;
|
|
@@ -23641,7 +23687,7 @@ const Container$1l = styled__default.default.div`
|
|
|
23641
23687
|
|
|
23642
23688
|
var Row$1 = function (_a) {
|
|
23643
23689
|
var _b = _a.hasBorder, hasBorder = _b === void 0 ? false : _b, _c = _a.isList, isList = _c === void 0 ? false : _c, _d = _a.hasWrap, hasWrap = _d === void 0 ? true : _d, children = _a.children, classes = _a.classes;
|
|
23644
|
-
return (React__namespace.default.createElement(Container$
|
|
23690
|
+
return (React__namespace.default.createElement(Container$1m, { "data-testid": "Row", "$hasBorder": hasBorder, "$hasWrap": hasWrap, as: isList ? 'ul' : 'div', className: classes }, children));
|
|
23645
23691
|
};
|
|
23646
23692
|
|
|
23647
23693
|
const calculateWidth = (size) => {
|
|
@@ -23691,7 +23737,7 @@ const widths = (props) => {
|
|
|
23691
23737
|
`;
|
|
23692
23738
|
};
|
|
23693
23739
|
|
|
23694
|
-
const Container$
|
|
23740
|
+
const Container$1l = styled__default.default.div`
|
|
23695
23741
|
box-sizing: border-box;
|
|
23696
23742
|
display: block;
|
|
23697
23743
|
padding: ${(props) => (props.$hasPadding ? props.theme.theme_vars.spacingSizes.small : `0`)};
|
|
@@ -23703,7 +23749,7 @@ const Container$1k = styled__default.default.div`
|
|
|
23703
23749
|
|
|
23704
23750
|
var Column = function (_a) {
|
|
23705
23751
|
var _b = _a.small, small = _b === void 0 ? 'full' : _b, _c = _a.medium, medium = _c === void 0 ? 'one-half' : _c, _d = _a.large, large = _d === void 0 ? 'one-third' : _d, _e = _a.hasPadding, hasPadding = _e === void 0 ? true : _e, _f = _a.hasBorder, hasBorder = _f === void 0 ? false : _f, _g = _a.isList, isList = _g === void 0 ? false : _g, classes = _a.classes, id = _a.id, children = _a.children, role = _a.role;
|
|
23706
|
-
return (React__namespace.default.createElement(Container$
|
|
23752
|
+
return (React__namespace.default.createElement(Container$1l, { "data-testid": "Column", "$small": small, "$medium": medium, "$large": large, "$hasPadding": hasPadding, "$hasBorder": hasBorder, as: isList ? 'li' : 'div', className: classes, role: role, id: id }, children));
|
|
23707
23753
|
};
|
|
23708
23754
|
|
|
23709
23755
|
var PromotedLinks = function (_a) {
|
|
@@ -23720,7 +23766,7 @@ var PromotedLinks = function (_a) {
|
|
|
23720
23766
|
}
|
|
23721
23767
|
};
|
|
23722
23768
|
|
|
23723
|
-
const Container$
|
|
23769
|
+
const Container$1k = styled__default.default.div`
|
|
23724
23770
|
display: block;
|
|
23725
23771
|
`;
|
|
23726
23772
|
|
|
@@ -23770,7 +23816,7 @@ const promotedStyles = (props) => {
|
|
|
23770
23816
|
}
|
|
23771
23817
|
};
|
|
23772
23818
|
|
|
23773
|
-
const Container$
|
|
23819
|
+
const Container$1j = styled__default.default.a`
|
|
23774
23820
|
display: flex;
|
|
23775
23821
|
flex-direction: row;
|
|
23776
23822
|
flex-wrap: wrap;
|
|
@@ -23907,7 +23953,7 @@ const imageRatio = (props) => {
|
|
|
23907
23953
|
}
|
|
23908
23954
|
};
|
|
23909
23955
|
|
|
23910
|
-
const Container$
|
|
23956
|
+
const Container$1i = styled__default.default.div`
|
|
23911
23957
|
display: block;
|
|
23912
23958
|
position: ${(props) => (props.$ratio === 'auto' ? 'absolute' : 'relative')};
|
|
23913
23959
|
${imageRatio}
|
|
@@ -23925,13 +23971,13 @@ const Image$3 = styled__default.default.img`
|
|
|
23925
23971
|
|
|
23926
23972
|
var ResponsiveImage = function (_a) {
|
|
23927
23973
|
var imageSmall = _a.imageSmall, imageLarge = _a.imageLarge, imageAltText = _a.imageAltText, _b = _a.smallWidth, smallWidth = _b === void 0 ? '400' : _b, _c = _a.largeWidth, largeWidth = _c === void 0 ? '1200' : _c, ratio = _a.ratio, _d = _a.objectFit, objectFit = _d === void 0 ? 'cover' : _d;
|
|
23928
|
-
return (React__namespace.default.createElement(Container$
|
|
23974
|
+
return (React__namespace.default.createElement(Container$1i, { "data-testid": "ResponsiveImage", "$ratio": ratio },
|
|
23929
23975
|
React__namespace.default.createElement(Image$3, { alt: imageAltText, loading: "lazy", srcSet: "".concat(imageSmall, " ").concat(smallWidth, "w, ").concat(imageLarge, " ").concat(largeWidth, "w"), sizes: "(max-width: 550px) 550px, ".concat(largeWidth, "px"), src: imageLarge, "$objectFit": objectFit })));
|
|
23930
23976
|
};
|
|
23931
23977
|
|
|
23932
23978
|
var EventLink = function (_a) {
|
|
23933
23979
|
var title = _a.title, summary = _a.summary, startTime = _a.startTime, endTime = _a.endTime, location = _a.location, url = _a.url, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, _b = _a.showSummary, showSummary = _b === void 0 ? false : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? true : _c, _d = _a.isPromoted, isPromoted = _d === void 0 ? false : _d, parentTitle = _a.parentTitle;
|
|
23934
|
-
return (React__namespace.default.createElement(Container$
|
|
23980
|
+
return (React__namespace.default.createElement(Container$1j, { "data-testid": "EventLink", href: url, "$isPromoted": isPromoted },
|
|
23935
23981
|
React__namespace.default.createElement(Row$1, null,
|
|
23936
23982
|
React__namespace.default.createElement(Column, { small: "full", medium: imageLarge ? 'two-thirds' : 'full', large: imageLarge ? 'two-thirds' : 'full', hasPadding: false },
|
|
23937
23983
|
React__namespace.default.createElement(EventContent, { "$hasPadding": hasPadding },
|
|
@@ -23947,13 +23993,13 @@ var EventLink = function (_a) {
|
|
|
23947
23993
|
// A list of related events
|
|
23948
23994
|
var RelatedEvents = function (_a) {
|
|
23949
23995
|
var title = _a.title, events = _a.events;
|
|
23950
|
-
return (React__namespace.default.createElement(Container$
|
|
23996
|
+
return (React__namespace.default.createElement(Container$1k, { "data-testid": "RelatedEvents" },
|
|
23951
23997
|
React__namespace.default.createElement(Title$a, null, title),
|
|
23952
23998
|
React__namespace.default.createElement(List$3, null, events.map(function (event, index) { return (React__namespace.default.createElement(ListItem$2, { key: index },
|
|
23953
23999
|
React__namespace.default.createElement(EventLink, { title: event.title, startTime: event.startTime, endTime: event.endTime, showSummary: false, url: event.url, location: event.location, hasPadding: false }))); }))));
|
|
23954
24000
|
};
|
|
23955
24001
|
|
|
23956
|
-
const Container$
|
|
24002
|
+
const Container$1h = styled__default.default.div`
|
|
23957
24003
|
display: block;
|
|
23958
24004
|
`;
|
|
23959
24005
|
|
|
@@ -23961,7 +24007,7 @@ const MapImage = styled__default.default.img`
|
|
|
23961
24007
|
max-width: 100%;
|
|
23962
24008
|
`;
|
|
23963
24009
|
|
|
23964
|
-
const Message = styled__default.default.div`
|
|
24010
|
+
const Message$1 = styled__default.default.div`
|
|
23965
24011
|
background-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
23966
24012
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
23967
24013
|
`;
|
|
@@ -23989,7 +24035,7 @@ const Cookies = styled__default.default.button`
|
|
|
23989
24035
|
}
|
|
23990
24036
|
`;
|
|
23991
24037
|
|
|
23992
|
-
const Container$
|
|
24038
|
+
const Container$1g = styled__default.default.div`
|
|
23993
24039
|
${(props) => props.theme.fontStyles}
|
|
23994
24040
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
23995
24041
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -24335,18 +24381,18 @@ var CookieBanner = function (_a) {
|
|
|
24335
24381
|
hideCookiesAcceptedConfirmationBanner();
|
|
24336
24382
|
};
|
|
24337
24383
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
24338
|
-
showCookieBanner && (React__namespace.default.createElement(Container$
|
|
24384
|
+
showCookieBanner && (React__namespace.default.createElement(Container$1g, { "data-testid": "CookieBanner" },
|
|
24339
24385
|
React__namespace.default.createElement(CookieMessage, null,
|
|
24340
24386
|
React__namespace.default.createElement(CookieHeading, null, title),
|
|
24341
24387
|
React__namespace.default.createElement(CookieParagraph, null, paragraph),
|
|
24342
24388
|
React__namespace.default.createElement(ButtonsContainer, null,
|
|
24343
24389
|
React__namespace.default.createElement(FormButton, { primary: true, text: acceptButtonText, isDisabled: false, type: "button", onClick: acceptCookies, size: "large" }),
|
|
24344
24390
|
React__namespace.default.createElement(FormButton, { primary: true, text: rejectButtonText, isDisabled: false, type: "button", onClick: rejectCookies, size: "large" }))))),
|
|
24345
|
-
showCookiesRejectedBanner && (React__namespace.default.createElement(Container$
|
|
24391
|
+
showCookiesRejectedBanner && (React__namespace.default.createElement(Container$1g, { "data-testid": "CookieBannerRejected", id: "CookieBannerRejected" },
|
|
24346
24392
|
React__namespace.default.createElement(CookieMessage, { isInline: true },
|
|
24347
24393
|
React__namespace.default.createElement(CookieParagraph, null, rejectConfirmationText),
|
|
24348
24394
|
React__namespace.default.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerRejected", "aria-hidden": "false" }, "Hide")))),
|
|
24349
|
-
showCookiesAcceptedBanner && (React__namespace.default.createElement(Container$
|
|
24395
|
+
showCookiesAcceptedBanner && (React__namespace.default.createElement(Container$1g, { "data-testid": "CookieBannerAccepted", id: "CookieBannerAccepted" },
|
|
24350
24396
|
React__namespace.default.createElement(CookieMessage, { isInline: true },
|
|
24351
24397
|
React__namespace.default.createElement(CookieParagraph, null, acceptConfirmationText),
|
|
24352
24398
|
React__namespace.default.createElement(CookieHide, { onClick: hideCookiesConfirmationBanner, "aria-controls": "CookieBannerAccepted", "aria-hidden": "false" }, "Hide"))))));
|
|
@@ -24368,8 +24414,8 @@ var StaticMap = function (_a) {
|
|
|
24368
24414
|
return "&markers=size:".concat(size, "%7Ccolor:").concat(colour).concat(label, "%7C").concat(mapMarker.lat, ",").concat(mapMarker.lng);
|
|
24369
24415
|
})
|
|
24370
24416
|
.join('');
|
|
24371
|
-
return (React__namespace.default.createElement(Container$
|
|
24372
|
-
React__namespace.default.createElement(Message, null,
|
|
24417
|
+
return (React__namespace.default.createElement(Container$1h, { "data-testid": "StaticMap" },
|
|
24418
|
+
React__namespace.default.createElement(Message$1, null,
|
|
24373
24419
|
React__namespace.default.createElement("span", null,
|
|
24374
24420
|
"To interact with the map, you need to ",
|
|
24375
24421
|
React__namespace.default.createElement(Cookies, { onClick: AcceptCookies }, "accept cookies"),
|
|
@@ -24387,7 +24433,7 @@ var TextInput = function (_a) {
|
|
|
24387
24433
|
React__namespace.default.createElement(StyledTextInput, { type: "text", id: id, name: name, defaultValue: value, "$size": size, placeholder: placeholder, "$isErrored": isErrored, "$isLarge": isLarge })));
|
|
24388
24434
|
};
|
|
24389
24435
|
|
|
24390
|
-
const Container$
|
|
24436
|
+
const Container$1f = styled__default.default.div`
|
|
24391
24437
|
display: block;
|
|
24392
24438
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.extra_small};
|
|
24393
24439
|
margin-top: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -24435,11 +24481,11 @@ var ToggleButtons = function (_a) {
|
|
|
24435
24481
|
setActiveButton(index);
|
|
24436
24482
|
onClick();
|
|
24437
24483
|
};
|
|
24438
|
-
return (React__namespace.default.createElement(Container$
|
|
24484
|
+
return (React__namespace.default.createElement(Container$1f, { "data-testid": "ToggleButtons", "$hasTopMargin": hasTopMargin },
|
|
24439
24485
|
React__namespace.default.createElement(React__namespace.default.Fragment, null, buttons.map(function (button, index) { return (React__namespace.default.createElement(ToggleButton, { type: "button", title: button.title, "aria-label": button.ariaLabel, key: index, onClick: function () { return handleClick(index, button.onClick); }, "$isActive": activeButton == index }, button.label)); }))));
|
|
24440
24486
|
};
|
|
24441
24487
|
|
|
24442
|
-
const Container$
|
|
24488
|
+
const Container$1e = styled__default.default.div`
|
|
24443
24489
|
display: block;
|
|
24444
24490
|
position: fixed;
|
|
24445
24491
|
top: ${(props) => props.theme.theme_vars.spacingSizes.xxx_large};
|
|
@@ -24539,14 +24585,14 @@ var QuickExit = function (_a) {
|
|
|
24539
24585
|
window.location.replace(url);
|
|
24540
24586
|
};
|
|
24541
24587
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
24542
|
-
React__namespace.default.createElement(Container$
|
|
24588
|
+
React__namespace.default.createElement(Container$1e, { "data-testid": "QuickExit" },
|
|
24543
24589
|
React__namespace.default.createElement(QuickExitButton, { onClick: function (e) { return handleClick(e); } },
|
|
24544
24590
|
React__namespace.default.createElement(HeadingWithIcon, { icon: "quickExit", level: 3, text: label, hasHover: false })))));
|
|
24545
24591
|
};
|
|
24546
24592
|
|
|
24547
24593
|
// Accordion
|
|
24548
24594
|
|
|
24549
|
-
const Container$
|
|
24595
|
+
const Container$1d = styled__default.default.div`
|
|
24550
24596
|
${(props) => props.theme.fontStyles}
|
|
24551
24597
|
margin-bottom: 20px;
|
|
24552
24598
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey};
|
|
@@ -24836,7 +24882,7 @@ var Accordion$1 = function (_a) {
|
|
|
24836
24882
|
setAccordionStates(newStatus);
|
|
24837
24883
|
};
|
|
24838
24884
|
var accordionId = "accordion".concat(React.useId());
|
|
24839
|
-
return (React__namespace.default.createElement(Container$
|
|
24885
|
+
return (React__namespace.default.createElement(Container$1d, { "data-testid": "Accordion", id: accordionId },
|
|
24840
24886
|
showControls && sections.length > 1 && (React__namespace.default.createElement(AccordionControls$1, null,
|
|
24841
24887
|
React__namespace.default.createElement(OpenAllButton, { onClick: toggleAll, type: "button", "aria-expanded": !openAll },
|
|
24842
24888
|
openAll ? 'Open all' : 'Close all',
|
|
@@ -24844,7 +24890,7 @@ var Accordion$1 = function (_a) {
|
|
|
24844
24890
|
accordionStates.map(function (section, i) { return (React__namespace.default.createElement(AccordionSection, __assign({}, section, { key: i, onToggle: updateAccordionState, isFilter: isFilter, withReadMore: withReadMore }))); })));
|
|
24845
24891
|
};
|
|
24846
24892
|
|
|
24847
|
-
const Container$
|
|
24893
|
+
const Container$1c = styled__default.default.div`
|
|
24848
24894
|
display: block;
|
|
24849
24895
|
background-color: ${(props) => props.theme.theme_vars.colours.grey_light};
|
|
24850
24896
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
@@ -24898,7 +24944,7 @@ var _a, _b;
|
|
|
24898
24944
|
var PostcodeSearchApiUrl = (_a = process.env.NEXT_PUBLIC_POSTCODE_SEARCH_API_URL) !== null && _a !== void 0 ? _a : '';
|
|
24899
24945
|
var BinFinderApiUrl = (_b = process.env.NEXT_PUBLIC_BIN_FINDER_API_URL) !== null && _b !== void 0 ? _b : '';
|
|
24900
24946
|
|
|
24901
|
-
const Container$
|
|
24947
|
+
const Container$1b = styled__default.default.div`
|
|
24902
24948
|
display: flex;
|
|
24903
24949
|
-webkit-flex-direction: row;
|
|
24904
24950
|
-moz-flex-direction: row;
|
|
@@ -24935,7 +24981,7 @@ const ErrorSummary$1 = styled__default.default.div`
|
|
|
24935
24981
|
*/
|
|
24936
24982
|
var FormWithLine = function (_a) {
|
|
24937
24983
|
var _b = _a.lineColour, lineColour = _b === void 0 ? '#C6C6C6' : _b, _c = _a.hideLine, hideLine = _c === void 0 ? false : _c, formRole = _a.formRole, formMethod = _a.formMethod, formURL = _a.formURL, _d = _a.isError, isError = _d === void 0 ? false : _d, errorSummary = _a.errorSummary, onSubmit = _a.onSubmit, children = _a.children;
|
|
24938
|
-
return (React__namespace.default.createElement(Container$
|
|
24984
|
+
return (React__namespace.default.createElement(Container$1b, null,
|
|
24939
24985
|
React__namespace.default.createElement(Line$1, { "$lineColour": lineColour, "$hideLine": hideLine, "$isError": isError }),
|
|
24940
24986
|
React__namespace.default.createElement(Form, { onSubmit: onSubmit, "$hideLine": hideLine, role: formRole, method: formMethod, url: formURL, "data-testid": "FormWithLine" },
|
|
24941
24987
|
errorSummary && React__namespace.default.createElement(ErrorSummary$1, null, errorSummary),
|
|
@@ -24985,7 +25031,7 @@ var Input = function (_a) {
|
|
|
24985
25031
|
typeof value !== 'undefined' ? (React__namespace.default.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, value: value, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth, min: minValue })) : (React__namespace.default.createElement(StyledInput, { onChange: onChange, type: type, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, autoComplete: autocomplete, "$isFullWidth": isFullWidth, min: minValue }))));
|
|
24986
25032
|
};
|
|
24987
25033
|
|
|
24988
|
-
const Container$
|
|
25034
|
+
const Container$1a = styled__default.default.div`
|
|
24989
25035
|
display: block;
|
|
24990
25036
|
`;
|
|
24991
25037
|
|
|
@@ -25182,7 +25228,7 @@ var BinCollection = function (_a) {
|
|
|
25182
25228
|
}
|
|
25183
25229
|
return acc;
|
|
25184
25230
|
}, {});
|
|
25185
|
-
return (React__namespace.default.createElement(Container$
|
|
25231
|
+
return (React__namespace.default.createElement(Container$1a, { "data-testid": "BinCollection" },
|
|
25186
25232
|
React__namespace.default.createElement(Heading$1, { text: "Bin collections for:", level: 3 }),
|
|
25187
25233
|
React__namespace.default.createElement("p", null, address),
|
|
25188
25234
|
Object.keys(binCollectionsGrouped).map(function (day) {
|
|
@@ -25371,7 +25417,7 @@ var BinFinder = function (_a) {
|
|
|
25371
25417
|
return [2 /*return*/];
|
|
25372
25418
|
});
|
|
25373
25419
|
}); };
|
|
25374
|
-
return (React__namespace.default.createElement(Container$
|
|
25420
|
+
return (React__namespace.default.createElement(Container$1c, { "data-testid": "BinFinder" },
|
|
25375
25421
|
title && (React__namespace.default.createElement(TitleContainer, null,
|
|
25376
25422
|
React__namespace.default.createElement(Heading$1, { level: 2, text: title }))),
|
|
25377
25423
|
uprn === '' ? (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
@@ -25468,7 +25514,7 @@ var BlockQuote = function (_a) {
|
|
|
25468
25514
|
citation && React__namespace.default.createElement(Citation, null, citation)));
|
|
25469
25515
|
};
|
|
25470
25516
|
|
|
25471
|
-
const Container$
|
|
25517
|
+
const Container$19 = styled__default.default.div`
|
|
25472
25518
|
display: block;
|
|
25473
25519
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
25474
25520
|
`;
|
|
@@ -25617,7 +25663,7 @@ const Retry = styled__default.default.button`
|
|
|
25617
25663
|
}
|
|
25618
25664
|
`;
|
|
25619
25665
|
|
|
25620
|
-
const Container$
|
|
25666
|
+
const Container$18 = styled__default.default.div`
|
|
25621
25667
|
display: block;
|
|
25622
25668
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
25623
25669
|
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
|
|
@@ -25821,7 +25867,7 @@ var BudgetSlider = function (_a) {
|
|
|
25821
25867
|
.replace(/\s+/g, '-') // replace spaces with hyphens
|
|
25822
25868
|
.replace(/-+/g, '-');
|
|
25823
25869
|
};
|
|
25824
|
-
return (React__namespace.default.createElement(Container$
|
|
25870
|
+
return (React__namespace.default.createElement(Container$18, { "data-testid": "BudgetSlider" },
|
|
25825
25871
|
icon ? (React__namespace.default.createElement(HeadingWithIcon, { text: title, icon: icon, level: 3, subHeading: summary })) : (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
25826
25872
|
React__namespace.default.createElement(Heading$1, { text: title, level: 3 }),
|
|
25827
25873
|
React__namespace.default.createElement("p", null, summary))),
|
|
@@ -25894,7 +25940,7 @@ var BudgetGame = function (_a) {
|
|
|
25894
25940
|
onTryAgain();
|
|
25895
25941
|
}
|
|
25896
25942
|
};
|
|
25897
|
-
return (React__namespace.default.createElement(Container$
|
|
25943
|
+
return (React__namespace.default.createElement(Container$19, { "data-testid": "BudgetGame" },
|
|
25898
25944
|
React__namespace.default.createElement(Row$1, null,
|
|
25899
25945
|
React__namespace.default.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
25900
25946
|
React__namespace.default.createElement(TotalContainer, null,
|
|
@@ -25929,7 +25975,7 @@ var BudgetGame = function (_a) {
|
|
|
25929
25975
|
React__namespace.default.createElement(BudgetSlider, __assign({}, budgetService, { onChange: handleValueChange, index: index })))); }))))));
|
|
25930
25976
|
};
|
|
25931
25977
|
|
|
25932
|
-
const Container$
|
|
25978
|
+
const Container$17 = styled__default.default.div`
|
|
25933
25979
|
margin-bottom: 30px;
|
|
25934
25980
|
display: block;
|
|
25935
25981
|
|
|
@@ -25944,11 +25990,11 @@ const Container$16 = styled__default.default.div`
|
|
|
25944
25990
|
*/
|
|
25945
25991
|
var CallToAction = function (_a) {
|
|
25946
25992
|
var primary = _a.primary; _a.size; var text = _a.text, url = _a.url, isExternal = _a.isExternal, isDisabled = _a.isDisabled; __rest(_a, ["primary", "size", "text", "url", "isExternal", "isDisabled"]);
|
|
25947
|
-
return (React__namespace.default.createElement(Container$
|
|
25993
|
+
return (React__namespace.default.createElement(Container$17, null,
|
|
25948
25994
|
React__namespace.default.createElement(Button$5, { primary: primary, size: "large", text: text, url: url, isExternal: isExternal, isDisabled: isDisabled })));
|
|
25949
25995
|
};
|
|
25950
25996
|
|
|
25951
|
-
const Container$
|
|
25997
|
+
const Container$16 = styled__default.default.div`
|
|
25952
25998
|
display: block;
|
|
25953
25999
|
${(props) => props.theme.fontStyles}
|
|
25954
26000
|
`;
|
|
@@ -26124,7 +26170,7 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
26124
26170
|
});
|
|
26125
26171
|
return letterData;
|
|
26126
26172
|
});
|
|
26127
|
-
return (React__namespace.default.createElement(Container$
|
|
26173
|
+
return (React__namespace.default.createElement(Container$16, { "data-testid": "AlphabeticalDirectory", ref: directoryRef },
|
|
26128
26174
|
React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
26129
26175
|
parishes.length === 0 && (React__namespace.default.createElement(ErrorText$1, null, "There was an issue fetching the parish data. Please try again later.")),
|
|
26130
26176
|
parish === null ? (React__namespace.default.createElement(React__namespace.default.Fragment, null, sortedData.map(function (letter, i) { return (React__namespace.default.createElement(Row, { key: i },
|
|
@@ -26150,9 +26196,9 @@ var CouncilTaxAlphabeticalDirectory = function (_a) {
|
|
|
26150
26196
|
React__namespace.default.createElement("td", null, Number(parish.values[band]).toLocaleString('en-GB', { style: 'currency', currency: 'GBP' })))); })))))))));
|
|
26151
26197
|
};
|
|
26152
26198
|
|
|
26153
|
-
const Container$
|
|
26199
|
+
const Container$15 = styled__default.default.div``;
|
|
26154
26200
|
|
|
26155
|
-
const Container$
|
|
26201
|
+
const Container$14 = styled__default.default.div`
|
|
26156
26202
|
display: flex;
|
|
26157
26203
|
flex-direction: column;
|
|
26158
26204
|
justify-content: flex-start;
|
|
@@ -26228,7 +26274,7 @@ const FooterLink$1 = styled__default.default.a`
|
|
|
26228
26274
|
var Card = function (_a) {
|
|
26229
26275
|
var header = _a.header, content = _a.content, footerLink = _a.footerLink, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText;
|
|
26230
26276
|
var showContent = content || header;
|
|
26231
|
-
return (React__namespace.default.createElement(Container$
|
|
26277
|
+
return (React__namespace.default.createElement(Container$14, { "data-testid": "Card" },
|
|
26232
26278
|
imageLarge && imageSmall && (React__namespace.default.createElement(React__namespace.default.Fragment, null, footerLink ? (React__namespace.default.createElement(ImageLink$1, { href: footerLink.url },
|
|
26233
26279
|
React__namespace.default.createElement(Image$2, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" }))) : (React__namespace.default.createElement(Image$2, { src: imageLarge, alt: imageAltText, srcSet: "".concat(imageSmall, " 400w, ").concat(imageLarge, " 800w"), sizes: "(max-width: 550px) 400px, 800px", loading: "lazy" })))),
|
|
26234
26280
|
showContent && (React__namespace.default.createElement(Content$7, null,
|
|
@@ -26244,24 +26290,24 @@ var Card = function (_a) {
|
|
|
26244
26290
|
*/
|
|
26245
26291
|
var Cards = function (_a) {
|
|
26246
26292
|
var cards = _a.cards;
|
|
26247
|
-
return (React__namespace.default.createElement(Container$
|
|
26293
|
+
return (React__namespace.default.createElement(Container$15, { "data-testid": "Cards" },
|
|
26248
26294
|
React__namespace.default.createElement(Row$1, null, cards.map(function (card, index) { return (React__namespace.default.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
26249
26295
|
React__namespace.default.createElement(Card, __assign({}, card)))); }))));
|
|
26250
26296
|
};
|
|
26251
26297
|
|
|
26252
|
-
const Container$
|
|
26298
|
+
const Container$13 = styled__default.default.div`
|
|
26253
26299
|
margin: 25px 0;
|
|
26254
26300
|
`;
|
|
26255
26301
|
|
|
26256
26302
|
var DownloadableFiles = function (_a) {
|
|
26257
26303
|
var files = _a.files;
|
|
26258
|
-
return (React__namespace.default.createElement(Container$
|
|
26304
|
+
return (React__namespace.default.createElement(Container$13, { "data-testid": "DownloadableFiles" }, files.length > 0 ?
|
|
26259
26305
|
files.map(function (file) { return React__namespace.default.createElement(FileDownload, __assign({ key: file.title }, file)); })
|
|
26260
26306
|
:
|
|
26261
26307
|
React__namespace.default.createElement("i", null, "No file to show")));
|
|
26262
26308
|
};
|
|
26263
26309
|
|
|
26264
|
-
const Container$
|
|
26310
|
+
const Container$12 = styled__default.default.div`
|
|
26265
26311
|
display: block;
|
|
26266
26312
|
|
|
26267
26313
|
input {
|
|
@@ -26365,7 +26411,7 @@ var AccessibleLinks = function (_a) {
|
|
|
26365
26411
|
})));
|
|
26366
26412
|
};
|
|
26367
26413
|
|
|
26368
|
-
const Container$
|
|
26414
|
+
const Container$11 = styled__default.default.div`
|
|
26369
26415
|
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
26370
26416
|
background: ${(props) =>
|
|
26371
26417
|
props.$alertType === 'alert'
|
|
@@ -26496,7 +26542,7 @@ const handleContainerPadding = (noBackground, noPadding) => {
|
|
|
26496
26542
|
}
|
|
26497
26543
|
};
|
|
26498
26544
|
|
|
26499
|
-
const Container
|
|
26545
|
+
const Container$10 = styled__default.default.div`
|
|
26500
26546
|
background: ${(props) =>
|
|
26501
26547
|
props.$noBackground
|
|
26502
26548
|
? 'transparent'
|
|
@@ -26538,7 +26584,7 @@ const MaxWidth = styled__default.default.div`
|
|
|
26538
26584
|
*/
|
|
26539
26585
|
var MaxWidthContainer = function (_a) {
|
|
26540
26586
|
var children = _a.children, classes = _a.classes, _b = _a.noBackground, noBackground = _b === void 0 ? false : _b, _c = _a.noPadding, noPadding = _c === void 0 ? false : _c, _d = _a.overflowVisible, overflowVisible = _d === void 0 ? false : _d, props = __rest(_a, ["children", "classes", "noBackground", "noPadding", "overflowVisible"]);
|
|
26541
|
-
return (React__namespace.default.createElement(Container
|
|
26587
|
+
return (React__namespace.default.createElement(Container$10, { "$noBackground": noBackground, "$noPadding": noPadding, "$overflowVisible": overflowVisible },
|
|
26542
26588
|
React__namespace.default.createElement(MaxWidth, __assign({ className: classes, "$overflowVisible": overflowVisible }, props), children)));
|
|
26543
26589
|
};
|
|
26544
26590
|
|
|
@@ -26609,7 +26655,7 @@ var AlertBanner = function (_a) {
|
|
|
26609
26655
|
setShowAlert(false);
|
|
26610
26656
|
};
|
|
26611
26657
|
return (showAlert &&
|
|
26612
|
-
notServer && (React__namespace.default.createElement(Container$
|
|
26658
|
+
notServer && (React__namespace.default.createElement(Container$11, { "$alertType": alertType, "data-testid": "AlertBanner" },
|
|
26613
26659
|
React__namespace.default.createElement(MaxWidthContainer, { noBackground: true },
|
|
26614
26660
|
React__namespace.default.createElement(InnerContainer$2, null,
|
|
26615
26661
|
React__namespace.default.createElement(BannerContentContainer, null,
|
|
@@ -26623,7 +26669,7 @@ var AlertBanner = function (_a) {
|
|
|
26623
26669
|
"Dismiss"))))));
|
|
26624
26670
|
};
|
|
26625
26671
|
|
|
26626
|
-
const Container
|
|
26672
|
+
const Container$$ = styled__default.default.div`
|
|
26627
26673
|
border: solid 4px;
|
|
26628
26674
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
26629
26675
|
border-color: ${(props) =>
|
|
@@ -26677,13 +26723,13 @@ const InnerContainer$1 = styled__default.default.div`
|
|
|
26677
26723
|
*/
|
|
26678
26724
|
var AlertBannerService = function (_a) {
|
|
26679
26725
|
var title = _a.title, _b = _a.hasTopSpacing, hasTopSpacing = _b === void 0 ? false : _b, _c = _a.alertType, alertType = _c === void 0 ? 'alert' : _c, children = _a.children;
|
|
26680
|
-
return (React__namespace.default.createElement(Container
|
|
26726
|
+
return (React__namespace.default.createElement(Container$$, { "$alertType": alertType, "data-testid": "AlertBannerService", "$hasTopSpacing": hasTopSpacing },
|
|
26681
26727
|
React__namespace.default.createElement(InnerContainer$1, { "data-testid": "AlertBannerServiceInner" },
|
|
26682
26728
|
(title === null || title === void 0 ? void 0 : title.trim()) && React__namespace.default.createElement(Heading$1, { text: title }),
|
|
26683
26729
|
children)));
|
|
26684
26730
|
};
|
|
26685
26731
|
|
|
26686
|
-
const Container$
|
|
26732
|
+
const Container$_ = styled__default.default.a`
|
|
26687
26733
|
display: inline-block;
|
|
26688
26734
|
position: relative;
|
|
26689
26735
|
padding-top: 15px;
|
|
@@ -26742,10 +26788,10 @@ const Container$Z = styled__default.default.a`
|
|
|
26742
26788
|
*/
|
|
26743
26789
|
var BackLink = function (_a) {
|
|
26744
26790
|
var link = _a.link, _b = _a.useHistory, useHistory = _b === void 0 ? false : _b;
|
|
26745
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, useHistory ? (React__namespace.default.createElement(Container$
|
|
26791
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, useHistory ? (React__namespace.default.createElement(Container$_, { onClick: function () { return history.back(); }, "data-testid": "BackLink", as: "button" }, "Back")) : (React__namespace.default.createElement(Container$_, { href: link, "data-testid": "BackLink" }, "Back"))));
|
|
26746
26792
|
};
|
|
26747
26793
|
|
|
26748
|
-
const Container$
|
|
26794
|
+
const Container$Z = styled__default.default.div`
|
|
26749
26795
|
padding-top: 15px;
|
|
26750
26796
|
border-bottom: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
26751
26797
|
margin-bottom: ${(props) => (props.$hasMargin ? props.theme.theme_vars.spacingSizes.large : 0)};
|
|
@@ -26813,14 +26859,14 @@ const BreadcrumbLink$1 = styled__default.default.a`
|
|
|
26813
26859
|
|
|
26814
26860
|
var Breadcrumbs = function (_a) {
|
|
26815
26861
|
var breadcrumbsArray = _a.breadcrumbsArray, _b = _a.hasMargin, hasMargin = _b === void 0 ? false : _b;
|
|
26816
|
-
return (React__namespace.default.createElement(Container$
|
|
26862
|
+
return (React__namespace.default.createElement(Container$Z, { "$hasMargin": hasMargin, "data-testid": "Breadcrumbs" },
|
|
26817
26863
|
React__namespace.default.createElement(List$2, { as: breadcrumbsArray.length === 1 ? 'div' : 'ol' }, breadcrumbsArray.map(function (crumb) { return (React__namespace.default.createElement(Crumb, { key: crumb.title, as: breadcrumbsArray.length === 1 ? 'span' : 'li' }, React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
26818
26864
|
React__namespace.default.createElement(BreadcrumbLink$1, { href: crumb.url, title: crumb.title }, crumb.title),
|
|
26819
26865
|
React__namespace.default.createElement(IconWrapper$4, null,
|
|
26820
26866
|
React__namespace.default.createElement(ChevronIcon, { direction: 'right', colourFill: "#C6C6C6" }))))); }))));
|
|
26821
26867
|
};
|
|
26822
26868
|
|
|
26823
|
-
const Container$
|
|
26869
|
+
const Container$Y = styled__default.default.div`
|
|
26824
26870
|
display: block;
|
|
26825
26871
|
|
|
26826
26872
|
a {
|
|
@@ -27249,7 +27295,7 @@ var CludoSearch = function (_a) {
|
|
|
27249
27295
|
];
|
|
27250
27296
|
var Facets = function () { return (React__namespace.default.createElement(ssr.FacetGroup, null,
|
|
27251
27297
|
React__namespace.default.createElement(ssr.StandardFacet, { field: "Category", label: "Show results from", hideClear: true, hideCount: false, hideSearchBar: true, hideShowMore: true, className: "wnc-cludo-facet-list", exclude: ['Documents'], order: filterOrder, includeAllResultsOption: true, allResultsOptionLabel: "All services" }))); };
|
|
27252
|
-
return (React__namespace.default.createElement(Container$
|
|
27298
|
+
return (React__namespace.default.createElement(Container$Y, { "data-testid": "CludoSearch" },
|
|
27253
27299
|
React__namespace.default.createElement(ssr.CludoWrapper, { config: cludoSearchConfig },
|
|
27254
27300
|
React__namespace.default.createElement(CludoAutoComplete, null),
|
|
27255
27301
|
React__namespace.default.createElement(ssr.ResultCount, null),
|
|
@@ -27275,7 +27321,7 @@ var CludoSearch = function (_a) {
|
|
|
27275
27321
|
React__namespace.default.createElement(Facets, null)))))));
|
|
27276
27322
|
};
|
|
27277
27323
|
|
|
27278
|
-
const Container$
|
|
27324
|
+
const Container$X = styled__default.default.div`
|
|
27279
27325
|
display: block;
|
|
27280
27326
|
|
|
27281
27327
|
.consultation-list__results {
|
|
@@ -27375,7 +27421,7 @@ const ClearFilters$1 = styled__default.default.button`
|
|
|
27375
27421
|
}
|
|
27376
27422
|
`;
|
|
27377
27423
|
|
|
27378
|
-
const Container$
|
|
27424
|
+
const Container$W = styled__default.default.a`
|
|
27379
27425
|
display: flex;
|
|
27380
27426
|
flex-direction: row;
|
|
27381
27427
|
flex-wrap: wrap;
|
|
@@ -27520,7 +27566,7 @@ var ConsultationLink = function (_a) {
|
|
|
27520
27566
|
detail: new Date(closeDate).toLocaleDateString(),
|
|
27521
27567
|
},
|
|
27522
27568
|
];
|
|
27523
|
-
return (React__namespace.default.createElement(Container$
|
|
27569
|
+
return (React__namespace.default.createElement(Container$W, { "data-testid": "ConsultationLink", href: url },
|
|
27524
27570
|
React__namespace.default.createElement(Row$1, null,
|
|
27525
27571
|
React__namespace.default.createElement(Column, { small: "full", medium: imageLarge ? 'two-thirds' : 'full', large: imageLarge ? 'two-thirds' : 'full', hasPadding: false },
|
|
27526
27572
|
React__namespace.default.createElement(ConsultationContent, { "$hasPadding": hasPadding },
|
|
@@ -27566,7 +27612,7 @@ var ConsultationList = function (_a) {
|
|
|
27566
27612
|
event.preventDefault();
|
|
27567
27613
|
onSubmit();
|
|
27568
27614
|
};
|
|
27569
|
-
return (React__namespace.default.createElement(Container$
|
|
27615
|
+
return (React__namespace.default.createElement(Container$X, { "data-testid": "ConsultationList" },
|
|
27570
27616
|
React__namespace.default.createElement(Row$1, null,
|
|
27571
27617
|
React__namespace.default.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
27572
27618
|
React__namespace.default.createElement(ToggleFilters$1, { onClick: function () { return setShowFilters(!showFilters); } },
|
|
@@ -27608,7 +27654,7 @@ var ConsultationList = function (_a) {
|
|
|
27608
27654
|
React__namespace.default.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, postTo: consultationsPagePath, resultsPerPage: 5 }))) : (React__namespace.default.createElement("p", null, "No results found"))))));
|
|
27609
27655
|
};
|
|
27610
27656
|
|
|
27611
|
-
const Container$
|
|
27657
|
+
const Container$V = styled__default.default.div`
|
|
27612
27658
|
display: block;
|
|
27613
27659
|
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
27614
27660
|
padding-bottom: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
@@ -27658,12 +27704,12 @@ const CurrentPage = styled__default.default.span`
|
|
|
27658
27704
|
|
|
27659
27705
|
var Contents$1 = function (_a) {
|
|
27660
27706
|
var contents = _a.contents, _b = _a.currentPath, currentPath = _b === void 0 ? undefined : _b, _c = _a.title, title = _c === void 0 ? 'Contents' : _c;
|
|
27661
|
-
return (React__namespace.default.createElement(Container$
|
|
27707
|
+
return (React__namespace.default.createElement(Container$V, { "data-testid": "Contents" },
|
|
27662
27708
|
React__namespace.default.createElement(Heading$1, { text: title, level: 2 }),
|
|
27663
27709
|
React__namespace.default.createElement(List$1, null, contents.map(function (content, index) { return (React__namespace.default.createElement(ListItem$1, { key: index }, content.url === currentPath ? (React__namespace.default.createElement(CurrentPage, null, content.title)) : (React__namespace.default.createElement(Link$2, { href: content.url, "$active": content.url === currentPath }, content.title)))); }))));
|
|
27664
27710
|
};
|
|
27665
27711
|
|
|
27666
|
-
const Container$
|
|
27712
|
+
const Container$U = styled__default.default.div`
|
|
27667
27713
|
display: block;
|
|
27668
27714
|
border-top: 1px solid ${(props) => props.theme.theme_vars.colours.grey}80;
|
|
27669
27715
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
@@ -27713,7 +27759,7 @@ var ContentsNavigation = function (_a) {
|
|
|
27713
27759
|
};
|
|
27714
27760
|
var nextPage = currentPage() < contents.length - 1 ? contents[currentPage() + 1] : undefined;
|
|
27715
27761
|
var previousPage = currentPage() !== 0 ? contents[currentPage() - 1] : undefined;
|
|
27716
|
-
return (React__namespace.default.createElement(Container$
|
|
27762
|
+
return (React__namespace.default.createElement(Container$U, { "data-testid": "ContentsNavigation" },
|
|
27717
27763
|
previousPage && (React__namespace.default.createElement(NavigationLink, { href: previousPage.url },
|
|
27718
27764
|
React__namespace.default.createElement(Arrow, null, "\u2190"),
|
|
27719
27765
|
React__namespace.default.createElement(LinkText, null,
|
|
@@ -27788,7 +27834,7 @@ var DisplayDate = function (_a) {
|
|
|
27788
27834
|
postText));
|
|
27789
27835
|
};
|
|
27790
27836
|
|
|
27791
|
-
const Container$
|
|
27837
|
+
const Container$T = styled__default.default.div`
|
|
27792
27838
|
display: block;
|
|
27793
27839
|
|
|
27794
27840
|
.event-list__results {
|
|
@@ -28068,7 +28114,7 @@ var EventList = function (_a) {
|
|
|
28068
28114
|
event.preventDefault();
|
|
28069
28115
|
onSubmit();
|
|
28070
28116
|
};
|
|
28071
|
-
return (React__namespace.default.createElement(Container$
|
|
28117
|
+
return (React__namespace.default.createElement(Container$T, { "data-testid": "EventList" },
|
|
28072
28118
|
React__namespace.default.createElement(Row$1, null,
|
|
28073
28119
|
React__namespace.default.createElement(Column, { small: "full", medium: "one-third", large: "one-third" },
|
|
28074
28120
|
React__namespace.default.createElement(ToggleFilters, { onClick: function () { return setShowFilters(!showFilters); } },
|
|
@@ -28117,7 +28163,7 @@ var EventList = function (_a) {
|
|
|
28117
28163
|
React__namespace.default.createElement(Pagination, { currentPage: pageNumber, totalResults: totalResults, postTo: eventsPagePath, resultsPerPage: 5 }))) : (React__namespace.default.createElement(ResultInfo$4, null, "No results found"))))));
|
|
28118
28164
|
};
|
|
28119
28165
|
|
|
28120
|
-
const Container$
|
|
28166
|
+
const Container$S = styled__default.default.footer`
|
|
28121
28167
|
background-color: ${(props) => props.theme.theme_vars.colours.black};
|
|
28122
28168
|
padding: 25px 0;
|
|
28123
28169
|
`;
|
|
@@ -28299,7 +28345,7 @@ var ServiceIcon = function (_a) {
|
|
|
28299
28345
|
React__namespace.default.createElement("path", { d: "M15.0107 13.6688L22.6607 18.0161L15.0107 22.3634V13.6688ZM36 3.85714V32.1429C36 34.2723 34.2723 36 32.1429 36H3.85714C1.72768 36 0 34.2723 0 32.1429V3.85714C0 1.72768 1.72768 0 3.85714 0H32.1429C34.2723 0 36 1.72768 36 3.85714ZM32.625 18.0241C32.625 18.0241 32.625 13.2348 32.0143 10.9366C31.6768 9.66696 30.6884 8.67054 29.4268 8.33304C27.1527 7.71429 18 7.71429 18 7.71429C18 7.71429 8.84732 7.71429 6.57321 8.33304C5.31161 8.67054 4.32321 9.66696 3.98571 10.9366C3.375 13.2268 3.375 18.0241 3.375 18.0241C3.375 18.0241 3.375 22.8134 3.98571 25.1116C4.32321 26.3813 5.31161 27.3375 6.57321 27.675C8.84732 28.2857 18 28.2857 18 28.2857C18 28.2857 27.1527 28.2857 29.4268 27.667C30.6884 27.3295 31.6768 26.3732 32.0143 25.1036C32.625 22.8134 32.625 18.0241 32.625 18.0241Z", fill: colourFill })));
|
|
28300
28346
|
};
|
|
28301
28347
|
|
|
28302
|
-
const Container$
|
|
28348
|
+
const Container$R = styled__default.default.div`
|
|
28303
28349
|
display: block;
|
|
28304
28350
|
|
|
28305
28351
|
.goog-te-combo {
|
|
@@ -28374,7 +28420,7 @@ var GoogleTranslate = function (_a) {
|
|
|
28374
28420
|
document.body.appendChild(addScript);
|
|
28375
28421
|
window.googleTranslateElementInit = googleTranslateElementInit;
|
|
28376
28422
|
}, []);
|
|
28377
|
-
return (React__namespace.default.createElement(Container$
|
|
28423
|
+
return (React__namespace.default.createElement(Container$R, { "data-testid": "GoogleTranslate", "$hasDarkBackground": hasDarkBackground },
|
|
28378
28424
|
label && React__namespace.default.createElement(Label$7, { "$hasDarkBackground": hasDarkBackground }, label),
|
|
28379
28425
|
React__namespace.default.createElement("div", { id: "google_translate_element" })));
|
|
28380
28426
|
};
|
|
@@ -28382,7 +28428,7 @@ var GoogleTranslate = function (_a) {
|
|
|
28382
28428
|
var Footer = function (_a) {
|
|
28383
28429
|
var _b = _a.footerLinksArray, footerLinksArray = _b === void 0 ? null : _b, _c = _a.year, year = _c === void 0 ? new Date().getFullYear() : _c, _d = _a.hasTranslate, hasTranslate = _d === void 0 ? false : _d;
|
|
28384
28430
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
28385
|
-
return (React__namespace.default.createElement(Container$
|
|
28431
|
+
return (React__namespace.default.createElement(Container$S, { "data-testid": "Footer" },
|
|
28386
28432
|
React__namespace.default.createElement(StyledMaxWidthContainer$2, { noBackground: true },
|
|
28387
28433
|
React__namespace.default.createElement(FooterAlignment, null,
|
|
28388
28434
|
React__namespace.default.createElement("div", null,
|
|
@@ -28417,7 +28463,7 @@ var Footer = function (_a) {
|
|
|
28417
28463
|
: '' }, themeContext.cardinal_name === 'north' ? (React__namespace.default.createElement(NorthWhiteLogo, null)) : themeContext.cardinal_name === 'west' ? (React__namespace.default.createElement(WestWhiteLogo, null)) : (React__namespace.default.createElement(GDSLogo, null))))))));
|
|
28418
28464
|
};
|
|
28419
28465
|
|
|
28420
|
-
const Container$
|
|
28466
|
+
const Container$Q = styled__default.default.div`
|
|
28421
28467
|
background: ${(props) => (props.$hasBackground ? props.theme.theme_vars.colours.grey_light : 'transparent')};
|
|
28422
28468
|
padding: ${(props) => (props.$hasPadding ? '50px 0 20px' : '0')};
|
|
28423
28469
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
@@ -28428,7 +28474,7 @@ const Container$P = styled__default.default.div`
|
|
|
28428
28474
|
*/
|
|
28429
28475
|
var FullWidthContainer = function (_a) {
|
|
28430
28476
|
var children = _a.children, _b = _a.hasBackground, hasBackground = _b === void 0 ? false : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? false : _c;
|
|
28431
|
-
return (React__namespace.default.createElement(Container$
|
|
28477
|
+
return (React__namespace.default.createElement(Container$Q, { "$hasBackground": hasBackground, "$hasPadding": hasPadding, "data-testid": "FullWidthContainer" }, children));
|
|
28432
28478
|
};
|
|
28433
28479
|
|
|
28434
28480
|
/**
|
|
@@ -28460,7 +28506,7 @@ const headerThemeStyles = (props) => {
|
|
|
28460
28506
|
}
|
|
28461
28507
|
};
|
|
28462
28508
|
|
|
28463
|
-
const Container$
|
|
28509
|
+
const Container$P = styled__default.default.header`
|
|
28464
28510
|
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
28465
28511
|
position: relative;
|
|
28466
28512
|
z-index: 20;
|
|
@@ -28768,7 +28814,7 @@ var NorthColouredLogo = function () {
|
|
|
28768
28814
|
React__namespace.default.createElement("path", { fill: "#fff", d: "M0 0H974V327H0z" })))));
|
|
28769
28815
|
};
|
|
28770
28816
|
|
|
28771
|
-
const Container$
|
|
28817
|
+
const Container$O = styled__default.default.div`
|
|
28772
28818
|
${(props) => props.theme.fontStyles}
|
|
28773
28819
|
width: calc(100% - ${(props) => (props.$isLarge ? '5rem' : '3rem')});
|
|
28774
28820
|
`;
|
|
@@ -28916,7 +28962,7 @@ var Searchbar = function (_a) {
|
|
|
28916
28962
|
/**
|
|
28917
28963
|
* Render the component
|
|
28918
28964
|
*/
|
|
28919
|
-
return (React__namespace.default.createElement(Container$
|
|
28965
|
+
return (React__namespace.default.createElement(Container$O, { "data-testid": "Searchbar", "$isLarge": isLarge },
|
|
28920
28966
|
React__namespace.default.createElement("form", { onSubmit: handleSubmit },
|
|
28921
28967
|
React__namespace.default.createElement("div", { role: "search" },
|
|
28922
28968
|
React__namespace.default.createElement(InputWrapper$1, null,
|
|
@@ -28973,7 +29019,7 @@ var NorthBlackLogo = function () {
|
|
|
28973
29019
|
React__namespace.default.createElement("path", { fill: "#000", d: "M342.215 236.608c-114.072-17.17-228.119 17.17-342.191 0v-37.339c114.072 17.17 228.119-17.17 342.191 0v37.339zM411.838 122.367l-21.063-36.59v36.59h-9.335v-50.35h10.64l20.846 36.662V72.018h9.335v50.349h-10.423zM449.999 123.262c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.169 8.779 20.169 20.024 0 10.616-9.117 19.492-20.097 19.492zm0-31.22c-5.924 0-10.906 5.102-10.906 11.317 0 6.481 4.837 11.584 10.979 11.584 5.997 0 10.907-5.103 10.907-11.439 0-6.288-4.91-11.463-10.98-11.463zM484.968 101.376v20.991h-9.069v-37.75h8.319v3.676c2.395-3.483 4.305-4.57 8.174-4.57h.677v8.73c-5.465.144-8.101 3.07-8.101 8.923zM509.829 92.863v29.504h-9.069V92.863h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM545.595 122.367v-19.274c0-7.908-2.055-11.052-7.352-11.052-5.175 0-7.98 2.854-7.98 11.173v19.153h-9.069v-50.35h9.069v15.188c2.733-2.443 5.731-3.555 9.601-3.555 9.068 0 14.8 4.981 14.8 17.387v21.33h-9.069zM411.838 195.376l-21.063-36.59v36.59h-9.335v-50.35h10.64l20.846 36.662v-36.662h9.335v50.35h-10.423zM449.999 196.271c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.169 8.779 20.169 20.024 0 10.641-9.117 19.492-20.097 19.492zm0-31.221c-5.924 0-10.906 5.103-10.906 11.318 0 6.481 4.837 11.584 10.979 11.584 5.997 0 10.907-5.103 10.907-11.439 0-6.288-4.91-11.463-10.98-11.463zM484.968 174.385v20.991h-9.069v-37.75h8.319v3.676c2.395-3.483 4.305-4.571 8.174-4.571h.677v8.73c-5.465.145-8.101 3.071-8.101 8.924zM509.829 165.872v29.504h-9.069v-29.504h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM545.595 195.376v-19.274c0-7.908-2.055-11.052-7.352-11.052-5.175 0-7.98 2.853-7.98 11.172v19.154h-9.069v-50.35h9.069v15.187c2.733-2.442 5.731-3.555 9.601-3.555 9.068 0 14.8 4.982 14.8 17.388v21.33h-9.069zM592.705 195.376v-4.909c-3.604 4.086-7.231 5.803-12.527 5.803-11.052 0-19.008-8.246-19.008-19.636 0-11.511 8.029-19.903 19.226-19.903 5.441 0 9.189 1.765 12.333 5.925v-5.054h8.319v37.75h-8.343v.024zm-11.391-30.326c-6.481 0-11.051 4.909-11.051 11.777 0 6.602 4.57 11.1 11.172 11.1 6.893 0 10.98-4.909 10.98-11.172 0-6.868-4.619-11.705-11.101-11.705zM655.992 195.376v-20.725c0-7.57-2.854-9.601-7.086-9.601-5.03 0-7.641 2.733-7.641 11.729v18.597h-9.069v-20.725c0-7.424-2.588-9.601-7.352-9.601-5.248 0-7.352 2.805-7.352 11.729v18.597h-9.068v-37.75h8.319v3.531c2.66-3.193 5.393-4.426 9.818-4.426 5.175 0 8.513 1.765 11.1 5.852 3.072-4.087 6.82-5.852 12.14-5.852 9.939 0 15.26 5.514 15.26 16.832v21.813h-9.069zM694.516 196.27c-4.643 0-8.174-1.354-11.584-4.425v16.154h-9.069v-50.373h8.319v4.425c2.926-3.409 7.304-5.32 12.406-5.32 10.907 0 18.815 8.247 18.815 19.637-.024 11.463-8.005 19.902-18.887 19.902zm-1.113-31.22c-6.263 0-11.051 4.909-11.051 11.39 0 6.602 4.764 11.511 11.172 11.511 5.998 0 10.689-4.981 10.689-11.39.049-6.529-4.667-11.511-10.81-11.511zM729.944 165.872v29.504h-9.069v-29.504h-4.425v-8.246h4.425v-12.6h9.069v12.6h5.441v8.246h-5.441zM758.359 196.271c-11.051 0-20.047-8.851-20.047-19.758 0-10.834 8.996-19.758 19.975-19.758 11.39 0 20.168 8.779 20.168 20.024 0 10.641-9.117 19.492-20.096 19.492zm0-31.221c-5.925 0-10.906 5.103-10.906 11.318 0 6.481 4.836 11.584 10.979 11.584 5.997 0 10.906-5.103 10.906-11.439 0-6.288-4.909-11.463-10.979-11.463zM808.708 195.376V176.9c0-10.085-2.733-11.85-7.231-11.85-2.854 0-5.248 1.233-6.675 3.482-1.16 1.838-1.499 4.015-1.499 9.069v17.775h-9.069v-37.75h8.392v3.603c3.337-3.192 6.336-4.498 10.64-4.498 5.248 0 9.335 1.911 11.778 5.441 2.055 2.926 2.732 6.191 2.732 12.938v20.242h-9.068v.024zM837.268 196.271c-7.497 0-12.89-4.087-13.833-12.89h9.141c.895 3.192 2.394 4.571 5.055 4.571 2.321 0 4.086-1.572 4.086-3.676 0-2.177-.338-2.805-6.408-4.837-7.497-2.515-10.495-5.659-10.495-11.172 0-6.482 5.513-11.512 12.551-11.512 6.408 0 12.067 4.232 12.406 11.318h-8.852c-.411-1.983-1.644-2.999-3.554-2.999-1.983 0-3.483 1.355-3.483 3.193 0 1.983.194 2.103 6.409 4.086 7.908 2.443 10.495 5.442 10.495 11.052-.024 7.207-5.949 12.866-13.518 12.866zM880.894 195.376v-19.274c0-7.908-2.056-11.052-7.352-11.052-5.175 0-7.98 2.853-7.98 11.172v19.154h-9.069v-50.35h9.069v15.187c2.733-2.442 5.731-3.555 9.601-3.555 9.068 0 14.8 4.982 14.8 17.388v21.33h-9.069zM898.065 195.376v-37.75h9.069v37.75h-9.069zm.049-43.191v-9.069h9.068v9.069h-9.068zM924.159 174.385v20.991h-9.069v-37.75h8.319v3.676c2.394-3.483 4.305-4.571 8.174-4.571h.677v8.73c-5.441.145-8.101 3.071-8.101 8.924zM973.637 180.527H944.4c1.088 4.571 5.054 7.424 10.423 7.424 3.748 0 5.997-1.015 8.319-3.748h9.89c-2.515 7.763-10.35 12.067-17.992 12.067-11.511 0-20.435-8.585-20.435-19.636 0-11.1 8.803-19.903 19.903-19.903 11.245 0 19.492 8.585 19.492 20.314-.024 1.378-.097 2.176-.363 3.482zm-19.032-15.477c-5.393 0-9.069 2.66-10.496 7.497h20.919c-1.137-4.837-4.813-7.497-10.423-7.497zM405.358 269.279c-14.728 0-26.505-11.729-26.505-26.238 0-14.244 11.656-25.9 25.9-25.9 10.351 0 19.419 5.586 23.845 15.332h-10.423c-3.41-4.426-7.352-6.336-13.228-6.336-9.601 0-16.687 7.496-16.687 16.976 0 9.407 7.642 17.17 16.904 17.17 4.837 0 8.392-1.644 12.479-5.925h10.979c-3.966 9.19-12.962 14.921-23.264 14.921zM452.732 269.279c-11.052 0-20.048-8.851-20.048-19.757 0-10.834 8.996-19.758 19.975-19.758 11.391 0 20.169 8.779 20.169 20.048 0 10.616-9.141 19.467-20.096 19.467zm0-31.196c-5.925 0-10.907 5.103-10.907 11.318 0 6.481 4.837 11.584 10.979 11.584 5.998 0 10.907-5.103 10.907-11.439-.024-6.288-4.933-11.463-10.979-11.463zM503.831 268.409v-3.603c-3.409 3.337-6.263 4.498-10.834 4.498-8.802 0-14.389-5.103-14.389-18.404v-20.241h9.069v18.476c0 10.012 2.781 11.85 7.158 11.85 3.072 0 5.514-1.306 6.892-3.483 1.016-1.693 1.427-4.014 1.427-9.068v-17.775h9.069v37.75h-8.392zM544.653 268.409v-18.476c0-10.085-2.733-11.85-7.231-11.85-2.854 0-5.248 1.233-6.675 3.482-1.161 1.838-1.499 4.015-1.499 9.069v17.775h-9.069v-37.774h8.392v3.603c3.337-3.192 6.336-4.498 10.64-4.498 5.248 0 9.335 1.91 11.778 5.441 2.055 2.926 2.732 6.191 2.732 12.938v20.241h-9.068v.049zM580.299 269.279c-11.173 0-20.169-8.802-20.169-19.757 0-11.1 8.73-19.758 19.903-19.758 8.585 0 16.081 4.837 19.008 13.494h-10.23c-1.838-3.482-4.691-5.175-8.803-5.175-6.263 0-10.761 4.764-10.761 11.39 0 6.602 4.691 11.512 10.979 11.512 3.748 0 6.336-1.5 8.585-4.982h10.23c-3.144 8.44-9.964 13.276-18.742 13.276zM606.054 268.409v-37.774h9.068v37.749h-9.068v.025zm.072-43.216v-9.068h9.069v9.068h-9.069zM623.079 268.409v-50.374h9.068v50.35h-9.068v.024z" })));
|
|
28974
29020
|
};
|
|
28975
29021
|
|
|
28976
|
-
const Container$
|
|
29022
|
+
const Container$N = styled__default.default.div`
|
|
28977
29023
|
display: block;
|
|
28978
29024
|
min-height: 46px;
|
|
28979
29025
|
|
|
@@ -29034,7 +29080,7 @@ var CludoSearchBar = function (_a) {
|
|
|
29034
29080
|
autocomplete: CludoAutoComplete,
|
|
29035
29081
|
},
|
|
29036
29082
|
};
|
|
29037
|
-
return (React__namespace.default.createElement(Container$
|
|
29083
|
+
return (React__namespace.default.createElement(Container$N, { "data-testid": "CludoSearchBar" },
|
|
29038
29084
|
React__namespace.default.createElement(ssr.CludoWrapper, { config: cludoSearchConfig },
|
|
29039
29085
|
React__namespace.default.createElement(CludoAutoComplete, { hasMargin: false }))));
|
|
29040
29086
|
};
|
|
@@ -29093,7 +29139,7 @@ var Header = function (_a) {
|
|
|
29093
29139
|
var show = showTranslate;
|
|
29094
29140
|
setShowTranslate(!show);
|
|
29095
29141
|
};
|
|
29096
|
-
return (React__namespace.default.createElement(Container$
|
|
29142
|
+
return (React__namespace.default.createElement(Container$P, { "$isHomepage": isHomepage, "data-testid": "Header" },
|
|
29097
29143
|
!hideSearchBar && (React__namespace.default.createElement(SearchContainer, null,
|
|
29098
29144
|
React__namespace.default.createElement(MaxWidthContainer, { noPadding: true, noBackground: true, overflowVisible: true },
|
|
29099
29145
|
React__namespace.default.createElement(SearchWrapper, null,
|
|
@@ -29138,7 +29184,7 @@ var Header = function (_a) {
|
|
|
29138
29184
|
* Hero image container with optional dark gradient for non-box mode
|
|
29139
29185
|
* Optimised for an image in 16:5 ratio on all but small width screens
|
|
29140
29186
|
*/
|
|
29141
|
-
const Container$
|
|
29187
|
+
const Container$M = styled__default.default.div`
|
|
29142
29188
|
padding-bottom: 10px;
|
|
29143
29189
|
display: flex;
|
|
29144
29190
|
justify-content: center;
|
|
@@ -29160,6 +29206,11 @@ const Container$L = styled__default.default.div`
|
|
|
29160
29206
|
padding-top: 31.25%;
|
|
29161
29207
|
}
|
|
29162
29208
|
}
|
|
29209
|
+
|
|
29210
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.l}) {
|
|
29211
|
+
max-width: 1680px;
|
|
29212
|
+
margin: 0 auto;
|
|
29213
|
+
}
|
|
29163
29214
|
`;
|
|
29164
29215
|
|
|
29165
29216
|
const ImageContainer$4 = styled__default.default.div`
|
|
@@ -29318,7 +29369,7 @@ const Search = styled__default.default.div`
|
|
|
29318
29369
|
margin: ${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
29319
29370
|
`;
|
|
29320
29371
|
|
|
29321
|
-
const Container$
|
|
29372
|
+
const Container$L = styled__default.default.div`
|
|
29322
29373
|
display: block;
|
|
29323
29374
|
|
|
29324
29375
|
input[type='text'] {
|
|
@@ -29396,7 +29447,7 @@ var CustomSearch = function (_a) {
|
|
|
29396
29447
|
if (!id) {
|
|
29397
29448
|
id = React.useId();
|
|
29398
29449
|
}
|
|
29399
|
-
return (React__namespace.default.createElement(Container$
|
|
29450
|
+
return (React__namespace.default.createElement(Container$L, { "data-testid": "CustomSearch" },
|
|
29400
29451
|
React__namespace.default.createElement("form", { method: method, action: path, "aria-label": label },
|
|
29401
29452
|
React__namespace.default.createElement("div", { role: "search" },
|
|
29402
29453
|
React__namespace.default.createElement(Label$6, { htmlFor: id, "$hasHiddenLabel": hasHiddenLabel }, label),
|
|
@@ -29411,7 +29462,7 @@ var CustomSearch = function (_a) {
|
|
|
29411
29462
|
*/
|
|
29412
29463
|
var HeroImage = function (_a) {
|
|
29413
29464
|
var headline = _a.headline, content = _a.content, callToActionText = _a.callToActionText, callToActionURL = _a.callToActionURL, _b = _a.callToActionIsPrimary, callToActionIsPrimary = _b === void 0 ? true : _b, _c = _a.backgroundBox, backgroundBox = _c === void 0 ? true : _c, imageLarge = _a.imageLarge, imageSmall = _a.imageSmall, imageAltText = _a.imageAltText, breadcrumb = _a.breadcrumb, customSearch = _a.customSearch;
|
|
29414
|
-
return (React__namespace.default.createElement(Container$
|
|
29465
|
+
return (React__namespace.default.createElement(Container$M, { "data-testid": "HeroImage" },
|
|
29415
29466
|
React__namespace.default.createElement(ImageContainer$4, { "$backgroundBox": backgroundBox },
|
|
29416
29467
|
React__namespace.default.createElement(ResponsiveImage, { imageSmall: imageSmall, imageLarge: imageLarge, imageAltText: imageAltText, smallWidth: "144", largeWidth: "1440", ratio: "auto", objectFit: "cover" })),
|
|
29417
29468
|
React__namespace.default.createElement(InnerContainer, null,
|
|
@@ -29440,7 +29491,7 @@ const Wrapper$4 = styled__default.default.header`
|
|
|
29440
29491
|
position: relative;
|
|
29441
29492
|
`;
|
|
29442
29493
|
|
|
29443
|
-
const Container$
|
|
29494
|
+
const Container$K = styled__default.default.div`
|
|
29444
29495
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
29445
29496
|
overflow: hidden;
|
|
29446
29497
|
background: ${(props) => props.theme.theme_vars.colours.action}5A;
|
|
@@ -29536,7 +29587,7 @@ const PromotedServicesTabContainer = styled__default.default.div`
|
|
|
29536
29587
|
width: 100%;
|
|
29537
29588
|
`;
|
|
29538
29589
|
|
|
29539
|
-
const Container$
|
|
29590
|
+
const Container$J = styled__default.default.div`
|
|
29540
29591
|
display: none;
|
|
29541
29592
|
|
|
29542
29593
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
@@ -29688,7 +29739,7 @@ var PromotedServicesTabs = function (_a) {
|
|
|
29688
29739
|
var toggleTab = function (index) {
|
|
29689
29740
|
setActiveTab(index);
|
|
29690
29741
|
};
|
|
29691
|
-
return (React__namespace.default.createElement(Container$
|
|
29742
|
+
return (React__namespace.default.createElement(Container$J, { "data-testid": "PromotedServicesTabs", role: "tablist" },
|
|
29692
29743
|
React__namespace.default.createElement(Row$1, null, tabs.map(function (tab, index) { return (React__namespace.default.createElement(Column, { key: index, small: "full", medium: "one-quarter", large: "one-quarter", classes: "promoted-services-tab-column" },
|
|
29693
29744
|
React__namespace.default.createElement(Tab, { "$isActive": index === activeTab, onClick: function () { return toggleTab(index); }, "aria-label": index === activeTab ? "Hide ".concat(tab.title) : "Show ".concat(tab.title), "aria-selected": index === activeTab ? 'true' : 'false', "aria-controls": "promoted-services-tabpanel-".concat(index), id: "promoted-services-tab-".concat(index), role: "tab" }, tab.title))); }))));
|
|
29694
29745
|
};
|
|
@@ -29735,7 +29786,7 @@ var HomeHero = function (_a) {
|
|
|
29735
29786
|
}, []);
|
|
29736
29787
|
return (React__namespace.default.createElement(Outer, { "data-testid": "HomeHero" },
|
|
29737
29788
|
React__namespace.default.createElement(Wrapper$4, { as: showSearch ? 'header' : 'div' },
|
|
29738
|
-
React__namespace.default.createElement(Container$
|
|
29789
|
+
React__namespace.default.createElement(Container$K, { className: random !== 999 ? 'loaded' : 'loading', "$showSearch": showSearch },
|
|
29739
29790
|
random !== 999 && (React__namespace.default.createElement(ResponsiveImage, { imageSmall: (_b = imagesArray[random].image144x81) !== null && _b !== void 0 ? _b : '', imageLarge: (_c = imagesArray[random].image1440x810) !== null && _c !== void 0 ? _c : '', imageAltText: (_d = imagesArray[random].imageAltText) !== null && _d !== void 0 ? _d : '', smallWidth: "144", largeWidth: "1440", ratio: "auto", objectFit: "cover" })),
|
|
29740
29791
|
React__namespace.default.createElement(StyledMaxWidthContainer$1, null,
|
|
29741
29792
|
showSearch ? (React__namespace.default.createElement(MainBox, null,
|
|
@@ -29765,7 +29816,7 @@ const Wrapper$3 = styled__default.default.section`
|
|
|
29765
29816
|
padding-bottom: 0px;
|
|
29766
29817
|
`;
|
|
29767
29818
|
|
|
29768
|
-
const Container$
|
|
29819
|
+
const Container$I = styled__default.default.div`
|
|
29769
29820
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
29770
29821
|
display: flex;
|
|
29771
29822
|
flex-wrap: wrap;
|
|
@@ -29896,7 +29947,7 @@ var MemorialHero = function (_a) {
|
|
|
29896
29947
|
React__namespace.default.createElement(HiddenH1, null,
|
|
29897
29948
|
themeContext.full_name,
|
|
29898
29949
|
" Council"),
|
|
29899
|
-
React__namespace.default.createElement(Container$
|
|
29950
|
+
React__namespace.default.createElement(Container$I, null,
|
|
29900
29951
|
React__namespace.default.createElement(Left, null,
|
|
29901
29952
|
children,
|
|
29902
29953
|
React__namespace.default.createElement(styled.ThemeProvider, { theme: theme }, councilServices)),
|
|
@@ -29925,7 +29976,7 @@ var NewsArticleDate = function (_a) {
|
|
|
29925
29976
|
const imageHeightMobile$1 = 150;
|
|
29926
29977
|
const imageHeightDesktop$1 = 200;
|
|
29927
29978
|
|
|
29928
|
-
const Container$
|
|
29979
|
+
const Container$H = styled__default.default.div`
|
|
29929
29980
|
${(props) => props.theme.fontStyles};
|
|
29930
29981
|
padding: 15px 0;
|
|
29931
29982
|
|
|
@@ -30053,7 +30104,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
30053
30104
|
if (articles && articles.length > 0) {
|
|
30054
30105
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
30055
30106
|
!withoutTitle && React__namespace.default.createElement(Heading$1, { text: "News articles and press releases" }),
|
|
30056
|
-
React__namespace.default.createElement(Container$
|
|
30107
|
+
React__namespace.default.createElement(Container$H, null,
|
|
30057
30108
|
React__namespace.default.createElement(Row$1, { isList: true }, articles.map(function (article) {
|
|
30058
30109
|
var _a;
|
|
30059
30110
|
return (React__namespace.default.createElement(Column, { isList: true, small: "full", medium: "one-half", large: "one-third", key: article.id },
|
|
@@ -30075,7 +30126,7 @@ var NewsArticleFeaturedBlock = function (_a) {
|
|
|
30075
30126
|
}
|
|
30076
30127
|
};
|
|
30077
30128
|
|
|
30078
|
-
const Container$
|
|
30129
|
+
const Container$G = styled__default.default.div`
|
|
30079
30130
|
/* margin-top: 50px; */
|
|
30080
30131
|
/* border: 1px solid red; */
|
|
30081
30132
|
|
|
@@ -30177,7 +30228,7 @@ const FilterHeading = styled__default.default.h2`
|
|
|
30177
30228
|
}
|
|
30178
30229
|
`;
|
|
30179
30230
|
|
|
30180
|
-
const Container$
|
|
30231
|
+
const Container$F = styled__default.default.a`
|
|
30181
30232
|
${props => props.theme.linkStyles}
|
|
30182
30233
|
color: ${props => props.theme.theme_vars.colours.negative} !important;
|
|
30183
30234
|
font-weight: normal;
|
|
@@ -30206,7 +30257,7 @@ var RemoveAllFilters = function (_a) {
|
|
|
30206
30257
|
e.preventDefault();
|
|
30207
30258
|
removeParams(__spreadArray(__spreadArray([], NewsArticleFilterFields.removeFiltersList, true), ['page'], false));
|
|
30208
30259
|
};
|
|
30209
|
-
return (React__namespace.default.createElement(Container$
|
|
30260
|
+
return (React__namespace.default.createElement(Container$F, { "data-testid": "RemoveAllFilters", href: "#", onClick: removeAllFilters },
|
|
30210
30261
|
"Clear ",
|
|
30211
30262
|
searchValue.length > 0 && 'search term and ',
|
|
30212
30263
|
"filters",
|
|
@@ -30263,7 +30314,7 @@ var NewsArticleFilterAccordion = function (_a) {
|
|
|
30263
30314
|
section.isExpanded = false;
|
|
30264
30315
|
}
|
|
30265
30316
|
});
|
|
30266
|
-
return (React__namespace.default.createElement(Container$
|
|
30317
|
+
return (React__namespace.default.createElement(Container$G, { "data-testid": "NewsArticleFilterAccordion" },
|
|
30267
30318
|
React__namespace.default.createElement(ShowFiltersButton, { onClick: showFullscreenFilters, "aria-expanded": !!isFullScreen, "aria-controls": "PageFilters" },
|
|
30268
30319
|
"Show Search and filters",
|
|
30269
30320
|
count > 0 && " (".concat(count, ")")),
|
|
@@ -30323,7 +30374,7 @@ var NewsArticleImage = function (_a) {
|
|
|
30323
30374
|
imageCaption && React__namespace.default.createElement(Small, { itemprop: "copyrightHolder" }, imageCaption)));
|
|
30324
30375
|
};
|
|
30325
30376
|
|
|
30326
|
-
const Container$
|
|
30377
|
+
const Container$E = styled__default.default.div`
|
|
30327
30378
|
${(props) => props.theme.fontStyles};
|
|
30328
30379
|
`;
|
|
30329
30380
|
|
|
@@ -30443,7 +30494,7 @@ var NewsArticleList = function (_a) {
|
|
|
30443
30494
|
var results = _a.results;
|
|
30444
30495
|
var extractLength = 140;
|
|
30445
30496
|
if (results && results.length > 0) {
|
|
30446
|
-
return (React__namespace.default.createElement(Container$
|
|
30497
|
+
return (React__namespace.default.createElement(Container$E, { "data-testid": "NewsArticleList" },
|
|
30447
30498
|
React__namespace.default.createElement(Row$1, { isList: true }, results.map(function (article) {
|
|
30448
30499
|
var _a;
|
|
30449
30500
|
return (React__namespace.default.createElement(Column, { isList: true, small: "full", medium: "full", large: "full", key: article.id },
|
|
@@ -30460,12 +30511,12 @@ var NewsArticleList = function (_a) {
|
|
|
30460
30511
|
}))));
|
|
30461
30512
|
}
|
|
30462
30513
|
else {
|
|
30463
|
-
return (React__namespace.default.createElement(Container$
|
|
30514
|
+
return (React__namespace.default.createElement(Container$E, { "data-testid": "NewsArticleList" },
|
|
30464
30515
|
React__namespace.default.createElement(ResultInfo$3, null, "No results found")));
|
|
30465
30516
|
}
|
|
30466
30517
|
};
|
|
30467
30518
|
|
|
30468
|
-
const Container$
|
|
30519
|
+
const Container$D = styled__default.default.div`
|
|
30469
30520
|
${props => props.theme.fontStyles};
|
|
30470
30521
|
padding-bottom: 20px;
|
|
30471
30522
|
border-bottom: 1px solid ${props => props.theme.theme_vars.colours.grey};
|
|
@@ -30539,7 +30590,7 @@ const Preposition = styled__default.default.div`
|
|
|
30539
30590
|
font-size: 80%;
|
|
30540
30591
|
`;
|
|
30541
30592
|
|
|
30542
|
-
const Container$
|
|
30593
|
+
const Container$C = styled__default.default.span`
|
|
30543
30594
|
margin: 0 5px;
|
|
30544
30595
|
display: inline-block;
|
|
30545
30596
|
position: relative;
|
|
@@ -30600,7 +30651,7 @@ var RemovableTag = function (_a) {
|
|
|
30600
30651
|
var index = _a.index, preposition = _a.preposition, label = _a.label; _a.value; _a.param; var clickHandler = _a.clickHandler;
|
|
30601
30652
|
return (React__namespace.default.createElement(Wrapper$2, { "data-testid": "RemovableTag" },
|
|
30602
30653
|
index > 0 && preposition && React__namespace.default.createElement(Preposition, null, preposition),
|
|
30603
|
-
React__namespace.default.createElement(Container$
|
|
30654
|
+
React__namespace.default.createElement(Container$C, null,
|
|
30604
30655
|
React__namespace.default.createElement(Text, null, label),
|
|
30605
30656
|
React__namespace.default.createElement(Button$3, { "aria-label": "Remove filter ".concat(label), onClick: clickHandler }, "x"))));
|
|
30606
30657
|
};
|
|
@@ -30620,7 +30671,7 @@ var NewsArticleListHeader = function (_a) {
|
|
|
30620
30671
|
var removeFilterValue = function (param, value) {
|
|
30621
30672
|
removeValueFromParam(param, value);
|
|
30622
30673
|
};
|
|
30623
|
-
return (React__namespace.default.createElement(Container$
|
|
30674
|
+
return (React__namespace.default.createElement(Container$D, { "data-testid": "NewsArticleListHeader" },
|
|
30624
30675
|
React__namespace.default.createElement(LeftCol, null,
|
|
30625
30676
|
totalResults,
|
|
30626
30677
|
" article",
|
|
@@ -30674,7 +30725,7 @@ var NewsArticleOldBanner = function (_a) {
|
|
|
30674
30725
|
React__namespace.default.createElement("strong", null, "1 year old")));
|
|
30675
30726
|
};
|
|
30676
30727
|
|
|
30677
|
-
const Container$
|
|
30728
|
+
const Container$B = styled__default.default.main`
|
|
30678
30729
|
padding-top: 30px;
|
|
30679
30730
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
30680
30731
|
|
|
@@ -30796,10 +30847,10 @@ const Container$A = styled__default.default.main`
|
|
|
30796
30847
|
*/
|
|
30797
30848
|
var PageMain = function (_a) {
|
|
30798
30849
|
var children = _a.children, classes = _a.classes, _b = _a.fullWidthText, fullWidthText = _b === void 0 ? false : _b, props = __rest(_a, ["children", "classes", "fullWidthText"]);
|
|
30799
|
-
return (React__namespace.default.createElement(Container$
|
|
30850
|
+
return (React__namespace.default.createElement(Container$B, __assign({ id: "main", className: classes, "$fullWidthText": fullWidthText }, props, { "data-testid": "PageMain" }), children));
|
|
30800
30851
|
};
|
|
30801
30852
|
|
|
30802
|
-
const Container$
|
|
30853
|
+
const Container$A = styled__default.default.aside`
|
|
30803
30854
|
padding-top: 30px;
|
|
30804
30855
|
`;
|
|
30805
30856
|
|
|
@@ -30808,10 +30859,10 @@ const Container$z = styled__default.default.aside`
|
|
|
30808
30859
|
*/
|
|
30809
30860
|
var PageSidebar = function (_a) {
|
|
30810
30861
|
var children = _a.children;
|
|
30811
|
-
return (React__namespace.default.createElement(Container$
|
|
30862
|
+
return (React__namespace.default.createElement(Container$A, { className: "sidebar" }, children));
|
|
30812
30863
|
};
|
|
30813
30864
|
|
|
30814
|
-
const Container$
|
|
30865
|
+
const Container$z = styled__default.default.div`
|
|
30815
30866
|
padding-top: 30px;
|
|
30816
30867
|
|
|
30817
30868
|
h1 {
|
|
@@ -30824,10 +30875,10 @@ const Container$y = styled__default.default.div`
|
|
|
30824
30875
|
*/
|
|
30825
30876
|
var PageTitle = function (_a) {
|
|
30826
30877
|
var children = _a.children, classes = _a.classes, props = __rest(_a, ["children", "classes"]);
|
|
30827
|
-
return (React__namespace.default.createElement(Container$
|
|
30878
|
+
return (React__namespace.default.createElement(Container$z, __assign({ "data-testid": "title", className: classes }, props), children));
|
|
30828
30879
|
};
|
|
30829
30880
|
|
|
30830
|
-
const Container$
|
|
30881
|
+
const Container$y = styled__default.default.div`
|
|
30831
30882
|
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.m}) {
|
|
30832
30883
|
display: flex;
|
|
30833
30884
|
flex-wrap: wrap;
|
|
@@ -30869,7 +30920,7 @@ const Container$x = styled__default.default.div`
|
|
|
30869
30920
|
*/
|
|
30870
30921
|
var PageWithSidebarContainer = function (_a) {
|
|
30871
30922
|
var _b = _a.sidebarLeft, sidebarLeft = _b === void 0 ? false : _b, children = _a.children;
|
|
30872
|
-
return React__namespace.default.createElement(Container$
|
|
30923
|
+
return React__namespace.default.createElement(Container$y, { "$sidebarLeft": sidebarLeft }, children);
|
|
30873
30924
|
};
|
|
30874
30925
|
|
|
30875
30926
|
const backgroundDecider = (props) => {
|
|
@@ -30885,7 +30936,7 @@ const backgroundDecider = (props) => {
|
|
|
30885
30936
|
}
|
|
30886
30937
|
};
|
|
30887
30938
|
|
|
30888
|
-
const Container$
|
|
30939
|
+
const Container$x = styled__default.default.div`
|
|
30889
30940
|
${backgroundDecider};
|
|
30890
30941
|
padding-top: 1.5em;
|
|
30891
30942
|
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
@@ -30893,7 +30944,7 @@ const Container$w = styled__default.default.div`
|
|
|
30893
30944
|
|
|
30894
30945
|
var PageWrapper = function (_a) {
|
|
30895
30946
|
var colour = _a.colour, children = _a.children;
|
|
30896
|
-
return (React__namespace.default.createElement(Container$
|
|
30947
|
+
return (React__namespace.default.createElement(Container$x, { "data-testid": "PageWrapper", "$colour": colour }, children));
|
|
30897
30948
|
};
|
|
30898
30949
|
|
|
30899
30950
|
const Wrapper$1 = styled__default.default.div`
|
|
@@ -31007,7 +31058,7 @@ var PhaseBanner = function (_a) {
|
|
|
31007
31058
|
React__namespace.default.createElement(PhaseContentContainer, { "$isHome": isHome }, children))));
|
|
31008
31059
|
};
|
|
31009
31060
|
|
|
31010
|
-
const Container$
|
|
31061
|
+
const Container$w = styled__default.default.div`
|
|
31011
31062
|
${(props) => props.theme.fontStyles};
|
|
31012
31063
|
overflow: hidden;
|
|
31013
31064
|
margin: 40px auto 5px auto;
|
|
@@ -31084,7 +31135,7 @@ const CTA = styled__default.default.a`
|
|
|
31084
31135
|
*/
|
|
31085
31136
|
var PromoBanner = function (_a) {
|
|
31086
31137
|
var title = _a.title, image1440x810 = _a.image1440x810, image144x81 = _a.image144x81, ctaText = _a.ctaText, ctaUrl = _a.ctaUrl, children = _a.children;
|
|
31087
|
-
return (React__namespace.default.createElement(Container$
|
|
31138
|
+
return (React__namespace.default.createElement(Container$w, null,
|
|
31088
31139
|
React__namespace.default.createElement(ImageLink, { href: ctaUrl, title: ctaText },
|
|
31089
31140
|
React__namespace.default.createElement(ResponsiveImage, { imageSmall: image144x81, imageLarge: image1440x810, imageAltText: ctaText, smallWidth: "144", largeWidth: "1440", ratio: "16by9", objectFit: "cover" })),
|
|
31090
31141
|
React__namespace.default.createElement(Wrapper, null,
|
|
@@ -31267,7 +31318,7 @@ var PromoBlock = function (_a) {
|
|
|
31267
31318
|
promos.length === 1 && React__namespace.default.createElement(Column, { small: "full", medium: "one-half", large: "one-half" }))))));
|
|
31268
31319
|
};
|
|
31269
31320
|
|
|
31270
|
-
const Container$
|
|
31321
|
+
const Container$v = styled__default.default.div`
|
|
31271
31322
|
display: block;
|
|
31272
31323
|
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
31273
31324
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -31384,7 +31435,7 @@ var PromoTabs = function (_a) {
|
|
|
31384
31435
|
var toggleTab = function (index) {
|
|
31385
31436
|
setActiveTab(index);
|
|
31386
31437
|
};
|
|
31387
|
-
return (React__namespace.default.createElement(Container$
|
|
31438
|
+
return (React__namespace.default.createElement(Container$v, { "data-testid": "PromoTabs" },
|
|
31388
31439
|
React__namespace.default.createElement(Row$1, null,
|
|
31389
31440
|
React__namespace.default.createElement(Column, { small: "full", medium: "one-third", large: "one-quarter", classes: "promo-tab-column" },
|
|
31390
31441
|
React__namespace.default.createElement("div", { role: "tablist" }, promos.map(function (promo, index) { return (React__namespace.default.createElement(TitleButton, { onClick: function () { return toggleTab(index); }, key: index, "$isActive": index === activeTab, role: "tab", id: "promo-tab-".concat(index), "aria-controls": "promo-tabpanel-".concat(index), "aria-selected": index === activeTab ? 'true' : 'false' }, promo.title)); }))),
|
|
@@ -31406,7 +31457,7 @@ var PromoTabs = function (_a) {
|
|
|
31406
31457
|
}))));
|
|
31407
31458
|
};
|
|
31408
31459
|
|
|
31409
|
-
const Container$
|
|
31460
|
+
const Container$u = styled__default.default.div`
|
|
31410
31461
|
display: block;
|
|
31411
31462
|
`;
|
|
31412
31463
|
|
|
@@ -31428,7 +31479,7 @@ const SmallScreen = styled__default.default.div`
|
|
|
31428
31479
|
|
|
31429
31480
|
var PromoTabsDisplay = function (_a) {
|
|
31430
31481
|
var promos = _a.promos;
|
|
31431
|
-
return (React__namespace.default.createElement(Container$
|
|
31482
|
+
return (React__namespace.default.createElement(Container$u, { "data-testid": "PromoTabsDisplay" },
|
|
31432
31483
|
React__namespace.default.createElement(LargeScreen, null,
|
|
31433
31484
|
React__namespace.default.createElement(PromoTabs, { promos: promos })),
|
|
31434
31485
|
React__namespace.default.createElement(SmallScreen, null,
|
|
@@ -31458,7 +31509,7 @@ var RatingValues = [
|
|
|
31458
31509
|
},
|
|
31459
31510
|
];
|
|
31460
31511
|
|
|
31461
|
-
const FormContainer$1 = styled__default.default(Container$
|
|
31512
|
+
const FormContainer$1 = styled__default.default(Container$B)`
|
|
31462
31513
|
display: block;
|
|
31463
31514
|
.grecaptcha-badge {
|
|
31464
31515
|
visibility: hidden;
|
|
@@ -31563,7 +31614,7 @@ const ErrorText = styled__default.default.p`
|
|
|
31563
31614
|
}
|
|
31564
31615
|
`;
|
|
31565
31616
|
|
|
31566
|
-
const Container$
|
|
31617
|
+
const Container$t = styled__default.default.div`
|
|
31567
31618
|
display: block;
|
|
31568
31619
|
`;
|
|
31569
31620
|
|
|
@@ -31579,7 +31630,7 @@ var CharacterCount = function (_a) {
|
|
|
31579
31630
|
var calculatedRemaining = maxLength - input.length;
|
|
31580
31631
|
setRemaining(calculatedRemaining < 0 ? 0 : calculatedRemaining);
|
|
31581
31632
|
}, [input]);
|
|
31582
|
-
return (React__namespace.default.createElement(Container$
|
|
31633
|
+
return (React__namespace.default.createElement(Container$t, { "data-testid": "CharacterCount" },
|
|
31583
31634
|
React__namespace.default.createElement(Count, { "aria-live": "polite" },
|
|
31584
31635
|
"You have ",
|
|
31585
31636
|
remaining,
|
|
@@ -31599,7 +31650,7 @@ var Textarea = function (_a) {
|
|
|
31599
31650
|
maxLength && typeof value === 'string' && React__namespace.default.createElement(CharacterCount, { maxLength: maxLength, input: value }))) : (React__namespace.default.createElement(StyledTextarea, { onChange: onChange, placeholder: placeholder, name: name, "$isErrored": isErrored, maxLength: maxLength, defaultValue: defaultValue, id: id, "$isFullWidth": isFullWidth }))));
|
|
31600
31651
|
};
|
|
31601
31652
|
|
|
31602
|
-
const Container$
|
|
31653
|
+
const Container$s = styled__default.default.div`
|
|
31603
31654
|
display: block;
|
|
31604
31655
|
border-left: ${(props) =>
|
|
31605
31656
|
props.$isErrored
|
|
@@ -31703,13 +31754,13 @@ const CategoryInputLabel = styled__default.default.label`
|
|
|
31703
31754
|
var RadioCheckboxInput = function (_a) {
|
|
31704
31755
|
var singleSelection = _a.singleSelection, value = _a.value, name = _a.name, onChange = _a.onChange, checked = _a.checked, label = _a.label, _b = _a.isErrored, isErrored = _b === void 0 ? false : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c;
|
|
31705
31756
|
var id = React.useId();
|
|
31706
|
-
return (React__namespace.default.createElement(Container$
|
|
31757
|
+
return (React__namespace.default.createElement(Container$s, { "data-testid": "RadioCheckboxInput", "$isErrored": isErrored },
|
|
31707
31758
|
React__namespace.default.createElement(Category$2, null,
|
|
31708
31759
|
React__namespace.default.createElement(CategoryInput, { type: singleSelection ? 'radio' : 'checkbox', value: value, id: id, name: name, onClick: onChange, defaultChecked: checked, disabled: isDisabled }),
|
|
31709
31760
|
React__namespace.default.createElement(CategoryInputLabel, { "$isChecked": checked, htmlFor: id, "$singleSelection": singleSelection }, label))));
|
|
31710
31761
|
};
|
|
31711
31762
|
|
|
31712
|
-
function L(r) {
|
|
31763
|
+
function L$1(r) {
|
|
31713
31764
|
const [o, c] = React.useState("loading" );
|
|
31714
31765
|
return React.useEffect(
|
|
31715
31766
|
() => {
|
|
@@ -31737,7 +31788,7 @@ function L(r) {
|
|
|
31737
31788
|
// Only re-run effect if script src changes
|
|
31738
31789
|
), o;
|
|
31739
31790
|
}
|
|
31740
|
-
const b = "https://www.google.com/recaptcha/api.js?render=explicit";
|
|
31791
|
+
const b$1 = "https://www.google.com/recaptcha/api.js?render=explicit";
|
|
31741
31792
|
let l;
|
|
31742
31793
|
function R({
|
|
31743
31794
|
containerId: r,
|
|
@@ -31750,7 +31801,7 @@ function R({
|
|
|
31750
31801
|
errorCallback: h
|
|
31751
31802
|
}) {
|
|
31752
31803
|
var w;
|
|
31753
|
-
L(b);
|
|
31804
|
+
L$1(b$1);
|
|
31754
31805
|
const [s, f] = React.useState(!!((w = window == null ? void 0 : window.grecaptcha) != null && w.render)), [t, v] = React.useState(null);
|
|
31755
31806
|
React.useEffect(() => (l = window.setInterval(() => {
|
|
31756
31807
|
var d;
|
|
@@ -31785,7 +31836,7 @@ function R({
|
|
|
31785
31836
|
};
|
|
31786
31837
|
}
|
|
31787
31838
|
|
|
31788
|
-
const Container$
|
|
31839
|
+
const Container$r = styled__default.default.div`
|
|
31789
31840
|
display: flex;
|
|
31790
31841
|
flex-direction: column;
|
|
31791
31842
|
justify-content: center;
|
|
@@ -31821,12 +31872,12 @@ const Content$4 = styled__default.default.div`
|
|
|
31821
31872
|
*/
|
|
31822
31873
|
var Panel = function (_a) {
|
|
31823
31874
|
var heading = _a.heading, children = _a.children;
|
|
31824
|
-
return (React__namespace.default.createElement(Container$
|
|
31875
|
+
return (React__namespace.default.createElement(Container$r, { "data-testid": "Panel" },
|
|
31825
31876
|
React__namespace.default.createElement(Heading, null, heading),
|
|
31826
31877
|
children && React__namespace.default.createElement(Content$4, null, children)));
|
|
31827
31878
|
};
|
|
31828
31879
|
|
|
31829
|
-
const Container$
|
|
31880
|
+
const Container$q = styled__default.default.div`
|
|
31830
31881
|
display: block;
|
|
31831
31882
|
width: 100%;
|
|
31832
31883
|
padding: 0 ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
@@ -31852,7 +31903,7 @@ const ErrorLink = styled__default.default.a`
|
|
|
31852
31903
|
|
|
31853
31904
|
var ErrorSummary = function (_a) {
|
|
31854
31905
|
var errors = _a.errors;
|
|
31855
|
-
return (React__namespace.default.createElement(Container$
|
|
31906
|
+
return (React__namespace.default.createElement(Container$q, { "data-testid": "ErrorSummary" },
|
|
31856
31907
|
React__namespace.default.createElement(Heading$1, { level: 2, text: "There is a problem" }),
|
|
31857
31908
|
React__namespace.default.createElement(ErrorList, null, Object.keys(errors).map(function (field) { return (React__namespace.default.createElement(ErrorMessage, { key: field },
|
|
31858
31909
|
React__namespace.default.createElement(ErrorLink, { href: "#".concat(field, "Error") }, errors[field].message))); }))));
|
|
@@ -32096,7 +32147,7 @@ var RateThisPage = function (_a) {
|
|
|
32096
32147
|
React__namespace.default.createElement("div", { id: recaptchaContainerId, className: "g-recaptcha" })));
|
|
32097
32148
|
};
|
|
32098
32149
|
|
|
32099
|
-
const Container$
|
|
32150
|
+
const Container$p = styled__default.default.div`
|
|
32100
32151
|
${(props) => props.theme.fontStyles};
|
|
32101
32152
|
`;
|
|
32102
32153
|
|
|
@@ -32270,11 +32321,11 @@ var SearchResultsList = function (_a) {
|
|
|
32270
32321
|
return Math.ceil(Math.abs(currentDate.getTime() - dateObject.getTime()) / (1000 * 60 * 60 * 24)) > 365;
|
|
32271
32322
|
};
|
|
32272
32323
|
if (totalResults === 0) {
|
|
32273
|
-
return (React__namespace.default.createElement(Container$
|
|
32324
|
+
return (React__namespace.default.createElement(Container$p, { "data-testid": "SearchResultsList" },
|
|
32274
32325
|
React__namespace.default.createElement(ResultInfo$2, null, "No results found")));
|
|
32275
32326
|
}
|
|
32276
32327
|
else {
|
|
32277
|
-
return (React__namespace.default.createElement(Container$
|
|
32328
|
+
return (React__namespace.default.createElement(Container$p, { "data-testid": "SearchResultsList" },
|
|
32278
32329
|
React__namespace.default.createElement(ResultInfo$2, null,
|
|
32279
32330
|
pageNumber > 1 && 'Page ' + pageNumber + ' of ',
|
|
32280
32331
|
totalResults,
|
|
@@ -32292,7 +32343,7 @@ var SearchResultsList = function (_a) {
|
|
|
32292
32343
|
}
|
|
32293
32344
|
};
|
|
32294
32345
|
|
|
32295
|
-
const Container$
|
|
32346
|
+
const Container$o = styled__default.default.div`
|
|
32296
32347
|
li {
|
|
32297
32348
|
line-height: 1.5;
|
|
32298
32349
|
}
|
|
@@ -32397,7 +32448,7 @@ styled__default.default.img`
|
|
|
32397
32448
|
*/
|
|
32398
32449
|
var SectionLinks = function (_a) {
|
|
32399
32450
|
var sectionTitle = _a.sectionTitle, _b = _a.displayTitle, displayTitle = _b === void 0 ? true : _b, sectionSlug = _a.sectionSlug, pageLinksArray = _a.pageLinksArray, _c = _a.hasImages, hasImages = _c === void 0 ? false : _c;
|
|
32400
|
-
return (React__namespace.default.createElement(Container$
|
|
32451
|
+
return (React__namespace.default.createElement(Container$o, { id: sectionSlug, "data-testid": "SectionLinks" },
|
|
32401
32452
|
displayTitle ? React__namespace.default.createElement(SectionTitle$1, { text: sectionTitle }) : React__namespace.default.createElement("br", null),
|
|
32402
32453
|
React__namespace.default.createElement(Row$1, { isList: true }, pageLinksArray.map(function (link, i) {
|
|
32403
32454
|
var _a;
|
|
@@ -32409,7 +32460,7 @@ var SectionLinks = function (_a) {
|
|
|
32409
32460
|
}))));
|
|
32410
32461
|
};
|
|
32411
32462
|
|
|
32412
|
-
const Container$
|
|
32463
|
+
const Container$n = styled__default.default.aside`
|
|
32413
32464
|
padding-top: 20px;
|
|
32414
32465
|
display: block;
|
|
32415
32466
|
|
|
@@ -32495,14 +32546,14 @@ const InlineLink = styled__default.default.a`
|
|
|
32495
32546
|
|
|
32496
32547
|
var SectionLinksMobileContents = function (_a) {
|
|
32497
32548
|
var sectionLinksArray = _a.sectionLinksArray;
|
|
32498
|
-
return (React__namespace.default.createElement(Container$
|
|
32549
|
+
return (React__namespace.default.createElement(Container$n, null,
|
|
32499
32550
|
React__namespace.default.createElement(Contents, null,
|
|
32500
32551
|
React__namespace.default.createElement(ContentsTitle, null, "Contents"),
|
|
32501
32552
|
React__namespace.default.createElement(ContentsList, null, sectionLinksArray.map(function (link) { return (React__namespace.default.createElement(ContentsItem, { key: link.title },
|
|
32502
32553
|
React__namespace.default.createElement(InlineLink, { href: '#' + link.id, title: link.title }, link.title))); })))));
|
|
32503
32554
|
};
|
|
32504
32555
|
|
|
32505
|
-
const Container$
|
|
32556
|
+
const Container$m = styled__default.default.div`
|
|
32506
32557
|
${(props) => props.theme.fontStyles}
|
|
32507
32558
|
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
32508
32559
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -32651,7 +32702,7 @@ const ListItemLink = styled__default.default.a`
|
|
|
32651
32702
|
var SectionLinksSidebar = function (_a) {
|
|
32652
32703
|
var Title = _a.Title, Sections = _a.Sections;
|
|
32653
32704
|
var _b = React.useState(false), open = _b[0], setOpen = _b[1];
|
|
32654
|
-
return (React__namespace.default.createElement(Container$
|
|
32705
|
+
return (React__namespace.default.createElement(Container$m, { "data-testid": "SectionLinksSidebar" },
|
|
32655
32706
|
React__namespace.default.createElement(MobileTitleButton, { onClick: function () { return (open ? setOpen(false) : setOpen(true)); } },
|
|
32656
32707
|
Title,
|
|
32657
32708
|
React__namespace.default.createElement(IconWrapper$2, null,
|
|
@@ -32663,7 +32714,7 @@ var SectionLinksSidebar = function (_a) {
|
|
|
32663
32714
|
React__namespace.default.createElement(ListItemLink, { href: link.url }, link.title))); })))); }))));
|
|
32664
32715
|
};
|
|
32665
32716
|
|
|
32666
|
-
const Container$
|
|
32717
|
+
const Container$l = styled__default.default.div`
|
|
32667
32718
|
position: relative;
|
|
32668
32719
|
isolation: isolate;
|
|
32669
32720
|
`;
|
|
@@ -32817,7 +32868,7 @@ var ServiceLinksBoxed = function (_a) {
|
|
|
32817
32868
|
var _a;
|
|
32818
32869
|
return (_a = refs.current[index]) !== null && _a !== void 0 ? _a : React__namespace.default.createRef();
|
|
32819
32870
|
});
|
|
32820
|
-
return (React__namespace.default.createElement(Container$
|
|
32871
|
+
return (React__namespace.default.createElement(Container$l, { "data-testid": "ServiceLinksBoxed" },
|
|
32821
32872
|
React__namespace.default.createElement(Row$1, null, serviceLinksArray.map(function (serviceLink, index) {
|
|
32822
32873
|
var _a;
|
|
32823
32874
|
return (React__namespace.default.createElement(Column, { small: "full", medium: "one-half", large: "one-third", key: index },
|
|
@@ -32854,7 +32905,7 @@ const containerMaxHeight = (props) => {
|
|
|
32854
32905
|
}
|
|
32855
32906
|
};
|
|
32856
32907
|
|
|
32857
|
-
const Container$
|
|
32908
|
+
const Container$k = styled__default.default.div`
|
|
32858
32909
|
${(props) => props.theme.fontStyles}
|
|
32859
32910
|
${containerMaxHeight}
|
|
32860
32911
|
|
|
@@ -33258,7 +33309,7 @@ var ServicesLinksList = function (_a) {
|
|
|
33258
33309
|
}
|
|
33259
33310
|
}, [currentOrder]);
|
|
33260
33311
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
33261
|
-
React__namespace.default.createElement(Container$
|
|
33312
|
+
React__namespace.default.createElement(Container$k, { id: serviceId, className: open && 'open', "$hideHeader": hideHeader, "$isBoxed": isBoxed },
|
|
33262
33313
|
!hideHeader && (React__namespace.default.createElement(HomeTitle, { "data-testid": "servicesLinksListHeader" },
|
|
33263
33314
|
React__namespace.default.createElement(Heading$1, { text: "Council services" }),
|
|
33264
33315
|
React__namespace.default.createElement(ReorderControl, null,
|
|
@@ -33287,7 +33338,7 @@ var ServicesLinksList = function (_a) {
|
|
|
33287
33338
|
" services")))));
|
|
33288
33339
|
};
|
|
33289
33340
|
|
|
33290
|
-
const Container$
|
|
33341
|
+
const Container$j = styled__default.default.div`
|
|
33291
33342
|
${(props) => props.theme.fontStyles}
|
|
33292
33343
|
max-width: 500px;
|
|
33293
33344
|
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
@@ -33331,7 +33382,7 @@ const SingleButtonContainer = styled__default.default.div`
|
|
|
33331
33382
|
}
|
|
33332
33383
|
`;
|
|
33333
33384
|
|
|
33334
|
-
const Container$
|
|
33385
|
+
const Container$i = styled__default.default.div`
|
|
33335
33386
|
strong {
|
|
33336
33387
|
font-weight: bold;
|
|
33337
33388
|
}
|
|
@@ -33596,7 +33647,7 @@ var PostCodeSearch = function (_a) {
|
|
|
33596
33647
|
setCurrentPostcode(currentPostcode + ' (' + singleAddress.title + ')');
|
|
33597
33648
|
}
|
|
33598
33649
|
}
|
|
33599
|
-
return (React__namespace.default.createElement(Container$
|
|
33650
|
+
return (React__namespace.default.createElement(Container$i, { "data-testid": "PostCodeSearch" },
|
|
33600
33651
|
React__namespace.default.createElement(DropDownButton, { onClick: function () { return setOpen(open ? false : true); } },
|
|
33601
33652
|
React__namespace.default.createElement(IconWrapper, null,
|
|
33602
33653
|
React__namespace.default.createElement(ChevronIcon, { direction: open ? 'down' : 'right', colourFill: themeContext.theme_vars.colours.black })),
|
|
@@ -33672,7 +33723,7 @@ var SignpostLinks = function (_a) {
|
|
|
33672
33723
|
var signpostLinksArray = _a.signpostLinksArray, _b = _a.TopLineText, TopLineText = _b === void 0 ? 'Select your local area for more information:' : _b, otherCouncilLink = _a.otherCouncilLink, _c = _a.sovereignType, sovereignType = _c === void 0 ? 'sovereigns' : _c;
|
|
33673
33724
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
33674
33725
|
var councilLink = otherCouncilLink ? otherCouncilLink : themeContext.theme_vars.other_council_link;
|
|
33675
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, signpostLinksArray.length > 1 ? (React__namespace.default.createElement(Container$
|
|
33726
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, signpostLinksArray.length > 1 ? (React__namespace.default.createElement(Container$j, null,
|
|
33676
33727
|
React__namespace.default.createElement(Paragraph, null, TopLineText),
|
|
33677
33728
|
React__namespace.default.createElement(SignpostLinksList, { signpostLinksArray: signpostLinksArray }),
|
|
33678
33729
|
React__namespace.default.createElement(PostCodeSearch, { otherCouncilLink: councilLink, signPostLinks: signpostLinksArray, sovereignType: sovereignType }),
|
|
@@ -33766,7 +33817,7 @@ const summaryStyles = (props) => {
|
|
|
33766
33817
|
}
|
|
33767
33818
|
};
|
|
33768
33819
|
|
|
33769
|
-
const Container$
|
|
33820
|
+
const Container$h = styled__default.default.div`
|
|
33770
33821
|
padding: ${(props) => (props.$hasPadding ? '30px 20px' : '0')};
|
|
33771
33822
|
font-size: 1.2em;
|
|
33772
33823
|
margin-bottom: 15px;
|
|
@@ -33783,7 +33834,643 @@ const Container$g = styled__default.default.div`
|
|
|
33783
33834
|
|
|
33784
33835
|
var Summary = function (_a) {
|
|
33785
33836
|
var children = _a.children, _b = _a.hasBackground, hasBackground = _b === void 0 ? true : _b, _c = _a.hasPadding, hasPadding = _c === void 0 ? true : _c;
|
|
33786
|
-
return (React__namespace.default.createElement(Container$
|
|
33837
|
+
return (React__namespace.default.createElement(Container$h, { "data-testid": "Summary", "$hasBackground": hasBackground, "$hasPadding": hasPadding }, children));
|
|
33838
|
+
};
|
|
33839
|
+
|
|
33840
|
+
const Container$g = styled__default.default.div`
|
|
33841
|
+
display: block;
|
|
33842
|
+
`;
|
|
33843
|
+
const ChatBubble = styled__default.default.button`
|
|
33844
|
+
position: fixed;
|
|
33845
|
+
bottom: ${(props) => props.theme.theme_vars.spacingSizes.xx_large};
|
|
33846
|
+
right: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33847
|
+
width: 47px;
|
|
33848
|
+
height: 55px;
|
|
33849
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
33850
|
+
background: ${(props) => props.theme.theme_vars.colours.featured};
|
|
33851
|
+
border: 0;
|
|
33852
|
+
color: white;
|
|
33853
|
+
display: ${(props) => (props.$chatOpen ? 'none' : 'flex')};
|
|
33854
|
+
align-items: center;
|
|
33855
|
+
justify-content: center;
|
|
33856
|
+
cursor: pointer;
|
|
33857
|
+
font-size: 28px;
|
|
33858
|
+
z-index: 20;
|
|
33859
|
+
|
|
33860
|
+
/* When larger than xl position button to be just outside the container */
|
|
33861
|
+
@media screen and (min-width: calc(${(props) => props.theme.theme_vars.breakpoints.xl} + ${(props) =>
|
|
33862
|
+
props.theme.theme_vars.spacingSizes.medium})) {
|
|
33863
|
+
right: calc((100% - ${(props) => props.theme.theme_vars.breakpoints.xl}) / 2);
|
|
33864
|
+
}
|
|
33865
|
+
|
|
33866
|
+
&:focus {
|
|
33867
|
+
${(props) => props.theme.linkStylesFocus}
|
|
33868
|
+
position: fixed;
|
|
33869
|
+
top: auto;
|
|
33870
|
+
}
|
|
33871
|
+
&:hover {
|
|
33872
|
+
${(props) => props.theme.linkStylesHover}
|
|
33873
|
+
position: fixed;
|
|
33874
|
+
top: auto;
|
|
33875
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
33876
|
+
background-color: ${(props) => props.theme.theme_vars.colours.positive};
|
|
33877
|
+
}
|
|
33878
|
+
&:active {
|
|
33879
|
+
${(props) => props.theme.linkStylesActive}
|
|
33880
|
+
position: fixed;
|
|
33881
|
+
top: auto;
|
|
33882
|
+
}
|
|
33883
|
+
`;
|
|
33884
|
+
|
|
33885
|
+
const ChatWidget = styled__default.default.div`
|
|
33886
|
+
position: fixed;
|
|
33887
|
+
max-height: 100vh;
|
|
33888
|
+
width: 100%;
|
|
33889
|
+
height: 100%;
|
|
33890
|
+
bottom: 0;
|
|
33891
|
+
right: 0;
|
|
33892
|
+
border-radius: 0;
|
|
33893
|
+
overflow: hidden;
|
|
33894
|
+
box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
|
|
33895
|
+
display: ${(props) => (props.$chatOpen ? 'flex' : 'none')};
|
|
33896
|
+
flex-direction: column;
|
|
33897
|
+
z-index: 1000;
|
|
33898
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_light};
|
|
33899
|
+
|
|
33900
|
+
@media (max-height: 560px) {
|
|
33901
|
+
bottom: 0;
|
|
33902
|
+
}
|
|
33903
|
+
|
|
33904
|
+
@media screen and (min-width: ${(props) => props.theme.theme_vars.breakpoints.s}) {
|
|
33905
|
+
bottom: ${(props) => props.theme.theme_vars.spacingSizes.xx_large};
|
|
33906
|
+
right: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33907
|
+
width: 380px;
|
|
33908
|
+
height: 560px;
|
|
33909
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
33910
|
+
}
|
|
33911
|
+
|
|
33912
|
+
/* When larger than xl position button to be just outside the container */
|
|
33913
|
+
@media screen and (min-width: calc(${(props) => props.theme.theme_vars.breakpoints.xl} + ${(props) =>
|
|
33914
|
+
props.theme.theme_vars.spacingSizes.medium})) {
|
|
33915
|
+
right: calc((100% - ${(props) => props.theme.theme_vars.breakpoints.xl}) / 2);
|
|
33916
|
+
}
|
|
33917
|
+
`;
|
|
33918
|
+
|
|
33919
|
+
const ChatHeader = styled__default.default.div`
|
|
33920
|
+
background: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
33921
|
+
color: white;
|
|
33922
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small}
|
|
33923
|
+
${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
33924
|
+
display: flex;
|
|
33925
|
+
align-items: center;
|
|
33926
|
+
justify-content: space-between;
|
|
33927
|
+
gap: 10px;
|
|
33928
|
+
|
|
33929
|
+
h2 {
|
|
33930
|
+
color: white !important;
|
|
33931
|
+
}
|
|
33932
|
+
`;
|
|
33933
|
+
|
|
33934
|
+
const ChatClose = styled__default.default.button`
|
|
33935
|
+
border: none;
|
|
33936
|
+
color: white;
|
|
33937
|
+
font-size: 22px;
|
|
33938
|
+
cursor: pointer;
|
|
33939
|
+
${(props) => props.theme.linkStyles};
|
|
33940
|
+
background-color: ${(props) => props.theme.theme_vars.colours.white};
|
|
33941
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
33942
|
+
text-decoration: none !important;
|
|
33943
|
+
display: flex;
|
|
33944
|
+
align-items: center;
|
|
33945
|
+
justify-content: center;
|
|
33946
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
33947
|
+
|
|
33948
|
+
&:focus {
|
|
33949
|
+
${(props) => props.theme.linkStylesFocus}
|
|
33950
|
+
}
|
|
33951
|
+
&:hover {
|
|
33952
|
+
${(props) => props.theme.linkStylesHover}
|
|
33953
|
+
}
|
|
33954
|
+
&:active {
|
|
33955
|
+
${(props) => props.theme.linkStylesActive}
|
|
33956
|
+
}
|
|
33957
|
+
`;
|
|
33958
|
+
|
|
33959
|
+
const ChatMessages = styled__default.default.ul`
|
|
33960
|
+
list-style: none;
|
|
33961
|
+
margin: 0;
|
|
33962
|
+
flex: 1;
|
|
33963
|
+
overflow-y: auto;
|
|
33964
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small}
|
|
33965
|
+
${(props) => props.theme.theme_vars.spacingSizes.medium} 0;
|
|
33966
|
+
display: flex;
|
|
33967
|
+
flex-direction: column;
|
|
33968
|
+
gap: 10px;
|
|
33969
|
+
|
|
33970
|
+
a {
|
|
33971
|
+
${(props) => props.theme.linkStyles};
|
|
33972
|
+
|
|
33973
|
+
&:hover {
|
|
33974
|
+
${(props) => props.theme.linkStylesHover};
|
|
33975
|
+
}
|
|
33976
|
+
&:focus {
|
|
33977
|
+
${(props) => props.theme.linkStylesFocus};
|
|
33978
|
+
}
|
|
33979
|
+
&:active {
|
|
33980
|
+
${(props) => props.theme.linkStylesActive};
|
|
33981
|
+
}
|
|
33982
|
+
}
|
|
33983
|
+
`;
|
|
33984
|
+
|
|
33985
|
+
const messageSender = (props) => {
|
|
33986
|
+
switch (props.$sender) {
|
|
33987
|
+
case 'bot':
|
|
33988
|
+
return styled.css`
|
|
33989
|
+
background: white;
|
|
33990
|
+
align-self: flex-start;
|
|
33991
|
+
border-bottom-left-radius: 4px;
|
|
33992
|
+
`;
|
|
33993
|
+
case 'user':
|
|
33994
|
+
return styled.css`
|
|
33995
|
+
background-color: ${(props) => props.theme.theme_vars.colours.focus};
|
|
33996
|
+
align-self: flex-end;
|
|
33997
|
+
border-bottom-right-radius: 4px;
|
|
33998
|
+
`;
|
|
33999
|
+
}
|
|
34000
|
+
};
|
|
34001
|
+
|
|
34002
|
+
const Message = styled__default.default.li`
|
|
34003
|
+
left: 0;
|
|
34004
|
+
max-width: 85%;
|
|
34005
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34006
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
34007
|
+
|
|
34008
|
+
${messageSender}
|
|
34009
|
+
|
|
34010
|
+
.typing-dots {
|
|
34011
|
+
display: flex;
|
|
34012
|
+
gap: 4px;
|
|
34013
|
+
padding: 4px 0;
|
|
34014
|
+
}
|
|
34015
|
+
.typing-dots span {
|
|
34016
|
+
width: 8px;
|
|
34017
|
+
height: 8px;
|
|
34018
|
+
border-radius: 50%;
|
|
34019
|
+
background: ${(props) => props.theme.theme_vars.colours.grey};
|
|
34020
|
+
animation: bounce 1.4s infinite ease-in-out both;
|
|
34021
|
+
}
|
|
34022
|
+
.typing-dots span:nth-child(1) {
|
|
34023
|
+
animation-delay: 0s;
|
|
34024
|
+
}
|
|
34025
|
+
.typing-dots span:nth-child(2) {
|
|
34026
|
+
animation-delay: 0.2s;
|
|
34027
|
+
}
|
|
34028
|
+
.typing-dots span:nth-child(3) {
|
|
34029
|
+
animation-delay: 0.4s;
|
|
34030
|
+
}
|
|
34031
|
+
@keyframes bounce {
|
|
34032
|
+
0%,
|
|
34033
|
+
80%,
|
|
34034
|
+
100% {
|
|
34035
|
+
transform: translateY(0);
|
|
34036
|
+
}
|
|
34037
|
+
40% {
|
|
34038
|
+
transform: translateY(-8px);
|
|
34039
|
+
}
|
|
34040
|
+
}
|
|
34041
|
+
`;
|
|
34042
|
+
|
|
34043
|
+
const MessageContent = styled__default.default.div`
|
|
34044
|
+
font-size: 0.85em;
|
|
34045
|
+
line-height: 1.5;
|
|
34046
|
+
word-wrap: break-word;
|
|
34047
|
+
font-family: 'Asap', sans-serif;
|
|
34048
|
+
|
|
34049
|
+
li {
|
|
34050
|
+
line-height: 1.5 !important;
|
|
34051
|
+
}
|
|
34052
|
+
|
|
34053
|
+
p {
|
|
34054
|
+
margin-bottom: ${(props) => props.theme.theme_vars.spacingSizes.small};
|
|
34055
|
+
}
|
|
34056
|
+
`;
|
|
34057
|
+
|
|
34058
|
+
const ScreenReaderOnly = styled__default.default.p`
|
|
34059
|
+
${(props) => props.theme.visuallyHidden};
|
|
34060
|
+
`;
|
|
34061
|
+
|
|
34062
|
+
const ChatForm = styled__default.default.form`
|
|
34063
|
+
display: flex;
|
|
34064
|
+
justify-content: space-between;
|
|
34065
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.small}
|
|
34066
|
+
${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
34067
|
+
|
|
34068
|
+
input[type='text'] {
|
|
34069
|
+
height: 44px;
|
|
34070
|
+
margin-bottom: 0;
|
|
34071
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius} 0 0
|
|
34072
|
+
${(props) => props.theme.theme_vars.border_radius};
|
|
34073
|
+
flex-grow: 1;
|
|
34074
|
+
}
|
|
34075
|
+
`;
|
|
34076
|
+
|
|
34077
|
+
const ChatLabel = styled__default.default.label`
|
|
34078
|
+
${(props) => props.theme.visuallyHidden};
|
|
34079
|
+
`;
|
|
34080
|
+
|
|
34081
|
+
const SendButton = styled__default.default.input`
|
|
34082
|
+
outline: none;
|
|
34083
|
+
border: none;
|
|
34084
|
+
width: 44px;
|
|
34085
|
+
height: 44px;
|
|
34086
|
+
cursor: pointer;
|
|
34087
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
34088
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
34089
|
+
border-radius: 0 ${(props) => props.theme.theme_vars.border_radius} ${(props) => props.theme.theme_vars.border_radius}
|
|
34090
|
+
0;
|
|
34091
|
+
&:focus {
|
|
34092
|
+
${(props) => props.theme.linkStylesFocus}
|
|
34093
|
+
}
|
|
34094
|
+
&:hover {
|
|
34095
|
+
${(props) => props.theme.linkStylesHover}
|
|
34096
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
34097
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
34098
|
+
text-decoration: none !important;
|
|
34099
|
+
}
|
|
34100
|
+
&:active {
|
|
34101
|
+
${(props) => props.theme.linkStylesActive}
|
|
34102
|
+
}
|
|
34103
|
+
&:disabled {
|
|
34104
|
+
background-color: ${(props) => props.theme.theme_vars.colours.grey};
|
|
34105
|
+
cursor: not-allowed;
|
|
34106
|
+
}
|
|
34107
|
+
`;
|
|
34108
|
+
|
|
34109
|
+
const TimeoutWarning = styled__default.default.div`
|
|
34110
|
+
position: fixed;
|
|
34111
|
+
top: 0;
|
|
34112
|
+
left: 0;
|
|
34113
|
+
right: 0;
|
|
34114
|
+
bottom: 0;
|
|
34115
|
+
background: rgba(0, 0, 0, 0.5);
|
|
34116
|
+
display: flex;
|
|
34117
|
+
align-items: center;
|
|
34118
|
+
justify-content: center;
|
|
34119
|
+
z-index: 9999;
|
|
34120
|
+
`;
|
|
34121
|
+
|
|
34122
|
+
const TimeoutWarningInner = styled__default.default.div`
|
|
34123
|
+
background: white;
|
|
34124
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.large};
|
|
34125
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
34126
|
+
text-align: center;
|
|
34127
|
+
max-width: 350px;
|
|
34128
|
+
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
34129
|
+
p {
|
|
34130
|
+
margin-bottom: 15px;
|
|
34131
|
+
}
|
|
34132
|
+
`;
|
|
34133
|
+
|
|
34134
|
+
const TimeoutButton = styled__default.default.button`
|
|
34135
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action};
|
|
34136
|
+
color: ${(props) => props.theme.theme_vars.white};
|
|
34137
|
+
padding: ${(props) => props.theme.theme_vars.spacingSizes.medium};
|
|
34138
|
+
font-weight: 700;
|
|
34139
|
+
border: 0;
|
|
34140
|
+
cursor: pointer;
|
|
34141
|
+
line-height: 1;
|
|
34142
|
+
font-family: ${(props) => props.theme.theme_vars.fontstack};
|
|
34143
|
+
border-radius: ${(props) => props.theme.theme_vars.border_radius};
|
|
34144
|
+
text-decoration: none !important;
|
|
34145
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
34146
|
+
|
|
34147
|
+
&:focus {
|
|
34148
|
+
${(props) => props.theme.linkStylesFocus}
|
|
34149
|
+
}
|
|
34150
|
+
&:hover {
|
|
34151
|
+
${(props) => props.theme.linkStylesHover}
|
|
34152
|
+
color: ${(props) => props.theme.theme_vars.colours.white};
|
|
34153
|
+
background-color: ${(props) => props.theme.theme_vars.colours.action_dark};
|
|
34154
|
+
text-decoration: none !important;
|
|
34155
|
+
}
|
|
34156
|
+
&:active {
|
|
34157
|
+
${(props) => props.theme.linkStylesActive}
|
|
34158
|
+
}
|
|
34159
|
+
`;
|
|
34160
|
+
|
|
34161
|
+
/**
|
|
34162
|
+
* marked v18.0.5 - a markdown parser
|
|
34163
|
+
* Copyright (c) 2018-2026, MarkedJS. (MIT License)
|
|
34164
|
+
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
34165
|
+
* https://github.com/markedjs/marked
|
|
34166
|
+
*/
|
|
34167
|
+
|
|
34168
|
+
/**
|
|
34169
|
+
* DO NOT EDIT THIS FILE
|
|
34170
|
+
* The code in this file is generated from files in ./src/
|
|
34171
|
+
*/
|
|
34172
|
+
|
|
34173
|
+
function M(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var T=M();function N(l){T=l;}var _={exec:()=>null};function E(l){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),s=e[n];return s||(s=l(n),e[n]=s),s}}function d(l,e=""){let t=typeof l=="string"?l:l.source,n={replace:(s,r)=>{let i=typeof r=="string"?r:r.source;return i=i.replace(m.caret,"$1"),t=t.replace(s,i),n},getRegex:()=>new RegExp(t,e)};return n}var Te=((l="")=>{try{return !!new RegExp("(?<=1)(?<!1)"+l)}catch{return false}})(),m={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:l=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:E(l=>new RegExp(`^ {0,${l}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:E(l=>new RegExp(`^ {0,${l}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:E(l=>new RegExp(`^ {0,${l}}(?:\`\`\`|~~~)`)),headingBeginRegex:E(l=>new RegExp(`^ {0,${l}}#`)),htmlBeginRegex:E(l=>new RegExp(`^ {0,${l}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:E(l=>new RegExp(`^ {0,${l}}>`))},Oe=/^(?:[ \t]*(?:\n|$))+/,we=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ye=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,B=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Pe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,j=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=d(oe).replace(/bull/g,j).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Se=d(oe).replace(/bull/g,j).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$e=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Le=d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,j).getRegex(),H="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ze=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",K).replace("tag",H).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),le=d(F).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H).getRegex(),Me=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",le).getRegex(),W={blockquote:Me,code:we,def:Le,fences:ye,heading:Pe,hr:B,html:ze,lheading:ae,list:_e,newline:Oe,paragraph:le,table:_,text:$e},se=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H).getRegex(),Ee={...W,lheading:Se,table:se,paragraph:d(F).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",H).getRegex()},Ie={...W,html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(F).replace("hr",B).replace("heading",` *#{1,6} *[^
|
|
34174
|
+
]`).replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ae=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ce=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,Be=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,I=/[\p{P}\p{S}]/u,Z=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,De=d(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Z).getRegex(),pe=/(?!~)[\p{P}\p{S}]/u,qe=/(?!~)[\s\p{P}\p{S}]/u,ve=/(?:[^\s\p{P}\p{S}]|~)/u,He=d(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Te?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ce=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ze=d(ce,"u").replace(/punct/g,I).getRegex(),Ge=d(ce,"u").replace(/punct/g,pe).getRegex(),he="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ne=d(he,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,Z).replace(/punct/g,I).getRegex(),Qe=d(he,"gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,qe).replace(/punct/g,pe).getRegex(),je=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,Z).replace(/punct/g,I).getRegex(),Fe=d(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,I).getRegex(),Ue="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ke=d(Ue,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,Z).replace(/punct/g,I).getRegex(),We=d(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),Xe=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Je=d(K).replace("(?:-->|$)","-->").getRegex(),Ve=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Je).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),v=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ye=d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",v).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ke=d(/^!?\[(label)\]\[(ref)\]/).replace("label",v).replace("ref",U).getRegex(),de=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),et=d("reflink|nolink(?!\\()","g").replace("reflink",ke).replace("nolink",de).getRegex(),ie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:_,anyPunctuation:We,autolink:Xe,blockSkip:He,br:ue,code:Ce,del:_,delLDelim:_,delRDelim:_,emStrongLDelim:Ze,emStrongRDelimAst:Ne,emStrongRDelimUnd:je,escape:Ae,link:Ye,nolink:de,punctuation:De,reflink:ke,reflinkSearch:et,tag:Ve,text:Be,url:_},tt={...J,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",v).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v).getRegex()},Q={...J,emStrongRDelimAst:Qe,emStrongLDelim:Ge,delLDelim:Fe,delRDelim:Ke,url:d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ie).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ie).getRegex()},nt={...Q,br:d(ue).replace("{2,}","*").getRegex(),text:d(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},D={normal:W,gfm:Ee,pedantic:Ie},A={normal:J,gfm:Q,breaks:nt,pedantic:tt};var rt={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=l=>rt[l];function O(l,e){if(e){if(m.escapeTest.test(l))return l.replace(m.escapeReplace,ge)}else if(m.escapeTestNoEncode.test(l))return l.replace(m.escapeReplaceNoEncode,ge);return l}function V(l){try{l=encodeURI(l).replace(m.percentDecode,"%");}catch{return null}return l}function Y(l,e){let t=l.replace(m.findPipe,(r,i,o)=>{let u=false,a=i;for(;--a>=0&&o[a]==="\\";)u=!u;return u?"|":" |"}),n=t.split(m.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(m.slashPipe,"|");return n}function $(l,e,t){let n=l.length;if(n===0)return "";let s=0;for(;s<n;){let r=l.charAt(n-s-1);if(r===e&&true)s++;else break}return l.slice(0,n-s)}function ee(l){let e=l.split(`
|
|
34175
|
+
`),t=e.length-1;for(;t>=0&&m.blankLine.test(e[t]);)t--;return e.length-t<=2?l:e.slice(0,t+1).join(`
|
|
34176
|
+
`)}function fe(l,e){if(l.indexOf(e[1])===-1)return -1;let t=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===e[0])t++;else if(l[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function me(l,e=0){let t=e,n="";for(let s of l)if(s===" "){let r=4-t%4;n+=" ".repeat(r),t+=r;}else n+=s,t++;return n}function xe(l,e,t,n,s){let r=e.href,i=e.title||null,o=l[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=true;let u={type:l[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:i,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=false,u}function st(l,e,t){let n=l.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
|
|
34177
|
+
`).map(r=>{let i=r.match(t.other.beginningSpace);if(i===null)return r;let[o]=i;return o.length>=s.length?r.slice(s.length):r}).join(`
|
|
34178
|
+
`)}var w=class{options;rules;lexer;constructor(e){this.options=e||T;}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return {type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:ee(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return {type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=st(n,t[3]||"",this.rules);return {type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=$(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim());}return {type:"heading",raw:$(t[0],`
|
|
34179
|
+
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return {type:"hr",raw:$(t[0],`
|
|
34180
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=$(t[0],`
|
|
34181
|
+
`).split(`
|
|
34182
|
+
`),s="",r="",i=[];for(;n.length>0;){let o=false,u=[],a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))u.push(n[a]),o=true;else if(!o)u.push(n[a]);else break;n=n.slice(a);let c=u.join(`
|
|
34183
|
+
`),p=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
34184
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
34185
|
+
${c}`:c,r=r?`${r}
|
|
34186
|
+
${p}`:p;let k=this.lexer.state.top;if(this.lexer.state.top=true,this.lexer.blockTokens(p,i,true),this.lexer.state.top=k,n.length===0)break;let h=i.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let R=h,f=R.raw+`
|
|
34187
|
+
`+n.join(`
|
|
34188
|
+
`),S=this.blockquote(f);i[i.length-1]=S,s=s.substring(0,s.length-R.raw.length)+S.raw,r=r.substring(0,r.length-R.text.length)+S.text;break}else if(h?.type==="list"){let R=h,f=R.raw+`
|
|
34189
|
+
`+n.join(`
|
|
34190
|
+
`),S=this.list(f);i[i.length-1]=S,s=s.substring(0,s.length-h.raw.length)+S.raw,r=r.substring(0,r.length-R.raw.length)+S.raw,n=f.substring(i.at(-1).raw.length).split(`
|
|
34191
|
+
`);continue}}return {type:"blockquote",raw:s,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:false,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=false;for(;e;){let a=false,c="",p="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let k=me(t[2].split(`
|
|
34192
|
+
`,1)[0],t[1].length),h=e.split(`
|
|
34193
|
+
`,1)[0],R=!k.trim(),f=0;if(this.options.pedantic?(f=2,p=k.trimStart()):R?f=t[1].length+1:(f=k.search(this.rules.other.nonSpaceChar),f=f>4?1:f,p=k.slice(f),f+=t[1].length),R&&this.rules.other.blankLine.test(h)&&(c+=h+`
|
|
34194
|
+
`,e=e.substring(h.length+1),a=true),!a){let S=this.rules.other.nextBulletRegex(f),te=this.rules.other.hrRegex(f),ne=this.rules.other.fencesBeginRegex(f),re=this.rules.other.headingBeginRegex(f),be=this.rules.other.htmlBeginRegex(f),Re=this.rules.other.blockquoteBeginRegex(f);for(;e;){let G=e.split(`
|
|
34195
|
+
`,1)[0],C;if(h=G,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),C=h):C=h.replace(this.rules.other.tabCharGlobal," "),ne.test(h)||re.test(h)||be.test(h)||Re.test(h)||S.test(h)||te.test(h))break;if(C.search(this.rules.other.nonSpaceChar)>=f||!h.trim())p+=`
|
|
34196
|
+
`+C.slice(f);else {if(R||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ne.test(k)||re.test(k)||te.test(k))break;p+=`
|
|
34197
|
+
`+h;}R=!h.trim(),c+=G+`
|
|
34198
|
+
`,e=e.substring(G.length+1),k=C.slice(f);}}r.loose||(o?r.loose=true:this.rules.other.doubleBlankLine.test(c)&&(o=true)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:false,text:p,tokens:[]}),r.raw+=c;}let u=r.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a of r.items){this.lexer.state.top=false,a.tokens=this.lexer.blockTokens(a.text,[]);let c=a.tokens[0];if(a.task&&(c?.type==="text"||c?.type==="paragraph")){a.text=a.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let k=this.lexer.inlineQueue.length-1;k>=0;k--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)){this.lexer.inlineQueue[k].src=this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(a.raw);if(p){let k={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};a.checked=k.checked,r.loose?a.tokens[0]&&["paragraph","text"].includes(a.tokens[0].type)&&"tokens"in a.tokens[0]&&a.tokens[0].tokens?(a.tokens[0].raw=k.raw+a.tokens[0].raw,a.tokens[0].text=k.raw+a.tokens[0].text,a.tokens[0].tokens.unshift(k)):a.tokens.unshift({type:"paragraph",raw:k.raw,text:k.raw,tokens:[k]}):a.tokens.unshift(k);}}else a.task&&(a.task=false);if(!r.loose){let p=a.tokens.filter(h=>h.type==="space"),k=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw));r.loose=k;}}if(r.loose)for(let a of r.items){a.loose=true;for(let c of a.tokens)c.type==="text"&&(c.type="paragraph");}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=ee(t[0]);return {type:"html",block:true,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return {type:"def",tag:n,raw:$(t[0],`
|
|
34199
|
+
`),href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Y(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
34200
|
+
`):[],i={type:"table",raw:$(t[0],`
|
|
34201
|
+
`),header:[],align:[],rows:[]};if(n.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<n.length;o++)i.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:true,align:i.align[o]});for(let o of r)i.rows.push(Y(o,i.header.length).map((u,a)=>({text:u,tokens:this.lexer.inline(u),header:false,align:i.align[a]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return {type:"heading",raw:$(t[0],`
|
|
34202
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
34203
|
+
`?t[1].slice(0,-1):t[1];return {type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return {type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return {type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return !this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=true:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=false),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=true:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=false),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:false,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=$(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else {let i=fe(t[2],"()");if(i===-2)return;if(i>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,u).trim(),t[3]="";}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3]);}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),xe(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return {type:"text",raw:i,text:i}}return xe(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[3]||"")||!n||this.rules.inline.punctuation.exec(n)){let i=[...s[0]].length-1,o,u,a=i,c=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+i);(s=p.exec(t))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(u=[...o].length,s[3]||s[4]){a+=u;continue}else if((s[5]||s[6])&&i%3&&!((i+u)%3)){c+=u;continue}if(a-=u,a>0)continue;u=Math.min(u,u+a+c);let k=[...s[0]][0].length,h=e.slice(0,i+s.index+k+u);if(Math.min(i,u)%2){let f=h.slice(1,-1);return {type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let R=h.slice(2,-2);return {type:"strong",raw:h,text:R,tokens:this.lexer.inlineTokens(R)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return {type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(!s)return;if(!(s[1]||"")||!n||this.rules.inline.punctuation.exec(n)){let i=[...s[0]].length-1,o,u,a=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(s=c.exec(t))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(u=[...o].length,u!==i))continue;if(s[3]||s[4]){a+=u;continue}if(a-=u,a>0)continue;u=Math.min(u,u+a);let p=[...s[0]][0].length,k=e.slice(0,i+s.index+p+u),h=k.slice(i,-i);return {type:"del",raw:k,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else {let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0];}return {type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return {type:"text",raw:t[0],text:t[0],escaped:n}}}};var x=class l{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new w,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:false,inRawBlock:false,top:true};let t={other:m,block:D.normal,inline:A.normal};this.options.pedantic?(t.block=D.pedantic,t.inline=A.pedantic):this.options.gfm&&(t.block=D.gfm,this.options.breaks?t.inline=A.breaks:t.inline=A.gfm),this.tokenizer.rules=t;}static get rules(){return {block:D,inline:A}}static lex(e,t){return new l(t).lex(e)}static lexInline(e,t){return new l(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
|
|
34204
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens);}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=false){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));let s=1/0;for(;e;){if(e.length<s)s=e.length;else {this.infiniteLoopError(e.charCodeAt(0));break}let r;if(this.options.extensions?.block?.some(o=>(r=o.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),true):false))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let o=t.at(-1);r.raw.length===1&&o!==void 0?o.raw+=`
|
|
34205
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
34206
|
+
`)?"":`
|
|
34207
|
+
`)+r.raw,o.text+=`
|
|
34208
|
+
`+r.text,this.inlineQueue.at(-1).src=o.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
34209
|
+
`)?"":`
|
|
34210
|
+
`)+r.raw,o.text+=`
|
|
34211
|
+
`+r.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let o=1/0,u=e.slice(1),a;this.options.extensions.startBlock.forEach(c=>{a=c.call({lexer:this},u),typeof a=="number"&&a>=0&&(o=Math.min(o,a));}),o<1/0&&o>=0&&(i=e.substring(0,o+1));}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
34212
|
+
`)?"":`
|
|
34213
|
+
`)+r.raw,o.text+=`
|
|
34214
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
34215
|
+
`)?"":`
|
|
34216
|
+
`)+r.raw,o.text+=`
|
|
34217
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=true,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,s=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)a.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)r=s[2]?s[2].length:0,n=n.slice(0,s.index+r)+"["+"a".repeat(s[0].length-r-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=false,o="",u=1/0;for(;e;){if(e.length<u)u=e.length;else {this.infiniteLoopError(e.charCodeAt(0));break}i||(o=""),i=false;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),true):false))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let p=t.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,n,o)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e,n,o)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let c=e;if(this.options.extensions?.startInline){let p=1/0,k=e.slice(1),h;this.options.extensions.startInline.forEach(R=>{h=R.call({lexer:this},k),typeof h=="number"&&h>=0&&(p=Math.min(p,h));}),p<1/0&&p>=0&&(c=e.substring(0,p+1));}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),i=true;let p=t.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):t.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}};var y=class{options;parser;constructor(e){this.options=e||T;}space(e){return ""}code({text:e,lang:t,escaped:n}){let s=(t||"").match(m.notSpaceStart)?.[0],r=e.replace(m.endingNewline,"")+`
|
|
34218
|
+
`;return s?'<pre><code class="language-'+O(s)+'">'+(n?r:O(r,true))+`</code></pre>
|
|
34219
|
+
`:"<pre><code>"+(n?r:O(r,true))+`</code></pre>
|
|
34220
|
+
`}blockquote({tokens:e}){return `<blockquote>
|
|
34221
|
+
${this.parser.parse(e)}</blockquote>
|
|
34222
|
+
`}html({text:e}){return e}def(e){return ""}heading({tokens:e,depth:t}){return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
34223
|
+
`}hr(e){return `<hr>
|
|
34224
|
+
`}list(e){let t=e.ordered,n=e.start,s="";for(let o=0;o<e.items.length;o++){let u=e.items[o];s+=this.listitem(u);}let r=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return "<"+r+i+`>
|
|
34225
|
+
`+s+"</"+r+`>
|
|
34226
|
+
`}listitem(e){return `<li>${this.parser.parse(e.tokens)}</li>
|
|
34227
|
+
`}checkbox({checked:e}){return "<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return `<p>${this.parser.parseInline(e)}</p>
|
|
34228
|
+
`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){let i=e.rows[r];n="";for(let o=0;o<i.length;o++)n+=this.tablecell(i[o]);s+=this.tablerow({text:n});}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
34229
|
+
<thead>
|
|
34230
|
+
`+t+`</thead>
|
|
34231
|
+
`+s+`</table>
|
|
34232
|
+
`}tablerow({text:e}){return `<tr>
|
|
34233
|
+
${e}</tr>
|
|
34234
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return (e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
34235
|
+
`}strong({tokens:e}){return `<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return `<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return `<code>${O(e,true)}</code>`}br(e){return "<br>"}del({tokens:e}){return `<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=V(e);if(r===null)return s;e=r;let i='<a href="'+e+'"';return t&&(i+=' title="'+O(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=V(e);if(r===null)return O(n);e=r;let i=`<img src="${e}" alt="${O(n)}"`;return t&&(i+=` title="${O(t)}"`),i+=">",i}text(e){return "tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:O(e.text)}};var L=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return ""+e}image({text:e}){return ""+e}br(){return ""}checkbox({raw:e}){return e}};var b=class l{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new L;}static parse(e,t){return new l(t).parse(e)}static parseInline(e,t){return new l(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let i=s,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==false||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){t+=o||"";continue}}let r=s;switch(r.type){case "space":{t+=this.renderer.space(r);break}case "hr":{t+=this.renderer.hr(r);break}case "heading":{t+=this.renderer.heading(r);break}case "code":{t+=this.renderer.code(r);break}case "table":{t+=this.renderer.table(r);break}case "blockquote":{t+=this.renderer.blockquote(r);break}case "list":{t+=this.renderer.list(r);break}case "checkbox":{t+=this.renderer.checkbox(r);break}case "html":{t+=this.renderer.html(r);break}case "def":{t+=this.renderer.def(r);break}case "paragraph":{t+=this.renderer.paragraph(r);break}case "text":{t+=this.renderer.text(r);break}default:{let i='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let o=this.options.extensions.renderers[r.type].call({parser:this},r);if(o!==false||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=o||"";continue}}let i=r;switch(i.type){case "escape":{n+=t.text(i);break}case "html":{n+=t.html(i);break}case "link":{n+=t.link(i);break}case "image":{n+=t.image(i);break}case "checkbox":{n+=t.checkbox(i);break}case "strong":{n+=t.strong(i);break}case "em":{n+=t.em(i);break}case "codespan":{n+=t.codespan(i);break}case "br":{n+=t.br(i);break}case "del":{n+=t.del(i);break}case "text":{n+=t.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}};var P=class{options;block;constructor(e){this.options=e||T;}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?x.lex:x.lexInline}provideParser(e=this.block){return e?b.parse:b.parseInline}};var q=class{defaults=M();options=this.setOptions;parse=this.parseMarkdown(true);parseInline=this.parseMarkdown(false);Parser=b;Renderer=y;TextRenderer=L;Lexer=x;Tokenizer=w;Hooks=P;constructor(...e){this.use(...e);}walkTokens(e,t){let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case "table":{let r=s;for(let i of r.header)n=n.concat(this.walkTokens(i.tokens,t));for(let i of r.rows)for(let o of i)n=n.concat(this.walkTokens(o.tokens,t));break}case "list":{let r=s;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);n=n.concat(this.walkTokens(o,t));}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)));}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||false,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let u=r.renderer.apply(this,o);return u===false&&(u=i.apply(this,o)),u}:t.renderers[r.name]=r.renderer;}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]));}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens);}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new y(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,u=n.renderer[o],a=r[o];r[o]=(...c)=>{let p=u.apply(r,c);return p===false&&(p=a.apply(r,c)),p||""};}s.renderer=r;}if(n.tokenizer){let r=this.defaults.tokenizer||new w(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,u=n.tokenizer[o],a=r[o];r[o]=(...c)=>{let p=u.apply(r,c);return p===false&&(p=a.apply(r,c)),p};}s.tokenizer=r;}if(n.hooks){let r=this.defaults.hooks||new P;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,u=n.hooks[o],a=r[o];P.passThroughHooks.has(i)?r[o]=c=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(i))return (async()=>{let k=await u.call(r,c);return a.call(r,k)})();let p=u.call(r,c);return a.call(r,p)}:r[o]=(...c)=>{if(this.defaults.async)return (async()=>{let k=await u.apply(r,c);return k===false&&(k=await a.apply(r,c)),k})();let p=u.apply(r,c);return p===false&&(p=a.apply(r,c)),p};}s.hooks=r;}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let u=[];return u.push(i.call(this,o)),r&&(u=u.concat(r.call(this,o))),u};}this.defaults={...this.defaults,...s};}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return x.lex(e,t??this.defaults)}parser(e,t){return b.parse(e,t??this.defaults)}parseMarkdown(e){return (n,s)=>{let r={...s},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===true&&r.async===false)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return (async()=>{let u=i.hooks?await i.hooks.preprocess(n):n,c=await(i.hooks?await i.hooks.provideLexer(e):e?x.lex:x.lexInline)(u,i),p=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(p,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(e):e?b.parse:b.parseInline)(p,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(o);try{i.hooks&&(n=i.hooks.preprocess(n));let a=(i.hooks?i.hooks.provideLexer(e):e?x.lex:x.lexInline)(n,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let p=(i.hooks?i.hooks.provideParser(e):e?b.parse:b.parseInline)(a,i);return i.hooks&&(p=i.hooks.postprocess(p)),p}catch(u){return o(u)}}}onError(e,t){return n=>{if(n.message+=`
|
|
34236
|
+
Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+O(n.message+"",true)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}};var z=new q;function g(l,e){return z.parse(l,e)}g.options=g.setOptions=function(l){return z.setOptions(l),g.defaults=z.defaults,N(g.defaults),g};g.getDefaults=M;g.defaults=T;g.use=function(...l){return z.use(...l),g.defaults=z.defaults,N(g.defaults),g};g.walkTokens=function(l,e){return z.walkTokens(l,e)};g.parseInline=z.parseInline;g.Parser=b;g.parser=b.parse;g.Renderer=y;g.TextRenderer=L;g.Lexer=x;g.lexer=x.lex;g.Tokenizer=w;g.Hooks=P;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;b.parse;x.lex;
|
|
34237
|
+
|
|
34238
|
+
var WebChatAssistant = function (_a) {
|
|
34239
|
+
var endpointUrl = _a.endpointUrl, _b = _a.startMessage, startMessage = _b === void 0 ? "Hello! I'm the West Northamptonshire Council virtual assistant. How can I help you today?" : _b;
|
|
34240
|
+
var _c = React.useState(''), message = _c[0], setMessage = _c[1];
|
|
34241
|
+
var _d = React.useState(false), chatOpen = _d[0], setChatOpen = _d[1];
|
|
34242
|
+
var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
|
|
34243
|
+
var _f = React.useState([
|
|
34244
|
+
{
|
|
34245
|
+
text: startMessage,
|
|
34246
|
+
sender: 'bot',
|
|
34247
|
+
isChunk: false,
|
|
34248
|
+
},
|
|
34249
|
+
]), messages = _f[0], setMessages = _f[1];
|
|
34250
|
+
var _g = React.useState(null), sessionId = _g[0], setSessionId = _g[1];
|
|
34251
|
+
var _h = React.useState(false), showTimeoutWarning = _h[0], setShowTimeoutWarning = _h[1];
|
|
34252
|
+
var sanitizeOptions = {
|
|
34253
|
+
allowedTags: ['b', 'ul', 'li', 'a', 'strong', 'em', 'p', 'br'],
|
|
34254
|
+
allowedAttributes: { a: ['href', 'target'] },
|
|
34255
|
+
};
|
|
34256
|
+
var endMessagesRef = React.useRef(null);
|
|
34257
|
+
var timeoutWarningRef = React.useRef(null);
|
|
34258
|
+
var timeoutRef = React.useRef(null);
|
|
34259
|
+
var warningTimeout = 600000;
|
|
34260
|
+
var finalTimeout = 60000;
|
|
34261
|
+
var _j = React.useState(false), isReady = _j[0], setIsReady = _j[1];
|
|
34262
|
+
var ws = React.useRef(null);
|
|
34263
|
+
var _k = React.useState(false), reconnect = _k[0], setReconnect = _k[1];
|
|
34264
|
+
/**
|
|
34265
|
+
* Create websocket connection on initial load
|
|
34266
|
+
*/
|
|
34267
|
+
React.useEffect(function () {
|
|
34268
|
+
var socket = new WebSocket(endpointUrl);
|
|
34269
|
+
socket.onopen = function () { return setIsReady(true); };
|
|
34270
|
+
socket.onclose = function () {
|
|
34271
|
+
setIsReady(false);
|
|
34272
|
+
showTimeoutMessage();
|
|
34273
|
+
};
|
|
34274
|
+
socket.onmessage = function (event) { return updateMessages(event.data); };
|
|
34275
|
+
socket.onerror = function () { return socket.close(); };
|
|
34276
|
+
ws.current = socket;
|
|
34277
|
+
return function () {
|
|
34278
|
+
socket.close();
|
|
34279
|
+
};
|
|
34280
|
+
}, [endpointUrl, reconnect]);
|
|
34281
|
+
/**
|
|
34282
|
+
* Triggered each time the showTimeoutWarning is changed
|
|
34283
|
+
* Will either trigger the final timeout or will reset the timeout
|
|
34284
|
+
*/
|
|
34285
|
+
React.useEffect(function () {
|
|
34286
|
+
if (showTimeoutWarning) {
|
|
34287
|
+
timeoutRef.current = setTimeout(showTimeoutMessage, finalTimeout);
|
|
34288
|
+
}
|
|
34289
|
+
else {
|
|
34290
|
+
// Clear the timeoutRef but restart the timeoutWarningRef
|
|
34291
|
+
clearTimeout(timeoutRef.current);
|
|
34292
|
+
if (timeoutWarningRef.current !== null && sessionId !== null) {
|
|
34293
|
+
clearTimeout(timeoutWarningRef.current);
|
|
34294
|
+
timeoutWarningRef.current = setTimeout(handleTimeoutWarning, warningTimeout);
|
|
34295
|
+
}
|
|
34296
|
+
}
|
|
34297
|
+
return function () { return clearTimeout(timeoutRef.current); };
|
|
34298
|
+
}, [showTimeoutWarning]);
|
|
34299
|
+
/**
|
|
34300
|
+
* Use useEffectEvent so it has access to the current state
|
|
34301
|
+
* Triggered when web socket receives new messages
|
|
34302
|
+
* Should fire on every message and not be affected by race conditions
|
|
34303
|
+
*/
|
|
34304
|
+
var updateMessages = React.useEffectEvent(function (val) {
|
|
34305
|
+
if (!val) {
|
|
34306
|
+
return;
|
|
34307
|
+
}
|
|
34308
|
+
var data;
|
|
34309
|
+
try {
|
|
34310
|
+
data = JSON.parse(val);
|
|
34311
|
+
}
|
|
34312
|
+
catch (error) {
|
|
34313
|
+
console.error('Failed to parse message:', error);
|
|
34314
|
+
return;
|
|
34315
|
+
}
|
|
34316
|
+
if (data === null) {
|
|
34317
|
+
return;
|
|
34318
|
+
}
|
|
34319
|
+
if (timeoutWarningRef === null || timeoutWarningRef === void 0 ? void 0 : timeoutWarningRef.current) {
|
|
34320
|
+
clearTimeout(timeoutWarningRef.current);
|
|
34321
|
+
}
|
|
34322
|
+
timeoutWarningRef.current = setTimeout(handleTimeoutWarning, warningTimeout);
|
|
34323
|
+
setIsLoading(true);
|
|
34324
|
+
var newMessages = __spreadArray([], messages, true);
|
|
34325
|
+
switch (data.type) {
|
|
34326
|
+
case 'session':
|
|
34327
|
+
setSessionId(data.sessionId);
|
|
34328
|
+
break;
|
|
34329
|
+
case 'chunk':
|
|
34330
|
+
newMessages.push({
|
|
34331
|
+
text: formatResponse(data.text),
|
|
34332
|
+
sender: 'bot',
|
|
34333
|
+
isChunk: true,
|
|
34334
|
+
});
|
|
34335
|
+
setMessages(newMessages);
|
|
34336
|
+
break;
|
|
34337
|
+
case 'replace':
|
|
34338
|
+
newMessages = newMessages.filter(function (item) {
|
|
34339
|
+
return !item.isChunk;
|
|
34340
|
+
});
|
|
34341
|
+
newMessages.push({
|
|
34342
|
+
text: formatResponse(data.text),
|
|
34343
|
+
sender: 'bot',
|
|
34344
|
+
isChunk: false,
|
|
34345
|
+
});
|
|
34346
|
+
setMessages(newMessages);
|
|
34347
|
+
setIsLoading(false);
|
|
34348
|
+
break;
|
|
34349
|
+
case 'done':
|
|
34350
|
+
setIsLoading(false);
|
|
34351
|
+
break;
|
|
34352
|
+
case 'error':
|
|
34353
|
+
newMessages.push({
|
|
34354
|
+
text: 'Sorry, something went wrong. Please try again',
|
|
34355
|
+
sender: 'bot',
|
|
34356
|
+
isChunk: false,
|
|
34357
|
+
});
|
|
34358
|
+
setMessages(newMessages);
|
|
34359
|
+
setIsLoading(false);
|
|
34360
|
+
break;
|
|
34361
|
+
}
|
|
34362
|
+
scrollToEndMessage();
|
|
34363
|
+
// Cleanup function to clear the timeout if the component unmounts
|
|
34364
|
+
return function () { return clearTimeout(timeoutWarningRef.current); };
|
|
34365
|
+
});
|
|
34366
|
+
/**
|
|
34367
|
+
* Format the markdown response into HTML and then sanitize
|
|
34368
|
+
*/
|
|
34369
|
+
var formatResponse = function (response) {
|
|
34370
|
+
var parsed = g
|
|
34371
|
+
.use({
|
|
34372
|
+
renderer: {
|
|
34373
|
+
link: function (_a) {
|
|
34374
|
+
var href = _a.href, text = _a.text;
|
|
34375
|
+
return "<a target=\"_blank\" href=\"".concat(href, "\" rel=\"noopener noreferrer\">").concat(text, " (opens in new window)</a>");
|
|
34376
|
+
},
|
|
34377
|
+
},
|
|
34378
|
+
})
|
|
34379
|
+
.parse(response);
|
|
34380
|
+
return sanitizeHtml(parsed, sanitizeOptions);
|
|
34381
|
+
};
|
|
34382
|
+
var handleOpen = function () {
|
|
34383
|
+
setChatOpen(true);
|
|
34384
|
+
};
|
|
34385
|
+
var handleClose = function () {
|
|
34386
|
+
setChatOpen(false);
|
|
34387
|
+
};
|
|
34388
|
+
var handleTimeoutWarning = function () {
|
|
34389
|
+
setShowTimeoutWarning(true);
|
|
34390
|
+
};
|
|
34391
|
+
var showTimeoutMessage = function () {
|
|
34392
|
+
setMessages([
|
|
34393
|
+
{
|
|
34394
|
+
text: 'Your session has ended due to inactivity. Send a message to start a new conversation.',
|
|
34395
|
+
sender: 'bot',
|
|
34396
|
+
},
|
|
34397
|
+
]);
|
|
34398
|
+
setSessionId(null);
|
|
34399
|
+
setShowTimeoutWarning(false);
|
|
34400
|
+
// Fix for Safari timing out and closing the web socket
|
|
34401
|
+
// Trigger a new connection by changing the reconnect value.
|
|
34402
|
+
if (!isReady) {
|
|
34403
|
+
setTimeout(function () {
|
|
34404
|
+
setReconnect(!reconnect);
|
|
34405
|
+
}, 3000);
|
|
34406
|
+
}
|
|
34407
|
+
};
|
|
34408
|
+
/**
|
|
34409
|
+
* Send aa formatted message using the web hook
|
|
34410
|
+
*/
|
|
34411
|
+
var sendMessage = function (e) {
|
|
34412
|
+
var _a;
|
|
34413
|
+
e.preventDefault();
|
|
34414
|
+
// Prevent sending another message if already loading a response
|
|
34415
|
+
if (isLoading || message === '') {
|
|
34416
|
+
return;
|
|
34417
|
+
}
|
|
34418
|
+
var newMessages = __spreadArray([], messages, true);
|
|
34419
|
+
newMessages.push({
|
|
34420
|
+
text: formatResponse(message),
|
|
34421
|
+
sender: 'user',
|
|
34422
|
+
isChunk: false,
|
|
34423
|
+
});
|
|
34424
|
+
setMessages(newMessages);
|
|
34425
|
+
if (!isReady)
|
|
34426
|
+
return;
|
|
34427
|
+
setIsLoading(true);
|
|
34428
|
+
(_a = ws.current) === null || _a === void 0 ? void 0 : _a.send.bind(ws.current)(JSON.stringify({
|
|
34429
|
+
action: 'message',
|
|
34430
|
+
message: sanitizeHtml(message, sanitizeOptions),
|
|
34431
|
+
sessionId: sessionId,
|
|
34432
|
+
}));
|
|
34433
|
+
setMessage('');
|
|
34434
|
+
scrollToEndMessage();
|
|
34435
|
+
};
|
|
34436
|
+
var scrollToEndMessage = function () {
|
|
34437
|
+
var _a;
|
|
34438
|
+
(_a = endMessagesRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
|
|
34439
|
+
};
|
|
34440
|
+
return (React__namespace.default.createElement(Container$g, { "data-testid": "WebChatAssistant" },
|
|
34441
|
+
React__namespace.default.createElement(ChatBubble, { title: "Start web chat", "aria-label": "Open chat", "$chatOpen": chatOpen, onClick: function () { return handleOpen(); } },
|
|
34442
|
+
React__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "24", height: "24" },
|
|
34443
|
+
React__namespace.default.createElement("path", { fillRule: "evenodd", d: "M4.804 21.644A6.707 6.707 0 0 0 6 21.75a6.721 6.721 0 0 0 3.583-1.029c.774.182 1.584.279 2.417.279 5.322 0 9.75-3.97 9.75-9 0-5.03-4.428-9-9.75-9s-9.75 3.97-9.75 9c0 2.409 1.025 4.587 2.674 6.192.232.226.277.428.254.543a3.73 3.73 0 0 1-.814 1.686.75.75 0 0 0 .44 1.223ZM8.25 10.875a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25ZM10.875 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z", clipRule: "evenodd" }))),
|
|
34444
|
+
showTimeoutWarning && (React__namespace.default.createElement(TimeoutWarning, null,
|
|
34445
|
+
React__namespace.default.createElement(TimeoutWarningInner, null,
|
|
34446
|
+
React__namespace.default.createElement("p", null, "Are you still there?"),
|
|
34447
|
+
React__namespace.default.createElement("p", null, "This session will end in 60 seconds for your privacy."),
|
|
34448
|
+
React__namespace.default.createElement(TimeoutButton, { onClick: function () { return setShowTimeoutWarning(false); } }, "I'm still here")))),
|
|
34449
|
+
React__namespace.default.createElement(ChatWidget, { "$chatOpen": chatOpen },
|
|
34450
|
+
React__namespace.default.createElement(ChatHeader, null,
|
|
34451
|
+
React__namespace.default.createElement(Heading$1, { level: 2, text: "Virtual Assistant" }),
|
|
34452
|
+
React__namespace.default.createElement(ChatClose, { onClick: function () { return handleClose(); }, "aria-label": "Minimise chat" },
|
|
34453
|
+
React__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "24", height: "24" },
|
|
34454
|
+
React__namespace.default.createElement("path", { fillRule: "evenodd", d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z", clipRule: "evenodd" })))),
|
|
34455
|
+
React__namespace.default.createElement(ChatMessages, { "aria-live": "polite", role: "log" },
|
|
34456
|
+
messages.map(function (message, index) { return (React__namespace.default.createElement(Message, { key: index, "$sender": message.sender },
|
|
34457
|
+
React__namespace.default.createElement(ScreenReaderOnly, null,
|
|
34458
|
+
"Sent by ",
|
|
34459
|
+
message.sender === 'bot' ? 'virtual assistant' : 'customer',
|
|
34460
|
+
"."),
|
|
34461
|
+
React__namespace.default.createElement(MessageContent, { dangerouslySetInnerHTML: { __html: sanitizeHtml(message.text, sanitizeOptions) } }))); }),
|
|
34462
|
+
isLoading && (React__namespace.default.createElement(Message, { "$sender": "bot" },
|
|
34463
|
+
React__namespace.default.createElement(MessageContent, null,
|
|
34464
|
+
React__namespace.default.createElement(ScreenReaderOnly, null, "Loading"),
|
|
34465
|
+
React__namespace.default.createElement("div", { className: "typing-dots" },
|
|
34466
|
+
React__namespace.default.createElement("span", null),
|
|
34467
|
+
React__namespace.default.createElement("span", null),
|
|
34468
|
+
React__namespace.default.createElement("span", null))))),
|
|
34469
|
+
React__namespace.default.createElement("li", { ref: endMessagesRef })),
|
|
34470
|
+
React__namespace.default.createElement(ChatForm, { onSubmit: function (e) { return sendMessage(e); } },
|
|
34471
|
+
React__namespace.default.createElement(ChatLabel, { htmlFor: "chat-user-input" }, "Message"),
|
|
34472
|
+
React__namespace.default.createElement(Input, { id: "chat-user-input", name: "userInput", placeholder: "Type your message", value: message, onChange: function (e) { return setMessage(e.target.value); }, autocomplete: "off" }),
|
|
34473
|
+
React__namespace.default.createElement(SendButton, { type: "submit", value: "\u27A4", disabled: isLoading, "aria-label": "Send message" })))));
|
|
33787
34474
|
};
|
|
33788
34475
|
|
|
33789
34476
|
/**
|
|
@@ -33799,7 +34486,7 @@ var DirectoryDocuments = function (_a) {
|
|
|
33799
34486
|
};
|
|
33800
34487
|
var from = pageNumber * perPage - (perPage - 1);
|
|
33801
34488
|
from + ((documents === null || documents === void 0 ? void 0 : documents.length) ? documents.length - 1 : 0);
|
|
33802
|
-
return (React__namespace.default.createElement(Container$
|
|
34489
|
+
return (React__namespace.default.createElement(Container$12, { "data-testid": "DirectoryDocuments" },
|
|
33803
34490
|
React__namespace.default.createElement(FormWithLine, { onSubmit: submitSearch, hideLine: true },
|
|
33804
34491
|
React__namespace.default.createElement(Row$1, null,
|
|
33805
34492
|
React__namespace.default.createElement(Column, { small: "full", medium: "one-half", large: "one-half" },
|
|
@@ -38487,6 +39174,7 @@ exports.Video = Video;
|
|
|
38487
39174
|
exports.WarningText = WarningText;
|
|
38488
39175
|
exports.WarningTextDisclaimer = WarningTextDisclaimer;
|
|
38489
39176
|
exports.WebChat = WebChat;
|
|
39177
|
+
exports.WebChatAssistant = WebChatAssistant;
|
|
38490
39178
|
exports.lb_theme_north = lb_theme_north;
|
|
38491
39179
|
exports.lb_theme_west = lb_theme_west;
|
|
38492
39180
|
exports.north_theme = north_theme;
|