@livetiles/reach-components-react 0.4.0-preview.213 → 0.4.0-preview.214

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.umd.js CHANGED
@@ -13575,14 +13575,14 @@
13575
13575
  return argument > 0 ? min$1$5(toInteger$2$6(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
13576
13576
  };
13577
13577
 
13578
- var toInteger$1$6 = toInteger$3$5;
13578
+ var toInteger$1$7 = toInteger$3$5;
13579
13579
  var max$7 = Math.max;
13580
13580
  var min$c = Math.min; // Helper for a popular repeating case of the spec:
13581
13581
  // Let integer be ? ToInteger(index).
13582
13582
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
13583
13583
 
13584
13584
  var toAbsoluteIndex$1$6 = function (index, length) {
13585
- var integer = toInteger$1$6(index);
13585
+ var integer = toInteger$1$7(index);
13586
13586
  return integer < 0 ? max$7(integer + length, 0) : min$c(integer, length);
13587
13587
  };
13588
13588
 
@@ -18622,13 +18622,13 @@
18622
18622
  return C === undefined || (S = anObject$2$6(C)[SPECIES$a]) == undefined ? defaultConstructor : aFunction$d(S);
18623
18623
  };
18624
18624
 
18625
- var toInteger$1$5 = toInteger$4$4;
18625
+ var toInteger$1$6 = toInteger$4$4;
18626
18626
  var requireObjectCoercible$3$4 = requireObjectCoercible$6$3; // `String.prototype.{ codePointAt, at }` methods implementation
18627
18627
 
18628
18628
  var createMethod$1$4 = function (CONVERT_TO_STRING) {
18629
18629
  return function ($this, pos) {
18630
18630
  var S = String(requireObjectCoercible$3$4($this));
18631
- var position = toInteger$1$5(pos);
18631
+ var position = toInteger$1$6(pos);
18632
18632
  var size = S.length;
18633
18633
  var first, second;
18634
18634
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -25372,12 +25372,12 @@
25372
25372
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$7 : ceil$4)(argument);
25373
25373
  };
25374
25374
 
25375
- var toInteger$1$4 = toInteger$2$4;
25375
+ var toInteger$1$5 = toInteger$2$4;
25376
25376
  var min$1$3 = Math.min; // `ToLength` abstract operation
25377
25377
  // https://tc39.github.io/ecma262/#sec-tolength
25378
25378
 
25379
25379
  var toLength$1$4 = function (argument) {
25380
- return argument > 0 ? min$1$3(toInteger$1$4(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
25380
+ return argument > 0 ? min$1$3(toInteger$1$5(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
25381
25381
  };
25382
25382
 
25383
25383
  var toInteger$9 = toInteger$2$4;
@@ -42031,14 +42031,14 @@
42031
42031
  return +value;
42032
42032
  };
42033
42033
 
42034
- var toInteger$1$3 = toInteger$4$3;
42034
+ var toInteger$1$4 = toInteger$4$3;
42035
42035
  var requireObjectCoercible$1$4 = requireObjectCoercible$4$3; // `String.prototype.repeat` method implementation
42036
42036
  // https://tc39.github.io/ecma262/#sec-string.prototype.repeat
42037
42037
 
42038
42038
  var stringRepeat = ''.repeat || function repeat(count) {
42039
42039
  var str = String(requireObjectCoercible$1$4(this));
42040
42040
  var result = '';
42041
- var n = toInteger$1$3(count);
42041
+ var n = toInteger$1$4(count);
42042
42042
  if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
42043
42043
 
42044
42044
  for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
@@ -53030,13 +53030,13 @@
53030
53030
  if (sham) createNonEnumerableProperty$b(RegExp.prototype[SYMBOL], 'sham', true);
53031
53031
  };
53032
53032
 
53033
- var toInteger$1$2 = toInteger$4$2;
53033
+ var toInteger$1$3 = toInteger$4$2;
53034
53034
  var requireObjectCoercible$5$2 = requireObjectCoercible$b$1; // `String.prototype.{ codePointAt, at }` methods implementation
53035
53035
 
53036
53036
  var createMethod$1$3 = function (CONVERT_TO_STRING) {
53037
53037
  return function ($this, pos) {
53038
53038
  var S = String(requireObjectCoercible$5$2($this));
53039
- var position = toInteger$1$2(pos);
53039
+ var position = toInteger$1$3(pos);
53040
53040
  var size = S.length;
53041
53041
  var first, second;
53042
53042
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -79399,13 +79399,13 @@
79399
79399
  return result === null ? -1 : result.index;
79400
79400
  }];
79401
79401
  });
79402
- var toInteger$1$1 = toInteger$4$1;
79402
+ var toInteger$1$2 = toInteger$4$1;
79403
79403
  var requireObjectCoercible$3$1 = requireObjectCoercible$9$1; // `String.prototype.{ codePointAt, at }` methods implementation
79404
79404
 
79405
79405
  var createMethod$1$2 = function (CONVERT_TO_STRING) {
79406
79406
  return function ($this, pos) {
79407
79407
  var S = String(requireObjectCoercible$3$1($this));
79408
- var position = toInteger$1$1(pos);
79408
+ var position = toInteger$1$2(pos);
79409
79409
  var size = S.length;
79410
79410
  var first, second;
79411
79411
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -81795,7 +81795,7 @@
81795
81795
  });
81796
81796
 
81797
81797
  var FabButtonStyle = function FabButtonStyle(useSecondaryBgColor) {
81798
- return _styled.css(templateObject_6$8$1 || (templateObject_6$8$1 = __makeTemplateObject$1(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ", "\n "], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ", "\n "])), useSecondaryBgColor ? _styled.css(templateObject_4$f$1 || (templateObject_4$f$1 = __makeTemplateObject$1(["\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), function (p) {
81798
+ return _styled.css(templateObject_6$8$2 || (templateObject_6$8$2 = __makeTemplateObject$1(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ", "\n "], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 50px;\n height: 50px;\n font-size: 20px;\n\n border-radius: 50%;\n box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);\n transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n margin-bottom: 15px;\n\n ", "\n "])), useSecondaryBgColor ? _styled.css(templateObject_4$f$1 || (templateObject_4$f$1 = __makeTemplateObject$1(["\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), function (p) {
81799
81799
  return p.theme.palette.themeSecondary;
81800
81800
  }, function (p) {
81801
81801
  return p.theme.textColors.onSecondary;
@@ -81838,7 +81838,7 @@
81838
81838
  componentId: "sc-1spkihm-4"
81839
81839
  })(templateObject_11$9 || (templateObject_11$9 = __makeTemplateObject$1(["\n && {\n margin-left: auto;\n }\n"], ["\n && {\n margin-left: auto;\n }\n"])));
81840
81840
 
81841
- var templateObject_1$Q$1, templateObject_2$x$1, templateObject_3$n$1, templateObject_4$f$1, templateObject_5$a$2, templateObject_6$8$1, templateObject_7$4$2, templateObject_8$4$2, templateObject_9$3$1, templateObject_10$e, templateObject_11$9;
81841
+ var templateObject_1$Q$1, templateObject_2$x$1, templateObject_3$n$1, templateObject_4$f$1, templateObject_5$a$2, templateObject_6$8$2, templateObject_7$4$2, templateObject_8$4$2, templateObject_9$3$1, templateObject_10$e, templateObject_11$9;
81842
81842
 
81843
81843
  var FormattedMessageWithStyle = function FormattedMessageWithStyle(_a) {
81844
81844
  var _b = _a.tagName,
@@ -87330,9 +87330,9 @@
87330
87330
  }), void 0);
87331
87331
  };
87332
87332
 
87333
- var version$1 = "0.4.0-preview.213";
87334
- var buildId = "98425";
87335
- var commitId = "6d396036bd492623ffe137482552016181434d4a";
87333
+ var version$1 = "0.4.0-preview.214";
87334
+ var buildId = "98439";
87335
+ var commitId = "ad77f8da3486968b39cc0db0275d8714a556de8d";
87336
87336
  var isCustomerBuild = false;
87337
87337
  var buildInfo = {
87338
87338
  version: version$1,
@@ -131146,8 +131146,8 @@
131146
131146
  // 21.2.5.9 RegExp.prototype[@@search](string)
131147
131147
  :function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$7=function(it){if(typeof it!='function'){throw TypeError(String(it)+' is not a function');}return it;};var anObject$d=anObject$h;var aFunction$6=aFunction$7;var wellKnownSymbol$h=wellKnownSymbol$l;var SPECIES$3=wellKnownSymbol$h('species');// `SpeciesConstructor` abstract operation
131148
131148
  // https://tc39.github.io/ecma262/#sec-speciesconstructor
131149
- var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$3])==undefined?defaultConstructor:aFunction$6(S);};var toInteger$1=toInteger$4;var requireObjectCoercible$9=requireObjectCoercible$c;// `String.prototype.{ codePointAt, at }` methods implementation
131150
- var createMethod$2=function(CONVERT_TO_STRING){return function($this,pos){var S=String(requireObjectCoercible$9($this));var position=toInteger$1(pos);var size=S.length;var first,second;if(position<0||position>=size)return CONVERT_TO_STRING?'':undefined;first=S.charCodeAt(position);return first<0xD800||first>0xDBFF||position+1===size||(second=S.charCodeAt(position+1))<0xDC00||second>0xDFFF?CONVERT_TO_STRING?S.charAt(position):first:CONVERT_TO_STRING?S.slice(position,position+2):(first-0xD800<<10)+(second-0xDC00)+0x10000;};};var stringMultibyte$1={// `String.prototype.codePointAt` method
131149
+ var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$3])==undefined?defaultConstructor:aFunction$6(S);};var toInteger$1$1=toInteger$4;var requireObjectCoercible$9=requireObjectCoercible$c;// `String.prototype.{ codePointAt, at }` methods implementation
131150
+ var createMethod$2=function(CONVERT_TO_STRING){return function($this,pos){var S=String(requireObjectCoercible$9($this));var position=toInteger$1$1(pos);var size=S.length;var first,second;if(position<0||position>=size)return CONVERT_TO_STRING?'':undefined;first=S.charCodeAt(position);return first<0xD800||first>0xDBFF||position+1===size||(second=S.charCodeAt(position+1))<0xDC00||second>0xDFFF?CONVERT_TO_STRING?S.charAt(position):first:CONVERT_TO_STRING?S.slice(position,position+2):(first-0xD800<<10)+(second-0xDC00)+0x10000;};};var stringMultibyte$1={// `String.prototype.codePointAt` method
131151
131151
  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
131152
131152
  codeAt:createMethod$2(false),// `String.prototype.at` method
131153
131153
  // https://github.com/mathiasbynens/String.prototype.at
@@ -131709,7 +131709,7 @@
131709
131709
  // we don't want to add the same node again, instead we just need to
131710
131710
  // append the children of the node
131711
131711
  // we also know then that we don't have to traverse the tree further up and can stop
131712
- 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__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$V;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 jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(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__default["default"](IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$U||(templateObject_1$U=__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$U;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=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(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):jsxRuntime.jsx(StyledIcon$3$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(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?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$p||(templateObject_3$p=__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&&_styled.css(templateObject_1$T||(templateObject_1$T=__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&&_styled.css(templateObject_2$z||(templateObject_2$z=__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 _styled.css(templateObject_6$8||(templateObject_6$8=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(templateObject_4$g||(templateObject_4$g=__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;}):_styled.css(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__default["default"](officeUiFabricReact.IconButton).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&&_styled.css(templateObject_7$5$1||(templateObject_7$5$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$3$1=_styled__default["default"](officeUiFabricReact.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=_styled.css(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&&_styled.css(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__default["default"](ReactRouterDom.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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"](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$T,templateObject_2$z,templateObject_3$p,templateObject_4$g,templateObject_5$e,templateObject_6$8,templateObject_7$5$1,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=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(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__default["default"](EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$S||(templateObject_1$S=__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__default["default"].div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&_styled.css(templateObject_2$y||(templateObject_2$y=__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__default["default"].ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$f||(templateObject_4$f=__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__default["default"].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__default["default"](PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$7$1||(templateObject_6$7$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$S,templateObject_2$y,templateObject_3$o,templateObject_4$f,templateObject_5$d,templateObject_6$7$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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$R||(templateObject_1$R=__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=_styled.createGlobalStyle(templateObject_2$x||(templateObject_2$x=__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$R,templateObject_2$x;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 keywordsAsString=keywords===null||keywords===void 0?void 0:keywords.join('-');var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywordsAsString]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsxRuntime.jsx(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsxRuntime.jsx(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
131712
+ 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__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$V;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 jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(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__default["default"](IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$U||(templateObject_1$U=__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$U;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=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(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):jsxRuntime.jsx(StyledIcon$3$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(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?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$p||(templateObject_3$p=__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&&_styled.css(templateObject_1$T||(templateObject_1$T=__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&&_styled.css(templateObject_2$z||(templateObject_2$z=__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 _styled.css(templateObject_6$8$1||(templateObject_6$8$1=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(templateObject_4$g||(templateObject_4$g=__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;}):_styled.css(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__default["default"](officeUiFabricReact.IconButton).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&&_styled.css(templateObject_7$5$1||(templateObject_7$5$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$3$1=_styled__default["default"](officeUiFabricReact.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=_styled.css(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&&_styled.css(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__default["default"](ReactRouterDom.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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"](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$T,templateObject_2$z,templateObject_3$p,templateObject_4$g,templateObject_5$e,templateObject_6$8$1,templateObject_7$5$1,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=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(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__default["default"](EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$S||(templateObject_1$S=__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__default["default"].div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&_styled.css(templateObject_2$y||(templateObject_2$y=__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__default["default"].ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$f||(templateObject_4$f=__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__default["default"].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__default["default"](PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$7$1||(templateObject_6$7$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$S,templateObject_2$y,templateObject_3$o,templateObject_4$f,templateObject_5$d,templateObject_6$7$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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$R||(templateObject_1$R=__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=_styled.createGlobalStyle(templateObject_2$x||(templateObject_2$x=__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$R,templateObject_2$x;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 keywordsAsString=keywords===null||keywords===void 0?void 0:keywords.join('-');var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywordsAsString]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsxRuntime.jsx(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsxRuntime.jsx(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
131713
131713
  // by default pages and documents should be shown
131714
131714
  // for this case the blockProps would be an empty object and
131715
131715
  // we need to set the showPages and showDocuments to true
@@ -132172,14 +132172,14 @@
132172
132172
  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
132173
132173
  };
132174
132174
 
132175
- var toInteger = toInteger$e;
132175
+ var toInteger$1 = toInteger$e;
132176
132176
  var requireObjectCoercible$2 = requireObjectCoercible$m;
132177
132177
 
132178
132178
  // `String.prototype.{ codePointAt, at }` methods implementation
132179
132179
  var createMethod$1 = function (CONVERT_TO_STRING) {
132180
132180
  return function ($this, pos) {
132181
132181
  var S = String(requireObjectCoercible$2($this));
132182
- var position = toInteger(pos);
132182
+ var position = toInteger$1(pos);
132183
132183
  var size = S.length;
132184
132184
  var first, second;
132185
132185
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -132807,7 +132807,7 @@
132807
132807
  var Intro$1 = _styled__default["default"].p.withConfig({
132808
132808
  displayName: "NewsCompactCard__Intro",
132809
132809
  componentId: "sc-16ovog0-4"
132810
- })(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n ", "\n"], ["\n margin: 0;\n padding: 0;\n ", "\n"])), TextStyle);
132810
+ })(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n ", "\n"], ["\n margin: 0;\n padding: 0;\n ", "\n"])), TextStyle);
132811
132811
 
132812
132812
  var Title$3 = _styled__default["default"].span.withConfig({
132813
132813
  displayName: "NewsCompactCard__Title",
@@ -132881,7 +132881,7 @@
132881
132881
  });
132882
132882
  });
132883
132883
 
132884
- var templateObject_1$j, templateObject_2$b, templateObject_3$b, templateObject_4$a, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$2, templateObject_16$1;
132884
+ var templateObject_1$j, templateObject_2$b, templateObject_3$b, templateObject_4$a, templateObject_5$9, templateObject_6$8, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$2, templateObject_16$1;
132885
132885
 
132886
132886
  var EmptyNewsList = function EmptyNewsList() {
132887
132887
  return jsxRuntime.jsxs(Host$b, {
@@ -133100,7 +133100,7 @@
133100
133100
  var StyledIcon$2 = _styled__default["default"](officeUiFabricReact.Icon).withConfig({
133101
133101
  displayName: "NewsList__StyledIcon",
133102
133102
  componentId: "sc-1d0bzx1-4"
133103
- })(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
133103
+ })(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
133104
133104
  return p.highlight && unreadCommentHighlight;
133105
133105
  });
133106
133106
 
@@ -133116,7 +133116,7 @@
133116
133116
  return p.theme.palette.red;
133117
133117
  }, spacingM);
133118
133118
 
133119
- var templateObject_1$h, templateObject_2$9, templateObject_3$9, templateObject_4$9, templateObject_5$8, templateObject_6$6, templateObject_7$4, templateObject_8$3;
133119
+ var templateObject_1$h, templateObject_2$9, templateObject_3$9, templateObject_4$9, templateObject_5$8, templateObject_6$7, templateObject_7$4, templateObject_8$3;
133120
133120
 
133121
133121
  var ManageChannels = function ManageChannels(_a) {
133122
133122
  var className = _a.className;
@@ -133341,7 +133341,7 @@
133341
133341
  var NotificationButton = _styled__default["default"].div.withConfig({
133342
133342
  displayName: "ManageChannels__NotificationButton",
133343
133343
  componentId: "sc-yyoxfw-5"
133344
- })(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject$l(["\n margin-left: auto;\n align-self: flex-start;\n"], ["\n margin-left: auto;\n align-self: flex-start;\n"])));
133344
+ })(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject$l(["\n margin-left: auto;\n align-self: flex-start;\n"], ["\n margin-left: auto;\n align-self: flex-start;\n"])));
133345
133345
 
133346
133346
  var ChannelToggle = _styled__default["default"](ToggleWithLabel).withConfig({
133347
133347
  displayName: "ManageChannels__ChannelToggle",
@@ -133355,7 +133355,7 @@
133355
133355
  return p.theme.textColors.default;
133356
133356
  });
133357
133357
 
133358
- var templateObject_1$g, templateObject_2$8, templateObject_3$8, templateObject_4$8, templateObject_5$7, templateObject_6$5, templateObject_7$3, templateObject_8$2;
133358
+ var templateObject_1$g, templateObject_2$8, templateObject_3$8, templateObject_4$8, templateObject_5$7, templateObject_6$6, templateObject_7$3, templateObject_8$2;
133359
133359
 
133360
133360
  var NewsGridCard = function NewsGridCard(_a) {
133361
133361
  var _b;
@@ -133474,7 +133474,7 @@
133474
133474
  return p.theme.palette.white;
133475
133475
  });
133476
133476
  var MetaInfo = _styled__default["default"].div(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
133477
- var DateAndIcon = _styled__default["default"].div(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject$l(["\n display: flex;\n"], ["\n display: flex;\n"])));
133477
+ var DateAndIcon = _styled__default["default"].div(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject$l(["\n display: flex;\n"], ["\n display: flex;\n"])));
133478
133478
  var PublishingDate = _styled__default["default"](DateTime)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject$l(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-self: center;\n"], ["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-self: center;\n"])));
133479
133479
  var NewsCardIcon = _styled__default["default"].div(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject$l(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"], ["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));
133480
133480
  var StyledIcon$1 = _styled__default["default"](officeUiFabricReact.Icon)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject$l(["\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) {
@@ -133490,7 +133490,7 @@
133490
133490
  return p.theme.palette.neutralTertiary;
133491
133491
  });
133492
133492
  var StyledChannels$1 = _styled__default["default"](ChannelList$1)(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject$l(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacingS, spacingM);
133493
- var templateObject_1$f, templateObject_2$7, templateObject_3$7, templateObject_4$7, templateObject_5$6, templateObject_6$4, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1;
133493
+ var templateObject_1$f, templateObject_2$7, templateObject_3$7, templateObject_4$7, templateObject_5$6, templateObject_6$5, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1;
133494
133494
 
133495
133495
  var ErrorContainer = function ErrorContainer() {
133496
133496
  return jsxRuntime.jsx(Host$7, {
@@ -133761,7 +133761,7 @@
133761
133761
  }, function (p) {
133762
133762
  return p.showBorder && _styled.css(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject$l(["\n border: 1px solid ", ";\n box-sizing: border-box;\n "], ["\n border: 1px solid ", ";\n box-sizing: border-box;\n "])), p.theme.palette.neutralTertiaryAlt);
133763
133763
  }, function (p) {
133764
- return p.applyOverlay && _styled.css(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject$l(["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "], ["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "])));
133764
+ return p.applyOverlay && _styled.css(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject$l(["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "], ["\n background-color: rgba(0, 0, 0, 0.33);\n\n .bannerImage {\n z-index: -1;\n }\n "])));
133765
133765
  });
133766
133766
 
133767
133767
  var Content = _styled__default["default"].div.withConfig({
@@ -133875,7 +133875,7 @@
133875
133875
  return p.color ? _styled.css(templateObject_31 || (templateObject_31 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : _styled.css(templateObject_32 || (templateObject_32 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
133876
133876
  });
133877
133877
 
133878
- var templateObject_1$c, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$4, templateObject_6$3, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33;
133878
+ var templateObject_1$c, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$4, templateObject_6$4, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33;
133879
133879
 
133880
133880
  var HeroPaging = function HeroPaging(_a) {
133881
133881
  var items = _a.items,
@@ -134023,9 +134023,9 @@
134023
134023
  var PagingArrow = _styled__default["default"](IconButton).withConfig({
134024
134024
  displayName: "HeroPaging__PagingArrow",
134025
134025
  componentId: "sc-1y3j8qb-4"
134026
- })(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$l(["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"], ["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"])));
134026
+ })(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject$l(["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"], ["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"])));
134027
134027
 
134028
- var templateObject_1$b, templateObject_2$4, templateObject_3$4, templateObject_4$4, templateObject_5$3, templateObject_6$2;
134028
+ var templateObject_1$b, templateObject_2$4, templateObject_3$4, templateObject_4$4, templateObject_5$3, templateObject_6$3;
134029
134029
 
134030
134030
  var Hero = function Hero(_a) {
134031
134031
  var items = _a.items,
@@ -134688,9 +134688,9 @@
134688
134688
  var StyledNewArticleButton = _styled__default["default"](NewArticleButton).withConfig({
134689
134689
  displayName: "NewsEditorDashboard__StyledNewArticleButton",
134690
134690
  componentId: "sc-vv9dzu-4"
134691
- })(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n align-self: flex-start;\n"], ["\n margin-bottom: ", "px;\n align-self: flex-start;\n"])), spacingXs);
134691
+ })(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n align-self: flex-start;\n"], ["\n margin-bottom: ", "px;\n align-self: flex-start;\n"])), spacingXs);
134692
134692
 
134693
- var templateObject_1$5, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$1;
134693
+ var templateObject_1$5, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$2;
134694
134694
 
134695
134695
  // NOTE: This component exists in this project and not in the ui/common/toolbar because it uses DetailViewContext placed in feature/content/
134696
134696
  // Also a generic component `ToolbarLanguageSelector` in ui/common/toolbar complicates the flow and requires some code duplication
@@ -135064,14 +135064,420 @@
135064
135064
  var ClearFilterButton$1 = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
135065
135065
  displayName: "ChannelFilter__ClearFilterButton",
135066
135066
  componentId: "sc-1ju8xwz-5"
135067
- })(templateObject_6 || (templateObject_6 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
135067
+ })(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
135068
135068
 
135069
135069
  var StyledTextField = _styled__default["default"](officeUiFabricReact.TextField).withConfig({
135070
135070
  displayName: "ChannelFilter__StyledTextField",
135071
135071
  componentId: "sc-1ju8xwz-6"
135072
135072
  })(templateObject_7 || (templateObject_7 = __makeTemplateObject$l(["\n padding-bottom: ", "px;\n"], ["\n padding-bottom: ", "px;\n"])), spacingS);
135073
135073
 
135074
- var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6, templateObject_7;
135074
+ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7;
135075
+
135076
+ function toInteger(dirtyNumber) {
135077
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
135078
+ return NaN;
135079
+ }
135080
+
135081
+ var number = Number(dirtyNumber);
135082
+
135083
+ if (isNaN(number)) {
135084
+ return number;
135085
+ }
135086
+
135087
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
135088
+ }
135089
+
135090
+ function requiredArgs(required, args) {
135091
+ if (args.length < required) {
135092
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
135093
+ }
135094
+ }
135095
+
135096
+ /**
135097
+ * @name toDate
135098
+ * @category Common Helpers
135099
+ * @summary Convert the given argument to an instance of Date.
135100
+ *
135101
+ * @description
135102
+ * Convert the given argument to an instance of Date.
135103
+ *
135104
+ * If the argument is an instance of Date, the function returns its clone.
135105
+ *
135106
+ * If the argument is a number, it is treated as a timestamp.
135107
+ *
135108
+ * If the argument is none of the above, the function returns Invalid Date.
135109
+ *
135110
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
135111
+ *
135112
+ * @param {Date|Number} argument - the value to convert
135113
+ * @returns {Date} the parsed date in the local time zone
135114
+ * @throws {TypeError} 1 argument required
135115
+ *
135116
+ * @example
135117
+ * // Clone the date:
135118
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
135119
+ * //=> Tue Feb 11 2014 11:30:30
135120
+ *
135121
+ * @example
135122
+ * // Convert the timestamp to date:
135123
+ * const result = toDate(1392098430000)
135124
+ * //=> Tue Feb 11 2014 11:30:30
135125
+ */
135126
+
135127
+ function toDate(argument) {
135128
+ requiredArgs(1, arguments);
135129
+ var argStr = Object.prototype.toString.call(argument); // Clone the date
135130
+
135131
+ if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
135132
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
135133
+ return new Date(argument.getTime());
135134
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
135135
+ return new Date(argument);
135136
+ } else {
135137
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
135138
+ // eslint-disable-next-line no-console
135139
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
135140
+
135141
+ console.warn(new Error().stack);
135142
+ }
135143
+
135144
+ return new Date(NaN);
135145
+ }
135146
+ }
135147
+
135148
+ /**
135149
+ * @name addDays
135150
+ * @category Day Helpers
135151
+ * @summary Add the specified number of days to the given date.
135152
+ *
135153
+ * @description
135154
+ * Add the specified number of days to the given date.
135155
+ *
135156
+ * ### v2.0.0 breaking changes:
135157
+ *
135158
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135159
+ *
135160
+ * @param {Date|Number} date - the date to be changed
135161
+ * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
135162
+ * @returns {Date} - the new date with the days added
135163
+ * @throws {TypeError} - 2 arguments required
135164
+ *
135165
+ * @example
135166
+ * // Add 10 days to 1 September 2014:
135167
+ * const result = addDays(new Date(2014, 8, 1), 10)
135168
+ * //=> Thu Sep 11 2014 00:00:00
135169
+ */
135170
+
135171
+ function addDays(dirtyDate, dirtyAmount) {
135172
+ requiredArgs(2, arguments);
135173
+ var date = toDate(dirtyDate);
135174
+ var amount = toInteger(dirtyAmount);
135175
+
135176
+ if (isNaN(amount)) {
135177
+ return new Date(NaN);
135178
+ }
135179
+
135180
+ if (!amount) {
135181
+ // If 0 days, no-op to avoid changing times in the hour before end of DST
135182
+ return date;
135183
+ }
135184
+
135185
+ date.setDate(date.getDate() + amount);
135186
+ return date;
135187
+ }
135188
+
135189
+ /**
135190
+ * @name addMonths
135191
+ * @category Month Helpers
135192
+ * @summary Add the specified number of months to the given date.
135193
+ *
135194
+ * @description
135195
+ * Add the specified number of months to the given date.
135196
+ *
135197
+ * ### v2.0.0 breaking changes:
135198
+ *
135199
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135200
+ *
135201
+ * @param {Date|Number} date - the date to be changed
135202
+ * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
135203
+ * @returns {Date} the new date with the months added
135204
+ * @throws {TypeError} 2 arguments required
135205
+ *
135206
+ * @example
135207
+ * // Add 5 months to 1 September 2014:
135208
+ * const result = addMonths(new Date(2014, 8, 1), 5)
135209
+ * //=> Sun Feb 01 2015 00:00:00
135210
+ */
135211
+
135212
+ function addMonths(dirtyDate, dirtyAmount) {
135213
+ requiredArgs(2, arguments);
135214
+ var date = toDate(dirtyDate);
135215
+ var amount = toInteger(dirtyAmount);
135216
+
135217
+ if (isNaN(amount)) {
135218
+ return new Date(NaN);
135219
+ }
135220
+
135221
+ if (!amount) {
135222
+ // If 0 months, no-op to avoid changing times in the hour before end of DST
135223
+ return date;
135224
+ }
135225
+
135226
+ var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for
135227
+ // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
135228
+ // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
135229
+ // want except that dates will wrap around the end of a month, meaning that
135230
+ // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
135231
+ // we'll default to the end of the desired month by adding 1 to the desired
135232
+ // month and using a date of 0 to back up one day to the end of the desired
135233
+ // month.
135234
+
135235
+ var endOfDesiredMonth = new Date(date.getTime());
135236
+ endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
135237
+ var daysInMonth = endOfDesiredMonth.getDate();
135238
+
135239
+ if (dayOfMonth >= daysInMonth) {
135240
+ // If we're already at the end of the month, then this is the correct date
135241
+ // and we're done.
135242
+ return endOfDesiredMonth;
135243
+ } else {
135244
+ // Otherwise, we now know that setting the original day-of-month value won't
135245
+ // cause an overflow, so set the desired day-of-month. Note that we can't
135246
+ // just set the date of `endOfDesiredMonth` because that object may have had
135247
+ // its time changed in the unusual case where where a DST transition was on
135248
+ // the last day of the month and its local time was in the hour skipped or
135249
+ // repeated next to a DST transition. So we use `date` instead which is
135250
+ // guaranteed to still have the original time.
135251
+ date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
135252
+ return date;
135253
+ }
135254
+ }
135255
+
135256
+ /**
135257
+ * @name startOfWeek
135258
+ * @category Week Helpers
135259
+ * @summary Return the start of a week for the given date.
135260
+ *
135261
+ * @description
135262
+ * Return the start of a week for the given date.
135263
+ * The result will be in the local timezone.
135264
+ *
135265
+ * ### v2.0.0 breaking changes:
135266
+ *
135267
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135268
+ *
135269
+ * @param {Date|Number} date - the original date
135270
+ * @param {Object} [options] - an object with options.
135271
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
135272
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
135273
+ * @returns {Date} the start of a week
135274
+ * @throws {TypeError} 1 argument required
135275
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
135276
+ *
135277
+ * @example
135278
+ * // The start of a week for 2 September 2014 11:55:00:
135279
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
135280
+ * //=> Sun Aug 31 2014 00:00:00
135281
+ *
135282
+ * @example
135283
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
135284
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
135285
+ * //=> Mon Sep 01 2014 00:00:00
135286
+ */
135287
+
135288
+ function startOfWeek(dirtyDate, dirtyOptions) {
135289
+ requiredArgs(1, arguments);
135290
+ var options = dirtyOptions || {};
135291
+ var locale = options.locale;
135292
+ var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;
135293
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
135294
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
135295
+
135296
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
135297
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
135298
+ }
135299
+
135300
+ var date = toDate(dirtyDate);
135301
+ var day = date.getDay();
135302
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
135303
+ date.setDate(date.getDate() - diff);
135304
+ date.setHours(0, 0, 0, 0);
135305
+ return date;
135306
+ }
135307
+
135308
+ /**
135309
+ * @name startOfDay
135310
+ * @category Day Helpers
135311
+ * @summary Return the start of a day for the given date.
135312
+ *
135313
+ * @description
135314
+ * Return the start of a day for the given date.
135315
+ * The result will be in the local timezone.
135316
+ *
135317
+ * ### v2.0.0 breaking changes:
135318
+ *
135319
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135320
+ *
135321
+ * @param {Date|Number} date - the original date
135322
+ * @returns {Date} the start of a day
135323
+ * @throws {TypeError} 1 argument required
135324
+ *
135325
+ * @example
135326
+ * // The start of a day for 2 September 2014 11:55:00:
135327
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
135328
+ * //=> Tue Sep 02 2014 00:00:00
135329
+ */
135330
+
135331
+ function startOfDay(dirtyDate) {
135332
+ requiredArgs(1, arguments);
135333
+ var date = toDate(dirtyDate);
135334
+ date.setHours(0, 0, 0, 0);
135335
+ return date;
135336
+ }
135337
+
135338
+ /**
135339
+ * @name endOfDay
135340
+ * @category Day Helpers
135341
+ * @summary Return the end of a day for the given date.
135342
+ *
135343
+ * @description
135344
+ * Return the end of a day for the given date.
135345
+ * The result will be in the local timezone.
135346
+ *
135347
+ * ### v2.0.0 breaking changes:
135348
+ *
135349
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135350
+ *
135351
+ * @param {Date|Number} date - the original date
135352
+ * @returns {Date} the end of a day
135353
+ * @throws {TypeError} 1 argument required
135354
+ *
135355
+ * @example
135356
+ * // The end of a day for 2 September 2014 11:55:00:
135357
+ * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
135358
+ * //=> Tue Sep 02 2014 23:59:59.999
135359
+ */
135360
+
135361
+ function endOfDay(dirtyDate) {
135362
+ requiredArgs(1, arguments);
135363
+ var date = toDate(dirtyDate);
135364
+ date.setHours(23, 59, 59, 999);
135365
+ return date;
135366
+ }
135367
+
135368
+ /**
135369
+ * @name endOfMonth
135370
+ * @category Month Helpers
135371
+ * @summary Return the end of a month for the given date.
135372
+ *
135373
+ * @description
135374
+ * Return the end of a month for the given date.
135375
+ * The result will be in the local timezone.
135376
+ *
135377
+ * ### v2.0.0 breaking changes:
135378
+ *
135379
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135380
+ *
135381
+ * @param {Date|Number} date - the original date
135382
+ * @returns {Date} the end of a month
135383
+ * @throws {TypeError} 1 argument required
135384
+ *
135385
+ * @example
135386
+ * // The end of a month for 2 September 2014 11:55:00:
135387
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
135388
+ * //=> Tue Sep 30 2014 23:59:59.999
135389
+ */
135390
+
135391
+ function endOfMonth(dirtyDate) {
135392
+ requiredArgs(1, arguments);
135393
+ var date = toDate(dirtyDate);
135394
+ var month = date.getMonth();
135395
+ date.setFullYear(date.getFullYear(), month + 1, 0);
135396
+ date.setHours(23, 59, 59, 999);
135397
+ return date;
135398
+ }
135399
+
135400
+ /**
135401
+ * @name startOfMonth
135402
+ * @category Month Helpers
135403
+ * @summary Return the start of a month for the given date.
135404
+ *
135405
+ * @description
135406
+ * Return the start of a month for the given date.
135407
+ * The result will be in the local timezone.
135408
+ *
135409
+ * ### v2.0.0 breaking changes:
135410
+ *
135411
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135412
+ *
135413
+ * @param {Date|Number} date - the original date
135414
+ * @returns {Date} the start of a month
135415
+ * @throws {TypeError} 1 argument required
135416
+ *
135417
+ * @example
135418
+ * // The start of a month for 2 September 2014 11:55:00:
135419
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
135420
+ * //=> Mon Sep 01 2014 00:00:00
135421
+ */
135422
+
135423
+ function startOfMonth(dirtyDate) {
135424
+ requiredArgs(1, arguments);
135425
+ var date = toDate(dirtyDate);
135426
+ date.setDate(1);
135427
+ date.setHours(0, 0, 0, 0);
135428
+ return date;
135429
+ }
135430
+
135431
+ /**
135432
+ * @name endOfWeek
135433
+ * @category Week Helpers
135434
+ * @summary Return the end of a week for the given date.
135435
+ *
135436
+ * @description
135437
+ * Return the end of a week for the given date.
135438
+ * The result will be in the local timezone.
135439
+ *
135440
+ * ### v2.0.0 breaking changes:
135441
+ *
135442
+ * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
135443
+ *
135444
+ * @param {Date|Number} date - the original date
135445
+ * @param {Object} [options] - an object with options.
135446
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
135447
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
135448
+ * @returns {Date} the end of a week
135449
+ * @throws {TypeError} 1 argument required
135450
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
135451
+ *
135452
+ * @example
135453
+ * // The end of a week for 2 September 2014 11:55:00:
135454
+ * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))
135455
+ * //=> Sat Sep 06 2014 23:59:59.999
135456
+ *
135457
+ * @example
135458
+ * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:
135459
+ * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
135460
+ * //=> Sun Sep 07 2014 23:59:59.999
135461
+ */
135462
+ function endOfWeek(dirtyDate, dirtyOptions) {
135463
+ requiredArgs(1, arguments);
135464
+ var options = dirtyOptions || {};
135465
+ var locale = options.locale;
135466
+ var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;
135467
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
135468
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
135469
+
135470
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
135471
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
135472
+ }
135473
+
135474
+ var date = toDate(dirtyDate);
135475
+ var day = date.getDay();
135476
+ var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
135477
+ date.setDate(date.getDate() + diff);
135478
+ date.setHours(23, 59, 59, 999);
135479
+ return date;
135480
+ }
135075
135481
 
135076
135482
  var PublishingDateFilter = function PublishingDateFilter() {
135077
135483
  var publishingDateRef = React$d.useRef();
@@ -135085,6 +135491,9 @@
135085
135491
  showDates = _b[0],
135086
135492
  setShowDates = _b[1];
135087
135493
 
135494
+ var today = new Date();
135495
+ var startOfToday = startOfDay(today);
135496
+ var endOfToday = endOfDay(today);
135088
135497
  return jsxRuntime.jsxs("div", __assign$g({
135089
135498
  ref: publishingDateRef
135090
135499
  }, {
@@ -135122,7 +135531,7 @@
135122
135531
  noDateResourceKey: "MetadataEditor.noDate",
135123
135532
  selectDateResourceKey: "FilterPanel.publishingDatePlaceholder",
135124
135533
  onChanged: handleStartDateChange,
135125
- maxDate: filter === null || filter === void 0 ? void 0 : filter.beforeDate
135534
+ maxDate: (filter === null || filter === void 0 ? void 0 : filter.beforeDate) || today.toString()
135126
135535
  }, void 0), jsxRuntime.jsx(StyledDateTimePicker, {
135127
135536
  label: formatMessage({
135128
135537
  id: 'FilterPanel.publishingDateTo'
@@ -135132,7 +135541,52 @@
135132
135541
  noDateResourceKey: "MetadataEditor.noDate",
135133
135542
  selectDateResourceKey: "FilterPanel.publishingDatePlaceholder",
135134
135543
  onChanged: handleEndDateChange,
135135
- minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate
135544
+ minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate,
135545
+ maxDate: today.toString()
135546
+ }, void 0), jsxRuntime.jsxs(DateShortcuts, {
135547
+ children: [jsxRuntime.jsx(FormattedMessage$1, {
135548
+ id: "FilterPanel.publishingDateShortcuts"
135549
+ }, void 0), jsxRuntime.jsx(DateShortcutButton, {
135550
+ onClick: function () {
135551
+ onChange(__assign$g(__assign$g({}, filter), {
135552
+ afterDate: addDays(startOfToday, -1),
135553
+ beforeDate: addDays(endOfToday, -1)
135554
+ }));
135555
+ },
135556
+ label: "FilterPanel.publishingDateShortcuts.yesterday"
135557
+ }, void 0), jsxRuntime.jsx(DateShortcutButton, {
135558
+ onClick: function () {
135559
+ onChange(__assign$g(__assign$g({}, filter), {
135560
+ afterDate: startOfWeek(startOfToday, {
135561
+ weekStartsOn: 1
135562
+ }),
135563
+ beforeDate: endOfWeek(endOfToday, {
135564
+ weekStartsOn: 1
135565
+ })
135566
+ }));
135567
+ },
135568
+ label: "FilterPanel.publishingDateShortcuts.thisWeek"
135569
+ }, void 0), jsxRuntime.jsx(DateShortcutButton, {
135570
+ onClick: function () {
135571
+ onChange(__assign$g(__assign$g({}, filter), {
135572
+ afterDate: startOfWeek(addDays(startOfToday, -7), {
135573
+ weekStartsOn: 1
135574
+ }),
135575
+ beforeDate: endOfWeek(addDays(endOfToday, -7), {
135576
+ weekStartsOn: 1
135577
+ })
135578
+ }));
135579
+ },
135580
+ label: "FilterPanel.publishingDateShortcuts.lastWeek"
135581
+ }, void 0), jsxRuntime.jsx(DateShortcutButton, {
135582
+ onClick: function () {
135583
+ onChange(__assign$g(__assign$g({}, filter), {
135584
+ afterDate: startOfMonth(addMonths(startOfToday, -1)),
135585
+ beforeDate: endOfMonth(addMonths(endOfToday, -1))
135586
+ }));
135587
+ },
135588
+ label: "FilterPanel.publishingDateShortcuts.lastMonth"
135589
+ }, void 0)]
135136
135590
  }, void 0), jsxRuntime.jsx(ClearFilterButton, {
135137
135591
  text: "Clear filter",
135138
135592
  iconProps: {
@@ -135164,6 +135618,22 @@
135164
135618
  }
135165
135619
  };
135166
135620
 
135621
+ var DateShortcutButton = function DateShortcutButton(_a) {
135622
+ var onClick = _a.onClick,
135623
+ label = _a.label;
135624
+ var formatMessage = useIntl().formatMessage;
135625
+ return jsxRuntime.jsx(ActionButton, __assign$g({
135626
+ iconProps: {
135627
+ iconName: 'Calendar'
135628
+ },
135629
+ onClick: onClick
135630
+ }, {
135631
+ children: formatMessage({
135632
+ id: label
135633
+ })
135634
+ }), void 0);
135635
+ };
135636
+
135167
135637
  var Host = _styled__default["default"].div.withConfig({
135168
135638
  displayName: "PublishingDateFilter__Host",
135169
135639
  componentId: "sc-zv88cu-0"
@@ -135172,7 +135642,7 @@
135172
135642
  var DateButton = _styled__default["default"](ActionButton).withConfig({
135173
135643
  displayName: "PublishingDateFilter__DateButton",
135174
135644
  componentId: "sc-zv88cu-1"
135175
- })(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", ";\n i {\n order: 1;\n }\n"], ["\n ", ";\n i {\n order: 1;\n }\n"])), function (p) {
135645
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
135176
135646
  return p.isActive && _styled.css(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
135177
135647
  });
135178
135648
 
@@ -135186,7 +135656,14 @@
135186
135656
  componentId: "sc-zv88cu-3"
135187
135657
  })(templateObject_5 || (templateObject_5 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingS);
135188
135658
 
135189
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
135659
+ var DateShortcuts = _styled__default["default"].div.withConfig({
135660
+ displayName: "PublishingDateFilter__DateShortcuts",
135661
+ componentId: "sc-zv88cu-4"
135662
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject$l(["\n margin: ", "px 0;\n display: flex;\n flex-direction: column;\n\n button {\n height: ", "px;\n padding-left: 0;\n .ms-Button-label {\n color: ", ";\n font-weight: bold;\n }\n i {\n margin-left: 0;\n }\n }\n"], ["\n margin: ", "px 0;\n display: flex;\n flex-direction: column;\n\n button {\n height: ", "px;\n padding-left: 0;\n .ms-Button-label {\n color: ", ";\n font-weight: bold;\n }\n i {\n margin-left: 0;\n }\n }\n"])), spacingS, spacingL, function (p) {
135663
+ return p.theme.palette.themePrimary;
135664
+ });
135665
+
135666
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
135190
135667
 
135191
135668
  /* @generated */
135192
135669
  // prettier-ignore
@@ -151971,6 +152448,11 @@
151971
152448
  "FilterPanel.publishingDateFrom": "From",
151972
152449
  "FilterPanel.publishingDateTo": "To",
151973
152450
  "FilterPanel.publishingDatePlaceholder": "Date",
152451
+ "FilterPanel.publishingDateShortcuts": "Date range shortcuts",
152452
+ "FilterPanel.publishingDateShortcuts.yesterday": "Yesterday",
152453
+ "FilterPanel.publishingDateShortcuts.thisWeek": "This week",
152454
+ "FilterPanel.publishingDateShortcuts.lastWeek": "Last week",
152455
+ "FilterPanel.publishingDateShortcuts.lastMonth": "Last month",
151974
152456
  "FilterPanel.itemType": "Items",
151975
152457
  "Themes.title": "Color Theme",
151976
152458
  "Themes.selectorDescription": "Select a color theme for LiveTiles Reach.",