@livetiles/reach-components-react 0.3.7 → 0.4.0-preview.102

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/index.esm2.js CHANGED
@@ -50934,7 +50934,7 @@ function setMomentLocale(locale) {
50934
50934
  // ORDER MATTERS - must always be the same as in the API
50935
50935
 
50936
50936
 
50937
- var orderedFeatureSet = ['news', 'comments', 'multiLanguage', 'keywords', 'pushNotifications', 'mailNotification', 'teamsNotifications', 'themes', 'webHooks', 'reporting', 'likes', 'confirmation', 'customLogo', 'customName', 'avatars', 'manualChannelSubscription', 'bannerImages', 'bannerVideos', 'editorInlineFiles', 'editorInlineImages', 'editorInlineGallery', 'editorInlineVideos', 'editorInlineMarkup', 'editorInlineTable', 'editorInlineContact', 'expiryDate', 'onBehalfOf', 'editorConversations', 'targetAudienceRules', 'unreadTracking', 'editorInlineQuotes', 'selfRegistration', 'people', 'posts', 'newsAlerts', 'pages', 'inPageNavigation', 'automaticTranslation', 'polls', 'events', 'teams', 'userInvitation', 'languageDetection', 'postKeywords', 'hyperfish', 'canva', 'allowUserImpersonation', 'directoryGroupMemberCaching', 'inAppBrowser', 'externalNews', 'termsAndConditions', 'chat', 'recurringEvents', 'publicAccess', 'allowUserPropertiesUpdate', 'showMyNews', 'allowToUnpinMandatoryChannels', 'allowToReorderMandatoryChannels', 'useDirectoryUserPropertiesForTargetAudience', 'giphy', 'replyToComments', 'enableUserflow', 'reportingPreview', 'preventContentRedirectForBrandedApps', 'browserPushNotifications', 'contentHeadline', 'popularNewsReport', 'notificationFeed', 'unsplash', 'externalPages', 'showLikers', 'pageDocuments', 'unifiedPostView', 'stream', 'showAllNews', 'customFavicon', 'editorPreview']; // ########### WARNING #############
50937
+ var orderedFeatureSet = ['news', 'comments', 'multiLanguage', 'keywords', 'pushNotifications', 'mailNotification', 'teamsNotifications', 'themes', 'webHooks', 'reporting', 'likes', 'confirmation', 'customLogo', 'customName', 'avatars', 'manualChannelSubscription', 'bannerImages', 'bannerVideos', 'editorInlineFiles', 'editorInlineImages', 'editorInlineGallery', 'editorInlineVideos', 'editorInlineMarkup', 'editorInlineTable', 'editorInlineContact', 'expiryDate', 'onBehalfOf', 'editorConversations', 'targetAudienceRules', 'unreadTracking', 'editorInlineQuotes', 'selfRegistration', 'people', 'posts', 'newsAlerts', 'pages', 'inPageNavigation', 'automaticTranslation', 'polls', 'events', 'teams', 'userInvitation', 'languageDetection', 'postKeywords', 'hyperfish', 'canva', 'allowUserImpersonation', 'directoryGroupMemberCaching', 'inAppBrowser', 'externalNews', 'termsAndConditions', 'chat', 'recurringEvents', 'publicAccess', 'allowUserPropertiesUpdate', 'showMyNews', 'allowToUnpinMandatoryChannels', 'allowToReorderMandatoryChannels', 'useDirectoryUserPropertiesForTargetAudience', 'giphy', 'replyToComments', 'enableUserflow', 'reportingPreview', 'preventContentRedirectForBrandedApps', 'browserPushNotifications', 'contentHeadline', 'popularNewsReport', 'notificationFeed', 'unsplash', 'externalPages', 'showLikers', 'pageDocuments', 'unifiedPostView', 'stream', 'showAllNews', 'customFavicon', 'editorPreview', 'editorAutomaticTranslation']; // ########### WARNING #############
50938
50938
  // ORDER MATTERS - must always be the same as in the API
50939
50939
 
50940
50940
  var FeatureSet =
@@ -78468,14 +78468,16 @@ var EditorHighlight = function EditorHighlight(_a) {
78468
78468
  resourceKey: tooltipResourceKey,
78469
78469
  className: className
78470
78470
  }, {
78471
- children: jsx$1(EditorHighlightBubble, __assign$1({}, props), void 0)
78471
+ children: jsx$1(EditorHighlightBubble, __assign$1({}, props, {
78472
+ "data-highlight-bubble": true
78473
+ }), void 0)
78472
78474
  }), void 0);
78473
78475
  };
78474
78476
 
78475
78477
  var EditorHighlightBubble = _styled.div.withConfig({
78476
78478
  displayName: "EditorHighlight__EditorHighlightBubble",
78477
78479
  componentId: "sc-1d6ahk1-0"
78478
- })(templateObject_1$1a$1 || (templateObject_1$1a$1 = __makeTemplateObject$1(["\n ", ";\n &:empty {\n display: none;\n }\n\n padding: 10px 15px;\n\n cursor: ", ";\n\n > * {\n opacity: ", ";\n flex: 1 1 auto;\n }\n"], ["\n ", ";\n &:empty {\n display: none;\n }\n\n padding: 10px 15px;\n\n cursor: ", ";\n\n > * {\n opacity: ", ";\n flex: 1 1 auto;\n }\n"])), HighlightBubble(), function (_a) {
78480
+ })(templateObject_1$1a$1 || (templateObject_1$1a$1 = __makeTemplateObject$1(["\n ", ";\n &:empty {\n display: none;\n }\n\n min-height: 30px;\n padding: ", "px ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: ", "px;\n\n cursor: ", ";\n\n > * {\n opacity: ", ";\n flex: 1 1 auto;\n }\n"], ["\n ", ";\n &:empty {\n display: none;\n }\n\n min-height: 30px;\n padding: ", "px ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: ", "px;\n\n cursor: ", ";\n\n > * {\n opacity: ", ";\n flex: 1 1 auto;\n }\n"])), HighlightBubble(), spacingXs, spacingM - 5, fontSizeSmall, function (_a) {
78479
78481
  var readOnly = _a.readOnly;
78480
78482
  return readOnly ? 'inherit' : 'pointer';
78481
78483
  }, function (_a) {
@@ -78604,12 +78606,12 @@ var GutterToggle = function GutterToggle(_a) {
78604
78606
  var Host$x$1 = _styled.div.withConfig({
78605
78607
  displayName: "GutterToggle__Host",
78606
78608
  componentId: "sc-1aya63j-0"
78607
- })(templateObject_1$17$1 || (templateObject_1$17$1 = __makeTemplateObject$1(["\n margin: 0 21px 0 6px;\n padding-top: 8px;\n\n @media (min-width: 700px) {\n margin: 0 10px 0 18px;\n }\n"], ["\n margin: 0 21px 0 6px;\n padding-top: 8px;\n\n @media (min-width: 700px) {\n margin: 0 10px 0 18px;\n }\n"])));
78609
+ })(templateObject_1$17$1 || (templateObject_1$17$1 = __makeTemplateObject$1(["\n margin: 0 21px 0 6px;\n\n @media (min-width: 700px) {\n margin: 0 10px 0 18px;\n }\n"], ["\n margin: 0 21px 0 6px;\n\n @media (min-width: 700px) {\n margin: 0 10px 0 18px;\n }\n"])));
78608
78610
 
78609
78611
  var ToggleIcon = _styled(IconButton).withConfig({
78610
78612
  displayName: "GutterToggle__ToggleIcon",
78611
78613
  componentId: "sc-1aya63j-1"
78612
- })(templateObject_2$G$1 || (templateObject_2$G$1 = __makeTemplateObject$1(["\n && {\n margin: 0;\n padding: 0;\n font-size: 18px;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n font-size: inherit;\n margin: 0;\n }\n\n @media (min-width: 700px) {\n font-size: 25px;\n }\n }\n"], ["\n && {\n margin: 0;\n padding: 0;\n font-size: 18px;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n font-size: inherit;\n margin: 0;\n }\n\n @media (min-width: 700px) {\n font-size: 25px;\n }\n }\n"])));
78614
+ })(templateObject_2$G$1 || (templateObject_2$G$1 = __makeTemplateObject$1(["\n && {\n margin: 0;\n padding: 0;\n font-size: ", "px;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n font-size: inherit;\n margin: 0;\n }\n\n @media (min-width: 700px) {\n font-size: ", "px;\n }\n }\n"], ["\n && {\n margin: 0;\n padding: 0;\n font-size: ", "px;\n\n &[disabled] {\n background: transparent;\n }\n\n i {\n font-size: inherit;\n margin: 0;\n }\n\n @media (min-width: 700px) {\n font-size: ", "px;\n }\n }\n"])), fontSizeMedium, fontSizeMedium + 2);
78613
78615
 
78614
78616
  var Spacer = _styled.div.withConfig({
78615
78617
  displayName: "GutterToggle__Spacer",
@@ -81564,7 +81566,7 @@ function useFileAccessTokenApi() {
81564
81566
 
81565
81567
  case 1:
81566
81568
  url = _a.sent();
81567
- window.open(url, env.deviceInfo.platform === 'ios' ? '_self' : target);
81569
+ window.open(url, env.deviceInfo.operatingSystem === 'ios' ? '_self' : target);
81568
81570
  return [2
81569
81571
  /*return*/
81570
81572
  ];
@@ -83301,7 +83303,7 @@ var templateObject_1$w$1;
83301
83303
  var ToggleAllButtons = function ToggleAllButtons(_a) {
83302
83304
  var toggleAll = _a.toggleAll,
83303
83305
  className = _a.className;
83304
- return jsxs(Host$g$1, __assign$1({
83306
+ return jsxs(Host$g, __assign$1({
83305
83307
  className: className
83306
83308
  }, {
83307
83309
  children: [jsx$1(StyledButton$1$1, __assign$1({
@@ -83326,7 +83328,7 @@ var ToggleAllButtons = function ToggleAllButtons(_a) {
83326
83328
  }), void 0);
83327
83329
  };
83328
83330
 
83329
- var Host$g$1 = _styled.div.withConfig({
83331
+ var Host$g = _styled.div.withConfig({
83330
83332
  displayName: "ToggleAllButtons__Host",
83331
83333
  componentId: "sc-kbn3b4-0"
83332
83334
  })(templateObject_1$v$1 || (templateObject_1$v$1 = __makeTemplateObject$1(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingS);
@@ -83451,7 +83453,7 @@ var ChannelList$1 = function ChannelList(_a) {
83451
83453
  }
83452
83454
 
83453
83455
  var showMoreIndicator = channels.length > visibleChannelsCount;
83454
- return jsxs(Host$d$1, __assign$1({
83456
+ return jsxs(Host$d$2, __assign$1({
83455
83457
  className: className,
83456
83458
  "data-has-more-indicator": showMoreIndicator
83457
83459
  }, {
@@ -83537,7 +83539,7 @@ var IndicatorWidth = 50; // We calculate the space available to show the channel
83537
83539
  // The full width of the container => 100%
83538
83540
  // Minus the indicator width which might not be there in the case we have 3 channels or less
83539
83541
 
83540
- var Host$d$1 = _styled.div(templateObject_1$r$1 || (templateObject_1$r$1 = __makeTemplateObject$1(["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"], ["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"])), IndicatorWidth + BubbleGap);
83542
+ var Host$d$2 = _styled.div(templateObject_1$r$1 || (templateObject_1$r$1 = __makeTemplateObject$1(["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"], ["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"])), IndicatorWidth + BubbleGap);
83541
83543
 
83542
83544
  var ChannelsHost = _styled.div(templateObject_2$l$1 || (templateObject_2$l$1 = __makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"]))); // Max channel width: Divide the space by the number of bubbles we need to display minus bubble gap - 6px
83543
83545
 
@@ -83705,7 +83707,7 @@ var Toolbar$1 = function Toolbar(_a) {
83705
83707
  children: [jsxs(Row, {
83706
83708
  children: [leftSide && !hideLeftSide && jsx$1(LeftSide, {
83707
83709
  children: leftSide
83708
- }, void 0), rightSide && !hideRightSide && jsxs(RightSide, {
83710
+ }, void 0), (rightSide || search) && !hideRightSide && jsxs(RightSide, {
83709
83711
  children: [search && jsx$1(ToolbarSearch, {
83710
83712
  searchText: search.searchText,
83711
83713
  onSearchTextChange: search.onSearchTextChange,
@@ -86196,7 +86198,7 @@ var ErrorType;
86196
86198
 
86197
86199
 
86198
86200
  function PageAlert(props) {
86199
- return jsx$1(Host$e, __assign$1({
86201
+ return jsx$1(Host$h, __assign$1({
86200
86202
  "data-page-alert": true
86201
86203
  }, {
86202
86204
  children: jsxs(Content$a, {
@@ -86213,7 +86215,7 @@ function PageAlert(props) {
86213
86215
  }), void 0);
86214
86216
  }
86215
86217
 
86216
- var Host$e = _styled.div.withConfig({
86218
+ var Host$h = _styled.div.withConfig({
86217
86219
  displayName: "PageAlert__Host",
86218
86220
  componentId: "sc-gj7gx6-0"
86219
86221
  })(templateObject_1$2m || (templateObject_1$2m = __makeTemplateObject$1(["\n display: flex;\n flex-flow: column nowrap;\n align-items: stretch;\n flex: 1 0 100%;\n height: 100%;\n background-color: ", ";\n"], ["\n display: flex;\n flex-flow: column nowrap;\n align-items: stretch;\n flex: 1 0 100%;\n height: 100%;\n background-color: ", ";\n"])), function (p) {
@@ -87374,9 +87376,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
87374
87376
  }), void 0);
87375
87377
  };
87376
87378
 
87377
- var version$1 = "0.3.7";
87378
- var buildId = "95972";
87379
- var commitId = "e68969ed614ceb9ccda9075d985465d90eddb7ec";
87379
+ var version$1 = "0.4.0-preview.102";
87380
+ var buildId = "96314";
87381
+ var commitId = "5aa84f5a5d8deaee8473cd8bb20a05e51d89db12";
87380
87382
  var isCustomerBuild = false;
87381
87383
  var buildInfo = {
87382
87384
  version: version$1,
@@ -87488,11 +87490,9 @@ var client$1 = {
87488
87490
  canva: {
87489
87491
  apiKey: "6vvsr2srHeve85SXxMX1k1LD"
87490
87492
  },
87491
- intercom: {
87493
+ zendeskMessaging: {
87492
87494
  enable: true,
87493
- appId: "f74vgfao",
87494
- productId: "Condense",
87495
- unauthenticatedProductId: "Condense Login"
87495
+ apiKey: "816bfec7-3beb-457a-a4a1-f462c9cb403f"
87496
87496
  },
87497
87497
  webAppUrl: "http://localhost:3000",
87498
87498
  hyperfish: {
@@ -126249,7 +126249,7 @@ var seatsInfo=useMemo(getSeatsInfo,[isRegistered,item.id]);return jsx$1(EventUse
126249
126249
  return {hasAnySeatsLeft:true,locations:undefined};}function getTotalParticipants(){if(item.userResponse!==eventResponse){return (item.statistics.participantsCount||0)+(eventResponse===EventResponse.Registered?1:-1);}return item.statistics.participantsCount||0;}};var pageSize=50;var defaultShimmerCount=7;var LikersList=function LikersList(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,className=_a.className;var getLikers=useFeedbackApi().getLikers;var initialPageSize=Math.min(likersCount,pageSize);var _b=usePromise$2(loadLikers,null,[itemId]),likersInfo=_b[0],isLoading=_b[1],loadNextPage=_b[5];var isInitialLoading=!(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var isLoadingNextPage=(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var scrollContainer=useRef$1(null);return jsxs(Fragment,{children:[jsx$1(LikersListShimmer,__assign({count:Math.min(likersCount,defaultShimmerCount),isLoading:isInitialLoading&&likersCount>0},{children:jsxs(List$1,__assign({className:className,"data-likers-list":true,ref:scrollContainer,onScroll:handleScroll},{children:[likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers.map(function(i){return jsx$1("li",{children:jsx$1(PersonaCard,__assign({upn:i.userPrincipalName},{children:jsx$1(StyledAvatar$2,{"data-liker":i.userPrincipalName,upn:i.userPrincipalName,text:i.displayName},void 0)}),void 0)},i.id);}),isLoadingNextPage&&jsx$1(StyledSpinner$3,{},void 0),likersInfo&&!likersInfo.token&&likersInfo.likers.length>defaultShimmerCount&&jsx$1(UsersLoadedIndicator,{children:jsx$1(FormattedMessage$1,{id:"Generic.finishedLoadingLikers"},void 0)},void 0)]}),void 0)}),void 0),(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&!likersInfo.likers.length&&jsx$1(FormattedMessage$1,{id:"Generic.nobodyLikesThis"},void 0)]},void 0);function loadLikers(likersInfo){if(likersInfo===void 0){likersInfo={likers:[],token:null};}return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getLikers(itemType,itemId,{pageSize:!likersInfo.token?initialPageSize:pageSize,token:likersInfo.token})];case 1:result=_a.sent();return [2/*return*/,{likers:likersInfo.likers.concat(result.items),token:result.paginationToken}];}});});}function handleScroll(){return __awaiter(this,void 0,void 0,function(){var container,err_1;return __generator(this,function(_a){switch(_a.label){case 0:container=scrollContainer.current;if(!container){return [2/*return*/];}// check if we reached the end of the pagination
126250
126250
  // or we are already loading the next page
126251
126251
  if(likersInfo.token==null||isLoading){return [2/*return*/];}// check if user scrolled enough
126252
- if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled(Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled.ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled(Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsx$1(Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsx$1(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxs(Fragment,{children:[jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled.div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1c,templateObject_3$O,templateObject_4$A;_styled.div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));createGlobalStyle(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1b;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=useState$2(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=useRef$1(null);var timeout=useRef$1(null);useEffect$1(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsx$1("div",{children:children},void 0),showCallout&&jsx$1(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint$1.leftCenter},{children:[jsxs(LikedBy,{children:[jsx$1(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsx$1(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled(Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled.span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$1a;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsx$1(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsx$1(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=useState$2(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=useState$2((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=useState$2(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsx$1(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled(LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsx$1(Host$J,__assign({className:className},{children:jsx$1(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxs(Container$2,{children:[jsx$1(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsx$1(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled(Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled(Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$19,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsx$1(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled(NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsx$1(IEFix,{},void 0),!readOnly&&jsx$1(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsx$1(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxs(Content$7,{children:[jsxs(Header$2,__assign({"data-card-header":true},{children:[jsx$1(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsx$1(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsx$1(Title$7,{children:readOnly?contents.title:jsx$1(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxs(Footer$1,{children:[jsxs(FooterStart,{children:[jsx$1(Locations,{locations:item.locations},void 0),jsx$1(Contacts,{item:item,hideAnnouncer:true},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxs(FooterEnd,{children:[jsx$1(Registration,{item:item,disabled:readOnly},void 0),jsx$1(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled.article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?css$2(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):css$2(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&css$2(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=css$2(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled(Link$4).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled.h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled.div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled.div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled.div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled.div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled.div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingS);var HeaderFeedback=css$2(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=css$2(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingS,minScreenSize.medium);var FeedbackHost=_styled.div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsx$1(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsx$1(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsx$1(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled(CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled(EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled(DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled(EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled(EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled(EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$4=_export;var aFunction$1=aFunction$7;var toObject$1=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
126252
+ if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled(Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled.ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled(Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsx$1(Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsx$1(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxs(Fragment,{children:[jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled.div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1c,templateObject_3$O,templateObject_4$A;_styled.div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));createGlobalStyle(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1b;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=useState$2(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=useRef$1(null);var timeout=useRef$1(null);useEffect$1(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsx$1("div",{children:children},void 0),showCallout&&jsx$1(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint$1.leftCenter},{children:[jsxs(LikedBy,{children:[jsx$1(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsx$1(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled(Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled.span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$1a;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsx$1(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsx$1(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=useState$2(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=useState$2((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=useState$2(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsx$1(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled(LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsx$1(Host$J,__assign({className:className},{children:jsx$1(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxs(Container$2,{children:[jsx$1(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsx$1(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled(Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled(Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$19,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsx$1(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled(NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsx$1(IEFix,{},void 0),!readOnly&&jsx$1(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsx$1(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxs(Content$7,{children:[jsxs(Header$2,__assign({"data-card-header":true},{children:[jsx$1(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsx$1(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsx$1(Title$7,{children:readOnly?contents.title:jsx$1(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxs(Footer$1,{children:[jsxs(FooterStart,{children:[jsx$1(Locations,{locations:item.locations},void 0),jsx$1(Contacts,{item:item,hideAnnouncer:true},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxs(FooterEnd,{children:[jsx$1(Registration,{item:item,disabled:readOnly},void 0),jsx$1(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled.article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?css$2(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):css$2(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&css$2(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=css$2(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled(Link$4).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled.h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled.div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled.div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled.div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled.div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled.div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingS);var HeaderFeedback=css$2(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=css$2(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingS,minScreenSize.medium);var FeedbackHost=_styled.div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsx$1(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsx$1(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsx$1(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled(CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled(EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled(DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled(EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject([""],[""])));var Contacts=_styled(EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled(EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$2,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$4=_export;var aFunction$1=aFunction$7;var toObject$1=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
126253
126253
  var FAILS_ON_UNDEFINED=fails$j(function(){test$1.sort(undefined);});// V8 bug
126254
126254
  var FAILS_ON_NULL=fails$j(function(){test$1.sort(null);});// Old WebKit
126255
126255
  var STRICT_METHOD=arrayMethodIsStrict('sort');var FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD;// `Array.prototype.sort` method
@@ -126269,18 +126269,19 @@ return nodes.slice().sort(function(a,b){return compareRootPages(groupPositions,a
126269
126269
  // we just use the id for that, because this one is always different
126270
126270
  var fallbackCompare=function fallbackCompare(){var _a;return ((_a=a.id)===null||_a===void 0?void 0:_a.localeCompare(b===null||b===void 0?void 0:b.id))||0;};if(firstGroupIdOfA===firstGroupIdOfB){return a.position-b.position||fallbackCompare();}return groupPositions[firstGroupIdOfA]-groupPositions[firstGroupIdOfB]||fallbackCompare();}function useInlinePageDocument(documentData,page,basePath){if(basePath===void 0){basePath='pages';}var extension=documentData.extension,fileId=documentData.fileId,originalFileName=documentData.fileName,pageId=documentData.pageId,originalTitle=documentData.title;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;var _a=useMemo(function(){var iconName=getFileIconByExtension(extension);var fileUrl=NewsService.getNewsRoute(buildPath(basePath),pageId,null);return {iconName:iconName,fileUrl:fileUrl};// eslint-disable-next-line react-hooks/exhaustive-deps
126271
126271
  },[extension,pageId]),fileUrl=_a.fileUrl,iconName=_a.iconName;var _b=useMemo(function(){if(!(page===null||page===void 0?void 0:page.id)){return {title:originalTitle,fileName:originalFileName};}var _a=getFileInfo(page,user),fileInfo=_a.fileInfo,language=_a.language;var onPageDocumentDownloadClick=createDocumentClickHandler(pageId,fileId,language,fileInfo.shouldOpenInBrowser,page.fileAccessToken,basePath);return {title:getTitle(page,user,formatMessage,language),fileName:fileInfo.fileName,onPageDocumentDownloadClick:onPageDocumentDownloadClick};// eslint-disable-next-line react-hooks/exhaustive-deps
126272
- },[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return css$2(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?css$2(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):css$2(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=css$2(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return css$2(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return css$2(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?css$2(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):css$2(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$17,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsx$1(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsx$1(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled(Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled(Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$16;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsx$1(TitleHost,__assign({expandClickArea:!isExternalContent,className:className,"data-title":true},{children:readOnly?jsx$1("span",{children:title},void 0):isDownloadLink?jsx$1("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsx$1("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxs(Link$4,__assign({to:targetRoute,onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled.h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"],["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,function(p){return p.expandClickArea&&css$2(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "],["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "])));},spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P,templateObject_2$15;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsx$1(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxs(Fragment$1,{children:[i!==0&&jsx$1(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsx$1("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled.p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled(Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$14;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsx$1(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsx$1(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsx$1(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxs(MainContent,{children:[jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsx$1(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsx$1(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsx$1(Keywords$2,{children:jsx$1(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsx$1(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled(Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&css$2(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&css$2(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?css$2(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):css$2(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled.div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled.article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled.div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?css$2(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):css$2(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&css$2(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled.div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?css$2(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):css$2(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled.div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled.div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled.div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"],["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled(ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled.span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled.div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsx$1(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsx$1(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsx$1("div",{children:jsx$1(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled.div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&css$2(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&css$2(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled(Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled.div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&css$2(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled(LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$13,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$2,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
126272
+ },[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return css$2(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?css$2(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):css$2(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=css$2(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return css$2(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return css$2(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?css$2(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):css$2(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$17,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsx$1(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsx$1(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled(Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled(Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$16;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsx$1(TitleHost,__assign({className:className,"data-title":true},{children:readOnly?jsx$1("span",{children:title},void 0):isDownloadLink?jsx$1("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsx$1("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxs(Link$4,__assign({to:targetRoute,onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled.h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n font-size: ","px;\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n z-index: 1;\n }\n\n > span {\n z-index: 1;\n }\n }\n }\n"],["\n font-size: ","px;\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n z-index: 1;\n }\n\n > span {\n z-index: 1;\n }\n }\n }\n"])),fontSizeMedium,spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsx$1(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxs(Fragment$1,{children:[i!==0&&jsx$1(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsx$1("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled.p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled(Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$15;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsx$1(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsx$1(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsx$1(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxs(MainContent,{children:[jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsx$1(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsx$1(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsx$1(Keywords$2,{children:jsx$1(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsx$1(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled(Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n display: inline-block;\n max-width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n display: inline-block;\n max-width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&css$2(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&css$2(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?css$2(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):css$2(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled.div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled.article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled.div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?css$2(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):css$2(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&css$2(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled.div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?css$2(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):css$2(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled.div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled.div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled.div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n width: calc(\n 100% -\n ","px\n );\n"],["\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled(ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled.span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled.div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsx$1(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsx$1(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsx$1("div",{children:jsx$1(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled.div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&css$2(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&css$2(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled(Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled.div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&css$2(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled(LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$14,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$1,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
126273
126273
  // https://tc39.github.io/ecma262/#sec-parseint-string-radix
126274
126274
  var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$3=_export;var parseIntImplementation=numberParseInt;// `parseInt` method
126275
126275
  // https://tc39.github.io/ecma262/#sec-parseint-string-radix
126276
- $$3({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsx$1(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxs(Content$5,{children:[jsxs(MetaInfoAndIcon,{children:[jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxs(Fragment,{children:[jsx$1(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsx$1(DateTime,{value:item.publishingDate},void 0),jsxs(Fragment,{children:["\u2002",jsx$1(ClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsx$1(NewsCardIcon$1,{children:jsx$1(Tooltip,__assign({text:icon.tooltipText},{children:jsx$1(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsx$1(Headline$2,{children:headline},void 0),jsx$1(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsx$1(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsx$1(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsx$1(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled.article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&css$2(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&css$2(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&css$2(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled(Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled.div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled.div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled.p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&css$2(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled.div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled(Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled(FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled.footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&css$2(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$1M,templateObject_2$12,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsx$1(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsx$1(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled(Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsx$1(SpinnerHost,{children:jsx$1(StyledSpinner$2,{size:SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxs(Fragment,{children:[jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsx$1(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsx$1(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsx$1(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsx$1(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsx$1(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsx$1(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsx$1(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?css$2(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):css$2(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled.div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxs(Title$5,{children:[iconName&&jsx$1(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsx$1(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsx$1(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled(Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled(Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled(PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&css$2(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled(DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$11,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsx$1(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsx$1(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsx$1(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsx$1(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled.div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled(AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$10;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsx$1(List,__assign({className:className},{children:images.map(function(i){return jsx$1(ListItem$1,{children:jsx$1(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled.ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled.li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsx$1(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsx$1(AttachmentOverlay,{children:jsx$1("div",{children:jsx$1(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsx$1(AttachmentOverlay,{children:jsx$1(CenteredSpinner,{size:SpinnerSize.large},void 0)},void 0),jsx$1(Image$1,{src:attachment.previewUrl,height:225,imageFit:ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled.div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled(Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled(Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled(DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$$,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsx$1(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsx$1(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsx$1(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsx$1("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled(FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled.div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$_;var RichCommentInputWithAttachmentList=/*#__PURE__*/forwardRef(function(props,ref){var _a;return jsxs(Fragment,{children:[jsx$1(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsx$1(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=useState$2(false),isSaving=_d[0],setIsSaving=_d[1];var _e=useState$2(initialContent||''),content=_e[0],setContent=_e[1];var _f=useState$2(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=useState$2(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');useEffect$1(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
126277
- },[initialSelectedKeywordIds]);return jsx$1("div",__assign({className:className},{children:jsx$1(RichCommentInputWithAttachmentList,{defaultKeywords:getGroupedKeywords(selectedKeywords!==null&&selectedKeywords!==void 0?selectedKeywords:defaultKeywords),ref:inputRef,content:content,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onAttachmentsChange:onAttachmentsChanged,onDeleteAttachment:onDeleteAttachment,onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onChange:function(value){return setContent(value);},onFocus:function(){if(initialSelectedKeywords.length>0){setShowKeywordsPicker(true);}},disabled:isReadOnly,autoFocus:autoFocus,mentionSearchHandler:mentionSearchHandler,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker,disableDragAndDrop:disableDragAndDrop,useLargeDropTarget:useLargeDropTarget,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,buttons:jsxs(Fragment,{children:[allowKeywords&&jsx$1(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},disabled:isReadOnly,"data-button-type":"keywords",ariaLabel:formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'Send'},disabled:isSaveDisabled(),onClick:handleSave,"data-button-type":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},'saveButton'+isSaveDisabled())]},void 0)},void 0)}),void 0);function handleSave(){return __awaiter(this,void 0,void 0,function(){var groupedKeywords;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaveDisabled()){return [2/*return*/];}setIsSaving(true);groupedKeywords=getGroupedKeywords(selectedKeywords);return [4/*yield*/,onPost({content:content.trim()},groupedKeywords)];case 1:_a.sent();setShowKeywordsPicker(false);setSelectedKeywords(defaultKeywords||[]);if(!ignoreRef.current){setIsSaving(false);setContent('');if(focusAfterPost){inputRef.current.focus();}}return [2/*return*/];}});});}function isSaveDisabled(){return isReadOnly||!canSaveInput(allowSaveWithoutContent,attachments,content);}};var gutter=2;_styled.div.withConfig({displayName:"LegacyPostPhotoGallery__Gallery",componentId:"sc-ir1n2k-0"})(templateObject_1$1G||(templateObject_1$1G=__makeTemplateObject(["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"],["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"])),gutter,gutter);_styled.a.withConfig({displayName:"LegacyPostPhotoGallery__ImageItem",componentId:"sc-ir1n2k-1"})(templateObject_2$Z||(templateObject_2$Z=__makeTemplateObject(["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"],["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"])),gutter,minScreenSize.small,gutter*2,minScreenSize.medium,gutter*2);var templateObject_1$1G,templateObject_2$Z;var ImagesAndFilesList=function ImagesAndFilesList(_a){var item=_a.item,basePath=_a.basePath,imagesGridBackgroundColor=_a.imagesGridBackgroundColor,className=_a.className;var user=useCurrentUser();var _b=useAttachmentsApi(),getImageUrl=_b.getImageUrl,getFileUrl=_b.getFileUrl;var subscriptionId=user.subscription.id;var files=item.attachments.filter(function(a){return a.type===AttachmentType.File;});var images=item.attachments.filter(function(a){return a.type===AttachmentType.Image;});var maxContentWidth=minScreenSize.medium-spacingX;var galleryDetails=useMemo(function(){var galleryImages=images.map(function(a){var _a;return {previewUrl:(_a=a.previewUrl)!==null&&_a!==void 0?_a:getImageUrl(basePath,subscriptionId,item,a.id,maxContentWidth),imageId:a.id,width:a.width,height:a.height};});return {galleryId:createId(),images:galleryImages};// eslint-disable-next-line react-hooks/exhaustive-deps
126276
+ $$3({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsx$1(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxs(Content$5,{children:[jsxs(MetaInfoAndIcon,{children:[jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxs(Fragment,{children:[jsx$1(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsx$1(DateTime,{value:item.publishingDate},void 0),jsxs(Fragment,{children:["\u2002",jsx$1(StyledClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsx$1(NewsCardIcon$1,{children:jsx$1(Tooltip,__assign({text:icon.tooltipText},{children:jsx$1(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsx$1(Headline$2,{children:headline},void 0),jsx$1(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsx$1(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsx$1(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsx$1(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled.article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&css$2(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&css$2(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&css$2(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled(Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n &&& {\n margin-right: auto;\n display: inline-flex;\n }\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled.div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled.div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled.p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&css$2(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled.div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled(Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled(FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled.footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&css$2(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var StyledClickableChannelTitles=_styled(ClickableChannelTitles).withConfig({displayName:"NewsItemTile__StyledClickableChannelTitles",componentId:"sc-15drgb8-13"})(templateObject_20$3||(templateObject_20$3=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var templateObject_1$1M,templateObject_2$13,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1,templateObject_20$3;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsx$1(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsx$1(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled(Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsx$1(SpinnerHost,{children:jsx$1(StyledSpinner$2,{size:SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxs(Fragment,{children:[jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsx$1(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsx$1(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsx$1(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsx$1(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsx$1(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsx$1(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsx$1(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?css$2(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):css$2(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled.div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxs(Title$5,{children:[iconName&&jsx$1(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsx$1(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsx$1(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled(Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled(Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled(PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&css$2(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled(DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$12,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsx$1(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsx$1(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsx$1(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsx$1(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled.div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled(AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$11;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsx$1(List,__assign({className:className},{children:images.map(function(i){return jsx$1(ListItem$1,{children:jsx$1(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled.ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled.li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsx$1(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsx$1(AttachmentOverlay,{children:jsx$1("div",{children:jsx$1(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsx$1(AttachmentOverlay,{children:jsx$1(CenteredSpinner,{size:SpinnerSize.large},void 0)},void 0),jsx$1(Image$1,{src:attachment.previewUrl,height:225,imageFit:ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled.div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled(Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled(Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled(DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$10,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsx$1(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsx$1(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsx$1(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsx$1("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled(FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled.div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$$;var RichCommentInputWithAttachmentList=/*#__PURE__*/forwardRef(function(props,ref){var _a;return jsxs(Fragment,{children:[jsx$1(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsx$1(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=useState$2(false),isSaving=_d[0],setIsSaving=_d[1];var _e=useState$2(initialContent||''),content=_e[0],setContent=_e[1];var _f=useState$2(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=useState$2(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');useEffect$1(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
126277
+ },[initialSelectedKeywordIds]);return jsx$1("div",__assign({className:className},{children:jsx$1(RichCommentInputWithAttachmentList,{defaultKeywords:getGroupedKeywords(selectedKeywords!==null&&selectedKeywords!==void 0?selectedKeywords:defaultKeywords),ref:inputRef,content:content,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onAttachmentsChange:onAttachmentsChanged,onDeleteAttachment:onDeleteAttachment,onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onChange:function(value){return setContent(value);},onFocus:function(){if(initialSelectedKeywords.length>0){setShowKeywordsPicker(true);}},disabled:isReadOnly,autoFocus:autoFocus,mentionSearchHandler:mentionSearchHandler,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker,disableDragAndDrop:disableDragAndDrop,useLargeDropTarget:useLargeDropTarget,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,buttons:jsxs(Fragment,{children:[allowKeywords&&jsx$1(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},disabled:isReadOnly,"data-button-type":"keywords",ariaLabel:formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'Send'},disabled:isSaveDisabled(),onClick:handleSave,"data-button-type":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},'saveButton'+isSaveDisabled())]},void 0)},void 0)}),void 0);function handleSave(){return __awaiter(this,void 0,void 0,function(){var groupedKeywords;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaveDisabled()){return [2/*return*/];}setIsSaving(true);groupedKeywords=getGroupedKeywords(selectedKeywords);return [4/*yield*/,onPost({content:content.trim()},groupedKeywords)];case 1:_a.sent();setShowKeywordsPicker(false);setSelectedKeywords(defaultKeywords||[]);if(!ignoreRef.current){setIsSaving(false);setContent('');if(focusAfterPost){inputRef.current.focus();}}return [2/*return*/];}});});}function isSaveDisabled(){return isReadOnly||!canSaveInput(allowSaveWithoutContent,attachments,content);}};var gutter=2;_styled.div.withConfig({displayName:"LegacyPostPhotoGallery__Gallery",componentId:"sc-ir1n2k-0"})(templateObject_1$1G||(templateObject_1$1G=__makeTemplateObject(["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"],["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"])),gutter,gutter);_styled.a.withConfig({displayName:"LegacyPostPhotoGallery__ImageItem",componentId:"sc-ir1n2k-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"],["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"])),gutter,minScreenSize.small,gutter*2,minScreenSize.medium,gutter*2);var templateObject_1$1G,templateObject_2$_;var ImagesAndFilesList=function ImagesAndFilesList(_a){var item=_a.item,basePath=_a.basePath,imagesGridBackgroundColor=_a.imagesGridBackgroundColor,className=_a.className;var user=useCurrentUser();var _b=useAttachmentsApi(),getImageUrl=_b.getImageUrl,getFileUrl=_b.getFileUrl;var subscriptionId=user.subscription.id;var files=item.attachments.filter(function(a){return a.type===AttachmentType.File;});var images=item.attachments.filter(function(a){return a.type===AttachmentType.Image;});var maxContentWidth=minScreenSize.medium-spacingX;var galleryDetails=useMemo(function(){var galleryImages=images.map(function(a){var _a;return {previewUrl:(_a=a.previewUrl)!==null&&_a!==void 0?_a:getImageUrl(basePath,subscriptionId,item,a.id,maxContentWidth),imageId:a.id,width:a.width,height:a.height};});return {galleryId:createId(),images:galleryImages};// eslint-disable-next-line react-hooks/exhaustive-deps
126278
126278
  },[item.attachments,item.fileAccessToken,item.attachmentContainerId]);if(images.length===0&&files.length===0){return null;}return jsxs("div",__assign({className:className},{children:[jsx$1(PhotoGrid,{images:galleryDetails.images,imageUrlResolver:function(imageId,width,height){return getImageUrl(basePath,subscriptionId,item,imageId,width,height);},gridBackgroundColor:imagesGridBackgroundColor},void 0),jsx$1(FilesList,{files:files,getFileUrl:function(attachmentId,token){return getFileUrl(basePath,subscriptionId,item,attachmentId,token);},fileAccessToken:item.fileAccessToken},void 0)]}),void 0);};var FilesList=_styled(FileAttachmentList).withConfig({displayName:"ImagesAndFilesList__FilesList",componentId:"sc-1wjy8l6-0"})(templateObject_1$1F||(templateObject_1$1F=__makeTemplateObject(["\n :not(:first-child) {\n margin-top: ","px;\n }\n"],["\n :not(:first-child) {\n margin-top: ","px;\n }\n"])),spacingM);var templateObject_1$1F;var EditComment=function EditComment(_a){var content=_a.content,files=_a.files,deletedFileUrls=_a.deletedFileUrls,onSave=_a.onSave,onCancel=_a.onCancel,className=_a.className,mentionSearchHandler=_a.mentionSearchHandler,allowAttachments=_a.allowAttachments,inputTheme=_a.inputTheme,onAttachmentAdded=_a.onAttachmentAdded,onDeleteAttachment=_a.onDeleteAttachment,allowKeywords=_a.allowKeywords,availableKeywords=_a.availableKeywords,mandatoryKeywords=_a.mandatoryKeywords,keywords=_a.keywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter;var formatMessage=useIntl().formatMessage;var _b=useState$2(content||''),newContent=_b[0],setContent=_b[1];var _c=useState$2(false),showKeywordsPicker=_c[0],setShowKeywordsPicker=_c[1];var _d=useState$2(getFlatKeywordList(keywords)||[]),selectedKeywords=_d[0],setSelectedKeywords=_d[1];var hasMandatoryKeywords=(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.length)>0;var automaticallyShowKeywordsPicker=allowKeywords&&(hasMandatoryKeywords||selectedKeywords.length!==0);return jsx$1(RichCommentInputWithAttachmentList,{className:className,content:newContent,attachments:files,deletedAttachmentUrls:deletedFileUrls,autoFocus:true,mentionSearchHandler:mentionSearchHandler,onChange:function(value){return setContent(value);},onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onAttachmentsChange:onAttachmentAdded,onDeleteAttachment:onDeleteAttachment,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,defaultKeywords:keywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker||automaticallyShowKeywordsPicker,inputTheme:inputTheme,buttons:jsxs(Fragment,{children:[allowKeywords&&jsx$1(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},"data-button-type":"keywords","aria-label":formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'CheckMark'},disabled:!canSaveInput(allowSaveWithoutContent,files,newContent),onClick:handleSave,"data-button":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'Cancel'},onClick:onCancel,"data-button":"cancel",ariaLabel:formatMessage({id:'AriaLabel.cancelButton'})},void 0)]},void 0)},void 0);function handleSave(){var groupedKeywords=getGroupedKeywords(selectedKeywords);onSave(newContent.trim(),groupedKeywords);setShowKeywordsPicker(false);}};function useAttachmentUploader(initialAttachments,containerId,basePath){var ignoreRef=useRef$1(false);var warningToastHandle=useRef$1();var _a=useAttachmentsApi(),uploadFile=_a.uploadFile,uploadImage=_a.uploadImage;var showToastWarning=useNotificationContext().showToastWarning;useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var user=useCurrentUser();var _b=useState$2(initialAttachments),attachments=_b[0],setAttachments=_b[1];var _c=useState$2([]),deletedAttachmentUrls=_c[0],setDeletedAttachmentUrls=_c[1];// eslint-disable-next-line react-hooks/exhaustive-deps
126279
126279
  var handleAttachmentCallback=useCallback(handleAttachmentsAdded,[attachments,setAttachments,basePath,containerId]);return [attachments,handleAttachmentCallback,clearAttachments,deletedAttachmentUrls,deleteAttachment];function handleAttachmentsAdded(updatedAttachments){return __awaiter(this,void 0,void 0,function(){var newAttachments,_loop_1,_i,newAttachments_1,newAttachment;return __generator(this,function(_a){newAttachments=updatedAttachments.filter(function(a){return attachments.every(function(old){return old.id!==a.id;});});setAttachments(updatedAttachments.map(function(a){return __assign(__assign({},a),{isUploadInProgress:(a.type===AttachmentType.Image||a.type===AttachmentType.File)&&!!newAttachments.find(function(x){return x.id===a.id;})});}));_loop_1=function(newAttachment){(newAttachment.type===AttachmentType.Image||newAttachment.type===AttachmentType.File)&&uploadAttachment(basePath,newAttachment).then(function(response){if((response===null||response===void 0?void 0:response.status)!==200&&(response===null||response===void 0?void 0:response.status)!==204){throw new Error("Request failed with status "+(response===null||response===void 0?void 0:response.status));}})// todo: add proper error handling when uploading a attachment fails
126280
126280
  // => we should display a retry button on the attachment preview
126281
126281
  .then(function(){if(ignoreRef.current){return;}setAttachments(function(attachments){return attachments.map(function(a){return a.id!==newAttachment.id?a:__assign(__assign({},a),{isUploadInProgress:false});});});},function(error){logger.error(error);if(!warningToastHandle.current){warningToastHandle.current=showToastWarning('Attachments.uploadError',undefined,function(){return warningToastHandle.current=null;});}if(ignoreRef.current){return;}setAttachments(function(attachments){return attachments.map(function(a){return a.id!==newAttachment.id?a:__assign(__assign({},a),{hasError:true,isUploadInProgress:false});});});});};for(_i=0,newAttachments_1=newAttachments;_i<newAttachments_1.length;_i++){newAttachment=newAttachments_1[_i];_loop_1(newAttachment);}return [2/*return*/];});});}function clearAttachments(){if(!ignoreRef.current){setAttachments([]);setDeletedAttachmentUrls([]);}}function deleteAttachment(attachment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,handleAttachmentsAdded(attachments.filter(function(f){return f.id!==attachment.id;}))];case 1:_a.sent();setDeletedAttachmentUrls(__spreadArray(__spreadArray([],deletedAttachmentUrls),[attachment.url]));return [2/*return*/];}});});}function uploadAttachment(basePath,attachment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(attachment.type===AttachmentType.Image){return [2/*return*/,uploadImage(basePath,user.subscription.id,attachment.id,containerId,attachment.file)];}else {return [2/*return*/,uploadFile(basePath,user.subscription.id,attachment.id,containerId,attachment.file)];}});});}}var EditCommentWithAttachments=function EditCommentWithAttachments(props){var user=useCurrentUser();var getImageUrl=useAttachmentsApi().getImageUrl;var _a=useAttachmentUploader(props.item.attachments,props.item.attachmentContainerId,props.basePath),attachments=_a[0],handleAttachmentsAdded=_a[1],deletedAttachmentUrls=_a[3],onDeleteAttachment=_a[4];return jsx$1(EditComment,__assign({},props,{allowSaveWithoutContent:props.allowSaveWithoutContent,saveOnEnter:props.saveOnEnter,saveOnCtrlEnter:props.saveOnCtrlEnter,files:attachments.map(function(a){return __assign(__assign({},a),!isClientAttachment(a)&&{previewUrl:getImageUrl(props.basePath,user.subscription.id,props.item,a.id)});}),allowAttachments:!!props.basePath,onSave:handlePost,onAttachmentAdded:handleAttachmentsAdded,allowKeywords:props.allowKeywords,availableKeywords:props.availableKeywords,mandatoryKeywords:props.mandatoryKeywords,keywords:props.keywords,deletedFileUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment}),void 0);function handlePost(newContent,keywords){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,props.onSave(newContent,attachments,keywords)];case 1:_a.sent();return [2/*return*/];}});});}};function isClientAttachment(value){return value.file!=null;}var CommentDisplay=function CommentDisplay(_a){var _b;var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,message=_a.message,onDelete=_a.onDelete,showDelete=_a.showDelete,showAutoTranslate=_a.showAutoTranslate,showEdit=_a.showEdit,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,getHashtagFilterRoute=_a.getHashtagFilterRoute,highlight=_a.highlight,isInitialLiked=_a.isInitialLiked,onReplyIconClick=_a.onReplyIconClick,onReply=_a.onReply,replyCount=_a.replyCount,readOnly=_a.readOnly,className=_a.className;var _c=useCommentApi(),toggleCommentLike=_c.toggleCommentLike,translateComment=_c.translateComment,updateComment=_c.updateComment;var formatMessage=useIntl().formatMessage;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;var _e=useState$2(false),isEditMode=_e[0],setIsEditMode=_e[1];var _f=useState$2(message.content),content=_f[0],setContent=_f[1];var _g=useState$2(message.attachments),attachments=_g[0],setAttachments=_g[1];var _h=useState$2(message.modified),modifiedTime=_h[0],setModifiedTime=_h[1];var _j=useState$2(message.content),originalContent=_j[0],setOriginalContent=_j[1];var _k=useState$2(isInitialLiked),isLiked=_k[0],setIsLiked=_k[1];var _l=useState$2(((_b=message.statistics)===null||_b===void 0?void 0:_b.likeCount)||0),likeCounter=_l[0],setLikeCounter=_l[1];var features=useFeatures();var palette=useContext(ThemeContext$1).theme.palette;var hasContent=content.length>0;message=__assign(__assign({},message),{attachments:attachments});return jsxs(Container$1,__assign({className:className,"data-comment-id":message.id,"data-has-auto-translate":showAutoTranslate,"data-can-edit":showEdit,"data-can-delete":showDelete,"data-show-highlight":highlight,highlight:highlight,id:"Comment-"+message.id},{children:[jsxs(Header$1,{children:[jsx$1(CommentUser,__assign({upn:message.sender.userPrincipalName,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:message.sender.userPrincipalName,text:message.sender.displayName,size:PersonaSize.small,hidePersonaDetails:true},void 0)}),void 0),jsxs(HeaderMetadata$1,{children:[jsx$1(CommentDisplayName,{children:jsx$1(StyledPersonaCard$1,__assign({upn:message.sender.userPrincipalName},{children:message.sender.displayName}),void 0)},void 0),jsx$1(CommentDateTime,{className:"ms-fontColor-neutralTertiary",value:message.receivedDateTime},void 0),jsx$1(Modified,{modified:modifiedTime},void 0)]},void 0),message.id&&jsxs(Buttons$1,{children:[features.replyToComments&&replyCount>0&&jsx$1(ReplyCountButton,{tooltipResourceKey:"Comment.numberOfReplies",tooltipResourceKeyValues:{count:replyCount},ariaLabel:formatMessage({id:onReplyIconClick?'AriaLabel.commentsButton':'AriaLabel.repliesButton'}),iconName:"Chat",count:replyCount,feedbackType:"comment",onClick:onReplyIconClick!==null&&onReplyIconClick!==void 0?onReplyIconClick:onReply?function(){return onReply(message.id);}:null,highlight:message.hasUnreadReplies,readOnly:readOnly},void 0),jsx$1(StyledLikeButton$1,{itemId:message.id,itemType:ItemResourceTypes.Comments,count:likeCounter,isActive:isLiked,onClick:function(){return handleLike(!isLiked);},doNotRenderZeroCount:true,isDemoContent:message.isDemoContent,readOnly:readOnly},void 0),jsx$1(CommentActionMenu,{comment:message,showEdit:showEdit,onDelete:onDelete,showDelete:showDelete,isEditMode:isEditMode,toggleEditMode:setIsEditMode,originalContent:originalContent,currentContent:content,setContent:setContent,handleTranslate:handleTranslate,showAutoTranslate:showAutoTranslate,onReply:onReply,disabled:readOnly},void 0)]},void 0)]},void 0),jsxs(Body,{children:[isEditMode&&jsx$1(StyledEditCommentWithAttachments,{content:content,mentionSearchHandler:mentionSearchHandler,onSave:handleSaveComment,onCancel:function(){return setIsEditMode(false);},basePath:baseAttachmentPath,item:message,allowSaveWithoutContent:true,saveOnCtrlEnter:true},void 0),!isEditMode&&hasContent&&jsx$1(Fragment,{children:jsx$1(Content$4,__assign({"data-comment-content":message.id},{children:jsx$1(ContentDisplay,{content:content,handlers:[ContentDisplayHandler.LineBreak,ContentDisplayHandler.Link,ContentDisplayHandler.Mention,ContentDisplayHandler.Hashtag],getHashtagRoute:getHashtagFilterRoute},void 0)}),void 0)},void 0)]},void 0),!isEditMode&&(attachments===null||attachments===void 0?void 0:attachments.length)>0&&jsxs("div",__assign({"data-mixed-attachment-list":true},{children:[jsx$1(GifList,{attachments:message.attachments},void 0),jsx$1(StyledImagesAndFilesList$1,{item:message,basePath:baseAttachmentPath,imagesGridBackgroundColor:palette.white},void 0),jsx$1(VideoList,{attachments:message.attachments},void 0),jsx$1(EmbeddedObjectList,{attachments:message.attachments},void 0)]}),void 0)]}),void 0);function handleLike(newIsLiked){return __awaiter(this,void 0,void 0,function(){var oldCounter,error_1;return __generator(this,function(_a){switch(_a.label){case 0:oldCounter=likeCounter;_a.label=1;case 1:_a.trys.push([1,3,,4]);setIsLiked(newIsLiked);setLikeCounter(newIsLiked?oldCounter+1:oldCounter-1);return [4/*yield*/,toggleCommentLike(message.id,newIsLiked)];case 2:_a.sent();return [3/*break*/,4];case 3:error_1=_a.sent();setIsLiked(!newIsLiked);setLikeCounter(oldCounter);logger.error(error_1);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function handleSaveComment(newContent,newAttachments){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:setContent(newContent);setAttachments(newAttachments);setIsEditMode(false);setModifiedTime(new Date().toISOString());setOriginalContent(newContent);_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,updateComment(scope,message.parentItemId,message.id,newContent,newAttachments,type)];case 2:_a.sent();showToast('Comment.successfullyUpdated');return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function handleTranslate(preferredContentLanguageCode){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,2,,3]);return [4/*yield*/,translateComment(type,scope,message.parentItemId,message.id,preferredContentLanguageCode)];case 1:return [2/*return*/,_b.sent()];case 2:_b.sent();showError('Generic.error');return [2/*return*/,null];case 3:return [2/*return*/];}});});}};var Header$1=_styled.div.withConfig({displayName:"CommentDisplay__Header",componentId:"sc-el7c23-0"})(templateObject_1$1E||(templateObject_1$1E=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var avatarWidth$1=40;var maxButtonsWidth$1=125;// max 3 buttons (menu button, replies, like)
126282
- var paddingLeft$1=spacingS;var HeaderMetadata$1=_styled.div.withConfig({displayName:"CommentDisplay__HeaderMetadata",componentId:"sc-el7c23-1"})(templateObject_2$Y||(templateObject_2$Y=__makeTemplateObject(["\n flex: 1;\n box-sizing: border-box;\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(100% - ","px - ","px);\n"],["\n flex: 1;\n box-sizing: border-box;\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(100% - ","px - ","px);\n"])),fontSizeSmall,paddingLeft$1,avatarWidth$1,maxButtonsWidth$1);var CommentDisplayName=_styled.div.withConfig({displayName:"CommentDisplay__CommentDisplayName",componentId:"sc-el7c23-2"})(templateObject_3$G||(templateObject_3$G=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var StyledPersonaCard$1=_styled(PersonaCard).withConfig({displayName:"CommentDisplay__StyledPersonaCard",componentId:"sc-el7c23-3"})(templateObject_4$s||(templateObject_4$s=__makeTemplateObject(["\n && {\n max-width: 100%;\n .ms-Button {\n width: 100%;\n }\n .ms-Button-textContainer {\n width: 100%;\n }\n\n .ms-Button-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n"],["\n && {\n max-width: 100%;\n .ms-Button {\n width: 100%;\n }\n .ms-Button-textContainer {\n width: 100%;\n }\n\n .ms-Button-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n"])));var CommentDateTime=_styled(DateTime).withConfig({displayName:"CommentDisplay__CommentDateTime",componentId:"sc-el7c23-4"})(templateObject_5$p||(templateObject_5$p=__makeTemplateObject(["\n font-size: 12px;\n"],["\n font-size: 12px;\n"])));var Buttons$1=_styled.div.withConfig({displayName:"CommentDisplay__Buttons",componentId:"sc-el7c23-5"})(templateObject_6$f||(templateObject_6$f=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n\n button {\n height: auto;\n min-height: ","px; /* icons have a font-size of 20px */\n }\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n\n button {\n height: auto;\n min-height: ","px; /* icons have a font-size of 20px */\n }\n"])),fontSizeLarge);var Body=_styled.div.withConfig({displayName:"CommentDisplay__Body",componentId:"sc-el7c23-6"})(templateObject_7$b||(templateObject_7$b=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n"])));var Content$4=_styled.div.withConfig({displayName:"CommentDisplay__Content",componentId:"sc-el7c23-7"})(templateObject_8$a||(templateObject_8$a=__makeTemplateObject(["\n padding-top: ","px;\n flex: 1 1 auto;\n a {\n font-weight: bold;\n &:hover,\n &:active {\n text-decoration: underline;\n }\n }\n"],["\n padding-top: ","px;\n flex: 1 1 auto;\n a {\n font-weight: bold;\n &:hover,\n &:active {\n text-decoration: underline;\n }\n }\n"])),spacingXs);var Container$1=_styled.div.withConfig({displayName:"CommentDisplay__Container",componentId:"sc-el7c23-8"})(templateObject_10$7||(templateObject_10$7=__makeTemplateObject(["\n padding-bottom: 15px;\n font-size: ","px;\n line-height: ","px;\n\n ","\n"],["\n padding-bottom: 15px;\n font-size: ","px;\n line-height: ","px;\n\n ","\n"])),fontSizeSmall,spacingM,function(p){return p.highlight&&css$2(templateObject_9$8||(templateObject_9$8=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var CommentUser=_styled(PersonaCard).withConfig({displayName:"CommentDisplay__CommentUser",componentId:"sc-el7c23-9"})(templateObject_11$3||(templateObject_11$3=__makeTemplateObject(["\n align-self: flex-start;\n"],["\n align-self: flex-start;\n"])));var StyledEditCommentWithAttachments=_styled(EditCommentWithAttachments).withConfig({displayName:"CommentDisplay__StyledEditCommentWithAttachments",componentId:"sc-el7c23-10"})(templateObject_12$2$1||(templateObject_12$2$1=__makeTemplateObject(["\n width: 100%;\n position: relative;\n"],["\n width: 100%;\n position: relative;\n"])));var StyledImagesAndFilesList$1=_styled(ImagesAndFilesList).withConfig({displayName:"CommentDisplay__StyledImagesAndFilesList",componentId:"sc-el7c23-11"})(templateObject_13$2$1||(templateObject_13$2$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && [data-preload-video='true'] video {\n background-color: ",";\n }\n"],["\n margin-top: ","px;\n\n && [data-preload-video='true'] video {\n background-color: ",";\n }\n"])),spacingM,function(p){return p.theme.palette.white;});var FeedbackButtonStyle=css$2(templateObject_14$2$1||(templateObject_14$2$1=__makeTemplateObject(["\n min-width: auto;\n padding: 0 4px;\n\n && {\n margin-right: 0;\n }\n\n i {\n font-size: ","px;\n height: ","px;\n line-height: ","px;\n }\n"],["\n min-width: auto;\n padding: 0 4px;\n\n && {\n margin-right: 0;\n }\n\n i {\n font-size: ","px;\n height: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium+2,fontSizeMedium+2,fontSizeMedium+2);var StyledLikeButton$1=_styled(LikeButton).withConfig({displayName:"CommentDisplay__StyledLikeButton",componentId:"sc-el7c23-12"})(templateObject_15$2$1||(templateObject_15$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),FeedbackButtonStyle);var ReplyCountButton=_styled(FeedbackCountButton).withConfig({displayName:"CommentDisplay__ReplyCountButton",componentId:"sc-el7c23-13"})(templateObject_16$2||(templateObject_16$2=__makeTemplateObject(["\n &&& {\n margin-right: ","px;\n }\n ","\n"],["\n &&& {\n margin-right: ","px;\n }\n ","\n"])),spacingS,FeedbackButtonStyle);var templateObject_1$1E,templateObject_2$Y,templateObject_3$G,templateObject_4$s,templateObject_5$p,templateObject_6$f,templateObject_7$b,templateObject_8$a,templateObject_9$8,templateObject_10$7,templateObject_11$3,templateObject_12$2$1,templateObject_13$2$1,templateObject_14$2$1,templateObject_15$2$1,templateObject_16$2;var CardStatisticItem=function CardStatisticItem(_a){var count=_a.count,tooltipResourceKey=_a.tooltipResourceKey,icon=_a.icon,ariaLabel=_a.ariaLabel,targetRoute=_a.targetRoute,highlight=_a.highlight,onClick=_a.onClick,className=_a.className,domIdentifier=_a.domIdentifier;var formatMessage=useIntl().formatMessage;return jsx$1(Tooltip,__assign({resourceKey:tooltipResourceKey,values:{count:count},className:className},{children:onClick?jsx$1(StatisticButton,__assign({"data-statistic-button":domIdentifier,iconProps:{iconName:icon},onClick:onClick,"aria-label":formatMessage({id:ariaLabel})},{children:count>0&&jsx$1(StatisticCount,__assign({"aria-hidden":"true"},{children:count}),void 0)}),void 0):jsxs(StatisticLink,__assign({to:targetRoute,"aria-label":formatMessage({id:ariaLabel})},{children:[jsx$1(StatisticIcon,{iconName:icon,highlight:highlight},void 0),count>0&&jsx$1(StatisticCount,__assign({"aria-hidden":"true"},{children:count}),void 0)]}),void 0)}),void 0);};var StatisticLink=_styled(NavLink).withConfig({displayName:"CardStatisticItem__StatisticLink",componentId:"sc-1ll8iv5-0"})(templateObject_1$1D||(templateObject_1$1D=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n color: ",";\n height: ","px;\n"],["\n display: inline-flex;\n align-items: center;\n color: ",";\n height: ","px;\n"])),function(p){return p.theme.textColors.default;},feedbackButtonHeight);var StatisticButton=_styled(IconButton).withConfig({displayName:"CardStatisticItem__StatisticButton",componentId:"sc-1ll8iv5-1"})(templateObject_2$X||(templateObject_2$X=__makeTemplateObject(["\n && {\n width: auto;\n margin: 0;\n padding: 0;\n\n i {\n font-size: ","px;\n }\n }\n"],["\n && {\n width: auto;\n margin: 0;\n padding: 0;\n\n i {\n font-size: ","px;\n }\n }\n"])),fontSizeLarge-3);var StatisticIcon=_styled(Icon).withConfig({displayName:"CardStatisticItem__StatisticIcon",componentId:"sc-1ll8iv5-2"})(templateObject_3$F||(templateObject_3$F=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StatisticCount=_styled.span.withConfig({displayName:"CardStatisticItem__StatisticCount",componentId:"sc-1ll8iv5-3"})(templateObject_4$r||(templateObject_4$r=__makeTemplateObject(["\n flex: 1 0 auto;\n padding-left: 5px;\n font-size: 0.9rem;\n"],["\n flex: 1 0 auto;\n padding-left: 5px;\n font-size: 0.9rem;\n"])));var templateObject_1$1D,templateObject_2$X,templateObject_3$F,templateObject_4$r;var BookmarkButton=function BookmarkButton(_a){var item=_a.item,isReadOnly=_a.isReadOnly,className=_a.className;var formatMessage=useIntl().formatMessage;var refreshStatistics=useNewsApi().refreshStatistics;var toggleBookmark=useManageCurrentUserApi().toggleBookmark;var user=useCurrentUser();var showError=useNotificationContext().showError;var _b=useState$2(isUserBookmarked),isBookmarked=_b[0],setIsBookmarked=_b[1];var _c=useState$2(false),isSaving=_c[0],setIsSaving=_c[1];var itemId=item===null||item===void 0?void 0:item.id;var resourceKey="BookmarkButton."+(isBookmarked?'remove':'add')+"Tooltip";useEffect$1(function(){setIsBookmarked(isUserBookmarked());// eslint-disable-next-line react-hooks/exhaustive-deps
126283
- },[itemId]);return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey},{children:jsx$1(StyledIconButton$5,{iconProps:{iconName:isBookmarked?'SingleBookmarkSolid':'SingleBookmark'},"data-bookmark-button":itemId,onClick:toggle,"aria-label":formatMessage({id:resourceKey}),disabled:isReadOnly},void 0)}),void 0);function isUserBookmarked(){var _a;return (_a=user.bookmarks)===null||_a===void 0?void 0:_a.some(function(id){return id===(item===null||item===void 0?void 0:item.id);});}function toggle(e){return __awaiter(this,void 0,void 0,function(){var isNowBookmarked;return __generator(this,function(_a){switch(_a.label){case 0:e.preventDefault();e.stopPropagation();if(isSaving){return [2/*return*/];}setIsSaving(true);isNowBookmarked=!isBookmarked;setIsBookmarked(isNowBookmarked);_a.label=1;case 1:_a.trys.push([1,4,5,6]);return [4/*yield*/,toggleBookmark(itemId,user)];case 2:_a.sent();return [4/*yield*/,refreshStatistics(itemId,{bookmarkCount:isNowBookmarked?1:-1})];case 3:_a.sent();return [3/*break*/,6];case 4:_a.sent();setIsBookmarked(!isNowBookmarked);showError('Profile.bookmarkError');return [3/*break*/,6];case 5:setIsSaving(false);return [7/*endfinally*/];case 6:return [2/*return*/];}});});}};var StyledIconButton$5=_styled(IconButton).withConfig({displayName:"BookmarkButton__StyledIconButton",componentId:"sc-1ni4s3y-0"})(templateObject_1$1C||(templateObject_1$1C=__makeTemplateObject(["\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n i {\n font-size: 22px;\n }\n\n &[disabled] {\n background: transparent;\n }\n"],["\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n i {\n font-size: 22px;\n }\n\n &[disabled] {\n background: transparent;\n }\n"])));var templateObject_1$1C;var CardFooter=function CardFooter(_a){var item=_a.item,showComments=_a.showComments,targetRoute=_a.targetRoute;var metadata=item.metadata||{};var user=useCurrentUser();var showCommentsIcon=showComments&&item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(metadata.feedbackSettings,'comment');return jsx$1(CardFooterHost,{children:jsxs(FooterRightSection,{children:[!item.useExternalContent&&jsx$1(CardLikeButton,{item:item,itemResourceType:ItemResourceTypes.News},void 0),!user.isPublicUser&&!item.useExternalContent&&showCommentsIcon&&jsx$1(CardStatisticItem,{count:item.statistics.commentCount,tooltipResourceKey:"NewsArticle.numberOfComments",icon:"Chat",targetRoute:targetRoute+"#comments",highlight:item.hasNewComments,ariaLabel:"AriaLabel.commentsButton"},void 0),jsx$1(BookmarkButton,{item:item},void 0)]},void 0)},void 0);};var CardFooterHost=_styled.footer.withConfig({displayName:"CardFooter__CardFooterHost",componentId:"sc-8sbpem-0"})(templateObject_1$1B||(templateObject_1$1B=__makeTemplateObject(["\n display: flex;\n margin-top: auto;\n margin-bottom: -4px;\n flex-direction: row;\n justify-content: space-between;\n\n padding-top: ","px;\n\n font-size: ","px;\n\n > div {\n display: flex;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n margin-top: auto;\n margin-bottom: -4px;\n flex-direction: row;\n justify-content: space-between;\n\n padding-top: ","px;\n\n font-size: ","px;\n\n > div {\n display: flex;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,fontSizeMedium+4);var FooterRightSection=_styled.div.withConfig({displayName:"CardFooter__FooterRightSection",componentId:"sc-8sbpem-1"})(templateObject_2$W||(templateObject_2$W=__makeTemplateObject(["\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n }\n\n flex: 1 0 ","px;\n justify-content: flex-end;\n > * {\n margin-left: ","px;\n }\n"],["\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n }\n\n flex: 1 0 ","px;\n justify-content: flex-end;\n > * {\n margin-left: ","px;\n }\n"])),spacingXl,spacingS+5);var templateObject_1$1B,templateObject_2$W;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$B,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$3$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$B=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$1A||(templateObject_1$1A=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$3$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$V||(templateObject_2$V=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$E||(templateObject_3$E=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$q||(templateObject_4$q=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$o||(templateObject_5$o=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$e||(templateObject_6$e=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$1A,templateObject_2$V,templateObject_3$E,templateObject_4$q,templateObject_5$o,templateObject_6$e;var DetailViewContext=/*#__PURE__*/createContext(null);function useDetailViewContext(){return useContext(DetailViewContext);}var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$1z||(templateObject_1$1z=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$1z;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,mode:"read",width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$1y||(templateObject_1$1y=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$1y;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$1x||(templateObject_1$1x=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$1x;var ItemBodyWrapper=function ItemBodyWrapper(_a){var className=_a.className,children=_a.children;return jsx$1(Host$A,__assign({className:className,"data-body-wrapper":true},{children:children}),void 0);};var Host$A=_styled.div.withConfig({displayName:"ItemBodyWrapper__Host",componentId:"sc-6adwhw-0"})(templateObject_1$1w||(templateObject_1$1w=__makeTemplateObject(["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"],["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS,function(p){return p.theme.palette.accent;},maxScreenSize.medium,fontSizeLarge-3,fontSizeLarge-5,fontSizeMedium,fontSizeSmall,minScreenSize.small);var templateObject_1$1w;var EntityType;(function(EntityType){EntityType["Video"]="video";EntityType["Image"]="image";EntityType["File"]="file";EntityType["Quote"]="quote";EntityType["InlineCode"]="inline-code";EntityType["Gallery"]="gallery";EntityType["Table"]="table";EntityType["Contact"]="contact";EntityType["InlinePageList"]="inline-page-list";EntityType["UrlPreview"]="url-preview";})(EntityType||(EntityType={}));var TextViewer=function TextViewer(_a){var html=_a.html,componentMappers=_a.componentMappers;var _b=useState$2(null),editorState=_b[0],setEditorState=_b[1];useEffect$1(function(){setEditorState(getInitialEditorState());// eslint-disable-next-line react-hooks/exhaustive-deps
126282
+ var paddingLeft$1=spacingS;var HeaderMetadata$1=_styled.div.withConfig({displayName:"CommentDisplay__HeaderMetadata",componentId:"sc-el7c23-1"})(templateObject_2$Z||(templateObject_2$Z=__makeTemplateObject(["\n flex: 1;\n box-sizing: border-box;\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(100% - ","px - ","px);\n"],["\n flex: 1;\n box-sizing: border-box;\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(100% - ","px - ","px);\n"])),fontSizeSmall,paddingLeft$1,avatarWidth$1,maxButtonsWidth$1);var CommentDisplayName=_styled.div.withConfig({displayName:"CommentDisplay__CommentDisplayName",componentId:"sc-el7c23-2"})(templateObject_3$G||(templateObject_3$G=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var StyledPersonaCard$1=_styled(PersonaCard).withConfig({displayName:"CommentDisplay__StyledPersonaCard",componentId:"sc-el7c23-3"})(templateObject_4$s||(templateObject_4$s=__makeTemplateObject(["\n && {\n max-width: 100%;\n .ms-Button {\n width: 100%;\n }\n .ms-Button-textContainer {\n width: 100%;\n }\n\n .ms-Button-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n"],["\n && {\n max-width: 100%;\n .ms-Button {\n width: 100%;\n }\n .ms-Button-textContainer {\n width: 100%;\n }\n\n .ms-Button-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n"])));var CommentDateTime=_styled(DateTime).withConfig({displayName:"CommentDisplay__CommentDateTime",componentId:"sc-el7c23-4"})(templateObject_5$p||(templateObject_5$p=__makeTemplateObject(["\n font-size: 12px;\n"],["\n font-size: 12px;\n"])));var Buttons$1=_styled.div.withConfig({displayName:"CommentDisplay__Buttons",componentId:"sc-el7c23-5"})(templateObject_6$f||(templateObject_6$f=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n\n button {\n height: auto;\n min-height: ","px; /* icons have a font-size of 20px */\n }\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n\n button {\n height: auto;\n min-height: ","px; /* icons have a font-size of 20px */\n }\n"])),fontSizeLarge);var Body=_styled.div.withConfig({displayName:"CommentDisplay__Body",componentId:"sc-el7c23-6"})(templateObject_7$b||(templateObject_7$b=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n"])));var Content$4=_styled.div.withConfig({displayName:"CommentDisplay__Content",componentId:"sc-el7c23-7"})(templateObject_8$a||(templateObject_8$a=__makeTemplateObject(["\n padding-top: ","px;\n flex: 1 1 auto;\n a {\n font-weight: bold;\n &:hover,\n &:active {\n text-decoration: underline;\n }\n }\n"],["\n padding-top: ","px;\n flex: 1 1 auto;\n a {\n font-weight: bold;\n &:hover,\n &:active {\n text-decoration: underline;\n }\n }\n"])),spacingXs);var Container$1=_styled.div.withConfig({displayName:"CommentDisplay__Container",componentId:"sc-el7c23-8"})(templateObject_10$7||(templateObject_10$7=__makeTemplateObject(["\n padding-bottom: 15px;\n font-size: ","px;\n line-height: ","px;\n\n ","\n"],["\n padding-bottom: 15px;\n font-size: ","px;\n line-height: ","px;\n\n ","\n"])),fontSizeSmall,spacingM,function(p){return p.highlight&&css$2(templateObject_9$8||(templateObject_9$8=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var CommentUser=_styled(PersonaCard).withConfig({displayName:"CommentDisplay__CommentUser",componentId:"sc-el7c23-9"})(templateObject_11$3||(templateObject_11$3=__makeTemplateObject(["\n align-self: flex-start;\n"],["\n align-self: flex-start;\n"])));var StyledEditCommentWithAttachments=_styled(EditCommentWithAttachments).withConfig({displayName:"CommentDisplay__StyledEditCommentWithAttachments",componentId:"sc-el7c23-10"})(templateObject_12$2$1||(templateObject_12$2$1=__makeTemplateObject(["\n width: 100%;\n position: relative;\n"],["\n width: 100%;\n position: relative;\n"])));var StyledImagesAndFilesList$1=_styled(ImagesAndFilesList).withConfig({displayName:"CommentDisplay__StyledImagesAndFilesList",componentId:"sc-el7c23-11"})(templateObject_13$2$1||(templateObject_13$2$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && [data-preload-video='true'] video {\n background-color: ",";\n }\n"],["\n margin-top: ","px;\n\n && [data-preload-video='true'] video {\n background-color: ",";\n }\n"])),spacingM,function(p){return p.theme.palette.white;});var FeedbackButtonStyle=css$2(templateObject_14$2$1||(templateObject_14$2$1=__makeTemplateObject(["\n min-width: auto;\n padding: 0 4px;\n\n && {\n margin-right: 0;\n }\n\n i {\n font-size: ","px;\n height: ","px;\n line-height: ","px;\n }\n"],["\n min-width: auto;\n padding: 0 4px;\n\n && {\n margin-right: 0;\n }\n\n i {\n font-size: ","px;\n height: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium+2,fontSizeMedium+2,fontSizeMedium+2);var StyledLikeButton$1=_styled(LikeButton).withConfig({displayName:"CommentDisplay__StyledLikeButton",componentId:"sc-el7c23-12"})(templateObject_15$2$1||(templateObject_15$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),FeedbackButtonStyle);var ReplyCountButton=_styled(FeedbackCountButton).withConfig({displayName:"CommentDisplay__ReplyCountButton",componentId:"sc-el7c23-13"})(templateObject_16$2||(templateObject_16$2=__makeTemplateObject(["\n &&& {\n margin-right: ","px;\n }\n ","\n"],["\n &&& {\n margin-right: ","px;\n }\n ","\n"])),spacingS,FeedbackButtonStyle);var templateObject_1$1E,templateObject_2$Z,templateObject_3$G,templateObject_4$s,templateObject_5$p,templateObject_6$f,templateObject_7$b,templateObject_8$a,templateObject_9$8,templateObject_10$7,templateObject_11$3,templateObject_12$2$1,templateObject_13$2$1,templateObject_14$2$1,templateObject_15$2$1,templateObject_16$2;var CardStatisticItem=function CardStatisticItem(_a){var count=_a.count,tooltipResourceKey=_a.tooltipResourceKey,icon=_a.icon,ariaLabel=_a.ariaLabel,targetRoute=_a.targetRoute,highlight=_a.highlight,onClick=_a.onClick,className=_a.className,domIdentifier=_a.domIdentifier;var formatMessage=useIntl().formatMessage;return jsx$1(Tooltip,__assign({resourceKey:tooltipResourceKey,values:{count:count},className:className},{children:onClick?jsx$1(StatisticButton,__assign({"data-statistic-button":domIdentifier,iconProps:{iconName:icon},onClick:onClick,"aria-label":formatMessage({id:ariaLabel})},{children:count>0&&jsx$1(StatisticCount,__assign({"aria-hidden":"true"},{children:count}),void 0)}),void 0):jsxs(StatisticLink,__assign({to:targetRoute,"aria-label":formatMessage({id:ariaLabel})},{children:[jsx$1(StatisticIcon,{iconName:icon,highlight:highlight},void 0),count>0&&jsx$1(StatisticCount,__assign({"aria-hidden":"true"},{children:count}),void 0)]}),void 0)}),void 0);};var StatisticLink=_styled(NavLink).withConfig({displayName:"CardStatisticItem__StatisticLink",componentId:"sc-1ll8iv5-0"})(templateObject_1$1D||(templateObject_1$1D=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n color: ",";\n height: ","px;\n"],["\n display: inline-flex;\n align-items: center;\n color: ",";\n height: ","px;\n"])),function(p){return p.theme.textColors.default;},feedbackButtonHeight);var StatisticButton=_styled(IconButton).withConfig({displayName:"CardStatisticItem__StatisticButton",componentId:"sc-1ll8iv5-1"})(templateObject_2$Y||(templateObject_2$Y=__makeTemplateObject(["\n && {\n width: auto;\n margin: 0;\n padding: 0;\n\n i {\n font-size: ","px;\n }\n }\n"],["\n && {\n width: auto;\n margin: 0;\n padding: 0;\n\n i {\n font-size: ","px;\n }\n }\n"])),fontSizeLarge-3);var StatisticIcon=_styled(Icon).withConfig({displayName:"CardStatisticItem__StatisticIcon",componentId:"sc-1ll8iv5-2"})(templateObject_3$F||(templateObject_3$F=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StatisticCount=_styled.span.withConfig({displayName:"CardStatisticItem__StatisticCount",componentId:"sc-1ll8iv5-3"})(templateObject_4$r||(templateObject_4$r=__makeTemplateObject(["\n flex: 1 0 auto;\n padding-left: 5px;\n font-size: 0.9rem;\n"],["\n flex: 1 0 auto;\n padding-left: 5px;\n font-size: 0.9rem;\n"])));var templateObject_1$1D,templateObject_2$Y,templateObject_3$F,templateObject_4$r;var BookmarkButton=function BookmarkButton(_a){var item=_a.item,isReadOnly=_a.isReadOnly,className=_a.className;var formatMessage=useIntl().formatMessage;var refreshStatistics=useNewsApi().refreshStatistics;var toggleBookmark=useManageCurrentUserApi().toggleBookmark;var user=useCurrentUser();var showError=useNotificationContext().showError;var _b=useState$2(isUserBookmarked),isBookmarked=_b[0],setIsBookmarked=_b[1];var _c=useState$2(false),isSaving=_c[0],setIsSaving=_c[1];var itemId=item===null||item===void 0?void 0:item.id;var resourceKey="BookmarkButton."+(isBookmarked?'remove':'add')+"Tooltip";useEffect$1(function(){setIsBookmarked(isUserBookmarked());// eslint-disable-next-line react-hooks/exhaustive-deps
126283
+ },[itemId]);return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey},{children:jsx$1(StyledIconButton$5,{iconProps:{iconName:isBookmarked?'SingleBookmarkSolid':'SingleBookmark'},"data-bookmark-button":itemId,onClick:toggle,"aria-label":formatMessage({id:resourceKey}),disabled:isReadOnly},void 0)}),void 0);function isUserBookmarked(){var _a;return (_a=user.bookmarks)===null||_a===void 0?void 0:_a.some(function(id){return id===(item===null||item===void 0?void 0:item.id);});}function toggle(e){return __awaiter(this,void 0,void 0,function(){var isNowBookmarked;return __generator(this,function(_a){switch(_a.label){case 0:e.preventDefault();e.stopPropagation();if(isSaving){return [2/*return*/];}setIsSaving(true);isNowBookmarked=!isBookmarked;setIsBookmarked(isNowBookmarked);_a.label=1;case 1:_a.trys.push([1,4,5,6]);return [4/*yield*/,toggleBookmark(itemId,user)];case 2:_a.sent();return [4/*yield*/,refreshStatistics(itemId,{bookmarkCount:isNowBookmarked?1:-1})];case 3:_a.sent();return [3/*break*/,6];case 4:_a.sent();setIsBookmarked(!isNowBookmarked);showError('Profile.bookmarkError');return [3/*break*/,6];case 5:setIsSaving(false);return [7/*endfinally*/];case 6:return [2/*return*/];}});});}};var StyledIconButton$5=_styled(IconButton).withConfig({displayName:"BookmarkButton__StyledIconButton",componentId:"sc-1ni4s3y-0"})(templateObject_1$1C||(templateObject_1$1C=__makeTemplateObject(["\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n i {\n font-size: 22px;\n }\n\n &[disabled] {\n background: transparent;\n }\n"],["\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n i {\n font-size: 22px;\n }\n\n &[disabled] {\n background: transparent;\n }\n"])));var templateObject_1$1C;var CardFooter=function CardFooter(_a){var item=_a.item,showComments=_a.showComments,targetRoute=_a.targetRoute;var metadata=item.metadata||{};var user=useCurrentUser();var showCommentsIcon=showComments&&item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(metadata.feedbackSettings,'comment');return jsx$1(CardFooterHost,{children:jsxs(FooterRightSection,{children:[!item.useExternalContent&&jsx$1(CardLikeButton,{item:item,itemResourceType:ItemResourceTypes.News},void 0),!user.isPublicUser&&!item.useExternalContent&&showCommentsIcon&&jsx$1(CardStatisticItem,{count:item.statistics.commentCount,tooltipResourceKey:"NewsArticle.numberOfComments",icon:"Chat",targetRoute:targetRoute+"#comments",highlight:item.hasNewComments,ariaLabel:"AriaLabel.commentsButton"},void 0),jsx$1(BookmarkButton,{item:item},void 0)]},void 0)},void 0);};var CardFooterHost=_styled.footer.withConfig({displayName:"CardFooter__CardFooterHost",componentId:"sc-8sbpem-0"})(templateObject_1$1B||(templateObject_1$1B=__makeTemplateObject(["\n display: flex;\n margin-top: auto;\n margin-bottom: -4px;\n flex-direction: row;\n justify-content: space-between;\n\n padding-top: ","px;\n\n font-size: ","px;\n\n > div {\n display: flex;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n margin-top: auto;\n margin-bottom: -4px;\n flex-direction: row;\n justify-content: space-between;\n\n padding-top: ","px;\n\n font-size: ","px;\n\n > div {\n display: flex;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,fontSizeMedium+4);var FooterRightSection=_styled.div.withConfig({displayName:"CardFooter__FooterRightSection",componentId:"sc-8sbpem-1"})(templateObject_2$X||(templateObject_2$X=__makeTemplateObject(["\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n }\n\n flex: 1 0 ","px;\n justify-content: flex-end;\n > * {\n margin-left: ","px;\n }\n"],["\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n }\n\n flex: 1 0 ","px;\n justify-content: flex-end;\n > * {\n margin-left: ","px;\n }\n"])),spacingXl,spacingS+5);var templateObject_1$1B,templateObject_2$X;var DetailViewContextProvider=function DetailViewContextProvider(_a){var itemId=_a.itemId,type=_a.type,loadItemFunc=_a.loadItemFunc,isReadOnly=_a.isReadOnly,children=_a.children;var user=useCurrentUserContext().user;var handleFatalError=useContext(ErrorContext).handleFatalError;var translateContents=useTranslateApi().translateContents;var _b=useState$2(),item=_b[0],setItem=_b[1];var _c=useState$2(),originalItem=_c[0],setOriginalItem=_c[1];var _d=useState$2(),selectedLanguage=_d[0],setSelectedLanguage=_d[1];var _e=useState$2(false),hasError=_e[0],setHasError=_e[1];var _f=useState$2(true),isLoading=_f[0],setIsLoading=_f[1];var _g=useState$2(false),showAccessDenied=_g[0],setShowAccessDenied=_g[1];var handleAccessDeniedError=useContext(ErrorContext).handleAccessDeniedError;var isValid=true;useEffect$1(function(){refreshItem();return function(){// eslint-disable-next-line react-hooks/exhaustive-deps
126284
+ isValid=false;};},[itemId]);if(showAccessDenied){handleAccessDeniedError({});return null;}var activeLanguages=NewsService.getItemContentLanguages(originalItem,user.subscription.languages);return jsx$1(DetailViewContext.Provider,__assign({value:getContextValues()},{children:children}),void 0);function getContextValues(){return {isLoading:isLoading,hasError:hasError,resourceType:type,item:item,itemId:itemId,contentLanguage:selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.lang,userPreferredLanguage:(selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.isUserSet)?selectedLanguage.lang:getPreferredContentLanguage(user),activeLanguages:activeLanguages,content:item&&selectedLanguage?item.contents[selectedLanguage.lang]:null,updateSelectedLanguage:function(l){return setSelectedLanguage({lang:l,isUserSet:true});},handleRefresh:handleRefresh,handleLanguageChange:handleLanguageChange,isReadOnly:isReadOnly};}function handleRefresh(onFinished){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,refreshItem()];case 1:_a.sent();onFinished&&onFinished();return [2/*return*/];}});});}function refreshItem(){return __awaiter(this,void 0,void 0,function(){var p,selectedLanguage_1,err_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,3,4]);return [4/*yield*/,loadItemFunc(itemId)];case 1:p=_a.sent();selectedLanguage_1=NewsService.getLanguageForPublishableItem(p,user);if(isValid){setItem(p);setOriginalItem(p);setSelectedLanguage({isUserSet:false,lang:selectedLanguage_1});setHasError(false);}return [3/*break*/,4];case 2:err_1=_a.sent();if(err_1&&err_1.response&&err_1.response.statusCode===404){if(isValid){setItem(null);setSelectedLanguage(null);setHasError(true);}}else if(err_1&&err_1.response&&err_1.response.statusCode===403){setShowAccessDenied(true);}else {logger.error(err_1);handleFatalError({error:err_1,messageId:'Generic.error'});}return [3/*break*/,4];case 3:isValid&&setIsLoading(false);return [7/*endfinally*/];case 4:return [2/*return*/];}});});}function handleLanguageChange(language){return __awaiter(this,void 0,void 0,function(){var content;var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(item.contents[language]){setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}return [4/*yield*/,translateContents(type,itemId,language)];case 1:content=_b.sent();setItem(__assign(__assign({},item),{contents:__assign(__assign({},item.contents),(_a={},_a[language]=content,_a))}));setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}});});}};var EntityType;(function(EntityType){EntityType["Video"]="video";EntityType["Image"]="image";EntityType["File"]="file";EntityType["Quote"]="quote";EntityType["InlineCode"]="inline-code";EntityType["Gallery"]="gallery";EntityType["Table"]="table";EntityType["Contact"]="contact";EntityType["InlinePageList"]="inline-page-list";EntityType["UrlPreview"]="url-preview";})(EntityType||(EntityType={}));var TextViewer=function TextViewer(_a){var html=_a.html,componentMappers=_a.componentMappers;var _b=useState$2(null),editorState=_b[0],setEditorState=_b[1];useEffect$1(function(){setEditorState(getInitialEditorState());// eslint-disable-next-line react-hooks/exhaustive-deps
126284
126285
  },[html]);if(!editorState){return null;}var currentContent=editorState.getCurrentContent();return jsx$1(Draft$1.Editor,{readOnly:true,editorState:editorState,onChange:function(){return null;},blockRendererFn:blockRenderer,blockStyleFn:blockStyle},void 0);function blockStyle(block){var type=block.getType();if(type==='unstyled'){return 'paragraph';}return null;}function blockRenderer(block){if(block.getType()!=='atomic'){return null;}var entityKey=block.getEntityAt(0);if(entityKey==null){return null;}var entity=currentContent.getEntity(entityKey);var handler=componentMappers.find(function(h){return h.type===entity.getType();});if(handler!=null){return {component:handler.component,editable:false,props:__assign({},entity.getData())};}return null;}function getInitialEditorState(){var contentState=convertFromHTML$1({htmlToEntity:convertHtmlToEntity,htmlToBlock:createHtmlToBlockConverter(componentMappers)})(html||'');return Draft$1.EditorState.createWithContent(contentState,decorator);}function convertHtmlToEntity(nodeName,node,createEntity){for(var _i=0,componentMappers_1=componentMappers;_i<componentMappers_1.length;_i++){var handler=componentMappers_1[_i];var match=handler.getPropsFromHtml(nodeName,node);if(match){return createEntity(handler.type,'IMMUTABLE',match);}}if(nodeName==='a'){return createEntity('LINK','MUTABLE',{url:node.getAttribute('href')});}return null;}};var Link$1=function Link(_a){var contentState=_a.contentState,entityKey=_a.entityKey,children=_a.children;var url=contentState.getEntity(entityKey).getData().url;return jsx$1(TextLink,__assign({url:url},{children:children}),void 0);};function findLinkEntities(contentBlock,callback,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentState.getEntity(entityKey).getType()==='LINK';},callback);}var decorator=new Draft$1.CompositeDecorator([{strategy:findLinkEntities,component:Link$1}]);function createHtmlToBlockConverter(componentMappers){var componentMapperParentNodes=[];return function(nodeName,node){// note (sl): draftJS does call this for all root elements AND
126285
126286
  // their children. We only want to handle an element,
126286
126287
  // if the childs parent is not a custom component, which we already handled ourselves.
@@ -126297,11 +126298,7 @@ var paddingLeft$1=spacingS;var HeaderMetadata$1=_styled.div.withConfig({displayN
126297
126298
  var _a;if(componentMapperParentNodes.some(function(n){return n.contains(node);})){return false;}for(var _i=0,componentMappers_2=componentMappers;_i<componentMappers_2.length;_i++){var handler=componentMappers_2[_i];var match=handler.getPropsFromHtml(nodeName,node);if(match){componentMapperParentNodes.push(node);handler.prepareRootNode&&handler.prepareRootNode(node);}}if(nodeName==='div'){return 'atomic';}if(nodeName==='p'&&((_a=node.innerHTML)===null||_a===void 0?void 0:_a.trim())==='<br>'){// Quill used to generate <p><br></p> for empty rows
126298
126299
  // This is not compatible with draftJS.
126299
126300
  // Hence we remove the innerHTML for empty p tags.
126300
- node.innerHTML='';}return null;};}var FileListHost=_styled.ul.withConfig({displayName:"InlineFileStyles__FileListHost",componentId:"sc-1qjkw11-0"})(templateObject_1$1v||(templateObject_1$1v=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"])));var FileListItem=_styled.li.withConfig({displayName:"InlineFileStyles__FileListItem",componentId:"sc-1qjkw11-1"})(templateObject_2$U||(templateObject_2$U=__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"])),spacingM,minScreenSize.small,spacingS-5);var FileContainerStyle=css$2(templateObject_3$D||(templateObject_3$D=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"],["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"])),spacingS,spacingS+5,fontSizeSmall);var FileIconStyle=css$2(templateObject_4$p||(templateObject_4$p=__makeTemplateObject(["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"],["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"])),spacingS,fontSizeLarge-3);var templateObject_1$1v,templateObject_2$U,templateObject_3$D,templateObject_4$p;var InlineFileDownloadButton=function InlineFileDownloadButton(_a){var getFileUrl=_a.getFileUrl,fileName=_a.fileName,title=_a.title,fileAccessToken=_a.fileAccessToken,additionalContent=_a.additionalContent,className=_a.className;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;var iconName=getFileIcon(fileName);if(!getFileUrl){return jsxs(FileHost,__assign({className:className,title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0);}return jsx$1(DownloadButton$3,__assign({className:className,onClick:createDownloadClickHandler('_blank',function(){return __awaiter(void 0,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(token)];}});});})},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var FileHost=_styled.div.withConfig({displayName:"InlineFileDownloadButton__FileHost",componentId:"sc-1nadbt8-0"})(templateObject_1$1u||(templateObject_1$1u=__makeTemplateObject(["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"],["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])),FileContainerStyle,FileIconStyle);var DownloadButton$3=_styled(DefaultButton).withConfig({displayName:"InlineFileDownloadButton__DownloadButton",componentId:"sc-1nadbt8-1"})(templateObject_2$T||(templateObject_2$T=__makeTemplateObject(["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"],["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"])),function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var DownloadLink$1=_styled.a.withConfig({displayName:"InlineFileDownloadButton__DownloadLink",componentId:"sc-1nadbt8-2"})(templateObject_3$C||(templateObject_3$C=__makeTemplateObject(["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.palette.neutralPrimary;});var templateObject_1$1u,templateObject_2$T,templateObject_3$C;var InlinePageDocumentDownloadButton=function InlinePageDocumentDownloadButton(_a){var fileUrl=_a.fileUrl,fileName=_a.fileName,title=_a.title,fileIconName=_a.fileIconName,onClick=_a.onClick,className=_a.className;var iconName=fileIconName||getFileIcon(fileName);return jsx$1(DownloadLink$1,__assign({href:fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:onClick,className:className},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var InlineFileList=function InlineFileList(_a){var fileBlock=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var getFileUrlWithToken=useFileApi().getFileUrlWithToken;if(!fileBlock.files||fileBlock.files.length===0){return null;}var files=fileBlock.files.map(function(f){if(f.pageId){return __assign({},f);}var getFileUrl=function getFileUrl(token){var _a;return ((_a=f.getDownloadUrl)===null||_a===void 0?void 0:_a.call(f,token))||getFileUrlWithToken(token||item.fileAccessToken,item.id,undefined,f.fileId,f.fileName,resourceType);};return __assign(__assign({},f),{getDownloadUrl:getFileUrl,accessToken:item.fileAccessToken});});var audioFiles=files.filter(function(f){return isAudioFile(f.fileName);});var videoFiles=files.filter(function(f){return isVideoFile(f.fileName);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(FileListHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(VideoFileHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:jsx$1(VideoFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)}),void 0)},f.fileId);})}),void 0),audioFiles.length>0&&jsx$1(FileListHost,{children:audioFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(AudioFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)},f.fileId);})},void 0),otherFiles.length>0&&jsx$1(FileListHost,{children:otherFiles.map(function(f){return jsx$1(FileListItem,{children:f.pageId?jsx$1(InlinePageDocument,{file:f},void 0):jsx$1(InlineFileDownloadButton,{getFileUrl:f.getDownloadUrl,fileAccessToken:item.fileAccessToken,fileName:f.fileName,title:f.title},void 0)},f.fileId);})},void 0)]},void 0);};var InlinePageDocument=function InlinePageDocument(_a){var file=_a.file;var pageId=file.pageId;var loadPage=usePagesApi().loadPage;var page=usePromise$2(function(){return loadPage(pageId);},undefined,[pageId])[0];var _b=useInlinePageDocument(file,page),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsx$1(InlinePageDocumentDownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0);};var InlineFileMapper={component:InlineFileList,type:EntityType.File,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-file-block');if(!blockId){var fileId=node.getAttribute('data-file-id')||node.getAttribute('data-file-fileid');if(fileId==null){return null;}var title=node.getAttribute('data-file-title');var fileName=node.getAttribute('data-file-name');var pageId=node.getAttribute('data-inline-page-document-id');var extension=node.getAttribute('data-file-extension');return {blockId:createId(),files:[{fileId:fileId,title:title,fileName:fileName,pageId:pageId,extension:extension}]};}return {blockId:blockId,files:Array.from(node.querySelectorAll('[data-file-id], [data-file-fileid]')).map(function(fileNode){var _a;return {fileId:(_a=fileNode.getAttribute('data-file-id'))!==null&&_a!==void 0?_a:fileNode.getAttribute('data-file-fileid'),fileName:fileNode.getAttribute('data-file-name'),title:fileNode.getAttribute('data-file-title'),pageId:fileNode.getAttribute('data-inline-page-document-id'),extension:fileNode.getAttribute('data-file-extension')};})};}};var VideoFileHost=_styled.div.withConfig({displayName:"InlineFileList__VideoFileHost",componentId:"sc-16i3l51-0"})(templateObject_1$1t||(templateObject_1$1t=__makeTemplateObject(["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var templateObject_1$1t;var InlineQuoteViewer=function InlineQuoteViewer(_a){var _b,_c;var quoteDetails=_a.quoteDetails,onClick=_a.onClick,className=_a.className;var upn=(_b=quoteDetails.author)===null||_b===void 0?void 0:_b.userPrincipalName;var displayName=(_c=quoteDetails.author)===null||_c===void 0?void 0:_c.displayName;var showAvatar=upn&&quoteDetails.showAvatar;return jsxs(Host$z,__assign({onClick:onClick,"data-inline-quote":true,className:className},{children:[jsx$1("blockquote",{children:quoteDetails.text},void 0),showAvatar&&jsx$1("figcaption",{children:jsx$1(PersonaCard,__assign({upn:upn},{children:jsx$1(Avatar,{upn:upn,text:displayName,secondaryText:upn},void 0)}),void 0)},void 0),!showAvatar&&displayName&&jsx$1("figcaption",{children:displayName},void 0)]}),void 0);};var Host$z=_styled.figure.withConfig({displayName:"InlineQuoteViewer__Host",componentId:"sc-1kb6gh1-0"})(templateObject_1$1s||(templateObject_1$1s=__makeTemplateObject(["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"],["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;},spacingM,2*spacingXl,spacingXl,spacingS,fontSizeSmall,maxScreenSize.medium);var templateObject_1$1s;var InlineQuote=function InlineQuote(_a){var quoteDetails=_a.blockProps;return jsx$1(InlineQuoteViewer,{quoteDetails:quoteDetails},void 0);};var InlineQuoteMapper={component:InlineQuote,type:EntityType.Quote,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var quoteId=node.getAttribute('data-quote-id');if(quoteId==null){return null;}var upn=node.getAttribute('data-quote-authorupn');var text=(_b=(_a=node.querySelector('blockquote'))===null||_a===void 0?void 0:_a.innerText)!==null&&_b!==void 0?_b:// use legacy attribute for old content
126301
- node.getAttribute('data-quote-text');var displayName=(_d=(_c=node.querySelector('figcaption'))===null||_c===void 0?void 0:_c.innerText)!==null&&_d!==void 0?_d:// use legacy attribute for old content
126302
- node.getAttribute('data-quote-authorname');var showAvatar=node.getAttribute('data-quote-showavatar')==='true';var hasAuthor=upn||displayName;return {id:quoteId,text:text,author:hasAuthor?{userPrincipalName:upn,displayName:displayName}:null,showAvatar:showAvatar};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
126303
- // in order to ensure parsing old blocks
126304
- if(node.querySelector('blockquote[data-quote-text]')==null){node.innerHTML='';}}};var InlineObjectToolbar=function InlineObjectToolbar(_a){var onDelete=_a.onDelete,additionalButtons=_a.additionalButtons;var formatMessage=useIntl().formatMessage;return jsxs(Toolbar,__assign({className:"inline-object-toolbar",alwaysShown:env.isTouchDevice},{children:[onDelete&&jsx$1(IconButton,{iconProps:{iconName:'Delete'},onMouseDown:function(e){return e.preventDefault();},onClick:onDelete,"data-inline-object-toolbar-delete-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.removeItem'})},void 0),additionalButtons]}),void 0);};var Toolbar=_styled.div.withConfig({displayName:"InlineObjectToolbar__Toolbar",componentId:"sc-1cbis2b-0"})(templateObject_3$B||(templateObject_3$B=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n padding: 0 ","px;\n height: 36px;\n display: flex;\n align-items: center;\n\n transition: 0.2s ease-out;\n transition-property: opacity, margin;\n background-color: rgba(255, 255, 255, 0.81);\n ","\n\n i {\n text-shadow: white 1px 1px 3px;\n }\n\n &:focus-within {\n opacity: 1;\n z-index: 2;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n padding: 0 ","px;\n height: 36px;\n display: flex;\n align-items: center;\n\n transition: 0.2s ease-out;\n transition-property: opacity, margin;\n background-color: rgba(255, 255, 255, 0.81);\n ","\n\n i {\n text-shadow: white 1px 1px 3px;\n }\n\n &:focus-within {\n opacity: 1;\n z-index: 2;\n }\n"])),spacingS,function(p){return p.alwaysShown?css$2(templateObject_1$1r||(templateObject_1$1r=__makeTemplateObject(["\n opacity: 1;\n z-index: 2;\n "],["\n opacity: 1;\n z-index: 2;\n "]))):css$2(templateObject_2$S||(templateObject_2$S=__makeTemplateObject(["\n opacity: 0;\n z-index: -1;\n "],["\n opacity: 0;\n z-index: -1;\n "])));});var InlineObjectToolbarWrapper=function InlineObjectToolbarWrapper(_a){var toolbar=_a.toolbar,children=_a.children;return jsxs(ObjectHost,__assign({showToolbarOnHover:toolbar!=null},{children:[toolbar,children]}),void 0);};var ObjectHost=_styled.div.withConfig({displayName:"InlineObjectToolbar__ObjectHost",componentId:"sc-1cbis2b-1"})(templateObject_5$n||(templateObject_5$n=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n\n ","\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n\n ","\n"])),function(p){return p.showToolbarOnHover&&css$2(templateObject_4$o||(templateObject_4$o=__makeTemplateObject(["\n &:hover .inline-object-toolbar {\n opacity: 1;\n z-index: 2;\n }\n "],["\n &:hover .inline-object-toolbar {\n opacity: 1;\n z-index: 2;\n }\n "])));});var templateObject_1$1r,templateObject_2$S,templateObject_3$B,templateObject_4$o,templateObject_5$n;var ImageToolbar=function ImageToolbar(_a){var onDelete=_a.onDelete,onFullScreen=_a.onFullScreen,onClose=_a.onClose,onCrop=_a.onCrop,showFullScreenButton=_a.showFullScreenButton,showCloseButton=_a.showCloseButton,showCropButton=_a.showCropButton;var formatMessage=useIntl().formatMessage;return jsx$1(InlineObjectToolbar,{onDelete:onDelete,additionalButtons:jsxs(Fragment,{children:[showFullScreenButton&&jsx$1(IconButton,{iconProps:{iconName:'FullScreen'},onMouseDown:function(e){return e.preventDefault();},onClick:onFullScreen,"data-image-toolbar-full-screen-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.viewFullScreen'})},void 0),showCropButton&&jsx$1(IconButton,{iconProps:{iconName:'EditPhoto'},onMouseDown:function(e){return e.preventDefault();},onClick:onCrop,"data-image-toolbar-crop-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.editImage'})},void 0),showCloseButton&&jsx$1(IconButton,{iconProps:{iconName:'ChromeClose'},onMouseDown:function(e){return e.preventDefault();},onClick:onClose,"data-image-toolbar-close-button":true,ariaLabel:formatMessage({id:'AriaLabel.cancelButton'})},void 0)]},void 0)},void 0);};var PhotoGallerySlider=function PhotoGallerySlider(_a){var gallery=_a.gallery,imageUrlResolver=_a.imageUrlResolver,onCloseGallery=_a.onCloseGallery,onOpenFullScreen=_a.onOpenFullScreen,showFullScreenButton=_a.showFullScreenButton,showCloseButton=_a.showCloseButton,height=_a.height;var pullToRefreshContext=useContext(PullToRefreshContext);var _b=useState$2(null),fullScreenItemIndex=_b[0],setFullScreenItemIndex=_b[1];var _c=useState$2(false),isFullScreenOpen=_c[0],setIsFullScreenOpen=_c[1];var formatMessage=useIntl().formatMessage;var themePrimary=useContext(ThemeContext$1).theme.palette.themePrimary;useEffect$1(function(){addBackButtonListener(handleBackButton);return function(){return removeBackButtonListener(handleBackButton);};function handleBackButton(){if(isFullScreenOpen){handleCloseFullScreen();return true;}return false;}// eslint-disable-next-line react-hooks/exhaustive-deps
126301
+ node.innerHTML='';}return null;};}var InlineUrlPreview=function InlineUrlPreview(_a){var _b=_a.blockProps,itemId=_b.itemId,type=_b.type,subscriptionIdentifier=_b.subscriptionIdentifier;var user=useCurrentUser();if(subscriptionIdentifier!==user.subscription.id&&subscriptionIdentifier!==user.subscription.subscriptionHandle){return null;}return jsx$1(EmbeddedObjectTile,{id:itemId,type:parseInt(type),previewTheme:"dark"},void 0);};var InlineUrlPreviewMapper={component:InlineUrlPreview,type:EntityType.UrlPreview,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var itemId=node.getAttribute('data-item-id');if(itemId==null){return null;}return {itemId:itemId,type:node.getAttribute('data-type'),subscriptionIdentifier:node.getAttribute('data-subscription-identifier')};}};var InlineObjectToolbar=function InlineObjectToolbar(_a){var onDelete=_a.onDelete,additionalButtons=_a.additionalButtons;var formatMessage=useIntl().formatMessage;if(!onDelete&&!additionalButtons){return null;}return jsxs(Toolbar,__assign({className:"inline-object-toolbar",alwaysShown:env.isTouchDevice},{children:[onDelete&&jsx$1(IconButton,{iconProps:{iconName:'Delete'},onMouseDown:function(e){return e.preventDefault();},onClick:onDelete,"data-inline-object-toolbar-delete-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.removeItem'})},void 0),additionalButtons]}),void 0);};var Toolbar=_styled.div.withConfig({displayName:"InlineObjectToolbar__Toolbar",componentId:"sc-1cbis2b-0"})(templateObject_3$E||(templateObject_3$E=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n padding: 0 ","px;\n height: 36px;\n display: flex;\n align-items: center;\n\n transition: 0.2s ease-out;\n transition-property: opacity, margin;\n background-color: rgba(255, 255, 255, 0.81);\n ","\n\n i {\n text-shadow: white 1px 1px 3px;\n }\n\n &:focus-within {\n opacity: 1;\n z-index: 2;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n padding: 0 ","px;\n height: 36px;\n display: flex;\n align-items: center;\n\n transition: 0.2s ease-out;\n transition-property: opacity, margin;\n background-color: rgba(255, 255, 255, 0.81);\n ","\n\n i {\n text-shadow: white 1px 1px 3px;\n }\n\n &:focus-within {\n opacity: 1;\n z-index: 2;\n }\n"])),spacingS,function(p){return p.alwaysShown?css$2(templateObject_1$1A||(templateObject_1$1A=__makeTemplateObject(["\n opacity: 1;\n z-index: 2;\n "],["\n opacity: 1;\n z-index: 2;\n "]))):css$2(templateObject_2$W||(templateObject_2$W=__makeTemplateObject(["\n opacity: 0;\n z-index: -1;\n "],["\n opacity: 0;\n z-index: -1;\n "])));});var InlineObjectToolbarWrapper=function InlineObjectToolbarWrapper(_a){var toolbar=_a.toolbar,children=_a.children;return jsxs(ObjectHost,__assign({showToolbarOnHover:toolbar!=null},{children:[toolbar,children]}),void 0);};var ObjectHost=_styled.div.withConfig({displayName:"InlineObjectToolbar__ObjectHost",componentId:"sc-1cbis2b-1"})(templateObject_5$o||(templateObject_5$o=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n\n ","\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n\n ","\n"])),function(p){return p.showToolbarOnHover&&css$2(templateObject_4$q||(templateObject_4$q=__makeTemplateObject(["\n &:hover .inline-object-toolbar {\n opacity: 1;\n z-index: 2;\n }\n "],["\n &:hover .inline-object-toolbar {\n opacity: 1;\n z-index: 2;\n }\n "])));});var templateObject_1$1A,templateObject_2$W,templateObject_3$E,templateObject_4$q,templateObject_5$o;var ImageToolbar=function ImageToolbar(_a){var onDelete=_a.onDelete,onFullScreen=_a.onFullScreen,onClose=_a.onClose,onCrop=_a.onCrop,showFullScreenButton=_a.showFullScreenButton,showCloseButton=_a.showCloseButton,showCropButton=_a.showCropButton;var formatMessage=useIntl().formatMessage;var hasAdditionalButtons=showFullScreenButton||showCropButton||showCloseButton;return jsx$1(InlineObjectToolbar,{onDelete:onDelete,additionalButtons:hasAdditionalButtons&&jsxs(Fragment,{children:[showFullScreenButton&&jsx$1(IconButton,{iconProps:{iconName:'FullScreen'},onMouseDown:function(e){return e.preventDefault();},onClick:onFullScreen,"data-image-toolbar-full-screen-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.viewFullScreen'})},void 0),showCropButton&&jsx$1(IconButton,{iconProps:{iconName:'EditPhoto'},onMouseDown:function(e){return e.preventDefault();},onClick:onCrop,"data-image-toolbar-crop-button":true,ariaLabel:formatMessage({id:'AriaLabel.editor.editImage'})},void 0),showCloseButton&&jsx$1(IconButton,{iconProps:{iconName:'ChromeClose'},onMouseDown:function(e){return e.preventDefault();},onClick:onClose,"data-image-toolbar-close-button":true,ariaLabel:formatMessage({id:'AriaLabel.cancelButton'})},void 0)]},void 0)},void 0);};var PhotoGallerySlider=function PhotoGallerySlider(_a){var gallery=_a.gallery,imageUrlResolver=_a.imageUrlResolver,onCloseGallery=_a.onCloseGallery,onOpenFullScreen=_a.onOpenFullScreen,showFullScreenButton=_a.showFullScreenButton,showCloseButton=_a.showCloseButton,height=_a.height;var pullToRefreshContext=useContext(PullToRefreshContext);var _b=useState$2(null),fullScreenItemIndex=_b[0],setFullScreenItemIndex=_b[1];var _c=useState$2(false),isFullScreenOpen=_c[0],setIsFullScreenOpen=_c[1];var formatMessage=useIntl().formatMessage;var themePrimary=useContext(ThemeContext$1).theme.palette.themePrimary;useEffect$1(function(){addBackButtonListener(handleBackButton);return function(){return removeBackButtonListener(handleBackButton);};function handleBackButton(){if(isFullScreenOpen){handleCloseFullScreen();return true;}return false;}// eslint-disable-next-line react-hooks/exhaustive-deps
126305
126302
  },[isFullScreenOpen]);// TODO: improvements - spinners
126306
126303
  var images=useMemo(function(){var _a;return (_a=gallery.images)===null||_a===void 0?void 0:_a.map(function(image){var _a;return __assign(__assign({},image),{// todo: what is a good width for the slider images
126307
126304
  // todo: previewUrl is a bit misleading here
@@ -126310,22 +126307,21 @@ previewUrl:(_a=image.previewUrl)!==null&&_a!==void 0?_a:imageUrlResolver===null|
126310
126307
  },[gallery.images]);if(!images||images.length===0){return null;}var hasMoreImages=images.length>1;// the paging dots should be shown only if the number of images is less than or equal to 15
126311
126308
  // without this limitation the paging dots breaks the layout in mobile view
126312
126309
  var showPagingDots=hasMoreImages&&images.length<=15;return jsxs(Fragment,{children:[jsx$1(GalleryContainer,__assign({"data-photo-gallery-container":true},{children:jsx$1(InlineObjectToolbarWrapper,__assign({toolbar:jsx$1(ImageToolbar,{showFullScreenButton:showFullScreenButton,onFullScreen:function(e){e.stopPropagation();handleOpenFullScreen();},showCloseButton:showCloseButton,onClose:function(e){e.stopPropagation();onCloseGallery===null||onCloseGallery===void 0?void 0:onCloseGallery();}},void 0)},{children:jsx$1(Carousel,__assign({renderBottomCenterControls:function(props){return showPagingDots?jsx$1(PagingDots,__assign({},props),void 0):null;},renderCenterLeftControls:function(_a){var previousSlide=_a.previousSlide;return hasMoreImages&&!env.isTouchDevice?jsx$1(CarouselButton,{iconProps:{iconName:'CaretLeftSolid8'},onClick:function(e){e.stopPropagation();previousSlide();},ariaLabel:formatMessage({id:'Generic.prev'}),"data-button":"prev"},void 0):null;},renderCenterRightControls:function(_a){var nextSlide=_a.nextSlide;return hasMoreImages&&!env.isTouchDevice?jsx$1(CarouselButton,{iconProps:{iconName:'CaretRightSolid8'},onClick:function(e){e.stopPropagation();nextSlide();},ariaLabel:formatMessage({id:'Generic.next'}),"data-button":"next"},void 0):null;},renderTopRightControls:function(_a){_a.currentSlide;return null;},swiping:hasMoreImages,dragging:hasMoreImages,wrapAround:true,afterSlide:function(slideIndex){return setFullScreenItemIndex(slideIndex);},defaultControlsConfig:{pagingDotsStyle:{fill:themePrimary},pagingDotsContainerClassName:'slider-dots'}},{children:images.map(function(image){return jsxs(Slide,{children:[jsx$1(Figure$1,__assign({height:height},{children:jsx$1(ImageWrapper,{children:jsx$1("img",{"data-photo-gallery-image":image.imageId,src:image.previewUrl,alt:image.imageTitle||''},void 0)},void 0)}),void 0),image.imageTitle&&jsx$1(Caption,__assign({"data-photo-gallery-image-caption":image.imageTitle},{children:image.imageTitle}),void 0)]},image.imageId);})}),void 0)}),void 0)}),void 0),jsx$1(FullScreenImageViewer,{images:images,selectedIndex:fullScreenItemIndex,hidden:!isFullScreenOpen,onClose:handleCloseFullScreen,imageUrlResolver:imageUrlResolver},void 0)]},void 0);function handleOpenFullScreen(){onOpenFullScreen===null||onOpenFullScreen===void 0?void 0:onOpenFullScreen();setIsFullScreenOpen(true);// if we are in the editor the pullToRefreshContext is null
126313
- if(pullToRefreshContext){pullToRefreshContext.setEnabled(false);}}function handleCloseFullScreen(){setIsFullScreenOpen(false);if(pullToRefreshContext){pullToRefreshContext.setEnabled(true);}}};var GalleryContainer=_styled.div.withConfig({displayName:"PhotoGallery__GalleryContainer",componentId:"sc-peu8jt-0"})(templateObject_1$1q||(templateObject_1$1q=__makeTemplateObject(["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"])),spacingS+5,function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.neutralTertiary;});var CarouselButton=_styled(IconButton).withConfig({displayName:"PhotoGallery__CarouselButton",componentId:"sc-peu8jt-1"})(templateObject_2$R||(templateObject_2$R=__makeTemplateObject(["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"],["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"])),spacingS);var Slide=_styled.div.withConfig({displayName:"PhotoGallery__Slide",componentId:"sc-peu8jt-2"})(templateObject_3$A||(templateObject_3$A=__makeTemplateObject(["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"],["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));_styled.div.withConfig({displayName:"PhotoGallery__SlideIndicator",componentId:"sc-peu8jt-3"})(templateObject_4$n||(templateObject_4$n=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"])));var Figure$1=_styled.figure.withConfig({displayName:"PhotoGallery__Figure",componentId:"sc-peu8jt-4"})(templateObject_7$a||(templateObject_7$a=__makeTemplateObject(["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"],["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"])),function(p){return p.height?css$2(templateObject_5$m||(templateObject_5$m=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height-100):'height: 300px;';},function(p){return p.theme.palette.neutralLighter;},minScreenSize.medium,function(p){return p.height?css$2(templateObject_6$d||(templateObject_6$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height):'height: 400px;';});var Caption=_styled.span.withConfig({displayName:"PhotoGallery__Caption",componentId:"sc-peu8jt-5"})(templateObject_8$9||(templateObject_8$9=__makeTemplateObject(["\n padding-top: 5px;\n text-align: center;\n ","\n"],["\n padding-top: 5px;\n text-align: center;\n ","\n"])),LineClamp(2,fontSizeSmall,1.2));var ImageWrapper=_styled.div.withConfig({displayName:"PhotoGallery__ImageWrapper",componentId:"sc-peu8jt-6"})(templateObject_9$7||(templateObject_9$7=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"])));_styled.a.withConfig({displayName:"PhotoGallery__ClickableImageWrapper",componentId:"sc-peu8jt-7"})(templateObject_10$6||(templateObject_10$6=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"])));var templateObject_1$1q,templateObject_2$R,templateObject_3$A,templateObject_4$n,templateObject_5$m,templateObject_6$d,templateObject_7$a,templateObject_8$9,templateObject_9$7,templateObject_10$6;var InlineGallery=function InlineGallery(_a){var galleryDetails=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var user=useCurrentUser();var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;return jsx$1(PhotoGallerySlider,{gallery:galleryDetails,imageUrlResolver:getImageUrl,showFullScreenButton:true},void 0);function getImageUrl(imageId,width,height){if(!item.fileAccessToken){return null;}return getImageUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,resourceType,imageId,width!==null&&width!==void 0?width:getMaxImageWidth(),height);}};var InlineGalleryMapper={component:InlineGallery,type:EntityType.Gallery,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var galleryId=node.getAttribute('data-gallery-id');if(galleryId==null){return null;}return {galleryId:galleryId,images:Array.from(node.querySelectorAll('img')).map(function(imageNode){return {imageId:imageNode.getAttribute('data-image-id'),imageTitle:imageNode.getAttribute('data-image-title'),width:imageNode.getAttribute('width'),height:imageNode.getAttribute('height')};}).filter(function(image){return image.imageId!==null;})};}};var InlineCodeViewer=function InlineCodeViewer(_a){var codeDetails=_a.codeDetails,showJsPlaceholder=_a.showJsPlaceholder,readOnly=_a.readOnly;var htmlContainerRef=useRef$1(null);var javascriptContainerRef=useRef$1(null);useEffect$1(function(){if(readOnly){return;}if(htmlContainerRef.current!=null){if(htmlContainerRef.current.innerHTML!==codeDetails.html){htmlContainerRef.current.innerHTML=codeDetails.html;refreshScripts(htmlContainerRef.current);}}if(javascriptContainerRef.current!=null){var oldScript=javascriptContainerRef.current.querySelector('script');var newScriptText=";\n (function() {\n try {\n "+codeDetails.javascript+";\n } catch (err) {\n console.error(err);\n }\n })();";if(!oldScript||oldScript.innerText!==newScriptText){oldScript===null||oldScript===void 0?void 0:oldScript.remove();var script=document.createElement('script');script.type='text/javascript';var scriptContent=document.createTextNode(newScriptText);script.appendChild(scriptContent);javascriptContainerRef.current.appendChild(script);}}// eslint-disable-next-line react-hooks/exhaustive-deps
126314
- },[codeDetails.html,codeDetails.javascript]);if(readOnly){return jsxs(Host$y,{children:[jsx$1("div",{children:codeDetails.html&&JSON.stringify(codeDetails.html)},void 0),jsx$1("div",{children:codeDetails.javascript&&JSON.stringify(codeDetails.javascript)},void 0)]},void 0);}return jsxs(Host$y,{children:[codeDetails.html&&jsx$1("div",{ref:function(c){return htmlContainerRef.current=c;}},void 0),codeDetails.javascript&&jsx$1("div",__assign({ref:function(c){return javascriptContainerRef.current=c;}},{children:!codeDetails.html&&showJsPlaceholder&&jsx$1(JavascriptPlaceholder,{},void 0)}),void 0)]},void 0);};var Host$y=_styled.div.withConfig({displayName:"InlineCodeViewer__Host",componentId:"sc-q9v8du-0"})(templateObject_1$1p||(templateObject_1$1p=__makeTemplateObject(["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"],["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"])));var JavascriptPlaceholder=_styled.div.withConfig({displayName:"InlineCodeViewer__JavascriptPlaceholder",componentId:"sc-q9v8du-1"})(templateObject_2$Q||(templateObject_2$Q=__makeTemplateObject(["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"],["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"])));var templateObject_1$1p,templateObject_2$Q;var InlineCode=function InlineCode(_a){var _b=_a.blockProps,id=_b.id,html=_b.html,javascript=_b.javascript;var features=useFeatures();if(!features.editorInlineMarkup){return null;}return jsx$1(InlineCodeViewer,{codeDetails:{id:id,html:html,javascript:javascript}},void 0);};var InlineCodeMapper={component:InlineCode,type:EntityType.InlineCode,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var codeId=node.getAttribute('data-code-id');if(codeId==null){return null;}var html=(_b=(_a=node.querySelector('[data-code-html]'))===null||_a===void 0?void 0:_a.innerHTML)!==null&&_b!==void 0?_b:node.getAttribute('data-code-html');var javascript=(_d=(_c=node.querySelector('script[type="text/javascript"][data-code-javascript]'))===null||_c===void 0?void 0:_c.innerHTML)!==null&&_d!==void 0?_d:node.getAttribute('data-code-javascript');return {id:codeId,html:html,javascript:javascript};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
126310
+ if(pullToRefreshContext){pullToRefreshContext.setEnabled(false);}}function handleCloseFullScreen(){setIsFullScreenOpen(false);if(pullToRefreshContext){pullToRefreshContext.setEnabled(true);}}};var GalleryContainer=_styled.div.withConfig({displayName:"PhotoGallery__GalleryContainer",componentId:"sc-peu8jt-0"})(templateObject_1$1z||(templateObject_1$1z=__makeTemplateObject(["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"])),spacingS+5,function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.neutralTertiary;});var CarouselButton=_styled(IconButton).withConfig({displayName:"PhotoGallery__CarouselButton",componentId:"sc-peu8jt-1"})(templateObject_2$V||(templateObject_2$V=__makeTemplateObject(["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"],["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"])),spacingS);var Slide=_styled.div.withConfig({displayName:"PhotoGallery__Slide",componentId:"sc-peu8jt-2"})(templateObject_3$D||(templateObject_3$D=__makeTemplateObject(["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"],["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));_styled.div.withConfig({displayName:"PhotoGallery__SlideIndicator",componentId:"sc-peu8jt-3"})(templateObject_4$p||(templateObject_4$p=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"])));var Figure$1=_styled.figure.withConfig({displayName:"PhotoGallery__Figure",componentId:"sc-peu8jt-4"})(templateObject_7$a||(templateObject_7$a=__makeTemplateObject(["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"],["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"])),function(p){return p.height?css$2(templateObject_5$n||(templateObject_5$n=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height-100):'height: 300px;';},function(p){return p.theme.palette.neutralLighter;},minScreenSize.medium,function(p){return p.height?css$2(templateObject_6$e||(templateObject_6$e=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height):'height: 400px;';});var Caption=_styled.span.withConfig({displayName:"PhotoGallery__Caption",componentId:"sc-peu8jt-5"})(templateObject_8$9||(templateObject_8$9=__makeTemplateObject(["\n padding-top: 5px;\n text-align: center;\n ","\n"],["\n padding-top: 5px;\n text-align: center;\n ","\n"])),LineClamp(2,fontSizeSmall,1.2));var ImageWrapper=_styled.div.withConfig({displayName:"PhotoGallery__ImageWrapper",componentId:"sc-peu8jt-6"})(templateObject_9$7||(templateObject_9$7=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"])));_styled.a.withConfig({displayName:"PhotoGallery__ClickableImageWrapper",componentId:"sc-peu8jt-7"})(templateObject_10$6||(templateObject_10$6=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"])));var templateObject_1$1z,templateObject_2$V,templateObject_3$D,templateObject_4$p,templateObject_5$n,templateObject_6$e,templateObject_7$a,templateObject_8$9,templateObject_9$7,templateObject_10$6;var DetailViewContext=/*#__PURE__*/createContext(null);function useDetailViewContext(){return useContext(DetailViewContext);}var InlineGallery=function InlineGallery(_a){var galleryDetails=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var user=useCurrentUser();var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;return jsx$1(PhotoGallerySlider,{gallery:galleryDetails,imageUrlResolver:getImageUrl,showFullScreenButton:true},void 0);function getImageUrl(imageId,width,height){if(!item.fileAccessToken){return null;}return getImageUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,resourceType,imageId,width!==null&&width!==void 0?width:getMaxImageWidth(),height);}};var InlineGalleryMapper={component:InlineGallery,type:EntityType.Gallery,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var galleryId=node.getAttribute('data-gallery-id');if(galleryId==null){return null;}return {galleryId:galleryId,images:Array.from(node.querySelectorAll('img')).map(function(imageNode){return {imageId:imageNode.getAttribute('data-image-id'),imageTitle:imageNode.getAttribute('data-image-title'),width:imageNode.getAttribute('width'),height:imageNode.getAttribute('height')};}).filter(function(image){return image.imageId!==null;})};}};var InlineImage=function InlineImage(_a){var _b;var image=_a.blockProps;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType;var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var imageWidth=getImageWidth(image);var imageUrl=(_b=image.previewUrl)!==null&&_b!==void 0?_b:getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,imageWidth);return jsx$1(Host$B,{children:jsxs(Figure,__assign({width:imageWidth,onClick:function(){return showPhoto(getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,'default'));}},{children:[jsx$1("img",{src:imageUrl,alt:image.imageTitle||'',width:imageWidth},void 0),image.imageTitle&&jsx$1("figcaption",{children:image.imageTitle},void 0)]}),void 0)},void 0);};var Host$B=_styled.div.withConfig({displayName:"InlineImage__Host",componentId:"sc-14k2cj1-0"})(templateObject_1$1y||(templateObject_1$1y=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var Figure=_styled.figure.withConfig({displayName:"InlineImage__Figure",componentId:"sc-14k2cj1-1"})(templateObject_2$U||(templateObject_2$U=__makeTemplateObject(["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n max-width: 100%;\n }\n"],["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n max-width: 100%;\n }\n"])),function(p){return p.width;});var InlineImageMapper={component:InlineImage,type:EntityType.Image,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var imageId=node.getAttribute('data-image-id');if(imageId==null){return null;}return {imageId:imageId,imageTitle:node.getAttribute('data-image-caption'),width:getImageWidth(node.getAttribute('data-image-width')),height:node.getAttribute('data-image-height')};}};var templateObject_1$1y,templateObject_2$U;var InlineContactViewer=function InlineContactViewer(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;var contact=_a.contact;var user=useCurrentUser();var userInfo=usePromise$2(function(){return getContactInfo();},null,[contact])[0];var getUserInfo=useAccountApi().getUserInfo;var additionalPropertyKeys=['mail','company','mobilePhone','officePhone','address','additionalInfo'];var showMoreProperties=contact.properties&&Object.keys(contact.properties).filter(function(key){return additionalPropertyKeys.indexOf(key)>=0&&contact.properties[key].value!==null;}).length>0;return jsxs(Host$A,{children:[jsx$1(StyledAvatar$1,{upn:contact.upn,text:contact.properties.displayName.shouldAutoLoad&&userInfo?userInfo.displayName||contact.properties.displayName.value:contact.properties.displayName.value,secondaryText:((_b=contact.properties.department)===null||_b===void 0?void 0:_b.shouldAutoLoad)&&userInfo?((_c=userInfo.properties)===null||_c===void 0?void 0:_c.department)||((_d=contact.properties.department)===null||_d===void 0?void 0:_d.value):(_e=contact.properties.department)===null||_e===void 0?void 0:_e.value,tertiaryText:((_f=contact.properties.jobTitle)===null||_f===void 0?void 0:_f.shouldAutoLoad)&&userInfo?((_g=userInfo.properties)===null||_g===void 0?void 0:_g.jobTitle)||((_h=contact.properties.jobTitle)===null||_h===void 0?void 0:_h.value):(_j=contact.properties.jobTitle)===null||_j===void 0?void 0:_j.value},void 0),showMoreProperties&&jsx$1(PropertiesContainer,{children:jsxs("ul",{children:[((_k=contact.properties.company)===null||_k===void 0?void 0:_k.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"EMI",tooltipResourceKey:"Generic.company"},{children:contact.properties.company.shouldAutoLoad&&userInfo?((_l=userInfo.properties)===null||_l===void 0?void 0:_l.company)||contact.properties.company.value:contact.properties.company.value}),void 0)},void 0),((_m=contact.properties.mail)===null||_m===void 0?void 0:_m.value)&&jsx$1("li",{children:jsx$1(EmailProperty,{email:contact.properties.mail.shouldAutoLoad&&userInfo?userInfo.mail||contact.properties.mail.value:contact.properties.mail.value},void 0)},void 0),((_o=contact.properties.officePhone)===null||_o===void 0?void 0:_o.value)&&jsx$1("li",{children:jsx$1(OfficePhoneProperty,{value:contact.properties.officePhone.shouldAutoLoad&&userInfo?((_p=userInfo.properties)===null||_p===void 0?void 0:_p.businessPhones[0])||contact.properties.officePhone.value:contact.properties.officePhone.value},void 0)},void 0),((_q=contact.properties.mobilePhone)===null||_q===void 0?void 0:_q.value)&&jsx$1("li",{children:jsx$1(MobilePhoneProperty,{value:contact.properties.mobilePhone.shouldAutoLoad&&userInfo?((_r=userInfo.properties)===null||_r===void 0?void 0:_r.mobilePhone)||contact.properties.mobilePhone.value:contact.properties.mobilePhone.value},void 0)},void 0),((_s=contact.properties.address)===null||_s===void 0?void 0:_s.value)&&jsx$1("li",{children:jsx$1(LocationProperty,{value:contact.properties.address.shouldAutoLoad&&userInfo?((_u=(_t=userInfo.properties)===null||_t===void 0?void 0:_t.officeLocation)!==null&&_u!==void 0?_u:(_v=userInfo.properties)===null||_v===void 0?void 0:_v.address)||contact.properties.address.value:contact.properties.address.value,tooltipResourceKey:"Generic.address"},void 0)},void 0),((_w=contact.properties.additionalInfo)===null||_w===void 0?void 0:_w.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"ContactInfo",tooltipResourceKey:"Generic.additionalInfo"},{children:contact.properties.additionalInfo.shouldAutoLoad&&userInfo?((_x=userInfo.properties)===null||_x===void 0?void 0:_x.notes)||contact.properties.additionalInfo.value:contact.properties.additionalInfo.value}),void 0)},void 0)]},void 0)},void 0)]},void 0);function getContactInfo(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!contact.upn||user.isPublicUser){return [2/*return*/,null];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getUserInfo(contact.upn)];case 2:return [2/*return*/,_a.sent()];case 3:_a.sent();// no exception is thrown because the backup values will be set from the contact
126311
+ return [2/*return*/,null];case 4:return [2/*return*/];}});});}};var Host$A=_styled.div.withConfig({displayName:"InlineContactViewer__Host",componentId:"sc-1rvwltt-0"})(templateObject_1$1x||(templateObject_1$1x=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var PropertiesContainer=_styled.div.withConfig({displayName:"InlineContactViewer__PropertiesContainer",componentId:"sc-1rvwltt-1"})(templateObject_2$T||(templateObject_2$T=__makeTemplateObject(["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"],["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"])),spacingS,fontSizeSmall);var StyledAvatar$1=_styled(Avatar).withConfig({displayName:"InlineContactViewer__StyledAvatar",componentId:"sc-1rvwltt-2"})(templateObject_3$C||(templateObject_3$C=__makeTemplateObject(["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"],["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"])),fontSizeSmall);var templateObject_1$1x,templateObject_2$T,templateObject_3$C;var FileListHost=_styled.ul.withConfig({displayName:"InlineFileStyles__FileListHost",componentId:"sc-1qjkw11-0"})(templateObject_1$1w||(templateObject_1$1w=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n"])));var FileListItem=_styled.li.withConfig({displayName:"InlineFileStyles__FileListItem",componentId:"sc-1qjkw11-1"})(templateObject_2$S||(templateObject_2$S=__makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"],["\n width: 100%;\n display: flex;\n align-items: center;\n\n // ensure higher specificity for overwriting the editor list styling\n &&& {\n margin-bottom: ","px;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n\n audio {\n width: 100%;\n }\n }\n"])),spacingM,minScreenSize.small,spacingS-5);var FileContainerStyle=css$2(templateObject_3$B||(templateObject_3$B=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"],["\n display: flex;\n align-items: center;\n min-width: 200px;\n padding: ","px ","px;\n box-sizing: border-box;\n border: 1px solid #95989a;\n border-radius: 2px;\n font-size: ","px;\n line-height: 1.5em;\n"])),spacingS,spacingS+5,fontSizeSmall);var FileIconStyle=css$2(templateObject_4$o||(templateObject_4$o=__makeTemplateObject(["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"],["\n margin: 0 ","px 0 0;\n font-size: ","px;\n"])),spacingS,fontSizeLarge-3);var templateObject_1$1w,templateObject_2$S,templateObject_3$B,templateObject_4$o;var InlineFileDownloadButton=function InlineFileDownloadButton(_a){var getFileUrl=_a.getFileUrl,fileName=_a.fileName,title=_a.title,fileAccessToken=_a.fileAccessToken,additionalContent=_a.additionalContent,className=_a.className;var _b=useFileAccessTokenApi(),exchangeShortLivedToken=_b.exchangeShortLivedToken,createDownloadClickHandler=_b.createDownloadClickHandler;var iconName=getFileIcon(fileName);if(!getFileUrl){return jsxs(FileHost,__assign({className:className,title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0);}return jsx$1(DownloadButton$3,__assign({className:className,onClick:createDownloadClickHandler('_blank',function(){return __awaiter(void 0,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(fileAccessToken)];case 1:token=_a.sent();return [2/*return*/,getFileUrl(token)];}});});})},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[additionalContent,jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var FileHost=_styled.div.withConfig({displayName:"InlineFileDownloadButton__FileHost",componentId:"sc-1nadbt8-0"})(templateObject_1$1v||(templateObject_1$1v=__makeTemplateObject(["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"],["\n ","\n\n width: 100%;\n\n i {\n ","\n }\n\n span {\n display: block;\n max-width: calc(100% - 32px); // icon width\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])),FileContainerStyle,FileIconStyle);var DownloadButton$3=_styled(DefaultButton).withConfig({displayName:"InlineFileDownloadButton__DownloadButton",componentId:"sc-1nadbt8-1"})(templateObject_2$R||(templateObject_2$R=__makeTemplateObject(["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"],["\n border: 0;\n padding: 0;\n width: 100%;\n height: auto; /* Fixes the top and bottom border for safari */\n\n color: ",";\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: initial;\n }\n\n > span {\n height: auto; /* Fixes the top and bottom border for safari */\n }\n"])),function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var DownloadLink$1=_styled.a.withConfig({displayName:"InlineFileDownloadButton__DownloadLink",componentId:"sc-1nadbt8-2"})(templateObject_3$A||(templateObject_3$A=__makeTemplateObject(["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.palette.neutralPrimary;});var templateObject_1$1v,templateObject_2$R,templateObject_3$A;var InlinePageDocumentDownloadButton=function InlinePageDocumentDownloadButton(_a){var fileUrl=_a.fileUrl,fileName=_a.fileName,title=_a.title,fileIconName=_a.fileIconName,onClick=_a.onClick,className=_a.className;var iconName=fileIconName||getFileIcon(fileName);return jsx$1(DownloadLink$1,__assign({href:fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:onClick,className:className},{children:jsxs(FileHost,__assign({title:title!==null&&title!==void 0?title:fileName},{children:[jsx$1(Icon,{iconName:iconName},void 0),jsx$1("span",{children:title!==null&&title!==void 0?title:fileName},void 0)]}),void 0)}),void 0);};var InlineQuoteViewer=function InlineQuoteViewer(_a){var _b,_c;var quoteDetails=_a.quoteDetails,onClick=_a.onClick,className=_a.className;var upn=(_b=quoteDetails.author)===null||_b===void 0?void 0:_b.userPrincipalName;var displayName=(_c=quoteDetails.author)===null||_c===void 0?void 0:_c.displayName;var showAvatar=upn&&quoteDetails.showAvatar;return jsxs(Host$z,__assign({onClick:onClick,"data-inline-quote":true,className:className},{children:[jsx$1("blockquote",{children:quoteDetails.text},void 0),showAvatar&&jsx$1("figcaption",{children:jsx$1(PersonaCard,__assign({upn:upn},{children:jsx$1(Avatar,{upn:upn,text:displayName,secondaryText:upn},void 0)}),void 0)},void 0),!showAvatar&&displayName&&jsx$1("figcaption",{children:displayName},void 0)]}),void 0);};var Host$z=_styled.figure.withConfig({displayName:"InlineQuoteViewer__Host",componentId:"sc-1kb6gh1-0"})(templateObject_1$1u||(templateObject_1$1u=__makeTemplateObject(["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"],["\n && {\n display: inline-block;\n\n border-left: solid 4px ",";\n padding-left: ","px;\n width: calc(100% - ","px);\n box-sizing: border-box;\n margin: 0 ","px;\n\n blockquote {\n border-left: 0;\n margin: 0;\n }\n\n figcaption {\n text-align: right;\n margin-top: ","px;\n position: relative;\n font-size: ","px;\n }\n\n @media (max-width: ","px) {\n margin: 0;\n width: 100%;\n figcaption {\n margin-right: 10px;\n }\n }\n }\n"])),function(p){return p.theme.palette.accent;},spacingM,2*spacingXl,spacingXl,spacingS,fontSizeSmall,maxScreenSize.medium);var templateObject_1$1u;var InlineQuote=function InlineQuote(_a){var quoteDetails=_a.blockProps;return jsx$1(InlineQuoteViewer,{quoteDetails:quoteDetails},void 0);};var InlineQuoteMapper={component:InlineQuote,type:EntityType.Quote,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var quoteId=node.getAttribute('data-quote-id');if(quoteId==null){return null;}var upn=node.getAttribute('data-quote-authorupn');var text=(_b=(_a=node.querySelector('blockquote'))===null||_a===void 0?void 0:_a.innerText)!==null&&_b!==void 0?_b:// use legacy attribute for old content
126312
+ node.getAttribute('data-quote-text');var displayName=(_d=(_c=node.querySelector('figcaption'))===null||_c===void 0?void 0:_c.innerText)!==null&&_d!==void 0?_d:// use legacy attribute for old content
126313
+ node.getAttribute('data-quote-authorname');var showAvatar=node.getAttribute('data-quote-showavatar')==='true';var hasAuthor=upn||displayName;return {id:quoteId,text:text,author:hasAuthor?{userPrincipalName:upn,displayName:displayName}:null,showAvatar:showAvatar};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
126315
126314
  // in order to ensure parsing old blocks
126316
- if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var InlineVideo=function InlineVideo(_a){var _b=_a.blockProps,id=_b.id,source=_b.source,url=_b.url,isDirectUrl=_b.isDirectUrl;var user=useCurrentUser();var token=useCurrentToken();var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var isStreamVideo=source===VideoSource.MicrosoftStream;if(isStreamVideo&&env.isAnyMobileApp){return jsx$1(PrimaryButton,__assign({onClick:handleMicrosoftStreamClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.watchMicrosoftStream"},void 0)}),void 0);}return jsx$1(InlineVideoViewer,{videoInfo:{id:id,source:source,url:url,isDirectUrl:isDirectUrl},videoThumbnailUrl:isDirectUrl?getVideoThumbnailUrl(token,user.subscription.id,source,id):null},void 0);function handleMicrosoftStreamClick(){return __awaiter(this,void 0,void 0,function(){var url;return __generator(this,function(_a){switch(_a.label){case 0:url=getMicrosoftStreamVideoUrl(id);return [4/*yield*/,onOpenExternalLink(url,true)];case 1:_a.sent();return [2/*return*/];}});});}};var InlineVideoViewer=_styled(VideoWithThumbnailView).withConfig({displayName:"InlineVideo__InlineVideoViewer",componentId:"sc-12qdsy1-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var InlineVideoMapper={component:InlineVideo,type:EntityType.Video,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var videoId=node.getAttribute('data-video-id');if(videoId==null){return null;}var source=node.getAttribute('data-video-source');return {id:videoId,source:parseInt(source,10),url:node.getAttribute('data-video-url'),isDirectUrl:node.getAttribute('data-is-direct-video-url')==='true'};},prepareRootNode:function(node){if(node.childNodes.length>0){node.innerHTML='';}}};var templateObject_1$1o;var InlineImage=function InlineImage(_a){var _b;var image=_a.blockProps;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType;var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var imageWidth=getImageWidth(image);var imageUrl=(_b=image.previewUrl)!==null&&_b!==void 0?_b:getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,imageWidth);return jsx$1(Host$x,{children:jsxs(Figure,__assign({width:imageWidth,onClick:function(){return showPhoto(getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,'default'));}},{children:[jsx$1("img",{src:imageUrl,alt:image.imageTitle||'',width:imageWidth},void 0),image.imageTitle&&jsx$1("figcaption",{children:image.imageTitle},void 0)]}),void 0)},void 0);};var Host$x=_styled.div.withConfig({displayName:"InlineImage__Host",componentId:"sc-14k2cj1-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var Figure=_styled.figure.withConfig({displayName:"InlineImage__Figure",componentId:"sc-14k2cj1-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n }\n"],["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n }\n"])),function(p){return p.width;});var InlineImageMapper={component:InlineImage,type:EntityType.Image,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var imageId=node.getAttribute('data-image-id');if(imageId==null){return null;}return {imageId:imageId,imageTitle:node.getAttribute('data-image-caption'),width:getImageWidth(node.getAttribute('data-image-width')),height:node.getAttribute('data-image-height')};}};var templateObject_1$1n,templateObject_2$P;var HeaderFormat=css$2(templateObject_1$1m||(templateObject_1$1m=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid=css$2(templateObject_3$z||(templateObject_3$z=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$m||(templateObject_4$m=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$l||(templateObject_5$l=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1m,templateObject_2$O,templateObject_3$z,templateObject_4$m,templateObject_5$l;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$w,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$w=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1l||(templateObject_1$1l=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1l;var InlineContactViewer=function InlineContactViewer(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;var contact=_a.contact;var user=useCurrentUser();var userInfo=usePromise$2(function(){return getContactInfo();},null,[contact])[0];var getUserInfo=useAccountApi().getUserInfo;var additionalPropertyKeys=['mail','company','mobilePhone','officePhone','address','additionalInfo'];var showMoreProperties=contact.properties&&Object.keys(contact.properties).filter(function(key){return additionalPropertyKeys.indexOf(key)>=0&&contact.properties[key].value!==null;}).length>0;return jsxs(Host$v,{children:[jsx$1(StyledAvatar$1,{upn:contact.upn,text:contact.properties.displayName.shouldAutoLoad&&userInfo?userInfo.displayName||contact.properties.displayName.value:contact.properties.displayName.value,secondaryText:((_b=contact.properties.department)===null||_b===void 0?void 0:_b.shouldAutoLoad)&&userInfo?((_c=userInfo.properties)===null||_c===void 0?void 0:_c.department)||((_d=contact.properties.department)===null||_d===void 0?void 0:_d.value):(_e=contact.properties.department)===null||_e===void 0?void 0:_e.value,tertiaryText:((_f=contact.properties.jobTitle)===null||_f===void 0?void 0:_f.shouldAutoLoad)&&userInfo?((_g=userInfo.properties)===null||_g===void 0?void 0:_g.jobTitle)||((_h=contact.properties.jobTitle)===null||_h===void 0?void 0:_h.value):(_j=contact.properties.jobTitle)===null||_j===void 0?void 0:_j.value},void 0),showMoreProperties&&jsx$1(PropertiesContainer,{children:jsxs("ul",{children:[((_k=contact.properties.company)===null||_k===void 0?void 0:_k.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"EMI",tooltipResourceKey:"Generic.company"},{children:contact.properties.company.shouldAutoLoad&&userInfo?((_l=userInfo.properties)===null||_l===void 0?void 0:_l.company)||contact.properties.company.value:contact.properties.company.value}),void 0)},void 0),((_m=contact.properties.mail)===null||_m===void 0?void 0:_m.value)&&jsx$1("li",{children:jsx$1(EmailProperty,{email:contact.properties.mail.shouldAutoLoad&&userInfo?userInfo.mail||contact.properties.mail.value:contact.properties.mail.value},void 0)},void 0),((_o=contact.properties.officePhone)===null||_o===void 0?void 0:_o.value)&&jsx$1("li",{children:jsx$1(OfficePhoneProperty,{value:contact.properties.officePhone.shouldAutoLoad&&userInfo?((_p=userInfo.properties)===null||_p===void 0?void 0:_p.businessPhones[0])||contact.properties.officePhone.value:contact.properties.officePhone.value},void 0)},void 0),((_q=contact.properties.mobilePhone)===null||_q===void 0?void 0:_q.value)&&jsx$1("li",{children:jsx$1(MobilePhoneProperty,{value:contact.properties.mobilePhone.shouldAutoLoad&&userInfo?((_r=userInfo.properties)===null||_r===void 0?void 0:_r.mobilePhone)||contact.properties.mobilePhone.value:contact.properties.mobilePhone.value},void 0)},void 0),((_s=contact.properties.address)===null||_s===void 0?void 0:_s.value)&&jsx$1("li",{children:jsx$1(LocationProperty,{value:contact.properties.address.shouldAutoLoad&&userInfo?((_u=(_t=userInfo.properties)===null||_t===void 0?void 0:_t.officeLocation)!==null&&_u!==void 0?_u:(_v=userInfo.properties)===null||_v===void 0?void 0:_v.address)||contact.properties.address.value:contact.properties.address.value,tooltipResourceKey:"Generic.address"},void 0)},void 0),((_w=contact.properties.additionalInfo)===null||_w===void 0?void 0:_w.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"ContactInfo",tooltipResourceKey:"Generic.additionalInfo"},{children:contact.properties.additionalInfo.shouldAutoLoad&&userInfo?((_x=userInfo.properties)===null||_x===void 0?void 0:_x.notes)||contact.properties.additionalInfo.value:contact.properties.additionalInfo.value}),void 0)},void 0)]},void 0)},void 0)]},void 0);function getContactInfo(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!contact.upn||user.isPublicUser){return [2/*return*/,null];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getUserInfo(contact.upn)];case 2:return [2/*return*/,_a.sent()];case 3:_a.sent();// no exception is thrown because the backup values will be set from the contact
126317
- return [2/*return*/,null];case 4:return [2/*return*/];}});});}};var Host$v=_styled.div.withConfig({displayName:"InlineContactViewer__Host",componentId:"sc-1rvwltt-0"})(templateObject_1$1k||(templateObject_1$1k=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var PropertiesContainer=_styled.div.withConfig({displayName:"InlineContactViewer__PropertiesContainer",componentId:"sc-1rvwltt-1"})(templateObject_2$N||(templateObject_2$N=__makeTemplateObject(["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"],["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"])),spacingS,fontSizeSmall);var StyledAvatar$1=_styled(Avatar).withConfig({displayName:"InlineContactViewer__StyledAvatar",componentId:"sc-1rvwltt-2"})(templateObject_3$y||(templateObject_3$y=__makeTemplateObject(["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"],["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"])),fontSizeSmall);var templateObject_1$1k,templateObject_2$N,templateObject_3$y;var InlineContact=function InlineContact(_a){var contact=__rest(_a.blockProps,[]);return jsx$1(InlineContactViewer,{contact:contact},void 0);};var InlineContactMapper={component:InlineContact,type:EntityType.Contact,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var contactId=node.getAttribute('data-contact-id');if(contactId==null){return null;}var properties={};Array.from(node.querySelectorAll('li')).forEach(function(childNode){var _a;var propertyKey=childNode.getAttribute('data-contact-property');var shouldAutoLoad=(_a=childNode.getAttribute('data-auto-load'))!==null&&_a!==void 0?_a:childNode.getAttribute('data-from-directory');var propertyValue=childNode.innerText;properties[propertyKey]={value:propertyValue,shouldAutoLoad:shouldAutoLoad==='true'};});return {id:contactId,tenantId:node.getAttribute('data-contact-tenantid'),upn:node.getAttribute('data-contact-upn'),properties:properties};}};var InlinePageListViewer=function InlinePageListViewer(_a){var items=_a.items,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,isInitialLoading=_a.isInitialLoading;var theme=useTheme$2();if(!items||items.length===0){return null;}return jsx$1(PagesList,__assign({"data-inline-page-list":true},{children:items.map(function(item){var isPublished=!item.hasHiddenAncestor&&(item.isCurrentPublishedVersion||!!item.publishedVersionId);return jsx$1(StyledPageItemTile,{item:item,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,styleDefinition:{backgroundColor:theme.palette.neutralLighter,bannerDefaultWidth:70,height:70,applyRoundedCorners:true,titleFontSize:fontSizeSmall,titleMargin:'0',contentPadding:spacingS-2+"px "+(spacingM-5)+"px"},additionalContent:jsx$1(StyledDocumentDownloadButton$2,{page:item},void 0),showBannerPlaceholder:true,isVisible:isPublished||isInitialLoading},item.id);})}),void 0);};var PagesList=_styled.div.withConfig({displayName:"InlinePageListViewer__PagesList",componentId:"sc-qn2xdx-0"})(templateObject_1$1j||(templateObject_1$1j=__makeTemplateObject(["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS);var StyledPageItemTile=_styled(PageItemTile).withConfig({displayName:"InlinePageListViewer__StyledPageItemTile",componentId:"sc-qn2xdx-1"})(templateObject_2$M||(templateObject_2$M=__makeTemplateObject(["\n opacity: ",";\n"],["\n opacity: ",";\n"])),function(p){return p.isVisible?'1':'0.3';});var StyledDocumentDownloadButton$2=_styled(DocumentDownloadButton).withConfig({displayName:"InlinePageListViewer__StyledDocumentDownloadButton",componentId:"sc-qn2xdx-2"})(templateObject_3$x||(templateObject_3$x=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"])));var templateObject_1$1j,templateObject_2$M,templateObject_3$x;var InlinePageListWithPaging=function InlinePageListWithPaging(_a){var pages=_a.pages,baseRoute=_a.baseRoute,_b=_a.pagingProps,getNextPage=_b.getNextPage,getFirstPage=_b.getFirstPage,getPrevPage=_b.getPrevPage,isFirstPage=_b.isFirstPage,isInitialLoading=_b.isInitialLoading,isLoadingNextPage=_b.isLoadingNextPage,hideNextButton=_b.hideNextButton,filterBaseUrl=_a.filterBaseUrl;return jsxs(Fragment,{children:[jsx$1(InlinePageListViewer,{items:pages,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,isInitialLoading:isInitialLoading},void 0),jsx$1(HorizontalPager,{onNextClick:getNextPage,onPrevClick:getPrevPage,onFirstClick:getFirstPage,hidePrevButton:isFirstPage||isInitialLoading,hideNextButton:hideNextButton,isLoadingNextPage:isLoadingNextPage},void 0)]},void 0);};function useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType){var searchPublishedPages=usePagesApi().searchPublishedPages;return function(pageSize,token){return searchPublishedPages({keywords:keywords,token:token,pageSize:pageSize,pageType:showPagesAndDocuments?undefined:pageType});};}var InlinePageListSkeleton=function InlinePageListSkeleton(_a){var isDataLoaded=_a.isDataLoaded,_b=_a.pageSize,pageSize=_b===void 0?5:_b,children=_a.children;var items=Array.from(Array(pageSize).keys());var uniqueId=createId();var palette=useContext(ThemeContext$1).theme.palette;return jsx$1(Shimmer,__assign({isDataLoaded:isDataLoaded,shimmerColors:{shimmer:palette.neutralTertiaryAlt,shimmerWave:palette.neutralTertiary},customElementsGroup:jsx$1(Fragment,{children:items.map(function(i){return jsx$1(PageItemShimmer,{},uniqueId+"-"+i);})},void 0)},{children:children}),void 0);};var PageItemShimmer=function PageItemShimmer(){var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$u,{children:[jsxs(Inner$2$1,{children:[jsx$1(ShimmerElementsGroup,{styles:{root:{backgroundColor:palette.accent,borderRadius:5}},width:'70px',shimmerElements:[{type:ShimmerElementType.line,height:70,width:70}]},void 0),jsx$1(ShimmerElementsGroup,{backgroundColor:palette.neutralLighter,width:"calc(100% - 70px)",flexWrap:true,shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(20% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'80%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(100% - "+2*spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(40% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'60%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0);};var Host$u=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Host",componentId:"sc-13wpgyn-0"})(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject([""],[""])));var Inner$2$1=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Inner",componentId:"sc-13wpgyn-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var templateObject_1$1i,templateObject_2$L;var InlinePageListByKeywords=function InlinePageListByKeywords(_a){var keywords=_a.keywords,showDocuments=_a.showDocuments,showPages=_a.showPages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showPagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var defaultPageSize=10;var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywords]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};function useLoadPublishedItemsByPageId(pageId,showPagesAndDocuments,pageType){var getSubpages=usePagesApi().getSubpages;try{return function(pageSize,token){return getSubpages(pageId,{pageType:showPagesAndDocuments?undefined:pageType,token:token,pageSize:pageSize});};}catch(error){logger.error(error);return null;}}var defaultPageSize$1=10;var InlinePageListByPageId=function InlinePageListByPageId(_a){var pageId=_a.pageId,showPages=_a.showPages,showDocuments=_a.showDocuments;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showSubpagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var _b=useItemLoaderWithPreFetch(defaultPageSize$1,useLoadPublishedItemsByPageId(pageId,showSubpagesAndDocuments,pageType),[pageId]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};function useItemLoaderByCurrentPage(currentPageId,pageSize,navigationContext,settings,getAllItemsHandler,deps){var _a=useState$2(getAllItems()),allItems=_a[0],setAllItems=_a[1];var allItemIdsString=allItems===null||allItems===void 0?void 0:allItems.map(function(i){return i.id;}).join(',');var _b=useItemLoaderWithPreFetch(pageSize,loadNextItems,[allItemIdsString]),items=_b.items,pagingProps=__rest(_b,["items"]);useEffect$1(function(){setAllItems(getAllItems());},__spreadArray([],deps||[]));var skeletonItems=getNextItems();var pageItems=pagingProps.isInitialLoading?skeletonItems:items;var hideNextButton=pagingProps.isInitialLoading?allItems.length<=pageSize:pagingProps.isLastPage;return {pageItems:pageItems,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:hideNextButton})};function getAllItems(){var _a;var children=(_a=navigationContext===null||navigationContext===void 0?void 0:navigationContext.children)!==null&&_a!==void 0?_a:[];if(settings.showPages&&settings.showDocuments){return children;}var filteredChildren=children.filter(function(c){return c.pageType===(settings.showPages?PageType.Page:PageType.Document);});return filteredChildren;}function getNextItems(startIndex,paginationToken){if(startIndex===void 0){startIndex=0;}if(paginationToken===void 0){paginationToken=pageSize;}return allItems.slice(startIndex,paginationToken);}function loadNextItems(pageSize,paginationToken){return __awaiter(this,void 0,void 0,function(){var showSubpagesAndDocuments,pageType,result_1,fullAllItems,token,newPaginationToken;return __generator(this,function(_a){switch(_a.label){case 0:if(!!paginationToken)return [3/*break*/,2];showSubpagesAndDocuments=settings.showPages&&settings.showDocuments;pageType=settings.showPages?PageType.Page:PageType.Document;return [4/*yield*/,getAllItemsHandler(currentPageId,showSubpagesAndDocuments?undefined:pageType)];case 1:result_1=_a.sent();fullAllItems=allItems.map(function(i){return result_1.find(function(r){return r.id===i.id;});});setAllItems(fullAllItems);return [2/*return*/,{items:fullAllItems.slice(0,pageSize),paginationToken:pageSize,nextItem:fullAllItems[pageSize]}];case 2:token=parseInt(paginationToken);newPaginationToken=token+pageSize;return [2/*return*/,{items:getNextItems(token,newPaginationToken),paginationToken:newPaginationToken,nextItem:allItems[newPaginationToken]}];}});});}}var defaultPageSize=10;// the inline page list should be auto-added on a page with no content
126318
- // by default pages and documents should be shown
126319
- // for this case the blockProps would be an empty object and
126320
- // we need to set the showPages and showDocuments to true
126321
- var InlinePageListByCurrentPage=function InlinePageListByCurrentPage(_a){var _b=_a.blockProps,props=_b===void 0?{showDocuments:true,showPages:true}:_b;var item=useDetailViewContext().item;var getSubpages=usePagesApi().getSubpages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=useItemLoaderByCurrentPage(item.id,defaultPageSize,item.navigationContext,{showPages:props.showPages,showDocuments:props.showDocuments},getAllSubItems,[item===null||item===void 0?void 0:item.id]),items=_c.pageItems,pagingProps=_c.pagingProps;if(items.length===0){return null;}return jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:pagingProps,baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0);function getAllSubItems(id,pageType){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(id,{pageType:pageType})];case 1:result=_a.sent();return [2/*return*/,result.items];}});});}};var InlinePageList=function InlinePageList(_a){var blockProps=_a.blockProps;if(blockProps===null||blockProps===void 0?void 0:blockProps.keywords){return jsx$1(InlinePageListByKeywords,{keywords:blockProps.keywords,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsx$1(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsx$1(InlinePageListByCurrentPage,{blockProps:blockProps},void 0);};var InlinePageListMapper={component:InlinePageList,type:EntityType.InlinePageList,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var pageListId=node.getAttribute('data-page-list-id');if(pageListId==null){return null;}var showChildren=node.getAttribute('data-show-children')==='true';var showDocumentsAttribute=node.getAttribute('data-show-documents');var showPagesAttribute=node.getAttribute('data-show-pages');var pageId=node.getAttribute('data-page-id');var keywords=node.getAttribute('data-keywords');if(!showDocumentsAttribute&&!showPagesAttribute){// ensure backwards compatibility
126322
- return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var InlineUrlPreview=function InlineUrlPreview(_a){var _b=_a.blockProps,itemId=_b.itemId,type=_b.type,subscriptionIdentifier=_b.subscriptionIdentifier;var user=useCurrentUser();if(subscriptionIdentifier!==user.subscription.id&&subscriptionIdentifier!==user.subscription.subscriptionHandle){return null;}return jsx$1(EmbeddedObjectTile,{id:itemId,type:parseInt(type),previewTheme:"dark"},void 0);};var InlineUrlPreviewMapper={component:InlineUrlPreview,type:EntityType.UrlPreview,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var itemId=node.getAttribute('data-item-id');if(itemId==null){return null;}return {itemId:itemId,type:node.getAttribute('data-type'),subscriptionIdentifier:node.getAttribute('data-subscription-identifier')};}};var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$1h||(templateObject_1$1h=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$1h;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)},void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$1g;var EventDetailViewDatesInfo=function EventDetailViewDatesInfo(_a){var className=_a.className;var item=useDetailViewContext().item;return jsx$1(Host$t,{children:jsx$1(DateTimeRange,{className:className,startDate:item.startDate,endDate:item.endDate},void 0)},void 0);};var Host$t=_styled.div.withConfig({displayName:"EventDetailViewDatesInfo__Host",componentId:"sc-3sblty-0"})(templateObject_1$1f||(templateObject_1$1f=__makeTemplateObject(["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"],["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"])),fontSizeSmall,spacingM);var templateObject_1$1f;var EventDetailViewPeopleInfo=function EventDetailViewPeopleInfo(){var item=useDetailViewContext().item;return jsx$1(StyledEventPeopleInfo,{item:item},void 0);};var StyledEventPeopleInfo=_styled(EventPeopleInfo).withConfig({displayName:"EventDetailViewPeopleInfo__StyledEventPeopleInfo",componentId:"sc-1d42bpm-0"})(templateObject_1$1e||(templateObject_1$1e=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$1e;var EventDetailViewLocationInfo=function EventDetailViewLocationInfo(){var item=useDetailViewContext().item;if(!item.locations||item.locations.length===0){return null;}return jsx$1(StyledEventLocationInfo,{locations:item.locations},void 0);};var StyledEventLocationInfo=_styled(EventLocationInfo).withConfig({displayName:"EventDetailViewLocationInfo__StyledEventLocationInfo",componentId:"sc-4kfe0w-0"})(templateObject_1$1d||(templateObject_1$1d=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$1d;var EventDetailViewMetaInfo=function EventDetailViewMetaInfo(_a){var allowFilterByChannels=_a.allowFilterByChannels;var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;return jsxs(Fragment,{children:[jsx$1(EventDetailViewLocationInfo,{},void 0),jsx$1(EventDetailViewPeopleInfo,{},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userPreferredLanguage,allowFilterByChannels:allowFilterByChannels},void 0)]},void 0);};var EventDetailViewCancelInformation=function EventDetailViewCancelInformation(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage;return jsx$1(EventCancelInformation,{item:item,language:contentLanguage},void 0);};var PollUserContext=/*#__PURE__*/createContext(null);var DetailViewPollsSubmitButton=function DetailViewPollsSubmitButton(_a){var isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;var _b=useContext(PollUserContext),submitPoll=_b.submitPoll,hasMissingUnsavedAnswer=_b.hasMissingUnsavedAnswer,hasMissingAnswers=_b.hasMissingAnswers,answers=_b.answers,resourceType=_b.resourceType,item=_b.item;var updatePollAnswers=useFeedbackApi().updatePollAnswers;if(!hasMissingUnsavedAnswer){return null;}return jsx$1("div",{children:jsx$1(PrimaryButton,{"data-poll-submit-button":true,onClick:function(){return submitPoll(function(){return updatePollAnswers(resourceType,item.id,answers);});},text:formatMessage({id:'Polls.display.submitButtonCaption'}),disabled:hasMissingAnswers||isReadOnly},void 0)},void 0);};var DetailViewCsvExportButton=function DetailViewCsvExportButton(_a){var path=_a.path,stringResource=_a.stringResource,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;if(!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsx$1(Host$s,__assign({className:className},{children:jsxs(DownloadButton$2,__assign({onClick:startDownload},{children:[jsx$1(LeftAlignedIcon,{iconName:"Download"},void 0),jsx$1(FormattedMessage$1,{id:stringResource},void 0)]}),void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(itemId,fileDownloadToken){return createApiUrl("/"+resourceType+"/"+itemId+"/"+path,{access_token:fileDownloadToken});}};var Host$s=_styled.div.withConfig({displayName:"DetailViewCsvExportButton__Host",componentId:"sc-n02scx-0"})(templateObject_1$1c||(templateObject_1$1c=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var DownloadButton$2=_styled(DefaultButton).withConfig({displayName:"DetailViewCsvExportButton__DownloadButton",componentId:"sc-n02scx-1"})(templateObject_2$K||(templateObject_2$K=__makeTemplateObject(["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;},maxScreenSize.medium,fontSizeSmall);var LeftAlignedIcon=_styled(Icon).withConfig({displayName:"DetailViewCsvExportButton__LeftAlignedIcon",componentId:"sc-n02scx-2"})(templateObject_3$w||(templateObject_3$w=__makeTemplateObject(["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"],["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1c,templateObject_2$K,templateObject_3$w;var DetailViewPollExportButton=function DetailViewPollExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.polls){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/poll/result/export",stringResource:"Polls.display.exportAsCsv"},void 0);};var PollTranslationContext=/*#__PURE__*/createContext(null);var PollTranslationContextProvider=function PollTranslationContextProvider(_a){var contents=_a.contents,language=_a.language,additionalTranslations=_a.additionalTranslations,children=_a.children;var user=useCurrentUser();var activeContents=Object.values(contents||{}).filter(function(c){return c.active;});var allLanguages=activeContents.map(function(c){return c.language;});var allTranslations=additionalTranslations||[];for(var _i=0,_b=activeContents.filter(function(c){return c.poll&&c.poll.questions;});_i<_b.length;_i++){var content=_b[_i];var language_1=content.language;for(var _c=0,_d=content.poll.questions;_c<_d.length;_c++){var question=_d[_c];allTranslations.push({language:language_1,id:question.questionId,text:question.text});for(var _e=0,_f=question.choices;_e<_f.length;_e++){var choice=_f[_e];allTranslations.push({language:language_1,id:choice.choiceId,text:choice.text});}}}return jsx$1(PollTranslationContext.Provider,__assign({value:{getAllTranslations:getAllTranslations,getTranslation:getTranslation}},{children:jsx$1(Fragment,{children:children},void 0)}),void 0);function getAllTranslations(id){return allTranslations.filter(function(t){return t.id===id&&t.text;});}function getTranslation(id){var preferredLanguage=NewsService.getUserPreferredLanguage(allLanguages,user);var translationItems=getAllTranslations(id);var translation=translationItems.find(function(t){return t.language===language;})||translationItems.find(function(t){return t.language===preferredLanguage;})||translationItems[0];return translation?translation.text:null;}};var PollUserInput=function PollUserInput(){var _a=useContext(PollUserContext),questions=_a.questions,getQuestionResult=_a.getQuestionResult,addAnswer=_a.addAnswer;return jsx$1("div",{children:questions.map(function(q){return jsx$1(QuestionInputItem,{question:q,onChange:function(choiceIds){return handleQuestionChange(q,choiceIds);},result:getQuestionResult(q.questionId)},q.questionId);})},void 0);function handleQuestionChange(question,choiceIds){addAnswer(question.questionId,choiceIds);}};var QuestionInput=function QuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var questionText=getTranslation(question.questionId);return jsxs("div",__assign({className:className,"data-question-id":question.questionId,"data-question-text":questionText},{children:[jsx$1(QuestionText,{children:questionText},void 0),question.isMultiChoice&&jsx$1(MultiChoiceQuestionInput,{question:question,onChange:onChange,result:result},void 0),!question.isMultiChoice&&jsx$1(SingleChoiceQuestionInput,{question:question,onChange:function(choiceId){return onChange([choiceId]);},result:result},void 0)]}),void 0);};var MultiChoiceQuestionInput=function MultiChoiceQuestionInput(_a){var question=_a.question,result=_a.result,onChange=_a.onChange;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1("div",{children:question.choices.map(function(c){return jsx$1(StyledCheckbox,{isResultMode:result.showResults,disabled:result.showResults||c.disabled,checked:result.userSelectedChoices.some(function(sc){return sc===c.choiceId;}),onChange:function(_,isChecked){return handleMultipleChoiceChange(c.choiceId,isChecked);},label:getTranslation(c.choiceId),onRenderLabel:function(_){return jsx$1(MultiChoiceLabel,{choice:c,result:result},void 0);}},c.choiceId);})},void 0);function handleMultipleChoiceChange(choiceId,isSelected){var choiceIds=result.userSelectedChoices.filter(function(c){return c!==choiceId;});if(isSelected){choiceIds.push(choiceId);}onChange(choiceIds);}};var SingleChoiceQuestionInput=function SingleChoiceQuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1(ChoiceInput,{isResultMode:result.showResults,selectedKey:result.userSelectedChoices[0],onChange:function(_,option){return onChange(option.key);},options:question.choices.map(function(c){return {key:c.choiceId,choiceId:c.choiceId,text:getTranslation(c.choiceId),disabled:result.showResults||c.disabled,onRenderLabel:function(_){return jsx$1(SingleChoiceLabel,{choice:c,result:result},void 0);}};})},void 0);};var ChoiceLabel=function ChoiceLabel(_a){var choice=_a.choice,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var choiceText=getTranslation(choice.choiceId);return jsxs(ChoiceLabelHost,__assign({isResultMode:result.showResults,className:className,"data-choice-id":choice.choiceId,"data-choice-text":choiceText},{children:[choiceText,choice.description&&jsx$1(ChoiceLabelSecondaryText,__assign({"data-choice-secondary-text":true},{children:choice.description}),void 0),result.showResults&&jsx$1(ChoiceResult,{result:result,choiceId:choice.choiceId},void 0)]}),void 0);};var ChoiceResult=function ChoiceResult(_a){var choiceId=_a.choiceId,result=_a.result;var numberResult=result.choiceResults[choiceId]||0;var percent=numberResult/result.totalFeedbackCount;var palette=useContext(ThemeContext$1).theme.palette;return jsxs(ChoiceResultHost,__assign({"data-choice-result":numberResult},{children:[jsx$1(Bar,{percentComplete:percent,barHeight:10,styles:{progressBar:{backgroundColor:palette.accent}}},void 0),jsx$1("span",{children:jsx$1(FormattedNumber,{value:numberResult},void 0)},void 0)]}),void 0);};var ChoiceResultHost=_styled.div.withConfig({displayName:"PollUserInput__ChoiceResultHost",componentId:"sc-eeg1mx-0"})(templateObject_1$1b||(templateObject_1$1b=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"],["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"])));var Bar=_styled(ProgressIndicator).withConfig({displayName:"PollUserInput__Bar",componentId:"sc-eeg1mx-1"})(templateObject_2$J||(templateObject_2$J=__makeTemplateObject(["\n flex: 1 0 auto;\n"],["\n flex: 1 0 auto;\n"])));var QuestionText=_styled.div.withConfig({displayName:"PollUserInput__QuestionText",componentId:"sc-eeg1mx-2"})(templateObject_3$v||(templateObject_3$v=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var QuestionInputItem=_styled(QuestionInput).withConfig({displayName:"PollUserInput__QuestionInputItem",componentId:"sc-eeg1mx-3"})(templateObject_4$l||(templateObject_4$l=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingL);var ChoiceLabelHost=_styled.span.withConfig({displayName:"PollUserInput__ChoiceLabelHost",componentId:"sc-eeg1mx-4"})(templateObject_5$k||(templateObject_5$k=__makeTemplateObject(["\n display: inline-block;\n ","\n ","\n"],["\n display: inline-block;\n ","\n ","\n"])),function(p){return p.isResultMode&&'max-width: 400px;';},function(p){return p.isResultMode&&'width: 100%;';});var ChoiceLabelSecondaryText=_styled.div.withConfig({displayName:"PollUserInput__ChoiceLabelSecondaryText",componentId:"sc-eeg1mx-5"})(templateObject_6$c||(templateObject_6$c=__makeTemplateObject(["\n opacity: 0.75;\n"],["\n opacity: 0.75;\n"])));var SingleChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__SingleChoiceLabel",componentId:"sc-eeg1mx-6"})(templateObject_7$9||(templateObject_7$9=__makeTemplateObject(["\n padding-left: 30px;\n"],["\n padding-left: 30px;\n"])));var MultiChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__MultiChoiceLabel",componentId:"sc-eeg1mx-7"})(templateObject_8$8||(templateObject_8$8=__makeTemplateObject(["\n padding-left: 5px;\n"],["\n padding-left: 5px;\n"])));var ChoiceInput=_styled(ChoiceGroup).withConfig({displayName:"PollUserInput__ChoiceInput",componentId:"sc-eeg1mx-8"})(templateObject_9$6||(templateObject_9$6=__makeTemplateObject(["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"],["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"])));var StyledCheckbox=_styled(Checkbox).withConfig({displayName:"PollUserInput__StyledCheckbox",componentId:"sc-eeg1mx-9"})(templateObject_10$5||(templateObject_10$5=__makeTemplateObject(["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"],["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"])),function(p){return p.isResultMode?'flex-start':'center';});var templateObject_1$1b,templateObject_2$J,templateObject_3$v,templateObject_4$l,templateObject_5$k,templateObject_6$c,templateObject_7$9,templateObject_8$8,templateObject_9$6,templateObject_10$5;var PollDisplay=function PollDisplay(_a){var children=_a.children,className=_a.className;var formatMessage=useIntl().formatMessage;return jsxs("section",__assign({className:className,"aria-label":formatMessage({id:'Polls.sectionLabel'}),"data-consumer-poll":true},{children:[jsx$1(PollUserInput,{},void 0),children]}),void 0);};var PollUserContextProvider=function PollUserContextProvider(_a){var _b;var item=_a.item,onBehalfOfUpn=_a.onBehalfOfUpn,resourceType=_a.resourceType,language=_a.language,getAdditionalQuestions=_a.getAdditionalQuestions,getAdditionalUserAnswers=_a.getAdditionalUserAnswers,getPollResults=_a.getPollResults,showResult=_a.showResult,children=_a.children;var poll=item.poll,itemId=item.id;var getFeedback=useFeedbackApi().getFeedback;var _c=useState$2(getAdditionalQuestions===null||getAdditionalQuestions===void 0?void 0:getAdditionalQuestions(null)),additionalQuestions=_c[0],setAdditionalQuestions=_c[1];var showError=useNotificationContext().showError;var questionDefinitions=(_b=poll===null||poll===void 0?void 0:poll.questions)!==null&&_b!==void 0?_b:[];var _d=usePromise$2(loadUserAnswers),userAnswers=_d[0],isLoading=_d[1],setUserAnswers=_d[3];var _e=useState$2([]),unsavedQuestionsIds=_e[0],setUnsavedQuestionsIds=_e[1];var _f=usePromise$2(function(){return getPollResults(itemId);},{answers:[]},[itemId]),pollResult=_f[0],isLoadingPollResult=_f[1],fetchPollResults=_f[5];useEffect$1(function(){var _a;if(isLoadingPollResult||!((_a=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_a===void 0?void 0:_a.length)){return;}getAdditionalQuestions&&setAdditionalQuestions(getAdditionalQuestions(pollResult));// eslint-disable-next-line react-hooks/exhaustive-deps
126315
+ if(node.querySelector('blockquote[data-quote-text]')==null){node.innerHTML='';}}};var InlineVideo=function InlineVideo(_a){var _b=_a.blockProps,id=_b.id,source=_b.source,url=_b.url,isDirectUrl=_b.isDirectUrl;var user=useCurrentUser();var token=useCurrentToken();var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var isStreamVideo=source===VideoSource.MicrosoftStream;if(isStreamVideo&&env.isAnyMobileApp){return jsx$1(PrimaryButton,__assign({onClick:handleMicrosoftStreamClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.watchMicrosoftStream"},void 0)}),void 0);}return jsx$1(InlineVideoViewer,{videoInfo:{id:id,source:source,url:url,isDirectUrl:isDirectUrl},videoThumbnailUrl:isDirectUrl?getVideoThumbnailUrl(token,user.subscription.id,source,id):null},void 0);function handleMicrosoftStreamClick(){return __awaiter(this,void 0,void 0,function(){var url;return __generator(this,function(_a){switch(_a.label){case 0:url=getMicrosoftStreamVideoUrl(id);return [4/*yield*/,onOpenExternalLink(url,true)];case 1:_a.sent();return [2/*return*/];}});});}};var InlineVideoViewer=_styled(VideoWithThumbnailView).withConfig({displayName:"InlineVideo__InlineVideoViewer",componentId:"sc-12qdsy1-0"})(templateObject_1$1t||(templateObject_1$1t=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var InlineVideoMapper={component:InlineVideo,type:EntityType.Video,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var videoId=node.getAttribute('data-video-id');if(videoId==null){return null;}var source=node.getAttribute('data-video-source');return {id:videoId,source:parseInt(source,10),url:node.getAttribute('data-video-url'),isDirectUrl:node.getAttribute('data-is-direct-video-url')==='true'};},prepareRootNode:function(node){if(node.childNodes.length>0){node.innerHTML='';}}};var templateObject_1$1t;var InlinePageListViewer=function InlinePageListViewer(_a){var items=_a.items,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,isInitialLoading=_a.isInitialLoading;var theme=useTheme$2();if(!items||items.length===0){return null;}return jsx$1(PagesList,__assign({"data-inline-page-list":true},{children:items.map(function(item){var isPublished=!item.hasHiddenAncestor&&(item.isCurrentPublishedVersion||!!item.publishedVersionId);return jsx$1(StyledPageItemTile,{item:item,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,styleDefinition:{backgroundColor:theme.palette.neutralLighter,bannerDefaultWidth:70,height:70,applyRoundedCorners:true,titleFontSize:fontSizeSmall,titleMargin:'0',contentPadding:spacingS-2+"px "+(spacingM-5)+"px"},additionalContent:jsx$1(StyledDocumentDownloadButton$2,{page:item},void 0),showBannerPlaceholder:true,isVisible:isPublished||isInitialLoading},item.id);})}),void 0);};var PagesList=_styled.div.withConfig({displayName:"InlinePageListViewer__PagesList",componentId:"sc-qn2xdx-0"})(templateObject_1$1s||(templateObject_1$1s=__makeTemplateObject(["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS);var StyledPageItemTile=_styled(PageItemTile).withConfig({displayName:"InlinePageListViewer__StyledPageItemTile",componentId:"sc-qn2xdx-1"})(templateObject_2$Q||(templateObject_2$Q=__makeTemplateObject(["\n opacity: ",";\n"],["\n opacity: ",";\n"])),function(p){return p.isVisible?'1':'0.3';});var StyledDocumentDownloadButton$2=_styled(DocumentDownloadButton).withConfig({displayName:"InlinePageListViewer__StyledDocumentDownloadButton",componentId:"sc-qn2xdx-2"})(templateObject_3$z||(templateObject_3$z=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"])));var templateObject_1$1s,templateObject_2$Q,templateObject_3$z;var InlinePageListWithPaging=function InlinePageListWithPaging(_a){var pages=_a.pages,baseRoute=_a.baseRoute,_b=_a.pagingProps,getNextPage=_b.getNextPage,getFirstPage=_b.getFirstPage,getPrevPage=_b.getPrevPage,isFirstPage=_b.isFirstPage,isInitialLoading=_b.isInitialLoading,isLoadingNextPage=_b.isLoadingNextPage,hideNextButton=_b.hideNextButton,filterBaseUrl=_a.filterBaseUrl;return jsxs(Fragment,{children:[jsx$1(InlinePageListViewer,{items:pages,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,isInitialLoading:isInitialLoading},void 0),jsx$1(HorizontalPager,{onNextClick:getNextPage,onPrevClick:getPrevPage,onFirstClick:getFirstPage,hidePrevButton:isFirstPage||isInitialLoading,hideNextButton:hideNextButton,isLoadingNextPage:isLoadingNextPage},void 0)]},void 0);};function useItemLoaderByCurrentPage(currentPageId,pageSize,navigationContext,settings,getAllItemsHandler,deps){var _a=useState$2(getAllItems()),allItems=_a[0],setAllItems=_a[1];var allItemIdsString=allItems===null||allItems===void 0?void 0:allItems.map(function(i){return i.id;}).join(',');var _b=useItemLoaderWithPreFetch(pageSize,loadNextItems,[allItemIdsString]),items=_b.items,pagingProps=__rest(_b,["items"]);useEffect$1(function(){setAllItems(getAllItems());},__spreadArray([],deps||[]));var skeletonItems=getNextItems();var pageItems=pagingProps.isInitialLoading?skeletonItems:items;var hideNextButton=pagingProps.isInitialLoading?allItems.length<=pageSize:pagingProps.isLastPage;return {pageItems:pageItems,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:hideNextButton})};function getAllItems(){var _a;var children=(_a=navigationContext===null||navigationContext===void 0?void 0:navigationContext.children)!==null&&_a!==void 0?_a:[];if(settings.showPages&&settings.showDocuments){return children;}var filteredChildren=children.filter(function(c){return c.pageType===(settings.showPages?PageType.Page:PageType.Document);});return filteredChildren;}function getNextItems(startIndex,paginationToken){if(startIndex===void 0){startIndex=0;}if(paginationToken===void 0){paginationToken=pageSize;}return allItems.slice(startIndex,paginationToken);}function loadNextItems(pageSize,paginationToken){return __awaiter(this,void 0,void 0,function(){var showSubpagesAndDocuments,pageType,result_1,fullAllItems,token,newPaginationToken;return __generator(this,function(_a){switch(_a.label){case 0:if(!!paginationToken)return [3/*break*/,2];showSubpagesAndDocuments=settings.showPages&&settings.showDocuments;pageType=settings.showPages?PageType.Page:PageType.Document;return [4/*yield*/,getAllItemsHandler(currentPageId,showSubpagesAndDocuments?undefined:pageType)];case 1:result_1=_a.sent();fullAllItems=allItems.map(function(i){return result_1.find(function(r){return r.id===i.id;});});setAllItems(fullAllItems);return [2/*return*/,{items:fullAllItems.slice(0,pageSize),paginationToken:pageSize,nextItem:fullAllItems[pageSize]}];case 2:token=parseInt(paginationToken);newPaginationToken=token+pageSize;return [2/*return*/,{items:getNextItems(token,newPaginationToken),paginationToken:newPaginationToken,nextItem:allItems[newPaginationToken]}];}});});}}var InlinePageListSkeleton=function InlinePageListSkeleton(_a){var isDataLoaded=_a.isDataLoaded,_b=_a.pageSize,pageSize=_b===void 0?5:_b,children=_a.children;var items=Array.from(Array(pageSize).keys());var uniqueId=createId();var palette=useContext(ThemeContext$1).theme.palette;return jsx$1(Shimmer,__assign({isDataLoaded:isDataLoaded,shimmerColors:{shimmer:palette.neutralTertiaryAlt,shimmerWave:palette.neutralTertiary},customElementsGroup:jsx$1(Fragment,{children:items.map(function(i){return jsx$1(PageItemShimmer,{},uniqueId+"-"+i);})},void 0)},{children:children}),void 0);};var PageItemShimmer=function PageItemShimmer(){var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$y,{children:[jsxs(Inner$2$1,{children:[jsx$1(ShimmerElementsGroup,{styles:{root:{backgroundColor:palette.accent,borderRadius:5}},width:'70px',shimmerElements:[{type:ShimmerElementType.line,height:70,width:70}]},void 0),jsx$1(ShimmerElementsGroup,{backgroundColor:palette.neutralLighter,width:"calc(100% - 70px)",flexWrap:true,shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(20% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'80%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(100% - "+2*spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(40% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'60%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0);};var Host$y=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Host",componentId:"sc-13wpgyn-0"})(templateObject_1$1r||(templateObject_1$1r=__makeTemplateObject([""],[""])));var Inner$2$1=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Inner",componentId:"sc-13wpgyn-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var templateObject_1$1r,templateObject_2$P;var InlineContact=function InlineContact(_a){var contact=__rest(_a.blockProps,[]);return jsx$1(InlineContactViewer,{contact:contact},void 0);};var InlineContactMapper={component:InlineContact,type:EntityType.Contact,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var contactId=node.getAttribute('data-contact-id');if(contactId==null){return null;}var properties={};Array.from(node.querySelectorAll('li')).forEach(function(childNode){var _a;var propertyKey=childNode.getAttribute('data-contact-property');var shouldAutoLoad=(_a=childNode.getAttribute('data-auto-load'))!==null&&_a!==void 0?_a:childNode.getAttribute('data-from-directory');var propertyValue=childNode.innerText;properties[propertyKey]={value:propertyValue,shouldAutoLoad:shouldAutoLoad==='true'};});return {id:contactId,tenantId:node.getAttribute('data-contact-tenantid'),upn:node.getAttribute('data-contact-upn'),properties:properties};}};var InlineCodeViewer=function InlineCodeViewer(_a){var codeDetails=_a.codeDetails,showJsPlaceholder=_a.showJsPlaceholder,readOnly=_a.readOnly;var htmlContainerRef=useRef$1(null);var javascriptContainerRef=useRef$1(null);useEffect$1(function(){if(readOnly){return;}if(htmlContainerRef.current!=null){if(htmlContainerRef.current.innerHTML!==codeDetails.html){htmlContainerRef.current.innerHTML=codeDetails.html;refreshScripts(htmlContainerRef.current);}}if(javascriptContainerRef.current!=null){var oldScript=javascriptContainerRef.current.querySelector('script');var newScriptText=";\n (function() {\n try {\n "+codeDetails.javascript+";\n } catch (err) {\n console.error(err);\n }\n })();";if(!oldScript||oldScript.innerText!==newScriptText){oldScript===null||oldScript===void 0?void 0:oldScript.remove();var script=document.createElement('script');script.type='text/javascript';var scriptContent=document.createTextNode(newScriptText);script.appendChild(scriptContent);javascriptContainerRef.current.appendChild(script);}}// eslint-disable-next-line react-hooks/exhaustive-deps
126316
+ },[codeDetails.html,codeDetails.javascript]);if(readOnly){return jsxs(Host$x,{children:[jsx$1("div",{children:codeDetails.html&&JSON.stringify(codeDetails.html)},void 0),jsx$1("div",{children:codeDetails.javascript&&JSON.stringify(codeDetails.javascript)},void 0)]},void 0);}return jsxs(Host$x,{children:[codeDetails.html&&jsx$1("div",{ref:function(c){return htmlContainerRef.current=c;}},void 0),codeDetails.javascript&&jsx$1("div",__assign({ref:function(c){return javascriptContainerRef.current=c;}},{children:!codeDetails.html&&showJsPlaceholder&&jsx$1(JavascriptPlaceholder,{},void 0)}),void 0)]},void 0);};var Host$x=_styled.div.withConfig({displayName:"InlineCodeViewer__Host",componentId:"sc-q9v8du-0"})(templateObject_1$1q||(templateObject_1$1q=__makeTemplateObject(["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"],["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"])));var JavascriptPlaceholder=_styled.div.withConfig({displayName:"InlineCodeViewer__JavascriptPlaceholder",componentId:"sc-q9v8du-1"})(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"],["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"])));var templateObject_1$1q,templateObject_2$O;var InlineCode=function InlineCode(_a){var _b=_a.blockProps,id=_b.id,html=_b.html,javascript=_b.javascript;var features=useFeatures();if(!features.editorInlineMarkup){return null;}return jsx$1(InlineCodeViewer,{codeDetails:{id:id,html:html,javascript:javascript}},void 0);};var InlineCodeMapper={component:InlineCode,type:EntityType.InlineCode,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var codeId=node.getAttribute('data-code-id');if(codeId==null){return null;}var html=(_b=(_a=node.querySelector('[data-code-html]'))===null||_a===void 0?void 0:_a.innerHTML)!==null&&_b!==void 0?_b:node.getAttribute('data-code-html');var javascript=(_d=(_c=node.querySelector('script[type="text/javascript"][data-code-javascript]'))===null||_c===void 0?void 0:_c.innerHTML)!==null&&_d!==void 0?_d:node.getAttribute('data-code-javascript');return {id:codeId,html:html,javascript:javascript};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
126317
+ // in order to ensure parsing old blocks
126318
+ if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var HeaderFormat=css$2(templateObject_1$1p||(templateObject_1$1p=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$N||(templateObject_2$N=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid=css$2(templateObject_3$y||(templateObject_3$y=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$n||(templateObject_4$n=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$m||(templateObject_5$m=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1p,templateObject_2$N,templateObject_3$y,templateObject_4$n,templateObject_5$m;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$w,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$w=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1o;var ItemBodyWrapper=function ItemBodyWrapper(_a){var className=_a.className,children=_a.children;return jsx$1(Host$v,__assign({className:className,"data-body-wrapper":true},{children:children}),void 0);};var Host$v=_styled.div.withConfig({displayName:"ItemBodyWrapper__Host",componentId:"sc-6adwhw-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"],["\n && {\n p,\n ul,\n ol,\n pre,\n blockquote,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n -webkit-margin-before: 0;\n -webkit-margin-end: 0;\n -webkit-margin-after: 0;\n -webkit-margin-start: 0;\n\n -webkit-padding-before: 0;\n -webkit-padding-end: 0;\n -webkit-padding-after: 0;\n -webkit-padding-start: 0;\n }\n\n h1 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n\n p,\n .paragraph,\n ul,\n ol {\n word-wrap: break-word;\n margin-bottom: 1em;\n line-height: 20px;\n }\n\n blockquote {\n line-height: 20px;\n }\n\n ul,\n ol {\n padding-left: 18px;\n }\n\n li {\n margin-bottom: 10px;\n }\n\n a {\n color: ",";\n text-decoration: underline;\n }\n\n .news-inline-file {\n position: relative;\n margin: 10px 3px;\n user-select: none;\n\n > a,\n button {\n max-width: 100%;\n display: inline-block;\n box-sizing: border-box;\n padding: 12px 20px;\n box-shadow: 0 2px 3px 2px #b7b7b7;\n width: auto;\n color: inherit;\n line-height: 1.5em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n text-decoration: none;\n\n i {\n margin-right: 10px;\n font-size: 25px;\n vertical-align: bottom;\n }\n }\n }\n\n figure:not([data-inline-quote='true']) {\n margin: 0;\n }\n\n .news-inline-image {\n margin-bottom: 15px;\n\n figure {\n margin: 0;\n }\n\n figcaption {\n font-style: italic;\n }\n }\n\n /* news-inline-quote -\n required for backwards compatibility with old news */\n .news-inline-quote {\n max-width: 80%;\n\n figure {\n display: inline-block;\n\n blockquote {\n border-left: 0;\n font-size: 15px;\n }\n\n figcaption {\n text-align: right;\n margin-top: 10px;\n position: relative;\n\n > div {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50px, -15px);\n }\n }\n }\n }\n\n .video-view-container {\n margin-bottom: 15px;\n }\n\n @media (max-width: ","px) {\n .news-inline-quote {\n max-width: 100%;\n\n figcaption {\n margin-right: 10px;\n }\n }\n\n h1 {\n font-size: ","px;\n }\n\n h2 {\n font-size: ","px;\n }\n\n h3 {\n font-size: ","px;\n }\n\n p,\n .paragraph,\n ul,\n ol,\n blockquote,\n figcaption,\n td {\n font-size: ","px;\n }\n }\n\n @media (min-width: ","px) {\n .news-inline-quote {\n figure {\n blockquote {\n font-size: 20px;\n }\n }\n }\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS,function(p){return p.theme.palette.accent;},maxScreenSize.medium,fontSizeLarge-3,fontSizeLarge-5,fontSizeMedium,fontSizeSmall,minScreenSize.small);var templateObject_1$1n;var InlineFileList=function InlineFileList(_a){var fileBlock=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var getFileUrlWithToken=useFileApi().getFileUrlWithToken;if(!fileBlock.files||fileBlock.files.length===0){return null;}var files=fileBlock.files.map(function(f){if(f.pageId){return __assign({},f);}var getFileUrl=function getFileUrl(token){var _a;return ((_a=f.getDownloadUrl)===null||_a===void 0?void 0:_a.call(f,token))||getFileUrlWithToken(token||item.fileAccessToken,item.id,undefined,f.fileId,f.fileName,resourceType);};return __assign(__assign({},f),{getDownloadUrl:getFileUrl,accessToken:item.fileAccessToken});});var audioFiles=files.filter(function(f){return isAudioFile(f.fileName);});var videoFiles=files.filter(function(f){return isVideoFile(f.fileName);});var otherFiles=files.filter(function(f){return !audioFiles.includes(f)&&!videoFiles.includes(f);});return jsxs(Fragment,{children:[videoFiles.length>0&&jsx$1(FileListHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:videoFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(VideoFileHost,__assign({"data-preload-video":browserInfo.name==='safari'},{children:jsx$1(VideoFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)}),void 0)},f.fileId);})}),void 0),audioFiles.length>0&&jsx$1(FileListHost,{children:audioFiles.map(function(f){var _a;return jsx$1(FileListItem,{children:jsx$1(AudioFile,{fileName:(_a=f.title)!==null&&_a!==void 0?_a:f.fileName,url:f.getDownloadUrl()},void 0)},f.fileId);})},void 0),otherFiles.length>0&&jsx$1(FileListHost,{children:otherFiles.map(function(f){return jsx$1(FileListItem,{children:f.pageId?jsx$1(InlinePageDocument,{file:f},void 0):jsx$1(InlineFileDownloadButton,{getFileUrl:f.getDownloadUrl,fileAccessToken:item.fileAccessToken,fileName:f.fileName,title:f.title},void 0)},f.fileId);})},void 0)]},void 0);};var InlinePageDocument=function InlinePageDocument(_a){var file=_a.file;var pageId=file.pageId;var loadPage=usePagesApi().loadPage;var page=usePromise$2(function(){return loadPage(pageId);},undefined,[pageId])[0];var _b=useInlinePageDocument(file,page),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsx$1(InlinePageDocumentDownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0);};var InlineFileMapper={component:InlineFileList,type:EntityType.File,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var blockId=node.getAttribute('data-file-block');if(!blockId){var fileId=node.getAttribute('data-file-id')||node.getAttribute('data-file-fileid');if(fileId==null){return null;}var title=node.getAttribute('data-file-title');var fileName=node.getAttribute('data-file-name');var pageId=node.getAttribute('data-inline-page-document-id');var extension=node.getAttribute('data-file-extension');return {blockId:createId(),files:[{fileId:fileId,title:title,fileName:fileName,pageId:pageId,extension:extension}]};}return {blockId:blockId,files:Array.from(node.querySelectorAll('[data-file-id], [data-file-fileid]')).map(function(fileNode){var _a;return {fileId:(_a=fileNode.getAttribute('data-file-id'))!==null&&_a!==void 0?_a:fileNode.getAttribute('data-file-fileid'),fileName:fileNode.getAttribute('data-file-name'),title:fileNode.getAttribute('data-file-title'),pageId:fileNode.getAttribute('data-inline-page-document-id'),extension:fileNode.getAttribute('data-file-extension')};})};}};var VideoFileHost=_styled.div.withConfig({displayName:"InlineFileList__VideoFileHost",componentId:"sc-16i3l51-0"})(templateObject_1$1m||(templateObject_1$1m=__makeTemplateObject(["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"],["\n width: 100%;\n\n video {\n width: 100%;\n border-radius: ","px;\n overflow: hidden;\n }\n\n &[data-preload-video='true'] {\n video {\n box-shadow: inset 0 0 0 0.5px #707070, 0 0 0 0.5px #707070;\n background-color: #e4e4e4;\n }\n }\n"])),videoAttachmentRoundedCornerSize);var templateObject_1$1m;var EventDetailViewPeopleInfo=function EventDetailViewPeopleInfo(){var item=useDetailViewContext().item;return jsx$1(StyledEventPeopleInfo,{item:item},void 0);};var StyledEventPeopleInfo=_styled(EventPeopleInfo).withConfig({displayName:"EventDetailViewPeopleInfo__StyledEventPeopleInfo",componentId:"sc-1d42bpm-0"})(templateObject_1$1l||(templateObject_1$1l=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$1l;var EventDetailViewLocationInfo=function EventDetailViewLocationInfo(){var item=useDetailViewContext().item;if(!item.locations||item.locations.length===0){return null;}return jsx$1(StyledEventLocationInfo,{locations:item.locations},void 0);};var StyledEventLocationInfo=_styled(EventLocationInfo).withConfig({displayName:"EventDetailViewLocationInfo__StyledEventLocationInfo",componentId:"sc-4kfe0w-0"})(templateObject_1$1k||(templateObject_1$1k=__makeTemplateObject(["\n margin: ","px 0;\n"],["\n margin: ","px 0;\n"])),spacingS);var templateObject_1$1k;var EventDetailViewMetaInfo=function EventDetailViewMetaInfo(_a){var allowFilterByChannels=_a.allowFilterByChannels;var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;return jsxs(Fragment,{children:[jsx$1(EventDetailViewLocationInfo,{},void 0),jsx$1(EventDetailViewPeopleInfo,{},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userPreferredLanguage,allowFilterByChannels:allowFilterByChannels},void 0)]},void 0);};var EventDetailViewDatesInfo=function EventDetailViewDatesInfo(_a){var className=_a.className;var item=useDetailViewContext().item;return jsx$1(Host$u,{children:jsx$1(DateTimeRange,{className:className,startDate:item.startDate,endDate:item.endDate},void 0)},void 0);};var Host$u=_styled.div.withConfig({displayName:"EventDetailViewDatesInfo__Host",componentId:"sc-3sblty-0"})(templateObject_1$1j||(templateObject_1$1j=__makeTemplateObject(["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"],["\n font-size: ","px;\n margin-bottom: ","px;\n font-weight: 500;\n"])),fontSizeSmall,spacingM);var templateObject_1$1j;var PollUserContext=/*#__PURE__*/createContext(null);var DetailViewPollsSubmitButton=function DetailViewPollsSubmitButton(_a){var isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;var _b=useContext(PollUserContext),submitPoll=_b.submitPoll,hasMissingUnsavedAnswer=_b.hasMissingUnsavedAnswer,hasMissingAnswers=_b.hasMissingAnswers,answers=_b.answers,resourceType=_b.resourceType,item=_b.item;var updatePollAnswers=useFeedbackApi().updatePollAnswers;if(!hasMissingUnsavedAnswer){return null;}return jsx$1("div",{children:jsx$1(PrimaryButton,{"data-poll-submit-button":true,onClick:function(){return submitPoll(function(){return updatePollAnswers(resourceType,item.id,answers);});},text:formatMessage({id:'Polls.display.submitButtonCaption'}),disabled:hasMissingAnswers||isReadOnly},void 0)},void 0);};var DetailViewCsvExportButton=function DetailViewCsvExportButton(_a){var path=_a.path,stringResource=_a.stringResource,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;if(!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsx$1(Host$t,__assign({className:className},{children:jsxs(DownloadButton$2,__assign({onClick:startDownload},{children:[jsx$1(LeftAlignedIcon,{iconName:"Download"},void 0),jsx$1(FormattedMessage$1,{id:stringResource},void 0)]}),void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(itemId,fileDownloadToken){return createApiUrl("/"+resourceType+"/"+itemId+"/"+path,{access_token:fileDownloadToken});}};var Host$t=_styled.div.withConfig({displayName:"DetailViewCsvExportButton__Host",componentId:"sc-n02scx-0"})(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var DownloadButton$2=_styled(DefaultButton).withConfig({displayName:"DetailViewCsvExportButton__DownloadButton",componentId:"sc-n02scx-1"})(templateObject_2$M||(templateObject_2$M=__makeTemplateObject(["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n align-self: flex-start;\n color: ",";\n border: 0;\n padding: 0;\n margin: 0;\n\n &:hover {\n background-color: initial;\n color: ",";\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.theme.textColors.default;},maxScreenSize.medium,fontSizeSmall);var LeftAlignedIcon=_styled(Icon).withConfig({displayName:"DetailViewCsvExportButton__LeftAlignedIcon",componentId:"sc-n02scx-2"})(templateObject_3$x||(templateObject_3$x=__makeTemplateObject(["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"],["\n margin-left: -2px; // remove the 2px space this icon has on the left side\n margin-right: 5px;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1i,templateObject_2$M,templateObject_3$x;var DetailViewPollExportButton=function DetailViewPollExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.polls){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/poll/result/export",stringResource:"Polls.display.exportAsCsv"},void 0);};var PollTranslationContext=/*#__PURE__*/createContext(null);var PollTranslationContextProvider=function PollTranslationContextProvider(_a){var contents=_a.contents,language=_a.language,additionalTranslations=_a.additionalTranslations,children=_a.children;var user=useCurrentUser();var activeContents=Object.values(contents||{}).filter(function(c){return c.active;});var allLanguages=activeContents.map(function(c){return c.language;});var allTranslations=additionalTranslations||[];for(var _i=0,_b=activeContents.filter(function(c){return c.poll&&c.poll.questions;});_i<_b.length;_i++){var content=_b[_i];var language_1=content.language;for(var _c=0,_d=content.poll.questions;_c<_d.length;_c++){var question=_d[_c];allTranslations.push({language:language_1,id:question.questionId,text:question.text});for(var _e=0,_f=question.choices;_e<_f.length;_e++){var choice=_f[_e];allTranslations.push({language:language_1,id:choice.choiceId,text:choice.text});}}}return jsx$1(PollTranslationContext.Provider,__assign({value:{getAllTranslations:getAllTranslations,getTranslation:getTranslation}},{children:jsx$1(Fragment,{children:children},void 0)}),void 0);function getAllTranslations(id){return allTranslations.filter(function(t){return t.id===id&&t.text;});}function getTranslation(id){var preferredLanguage=NewsService.getUserPreferredLanguage(allLanguages,user);var translationItems=getAllTranslations(id);var translation=translationItems.find(function(t){return t.language===language;})||translationItems.find(function(t){return t.language===preferredLanguage;})||translationItems[0];return translation?translation.text:null;}};var PollUserInput=function PollUserInput(){var _a=useContext(PollUserContext),questions=_a.questions,getQuestionResult=_a.getQuestionResult,addAnswer=_a.addAnswer;return jsx$1("div",{children:questions.map(function(q){return jsx$1(QuestionInputItem,{question:q,onChange:function(choiceIds){return handleQuestionChange(q,choiceIds);},result:getQuestionResult(q.questionId)},q.questionId);})},void 0);function handleQuestionChange(question,choiceIds){addAnswer(question.questionId,choiceIds);}};var QuestionInput=function QuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var questionText=getTranslation(question.questionId);return jsxs("div",__assign({className:className,"data-question-id":question.questionId,"data-question-text":questionText},{children:[jsx$1(QuestionText,{children:questionText},void 0),question.isMultiChoice&&jsx$1(MultiChoiceQuestionInput,{question:question,onChange:onChange,result:result},void 0),!question.isMultiChoice&&jsx$1(SingleChoiceQuestionInput,{question:question,onChange:function(choiceId){return onChange([choiceId]);},result:result},void 0)]}),void 0);};var MultiChoiceQuestionInput=function MultiChoiceQuestionInput(_a){var question=_a.question,result=_a.result,onChange=_a.onChange;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1("div",{children:question.choices.map(function(c){return jsx$1(StyledCheckbox,{isResultMode:result.showResults,disabled:result.showResults||c.disabled,checked:result.userSelectedChoices.some(function(sc){return sc===c.choiceId;}),onChange:function(_,isChecked){return handleMultipleChoiceChange(c.choiceId,isChecked);},label:getTranslation(c.choiceId),onRenderLabel:function(_){return jsx$1(MultiChoiceLabel,{choice:c,result:result},void 0);}},c.choiceId);})},void 0);function handleMultipleChoiceChange(choiceId,isSelected){var choiceIds=result.userSelectedChoices.filter(function(c){return c!==choiceId;});if(isSelected){choiceIds.push(choiceId);}onChange(choiceIds);}};var SingleChoiceQuestionInput=function SingleChoiceQuestionInput(_a){var question=_a.question,onChange=_a.onChange,result=_a.result;var getTranslation=useContext(PollTranslationContext).getTranslation;return jsx$1(ChoiceInput,{isResultMode:result.showResults,selectedKey:result.userSelectedChoices[0],onChange:function(_,option){return onChange(option.key);},options:question.choices.map(function(c){return {key:c.choiceId,choiceId:c.choiceId,text:getTranslation(c.choiceId),disabled:result.showResults||c.disabled,onRenderLabel:function(_){return jsx$1(SingleChoiceLabel,{choice:c,result:result},void 0);}};})},void 0);};var ChoiceLabel=function ChoiceLabel(_a){var choice=_a.choice,result=_a.result,className=_a.className;var getTranslation=useContext(PollTranslationContext).getTranslation;var choiceText=getTranslation(choice.choiceId);return jsxs(ChoiceLabelHost,__assign({isResultMode:result.showResults,className:className,"data-choice-id":choice.choiceId,"data-choice-text":choiceText},{children:[choiceText,choice.description&&jsx$1(ChoiceLabelSecondaryText,__assign({"data-choice-secondary-text":true},{children:choice.description}),void 0),result.showResults&&jsx$1(ChoiceResult,{result:result,choiceId:choice.choiceId},void 0)]}),void 0);};var ChoiceResult=function ChoiceResult(_a){var choiceId=_a.choiceId,result=_a.result;var numberResult=result.choiceResults[choiceId]||0;var percent=numberResult/result.totalFeedbackCount;var palette=useContext(ThemeContext$1).theme.palette;return jsxs(ChoiceResultHost,__assign({"data-choice-result":numberResult},{children:[jsx$1(Bar,{percentComplete:percent,barHeight:10,styles:{progressBar:{backgroundColor:palette.accent}}},void 0),jsx$1("span",{children:jsx$1(FormattedNumber,{value:numberResult},void 0)},void 0)]}),void 0);};var ChoiceResultHost=_styled.div.withConfig({displayName:"PollUserInput__ChoiceResultHost",componentId:"sc-eeg1mx-0"})(templateObject_1$1h||(templateObject_1$1h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"],["\n display: flex;\n align-items: center;\n\n > span {\n padding-left: 10px;\n min-width: 44px;\n text-align: right;\n box-sizing: border-box;\n }\n"])));var Bar=_styled(ProgressIndicator).withConfig({displayName:"PollUserInput__Bar",componentId:"sc-eeg1mx-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n flex: 1 0 auto;\n"],["\n flex: 1 0 auto;\n"])));var QuestionText=_styled.div.withConfig({displayName:"PollUserInput__QuestionText",componentId:"sc-eeg1mx-2"})(templateObject_3$w||(templateObject_3$w=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var QuestionInputItem=_styled(QuestionInput).withConfig({displayName:"PollUserInput__QuestionInputItem",componentId:"sc-eeg1mx-3"})(templateObject_4$m||(templateObject_4$m=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingL);var ChoiceLabelHost=_styled.span.withConfig({displayName:"PollUserInput__ChoiceLabelHost",componentId:"sc-eeg1mx-4"})(templateObject_5$l||(templateObject_5$l=__makeTemplateObject(["\n display: inline-block;\n ","\n ","\n"],["\n display: inline-block;\n ","\n ","\n"])),function(p){return p.isResultMode&&'max-width: 400px;';},function(p){return p.isResultMode&&'width: 100%;';});var ChoiceLabelSecondaryText=_styled.div.withConfig({displayName:"PollUserInput__ChoiceLabelSecondaryText",componentId:"sc-eeg1mx-5"})(templateObject_6$d||(templateObject_6$d=__makeTemplateObject(["\n opacity: 0.75;\n"],["\n opacity: 0.75;\n"])));var SingleChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__SingleChoiceLabel",componentId:"sc-eeg1mx-6"})(templateObject_7$9||(templateObject_7$9=__makeTemplateObject(["\n padding-left: 30px;\n"],["\n padding-left: 30px;\n"])));var MultiChoiceLabel=_styled(ChoiceLabel).withConfig({displayName:"PollUserInput__MultiChoiceLabel",componentId:"sc-eeg1mx-7"})(templateObject_8$8||(templateObject_8$8=__makeTemplateObject(["\n padding-left: 5px;\n"],["\n padding-left: 5px;\n"])));var ChoiceInput=_styled(ChoiceGroup).withConfig({displayName:"PollUserInput__ChoiceInput",componentId:"sc-eeg1mx-8"})(templateObject_9$6||(templateObject_9$6=__makeTemplateObject(["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"],["\n .ms-ChoiceField-field,\n .ms-ChoiceField-wrapper {\n position: relative;\n flex: 1 1 auto;\n display: flex;\n }\n"])));var StyledCheckbox=_styled(Checkbox).withConfig({displayName:"PollUserInput__StyledCheckbox",componentId:"sc-eeg1mx-9"})(templateObject_10$5||(templateObject_10$5=__makeTemplateObject(["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"],["\n margin-top: 15px;\n .ms-Checkbox-label {\n display: flex;\n align-items: ",";\n flex: 1 1 auto;\n }\n"])),function(p){return p.isResultMode?'flex-start':'center';});var templateObject_1$1h,templateObject_2$L,templateObject_3$w,templateObject_4$m,templateObject_5$l,templateObject_6$d,templateObject_7$9,templateObject_8$8,templateObject_9$6,templateObject_10$5;var PollDisplay=function PollDisplay(_a){var children=_a.children,className=_a.className;var formatMessage=useIntl().formatMessage;return jsxs("section",__assign({className:className,"aria-label":formatMessage({id:'Polls.sectionLabel'}),"data-consumer-poll":true},{children:[jsx$1(PollUserInput,{},void 0),children]}),void 0);};var PollUserContextProvider=function PollUserContextProvider(_a){var _b;var item=_a.item,onBehalfOfUpn=_a.onBehalfOfUpn,resourceType=_a.resourceType,language=_a.language,getAdditionalQuestions=_a.getAdditionalQuestions,getAdditionalUserAnswers=_a.getAdditionalUserAnswers,getPollResults=_a.getPollResults,showResult=_a.showResult,children=_a.children;var poll=item.poll,itemId=item.id;var getFeedback=useFeedbackApi().getFeedback;var _c=useState$2(getAdditionalQuestions===null||getAdditionalQuestions===void 0?void 0:getAdditionalQuestions(null)),additionalQuestions=_c[0],setAdditionalQuestions=_c[1];var showError=useNotificationContext().showError;var questionDefinitions=(_b=poll===null||poll===void 0?void 0:poll.questions)!==null&&_b!==void 0?_b:[];var _d=usePromise$2(loadUserAnswers),userAnswers=_d[0],isLoading=_d[1],setUserAnswers=_d[3];var _e=useState$2([]),unsavedQuestionsIds=_e[0],setUnsavedQuestionsIds=_e[1];var _f=usePromise$2(function(){return getPollResults(itemId);},{answers:[]},[itemId]),pollResult=_f[0],isLoadingPollResult=_f[1],fetchPollResults=_f[5];useEffect$1(function(){var _a;if(isLoadingPollResult||!((_a=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_a===void 0?void 0:_a.length)){return;}getAdditionalQuestions&&setAdditionalQuestions(getAdditionalQuestions(pollResult));// eslint-disable-next-line react-hooks/exhaustive-deps
126323
126319
  },[pollResult,isLoadingPollResult]);// If the pollResult and the choice input is rendered with showResults
126324
126320
  // at the same time, we miss the animation of the bars when they fill up
126325
126321
  // Delay the pollResult a bit so the users sees the animation
126326
126322
  var delayedFetchPollResult=useDebouncedCallback(fetchPollResults,500)[0];if(isLoading){return null;}var actualQuestions=__spreadArray(__spreadArray([],questionDefinitions),(additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.questions)||[]);var hasMissingAnswers=!!userAnswers.find(function(a){return a.choiceIds.length===0;});var hasMissingUnsavedAnswer=unsavedQuestionsIds.length>0||userAnswers.some(function(a){return !a.choiceIds.length;});showResult=(showResult||!hasMissingUnsavedAnswer)&&actualQuestions.length>0;return jsx$1(PollUserContext.Provider,__assign({value:{item:item,resourceType:resourceType,questions:actualQuestions,answers:userAnswers,addAnswer:handleAddAnswer,setAnswers:setUserAnswers,pollResult:pollResult,isLoadingPollResult:isLoadingPollResult,showResult:showResult,hasMissingAnswers:hasMissingAnswers,hasMissingUnsavedAnswer:hasMissingUnsavedAnswer,submitPoll:handleSubmitPoll,getQuestionResult:getQuestionResult,reset:reset,onBehalfOfUpn:onBehalfOfUpn,fetchPollResults:fetchPollResults}},{children:jsx$1(PollTranslationContextProvider,__assign({contents:item.contents,language:language,additionalTranslations:additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.translations},{children:children}),void 0)}),void 0);function handleAddAnswer(questionId,selectedChoiceIds){setUnsavedQuestionsIds(function(a){return __spreadArray(__spreadArray([],a),[questionId]);});setUserAnswers(function(answers){return answers.map(function(a){return a.questionId===questionId?__assign(__assign({},a),{choiceIds:__spreadArray([],selectedChoiceIds)}):a;});});}function handleSubmitPoll(savePollAnswers){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);setUnsavedQuestionsIds([]);return [4/*yield*/,savePollAnswers()];case 1:_a.sent();delayedFetchPollResult();return [3/*break*/,3];case 2:_a.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function reset(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){setUnsavedQuestionsIds([]);setUserAnswers(createUsersAnswersFromFeedback({records:[]}));fetchPollResults();return [2/*return*/];});});}function loadUserAnswers(){return __awaiter(this,void 0,void 0,function(){var feedback,error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return [4/*yield*/,getFeedback(resourceType,itemId,onBehalfOfUpn)];case 1:feedback=_a.sent();return [3/*break*/,3];case 2:error_2=_a.sent();// if we got a 404, the user doesn't exist, in this case we simply treat the feedback as it is not set yet
126327
- if((error_2===null||error_2===void 0?void 0:error_2.response.statusCode)!==404){throw error_2;}feedback={records:[]};return [3/*break*/,3];case 3:return [2/*return*/,createUsersAnswersFromFeedback(feedback)];}});});}function createUsersAnswersFromFeedback(feedback){var pollFeedback=feedback.records.find(function(r){return r.type==='poll';});var answers=pollFeedback?pollFeedback.answers:[];return questionDefinitions.map(function(q){return {questionId:q.questionId,choiceIds:answers.filter(function(a){return a.questionId===q.questionId;}).map(function(a){return a.choiceIds;})[0]||[]};}).concat(getAdditionalUserAnswers?getAdditionalUserAnswers(feedback.records)||[]:[]);}function getQuestionResult(questionId){var userSelectedChoices=userAnswers.filter(function(a){return a.questionId===questionId;}).map(function(a){return a.choiceIds;})[0]||[];return {showResults:showResult||unsavedQuestionsIds.every(function(id){return id!==questionId;})&&userSelectedChoices.length>0,userSelectedChoices:userSelectedChoices,totalFeedbackCount:pollResult.totalFeedbackCount,choiceResults:pollResult.answers.filter(function(a){return a.questionId===questionId;}).reduce(function(result,answer){return __spreadArray(__spreadArray([],result),answer.choices);},[]).reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.choiceId]=next.count,_a));},{})};}};var DetailViewSectionPadding=css$2(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingXs,spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$1a;var PollResultFeedbackCount=function PollResultFeedbackCount(){var _a=useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsx$1("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsx$1(FormattedMessage$1,{id:"Polls.editor.totalFeedbackCount",values:{count:pollResult.totalFeedbackCount},tagName:"span"},void 0)}),void 0);};var DetailViewPoll=function DetailViewPoll(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage,resourceType=_a.resourceType,isReadOnly=_a.isReadOnly;var features=useFeatures();var getPollResult=useFeedbackApi().getPollResult;if(!features.polls||item==null||item.poll==null||item.poll.questions==null||item.poll.questions.length===0){return null;}return jsx$1(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(PollResultFeedbackCount,{},void 0),jsx$1(DetailViewPollsSubmitButton,{isReadOnly:isReadOnly},void 0),jsx$1(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled(DetailViewPollExportButton).withConfig({displayName:"DetailViewPoll__StyledPollResultExport",componentId:"sc-gvqgh8-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var StyledPollDisplay$1=_styled(PollDisplay).withConfig({displayName:"DetailViewPoll__StyledPollDisplay",componentId:"sc-gvqgh8-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"],["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"])),DetailViewSectionPadding,spacingL);var templateObject_1$19,templateObject_2$I;var EventDetailViewResponseExportButton=function EventDetailViewResponseExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.events){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/registration/result/export",stringResource:"Events.registration.exportResultsAsCsv"},void 0);};var FeedbackItemType;(function(FeedbackItemType){FeedbackItemType["comment"]="comment";FeedbackItemType["like"]="like";FeedbackItemType["confirm"]="confirm";FeedbackItemType["poll"]="poll";FeedbackItemType["eventRegistration"]="eventRegistration";})(FeedbackItemType||(FeedbackItemType={}));var EventRegistrationContextProvider=function EventRegistrationContextProvider(_a){var _b;var onBehalfOfUpn=_a.onBehalfOfUpn,children=_a.children;var formatMessage=useIntl().formatMessage;var features=useFeatures();var _c=useDetailViewContext(),item=_c.item,contentLanguage=_c.contentLanguage;var getEventRegistrationResults=useEventRegistrationApi().getEventRegistrationResults;if(!features.events||item==null){return null;}var locationQuestionId=getLocationQuestionId(item);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PollUserContextProvider,__assign({item:item,onBehalfOfUpn:onBehalfOfUpn,resourceType:ItemResourceTypes.Events,language:contentLanguage,getAdditionalQuestions:function(result){return getAdditionalQuestions(result);},getAdditionalUserAnswers:extractLocationAnswers,getPollResults:getRegistrationResult,showResult:!!isCancelled},{children:children}),void 0);function getAdditionalQuestions(result){var _a=getLocationPollDefinitions(item,formatMessage,result,!!onBehalfOfUpn),question=_a.question,translations=_a.translations;return {questions:question?[question]:null,translations:translations};}function extractLocationAnswers(records){if(!item.locations||item.locations.length<2){return null;}var eventResponse=records.find(function(r){return r.type===FeedbackItemType.eventRegistration;});return [{questionId:locationQuestionId,choiceIds:eventResponse&&eventResponse.locationId?[eventResponse.locationId]:[]}];}function getRegistrationResult(itemId){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getEventRegistrationResults(itemId)];case 1:result=_a.sent();return [2/*return*/,{totalFeedbackCount:result.totalFeedbackCount,answers:result.answers.concat([{questionId:locationQuestionId,choices:result.locationAnswers.map(function(l){return {choiceId:l.locationId,count:l.count};})}])}];}});});}};var EventDetailViewUserRegistration=function EventDetailViewUserRegistration(_a){var className=_a.className,hideInfoMessage=_a.hideInfoMessage;var pollUserContext=useContext(PollUserContext);var getFeedback=useFeedbackApi().getFeedback;var item=pollUserContext.item;var isLoadingPollResult=pollUserContext.isLoadingPollResult,pollResult=pollUserContext.pollResult,onBehalfOfUpn=pollUserContext.onBehalfOfUpn;var _b=usePromise$2(getEventResponse,item.userResponse,[item]),eventResponse=_b[0],isLoading=_b[1],setEventResponse=_b[3];// eslint-disable-next-line react-hooks/exhaustive-deps
126328
- var seatsResult=useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsx$1(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsx$1(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsx$1(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsx$1(StyledPollDisplay,{},void 0)]}),void 0),jsx$1(DialogFooter,{children:jsxs(Buttons,{children:[jsx$1(CancelButton,{onClick:onDismiss},void 0),jsx$1(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$r=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled(PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&css$2(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled(PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsx$1(StyledCancelButton,__assign({onClick:onClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxs(InfoMessageHost,{children:[jsx$1(InfoIcon,{iconName:"info"},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$8||(templateObject_7$8=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled(Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$7||(templateObject_8$7=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled(DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$18,templateObject_2$H,templateObject_3$u,templateObject_4$k,templateObject_5$j,templateObject_6$b,templateObject_7$8,templateObject_8$7,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Fragment,{children:[jsx$1(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsx$1(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled(ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$17;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs("div",{children:[jsx$1(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsx$1(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsx$1(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxs(Host$q,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$1,{},void 0),jsx$1(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$q=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=createGlobalStyle(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=useContext(ThemeContext$1).theme.textColors;var _a=useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=useState$2(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxs(ListHost,{children:[jsx$1(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsx$1(SearchArea,{children:jsx$1(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsx$1(Spinner,{},void 0),jsx$1(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxs(ListRow,{children:[jsx$1(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsx$1(StyledPersonaCard,__assign({upn:p.upn},{children:jsx$1(StyledAvatar,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsx$1(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&css$2(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$a||(templateObject_6$a=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard=_styled(PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar=_styled(Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3||(templateObject_10$3=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$16,templateObject_2$G,templateObject_3$t,templateObject_4$j,templateObject_5$i,templateObject_6$a,templateObject_7$7,templateObject_8$6,templateObject_9$4,templateObject_10$3,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=useState$2(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsx$1(NoParticipantsContainer,{children:jsx$1(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsx$1(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsx$1(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsx$1(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled(ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$15,templateObject_2$F;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsx$1(EventRegistrationContextProvider,{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(EventRegistrationParticipantsLink,{},void 0),jsx$1(StyledEventUserRegistration,{},void 0),jsx$1(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled(EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled(EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$14,templateObject_2$E;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsx$1(EventDetailViewRegistrationPoll,{},void 0);}return jsx$1(DetailViewPoll,{},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
126323
+ if((error_2===null||error_2===void 0?void 0:error_2.response.statusCode)!==404){throw error_2;}feedback={records:[]};return [3/*break*/,3];case 3:return [2/*return*/,createUsersAnswersFromFeedback(feedback)];}});});}function createUsersAnswersFromFeedback(feedback){var pollFeedback=feedback.records.find(function(r){return r.type==='poll';});var answers=pollFeedback?pollFeedback.answers:[];return questionDefinitions.map(function(q){return {questionId:q.questionId,choiceIds:answers.filter(function(a){return a.questionId===q.questionId;}).map(function(a){return a.choiceIds;})[0]||[]};}).concat(getAdditionalUserAnswers?getAdditionalUserAnswers(feedback.records)||[]:[]);}function getQuestionResult(questionId){var userSelectedChoices=userAnswers.filter(function(a){return a.questionId===questionId;}).map(function(a){return a.choiceIds;})[0]||[];return {showResults:showResult||unsavedQuestionsIds.every(function(id){return id!==questionId;})&&userSelectedChoices.length>0,userSelectedChoices:userSelectedChoices,totalFeedbackCount:pollResult.totalFeedbackCount,choiceResults:pollResult.answers.filter(function(a){return a.questionId===questionId;}).reduce(function(result,answer){return __spreadArray(__spreadArray([],result),answer.choices);},[]).reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.choiceId]=next.count,_a));},{})};}};var DetailViewSectionPadding=css$2(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingXs,spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$1g;var PollResultFeedbackCount=function PollResultFeedbackCount(){var _a=useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsx$1("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsx$1(FormattedMessage$1,{id:"Polls.editor.totalFeedbackCount",values:{count:pollResult.totalFeedbackCount},tagName:"span"},void 0)}),void 0);};var DetailViewPoll=function DetailViewPoll(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage,resourceType=_a.resourceType,isReadOnly=_a.isReadOnly;var features=useFeatures();var getPollResult=useFeedbackApi().getPollResult;if(!features.polls||item==null||item.poll==null||item.poll.questions==null||item.poll.questions.length===0){return null;}return jsx$1(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(PollResultFeedbackCount,{},void 0),jsx$1(DetailViewPollsSubmitButton,{isReadOnly:isReadOnly},void 0),jsx$1(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled(DetailViewPollExportButton).withConfig({displayName:"DetailViewPoll__StyledPollResultExport",componentId:"sc-gvqgh8-0"})(templateObject_1$1f||(templateObject_1$1f=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var StyledPollDisplay$1=_styled(PollDisplay).withConfig({displayName:"DetailViewPoll__StyledPollDisplay",componentId:"sc-gvqgh8-1"})(templateObject_2$K||(templateObject_2$K=__makeTemplateObject(["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"],["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"])),DetailViewSectionPadding,spacingL);var templateObject_1$1f,templateObject_2$K;var EventDetailViewResponseExportButton=function EventDetailViewResponseExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.events){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/registration/result/export",stringResource:"Events.registration.exportResultsAsCsv"},void 0);};var FeedbackItemType;(function(FeedbackItemType){FeedbackItemType["comment"]="comment";FeedbackItemType["like"]="like";FeedbackItemType["confirm"]="confirm";FeedbackItemType["poll"]="poll";FeedbackItemType["eventRegistration"]="eventRegistration";})(FeedbackItemType||(FeedbackItemType={}));var EventRegistrationContextProvider=function EventRegistrationContextProvider(_a){var _b;var onBehalfOfUpn=_a.onBehalfOfUpn,children=_a.children;var formatMessage=useIntl().formatMessage;var features=useFeatures();var _c=useDetailViewContext(),item=_c.item,contentLanguage=_c.contentLanguage;var getEventRegistrationResults=useEventRegistrationApi().getEventRegistrationResults;if(!features.events||item==null){return null;}var locationQuestionId=getLocationQuestionId(item);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PollUserContextProvider,__assign({item:item,onBehalfOfUpn:onBehalfOfUpn,resourceType:ItemResourceTypes.Events,language:contentLanguage,getAdditionalQuestions:function(result){return getAdditionalQuestions(result);},getAdditionalUserAnswers:extractLocationAnswers,getPollResults:getRegistrationResult,showResult:!!isCancelled},{children:children}),void 0);function getAdditionalQuestions(result){var _a=getLocationPollDefinitions(item,formatMessage,result,!!onBehalfOfUpn),question=_a.question,translations=_a.translations;return {questions:question?[question]:null,translations:translations};}function extractLocationAnswers(records){if(!item.locations||item.locations.length<2){return null;}var eventResponse=records.find(function(r){return r.type===FeedbackItemType.eventRegistration;});return [{questionId:locationQuestionId,choiceIds:eventResponse&&eventResponse.locationId?[eventResponse.locationId]:[]}];}function getRegistrationResult(itemId){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getEventRegistrationResults(itemId)];case 1:result=_a.sent();return [2/*return*/,{totalFeedbackCount:result.totalFeedbackCount,answers:result.answers.concat([{questionId:locationQuestionId,choices:result.locationAnswers.map(function(l){return {choiceId:l.locationId,count:l.count};})}])}];}});});}};var EventDetailViewUserRegistration=function EventDetailViewUserRegistration(_a){var className=_a.className,hideInfoMessage=_a.hideInfoMessage;var pollUserContext=useContext(PollUserContext);var getFeedback=useFeedbackApi().getFeedback;var item=pollUserContext.item;var isLoadingPollResult=pollUserContext.isLoadingPollResult,pollResult=pollUserContext.pollResult,onBehalfOfUpn=pollUserContext.onBehalfOfUpn;var _b=usePromise$2(getEventResponse,item.userResponse,[item]),eventResponse=_b[0],isLoading=_b[1],setEventResponse=_b[3];// eslint-disable-next-line react-hooks/exhaustive-deps
126324
+ var seatsResult=useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsx$1(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxs(Host$s,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsx$1(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsx$1(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsx$1(StyledPollDisplay,{},void 0)]}),void 0),jsx$1(DialogFooter,{children:jsxs(Buttons,{children:[jsx$1(CancelButton,{onClick:onDismiss},void 0),jsx$1(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$s=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$1e||(templateObject_1$1e=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$J||(templateObject_2$J=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled(PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$v||(templateObject_3$v=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$k||(templateObject_5$k=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&css$2(templateObject_4$l||(templateObject_4$l=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled(PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$c||(templateObject_6$c=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsx$1(StyledCancelButton,__assign({onClick:onClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxs(InfoMessageHost,{children:[jsx$1(InfoIcon,{iconName:"info"},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$8||(templateObject_7$8=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled(Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$7||(templateObject_8$7=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled(DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1e,templateObject_2$J,templateObject_3$v,templateObject_4$l,templateObject_5$k,templateObject_6$c,templateObject_7$8,templateObject_8$7,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Fragment,{children:[jsx$1(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsx$1(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled(ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$1d||(templateObject_1$1d=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$1d;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs("div",{children:[jsx$1(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsx$1(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsx$1(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$1,{},void 0),jsx$1(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$r=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$1c||(templateObject_1$1c=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=createGlobalStyle(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=useContext(ThemeContext$1).theme.textColors;var _a=useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=useState$2(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxs(ListHost,{children:[jsx$1(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsx$1(SearchArea,{children:jsx$1(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsx$1(Spinner,{},void 0),jsx$1(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxs(ListRow,{children:[jsx$1(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsx$1(StyledPersonaCard,__assign({upn:p.upn},{children:jsx$1(StyledAvatar,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsx$1(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&css$2(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard=_styled(PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar=_styled(Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3||(templateObject_10$3=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$1c,templateObject_2$I,templateObject_3$u,templateObject_4$k,templateObject_5$j,templateObject_6$b,templateObject_7$7,templateObject_8$6,templateObject_9$4,templateObject_10$3,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=useState$2(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsx$1(NoParticipantsContainer,{children:jsx$1(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsx$1(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsx$1(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsx$1(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$1b||(templateObject_1$1b=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled(ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$1b,templateObject_2$H;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsx$1(EventRegistrationContextProvider,{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(EventRegistrationParticipantsLink,{},void 0),jsx$1(StyledEventUserRegistration,{},void 0),jsx$1(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled(EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled(EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$1a,templateObject_2$G;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsx$1(EventDetailViewRegistrationPoll,{},void 0);}return jsx$1(DetailViewPoll,{},void 0);};var EventDetailViewCancelInformation=function EventDetailViewCancelInformation(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage;return jsx$1(EventCancelInformation,{item:item,language:contentLanguage},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
126329
126325
  // https://tc39.github.io/ecma262/#sec-isarray
126330
126326
  var isArray$3=Array.isArray||function isArray(arg){return classof$a(arg)=='Array';};var $$2=_export;var isArray$2=isArray$3;var nativeReverse=[].reverse;var test=[1,2];// `Array.prototype.reverse` method
126331
126327
  // https://tc39.github.io/ecma262/#sec-array.prototype.reverse
@@ -126335,24 +126331,23 @@ $$2({target:'Array',proto:true,forced:String(test)===String(test.reverse())},{re
126335
126331
  if(isArray$2(this))this.length=this.length;return nativeReverse.call(this);}});var CommentList=function CommentList(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,items=_a.items,groupIds=_a.groupIds,isLoading=_a.isLoading,onCommentDeleted=_a.onCommentDeleted,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,getHashtagFilterRoute=_a.getHashtagFilterRoute,onReply=_a.onReply,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var _b=useState$2(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=useRef$1(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsx$1(CommentDisplay,{readOnly:readOnly,scope:scope,message:comment,showDelete:canDelete(comment),showEdit:canEdit(comment),onDelete:showDialog,showAutoTranslate:showAutoTranslate,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,getHashtagFilterRoute:getHashtagFilterRoute,highlight:comment.isUnread,isInitialLiked:comment.isLiked,onReply:onReply,replyCount:comment.threadId==null?(_a=comment.statistics)===null||_a===void 0?void 0:_a.replyCount:null},comment.receivedDateTime+comment.sender.id);})}),void 0),items!=null&&items.length===0&&!isLoading&&jsx$1("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsx$1(FormattedMessage$1,{id:noItemsYetStringResourceKey},void 0)}),void 0)]}),void 0);function handleDelete(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(commentRef.current==null){return [2/*return*/];}onCommentDeleted&&onCommentDeleted(commentRef.current);_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,deleteComment(type,commentRef.current.conversationScope,commentRef.current.parentItemId,commentRef.current.id)];case 2:_a.sent();return [3/*break*/,4];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function showDialog(comment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){commentRef.current=comment;setIsDialogHidden(false);return [2/*return*/];});});}function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}};var CreateCommentWithAttachments=function CreateCommentWithAttachments(props){var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var _a=useState$2(createId()),attachmentContainerId=_a[0],setAttachmentContainerId=_a[1];var _b=useAttachmentUploader([],attachmentContainerId,props.baseAttachmentPath),attachments=_b[0],handleAttachmentsAdded=_b[1],clearAttachments=_b[2],deletedAttachmentUrls=_b[3],onDeleteAttachment=_b[4];return jsx$1(CreateComment,__assign({},props,{onPost:handlePost,onAttachmentsChanged:handleAttachmentsAdded,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment,allowAttachments:!!props.baseAttachmentPath,allowKeywords:props.allowKeywords,placeHolderStringResourceKey:props.placeHolderStringResourceKey,placeHolderStringResourceValues:props.placeHolderStringResourceValues}),void 0);function handlePost(message,keywords){return __awaiter(this,void 0,void 0,function(){var newAttachments;return __generator(this,function(_a){switch(_a.label){case 0:newAttachments=__spreadArray([],attachments);clearAttachments();return [4/*yield*/,props.onPost(message,attachmentContainerId,newAttachments,keywords)];case 1:_a.sent();if(!ignoreRef.current){setAttachmentContainerId(createId());}return [2/*return*/];}});});}};var SortOrder;(function(SortOrder){SortOrder[SortOrder["Asc"]=0]="Asc";SortOrder[SortOrder["Desc"]=1]="Desc";})(SortOrder||(SortOrder={}));var PagedCommentsSection=function PagedCommentsSection(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,itemId=_a.itemId,groupIds=_a.groupIds,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,scope=_a.scope,_b=_a.initialPageSize,initialPageSize=_b===void 0?2:_b,_c=_a.pageSize,pageSize=_c===void 0?5:_c,mentionSearchHandler=_a.mentionSearchHandler,initialComments=_a.initialComments,onCommentAdded=_a.onCommentAdded,onCommentDeleted=_a.onCommentDeleted,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,autoFocusReplyField=_a.autoFocusReplyField,getHashtagFilterRoute=_a.getHashtagFilterRoute,buttons=_a.buttons,threadId=_a.threadId,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,showReplyBox=_a.showReplyBox,title=_a.title,onThreadReply=_a.onThreadReply,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var createComment=useCommentApi().createComment;var user=useCurrentUser();var features=useFeatures();var history=useHistory();var location=useLocation$1();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=useState$2((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=useState$2(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=useState$2(autoFocusReplyField),autoFocusNewCommentInput=_f[0],setAutoFocusNewCommentInput=_f[1];var preventLoading=readOnly&&!loadInReadOnlyMode;var _g=usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId),comments=_g[0],isLoading=_g[1],hasNextPage=_g[2],loadNextPage=_g[3],setComments=_g[4],hasMoreUnreadComments=_g[5];var commentIdsString=(comments!==null&&comments!==void 0?comments:[]).map(function(c){return c.id;}).join(',');useEffect$1(function(){var _a;if(commentIdsString.length>0&&((_a=location.state)===null||_a===void 0?void 0:_a.parentCommentId)){if(autoFocusNewCommentInput){return;}var commentContainer=document.getElementById(location.state.parentCommentId);commentContainer===null||commentContainer===void 0?void 0:commentContainer.scrollIntoView(true);history.replace(__assign(__assign({},location),{state:__assign(__assign({},location.state),{parentCommentId:null})}));}// comments changes implicitly 'validates' location state changes
126336
126332
  // eslint-disable-next-line react-hooks/exhaustive-deps
126337
126333
  },[commentIdsString]);var showSpinner=!preventLoading&&isLoading;var showLoadMore=!preventLoading&&hasNextPage&&!isLoading;var showComments=!preventLoading&&(comments===null||comments===void 0?void 0:comments.length)>0;return jsxs("div",__assign({className:className},{children:[jsxs(TitleAndSpinner,{children:[title,showSpinner&&jsx$1(StyledSpinner$1,{},void 0)]},void 0),showLoadMore&&jsx$1(LoadMoreContainer,__assign({"data-load-more-comments-container":true,"data-show-highlight":hasMoreUnreadComments,highlight:hasMoreUnreadComments},{children:jsx$1(LoadMore,{text:formatMessage({id:type===ItemResourceTypes.Posts||threadId!=null?'Post.comments.loadMore':'Comment.loadMore'}),onClick:function(){return loadNextPage();},iconProps:{iconName:'ScrollUpDown'},"data-load-more-comments":true},void 0)}),void 0),showComments&&jsx$1(CommentList,{scope:ConversationScope.Public,items:comments,groupIds:groupIds,isLoading:isLoading,onCommentDeleted:handleCommentDeleted,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,noItemsYetStringResourceKey:noItemsYetStringResourceKey,getHashtagFilterRoute:getHashtagFilterRoute,onReply:handleOnReply,readOnly:readOnly},void 0),!showNewComment&&jsx$1(ReplyButton,{iconProps:{iconName:'Reply'},text:formatMessage({id:'Post.comments.addReply'}),onClick:showNewCommentInput,"data-add-comment":true},void 0),showNewComment&&jsxs(Fragment,{children:[jsx$1(NewComment// the key is required to autofocus the reply field when replying to comments
126338
- ,{readOnly:readOnly,onPost:handleCommentCreated,mentionSearchHandler:mentionSearchHandler,autoFocus:autoFocusNewCommentInput,focusAfterPost:!env.isNativeMobileApp,baseAttachmentPath:baseAttachmentPath,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,content:getContent(),allowSaveWithoutContent:true,saveOnCtrlEnter:true},commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentId),!readOnly&&buttons]},void 0)]}),void 0);function getContent(){var _a;return ((_a=commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentSender)===null||_a===void 0?void 0:_a.id)&&commentToReplyTo.commentSender.id!==user.id?constructUserMention(commentToReplyTo.commentSender):null;}function handleOnReply(commentId,commentSender){if(features.replyToComments){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+commentId}}));onThreadReply===null||onThreadReply===void 0?void 0:onThreadReply(commentId);setCommentToReplyTo({commentId:commentId,commentSender:commentSender});return;}showNewCommentInput();setCommentToReplyTo({commentId:commentId,commentSender:commentSender});setAutoFocusNewCommentInput(true);}function showNewCommentInput(){if(user.isPublicUser){triggerEvent(PromptPublicUserLoginAction.create());return;}setShowNewComment(true);}function handleCommentDeleted(comment){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:setComments(function(stateComments){return stateComments.filter(function(c){return c.id!==comment.id;});});onCommentDeleted===null||onCommentDeleted===void 0?void 0:onCommentDeleted(comment);_a=!threadId;if(!_a)return [3/*break*/,2];return [4/*yield*/,refreshStatistics(itemId,{commentCount:-1})];case 1:_a=_b.sent();_b.label=2;case 2:return [2/*return*/];}});});}function handleCommentCreated(commentDelta,attachmentContainerId,attachments){return __awaiter(this,void 0,void 0,function(){var newComment,comment_1,_a,error_1;return __generator(this,function(_b){switch(_b.label){case 0:newComment={id:null,parentItemId:itemId,content:commentDelta.content,conversationScope:scope,sender:user,receivedDateTime:moment.utc().toISOString(),attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId,isUnread:false};setComments(function(stateComments){return __spreadArray(__spreadArray([],stateComments),[newComment]);});onCommentAdded===null||onCommentAdded===void 0?void 0:onCommentAdded();_b.label=1;case 1:_b.trys.push([1,5,6,7]);return [4/*yield*/,createComment(type,scope,itemId,__assign(__assign({},commentDelta),{attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId}))];case 2:comment_1=_b.sent();_a=!threadId;if(!_a)return [3/*break*/,4];return [4/*yield*/,refreshStatistics(itemId,{commentCount:1})];case 3:_a=_b.sent();_b.label=4;case 4:setComments(function(stateComments){var _a;return update(stateComments,(_a={},_a[stateComments.length-1]={$merge:{id:comment_1.id,fileAccessToken:comment_1.fileAccessToken}},_a));});return [3/*break*/,7];case 5:error_1=_b.sent();logger.error(error_1);showError('Comment.errorMessage');return [3/*break*/,7];case 6:setAutoFocusNewCommentInput(false);setCommentToReplyTo(null);return [7/*endfinally*/];case 7:return [2/*return*/];}});});}};var TitleAndSpinner=_styled.div.withConfig({displayName:"PagedCommentsSection__TitleAndSpinner",componentId:"sc-1f3hft1-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var ReplyButton=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__ReplyButton",componentId:"sc-1f3hft1-1"})(templateObject_2$D||(templateObject_2$D=__makeTemplateObject(["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"],["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"])),function(p){return p.theme.palette.accent;});var NewComment=_styled(CreateCommentWithAttachments).withConfig({displayName:"PagedCommentsSection__NewComment",componentId:"sc-1f3hft1-2"})(templateObject_3$s||(templateObject_3$s=__makeTemplateObject(["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"],["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"])));var LoadMoreContainer=_styled.div.withConfig({displayName:"PagedCommentsSection__LoadMoreContainer",componentId:"sc-1f3hft1-3"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"],["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var LoadMore=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__LoadMore",componentId:"sc-1f3hft1-4"})(templateObject_6$9||(templateObject_6$9=__makeTemplateObject(["\n && {\n text-align: left;\n }\n"],["\n && {\n text-align: left;\n }\n"])));var StyledSpinner$1=_styled(Spinner).withConfig({displayName:"PagedCommentsSection__StyledSpinner",componentId:"sc-1f3hft1-5"})(templateObject_7$6||(templateObject_7$6=__makeTemplateObject(["\n margin: 0 auto;\n padding: 15px 0;\n"],["\n margin: 0 auto;\n padding: 15px 0;\n"])));function usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId){var _a=useState$2(function(){return __spreadArray([],(initialComments===null||initialComments===void 0?void 0:initialComments.items)||[]).reverse();}),comments=_a[0],setComments=_a[1];var _b=useState$2({token:initialComments===null||initialComments===void 0?void 0:initialComments.paginationToken,hasMoreUnreadComments:initialComments===null||initialComments===void 0?void 0:initialComments.hasMoreUnreadComments}),nextPageInfos=_b[0],setNextPageInfos=_b[1];var _c=useState$2(!initialComments),isLoading=_c[0],setIsLoading=_c[1];var pullToRefreshContext=useContext(PullToRefreshContext);var _d=useCommentApi(),listComments=_d.listComments,getCommentReplies=_d.getCommentReplies;// the context can be null, in case we are in the editor
126334
+ ,{readOnly:readOnly,onPost:handleCommentCreated,mentionSearchHandler:mentionSearchHandler,autoFocus:autoFocusNewCommentInput,focusAfterPost:!env.isNativeMobileApp,baseAttachmentPath:baseAttachmentPath,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,content:getContent(),allowSaveWithoutContent:true,saveOnCtrlEnter:true},commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentId),!readOnly&&buttons]},void 0)]}),void 0);function getContent(){var _a;return ((_a=commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentSender)===null||_a===void 0?void 0:_a.id)&&commentToReplyTo.commentSender.id!==user.id?constructUserMention(commentToReplyTo.commentSender):null;}function handleOnReply(commentId,commentSender){if(features.replyToComments){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+commentId}}));onThreadReply===null||onThreadReply===void 0?void 0:onThreadReply(commentId);setCommentToReplyTo({commentId:commentId,commentSender:commentSender});return;}showNewCommentInput();setCommentToReplyTo({commentId:commentId,commentSender:commentSender});setAutoFocusNewCommentInput(true);}function showNewCommentInput(){if(user.isPublicUser){triggerEvent(PromptPublicUserLoginAction.create());return;}setShowNewComment(true);}function handleCommentDeleted(comment){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:setComments(function(stateComments){return stateComments.filter(function(c){return c.id!==comment.id;});});onCommentDeleted===null||onCommentDeleted===void 0?void 0:onCommentDeleted(comment);_a=!threadId;if(!_a)return [3/*break*/,2];return [4/*yield*/,refreshStatistics(itemId,{commentCount:-1})];case 1:_a=_b.sent();_b.label=2;case 2:return [2/*return*/];}});});}function handleCommentCreated(commentDelta,attachmentContainerId,attachments){return __awaiter(this,void 0,void 0,function(){var newComment,comment_1,_a,error_1;return __generator(this,function(_b){switch(_b.label){case 0:newComment={id:null,parentItemId:itemId,content:commentDelta.content,conversationScope:scope,sender:user,receivedDateTime:moment.utc().toISOString(),attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId,isUnread:false};setComments(function(stateComments){return __spreadArray(__spreadArray([],stateComments),[newComment]);});onCommentAdded===null||onCommentAdded===void 0?void 0:onCommentAdded();_b.label=1;case 1:_b.trys.push([1,5,6,7]);return [4/*yield*/,createComment(type,scope,itemId,__assign(__assign({},commentDelta),{attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId}))];case 2:comment_1=_b.sent();_a=!threadId;if(!_a)return [3/*break*/,4];return [4/*yield*/,refreshStatistics(itemId,{commentCount:1})];case 3:_a=_b.sent();_b.label=4;case 4:setComments(function(stateComments){var _a;return update(stateComments,(_a={},_a[stateComments.length-1]={$merge:{id:comment_1.id,fileAccessToken:comment_1.fileAccessToken}},_a));});return [3/*break*/,7];case 5:error_1=_b.sent();logger.error(error_1);showError('Comment.errorMessage');return [3/*break*/,7];case 6:setAutoFocusNewCommentInput(false);setCommentToReplyTo(null);return [7/*endfinally*/];case 7:return [2/*return*/];}});});}};var TitleAndSpinner=_styled.div.withConfig({displayName:"PagedCommentsSection__TitleAndSpinner",componentId:"sc-1f3hft1-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var ReplyButton=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__ReplyButton",componentId:"sc-1f3hft1-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"],["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"])),function(p){return p.theme.palette.accent;});var NewComment=_styled(CreateCommentWithAttachments).withConfig({displayName:"PagedCommentsSection__NewComment",componentId:"sc-1f3hft1-2"})(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"],["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"])));var LoadMoreContainer=_styled.div.withConfig({displayName:"PagedCommentsSection__LoadMoreContainer",componentId:"sc-1f3hft1-3"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"],["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var LoadMore=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__LoadMore",componentId:"sc-1f3hft1-4"})(templateObject_6$a||(templateObject_6$a=__makeTemplateObject(["\n && {\n text-align: left;\n }\n"],["\n && {\n text-align: left;\n }\n"])));var StyledSpinner$1=_styled(Spinner).withConfig({displayName:"PagedCommentsSection__StyledSpinner",componentId:"sc-1f3hft1-5"})(templateObject_7$6||(templateObject_7$6=__makeTemplateObject(["\n margin: 0 auto;\n padding: 15px 0;\n"],["\n margin: 0 auto;\n padding: 15px 0;\n"])));function usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId){var _a=useState$2(function(){return __spreadArray([],(initialComments===null||initialComments===void 0?void 0:initialComments.items)||[]).reverse();}),comments=_a[0],setComments=_a[1];var _b=useState$2({token:initialComments===null||initialComments===void 0?void 0:initialComments.paginationToken,hasMoreUnreadComments:initialComments===null||initialComments===void 0?void 0:initialComments.hasMoreUnreadComments}),nextPageInfos=_b[0],setNextPageInfos=_b[1];var _c=useState$2(!initialComments),isLoading=_c[0],setIsLoading=_c[1];var pullToRefreshContext=useContext(PullToRefreshContext);var _d=useCommentApi(),listComments=_d.listComments,getCommentReplies=_d.getCommentReplies;// the context can be null, in case we are in the editor
126339
126335
  var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;useEffect$1(function(){if(!isValid||preventLoading){return undefined;}if(!initialComments||refreshToken){// pass the pageToken explicitly since it's possible that the nextPageTokenState has not been updated yet
126340
126336
  loadNextPage(null,initialPageSize,!!initialComments).then(function(){return null;},logger.error);}// eslint-disable-next-line react-hooks/exhaustive-deps
126341
126337
  return function(){isValid=false;};// eslint-disable-next-line react-hooks/exhaustive-deps
126342
126338
  },[initialComments,itemId,refreshToken]);return [comments,isLoading,!!(nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token),loadNextPage,setComments,nextPageInfos.hasMoreUnreadComments];function loadNextPage(nextPageTokenOverride,pageSizeOverride,doNotSetIsLoading){return __awaiter(this,void 0,void 0,function(){var token,nextPage,_a;return __generator(this,function(_b){switch(_b.label){case 0:if(!isValid){return [2/*return*/];}if(!doNotSetIsLoading){setIsLoading(true);}token=nextPageTokenOverride!==undefined?nextPageTokenOverride:nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token;if(!(threadId!=null))return [3/*break*/,2];return [4/*yield*/,getCommentReplies(type,scope,itemId,threadId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 1:_a=_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,listComments(type,scope,itemId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 3:_a=_b.sent();_b.label=4;case 4:nextPage=_a;if(isValid){setIsLoading(false);setComments(function(stateComments){return token!=null?__spreadArray(__spreadArray([],__spreadArray([],nextPage.items).reverse()),stateComments):nextPage.items.reverse();});// refresh the unread count every time we load a new page of comments
126343
- refreshUserDetails();setNextPageInfos({token:nextPage.paginationToken,hasMoreUnreadComments:nextPage.hasMoreUnreadComments});}return [2/*return*/];}});});}}var templateObject_1$13,templateObject_2$D,templateObject_3$s,templateObject_4$i,templateObject_5$h,templateObject_6$9,templateObject_7$6;var PublicUserFullAccessButton=function PublicUserFullAccessButton(_a){var user=_a.user,onClick=_a.onClick,descriptionResourceKeyPrefix=_a.descriptionResourceKeyPrefix,descriptionValues=_a.descriptionValues,className=_a.className;var formatMessage=useIntl().formatMessage;var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var shouldRegister=user.subscription.allowSelfRegistration&&user.authenticationType!==AuthenticationType.public;return jsxs("div",__assign({className:className},{children:[jsx$1(PublicUserButtonFocusStyle,{},void 0),descriptionResourceKeyPrefix&&jsx$1(Description$1,{id:descriptionResourceKeyPrefix+"."+(shouldRegister?'register':'login'),values:descriptionValues,tagName:"p"},void 0),jsx$1(PrimaryButton,{"data-public-access-button":true,text:formatMessage({id:shouldRegister?'SelfRegistration.register':'Subscription.login.caption'}),onClick:handleOnClick},void 0)]}),void 0);function handleOnClick(){onClick===null||onClick===void 0?void 0:onClick();if(shouldRegister){history.push({pathname:buildPath('/register')});}else {history.push({pathname:'/logout',search:queryString.stringify({source:getAppUrl()+buildPath("/login?"+queryString.stringify({source:location.pathname}))})});}}};var PublicUserButtonFocusStyle=createGlobalStyle(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n button[data-public-access-button]:focus::after {\n outline-color: "+p.theme.palette.accent+" !important;\n outline-offset: 2px;\n }\n ");});var Description$1=_styled(FormattedMessageWithStyle).withConfig({displayName:"PublicUserFullAccessButton__Description",componentId:"sc-tjhzmp-0"})(templateObject_2$C||(templateObject_2$C=__makeTemplateObject(["\n margin-top: 0;\n color: ",";\n"],["\n margin-top: 0;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$12,templateObject_2$C;var PublishableItemComments=function PublishableItemComments(_a){var item=_a.item,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,type=_a.type,onThreadReply=_a.onThreadReply,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var container=useRef$1();var location=useLocation$1();var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var user=useCurrentUser();useEffect$1(function(){// scroll comments container into view if there is the corresponding hash in the path.
126339
+ refreshUserDetails();setNextPageInfos({token:nextPage.paginationToken,hasMoreUnreadComments:nextPage.hasMoreUnreadComments});}return [2/*return*/];}});});}}var templateObject_1$19,templateObject_2$F,templateObject_3$t,templateObject_4$j,templateObject_5$i,templateObject_6$a,templateObject_7$6;var PublicUserFullAccessButton=function PublicUserFullAccessButton(_a){var user=_a.user,onClick=_a.onClick,descriptionResourceKeyPrefix=_a.descriptionResourceKeyPrefix,descriptionValues=_a.descriptionValues,className=_a.className;var formatMessage=useIntl().formatMessage;var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var shouldRegister=user.subscription.allowSelfRegistration&&user.authenticationType!==AuthenticationType.public;return jsxs("div",__assign({className:className},{children:[jsx$1(PublicUserButtonFocusStyle,{},void 0),descriptionResourceKeyPrefix&&jsx$1(Description$1,{id:descriptionResourceKeyPrefix+"."+(shouldRegister?'register':'login'),values:descriptionValues,tagName:"p"},void 0),jsx$1(PrimaryButton,{"data-public-access-button":true,text:formatMessage({id:shouldRegister?'SelfRegistration.register':'Subscription.login.caption'}),onClick:handleOnClick},void 0)]}),void 0);function handleOnClick(){onClick===null||onClick===void 0?void 0:onClick();if(shouldRegister){history.push({pathname:buildPath('/register')});}else {history.push({pathname:'/logout',search:queryString.stringify({source:getAppUrl()+buildPath("/login?"+queryString.stringify({source:location.pathname}))})});}}};var PublicUserButtonFocusStyle=createGlobalStyle(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n button[data-public-access-button]:focus::after {\n outline-color: "+p.theme.palette.accent+" !important;\n outline-offset: 2px;\n }\n ");});var Description$1=_styled(FormattedMessageWithStyle).withConfig({displayName:"PublicUserFullAccessButton__Description",componentId:"sc-tjhzmp-0"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-top: 0;\n color: ",";\n"],["\n margin-top: 0;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$18,templateObject_2$E;var PublishableItemComments=function PublishableItemComments(_a){var item=_a.item,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,type=_a.type,onThreadReply=_a.onThreadReply,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var container=useRef$1();var location=useLocation$1();var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var user=useCurrentUser();useEffect$1(function(){// scroll comments container into view if there is the corresponding hash in the path.
126344
126340
  // HACK: a regular anchor does not work, because content is rendered
126345
126341
  // dynamically and the comments might not be in DOM at the right time.
126346
126342
  // TODO: Try to avoid this.
126347
126343
  // It might be a little better, once the lazy loaded feedback & statistics buttons are all in one row
126348
- if(container.current&&location.hash==='#comments'){setTimeout(function(){return container.current.scrollIntoView(true);},500);}},[location.hash]);return jsxs(Container,__assign({ref:container,id:"comments"},{children:[!user.isPublicUser&&jsx$1(StyledPagedCommentsSection$1,{mentionSearchHandler:getMentionsSearchHandler,readOnly:readOnly,loadInReadOnlyMode:loadInReadOnlyMode,itemId:item.id,groupIds:item.groupIds,type:type,initialPageSize:5,scope:ConversationScope.Public,noItemsYetStringResourceKey:"NewsArticle.comments.empty",baseAttachmentPath:"/"+type+"/"+item.id+"/comments",buttons:jsx$1(FollowButton,{type:type,itemId:item.id,scope:ConversationScope.Public,hideProfileUrl:hideProfileUrl},void 0),title:jsx$1("h3",__assign({className:"comments-title"},{children:jsx$1(FormattedMessage$1,{id:"NewsArticle.comments"},void 0)}),void 0),onThreadReply:onThreadReply},item.id),user.isPublicUser&&jsxs(PublicUserButtonContainer,{children:[jsx$1(FormattedMessage$1,{id:"NewsArticle.comments.publicAccessMessage"},void 0),!disableLoginForPublicUser&&jsx$1(StyledPublicUserFullAccessButton,{user:{authenticationType:user.authenticationType,subscription:{subscriptionId:user.subscription.id,allowSelfRegistration:user.subscription.allowSelfRegistration}}},void 0)]},void 0)]}),void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Container=_styled.div.withConfig({displayName:"PublishableItemComments__Container",componentId:"sc-5vaunf-0"})(templateObject_1$11||(templateObject_1$11=__makeTemplateObject(["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"],["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"])));var FollowButton=_styled(FollowComments).withConfig({displayName:"PublishableItemComments__FollowButton",componentId:"sc-5vaunf-1"})(templateObject_2$B||(templateObject_2$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingXs);var StyledPublicUserFullAccessButton=_styled(PublicUserFullAccessButton).withConfig({displayName:"PublishableItemComments__StyledPublicUserFullAccessButton",componentId:"sc-5vaunf-2"})(templateObject_3$r||(templateObject_3$r=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var StyledPagedCommentsSection$1=_styled(PagedCommentsSection).withConfig({displayName:"PublishableItemComments__StyledPagedCommentsSection",componentId:"sc-5vaunf-3"})(templateObject_4$h||(templateObject_4$h=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var PublicUserButtonContainer=_styled.div.withConfig({displayName:"PublishableItemComments__PublicUserButtonContainer",componentId:"sc-5vaunf-4"})(templateObject_5$g||(templateObject_5$g=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var templateObject_1$11,templateObject_2$B,templateObject_3$r,templateObject_4$h,templateObject_5$g;var FeedbackButtonContext=/*#__PURE__*/createContext(null);var FeedbackButtons=function FeedbackButtons(_a){var resourceType=_a.resourceType,item=_a.item,hasFeedbackEnabled=_a.hasFeedbackEnabled,language=_a.language,className=_a.className,children=_a.children;var getStatistics=useNewsApi().getStatistics;var _b=useState$2(null),statistics=_b[0],setStatistics=_b[1];var showError=useNotificationContext().showError;useEffect$1(function(){var updateStatisticsSubscription=onStatisticsUpdated.subscribe(setStatistics);return function(){return updateStatisticsSubscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
126344
+ if(container.current&&location.hash==='#comments'){setTimeout(function(){return container.current.scrollIntoView(true);},500);}},[location.hash]);return jsxs(Container,__assign({ref:container,id:"comments"},{children:[!user.isPublicUser&&jsx$1(StyledPagedCommentsSection$1,{mentionSearchHandler:getMentionsSearchHandler,readOnly:readOnly,loadInReadOnlyMode:loadInReadOnlyMode,itemId:item.id,groupIds:item.groupIds,type:type,initialPageSize:5,scope:ConversationScope.Public,noItemsYetStringResourceKey:"NewsArticle.comments.empty",baseAttachmentPath:"/"+type+"/"+item.id+"/comments",buttons:jsx$1(FollowButton,{type:type,itemId:item.id,scope:ConversationScope.Public,hideProfileUrl:hideProfileUrl},void 0),title:jsx$1("h3",__assign({className:"comments-title"},{children:jsx$1(FormattedMessage$1,{id:"NewsArticle.comments"},void 0)}),void 0),onThreadReply:onThreadReply},item.id),user.isPublicUser&&jsxs(PublicUserButtonContainer,{children:[jsx$1(FormattedMessage$1,{id:"NewsArticle.comments.publicAccessMessage"},void 0),!disableLoginForPublicUser&&jsx$1(StyledPublicUserFullAccessButton,{user:{authenticationType:user.authenticationType,subscription:{subscriptionId:user.subscription.id,allowSelfRegistration:user.subscription.allowSelfRegistration}}},void 0)]},void 0)]}),void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Container=_styled.div.withConfig({displayName:"PublishableItemComments__Container",componentId:"sc-5vaunf-0"})(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"],["\n padding-top: 0.5em;\n padding-bottom: 1.5em;\n"])));var FollowButton=_styled(FollowComments).withConfig({displayName:"PublishableItemComments__FollowButton",componentId:"sc-5vaunf-1"})(templateObject_2$D||(templateObject_2$D=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingXs);var StyledPublicUserFullAccessButton=_styled(PublicUserFullAccessButton).withConfig({displayName:"PublishableItemComments__StyledPublicUserFullAccessButton",componentId:"sc-5vaunf-2"})(templateObject_3$s||(templateObject_3$s=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var StyledPagedCommentsSection$1=_styled(PagedCommentsSection).withConfig({displayName:"PublishableItemComments__StyledPagedCommentsSection",componentId:"sc-5vaunf-3"})(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var PublicUserButtonContainer=_styled.div.withConfig({displayName:"PublishableItemComments__PublicUserButtonContainer",componentId:"sc-5vaunf-4"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var templateObject_1$17,templateObject_2$D,templateObject_3$s,templateObject_4$i,templateObject_5$h;var FeedbackButtonContext=/*#__PURE__*/createContext(null);var FeedbackButtons=function FeedbackButtons(_a){var resourceType=_a.resourceType,item=_a.item,hasFeedbackEnabled=_a.hasFeedbackEnabled,language=_a.language,className=_a.className,children=_a.children;var getStatistics=useNewsApi().getStatistics;var _b=useState$2(null),statistics=_b[0],setStatistics=_b[1];var showError=useNotificationContext().showError;useEffect$1(function(){var updateStatisticsSubscription=onStatisticsUpdated.subscribe(setStatistics);return function(){return updateStatisticsSubscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
126349
126345
  },[]);var comparableStatistics=JSON.stringify(item.statistics);useEffect$1(function(){loadStatistics(item).then(function(){return null;});// eslint-disable-next-line react-hooks/exhaustive-deps
126350
- },[item.id,comparableStatistics]);if(!statistics){return null;}return jsx$1(FeedbackButtonContext.Provider,__assign({value:{statistics:statistics,language:language,item:item,resourceType:resourceType,hasFeedbackEnabled:hasFeedbackEnabled}},{children:jsx$1(FeedbackButtonsContainer,__assign({className:className},{children:Children.map(children,function(child){return jsx$1("li",{children:child},void 0);})}),void 0)}),void 0);function loadStatistics(item){return __awaiter(this,void 0,void 0,function(){var newStatistics,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(item.statistics){setStatistics(item.statistics);return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getStatistics(item.id)];case 2:newStatistics=_a.sent();setStatistics(newStatistics);return [3/*break*/,4];case 3:error_1=_a.sent();logger.error(error_1);showError('NewsArticle.loadStatistics_error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var FeedbackButtonsContainer=_styled.ul.withConfig({displayName:"FeedbackButtons__FeedbackButtonsContainer",componentId:"sc-1vjmzsz-0"})(templateObject_1$10||(templateObject_1$10=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"])));var templateObject_1$10;var ThreadView=function ThreadView(_a){var _b;var parentComment=_a.parentComment,commentReplies=_a.commentReplies,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,type=_a.type,groupIds=_a.groupIds,baseAttachmentPath=_a.baseAttachmentPath,getHashtagFilterRoute=_a.getHashtagFilterRoute,onThreadCommentDelete=_a.onThreadCommentDelete,onShowAllComments=_a.onShowAllComments,className=_a.className;var user=useCurrentUser();var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;var history=useHistory();var location=useLocation$1();var showAutoTranslate=(parentComment===null||parentComment===void 0?void 0:parentComment.sender.id)!==user.id;var screenSize=useWindowSize$2();var placeHolderStringResourceKey=screenSize.width>maxScreenSize.medium?'Comment.threads.replyTo':'Comment.threads.replyTo.mobile';var _c=useState$2(commentReplies),replies=_c[0],setReplies=_c[1];var _d=useState$2(true),isDialogHidden=_d[0],setIsDialogHidden=_d[1];var _e=useState$2(((_b=parentComment.statistics)===null||_b===void 0?void 0:_b.replyCount)||0),replyCount=_e[0],setReplyCount=_e[1];usePageViewTracker(type+"/"+parentComment.parentItemId+"/comments",parentComment.id);return jsxs("div",__assign({className:className},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDeleteThread,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(CommentDisplay,{scope:scope,message:parentComment,showDelete:canDelete(parentComment),showEdit:canEdit(parentComment),showAutoTranslate:showAutoTranslate,type:type,highlight:parentComment.isUnread,isInitialLiked:parentComment.isLiked,mentionSearchHandler:mentionSearchHandler,baseAttachmentPath:baseAttachmentPath,onDelete:function(){return setIsDialogHidden(false);},getHashtagFilterRoute:getHashtagFilterRoute,replyCount:replyCount,onReplyIconClick:handleShowAllComments},parentComment.receivedDateTime),jsx$1(CommentReplies,{threadId:parentComment.id,initialPageSize:5,pageSize:5,type:type,baseAttachmentPath:baseAttachmentPath+"/"+parentComment.id+"/replies",mentionSearchHandler:mentionSearchHandler,groupIds:groupIds,getHashtagFilterRoute:getHashtagFilterRoute,readOnly:false,scope:scope,itemId:parentComment.parentItemId,autoFocusReplyField:!env.isTouchDevice,initialComments:replies,onCommentDeleted:deleteReply,onCommentAdded:function(){return setReplyCount(function(count){return count+1;});},showReplyBox:true,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:{name:parentComment===null||parentComment===void 0?void 0:parentComment.sender.displayName}},parentComment.parentItemId),jsx$1(ShowAllCommentsButton,__assign({iconProps:{iconName:'ReturnKey'},onClick:handleShowAllComments,"data-show-all-comments":true},{children:jsx$1(FormattedMessage$1,{id:"Comment.showAllComments"},void 0)}),void 0)]}),void 0);function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}function deleteReply(reply){setReplies(__assign(__assign({},replies),{items:replies.items.filter(function(c){return c.id!==reply.id;})}));setReplyCount(function(count){return count-1;});}function handleDeleteThread(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,2,,3]);return [4/*yield*/,deleteComment(type,scope,parentComment.parentItemId,parentComment.id)];case 1:_b.sent();onThreadCommentDelete();return [3/*break*/,3];case 2:_b.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function handleShowAllComments(){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+parentComment.id}}));onShowAllComments===null||onShowAllComments===void 0?void 0:onShowAllComments();}};var CommentReplies=_styled(PagedCommentsSection).withConfig({displayName:"ThreadView__CommentReplies",componentId:"sc-1c4y6ek-0"})(templateObject_1$$||(templateObject_1$$=__makeTemplateObject(["\n padding-left: ","px;\n"],["\n padding-left: ","px;\n"])),spacingL);var ShowAllCommentsButton=_styled(ActionButton).withConfig({displayName:"ThreadView__ShowAllCommentsButton",componentId:"sc-1c4y6ek-1"})(templateObject_2$A||(templateObject_2$A=__makeTemplateObject(["\n margin: ","px 0 0 ","px;\n"],["\n margin: ","px 0 0 ","px;\n"])),spacingS,spacingL);var templateObject_1$$,templateObject_2$A;var PublishableItemThreadView=function PublishableItemThreadView(_a){var item=_a.item,type=_a.type,threadId=_a.threadId,onShowAllComments=_a.onShowAllComments,onThreadCommentDelete=_a.onThreadCommentDelete;var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var getCommentThread=useCommentApi().getCommentThread;var _b=usePromise$2(function(){return getCommentThread(type,item.id,threadId);},null),comments=_b[0],isLoading=_b[1];if(isLoading){return jsx$1(StyledSpinner,{},void 0);}var parentComment=comments===null||comments===void 0?void 0:comments.items.find(function(c){return c.id===threadId;});if(!parentComment||parentComment.threadId!=null){return jsx$1(Host$p,{children:jsx$1(FormattedMessage$1,{id:'NewsArticle.thread.empty'},void 0)},void 0);}return jsx$1(Host$p,{children:jsx$1(StyledThreadView$1,{parentComment:parentComment,commentReplies:{items:comments===null||comments===void 0?void 0:comments.items.filter(function(c){return c!==parentComment&&c.threadId===parentComment.id;}),paginationToken:comments===null||comments===void 0?void 0:comments.paginationToken,nextItem:comments===null||comments===void 0?void 0:comments.nextItem,hasMoreUnreadComments:comments===null||comments===void 0?void 0:comments.hasMoreUnreadComments},scope:ConversationScope.Public,groupIds:item.groupIds,baseAttachmentPath:"/"+type+"/"+item.id+"/comments",mentionSearchHandler:getMentionsSearchHandler,type:type,onThreadCommentDelete:onThreadCommentDelete,onShowAllComments:onShowAllComments},void 0)},void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Host$p=_styled.div.withConfig({displayName:"PublishableItemThreadView__Host",componentId:"sc-1yiyuzb-0"})(templateObject_1$_||(templateObject_1$_=__makeTemplateObject(["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"],["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"])),detailViewSectionPadding,function(p){return p.theme.palette.neutralLight;},minScreenSize.small,detailViewSectionPaddingLarge);var StyledSpinner=_styled(Spinner).withConfig({displayName:"PublishableItemThreadView__StyledSpinner",componentId:"sc-1yiyuzb-1"})(templateObject_2$z||(templateObject_2$z=__makeTemplateObject(["\n margin: 5% 0;\n"],["\n margin: 5% 0;\n"])));var StyledThreadView$1=_styled(ThreadView).withConfig({displayName:"PublishableItemThreadView__StyledThreadView",componentId:"sc-1yiyuzb-2"})(templateObject_3$q||(templateObject_3$q=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var templateObject_1$_,templateObject_2$z,templateObject_3$q;var FeedbackSection=function FeedbackSection(_a){var _b,_c;var type=_a.type,item=_a.item,language=_a.language,feedbackSettings=_a.feedbackSettings,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser,isReadOnly=_a.isReadOnly,children=_a.children,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var match=useRouteMatch();var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _d=useState$2((_c=(_b=match.params)===null||_b===void 0?void 0:_b.threadId)!==null&&_c!==void 0?_c:null),threadId=_d[0],setThreadId=_d[1];var showComments=features.comments&&hasFeedbackEnabled('comment')&&!hideComments;var showThreadView=features.replyToComments&&threadId!=null;var hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;return jsxs(Fragment,{children:[jsx$1("section",__assign({className:className,"aria-label":formatMessage({id:'Generic.feedbackButtons'})},{children:jsx$1(StyledFeedbackButtons,__assign({resourceType:type,item:item,language:language,hasFeedbackEnabled:hasFeedbackEnabled},{children:children}),void 0)}),void 0),showComments&&(!showThreadView?jsx$1("section",__assign({id:"comments","data-comment-section":true,className:classNames('ms-bgColor-neutralLight',className)},{children:jsx$1(PublishableItemComments,{item:item,type:type,onThreadReply:features.replyToComments?setThreadId:null,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,readOnly:isReadOnly,loadInReadOnlyMode:isReadOnly&&hasPublishedVersion},void 0)}),void 0):jsx$1("section",{children:jsx$1(PublishableItemThreadView,{item:item,type:type,threadId:threadId,onShowAllComments:handleOnShowAllComments,onThreadCommentDelete:handleThreadCommentDelete},void 0)},void 0))]},void 0);function handleThreadCommentDelete(){var _a;// not using threadId here since we can still have a non thread path but be inline with the thread view
126351
- if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath("/"+type+"/"+item.id)}));}setThreadId(null);}function hasFeedbackEnabled(feedbackType){return hasFeedbackType(feedbackSettings||{},feedbackType);}function handleOnShowAllComments(){var _a;setThreadId(null);if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath(type+"/"+item.id)}));}}};var StyledFeedbackButtons=_styled(FeedbackButtons).withConfig({displayName:"FeedbackSection__StyledFeedbackButtons",componentId:"sc-3bzj8d-0"})(templateObject_1$Z||(templateObject_1$Z=__makeTemplateObject(["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"],["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"])),function(p){return p.showComments?'15px':'30px';});var templateObject_1$Z;var FeedbackButtonLike=function FeedbackButtonLike(_a){var isReadOnly=_a.isReadOnly;var refreshStatistics=useNewsApi().refreshStatistics;var features=useFeatures();var _b=useContext(FeedbackButtonContext),item=_b.item,likeCount=_b.statistics.likeCount,resourceType=_b.resourceType,hasFeedbackEnabled=_b.hasFeedbackEnabled;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var showError=useNotificationContext().showError;var _d=usePromise$2(getLikeState,false,[item.id]),isLiked=_d[0],isLoading=_d[1],setIsLiked=_d[3];var _e=useState$2(false),isSaving=_e[0],setIsSaving=_e[1];if(!features.likes||!hasFeedbackEnabled('like')){return null;}return jsx$1(LikeButton,{itemType:resourceType,itemId:item.id,isActive:isLiked,readOnly:isLoading||isSaving||isReadOnly,count:likeCount,onClick:function(){return handleLikeChanged(!isLiked);},isDemoContent:item.isDemoContent},void 0);function getLikeState(){var _a;return __awaiter(this,void 0,void 0,function(){var hasPublishedVersion,feedbackSummary;return __generator(this,function(_b){switch(_b.label){case 0:hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;if(isReadOnly&&!hasPublishedVersion){return [2/*return*/,false];}if(!features.likes||!hasFeedbackEnabled('like')){return [2/*return*/,false];}return [4/*yield*/,getFeedback(resourceType,item.id)];case 1:feedbackSummary=_b.sent();return [2/*return*/,((_a=feedbackSummary.records)===null||_a===void 0?void 0:_a.findIndex(function(r){return r.type==='like';}))>-1];}});});}function handleLikeChanged(isNowLiked){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving||isLoading){return [2/*return*/];}setIsSaving(true);setIsLiked(isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?1:-1})];case 1:_b.sent();_b.label=2;case 2:_b.trys.push([2,7,9,10]);if(!isNowLiked)return [3/*break*/,4];return [4/*yield*/,setFeedback(resourceType,item.id,'like')];case 3:_b.sent();return [3/*break*/,6];case 4:return [4/*yield*/,unsetFeedback(resourceType,item.id,'like')];case 5:_b.sent();_b.label=6;case 6:return [3/*break*/,10];case 7:_b.sent();setIsLiked(!isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?-1:1})];case 8:_b.sent();showError('NewsArticle.setFeedback_error');return [3/*break*/,10];case 9:setIsSaving(false);return [7/*endfinally*/];case 10:return [2/*return*/];}});});}};var FeedbackButtonComments=function FeedbackButtonComments(){var features=useFeatures();var formatMessage=useIntl().formatMessage;var _a=useContext(FeedbackButtonContext),commentCount=_a.statistics.commentCount,resourceType=_a.resourceType,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.comments||!hasFeedbackEnabled('comment')){return null;}return jsx$1(FeedbackCountButton,{count:commentCount,iconName:"Chat",readOnly:true,tooltipResourceKey:resourceType===ItemResourceTypes.Pages?'Page.numberOfComments':'NewsArticle.numberOfComments',tooltipResourceKeyValues:{count:commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),feedbackType:"comment"},void 0);};var FeedbackButtonViews=function FeedbackButtonViews(){var _a=useContext(FeedbackButtonContext),readCount=_a.statistics.readCount,resourceType=_a.resourceType;var formatMessage=useIntl().formatMessage;var resourceKey=getResourceKey();return jsx$1(FeedbackCountButton,{count:readCount,iconName:"View",readOnly:true,tooltipResourceKey:resourceKey,tooltipResourceKeyValues:{count:readCount},ariaLabel:formatMessage({id:resourceKey},{count:readCount}),feedbackType:"view"},void 0);function getResourceKey(){if(resourceType===ItemResourceTypes.Pages){return 'Page.readersTooltip';}if(resourceType===ItemResourceTypes.News){return 'NewsArticle.readersTooltip';}return 'Events.readersTooltip';}};var EventDownloadCalendarFileButton=function EventDownloadCalendarFileButton(_a){var item=_a.item,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;return jsx$1(Host$o,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"Events.downloadCalendarFile"},{children:jsx$1(DownloadLink,__assign({href:getDownloadUrl(),"aria-label":formatMessage({id:'Events.downloadCalendarFile'})},{children:jsx$1(Icon,{iconName:"AddEvent"},void 0)}),void 0)}),void 0)}),void 0);function getDownloadUrl(){return createApiUrl("/events/"+encodeURI(item.id)+"/export",{access_token:item.fileAccessToken,subscriptionId:user.subscription.id});}};var Host$o=_styled.div.withConfig({displayName:"EventDownloadCalendarFileButton__Host",componentId:"sc-1hjuosf-0"})(templateObject_1$Y||(templateObject_1$Y=__makeTemplateObject(["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"],["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"])));var DownloadLink=_styled.a.withConfig({displayName:"EventDownloadCalendarFileButton__DownloadLink",componentId:"sc-1hjuosf-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"])),feedbackButtonHeight,feedbackButtonHeight,function(p){return p.theme.textColors.default;});var templateObject_1$Y,templateObject_2$y;var EventFeedbackButtonDownloadCalendarFile=function EventFeedbackButtonDownloadCalendarFile(){var item=useContext(FeedbackButtonContext).item;return jsx$1(StyledEventDownloadCalendarFileButton,{item:item},void 0);};var StyledEventDownloadCalendarFileButton=_styled(EventDownloadCalendarFileButton).withConfig({displayName:"EventFeedbackButtonDownloadCalendarFile__StyledEventDownloadCalendarFileButton",componentId:"sc-dsznxm-0"})(templateObject_1$X||(templateObject_1$X=__makeTemplateObject(["\n min-width: 60px;\n margin-right: 9px;\n"],["\n min-width: 60px;\n margin-right: 9px;\n"])));var templateObject_1$X;var ShareButton=function ShareButton(_a){var url=_a.url,isReadOnly=_a.isReadOnly,className=_a.className;var copyContainerRef=useRef$1();var _b=useState$2(false),didCopy=_b[0],setDidCopy=_b[1];var onShare=useContext(LinkContext).onShare;var formatMessage=useIntl().formatMessage;return jsx$1(Host$n,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"ShareButton.ActionDescription"},{children:jsxs(StyledIconWithCallout,__assign({icon:"Share",onIconClick:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onShare(url)];case 1:return [2/*return*/,_a.sent()];}});});},onCalloutDismissed:function(){return setDidCopy(false);},directionalHint:DirectionalHint.topAutoEdge,ariaLabel:formatMessage({id:'ShareButton.ActionDescription'}),disabled:isReadOnly},{children:[jsx$1(FormattedMessage$1,{id:"ShareButton.ActionDescription"},void 0),jsxs(CopyContainer,__assign({ref:copyContainerRef},{children:[jsx$1(CopyField,{value:url,readOnly:true,onFocus:handleTextFieldFocus,onMouseUp:function(e){return e.preventDefault();},ariaLabel:formatMessage({id:'AriaLabel.shareButton.copyField'})},void 0),jsx$1(CopyIconButton,{iconProps:{iconName:'Copy'},onClick:copyToClipBoard,ariaLabel:formatMessage({id:'AriaLabel.copyText'})},void 0)]}),void 0),didCopy&&jsx$1(FormattedMessage$1,{id:"ShareButton.CopySuccess"},void 0)]}),void 0)}),void 0)}),void 0);function copyToClipBoard(){var tempTextField=document.createElement('textarea');tempTextField.innerText=url;copyContainerRef.current.appendChild(tempTextField);tempTextField.select();document.execCommand('copy');copyContainerRef.current.removeChild(tempTextField);setDidCopy(true);}function handleTextFieldFocus(event){event.target.select();}};var Host$n=_styled.div.withConfig({displayName:"ShareButton__Host",componentId:"sc-6avyh0-0"})(templateObject_1$W||(templateObject_1$W=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconWithCallout=_styled(IconWithCallout).withConfig({displayName:"ShareButton__StyledIconWithCallout",componentId:"sc-6avyh0-1"})(templateObject_2$x||(templateObject_2$x=__makeTemplateObject(["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"],["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"])),feedbackButtonHeight,fontSizeMedium+4);var CopyContainer=_styled.div.withConfig({displayName:"ShareButton__CopyContainer",componentId:"sc-6avyh0-2"})(templateObject_3$p||(templateObject_3$p=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"],["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"])));var CopyField=_styled(TextField).withConfig({displayName:"ShareButton__CopyField",componentId:"sc-6avyh0-3"})(templateObject_4$g||(templateObject_4$g=__makeTemplateObject(["\n padding-right: ","px;\n width: 400px;\n"],["\n padding-right: ","px;\n width: 400px;\n"])),spacingS);var CopyIconButton=_styled(IconButton).withConfig({displayName:"ShareButton__CopyIconButton",componentId:"sc-6avyh0-4"})(templateObject_5$f||(templateObject_5$f=__makeTemplateObject(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeMedium+4);var templateObject_1$W,templateObject_2$x,templateObject_3$p,templateObject_4$g,templateObject_5$f;var FeedbackButtonShare=function FeedbackButtonShare(_a){var isReadOnly=_a.isReadOnly;var item=useContext(FeedbackButtonContext).item;return jsx$1(ShareButton,{url:item.permalink,isReadOnly:isReadOnly},void 0);};var ConfirmationStatistics=function ConfirmationStatistics(_a){var count=_a.count;return jsxs(Host$m,{children:[jsx$1(Icon,{iconName:"Accept"},void 0),jsx$1(FormattedMessage$1,{id:'NewsArticle.feedback.statistic.label',values:{count:count}},void 0)]},void 0);};var Host$m=_styled.div.withConfig({displayName:"ConfirmationStatistics__Host",componentId:"sc-1wprhw1-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),spacingXs-1,maxScreenSize.medium,fontSizeSmall);var templateObject_1$V;var ConfirmationStatisticsExport=function ConfirmationStatisticsExport(_a){var item=_a.item;var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;return jsx$1(Host$l,__assign({resourceKey:"DownloadButton.downloadTooltip"},{children:jsx$1(DownloadButton$1,{onClick:startDownload,iconProps:{iconName:'Download'},"aria-label":formatMessage({id:'AriaLabel.confirmationStatisticsExportButton'})},void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(newsId,fileDownloadToken){return createApiUrl("/news/"+newsId+"/statistics/confirmations",{access_token:fileDownloadToken});}};var DownloadButton$1=_styled(IconButton$1).withConfig({displayName:"ConfirmationStatisticsExport__DownloadButton",componentId:"sc-1gesr6p-0"})(templateObject_1$U||(templateObject_1$U=__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var Host$l=_styled(Tooltip).withConfig({displayName:"ConfirmationStatisticsExport__Host",componentId:"sc-1gesr6p-1"})(templateObject_2$w||(templateObject_2$w=__makeTemplateObject(["\n && {\n display: inline-flex;\n align-items: center;\n }\n"],["\n && {\n display: inline-flex;\n align-items: center;\n }\n"])));var templateObject_1$U,templateObject_2$w;var FeedbackButtonConfirmations=function FeedbackButtonConfirmations(){var features=useFeatures();var user=useCurrentUser();var _a=useContext(FeedbackButtonContext),item=_a.item,confirmationCount=_a.statistics.confirmationCount,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.confirmation||!hasFeedbackEnabled('confirm')||!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Host$k,{children:[jsx$1(ConfirmationStatistics,{count:confirmationCount},void 0),jsx$1(ConfirmationStatisticsExport,{item:item},void 0)]},void 0);};var Host$k=_styled.span.withConfig({displayName:"FeedbackButtonConfirmations__Host",componentId:"sc-sgky21-0"})(templateObject_1$T||(templateObject_1$T=__makeTemplateObject(["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"],["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"])),maxScreenSize.medium);var templateObject_1$T;var EventDetailViewFeedbackSection=function EventDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage;// Info: We need this check so that in Teams on mobile we don't show the
126352
- return jsxs(StyledFeedbackSection$2,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(EventFeedbackButtonDownloadCalendarFile,{},void 0),jsx$1(FeedbackButtonShare,{},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection$2=_styled(FeedbackSection).withConfig({displayName:"EventDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-1m82rje-0"})(templateObject_1$S||(templateObject_1$S=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$S;var EventDetailViewPlugins=function EventDetailViewPlugins(_a){var eventItem=_a.eventItem;return jsx$1(Host$j,{area:ExtensionArea.eventDetailViewSection,eventItem:eventItem},void 0);};var Host$j=_styled(Plugins)(templateObject_1$R||(templateObject_1$R=__makeTemplateObject(["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"],["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"])),spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$R;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.h2.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$Q;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$i,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$i=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$P;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$h,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$h=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$v||(templateObject_2$v=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$O,templateObject_2$v;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isReadOnly},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$N;var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isReadOnly=_c.isReadOnly;return jsxs(StyledFeedbackSection$1,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isReadOnly},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isReadOnly},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isReadOnly},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isReadOnly},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection$1=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$M;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$L;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$K;var DetailViewContextProvider=function DetailViewContextProvider(_a){var itemId=_a.itemId,type=_a.type,loadItemFunc=_a.loadItemFunc,isReadOnly=_a.isReadOnly,children=_a.children;var user=useCurrentUserContext().user;var handleFatalError=useContext(ErrorContext).handleFatalError;var translateContents=useTranslateApi().translateContents;var _b=useState$2(),item=_b[0],setItem=_b[1];var _c=useState$2(),originalItem=_c[0],setOriginalItem=_c[1];var _d=useState$2(),selectedLanguage=_d[0],setSelectedLanguage=_d[1];var _e=useState$2(false),hasError=_e[0],setHasError=_e[1];var _f=useState$2(true),isLoading=_f[0],setIsLoading=_f[1];var _g=useState$2(false),showAccessDenied=_g[0],setShowAccessDenied=_g[1];var handleAccessDeniedError=useContext(ErrorContext).handleAccessDeniedError;var isValid=true;useEffect$1(function(){refreshItem();return function(){// eslint-disable-next-line react-hooks/exhaustive-deps
126353
- isValid=false;};},[itemId]);if(showAccessDenied){handleAccessDeniedError({});return null;}var activeLanguages=NewsService.getItemContentLanguages(originalItem,user.subscription.languages);return jsx$1(DetailViewContext.Provider,__assign({value:getContextValues()},{children:children}),void 0);function getContextValues(){return {isLoading:isLoading,hasError:hasError,resourceType:type,item:item,itemId:itemId,contentLanguage:selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.lang,userPreferredLanguage:(selectedLanguage===null||selectedLanguage===void 0?void 0:selectedLanguage.isUserSet)?selectedLanguage.lang:getPreferredContentLanguage(user),activeLanguages:activeLanguages,content:item&&selectedLanguage?item.contents[selectedLanguage.lang]:null,updateSelectedLanguage:function(l){return setSelectedLanguage({lang:l,isUserSet:true});},handleRefresh:handleRefresh,handleLanguageChange:handleLanguageChange,isReadOnly:isReadOnly};}function handleRefresh(onFinished){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,refreshItem()];case 1:_a.sent();onFinished&&onFinished();return [2/*return*/];}});});}function refreshItem(){return __awaiter(this,void 0,void 0,function(){var p,selectedLanguage_1,err_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,3,4]);return [4/*yield*/,loadItemFunc(itemId)];case 1:p=_a.sent();selectedLanguage_1=NewsService.getLanguageForPublishableItem(p,user);if(isValid){setItem(p);setOriginalItem(p);setSelectedLanguage({isUserSet:false,lang:selectedLanguage_1});setHasError(false);}return [3/*break*/,4];case 2:err_1=_a.sent();if(err_1&&err_1.response&&err_1.response.statusCode===404){if(isValid){setItem(null);setSelectedLanguage(null);setHasError(true);}}else if(err_1&&err_1.response&&err_1.response.statusCode===403){setShowAccessDenied(true);}else {logger.error(err_1);handleFatalError({error:err_1,messageId:'Generic.error'});}return [3/*break*/,4];case 3:isValid&&setIsLoading(false);return [7/*endfinally*/];case 4:return [2/*return*/];}});});}function handleLanguageChange(language){return __awaiter(this,void 0,void 0,function(){var content;var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(item.contents[language]){setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}return [4/*yield*/,translateContents(type,itemId,language)];case 1:content=_b.sent();setItem(__assign(__assign({},item),{contents:__assign(__assign({},item.contents),(_a={},_a[language]=content,_a))}));setSelectedLanguage({isUserSet:true,lang:language});return [2/*return*/];}});});}};var PageDetailViewFeedbackSection=function PageDetailViewFeedbackSection(_a){var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,contentLanguage=_b.contentLanguage;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:item.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"PageDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-12s3v5d-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"],["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"])),DetailViewSectionPadding,spacingXl+10,minScreenSize.small);var templateObject_1$J;var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$f||(templateObject_4$f=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$e||(templateObject_5$e=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$8||(templateObject_6$8=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$5||(templateObject_7$5=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$5||(templateObject_8$5=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$I,templateObject_2$u,templateObject_3$o,templateObject_4$f,templateObject_5$e,templateObject_6$8,templateObject_7$5,templateObject_8$5;var DateMode;(function(DateMode){DateMode[DateMode["Published"]=0]="Published";DateMode[DateMode["Modified"]=1]="Modified";})(DateMode||(DateMode={}));var DateInfo$1=function DateInfo(_a){var item=_a.item,dateMode=_a.dateMode,expiryDate=_a.expiryDate,className=_a.className;var features=useFeatures();return jsxs("span",__assign({className:className},{children:[dateMode===DateMode.Modified&&getModifiedInfo(),dateMode===DateMode.Published&&getPublishInfo(),expiryDate&&features.expiryDate&&getArchiveInfo()]}),void 0);function getPublishInfo(){var format=isSameDay(item.publishingDate)?'relative':'absolute';if(!item.publishingDate){if(item.status!==WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishWhenApproved"},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.published"},void 0);}var values={start:jsx$1(DateTime,{value:item.publishingDate},void 0)};if(new Date(item.publishingDate)>=new Date()){return jsx$1(FormattedMessage$1,{id:item.status!==WorkflowStatus.approved?"DateInfo.publishOnIfApproved."+format:"DateInfo.publishOn."+format,values:values},void 0);}if(item.status===WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedOn."+format,values:values},void 0);}if(!!item.publishedVersionId){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedWithPendingEdits."+format,values:values},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.missingApproval."+format,values:values},void 0);}function getArchiveInfo(){var format=isSameDay(expiryDate)?'relative':'absolute';var values={end:jsx$1(DateTime,{value:expiryDate},void 0)};if(new Date(expiryDate)<new Date()){// if already expired
126346
+ },[item.id,comparableStatistics]);if(!statistics){return null;}return jsx$1(FeedbackButtonContext.Provider,__assign({value:{statistics:statistics,language:language,item:item,resourceType:resourceType,hasFeedbackEnabled:hasFeedbackEnabled}},{children:jsx$1(FeedbackButtonsContainer,__assign({className:className},{children:Children.map(children,function(child){return jsx$1("li",{children:child},void 0);})}),void 0)}),void 0);function loadStatistics(item){return __awaiter(this,void 0,void 0,function(){var newStatistics,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(item.statistics){setStatistics(item.statistics);return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getStatistics(item.id)];case 2:newStatistics=_a.sent();setStatistics(newStatistics);return [3/*break*/,4];case 3:error_1=_a.sent();logger.error(error_1);showError('NewsArticle.loadStatistics_error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var FeedbackButtonsContainer=_styled.ul.withConfig({displayName:"FeedbackButtons__FeedbackButtonsContainer",componentId:"sc-1vjmzsz-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n\n > * {\n margin-bottom: 15px;\n }\n"])));var templateObject_1$16;var ThreadView=function ThreadView(_a){var _b;var parentComment=_a.parentComment,commentReplies=_a.commentReplies,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,type=_a.type,groupIds=_a.groupIds,baseAttachmentPath=_a.baseAttachmentPath,getHashtagFilterRoute=_a.getHashtagFilterRoute,onThreadCommentDelete=_a.onThreadCommentDelete,onShowAllComments=_a.onShowAllComments,className=_a.className;var user=useCurrentUser();var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;var history=useHistory();var location=useLocation$1();var showAutoTranslate=(parentComment===null||parentComment===void 0?void 0:parentComment.sender.id)!==user.id;var screenSize=useWindowSize$2();var placeHolderStringResourceKey=screenSize.width>maxScreenSize.medium?'Comment.threads.replyTo':'Comment.threads.replyTo.mobile';var _c=useState$2(commentReplies),replies=_c[0],setReplies=_c[1];var _d=useState$2(true),isDialogHidden=_d[0],setIsDialogHidden=_d[1];var _e=useState$2(((_b=parentComment.statistics)===null||_b===void 0?void 0:_b.replyCount)||0),replyCount=_e[0],setReplyCount=_e[1];usePageViewTracker(type+"/"+parentComment.parentItemId+"/comments",parentComment.id);return jsxs("div",__assign({className:className},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDeleteThread,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(CommentDisplay,{scope:scope,message:parentComment,showDelete:canDelete(parentComment),showEdit:canEdit(parentComment),showAutoTranslate:showAutoTranslate,type:type,highlight:parentComment.isUnread,isInitialLiked:parentComment.isLiked,mentionSearchHandler:mentionSearchHandler,baseAttachmentPath:baseAttachmentPath,onDelete:function(){return setIsDialogHidden(false);},getHashtagFilterRoute:getHashtagFilterRoute,replyCount:replyCount,onReplyIconClick:handleShowAllComments},parentComment.receivedDateTime),jsx$1(CommentReplies,{threadId:parentComment.id,initialPageSize:5,pageSize:5,type:type,baseAttachmentPath:baseAttachmentPath+"/"+parentComment.id+"/replies",mentionSearchHandler:mentionSearchHandler,groupIds:groupIds,getHashtagFilterRoute:getHashtagFilterRoute,readOnly:false,scope:scope,itemId:parentComment.parentItemId,autoFocusReplyField:!env.isTouchDevice,initialComments:replies,onCommentDeleted:deleteReply,onCommentAdded:function(){return setReplyCount(function(count){return count+1;});},showReplyBox:true,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:{name:parentComment===null||parentComment===void 0?void 0:parentComment.sender.displayName}},parentComment.parentItemId),jsx$1(ShowAllCommentsButton,__assign({iconProps:{iconName:'ReturnKey'},onClick:handleShowAllComments,"data-show-all-comments":true},{children:jsx$1(FormattedMessage$1,{id:"Comment.showAllComments"},void 0)}),void 0)]}),void 0);function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}function deleteReply(reply){setReplies(__assign(__assign({},replies),{items:replies.items.filter(function(c){return c.id!==reply.id;})}));setReplyCount(function(count){return count-1;});}function handleDeleteThread(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,2,,3]);return [4/*yield*/,deleteComment(type,scope,parentComment.parentItemId,parentComment.id)];case 1:_b.sent();onThreadCommentDelete();return [3/*break*/,3];case 2:_b.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function handleShowAllComments(){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+parentComment.id}}));onShowAllComments===null||onShowAllComments===void 0?void 0:onShowAllComments();}};var CommentReplies=_styled(PagedCommentsSection).withConfig({displayName:"ThreadView__CommentReplies",componentId:"sc-1c4y6ek-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n padding-left: ","px;\n"],["\n padding-left: ","px;\n"])),spacingL);var ShowAllCommentsButton=_styled(ActionButton).withConfig({displayName:"ThreadView__ShowAllCommentsButton",componentId:"sc-1c4y6ek-1"})(templateObject_2$C||(templateObject_2$C=__makeTemplateObject(["\n margin: ","px 0 0 ","px;\n"],["\n margin: ","px 0 0 ","px;\n"])),spacingS,spacingL);var templateObject_1$15,templateObject_2$C;var PublishableItemThreadView=function PublishableItemThreadView(_a){var item=_a.item,type=_a.type,threadId=_a.threadId,onShowAllComments=_a.onShowAllComments,onThreadCommentDelete=_a.onThreadCommentDelete;var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var getCommentThread=useCommentApi().getCommentThread;var _b=usePromise$2(function(){return getCommentThread(type,item.id,threadId);},null),comments=_b[0],isLoading=_b[1];if(isLoading){return jsx$1(StyledSpinner,{},void 0);}var parentComment=comments===null||comments===void 0?void 0:comments.items.find(function(c){return c.id===threadId;});if(!parentComment||parentComment.threadId!=null){return jsx$1(Host$q,{children:jsx$1(FormattedMessage$1,{id:'NewsArticle.thread.empty'},void 0)},void 0);}return jsx$1(Host$q,{children:jsx$1(StyledThreadView$1,{parentComment:parentComment,commentReplies:{items:comments===null||comments===void 0?void 0:comments.items.filter(function(c){return c!==parentComment&&c.threadId===parentComment.id;}),paginationToken:comments===null||comments===void 0?void 0:comments.paginationToken,nextItem:comments===null||comments===void 0?void 0:comments.nextItem,hasMoreUnreadComments:comments===null||comments===void 0?void 0:comments.hasMoreUnreadComments},scope:ConversationScope.Public,groupIds:item.groupIds,baseAttachmentPath:"/"+type+"/"+item.id+"/comments",mentionSearchHandler:getMentionsSearchHandler,type:type,onThreadCommentDelete:onThreadCommentDelete,onShowAllComments:onShowAllComments},void 0)},void 0);function getMentionsSearchHandler(searchText){return searchAccountsByItemId(GroupRoles.Reader,item.id,searchText);}};var Host$q=_styled.div.withConfig({displayName:"PublishableItemThreadView__Host",componentId:"sc-1yiyuzb-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"],["\n padding: 1.5em ","px;\n background-color: ",";\n\n @media (min-width: ","px) {\n padding: 1.5em ","px;\n }\n"])),detailViewSectionPadding,function(p){return p.theme.palette.neutralLight;},minScreenSize.small,detailViewSectionPaddingLarge);var StyledSpinner=_styled(Spinner).withConfig({displayName:"PublishableItemThreadView__StyledSpinner",componentId:"sc-1yiyuzb-1"})(templateObject_2$B||(templateObject_2$B=__makeTemplateObject(["\n margin: 5% 0;\n"],["\n margin: 5% 0;\n"])));var StyledThreadView$1=_styled(ThreadView).withConfig({displayName:"PublishableItemThreadView__StyledThreadView",componentId:"sc-1yiyuzb-2"})(templateObject_3$r||(templateObject_3$r=__makeTemplateObject(["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"],["\n /* This matches the Load More button and comments that have a highlight */\n [data-show-highlight='true'] {\n &::after {\n @media (min-width: ","px) {\n right: -","px;\n }\n\n right: -","px;\n }\n }\n"])),minScreenSize.small,detailViewSectionPaddingLarge,detailViewSectionPadding);var templateObject_1$14,templateObject_2$B,templateObject_3$r;var FeedbackSection=function FeedbackSection(_a){var _b,_c;var type=_a.type,item=_a.item,language=_a.language,feedbackSettings=_a.feedbackSettings,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser,isReadOnly=_a.isReadOnly,children=_a.children,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var match=useRouteMatch();var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _d=useState$2((_c=(_b=match.params)===null||_b===void 0?void 0:_b.threadId)!==null&&_c!==void 0?_c:null),threadId=_d[0],setThreadId=_d[1];var showComments=features.comments&&hasFeedbackEnabled('comment')&&!hideComments;var showThreadView=features.replyToComments&&threadId!=null;var hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;return jsxs(Fragment,{children:[jsx$1("section",__assign({className:className,"aria-label":formatMessage({id:'Generic.feedbackButtons'})},{children:jsx$1(StyledFeedbackButtons,__assign({resourceType:type,item:item,language:language,hasFeedbackEnabled:hasFeedbackEnabled},{children:children}),void 0)}),void 0),showComments&&(!showThreadView?jsx$1("section",__assign({id:"comments","data-comment-section":true,className:classNames('ms-bgColor-neutralLight',className)},{children:jsx$1(PublishableItemComments,{item:item,type:type,onThreadReply:features.replyToComments?setThreadId:null,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,readOnly:isReadOnly,loadInReadOnlyMode:isReadOnly&&hasPublishedVersion},void 0)}),void 0):jsx$1("section",{children:jsx$1(PublishableItemThreadView,{item:item,type:type,threadId:threadId,onShowAllComments:handleOnShowAllComments,onThreadCommentDelete:handleThreadCommentDelete},void 0)},void 0))]},void 0);function handleThreadCommentDelete(){var _a;// not using threadId here since we can still have a non thread path but be inline with the thread view
126347
+ if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath("/"+type+"/"+item.id)}));}setThreadId(null);}function hasFeedbackEnabled(feedbackType){return hasFeedbackType(feedbackSettings||{},feedbackType);}function handleOnShowAllComments(){var _a;setThreadId(null);if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath(type+"/"+item.id)}));}}};var StyledFeedbackButtons=_styled(FeedbackButtons).withConfig({displayName:"FeedbackSection__StyledFeedbackButtons",componentId:"sc-3bzj8d-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"],["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"])),function(p){return p.showComments?'15px':'30px';});var templateObject_1$13;var FeedbackButtonLike=function FeedbackButtonLike(_a){var isReadOnly=_a.isReadOnly;var refreshStatistics=useNewsApi().refreshStatistics;var features=useFeatures();var _b=useContext(FeedbackButtonContext),item=_b.item,likeCount=_b.statistics.likeCount,resourceType=_b.resourceType,hasFeedbackEnabled=_b.hasFeedbackEnabled;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var showError=useNotificationContext().showError;var _d=usePromise$2(getLikeState,false,[item.id]),isLiked=_d[0],isLoading=_d[1],setIsLiked=_d[3];var _e=useState$2(false),isSaving=_e[0],setIsSaving=_e[1];if(!features.likes||!hasFeedbackEnabled('like')){return null;}return jsx$1(LikeButton,{itemType:resourceType,itemId:item.id,isActive:isLiked,readOnly:isLoading||isSaving||isReadOnly,count:likeCount,onClick:function(){return handleLikeChanged(!isLiked);},isDemoContent:item.isDemoContent},void 0);function getLikeState(){var _a;return __awaiter(this,void 0,void 0,function(){var hasPublishedVersion,feedbackSummary;return __generator(this,function(_b){switch(_b.label){case 0:hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;if(isReadOnly&&!hasPublishedVersion){return [2/*return*/,false];}if(!features.likes||!hasFeedbackEnabled('like')){return [2/*return*/,false];}return [4/*yield*/,getFeedback(resourceType,item.id)];case 1:feedbackSummary=_b.sent();return [2/*return*/,((_a=feedbackSummary.records)===null||_a===void 0?void 0:_a.findIndex(function(r){return r.type==='like';}))>-1];}});});}function handleLikeChanged(isNowLiked){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving||isLoading){return [2/*return*/];}setIsSaving(true);setIsLiked(isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?1:-1})];case 1:_b.sent();_b.label=2;case 2:_b.trys.push([2,7,9,10]);if(!isNowLiked)return [3/*break*/,4];return [4/*yield*/,setFeedback(resourceType,item.id,'like')];case 3:_b.sent();return [3/*break*/,6];case 4:return [4/*yield*/,unsetFeedback(resourceType,item.id,'like')];case 5:_b.sent();_b.label=6;case 6:return [3/*break*/,10];case 7:_b.sent();setIsLiked(!isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?-1:1})];case 8:_b.sent();showError('NewsArticle.setFeedback_error');return [3/*break*/,10];case 9:setIsSaving(false);return [7/*endfinally*/];case 10:return [2/*return*/];}});});}};var FeedbackButtonComments=function FeedbackButtonComments(){var features=useFeatures();var formatMessage=useIntl().formatMessage;var _a=useContext(FeedbackButtonContext),commentCount=_a.statistics.commentCount,resourceType=_a.resourceType,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.comments||!hasFeedbackEnabled('comment')){return null;}return jsx$1(FeedbackCountButton,{count:commentCount,iconName:"Chat",readOnly:true,tooltipResourceKey:resourceType===ItemResourceTypes.Pages?'Page.numberOfComments':'NewsArticle.numberOfComments',tooltipResourceKeyValues:{count:commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),feedbackType:"comment"},void 0);};var FeedbackButtonViews=function FeedbackButtonViews(){var _a=useContext(FeedbackButtonContext),readCount=_a.statistics.readCount,resourceType=_a.resourceType;var formatMessage=useIntl().formatMessage;var resourceKey=getResourceKey();return jsx$1(FeedbackCountButton,{count:readCount,iconName:"View",readOnly:true,tooltipResourceKey:resourceKey,tooltipResourceKeyValues:{count:readCount},ariaLabel:formatMessage({id:resourceKey},{count:readCount}),feedbackType:"view"},void 0);function getResourceKey(){if(resourceType===ItemResourceTypes.Pages){return 'Page.readersTooltip';}if(resourceType===ItemResourceTypes.News){return 'NewsArticle.readersTooltip';}return 'Events.readersTooltip';}};var EventDownloadCalendarFileButton=function EventDownloadCalendarFileButton(_a){var item=_a.item,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;return jsx$1(Host$p,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"Events.downloadCalendarFile"},{children:jsx$1(DownloadLink,__assign({href:getDownloadUrl(),"aria-label":formatMessage({id:'Events.downloadCalendarFile'})},{children:jsx$1(Icon,{iconName:"AddEvent"},void 0)}),void 0)}),void 0)}),void 0);function getDownloadUrl(){return createApiUrl("/events/"+encodeURI(item.id)+"/export",{access_token:item.fileAccessToken,subscriptionId:user.subscription.id});}};var Host$p=_styled.div.withConfig({displayName:"EventDownloadCalendarFileButton__Host",componentId:"sc-1hjuosf-0"})(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"],["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"])));var DownloadLink=_styled.a.withConfig({displayName:"EventDownloadCalendarFileButton__DownloadLink",componentId:"sc-1hjuosf-1"})(templateObject_2$A||(templateObject_2$A=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"])),feedbackButtonHeight,feedbackButtonHeight,function(p){return p.theme.textColors.default;});var templateObject_1$12,templateObject_2$A;var EventFeedbackButtonDownloadCalendarFile=function EventFeedbackButtonDownloadCalendarFile(){var item=useContext(FeedbackButtonContext).item;return jsx$1(StyledEventDownloadCalendarFileButton,{item:item},void 0);};var StyledEventDownloadCalendarFileButton=_styled(EventDownloadCalendarFileButton).withConfig({displayName:"EventFeedbackButtonDownloadCalendarFile__StyledEventDownloadCalendarFileButton",componentId:"sc-dsznxm-0"})(templateObject_1$11||(templateObject_1$11=__makeTemplateObject(["\n min-width: 60px;\n margin-right: 9px;\n"],["\n min-width: 60px;\n margin-right: 9px;\n"])));var templateObject_1$11;var ShareButton=function ShareButton(_a){var url=_a.url,isReadOnly=_a.isReadOnly,className=_a.className;var copyContainerRef=useRef$1();var _b=useState$2(false),didCopy=_b[0],setDidCopy=_b[1];var onShare=useContext(LinkContext).onShare;var formatMessage=useIntl().formatMessage;return jsx$1(Host$o,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"ShareButton.ActionDescription"},{children:jsxs(StyledIconWithCallout,__assign({icon:"Share",onIconClick:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onShare(url)];case 1:return [2/*return*/,_a.sent()];}});});},onCalloutDismissed:function(){return setDidCopy(false);},directionalHint:DirectionalHint.topAutoEdge,ariaLabel:formatMessage({id:'ShareButton.ActionDescription'}),disabled:isReadOnly},{children:[jsx$1(FormattedMessage$1,{id:"ShareButton.ActionDescription"},void 0),jsxs(CopyContainer,__assign({ref:copyContainerRef},{children:[jsx$1(CopyField,{value:url,readOnly:true,onFocus:handleTextFieldFocus,onMouseUp:function(e){return e.preventDefault();},ariaLabel:formatMessage({id:'AriaLabel.shareButton.copyField'})},void 0),jsx$1(CopyIconButton,{iconProps:{iconName:'Copy'},onClick:copyToClipBoard,ariaLabel:formatMessage({id:'AriaLabel.copyText'})},void 0)]}),void 0),didCopy&&jsx$1(FormattedMessage$1,{id:"ShareButton.CopySuccess"},void 0)]}),void 0)}),void 0)}),void 0);function copyToClipBoard(){var tempTextField=document.createElement('textarea');tempTextField.innerText=url;copyContainerRef.current.appendChild(tempTextField);tempTextField.select();document.execCommand('copy');copyContainerRef.current.removeChild(tempTextField);setDidCopy(true);}function handleTextFieldFocus(event){event.target.select();}};var Host$o=_styled.div.withConfig({displayName:"ShareButton__Host",componentId:"sc-6avyh0-0"})(templateObject_1$10||(templateObject_1$10=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconWithCallout=_styled(IconWithCallout).withConfig({displayName:"ShareButton__StyledIconWithCallout",componentId:"sc-6avyh0-1"})(templateObject_2$z||(templateObject_2$z=__makeTemplateObject(["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"],["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"])),feedbackButtonHeight,fontSizeMedium+4);var CopyContainer=_styled.div.withConfig({displayName:"ShareButton__CopyContainer",componentId:"sc-6avyh0-2"})(templateObject_3$q||(templateObject_3$q=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"],["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"])));var CopyField=_styled(TextField).withConfig({displayName:"ShareButton__CopyField",componentId:"sc-6avyh0-3"})(templateObject_4$h||(templateObject_4$h=__makeTemplateObject(["\n padding-right: ","px;\n width: 400px;\n"],["\n padding-right: ","px;\n width: 400px;\n"])),spacingS);var CopyIconButton=_styled(IconButton).withConfig({displayName:"ShareButton__CopyIconButton",componentId:"sc-6avyh0-4"})(templateObject_5$g||(templateObject_5$g=__makeTemplateObject(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeMedium+4);var templateObject_1$10,templateObject_2$z,templateObject_3$q,templateObject_4$h,templateObject_5$g;var FeedbackButtonShare=function FeedbackButtonShare(_a){var isReadOnly=_a.isReadOnly;var item=useContext(FeedbackButtonContext).item;return jsx$1(ShareButton,{url:item.permalink,isReadOnly:isReadOnly},void 0);};var ConfirmationStatistics=function ConfirmationStatistics(_a){var count=_a.count;return jsxs(Host$n,{children:[jsx$1(Icon,{iconName:"Accept"},void 0),jsx$1(FormattedMessage$1,{id:'NewsArticle.feedback.statistic.label',values:{count:count}},void 0)]},void 0);};var Host$n=_styled.div.withConfig({displayName:"ConfirmationStatistics__Host",componentId:"sc-1wprhw1-0"})(templateObject_1$$||(templateObject_1$$=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),spacingXs-1,maxScreenSize.medium,fontSizeSmall);var templateObject_1$$;var ConfirmationStatisticsExport=function ConfirmationStatisticsExport(_a){var item=_a.item;var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;return jsx$1(Host$m,__assign({resourceKey:"DownloadButton.downloadTooltip"},{children:jsx$1(DownloadButton$1,{onClick:startDownload,iconProps:{iconName:'Download'},"aria-label":formatMessage({id:'AriaLabel.confirmationStatisticsExportButton'})},void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(newsId,fileDownloadToken){return createApiUrl("/news/"+newsId+"/statistics/confirmations",{access_token:fileDownloadToken});}};var DownloadButton$1=_styled(IconButton$1).withConfig({displayName:"ConfirmationStatisticsExport__DownloadButton",componentId:"sc-1gesr6p-0"})(templateObject_1$_||(templateObject_1$_=__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var Host$m=_styled(Tooltip).withConfig({displayName:"ConfirmationStatisticsExport__Host",componentId:"sc-1gesr6p-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n && {\n display: inline-flex;\n align-items: center;\n }\n"],["\n && {\n display: inline-flex;\n align-items: center;\n }\n"])));var templateObject_1$_,templateObject_2$y;var FeedbackButtonConfirmations=function FeedbackButtonConfirmations(){var features=useFeatures();var user=useCurrentUser();var _a=useContext(FeedbackButtonContext),item=_a.item,confirmationCount=_a.statistics.confirmationCount,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.confirmation||!hasFeedbackEnabled('confirm')||!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Host$l,{children:[jsx$1(ConfirmationStatistics,{count:confirmationCount},void 0),jsx$1(ConfirmationStatisticsExport,{item:item},void 0)]},void 0);};var Host$l=_styled.span.withConfig({displayName:"FeedbackButtonConfirmations__Host",componentId:"sc-sgky21-0"})(templateObject_1$Z||(templateObject_1$Z=__makeTemplateObject(["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"],["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"])),maxScreenSize.medium);var templateObject_1$Z;var EventDetailViewFeedbackSection=function EventDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage;// Info: We need this check so that in Teams on mobile we don't show the
126348
+ return jsxs(StyledFeedbackSection$2,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(EventFeedbackButtonDownloadCalendarFile,{},void 0),jsx$1(FeedbackButtonShare,{},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection$2=_styled(FeedbackSection).withConfig({displayName:"EventDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-1m82rje-0"})(templateObject_1$Y||(templateObject_1$Y=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$Y;var EventDetailViewPlugins=function EventDetailViewPlugins(_a){var eventItem=_a.eventItem;return jsx$1(Host$k,{area:ExtensionArea.eventDetailViewSection,eventItem:eventItem},void 0);};var Host$k=_styled(Plugins)(templateObject_1$X||(templateObject_1$X=__makeTemplateObject(["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"],["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"])),spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$X;var DateMode;(function(DateMode){DateMode[DateMode["Published"]=0]="Published";DateMode[DateMode["Modified"]=1]="Modified";})(DateMode||(DateMode={}));var DateInfo$1=function DateInfo(_a){var item=_a.item,dateMode=_a.dateMode,expiryDate=_a.expiryDate,className=_a.className;var features=useFeatures();return jsxs("span",__assign({className:className},{children:[dateMode===DateMode.Modified&&getModifiedInfo(),dateMode===DateMode.Published&&getPublishInfo(),expiryDate&&features.expiryDate&&getArchiveInfo()]}),void 0);function getPublishInfo(){var format=isSameDay(item.publishingDate)?'relative':'absolute';if(!item.publishingDate){if(item.status!==WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishWhenApproved"},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.published"},void 0);}var values={start:jsx$1(DateTime,{value:item.publishingDate},void 0)};if(new Date(item.publishingDate)>=new Date()){return jsx$1(FormattedMessage$1,{id:item.status!==WorkflowStatus.approved?"DateInfo.publishOnIfApproved."+format:"DateInfo.publishOn."+format,values:values},void 0);}if(item.status===WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedOn."+format,values:values},void 0);}if(!!item.publishedVersionId){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedWithPendingEdits."+format,values:values},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.missingApproval."+format,values:values},void 0);}function getArchiveInfo(){var format=isSameDay(expiryDate)?'relative':'absolute';var values={end:jsx$1(DateTime,{value:expiryDate},void 0)};if(new Date(expiryDate)<new Date()){// if already expired
126354
126349
  return jsxs("span",{children:[",\u00A0",jsx$1(FormattedMessage$1,{id:"DateInfo.archivedOn."+format,values:values},void 0)]},void 0);}else {// not yet expired
126355
- return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$H;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$g,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$g=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$e||(templateObject_4$e=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$d||(templateObject_5$d=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$7||(templateObject_6$7=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$G,templateObject_2$t,templateObject_3$n,templateObject_4$e,templateObject_5$d,templateObject_6$7;var PageDetailViewMetaInfo=function PageDetailViewMetaInfo(){var _a=useDetailViewContext(),item=_a.item,userPreferredLanguage=_a.userPreferredLanguage;return jsx$1(DetailMetaInfo$1,{item:item,dateMode:DateMode.Modified,language:userPreferredLanguage},void 0);};var DetailMetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"PageDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-1yz7bl7-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"],["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"])),minScreenSize.small);var templateObject_1$F;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$f,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$f=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$E,templateObject_2$s;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$D;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$C,templateObject_2$r,templateObject_3$m;var PageTocSearch=function PageTocSearch(_a){var onSearch=_a.onSearch,onSearchResultChange=_a.onSearchResultChange;var formatMessage=useIntl().formatMessage;var onDebouncedSearch=useDebouncedCallback(handleSearch,300)[0];var textColors=useContext(ThemeContext$1).theme.textColors;return jsx$1(StyledSearchBox,{"data-toc-search-box":true,onChange:function(_,v){return onDebouncedSearch(v);},placeholder:formatMessage({id:'Pages.pagesTableOfContents.searchFieldPlaceholder'}),onKeyPress:handleKeyPress,iconProps:{style:{color:textColors.default}}},void 0);function handleKeyPress(event){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!(event.key==='Enter'))return [3/*break*/,2];return [4/*yield*/,handleSearch(event.currentTarget.value,true)];case 1:_a.sent();_a.label=2;case 2:return [2/*return*/];}});});}function handleSearch(value,ignoreSearchTextLength){return __awaiter(this,void 0,void 0,function(){var result,allNodesById;return __generator(this,function(_a){switch(_a.label){case 0:if(!value||!ignoreSearchTextLength&&value.trim().length<3){onSearchResultChange(null);return [2/*return*/];}return [4/*yield*/,onSearch(value)];case 1:result=_a.sent();allNodesById={};// the search returns us a flat result of pages, we now have to build up
126350
+ return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$W||(templateObject_1$W=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$W;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$j,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$j=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$x||(templateObject_2$x=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$p||(templateObject_3$p=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$g||(templateObject_4$g=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$f||(templateObject_5$f=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$9||(templateObject_6$9=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$V,templateObject_2$x,templateObject_3$p,templateObject_4$g,templateObject_5$f,templateObject_6$9;var PageDetailViewMetaInfo=function PageDetailViewMetaInfo(){var _a=useDetailViewContext(),item=_a.item,userPreferredLanguage=_a.userPreferredLanguage;return jsx$1(DetailMetaInfo$1,{item:item,dateMode:DateMode.Modified,language:userPreferredLanguage},void 0);};var DetailMetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"PageDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-1yz7bl7-0"})(templateObject_1$U||(templateObject_1$U=__makeTemplateObject(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"],["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"])),minScreenSize.small);var templateObject_1$U;var PageDetailViewFeedbackSection=function PageDetailViewFeedbackSection(_a){var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,contentLanguage=_b.contentLanguage;return jsxs(StyledFeedbackSection$1,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:item.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{},void 0)]}),void 0);};var StyledFeedbackSection$1=_styled(FeedbackSection).withConfig({displayName:"PageDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-12s3v5d-0"})(templateObject_1$T||(templateObject_1$T=__makeTemplateObject(["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"],["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"])),DetailViewSectionPadding,spacingXl+10,minScreenSize.small);var templateObject_1$T;var PageTocSearch=function PageTocSearch(_a){var onSearch=_a.onSearch,onSearchResultChange=_a.onSearchResultChange;var formatMessage=useIntl().formatMessage;var onDebouncedSearch=useDebouncedCallback(handleSearch,300)[0];var textColors=useContext(ThemeContext$1).theme.textColors;return jsx$1(StyledSearchBox,{"data-toc-search-box":true,onChange:function(_,v){return onDebouncedSearch(v);},placeholder:formatMessage({id:'Pages.pagesTableOfContents.searchFieldPlaceholder'}),onKeyPress:handleKeyPress,iconProps:{style:{color:textColors.default}}},void 0);function handleKeyPress(event){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!(event.key==='Enter'))return [3/*break*/,2];return [4/*yield*/,handleSearch(event.currentTarget.value,true)];case 1:_a.sent();_a.label=2;case 2:return [2/*return*/];}});});}function handleSearch(value,ignoreSearchTextLength){return __awaiter(this,void 0,void 0,function(){var result,allNodesById;return __generator(this,function(_a){switch(_a.label){case 0:if(!value||!ignoreSearchTextLength&&value.trim().length<3){onSearchResultChange(null);return [2/*return*/];}return [4/*yield*/,onSearch(value)];case 1:result=_a.sent();allNodesById={};// the search returns us a flat result of pages, we now have to build up
126356
126351
  // an hierarchical tree, with the roots node at the very top
126357
126352
  // so we can then pass this in to the actual ToC
126358
126353
  result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page);node.isSearchMatch=true;while(true){// if we already have the current node collected
@@ -126360,9 +126355,14 @@ result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page
126360
126355
  // we don't want to add the same node again, instead we just need to
126361
126356
  // append the children of the node
126362
126357
  // we also know then that we don't have to traverse the tree further up and can stop
126363
- var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled(SearchBox$1).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$B;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsx$1(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled(IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$A;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=useState$2(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=useState$2(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxs(Fragment,{children:[jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsx$1(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsx$1(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsx$1(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsx$1(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsx$1(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsx$1(StyledExternalLinkButton,{item:node},void 0),jsx$1(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsx$1(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsx$1("li",{children:jsx$1(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled.div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&css$2(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&css$2(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return css$2(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?css$2(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):css$2(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled(IconButton$1).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&css$2(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=css$2(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&css$2(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled(NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled(ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled.div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled.ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled(ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled(DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$z,templateObject_2$q,templateObject_3$l,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=useState$2(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsx$1(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsx$1(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsx$1(Fragment,{children:jsxs("div",__assign({className:className},{children:[jsx$1("div",__assign({"data-toc-search-container":true},{children:jsx$1(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsx$1(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsx$1(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsx$1(TocList,{children:nodesToDisplay.map(function(c){return jsx$1(ToCItem,{children:jsx$1(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&&currentParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled(EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled.div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&css$2(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled.ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled.li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled(PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$y,templateObject_2$p,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsx$1(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsx$1(DialogGlobalStyle,{},void 0),jsx$1(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled.div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=createGlobalStyle(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$x,templateObject_2$o;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$w;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$v;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);var templateObject_1$t;_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$1$1=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
126358
+ var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled(SearchBox$1).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$S||(templateObject_1$S=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$S;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsx$1(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled(IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$R||(templateObject_1$R=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$R;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=useState$2(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=useState$2(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxs(Fragment,{children:[jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsx$1(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsx$1(StyledIcon$3$1,{isHighlighted:isHighlighted},void 0),basePath?jsx$1(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsx$1(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsx$1(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsx$1(StyledExternalLinkButton,{item:node},void 0),jsx$1(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsx$1(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsx$1("li",{children:jsx$1(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled.div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&css$2(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&css$2(templateObject_2$w||(templateObject_2$w=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return css$2(templateObject_6$8||(templateObject_6$8=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?css$2(templateObject_4$f||(templateObject_4$f=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):css$2(templateObject_5$e||(templateObject_5$e=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled(IconButton$1).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$5||(templateObject_8$5=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&css$2(templateObject_7$5||(templateObject_7$5=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$3$1=_styled(Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=css$2(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&css$2(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled(NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled(ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled.div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled.ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled(ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled(DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$Q,templateObject_2$w,templateObject_3$o,templateObject_4$f,templateObject_5$e,templateObject_6$8,templateObject_7$5,templateObject_8$5,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=useState$2(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsx$1(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsx$1(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsx$1(Fragment,{children:jsxs("div",__assign({className:className},{children:[jsx$1("div",__assign({"data-toc-search-container":true},{children:jsx$1(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsx$1(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsx$1(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsx$1(TocList,{children:nodesToDisplay.map(function(c){return jsx$1(ToCItem,{children:jsx$1(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&&currentParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled(EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled.div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&css$2(templateObject_2$v||(templateObject_2$v=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled.ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$e||(templateObject_4$e=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled.li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$d||(templateObject_5$d=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled(PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$7||(templateObject_6$7=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$P,templateObject_2$v,templateObject_3$n,templateObject_4$e,templateObject_5$d,templateObject_6$7;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsx$1(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsx$1(DialogGlobalStyle,{},void 0),jsx$1(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled.div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=createGlobalStyle(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$O,templateObject_2$u;function useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType){var searchPublishedPages=usePagesApi().searchPublishedPages;return function(pageSize,token){return searchPublishedPages({keywords:keywords,token:token,pageSize:pageSize,pageType:showPagesAndDocuments?undefined:pageType});};}var InlinePageListByKeywords=function InlinePageListByKeywords(_a){var keywords=_a.keywords,showDocuments=_a.showDocuments,showPages=_a.showPages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showPagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var defaultPageSize=10;var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywords]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};function useLoadPublishedItemsByPageId(pageId,showPagesAndDocuments,pageType){var getSubpages=usePagesApi().getSubpages;try{return function(pageSize,token){return getSubpages(pageId,{pageType:showPagesAndDocuments?undefined:pageType,token:token,pageSize:pageSize});};}catch(error){logger.error(error);return null;}}var defaultPageSize$1=10;var InlinePageListByPageId=function InlinePageListByPageId(_a){var pageId=_a.pageId,showPages=_a.showPages,showDocuments=_a.showDocuments;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showSubpagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var _b=useItemLoaderWithPreFetch(defaultPageSize$1,useLoadPublishedItemsByPageId(pageId,showSubpagesAndDocuments,pageType),[pageId]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};var defaultPageSize=10;// the inline page list should be auto-added on a page with no content
126359
+ // by default pages and documents should be shown
126360
+ // for this case the blockProps would be an empty object and
126361
+ // we need to set the showPages and showDocuments to true
126362
+ var InlinePageListByCurrentPage=function InlinePageListByCurrentPage(_a){var _b=_a.blockProps,props=_b===void 0?{showDocuments:true,showPages:true}:_b;var item=useDetailViewContext().item;var getSubpages=usePagesApi().getSubpages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=useItemLoaderByCurrentPage(item.id,defaultPageSize,item.navigationContext,{showPages:props.showPages,showDocuments:props.showDocuments},getAllSubItems,[item===null||item===void 0?void 0:item.id]),items=_c.pageItems,pagingProps=_c.pagingProps;if(items.length===0){return null;}return jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:pagingProps,baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0);function getAllSubItems(id,pageType){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(id,{pageType:pageType})];case 1:result=_a.sent();return [2/*return*/,result.items];}});});}};var InlinePageList=function InlinePageList(_a){var blockProps=_a.blockProps;if(blockProps===null||blockProps===void 0?void 0:blockProps.keywords){return jsx$1(InlinePageListByKeywords,{keywords:blockProps.keywords,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsx$1(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsx$1(InlinePageListByCurrentPage,{blockProps:blockProps},void 0);};var InlinePageListMapper={component:InlinePageList,type:EntityType.InlinePageList,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var pageListId=node.getAttribute('data-page-list-id');if(pageListId==null){return null;}var showChildren=node.getAttribute('data-show-children')==='true';var showDocumentsAttribute=node.getAttribute('data-show-documents');var showPagesAttribute=node.getAttribute('data-show-pages');var pageId=node.getAttribute('data-page-id');var keywords=node.getAttribute('data-keywords');if(!showDocumentsAttribute&&!showPagesAttribute){// ensure backwards compatibility
126363
+ return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$N,templateObject_2$t,templateObject_3$m,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$i,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$i=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$M,templateObject_2$s;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$L;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$K,templateObject_2$r,templateObject_3$l;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$J;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$I;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,mode:"read",width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$H;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.h2.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$G;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$F;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$f,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$f=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$E,templateObject_2$q,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$D;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$C;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$B;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)},void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$A;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$e,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$e=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$z;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$d$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$d$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$y,templateObject_2$p;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isReadOnly=_a.isReadOnly;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isReadOnly},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$x;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isReadOnly=_c.isReadOnly;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isReadOnly},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isReadOnly},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isReadOnly},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isReadOnly},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$w;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$v;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$t,templateObject_2$o,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$1$1=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
126364
126364
  // https://github.com/tc39/proposal-string-replace-all
126365
- $$1$1({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$h;createGlobalStyle(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));createGlobalStyle(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$p,templateObject_2$k,templateObject_3$g;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$o,templateObject_2$j,templateObject_3$f,templateObject_4$9$1,templateObject_5$8;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
126365
+ $$1$1({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$h;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$g,templateObject_4$9$1,templateObject_5$8;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$p,templateObject_2$k,templateObject_3$f;_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);_styled(TextField).withConfig({displayName:"InsertVideoDialog__StyledTextField",componentId:"sc-12gp7sa-1"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n label {\n font-weight: normal;\n }\n"],["\n label {\n font-weight: normal;\n }\n"])));var templateObject_1$o,templateObject_2$j;createGlobalStyle(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));createGlobalStyle(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
126366
126366
  var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsx$1(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsx$1(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0),jsx$1(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsx$1("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled(NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled(Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&css$2(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$6$1,templateObject_4$3$1,templateObject_5$3$1;_styled(Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$b$1,templateObject_2$7$1,templateObject_3$5$1;_styled.div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled.div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$a$1,templateObject_2$6$1,templateObject_3$4$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,initialPageSize=_a.initialPageSize,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsx$1(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:initialPageSize,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled(PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$9$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsx$1(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled(IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$8$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsx$1(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsx$1("span",{children:groupName},void 0)}),void 0);};var Group=_styled(NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$7$1;_styled.div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$6$1||(templateObject_1$6$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled.div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$5$1||(templateObject_2$5$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
126367
126367
  var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled.div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled.div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$2$1||(templateObject_4$2$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled.div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled.div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled(DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled(ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&css$2(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled(PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled(PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled(NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled(PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled(LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled(ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled(KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$6$1,templateObject_2$5$1,templateObject_3$3$1,templateObject_4$2$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled(Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$2$1||(templateObject_3$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$5$1,templateObject_2$4$1,templateObject_3$2$1;var isArray$1=isArray$3;var toLength$1=toLength$a;var bind=functionBindContext;// `FlattenIntoArray` abstract operation
126368
126368
  // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
@@ -126373,7 +126373,7 @@ if(typeof C=='function'&&(C===Array||isArray(C.prototype)))C=undefined;else if(i
126373
126373
  // https://github.com/tc39/proposal-flatMap
126374
126374
  $$g({target:'Array',proto:true},{flatMap:function flatMap(callbackfn/* , thisArg */){var O=toObject(this);var sourceLen=toLength$b(O.length);var A;aFunction(callbackfn);A=arraySpeciesCreate(O,0);A.length=flattenIntoArray(A,O,O,sourceLen,0,1,callbackfn,arguments.length>1?arguments[1]:undefined);return A;}});// this method was added to unscopables after implementation
126375
126375
  // in popular engines, so it's moved to a separate module
126376
- var addToUnscopables=addToUnscopables$2;addToUnscopables('flatMap');gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=useRef$1();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsx$1(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsx$1(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxs(Options,{children:[props.allowSelection&&jsx$1(SelectedIconOption,{children:jsx$1(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsx$1(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsx$1(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsx$1(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?PersonaSize.size48:PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled.h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled(IconButton$1).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled.div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled.div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled.div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled(Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=css$2(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled(Link$4).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled.a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsx$1(Option,{children:status===WorkflowStatus.approved?jsx$1("img",{style:{width:'20px'},alt:""},void 0):jsx$1(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsx$1(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxs(Fragment,{children:[jsx$1(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsx$1(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsx$1(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled.div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled.div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled.div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled.div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled(EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsx$1(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsx$1(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled(CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled(PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1w||(templateObject_2$1w=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1w;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=useContext(AuthenticationContext).onRequestToken;return useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups};function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
126376
+ var addToUnscopables=addToUnscopables$2;addToUnscopables('flatMap');gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=useRef$1();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsx$1(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsx$1(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxs(Options,{children:[props.allowSelection&&jsx$1(SelectedIconOption,{children:jsx$1(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsx$1(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsx$1(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsx$1(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?PersonaSize.size48:PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled.h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled(IconButton$1).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled.div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled.div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled.div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled(Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=css$2(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled(Link$4).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled.a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsx$1(Option,{children:status===WorkflowStatus.approved?jsx$1("img",{style:{width:'20px'},alt:""},void 0):jsx$1(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsx$1(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxs(Fragment,{children:[jsx$1(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsx$1(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsx$1(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled.div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled.div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled.div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled.div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled(EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsx$1(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsx$1(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled(CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled(PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1w||(templateObject_2$1w=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1w;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=useContext(AuthenticationContext).onRequestToken;return useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups,translateContent:translateContent};function translateContent(itemId,translateFrom,translateTo){return api.all("editor/news/"+itemId+"/contents/"+translateFrom+"/translations?"+queryString.stringify({languages:translateTo})).getAll().then(function(response){return response.body(false);});}function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
126377
126377
  return null;});}function deletePermanently(type,ids){var itemIds=ids.join(',');return api.custom("editor/"+type+"/recyclebin?"+queryString.stringify({itemIds:itemIds})).delete();}function bulkSetStatus(type,items){return api.custom("editor/"+type).patch(items).then(function(response){return response.body().map(function(item){return item.data();});});}function setStatus(type,itemId,status,leaseId){return __awaiter(this,void 0,void 0,function(){var path,response,ex_1;return __generator(this,function(_a){switch(_a.label){case 0:path="editor/"+type+"/"+itemId+"/status";if(leaseId!=null){path+='?'+queryString.stringify({leaseId:leaseId});}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,api.custom(path).put(status)];case 2:response=_a.sent();return [2/*return*/,response.body().data()];case 3:ex_1=_a.sent();throw ex_1.response.statusCode===409?{account:ex_1.response.data}:ex_1;case 4:return [2/*return*/];}});});}function removeLease(itemId,leaseId){return api.custom("editor/"+itemId+"/lease?"+queryString.stringify({leaseId:leaseId})).delete();}function keepLeaseAlive(itemId,leaseId,token,subscriptionId){var _this=this;var expireLeaseToken=token;// every 10 seconds
126378
126378
  var timer=setInterval(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:// update the lease
126379
126379
  return [4/*yield*/,api.custom("editor/"+itemId+"/lease").put({leaseId:leaseId})];case 1:// update the lease
@@ -128116,7 +128116,7 @@ var StyledIcon$1 = _styled(Icon)(templateObject_9$1 || (templateObject_9$1 = __m
128116
128116
  var Intro = _styled.p(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n\n ", "\n"], ["\n margin: 0;\n padding: 0;\n\n ", "\n"])), LineClamp(6, fontSizeSmall, 1.2));
128117
128117
  var KeywordsAndFooter = _styled.div(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject$l(["\n margin-top: auto;\n"], ["\n margin-top: auto;\n"])));
128118
128118
  var Headline$1 = _styled.p(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject$l(["\n font-size: ", "px;\n line-height: 1.2;\n font-weight: bold;\n white-space: nowrap;\n margin-top: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n font-size: ", "px;\n line-height: 1.2;\n font-weight: bold;\n white-space: nowrap;\n margin-top: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), fontSizeSmall);
128119
- var StyledTitle = _styled(Title$6)(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject$l(["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"], ["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"])), fontSizeMedium * 1.2 * 3, LineClamp(3, fontSizeMedium, 1.2), fontSizeMedium - 2);
128119
+ var StyledTitle = _styled(Title$6)(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject$l(["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n z-index: 1;\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"], ["\n // info: this height calculation is required for the line-clamp\n // 1.2 refers to the line height, 3 refers to the number of lines\n height: ", "px;\n\n a {\n z-index: 1;\n display: inline-flex;\n }\n\n span {\n ", "\n }\n\n i[data-external-content] {\n line-height: ", "px; // fix icon alignment\n }\n"])), fontSizeMedium * 1.2 * 3, LineClamp(3, fontSizeMedium, 1.2), fontSizeMedium - 2);
128120
128120
  var KeywordsWrapper = _styled.div(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject$l(["\n font-size: ", "px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n text-decoration: underline;\n"], ["\n font-size: ", "px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n text-decoration: underline;\n"])), fontSizeSmall, function (p) {
128121
128121
  return p.theme.palette.neutralTertiary;
128122
128122
  });