text: webpackJsonp8be81a5c_af38_4bb2_af97_afa3b64dfbed_1_4_1([2],{
  
  /***/ 134:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var office_ui_fabric_react_1 = __webpack_require__(2);
  var React = __webpack_require__(1);
  var sp_core_library_1 = __webpack_require__(5);
  var screenReaderAlert_1 = __webpack_require__(387);
  var PagePickerSearch_1 = __webpack_require__(454);
  var Strings_resx_1 = __webpack_require__(380);
  var PagePickerComponent_module_scss_1 = __webpack_require__(391);
  var VALIDATE_URL_DELAY_IN_MILLISECONDS = 1000;
  var DEFAULT_URL = 'https://';
  var NOT_EMPTY_REG_EXP = /\S/;
  var URL_REG_EXP = new RegExp('((^https?:\/\/)|(^ftp:\/\/)|(^file:\/\/)|(^mailto:)|(^news:)|(^pnm:\/\/)|(^mms:\/\/)|(^\/)|(^#)|(^\\\\)).+', 'i');
  var PagePickerComponent = (function (_super) {
      __extends(PagePickerComponent, _super);
      function PagePickerComponent(props) {
          var _this = _super.call(this, props) || this;
          _this.state = {
              isEditing: false,
              isJustOpened: true,
              isOpen: false,
              isTitleUserInput: false,
              linkTitle: '',
              linkUrl: '',
              shouldOpenLinkInNewTab: false,
              urlTextFieldError: ''
          };
          _this._dialogAriaDescriptionId = "page-picker-description-" + Math.random().toString();
          _this._validateUrl =
              _this._async.debounce(_this._validateUrl, VALIDATE_URL_DELAY_IN_MILLISECONDS);
          _this._handleSave = _this._handleSave.bind(_this);
          _this._handleCancel = _this._handleCancel.bind(_this);
          _this._handleUnlink = _this._handleUnlink.bind(_this);
          return _this;
      }
      PagePickerComponent._getUrlErrorMessage = function (url) {
          return !URL_REG_EXP.test(url) ? Strings_resx_1.default.UrlTextFieldError : '';
      };
      PagePickerComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
          if (!prevState.isOpen && this.state.isOpen) {
              this._getFocusBackFromCKEditor();
          }
      };
      PagePickerComponent.prototype.render = function () {
          var containerClassName = office_ui_fabric_react_1.css(PagePickerComponent_module_scss_1.default.linkDialogContainer, (_a = {},
              _a[PagePickerComponent_module_scss_1.default.isCompact] = this.props.compact,
              _a));
          var isSaveButtonDisabled = !URL_REG_EXP.test(this.state.linkUrl);
          var subtitleAriaId = !this.props.compact ? this._dialogAriaDescriptionId : '';
          var screenReaderAlert = '';
          if (!this.state.isJustOpened) {
              screenReaderAlert = isSaveButtonDisabled
                  ? Strings_resx_1.default.SaveButtonDisabledScreenReaderAlert
                  : Strings_resx_1.default.SaveButtonEnabledScreenReaderAlert;
          }
          return (React.createElement(office_ui_fabric_react_1.Dialog, { dialogContentProps: {
                  title: Strings_resx_1.default.DialogTitle,
                  type: office_ui_fabric_react_1.DialogType.normal
              }, hidden: !this.state.isOpen, modalProps: {
                  containerClassName: containerClassName,
                  isBlocking: true,
                  onLayerDidMount: this._renderSuggestionsAfterOpen,
                  subtitleAriaId: subtitleAriaId
              }, onDismiss: this._handleCancel, elementToFocusOnDismiss: this.props.elementToFocusOnDismiss },
              subtitleAriaId &&
                  React.createElement("p", { className: PagePickerComponent_module_scss_1.default.screenReaderOnly, id: subtitleAriaId }, Strings_resx_1.default.DialogAriaDescription),
              React.createElement(screenReaderAlert_1.ScreenReaderAlert, { message: screenReaderAlert }),
              React.createElement(office_ui_fabric_react_1.TextField, { ariaLabel: Strings_resx_1.default.UrlTextFieldAriaLabel, className: PagePickerComponent_module_scss_1.default.linkDialogInput, componentRef: this._resolveRef('_urlTextField'), "data-automation-id": 'pagePickerUrlTextField', errorMessage: !this.state.isJustOpened ? this.state.urlTextFieldError : '', label: Strings_resx_1.default.UrlTextFieldLabel, onChanged: this._handleLinkUrlChanged, onKeyDown: this._handleKeyDown, value: this.state.linkUrl }),
              React.createElement(office_ui_fabric_react_1.TextField, { className: PagePickerComponent_module_scss_1.default.linkDialogInput, "data-automation-id": 'pagePickerTitleTextField', label: Strings_resx_1.default.TitleTextFieldLabel, onChanged: this._handleLinkTitleChanged, onKeyDown: this._handleKeyDown, value: this.state.linkTitle }),
              !this.props.compact &&
                  React.createElement(PagePickerSearch_1.default, { serviceScope: this.props.serviceScope, onSuggestionSelect: this._handleSuggestionSelect, ref: this._resolveRef('_pagePickerSearch') }),
              !this.props.compact &&
                  React.createElement(office_ui_fabric_react_1.Checkbox, { "data-automation-id": 'pagePickerOpenLinkInNewTabCheckbox', checked: this.state.shouldOpenLinkInNewTab, className: PagePickerComponent_module_scss_1.default.openLinkInNewTabCheckbox, label: Strings_resx_1.default.OpenLinkInNewTabLabel, onChange: this._handleCheckBoxChange }),
              React.createElement(office_ui_fabric_react_1.DialogFooter, null,
                  this.state.isEditing &&
                      React.createElement(office_ui_fabric_react_1.Link, { className: PagePickerComponent_module_scss_1.default.unlinkButton, "data-automation-id": 'pagePickerUnlinkButton', onClick: this._handleUnlink }, Strings_resx_1.default.UnlinkButtonLabel),
                  React.createElement(office_ui_fabric_react_1.PrimaryButton, { "data-automation-id": 'pagePickerSaveButton', disabled: isSaveButtonDisabled, onClick: this._handleSave, text: Strings_resx_1.default.SaveButtonLabel }),
                  React.createElement(office_ui_fabric_react_1.DefaultButton, { "data-automation-id": 'pagePickerCancelButton', onClick: this._handleCancel, text: Strings_resx_1.default.CancelButtonLabel }))));
          var _a;
      };
      PagePickerComponent.prototype.open = function (link) {
          var isEditing = Boolean(link && link.title && link.url);
          var isTitleUserInput = Boolean(link && link.title);
          var absoluteUrl = DEFAULT_URL;
          if (link && link.url) {
              if (link.url[0] === '/') {
                  absoluteUrl = window.location.protocol + "//" + window.location.host + link.url;
              }
              else {
                  absoluteUrl = link.url;
              }
          }
          this.setState({
              isEditing: isEditing,
              isOpen: true,
              linkTitle: link ? link.title : '',
              linkUrl: absoluteUrl,
              isTitleUserInput: isTitleUserInput,
              isJustOpened: true,
              shouldOpenLinkInNewTab: link ? link.shouldOpenInNewTab : false,
              urlTextFieldError: PagePickerComponent._getUrlErrorMessage(absoluteUrl)
          });
      };
      PagePickerComponent.prototype.close = function () {
          this.setState({
              isOpen: false
          });
      };
      PagePickerComponent.prototype._renderSuggestionsAfterOpen = function () {
          var searchInput = NOT_EMPTY_REG_EXP.test(this.state.linkTitle) && this.state.linkUrl === DEFAULT_URL
              ? this.state.linkTitle
              : '';
          if (this._pagePickerSearch) {
              this._pagePickerSearch.renderSuggestions(searchInput);
          }
      };
      PagePickerComponent.prototype._handleSuggestionSelect = function (link) {
          this.setState((function (prevState) {
              var newState = {
                  isJustOpened: false,
                  linkUrl: link.url,
                  urlTextFieldError: PagePickerComponent._getUrlErrorMessage(link.url)
              };
              if (!prevState.isTitleUserInput) {
                  newState.linkTitle = link.title;
              }
              return newState;
          }));
          screenReaderAlert_1.ScreenReaderAlert.read(sp_core_library_1.Text.format(Strings_resx_1.default.PageIsSelectedScreenReaderAlert, link.title));
      };
      PagePickerComponent.prototype._handleSave = function () {
          this.close();
          this.props.onSelect({
              title: NOT_EMPTY_REG_EXP.test(this.state.linkTitle) ? this.state.linkTitle : this.state.linkUrl,
              url: this.state.linkUrl,
              shouldOpenInNewTab: this.state.shouldOpenLinkInNewTab
          });
      };
      PagePickerComponent.prototype._handleCancel = function () {
          this.close();
          if (this.props.onCancel) {
              this.props.onCancel();
          }
      };
      PagePickerComponent.prototype._handleUnlink = function () {
          this.close();
          if (this.props.onUnlink) {
              this.props.onUnlink();
          }
      };
      PagePickerComponent.prototype._handleKeyDown = function (event) {
          if (event.key === 'Enter' && URL_REG_EXP.test(this.state.linkUrl)) {
              this._handleSave();
          }
      };
      PagePickerComponent.prototype._handleLinkUrlChanged = function (userInput) {
          this.setState((function (prevState) {
              var newState = {
                  isJustOpened: false,
                  linkUrl: userInput,
                  urlTextFieldError: ''
              };
              if (!prevState.isTitleUserInput && (!prevState.linkTitle || prevState.linkTitle === prevState.linkUrl)) {
                  newState.linkTitle = userInput;
              }
              return newState;
          }));
          this._validateUrl();
      };
      PagePickerComponent.prototype._handleLinkTitleChanged = function (userInput) {
          this.setState({
              isTitleUserInput: userInput !== '',
              linkTitle: userInput
          });
      };
      PagePickerComponent.prototype._handleCheckBoxChange = function (event, value) {
          this.setState({
              shouldOpenLinkInNewTab: value
          });
      };
      PagePickerComponent.prototype._getFocusBackFromCKEditor = function () {
          var _this = this;
          this._async.setTimeout((function () {
              if (_this._urlTextField) {
                  _this._urlTextField.select();
                  if (_this._urlTextField.value) {
                      _this._urlTextField.setSelectionStart(_this._urlTextField.value.length);
                      _this._urlTextField.setSelectionEnd(_this._urlTextField.value.length);
                  }
                  _this._urlTextField.focus();
              }
          }), 300);
      };
      PagePickerComponent.prototype._validateUrl = function () {
          this.setState((function (prevState) {
              return {
                  urlTextFieldError: PagePickerComponent._getUrlErrorMessage(prevState.linkUrl)
              };
          }));
      };
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "open", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "close", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_renderSuggestionsAfterOpen", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_handleSuggestionSelect", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_handleKeyDown", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_handleLinkUrlChanged", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_handleLinkTitleChanged", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_handleCheckBoxChange", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_getFocusBackFromCKEditor", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerComponent.prototype, "_validateUrl", null);
      return PagePickerComponent;
  }(office_ui_fabric_react_1.BaseComponent));
  exports.default = PagePickerComponent;
  
  
  /***/ }),
  
  /***/ 380:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var strings = ( false)
      ? require('../resx-strings/en-us.json')
      : __webpack_require__(13);
  exports.default = strings['_/GZrHjuQO4erDQbBRI2XSA'];
  
  
  /***/ }),
  
  /***/ 382:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  __webpack_require__(459);
  var styles = {
      suggestions: 'suggestions_771141de',
      suggestionsList: 'suggestionsList_771141de',
      suggestionsRow: 'suggestionsRow_771141de',
      isRowSelected: 'isRowSelected_771141de',
      suggestionsHeader: 'suggestionsHeader_771141de',
      suggestionsTitleColumn: 'suggestionsTitleColumn_771141de',
      suggestionsOtherColumn: 'suggestionsOtherColumn_771141de',
      suggestionsTitlePrimaryText: 'suggestionsTitlePrimaryText_771141de',
      suggestionsTitleSecondaryText: 'suggestionsTitleSecondaryText_771141de',
      currentPage: 'currentPage_771141de',
      spinner: 'spinner_771141de',
  };
  exports.default = styles;
  
  
  /***/ }),
  
  /***/ 387:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  function __export(m) {
      for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  }
  Object.defineProperty(exports, "__esModule", { value: true });
  var ScreenReaderAlert_1 = __webpack_require__(450);
  exports.ScreenReaderAlert = ScreenReaderAlert_1.default;
  __export(__webpack_require__(388));
  
  
  /***/ }),
  
  /***/ 388:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var ReadingMode;
  (function (ReadingMode) {
      ReadingMode[ReadingMode["ReadAfterOtherContent"] = 1] = "ReadAfterOtherContent";
      ReadingMode[ReadingMode["ReadImmediately"] = 2] = "ReadImmediately";
  })(ReadingMode = exports.ReadingMode || (exports.ReadingMode = {}));
  exports.ARIA_LIVE_MAPPING = new Map();
  exports.ARIA_LIVE_MAPPING.set(ReadingMode.ReadAfterOtherContent, 'polite');
  exports.ARIA_LIVE_MAPPING.set(ReadingMode.ReadImmediately, 'assertive');
  exports.defaultScreenReaderAlertProps = {
      message: '',
      readingMode: ReadingMode.ReadAfterOtherContent,
      indicator: undefined
  };
  
  
  /***/ }),
  
  /***/ 389:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RECENT_PAGES_LIMIT = 20;
  
  
  /***/ }),
  
  /***/ 390:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var React = __webpack_require__(1);
  var office_ui_fabric_react_1 = __webpack_require__(2);
  var sp_core_library_1 = __webpack_require__(5);
  var Strings_resx_1 = __webpack_require__(380);
  var PagePickerSuggestions_module_scss_1 = __webpack_require__(382);
  var PagePickerSuggestionsNoResult_1 = __webpack_require__(461);
  var PagePickerSuggestionsRow_1 = __webpack_require__(465);
  var PagePickerSuggestionsRowCell_1 = __webpack_require__(466);
  exports.TITLE_FIELD_NAME = 'title';
  exports.MODIFIED_FIELD_NAME = 'lastModifiedDate';
  var PagePickerSuggestions = (function (_super) {
      __extends(PagePickerSuggestions, _super);
      function PagePickerSuggestions() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      PagePickerSuggestions.prototype.render = function () {
          return (React.createElement("div", null,
              React.createElement(office_ui_fabric_react_1.Label, null, this.props.label),
              React.createElement("div", { className: PagePickerSuggestions_module_scss_1.default.suggestions, "data-automation-id": 'pagePickerSuggestions' }, this._renderSuggestionsContent())));
      };
      PagePickerSuggestions.prototype._renderSuggestionsContent = function () {
          if (this.props.isLoading) {
              return (React.createElement(office_ui_fabric_react_1.Spinner, { className: PagePickerSuggestions_module_scss_1.default.spinner, size: office_ui_fabric_react_1.SpinnerSize.large }));
          }
          else if (!this.props.suggestions || this.props.suggestions.length === 0) {
              return (React.createElement(PagePickerSuggestionsNoResult_1.default, null));
          }
          else {
              return (React.createElement(office_ui_fabric_react_1.DetailsList, { ariaLabel: sp_core_library_1.Text.format(Strings_resx_1.default.SuggestionsListAriaLabel, this.props.label), checkboxVisibility: office_ui_fabric_react_1.CheckboxVisibility.hidden, className: PagePickerSuggestions_module_scss_1.default.suggestionsList, columns: PagePickerSuggestions._suggestionsColumns, compact: true, getKey: function (item) { return item.url; }, items: this.props.suggestions, layoutMode: office_ui_fabric_react_1.DetailsListLayoutMode.fixedColumns, onRenderItemColumn: this._renderRowCell, onRenderRow: this._renderRow, selectionMode: office_ui_fabric_react_1.SelectionMode.none }));
          }
      };
      PagePickerSuggestions.prototype._renderRow = function (props) {
          return (React.createElement(PagePickerSuggestionsRow_1.default, { detailsRowProps: props, onSelect: this.props.onSuggestionSelect }));
      };
      PagePickerSuggestions.prototype._renderRowCell = function (item, index, column) {
          return (React.createElement(PagePickerSuggestionsRowCell_1.default, { item: item, index: index, column: column, userInput: this.props.userInput }));
      };
      PagePickerSuggestions._suggestionsColumns = [
          {
              columnActionsMode: office_ui_fabric_react_1.ColumnActionsMode.disabled,
              fieldName: exports.TITLE_FIELD_NAME,
              headerClassName: PagePickerSuggestions_module_scss_1.default.suggestionsHeader,
              isResizable: true,
              key: exports.TITLE_FIELD_NAME,
              minWidth: 320,
              name: Strings_resx_1.default.TitleSuggestionsColumnName
          },
          {
              columnActionsMode: office_ui_fabric_react_1.ColumnActionsMode.disabled,
              fieldName: exports.MODIFIED_FIELD_NAME,
              headerClassName: PagePickerSuggestions_module_scss_1.default.suggestionsHeader,
              isResizable: true,
              key: exports.MODIFIED_FIELD_NAME,
              minWidth: 90,
              name: Strings_resx_1.default.ModifiedSuggestionsColumnName
          }
      ];
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSuggestions.prototype, "_renderSuggestionsContent", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSuggestions.prototype, "_renderRow", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSuggestions.prototype, "_renderRowCell", null);
      return PagePickerSuggestions;
  }(React.PureComponent));
  exports.default = PagePickerSuggestions;
  
  
  /***/ }),
  
  /***/ 391:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  __webpack_require__(467);
  var styles = {
      linkDialogContainer: 'linkDialogContainer_36739498',
      isCompact: 'isCompact_36739498',
      unlinkButton: 'unlinkButton_36739498',
      linkDialogInput: 'linkDialogInput_36739498',
      searchInput: 'searchInput_36739498',
      openLinkInNewTabCheckbox: 'openLinkInNewTabCheckbox_36739498',
      screenReaderOnly: 'screenReaderOnly_36739498',
  };
  exports.default = styles;
  
  
  /***/ }),
  
  /***/ 450:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var React = __webpack_require__(1);
  var ReactDOM = __webpack_require__(17);
  var ScreenReaderAlertProps_1 = __webpack_require__(388);
  var ScreenReaderAlert_module_scss_1 = __webpack_require__(451);
  var ScreenReaderAlert = (function (_super) {
      __extends(ScreenReaderAlert, _super);
      function ScreenReaderAlert() {
          var _this = _super !== null && _super.apply(this, arguments) || this;
          _this._renderIndex = 0;
          return _this;
      }
      ScreenReaderAlert.read = function (message, readingMode) {
          if (ScreenReaderAlert.alertNode === undefined) {
              ScreenReaderAlert.alertNode = document.createElement('div');
              ScreenReaderAlert.alertNode.setAttribute('data-automation-id', 'screen-reader-alert-static');
              document.body.appendChild(ScreenReaderAlert.alertNode);
          }
          ReactDOM.render(React.createElement(ScreenReaderAlert, { readingMode: readingMode !== undefined ? readingMode : ScreenReaderAlertProps_1.ReadingMode.ReadAfterOtherContent, indicator: ScreenReaderAlert.alertIndicator++, message: message }), ScreenReaderAlert.alertNode);
      };
      ScreenReaderAlert.prototype.render = function () {
          return (React.createElement("div", { className: ScreenReaderAlert_module_scss_1.default.screenReaderAlert, key: this._renderIndex++ }, this.props.message && (React.createElement("p", { role: this._role, "aria-live": ScreenReaderAlertProps_1.ARIA_LIVE_MAPPING.get(this.props.readingMode), "aria-atomic": true }, this.props.message))));
      };
      Object.defineProperty(ScreenReaderAlert.prototype, "_role", {
          get: function () {
              return this.props.readingMode === ScreenReaderAlertProps_1.ReadingMode.ReadImmediately ? 'alert' : undefined;
          },
          enumerable: true,
          configurable: true
      });
      ScreenReaderAlert.defaultProps = ScreenReaderAlertProps_1.defaultScreenReaderAlertProps;
      ScreenReaderAlert.alertIndicator = 0;
      return ScreenReaderAlert;
  }(React.PureComponent));
  exports.default = ScreenReaderAlert;
  
  
  /***/ }),
  
  /***/ 451:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  __webpack_require__(452);
  var styles = {
      screenReaderAlert: 'screenReaderAlert_d6080445',
  };
  exports.default = styles;
  
  
  /***/ }),
  
  /***/ 452:
  /***/ (function(module, exports, __webpack_require__) {
  
  var content = __webpack_require__(453);
  var loader = __webpack_require__(4);
  
  if(typeof content === "string") content = [[module.i, content]];
  
  // add the styles to the DOM
  for (var i = 0; i < content.length; i++) loader.loadStyles(content[i][1], true);
  
  if(content.locals) module.exports = content.locals;
  
  /***/ }),
  
  /***/ 453:
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__(3)(undefined);
  // imports
  
  
  // module
  exports.push([module.i, ".screenReaderAlert_d6080445{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ 454:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var __assign = (this && this.__assign) || Object.assign || function(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
              t[p] = s[p];
      }
      return t;
  };
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var office_ui_fabric_react_1 = __webpack_require__(2);
  var React = __webpack_require__(1);
  var sp_core_library_1 = __webpack_require__(5);
  var screenReaderAlert_1 = __webpack_require__(387);
  var LinkDataProvider_1 = __webpack_require__(455);
  var PagePickerSuggestions_1 = __webpack_require__(390);
  var Strings_resx_1 = __webpack_require__(380);
  var PagePickerComponent_module_scss_1 = __webpack_require__(391);
  var GET_PAGE_LINKS_DELAY_IN_MILLISECONDS = 400;
  var NOT_EMPTY_REG_EXP = /\S/;
  var PagePickerSearch = (function (_super) {
      __extends(PagePickerSearch, _super);
      function PagePickerSearch(props) {
          var _this = _super.call(this, props) || this;
          _this.state = {
              isSuggestionLoading: false,
              searchInput: '',
              shouldReadScreenReaderAlert: false,
              shouldSearch: false,
              suggestions: []
          };
          _this._dataProvider = false || (true && sp_core_library_1.Environment.type === sp_core_library_1.EnvironmentType.Local)
              ? new (__webpack_require__(469).default)
              : new LinkDataProvider_1.default(_this.props.serviceScope);
          _this._operationId = 0;
          _this._renderSearchPageSuggestions =
              _this._async.debounce(_this._renderSearchPageSuggestions, GET_PAGE_LINKS_DELAY_IN_MILLISECONDS);
          return _this;
      }
      PagePickerSearch.prototype.render = function () {
          var suggestionsLabel = this.state.shouldSearch
              ? Strings_resx_1.default.SearchForPagesLabel
              : Strings_resx_1.default.RecentPagesLabel;
          return (React.createElement("section", null,
              React.createElement(office_ui_fabric_react_1.TextField, { className: office_ui_fabric_react_1.css(PagePickerComponent_module_scss_1.default.linkDialogInput, PagePickerComponent_module_scss_1.default.searchInput), "data-automation-id": 'pagePickerSearchTextField', label: Strings_resx_1.default.SearchTextFieldLabel, onChanged: this._handleSearchInputChanged, placeholder: Strings_resx_1.default.SearchTextFieldPlaceholder, value: this.state.searchInput }),
              React.createElement(PagePickerSuggestions_1.default, { isLoading: this.state.isSuggestionLoading, label: suggestionsLabel, onSuggestionSelect: this._handleSuggestionSelect, suggestions: this.state.suggestions, userInput: this.state.searchInput }),
              this.state.shouldReadScreenReaderAlert &&
                  React.createElement(screenReaderAlert_1.ScreenReaderAlert, { message: this._screenReaderAlert })));
      };
      PagePickerSearch.prototype.renderSuggestions = function (searchInput) {
          var shouldSearch = NOT_EMPTY_REG_EXP.test(searchInput);
          this.setState({
              isSuggestionLoading: shouldSearch,
              searchInput: searchInput,
              shouldSearch: shouldSearch,
              suggestions: []
          });
          if (shouldSearch) {
              this._renderSearchPageSuggestions(searchInput, ++this._operationId);
          }
          else {
              this._renderRecentPageSuggestions();
          }
      };
      Object.defineProperty(PagePickerSearch.prototype, "_screenReaderAlert", {
          get: function () {
              if (this.state.isSuggestionLoading) {
                  return Strings_resx_1.default.IsSearching;
              }
              else if (!this.state.suggestions || this.state.suggestions.length === 0) {
                  return Strings_resx_1.default.NoResultLabel;
              }
              else if (this.state.shouldSearch) {
                  return Strings_resx_1.default.SearchResultsShowing;
              }
              else {
                  return Strings_resx_1.default.RecentPagesShowing;
              }
          },
          enumerable: true,
          configurable: true
      });
      PagePickerSearch.prototype._handleSearchInputChanged = function (searchInput) {
          this.setState({
              shouldReadScreenReaderAlert: true
          });
          this.renderSuggestions(searchInput);
      };
      PagePickerSearch.prototype._handleSuggestionSelect = function (link, selectedIndex) {
          this.setState((function (prevState) {
              var newSuggestions = prevState.suggestions
                  .map((function (suggestion, index) {
                  if (index === selectedIndex) {
                      return __assign({}, suggestion, { isSelected: true });
                  }
                  else {
                      return __assign({}, suggestion, { isSelected: false });
                  }
              }));
              return {
                  suggestions: newSuggestions
              };
          }));
          this.props.onSuggestionSelect(link);
      };
      PagePickerSearch.prototype._renderSearchPageSuggestions = function (value, operationId) {
          var _this = this;
          this._dataProvider.getPageLinksByTitle(value).then((function (links) {
              if (operationId === _this._operationId) {
                  _this.setState({
                      isSuggestionLoading: false,
                      suggestions: links
                  });
              }
          }));
      };
      PagePickerSearch.prototype._renderRecentPageSuggestions = function () {
          var _this = this;
          var operationId = ++this._operationId;
          if (!this._recentPageSuggestions) {
              this.setState({
                  isSuggestionLoading: true
              });
              this._dataProvider.getRecentPageLinks().then((function (links) {
                  _this._recentPageSuggestions = links;
                  if (operationId === _this._operationId) {
                      _this.setState({
                          isSuggestionLoading: false,
                          suggestions: _this._recentPageSuggestions
                      });
                  }
              }));
          }
          else {
              this.setState({
                  isSuggestionLoading: false,
                  suggestions: this._recentPageSuggestions
              });
          }
      };
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSearch.prototype, "renderSuggestions", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSearch.prototype, "_handleSearchInputChanged", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSearch.prototype, "_handleSuggestionSelect", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSearch.prototype, "_renderSearchPageSuggestions", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSearch.prototype, "_renderRecentPageSuggestions", null);
      return PagePickerSearch;
  }(office_ui_fabric_react_1.BaseComponent));
  exports.default = PagePickerSearch;
  
  
  /***/ }),
  
  /***/ 455:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var sp_core_library_1 = __webpack_require__(5);
  var sp_http_1 = __webpack_require__(130);
  var sp_lodash_subset_1 = __webpack_require__(12);
  var sp_page_context_1 = __webpack_require__(47);
  var i18n_utilities_1 = __webpack_require__(133);
  var sp_telemetry_1 = __webpack_require__(6);
  var search_1 = __webpack_require__(456);
  var ILinkDataProvider_1 = __webpack_require__(389);
  var LinkDataProvider = (function () {
      function LinkDataProvider(serviceScope) {
          this._pageContext = serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
          this._httpClient = serviceScope.consume(sp_http_1.SPHttpClient.serviceKey);
          this._searchAPIRequest = new search_1.SearchAPIRequest(serviceScope, false );
      }
      LinkDataProvider.prototype.getPageLinksByTitle = function (userInput) {
          var keyWords = userInput.trim().split(/\s+/);
          return Promise.all([
              this._getPageLinksByCAMLQuery(this._buildTitleFilter(keyWords)),
              this._getPageLinksBySearch(keyWords)
          ]).then((function (_a) {
              var camlQueryLinks = _a[0], searchLinks = _a[1];
              var suggestionLinks = sp_lodash_subset_1.uniqBy(camlQueryLinks.concat(searchLinks), (function (link) { return link.id && link.id.toString(); }));
              return suggestionLinks.sort((function (suggestionA, suggestionB) {
                  var dateNumberA = suggestionA.lastModifiedDate
                      ? new Date(suggestionA.lastModifiedDate).getTime()
                      : 0;
                  var dateNumberB = suggestionB.lastModifiedDate
                      ? new Date(suggestionB.lastModifiedDate).getTime()
                      : 0;
                  return dateNumberB - dateNumberA;
              }));
          }));
      };
      LinkDataProvider.prototype.getRecentPageLinks = function () {
          return this._getPageLinksByCAMLQuery(this._buildRecentPageFilter());
      };
      LinkDataProvider.prototype._getPageLinksByCAMLQuery = function (filter) {
          var monitor = new sp_telemetry_1._QosMonitor('PagePicker.GetPageLinksByCAMLQuery');
          var queryUrl = this._pageContext.web.absoluteUrl +
              '/_api/lists/EnsureSitePagesLibrary/RenderListDataAsStream';
          var body = JSON.stringify({
              parameters: {
                  __metadata: { type: 'SP.RenderListDataParameters' },
                  ViewXml: this._compactCAMLQuery(this._buildCAMLQuery(filter))
              }
          });
          var headers = {
              'Accept': 'application/json;odata=verbose',
              'Content-Type': 'application/json;odata=verbose',
              'Odata-Version': '3.0'
          };
          return this._httpClient.post(queryUrl, sp_http_1.SPHttpClient.configurations.v1, { body: body, headers: headers })
              .then(this._checkStatus)
              .then((function (response) { return response.json(); }))
              .then((function (pages) {
              monitor.writeSuccess();
              return pages.Row
                  .filter((function (page) { return page.Title && page.EncodedAbsUrl; }))
                  .map((function (page) { return ({
                  id: sp_core_library_1.Guid.tryParse(page.UniqueId),
                  isSearchResult: false,
                  lastEditor: page.Editor[0].title,
                  lastModifiedDate: page.Modified
                      ? i18n_utilities_1.LocaleFormat.formatDate(new Date(page.Modified), { skeleton: 'yMMMd' })
                      : '',
                  title: page.Title,
                  url: page.EncodedAbsUrl
              }); }));
          }))
              .catch((function (error) {
              monitor.writeUnexpectedFailure('GetPageLinksByCAMLQueryFail', error);
              return [];
          }));
      };
      LinkDataProvider.prototype._checkStatus = function (response) {
          if (response.status >= 200 && response.status < 300) {
              return Promise.resolve(response);
          }
          else {
              return Promise.reject(new Error('Status Code: ' + response.status));
          }
      };
      LinkDataProvider.prototype._compactCAMLQuery = function (camlQuery) {
          return camlQuery
              .replace(/" \/>/g, '"/>')
              .split(/(?:\r\n|\r|\n)/).map((function (line) { return line.trim(); })).join('');
      };
      LinkDataProvider.prototype._htmlEncode = function (text) {
          var htmlCodeRegExp = /[<>&'"\\]/g;
          var codes = {
              '<': '&lt;',
              '>': '&gt;',
              '&': '&amp;',
              '"': '&quot;',
              '\'': '&#39;',
              '\\': '&#92;'
          };
          return text ? text.replace(htmlCodeRegExp, (function (match) { return codes[match]; })) : '';
      };
      LinkDataProvider.prototype._buildCAMLQuery = function (filter) {
          return "\n      <View>\n        <ViewFields>\n          <FieldRef Name=\"Editor\"/>\n          <FieldRef Name=\"EncodedAbsUrl\"/>\n          <FieldRef Name=\"Modified\"/>\n          <FieldRef Name=\"Title\"/>\n          <FieldRef Name=\"UniqueId\"/>\n        </ViewFields>\n        " + filter + "\n      </View>\n    ";
      };
      LinkDataProvider.prototype._buildTitleFilter = function (keyWords) {
          return "\n      <Query>\n        <Where>\n          " + this._buildTitleFilterInternal(keyWords, 0) + "\n        </Where>\n        <OrderBy>\n          <FieldRef Name=\"Modified\" Ascending=\"False\" />\n        </OrderBy>\n      </Query>\n    ";
      };
      LinkDataProvider.prototype._buildTitleFilterInternal = function (keyWords, index) {
          return "\n      <And>\n        <Contains>\n          <FieldRef Name=\"Title\"/>\n          <Value Type=\"Text\">" + this._htmlEncode(keyWords[index]) + "</Value>\n        </Contains>\n        " + (index < keyWords.length - 1
              ? this._buildTitleFilterInternal(keyWords, index + 1)
              : "<IsNotNull><FieldRef Name=\"EncodedAbsUrl\"/></IsNotNull>") + "\n      </And>\n    ";
      };
      LinkDataProvider.prototype._buildRecentPageFilter = function () {
          return "\n      <Query>\n        <Where>\n          <IsNotNull><FieldRef Name=\"EncodedAbsUrl\"/></IsNotNull>\n        </Where>\n        <OrderBy>\n          <FieldRef Name=\"Modified\" Ascending=\"False\" />\n        </OrderBy>\n      </Query>\n      <RowLimit>" + ILinkDataProvider_1.RECENT_PAGES_LIMIT + "</RowLimit>\n    ";
      };
      LinkDataProvider.prototype._getPageLinksBySearch = function (keyWords) {
          var _this = this;
          var monitor = new sp_telemetry_1._QosMonitor('PagePicker.GetPageLinksBySearch');
          return this._searchAPIRequest
              .getSearchQueryResponse({
              QueryTemplate: this._buildSearchQueryTemplate(keyWords),
              SelectProperties: [
                  'DefaultEncodingURL',
                  'EditorOwsUser',
                  'ModifiedOwsDate',
                  'Title',
                  'UniqueID'
              ],
              TrimDuplicates: true
          })
              .then((function (searchResults) {
              monitor.writeSuccess();
              return searchResults.rows
                  .filter((function (pageResult) { return pageResult.Title && pageResult.DefaultEncodingURL; }))
                  .map((function (pageResult) { return ({
                  id: sp_core_library_1.Guid.tryParse(pageResult.UniqueID),
                  isSearchResult: true,
                  lastEditor: _this._getPersonName(pageResult.EditorOwsUser, pageResult.ModifiedBy),
                  lastModifiedDate: pageResult.ModifiedOwsDate
                      ? i18n_utilities_1.LocaleFormat.formatDate(new Date(pageResult.ModifiedOwsDate), { skeleton: 'yMMMd' })
                      : '',
                  title: pageResult.Title,
                  url: pageResult.DefaultEncodingURL
              }); }));
          }))
              .catch((function (error) {
              monitor.writeUnexpectedFailure('GetPageLinksBySearchFail', error);
              return [];
          }));
      };
      LinkDataProvider.prototype._buildSearchQueryTemplate = function (keyWords) {
          var sitePageContentTypeId = '0x0101009D1CB255DA76424F860D91F20E6C4118*';
          var queryTemplateString = keyWords.reduce(
          (function (template, keyWord) { return template + ("\"" + keyWord.replace(/"/g, '""') + "\" AND "); }), '');
          queryTemplateString += "SiteID:" + this._pageContext.site.id.toString() + " AND ";
          queryTemplateString += "WebId:" + this._pageContext.web.id.toString() + " AND ";
          queryTemplateString += "ContentTypeId:" + sitePageContentTypeId;
          return queryTemplateString;
      };
      LinkDataProvider.prototype._getPersonName = function (owsId, author) {
          var name;
          if (!owsId && author) {
              var info = author.split(';');
              if (info.length > 0) {
                  name = info[info.length - 1];
              }
          }
          else if (owsId) {
              var info = owsId.split(' | ');
              if (info.length >= 2) {
                  name = info[1];
              }
          }
          return name;
      };
      return LinkDataProvider;
  }());
  exports.default = LinkDataProvider;
  
  
  /***/ }),
  
  /***/ 456:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  function __export(m) {
      for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  }
  Object.defineProperty(exports, "__esModule", { value: true });
  var SearchAPIRequest_1 = __webpack_require__(457);
  exports.SearchAPIRequest = SearchAPIRequest_1.default;
  __export(__webpack_require__(458));
  
  
  /***/ }),
  
  /***/ 457:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var sp_lodash_subset_1 = __webpack_require__(12);
  var sp_http_1 = __webpack_require__(130);
  var sp_page_context_1 = __webpack_require__(47);
  var sp_telemetry_1 = __webpack_require__(6);
  var SearchAPIRequest = (function () {
      function SearchAPIRequest(serviceScope, isMockMode) {
          if (isMockMode === void 0) { isMockMode = false; }
          this._serviceScope = serviceScope;
          this._isMockMode = isMockMode;
      }
      SearchAPIRequest.prototype.getSearchQueryResponse = function (options) {
          var _this = this;
          var _qosMonitor = new sp_telemetry_1._QosMonitor('SearchDataProviderGetResponse');
          if (this._isMockMode) {
              _qosMonitor.writeSuccess();
              return Promise.resolve(this.mockResponse);
          }
          else {
              return this._getRawSearchQueryResponse(options)
                  .then((function (rawResponse) {
                  try {
                      var simplifiedResult = _this._simplifyResultForTemplating(rawResponse);
                      _qosMonitor.writeSuccess();
                      return Promise.resolve(simplifiedResult);
                  }
                  catch (er) {
                      _qosMonitor.writeUnexpectedFailure('FailedToSimplifySearchResult');
                      return Promise.reject(er);
                  }
              }), (function (error) {
                  _qosMonitor.writeUnexpectedFailure('FailedSearchPOST');
                  return Promise.reject(error);
              }));
          }
      };
      SearchAPIRequest.prototype.getManagedPropertiesQueryResponse = function (options) {
          var _qosMonitor = new sp_telemetry_1._QosMonitor('ManagedPropertiesRequest');
          if (this._isMockMode) {
              _qosMonitor.writeSuccess();
              return Promise.resolve([]);
          }
          else {
              return this._getRawSearchQueryResponse(options)
                  .then((function (rawResponse) {
                  var refiners = sp_lodash_subset_1.has(rawResponse.PrimaryQueryResult, 'RefinementResults.Refiners')
                      ? rawResponse.PrimaryQueryResult.RefinementResults.Refiners : [];
                  var entries = refiners.length > 0 ? refiners[0].Entries : [];
                  var managedProperties = entries.map((function (entry) { return entry.RefinementName; }));
                  _qosMonitor.writeSuccess();
                  return Promise.resolve(managedProperties);
              }))
                  .catch((function (error) {
                  _qosMonitor.writeUnexpectedFailure('ManagedPropertiesRequestFailed');
                  return Promise.reject(error);
              }));
          }
      };
      SearchAPIRequest.prototype._getRawSearchQueryResponse = function (options) {
          var _this = this;
          options.ClientType = options.ClientType || 'ModernWebPart';
          var body = '{ "request": ' + (options ? JSON.stringify(options) : '{}') + ' }';
          var headers = new Headers();
          headers.append('Accept', 'application/json;odata=nometadata');
          headers.append('Content-type', 'application/json;charset=utf-8');
          headers.append('OData-Version', '3.0');
          return new Promise(function (complete, reject) {
              _this._serviceScope.whenFinished((function () {
                  var pageContext = _this._serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
                  var spHttpClient = _this._serviceScope.consume(sp_http_1.SPHttpClient.serviceKey);
                  var postUrl = pageContext.site.absoluteUrl + "/_api/search/postquery";
                  sp_telemetry_1._TraceLogger.logVerbose(SearchAPIRequest._LogSource, "postUrl=" + postUrl);
                  spHttpClient.post(postUrl, sp_http_1.SPHttpClient.configurations.v1, {
                      body: body, headers: headers
                  }).then((function (response) {
                      sp_telemetry_1._TraceLogger.logVerbose(SearchAPIRequest._LogSource, "response status=" + response.status.toString());
                      if (response.status >= 200 && response.status <= 299) {
                          return response.json();
                      }
                      else {
                          response.json().then((function (errorBody) {
                              sp_telemetry_1._TraceLogger.logVerbose(SearchAPIRequest._LogSource, "response error=" + errorBody.error.message, 'BadSearchResponse');
                              reject(new Error(errorBody.error.message));
                          }));
                      }
                  })).then((function (response) {
                      complete(response);
                  })).catch((function (error) {
                      sp_telemetry_1._TraceLogger.logVerbose(SearchAPIRequest._LogSource, "response error=" + error.message, 'UnexpectedSearchError');
                      reject(error);
                  }));
              }));
          });
      };
      SearchAPIRequest.prototype._simplifyResultForTemplating = function (searchResult) {
          var parsedData = {};
          try {
              var parsedRows = [];
              var rows = searchResult.PrimaryQueryResult.RelevantResults.Table.Rows;
              for (var r = 0; r < rows.length; r++) {
                  var parsedRow = {};
                  var cells = rows[r].Cells; 
                  for (var c = 0; c < cells.length; c++) {
                      var cell = cells[c];
                      var cellKey = cell.Key;
                      parsedRow[cellKey] = cell.Value;
                  }
                  parsedRows.push(parsedRow);
              }
              parsedData.rows = parsedRows;
          }
          catch (ex) {
              parsedData.rows = []; 
          }
          return parsedData;
      };
      SearchAPIRequest._LogSource = sp_telemetry_1._LogSource.create('SearchAPIRequest');
      return SearchAPIRequest;
  }());
  exports.default = SearchAPIRequest;
  
  
  /***/ }),
  
  /***/ 458:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var SearchAPISortDirection = (function () {
      function SearchAPISortDirection() {
      }
      SearchAPISortDirection.ascending = 0;
      SearchAPISortDirection.descending = 1;
      return SearchAPISortDirection;
  }());
  exports.SearchAPISortDirection = SearchAPISortDirection;
  
  
  /***/ }),
  
  /***/ 459:
  /***/ (function(module, exports, __webpack_require__) {
  
  var content = __webpack_require__(460);
  var loader = __webpack_require__(4);
  
  if(typeof content === "string") content = [[module.i, content]];
  
  // add the styles to the DOM
  for (var i = 0; i < content.length; i++) loader.loadStyles(content[i][1], true);
  
  if(content.locals) module.exports = content.locals;
  
  /***/ }),
  
  /***/ 460:
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__(3)(undefined);
  // imports
  
  
  // module
  exports.push([module.i, ".suggestions_771141de{height:200px;border:1px solid;border-color:\"[theme:neutralTertiary, default: #a6a6a6]\";overflow:auto}.suggestions_771141de:hover{border-color:\"[theme:neutralDark, default: #212121]\"}.suggestions_771141de .suggestionsList_771141de{overflow:visible}.suggestionsRow_771141de{cursor:pointer}.suggestionsRow_771141de.isRowSelected_771141de .ms-DetailsRow{background-color:\"[theme:neutralLight, default: #eaeaea]\"}.suggestionsHeader_771141de,.suggestionsTitleColumn_771141de{font-size:14px;color:\"[theme:neutralPrimary, default: #333333]\"}.suggestionsOtherColumn_771141de{font-size:14px;color:\"[theme:neutralSecondary, default: #666666]\"}.suggestionsTitlePrimaryText_771141de{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;padding-bottom:4px}.suggestionsTitleSecondaryText_771141de{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;color:\"[theme:neutralTertiary, default: #a6a6a6]\";font-size:12px}.currentPage_771141de{font-size:12px}[dir=ltr] .currentPage_771141de{padding-left:10px}[dir=rtl] .currentPage_771141de{padding-right:10px}.spinner_771141de{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ 461:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var office_ui_fabric_react_1 = __webpack_require__(2);
  var React = __webpack_require__(1);
  var Strings_resx_1 = __webpack_require__(380);
  var PagePickerSuggestionsNoResult_module_scss_1 = __webpack_require__(462);
  function PagePickerSuggestionsNoResult() {
      return (React.createElement("div", { className: PagePickerSuggestionsNoResult_module_scss_1.default.noResultFoundContainer },
          React.createElement(office_ui_fabric_react_1.Icon, { iconName: 'Search', className: PagePickerSuggestionsNoResult_module_scss_1.default.noResultFoundIcon }),
          React.createElement("div", { className: PagePickerSuggestionsNoResult_module_scss_1.default.noResultFoundLabelContainer },
              React.createElement("div", { className: PagePickerSuggestionsNoResult_module_scss_1.default.noResultLabel }, Strings_resx_1.default.NoResultLabel),
              React.createElement("div", { className: PagePickerSuggestionsNoResult_module_scss_1.default.tryAgainLabel }, Strings_resx_1.default.TryAgainLabel))));
  }
  exports.default = PagePickerSuggestionsNoResult;
  
  
  /***/ }),
  
  /***/ 462:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  __webpack_require__(463);
  var styles = {
      noResultFoundContainer: 'noResultFoundContainer_3e5e1f8d',
      noResultFoundIcon: 'noResultFoundIcon_3e5e1f8d',
      noResultFoundLabelContainer: 'noResultFoundLabelContainer_3e5e1f8d',
      noResultLabel: 'noResultLabel_3e5e1f8d',
      tryAgainLabel: 'tryAgainLabel_3e5e1f8d',
  };
  exports.default = styles;
  
  
  /***/ }),
  
  /***/ 463:
  /***/ (function(module, exports, __webpack_require__) {
  
  var content = __webpack_require__(464);
  var loader = __webpack_require__(4);
  
  if(typeof content === "string") content = [[module.i, content]];
  
  // add the styles to the DOM
  for (var i = 0; i < content.length; i++) loader.loadStyles(content[i][1], true);
  
  if(content.locals) module.exports = content.locals;
  
  /***/ }),
  
  /***/ 464:
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__(3)(undefined);
  // imports
  
  
  // module
  exports.push([module.i, ".noResultFoundContainer_3e5e1f8d{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.noResultFoundIcon_3e5e1f8d{margin-bottom:18px;font-size:32px}[dir=ltr] .noResultFoundIcon_3e5e1f8d{margin-right:14px}[dir=rtl] .noResultFoundIcon_3e5e1f8d{margin-left:14px}.noResultFoundLabelContainer_3e5e1f8d{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.noResultLabel_3e5e1f8d{font-size:21px;font-weight:100;margin-bottom:4px}.noResultLabel_3e5e1f8d,.tryAgainLabel_3e5e1f8d{color:\"[theme:neutralSecondary, default: #666666]\"}.tryAgainLabel_3e5e1f8d{font-size:14px;font-weight:400}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ 465:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var __assign = (this && this.__assign) || Object.assign || function(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
              t[p] = s[p];
      }
      return t;
  };
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var office_ui_fabric_react_1 = __webpack_require__(2);
  var React = __webpack_require__(1);
  var PagePickerSuggestions_module_scss_1 = __webpack_require__(382);
  var PagePickerSuggestionsRow = (function (_super) {
      __extends(PagePickerSuggestionsRow, _super);
      function PagePickerSuggestionsRow() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      PagePickerSuggestionsRow.prototype.render = function () {
          var suggestionsRowClassName = office_ui_fabric_react_1.css(PagePickerSuggestions_module_scss_1.default.suggestionsRow, (_a = {},
              _a[PagePickerSuggestions_module_scss_1.default.isRowSelected] = this.props.detailsRowProps.item.isSelected,
              _a));
          return (React.createElement("div", { className: suggestionsRowClassName, onClick: this._handleClick, onKeyDown: this._handleKeyDown },
              React.createElement(office_ui_fabric_react_1.DetailsRow, __assign({}, this.props.detailsRowProps))));
          var _a;
      };
      PagePickerSuggestionsRow.prototype._handleClick = function () {
          this.props.onSelect(this.props.detailsRowProps.item, this.props.detailsRowProps.itemIndex);
      };
      PagePickerSuggestionsRow.prototype._handleKeyDown = function (event) {
          if (event.key === 'Space') {
              this.props.onSelect(this.props.detailsRowProps.item, this.props.detailsRowProps.itemIndex);
          }
      };
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSuggestionsRow.prototype, "_handleClick", null);
      __decorate([
          office_ui_fabric_react_1.autobind
      ], PagePickerSuggestionsRow.prototype, "_handleKeyDown", null);
      return PagePickerSuggestionsRow;
  }(React.PureComponent));
  exports.default = PagePickerSuggestionsRow;
  
  
  /***/ }),
  
  /***/ 466:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var React = __webpack_require__(1);
  var sp_core_library_1 = __webpack_require__(5);
  var Strings_resx_1 = __webpack_require__(380);
  var PagePickerSuggestions_1 = __webpack_require__(390);
  var PagePickerSuggestions_module_scss_1 = __webpack_require__(382);
  var PagePickerSuggestionsRowCell = (function (_super) {
      __extends(PagePickerSuggestionsRowCell, _super);
      function PagePickerSuggestionsRowCell() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      PagePickerSuggestionsRowCell._isCurrentPage = function (itemUrl) {
          var currentPageUrl = "" + window.location.origin + window.location.pathname;
          return currentPageUrl === itemUrl;
      };
      PagePickerSuggestionsRowCell.prototype.render = function () {
          if (this.props.column.fieldName === PagePickerSuggestions_1.TITLE_FIELD_NAME) {
              return (React.createElement("div", { className: PagePickerSuggestions_module_scss_1.default.suggestionsTitleColumn, title: this.props.item.url },
                  React.createElement("div", { className: PagePickerSuggestions_module_scss_1.default.suggestionsTitlePrimaryText },
                      this.props.item[this.props.column.fieldName],
                      PagePickerSuggestionsRowCell._isCurrentPage(this.props.item.url) &&
                          React.createElement("i", { className: PagePickerSuggestions_module_scss_1.default.currentPage }, Strings_resx_1.default.CurrentPage)),
                  this.props.item.isSearchResult &&
                      React.createElement("div", { className: PagePickerSuggestions_module_scss_1.default.suggestionsTitleSecondaryText }, sp_core_library_1.Text.format(Strings_resx_1.default.PageContentContainsSearchText, this.props.userInput))));
          }
          else {
              return (React.createElement("span", { className: PagePickerSuggestions_module_scss_1.default.suggestionsOtherColumn, title: this.props.item[this.props.column.fieldName] }, this.props.item[this.props.column.fieldName]));
          }
      };
      return PagePickerSuggestionsRowCell;
  }(React.PureComponent));
  exports.default = PagePickerSuggestionsRowCell;
  
  
  /***/ }),
  
  /***/ 467:
  /***/ (function(module, exports, __webpack_require__) {
  
  var content = __webpack_require__(468);
  var loader = __webpack_require__(4);
  
  if(typeof content === "string") content = [[module.i, content]];
  
  // add the styles to the DOM
  for (var i = 0; i < content.length; i++) loader.loadStyles(content[i][1], true);
  
  if(content.locals) module.exports = content.locals;
  
  /***/ }),
  
  /***/ 468:
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__(3)(undefined);
  // imports
  
  
  // module
  exports.push([module.i, ".linkDialogContainer_36739498{min-width:540px}.linkDialogContainer_36739498.isCompact_36739498{min-width:360px}.linkDialogContainer_36739498 .unlinkButton_36739498{margin-top:4px;font-size:14px}[dir=ltr] .linkDialogContainer_36739498 .unlinkButton_36739498{float:left}[dir=rtl] .linkDialogContainer_36739498 .unlinkButton_36739498{float:right}.linkDialogInput_36739498.ms-TextField{margin-bottom:2px}.linkDialogInput_36739498.ms-TextField.searchInput_36739498{margin-top:20px}.openLinkInNewTabCheckbox_36739498{margin-top:15px}.screenReaderOnly_36739498{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ 469:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  Object.defineProperty(exports, "__esModule", { value: true });
  var sp_core_library_1 = __webpack_require__(5);
  var ILinkDataProvider_1 = __webpack_require__(389);
  var MockLinkDataProvider = (function () {
      function MockLinkDataProvider() {
      }
      MockLinkDataProvider.prototype.getPageLinksByTitle = function (userInput) {
          var fakeLinks = [];
          for (var i = 0; i < 10; i++) {
              fakeLinks.push({
                  id: sp_core_library_1.Guid.newGuid(),
                  isSearchResult: Boolean(i % 2),
                  lastEditor: 'Yusong Liu',
                  lastModifiedDate: '4/27/2017',
                  shouldOpenInNewTab: true,
                  title: "fake text " + i,
                  url: "https://fakeurl" + i + ".test"
              });
          }
          return Promise.resolve(fakeLinks);
      };
      MockLinkDataProvider.prototype.getRecentPageLinks = function () {
          var fakeLinks = [];
          for (var i = 0; i < ILinkDataProvider_1.RECENT_PAGES_LIMIT; i++) {
              fakeLinks.push({
                  id: sp_core_library_1.Guid.newGuid(),
                  isSearchResult: Boolean(i % 2),
                  lastEditor: 'Yusong Liu',
                  lastModifiedDate: '4/27/2017',
                  shouldOpenInNewTab: true,
                  title: "recent fake text " + i,
                  url: "https://fakeurl" + i + ".test"
              });
          }
          return Promise.resolve(fakeLinks);
      };
      return MockLinkDataProvider;
  }());
  exports.default = MockLinkDataProvider;
  
  
  /***/ })
  
  });