{"version":3,"sources":["./src/ui/YouTube/YouTubeThumbnail.ts","./src/utils/SVGDom.ts","./src/utils/AccessibleButton.ts","./src/ui/Backdrop/Backdrop.ts","./sass/_AccessibleButton.scss","./sass/_ResultLink.scss","./sass/_Backdrop.scss","./src/ui/ResultLink/ResultLink.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAuE;AACvE,6CAAqD;AAErD,mCAA0C;AAC1C,yCAAgD;AAChD,uCAA4C;AAC5C,yCAAgD;AAChD,qCAA0C;AAC1C,yCAA8C;AAC9C,gDAA4D;AAC5D,8CAAwD;AACxD,uDAAqD;AAErD,2CAAsD;AAQtD;;;;;;;;;;;GAWG;AACH;IAAsC,oCAAS;IA0C7C,0BACS,OAAoB,EACpB,OAAkC,EAClC,QAAoC,EACpC,MAAqB,EACrB,QAAyB;QAAzB,sCAAW,8BAAc;QALlC,YAOE,kBAAM,OAAO,EAAE,gBAAgB,CAAC,EAAE,EAAE,QAAQ,CAAC,SA2C9C;QAjDQ,aAAO,GAAP,OAAO,CAAa;QACpB,aAAO,GAAP,OAAO,CAA2B;QAClC,cAAQ,GAAR,QAAQ,CAA4B;QACpC,YAAM,GAAN,MAAM,CAAe;QACrB,cAAQ,GAAR,QAAQ,CAAiB;QAGhC,KAAI,CAAC,OAAO,GAAG,mCAAgB,CAAC,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAEzF,KAAI,CAAC,UAAU,GAAG,QAAE,CAAC,GAAG,EAAE;YACxB,SAAS,EAAE,qBAAS,CAAC,mBAAmB,CAAC,uBAAU,CAAC;SACrD,CAAC,CAAC;QAEH,IAAM,YAAY,GAAG,QAAE,CAAC,KAAK,EAAE;YAC7B,SAAS,EAAE,mCAAmC;SAC/C,CAAC,CAAC;QAEH,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAExC,IAAM,GAAG,GAAG,QAAE,CAAC,KAAK,EAAE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nD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuCG;QACH,OAAO,EAAE,mCAAgB,CAAC,iBAAiB,CAA0C;YACnF,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;KACH,CAAC;IAoUJ,iBAAC;CAAA,CAtgB+B,qBAAS,GAsgBxC;AAtgBY,gCAAU;AAwgBvB,+BAAc,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC","file":"Backdrop__a32fd127c77e29c02637.js","sourcesContent":["import { ModalBox as ModalBoxModule } from '../../ExternalModulesShim';\nimport { exportGlobally } from '../../GlobalExports';\nimport { IQueryResult } from '../../rest/QueryResult';\nimport { $$, Dom } from '../../utils/Dom';\nimport { DomUtils } from '../../utils/DomUtils';\nimport { SVGDom } from '../../utils/SVGDom';\nimport { SVGIcons } from '../../utils/SVGIcons';\nimport { Utils } from '../../utils/Utils';\nimport { Component } from '../Base/Component';\nimport { ComponentOptions } from '../Base/ComponentOptions';\nimport { Initialization } from '../Base/Initialization';\nimport { get } from '../Base/RegisteredNamedMethods';\nimport { IResultsComponentBindings } from '../Base/ResultsComponentBindings';\nimport { ResultLink } from '../ResultLink/ResultLink';\n\nexport interface IYouTubeThumbnailOptions {\n  width: string;\n  height: string;\n  embed: boolean;\n}\n\n/**\n * The YouTubeThumbnail component automatically fetches the thumbnail of a YouTube video.\n *\n * This component differs from the standard {@link Thumbnail} component because the thumbnail it outputs is always\n * clickable.\n *\n * Depending on the component configuration, clicking a YouTube thumbnail can either automatically open a modal box\n * containing the `iframe` from YouTube, or open the target URL in the current window (see\n * {@link YouTubeThumbnail.options.embed}).\n *\n * This component is a result template component (see [Result Templates](https://developers.coveo.com/x/aIGfAQ)).\n */\nexport class YouTubeThumbnail extends Component {\n  static ID = 'YouTubeThumbnail';\n\n  static doExport = () => {\n    exportGlobally({\n      YouTubeThumbnail: YouTubeThumbnail\n    });\n  };\n\n  /**\n   * @componentOptions\n   */\n  static options: IYouTubeThumbnailOptions = {\n    /**\n     * Specifies the width (in pixels) of the YouTube thumbnail.\n     *\n     * Default value is `200px`.\n     */\n    width: ComponentOptions.buildStringOption({ defaultValue: '200px' }),\n\n    /**\n     * Specifies the height (in pixels) of the YouTube thumbnail.\n     *\n     * Default value is `112px`.\n     */\n    height: ComponentOptions.buildStringOption({ defaultValue: '112px' }),\n\n    /**\n     * Specifies whether clicking on the YouTube thumbnail loads the video in a modal box.\n     *\n     * Setting this option to `false` causes the browser to change its current location to that of the target URL when\n     * the end user clicks the YouTube thumbnail.\n     *\n     * Default value is `true`.\n     */\n    embed: ComponentOptions.buildBooleanOption({ defaultValue: true })\n  };\n\n  public resultLink: Dom;\n\n  private modalbox: Coveo.ModalBox.ModalBox;\n\n  constructor(\n    public element: HTMLElement,\n    public options?: IYouTubeThumbnailOptions,\n    public bindings?: IResultsComponentBindings,\n    public result?: IQueryResult,\n    public ModalBox = ModalBoxModule\n  ) {\n    super(element, YouTubeThumbnail.ID, bindings);\n    this.options = ComponentOptions.initComponentOptions(element, YouTubeThumbnail, options);\n\n    this.resultLink = $$('a', {\n      className: Component.computeCssClassName(ResultLink)\n    });\n\n    const thumbnailDiv = $$('div', {\n      className: 'coveo-youtube-thumbnail-container'\n    });\n\n    this.resultLink.append(thumbnailDiv.el);\n\n    const img = $$('img', {\n      src: Utils.getFieldValue(this.result, 'ytthumbnailurl'),\n      className: 'coveo-youtube-thumbnail-img',\n      alt: this.result.title,\n      title: this.result.title\n    });\n\n    img.el.style.width = this.options.width;\n    img.el.style.height = this.options.height;\n    img.el.onerror = () => {\n      const svgVideo = $$('div', {}, SVGIcons.icons.video).el;\n      SVGDom.addStyleToSVGInContainer(svgVideo, {\n        width: this.options.width\n      });\n      $$(img).remove();\n      thumbnailDiv.append(svgVideo);\n    };\n    thumbnailDiv.append(img.el);\n\n    const span = $$('span', {\n      className: 'coveo-youtube-thumbnail-play-button'\n    });\n\n    thumbnailDiv.append(span.el);\n\n    $$(this.element).append(this.resultLink.el);\n\n    Initialization.automaticallyCreateComponentsInsideResult(element, result, {\n      ResultLink: this.options.embed ? { onClick: () => this.openYoutubeIframe() } : null\n    });\n  }\n\n  /**\n   * Open the result link embedded in this component.\n   *\n   * With a standard configuration of this component, this will open an iframe that automatically plays the video.\n   */\n  public openResultLink() {\n    let resultLinkComponent = <ResultLink>get(this.resultLink.el);\n    resultLinkComponent.openLinkAsConfigured();\n  }\n\n  private openYoutubeIframe() {\n    // need to put iframe inside div : iframe with position absolute and left:0, right : 0 , bottom: 0 is not standard/supported\n    const iframe = $$('iframe', {\n      src: `https://www.youtube.com/embed/${this.extractVideoId()}?autoplay=1`,\n      allowfullscreen: 'allowfullscreen',\n      width: '100%',\n      height: '100%'\n    });\n\n    const div = $$('div');\n\n    div.append(iframe.el);\n\n    this.modalbox = this.ModalBox.open(div.el, {\n      overlayClose: true,\n      title: DomUtils.getQuickviewHeader(this.result, { showDate: true, title: this.result.title }, this.bindings).el,\n      className: 'coveo-youtube-player',\n      validation: () => true,\n      body: this.element.ownerDocument.body,\n      sizeMod: 'big'\n    });\n\n    $$($$(this.modalbox.wrapper).find('.coveo-quickview-close-button')).on('click', () => {\n      this.modalbox.close();\n    });\n  }\n\n  private extractVideoId() {\n    return this.result.clickUri.split('watch?v=')[1];\n  }\n}\nInitialization.registerAutoCreateComponent(YouTubeThumbnail);\n\n\n\n// WEBPACK FOOTER //\n// ./src/ui/YouTube/YouTubeThumbnail.ts","import { IStringMap } from '../rest/GenericParam';\nimport * as _ from 'underscore';\n\nexport class SVGDom {\n  public static addClassToSVGInContainer(svgContainer: HTMLElement, classToAdd: string) {\n    const svgElement = svgContainer.querySelector('svg');\n    svgElement.setAttribute('class', `${SVGDom.getClass(svgElement)}${classToAdd}`);\n  }\n\n  public static removeClassFromSVGInContainer(svgContainer: HTMLElement, classToRemove: string) {\n    const svgElement = svgContainer.querySelector('svg');\n    svgElement.setAttribute('class', SVGDom.getClass(svgElement).replace(classToRemove, ''));\n  }\n\n  public static addStyleToSVGInContainer(svgContainer: HTMLElement, styleToAdd: IStringMap<any>) {\n    const svgElement = svgContainer.querySelector('svg');\n    _.each(styleToAdd, (styleValue, styleKey) => {\n      svgElement.style[styleKey] = styleValue;\n    });\n  }\n\n  private static getClass(svgElement: SVGElement) {\n    const className = svgElement.getAttribute('class');\n    return className ? className + ' ' : '';\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/SVGDom.ts","import { Logger } from '../misc/Logger';\nimport { ComponentEvents } from '../ui/Base/Component';\nimport { KEYBOARD, KeyboardUtils } from '../utils/KeyboardUtils';\nimport { $$, Dom } from './Dom';\nimport 'styling/_AccessibleButton';\n\nexport class AccessibleButton {\n  private element: Dom;\n  private label: string;\n  private title: string;\n\n  private clickAction: (e: Event) => void;\n  private enterKeyboardAction: (e: Event) => void;\n  private blurAction: (e: Event) => void;\n  private mouseleaveAction: (e: Event) => void;\n  private focusAction: (e: Event) => void;\n  private mouseenterAction: (e: Event) => void;\n\n  private logger: Logger;\n  private eventOwner: ComponentEvents;\n\n  public constructor() {\n    this.logger = new Logger(this);\n  }\n\n  public withOwner(owner: ComponentEvents) {\n    this.eventOwner = owner;\n    return this;\n  }\n\n  public withElement(element: Dom | HTMLElement) {\n    if (element instanceof HTMLElement) {\n      this.element = $$(element);\n    } else {\n      this.element = element;\n    }\n    return this;\n  }\n\n  public withLabel(label: string) {\n    this.label = label;\n    return this;\n  }\n\n  public withTitle(title: string) {\n    this.title = title;\n    return this;\n  }\n\n  public withSelectAction(action: (e: Event) => void) {\n    this.clickAction = action;\n    this.enterKeyboardAction = action;\n    return this;\n  }\n\n  public withClickAction(clickAction: (e: Event) => void) {\n    this.clickAction = clickAction;\n    return this;\n  }\n\n  public withEnterKeyboardAction(enterAction: (e: Event) => void) {\n    this.enterKeyboardAction = enterAction;\n    return this;\n  }\n\n  public withFocusAndMouseEnterAction(action: (e: Event) => void) {\n    this.focusAction = action;\n    this.mouseenterAction = action;\n    return this;\n  }\n\n  public withFocusAction(action: (e: Event) => void) {\n    this.focusAction = action;\n    return this;\n  }\n\n  public withMouseEnterAction(action: (e: Event) => void) {\n    this.mouseenterAction = action;\n    return this;\n  }\n\n  public withBlurAndMouseLeaveAction(action: (e: Event) => void) {\n    this.mouseleaveAction = action;\n    this.blurAction = action;\n    return this;\n  }\n\n  public withMouseLeaveAction(action: (e: Event) => void) {\n    this.mouseleaveAction = action;\n    return this;\n  }\n\n  public withBlurAction(action: (e: Event) => void) {\n    this.blurAction = action;\n    return this;\n  }\n\n  public build() {\n    if (!this.element) {\n      this.element = $$('div');\n    }\n\n    this.ensureCorrectRole();\n    this.ensureCorrectLabel();\n    this.ensureTitle();\n    this.ensureSelectAction();\n    this.ensureUnselectAction();\n    this.ensureMouseenterAndFocusAction();\n    this.ensureMouseleaveAndBlurAction();\n    this.ensureDifferentiationBetweenKeyboardAndMouseFocus();\n\n    return this;\n  }\n\n  private ensureDifferentiationBetweenKeyboardAndMouseFocus() {\n    const classOnPress = 'coveo-accessible-button-pressed';\n    const classOnFocus = 'coveo-accessible-button-focused';\n    $$(this.element).addClass('coveo-accessible-button');\n\n    $$(this.element).on('mousedown', () => {\n      $$(this.element).addClass(classOnPress);\n      $$(this.element).removeClass(classOnFocus);\n    });\n\n    $$(this.element).on('mouseup', () => $$(this.element).removeClass(classOnPress));\n    $$(this.element).on('focus', () => {\n      if (!$$(this.element).hasClass(classOnPress)) {\n        $$(this.element).addClass(classOnFocus);\n      }\n    });\n\n    $$(this.element).on('blur', () => $$(this.element).removeClass(classOnFocus));\n  }\n\n  private ensureCorrectRole() {\n    if (!this.element.getAttribute('role')) {\n      this.element.setAttribute('role', 'button');\n    }\n  }\n\n  private ensureCorrectLabel() {\n    if (!this.label) {\n      this.logger.error(`Missing label to create an accessible button !`);\n      return;\n    }\n    this.element.setAttribute('aria-label', this.label);\n  }\n\n  private ensureTitle() {\n    this.title && this.element.setAttribute('title', this.title);\n  }\n\n  private ensureTabIndex() {\n    this.element.setAttribute('tabindex', '0');\n  }\n\n  private ensureSelectAction() {\n    if (this.enterKeyboardAction) {\n      this.ensureTabIndex();\n      this.bindEvent('keyup', KeyboardUtils.keypressAction(KEYBOARD.ENTER, (e: Event) => this.enterKeyboardAction(e)));\n    }\n\n    if (this.clickAction) {\n      this.bindEvent('click', this.clickAction);\n    }\n  }\n\n  private ensureUnselectAction() {\n    if (this.blurAction) {\n      this.bindEvent('blur', this.blurAction);\n    }\n\n    if (this.mouseleaveAction) {\n      this.bindEvent('mouseleave', this.mouseleaveAction);\n    }\n  }\n\n  private ensureMouseenterAndFocusAction() {\n    if (this.mouseenterAction) {\n      this.bindEvent('mouseenter', this.mouseenterAction);\n    }\n    if (this.focusAction) {\n      this.bindEvent('focus', this.focusAction);\n    }\n  }\n\n  private ensureMouseleaveAndBlurAction() {\n    if (this.mouseleaveAction) {\n      this.bindEvent('mouseleave', this.mouseleaveAction);\n    }\n    if (this.blurAction) {\n      this.bindEvent('blur', this.blurAction);\n    }\n  }\n\n  private bindEvent(event: string, action: (...args: any[]) => void) {\n    if (this.eventOwner) {\n      this.eventOwner.on(this.element, event, action);\n    } else {\n      $$(this.element).on(event, action);\n    }\n  }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/AccessibleButton.ts","import { Component } from '../Base/Component';\nimport { ComponentOptions, IFieldOption } from '../Base/ComponentOptions';\nimport { IComponentBindings } from '../Base/ComponentBindings';\nimport { Initialization } from '../Base/Initialization';\nimport { IResultsComponentBindings } from '../Base/ResultsComponentBindings';\nimport { IQueryResult } from '../../rest/QueryResult';\nimport { Utils } from '../../utils/Utils';\nimport { exportGlobally } from '../../GlobalExports';\nimport { YouTubeThumbnail, IYouTubeThumbnailOptions } from '../YouTube/YouTubeThumbnail';\nimport { $$ } from '../../utils/Dom';\nimport { ModalBox as ModalBoxModule } from '../../ExternalModulesShim';\n\nimport 'styling/_Backdrop';\n\nexport interface IBackdropOptions {\n  imageUrl?: string;\n  imageField?: IFieldOption;\n  overlayColor?: string;\n  overlayGradient?: boolean;\n}\n\n/**\n * The Backdrop component renders an image URL (either passed as a direct URL or contained in a result field) as a\n * background image. It is useful for displaying information in front of a dynamic background image.\n *\n * The Backdrop component will automatically initialize components embedded within itself:\n *\n * ```html\n *   <div class=\"CoveoBackdrop\" data-image-field=\"ytthumbnailurl\">\n *     <div class=\"CoveoFieldValue\" data-field=\"somefield\"></div>\n *   </div>\n * ```\n */\nexport class Backdrop extends Component {\n  static ID = 'Backdrop';\n\n  static doExport = () => {\n    exportGlobally({\n      Backdrop: Backdrop\n    });\n  };\n\n  /**\n   * @componentOptions\n   */\n  static options: IBackdropOptions = {\n    /**\n     * Specifies a direct URL from which the background image will be sourced.\n     *\n     * Has priority over {@link Backdrop.options.imageField}.\n     */\n    imageUrl: ComponentOptions.buildStringOption(),\n\n    /**\n     * Specifies the field from which the background image will be pulled.\n     *\n     * If {@link Backdrop.options.imageUrl} is specified, it will override this option.\n     */\n    imageField: ComponentOptions.buildFieldOption(),\n\n    /**\n     * Specifies the color that will be overlaid on top of the background image.\n     * This option needs to be declared as a CSS color. Be sure to use RGBA with an alpha value lower than 1 in order to\n     * be able to see the image behind the overlay color.\n     *\n     * Example value : \"`rgba(101, 123, 76, 0.5)`\"\n     */\n    overlayColor: ComponentOptions.buildColorOption(),\n\n    /**\n     * Specifies whether the overlay color should be instead be rendered as a top-to-bottom gradient from\n     * {@link Backdrop.options.overlayColor} to transparent.\n     *\n     * Default value is `false`.\n     */\n    overlayGradient: ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'overlayColor' })\n  };\n\n  /**\n   * Creates a new Backdrop component.\n   * @param element The HTMLElement on which the component will be instantiated.\n   * @param options The options for the Backdrop component.\n   * @param bindings The bindings that the component requires to function normally. If not set, it will be automatically\n   * resolved (with a slower execution time).\n   * @param result The {@link IQueryResult}.\n   */\n  constructor(\n    public element: HTMLElement,\n    public options?: IBackdropOptions,\n    bindings?: IComponentBindings,\n    public result?: IQueryResult,\n    public _window?: Window,\n    public ModalBox = ModalBoxModule\n  ) {\n    super(element, Backdrop.ID, bindings);\n    this.options = ComponentOptions.initComponentOptions(element, Backdrop, options);\n\n    this._window = this._window || window;\n\n    let background = '';\n    if (this.options.overlayColor) {\n      background +=\n        `linear-gradient(${this.options.overlayColor}, ` +\n        (this.options.overlayGradient ? 'rgba(0,0,0,0)' : this.options.overlayColor) +\n        '), ';\n    }\n\n    const imageSource = this.options.imageUrl || Utils.getFieldValue(result, <string>this.options.imageField);\n    background += `url('${imageSource}') center center`;\n\n    this.element.style.background = background;\n    this.element.style.backgroundSize = 'cover';\n\n    Initialization.automaticallyCreateComponentsInsideResult(element, result);\n    this.configureSpecialBackdropActions();\n  }\n\n  private configureSpecialBackdropActions() {\n    // If the current backdrop is used for a youtube thumbnail, we automatically configure a component for this\n    if (Utils.getFieldValue(this.result, 'ytthumbnailurl')) {\n      // We create the element \"in memory\", but do not append it to the DOM.\n      // We don't want to see a duplicate of the preview for youtube : the backdrop already renders a preview.\n      let thumbnailYouTube = new YouTubeThumbnail(\n        $$('div').el,\n        <IYouTubeThumbnailOptions>{\n          embed: true\n        },\n        <IResultsComponentBindings>this.getBindings(),\n        this.result,\n        this.ModalBox\n      );\n\n      $$(this.element).on('click', (e: MouseEvent) => {\n        // Since the backdrop often contain a result link, we must make sure the click did no originate from one.\n        // Otherwise, we might end up opening 2 results at the same time\n        if (!$$(<HTMLElement>e.target).hasClass('CoveoResultLink')) {\n          thumbnailYouTube.openResultLink();\n        }\n      });\n    }\n  }\n}\n\nInitialization.registerAutoCreateComponent(Backdrop);\n\n\n\n// WEBPACK FOOTER //\n// ./src/ui/Backdrop/Backdrop.ts","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./sass/_AccessibleButton.scss\n// module id = 372\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 14 16 17 18 19 20 21 23 24 25 26 27 29 30 31 37 38 39 40 41 77","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./sass/_ResultLink.scss\n// module id = 373\n// module chunks = 0 18 25 26 27 40 77","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./sass/_Backdrop.scss\n// module id = 428\n// module chunks = 18 77","import { Component } from '../Base/Component';\nimport { ComponentOptions } from '../Base/ComponentOptions';\nimport { ComponentOptionsModel } from '../../models/ComponentOptionsModel';\nimport { IResultsComponentBindings } from '../Base/ResultsComponentBindings';\nimport { analyticsActionCauseList } from '../Analytics/AnalyticsActionListMeta';\nimport { IResultLinkOptions } from './ResultLinkOptions';\nimport { ResultListEvents } from '../../events/ResultListEvents';\nimport { HighlightUtils } from '../../utils/HighlightUtils';\nimport { IQueryResult } from '../../rest/QueryResult';\nimport { DeviceUtils } from '../../utils/DeviceUtils';\nimport { OS_NAME, OSUtils } from '../../utils/OSUtils';\nimport { Initialization } from '../Base/Initialization';\nimport { QueryUtils } from '../../utils/QueryUtils';\nimport { Assert } from '../../misc/Assert';\nimport { Utils } from '../../utils/Utils';\nimport { Defer } from '../../misc/Defer';\nimport { $$ } from '../../utils/Dom';\nimport { StreamHighlightUtils } from '../../utils/StreamHighlightUtils';\nimport * as _ from 'underscore';\nimport { exportGlobally } from '../../GlobalExports';\n\nimport 'styling/_ResultLink';\nimport { AccessibleButton } from '../../utils/AccessibleButton';\n\n/**\n * The `ResultLink` component automatically transform a search result title into a clickable link pointing to the\n * original item.\n *\n * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).\n */\nexport class ResultLink extends Component {\n  static ID = 'ResultLink';\n\n  static doExport = () => {\n    exportGlobally({\n      ResultLink: ResultLink\n    });\n  };\n\n  /**\n   * The options for the ResultLink\n   * @componentOptions\n   */\n  static options: IResultLinkOptions = {\n    /**\n     * Specifies the field to use to output the component `href` attribute value.\n     *\n     * **Tip:**\n     * > Instead of specifying a value for the `field` option, you can directly add an `href` attribute to the\n     * > `ResultLink` HTML element. Then, you can use a custom script to generate the `href` value.\n     *\n     * **Examples:**\n     * - With the following markup, the `ResultLink` outputs its `href` value using the `@uri` field (rather than the\n     * default field):\n     *\n     * ```html\n     * <a class=\"CoveoResultLink\" data-field=\"@uri\"></a>\n     * ```\n     *\n     * - In the following result template, the custom `getMyKBUri()` function provides the `href` value:\n     *\n     * ```html\n     * <script id=\"KnowledgeArticle\" type=\"text/underscore\" class=\"result-template\">\n     *   <div class='CoveoIcon>'></div>\n     *   <a class=\"CoveoResultLink\" href=\"<%= getMyKBUri(raw) %>\"></a>\n     *   <div class=\"CoveoExcerpt\"></div>\n     * </script>\n     * ```\n     *\n     * See also [`hrefTemplate`]{@link ResultLink.options.hrefTemplate}, which can override this option.\n     *\n     * By default, the component uses the `@clickUri` field of the item to output the value of its `href` attribute.\n     */\n    field: ComponentOptions.buildFieldOption(),\n\n    /**\n     * Specifies whether the component should try to open its link in Microsoft Outlook.\n     *\n     * Setting this option to `true` is normally useful for `ResultLink` instances related to Microsoft Exchange emails.\n     *\n     * If this option is `true`, clicking the `ResultLink` calls the\n     * [`openLinkInOutlook`]{@link ResultLink.openLinkInOutlook} method instead of the\n     * [`openLink`]{@link ResultLink.openLink} method.\n     *\n     * Default value is `false`.\n     */\n    openInOutlook: ComponentOptions.buildBooleanOption({ defaultValue: false }),\n\n    /**\n     * Specifies whether the component should open its link in the [`Quickview`]{@link Quickview} component rather than\n     * loading through the original URL.\n     *\n     * Default value is `false`.\n     */\n    openQuickview: ComponentOptions.buildBooleanOption({ defaultValue: false }),\n\n    /**\n     * Specifies whether the component should open its link in a new window instead of opening it in the current\n     * context.\n     *\n     * If this option is `true`, clicking the `ResultLink` calls the\n     * [`openLinkInNewWindow`]{@link ResultLink.openLinkInNewWindow} method instead of the\n     * [`openLink`]{@link ResultLink.openLink} method.\n     *\n     * **Note:**\n     * > If a search page contains a [`ResultPreferences`]{@link ResultsPreferences} component whose\n     * > [`enableOpenInNewWindow`]{@link ResultsPreferences.options.enableOpenInNewWindow} option is `true`, and the end\n     * > user checks the <b>Always open results in new window</b> box, `ResultLink` components in this page will always\n     * > open their links in a new window when the end user clicks them, no matter what the value of their\n     * > `alwaysOpenInNewWindow` option is.\n     *\n     * Default value is `false`.\n     */\n    alwaysOpenInNewWindow: ComponentOptions.buildBooleanOption({ defaultValue: false }),\n\n    /**\n     * Specifies a template literal from which to generate the `ResultLink` `href` attribute value (see\n     * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n     *\n     * This option overrides the [`field`]{@link ResultLink.options.field} option value.\n     *\n     * The template literal can reference any number of fields from the parent result. It can also reference global\n     * scope properties.\n     *\n     * **Examples:**\n     *\n     * - The following markup generates an `href` value such as `http://uri.com?id=itemTitle`:\n     *\n     * ```html\n     * <a class='CoveoResultLink' data-href-template='${clickUri}?id=${raw.title}'></a>\n     * ```\n     *\n     * - The following markup generates an `href` value such as `localhost/fooBar`:\n     *\n     * ```html\n     * <a class='CoveoResultLink' data-href-template='${window.location.hostname}/{Foo.Bar}'></a>\n     * ```\n     *\n     * Default value is `undefined`.\n     */\n    hrefTemplate: ComponentOptions.buildStringOption(),\n\n    /**\n     * Specifies a template literal from which to generate the `ResultLink` display title (see\n     * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n     *\n     * This option overrides the default `ResultLink` display title behavior.\n     *\n     * The template literal can reference any number of fields from the parent result. However, if the template literal\n     * references a key whose value is undefined in the parent result fields, the `ResultLink` title displays the\n     * name of this key instead.\n     *\n     * This option is ignored if the `ResultLink` innerHTML contains any value.\n     *\n     * **Examples:**\n     *\n     * - The following markup generates a `ResultLink` display title such as `Case number: 123456` if both the\n     * `raw.objecttype` and `raw.objectnumber` keys are defined in the parent result fields:\n     *\n     * ```html\n     * <a class=\"CoveoResultLink\" data-title-template=\"${raw.objecttype} number: ${raw.objectnumber}\"></a>\n     * ```\n     *\n     * - The following markup generates `${myField}` as a `ResultLink` display title if the `myField` key is undefined\n     * in the parent result fields:\n     *\n     * ```html\n     * <a class=\"CoveoResultLink\" data-title-template=\"${myField}\"></a>\n     * ```\n     *\n     * - The following markup generates `Foobar` as a `ResultLink` display title, because the `ResultLink` innterHTML is\n     * not empty:\n     *\n     * ```html\n     * <a class=\"CoveoResultLink\" data-title-template=\"${will} ${be} ${ignored}\">Foobar</a>\n     * ```\n     *\n     * Default value is `undefined`.\n     */\n    titleTemplate: ComponentOptions.buildStringOption(),\n\n    /**\n     * Specifies an event handler function to execute when the user clicks the `ResultLink` component.\n     *\n     * The handler function takes a JavaScript [`Event`](https://developer.mozilla.org/en/docs/Web/API/Event) object and\n     * an [`IQueryResult`]{@link IQueryResult} as its parameters.\n     *\n     * Overriding the default behavior of the `onClick` event can allow you to execute specific code instead.\n     *\n     * **Note:**\n     * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the\n     * > [`init`]{@link init} call of your search interface (see\n     * > [Components - Passing Component Options in the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsintheinitCall)),\n     * > or before the `init` call, using the `options` top-level function (see\n     * > [Components - Passing Component Options Before the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsBeforetheinitCall)).\n     *\n     * **Example:**\n     * ```javascript\n     * // You can set the option in the 'init' call:\n     * Coveo.init(document.querySelector(\"#search\"), {\n     *   ResultLink : {\n     *     onClick : function(e, result) {\n     *       e.preventDefault();\n     *       // Custom code to execute with the item URI and title.\n     *       openUriInASpecialTab(result.clickUri, result.title);\n     *     }\n     *   }\n     * });\n     *\n     * // Or before the 'init' call, using the 'options' top-level function:\n     * // Coveo.options(document.querySelector('#search'), {\n     * //   ResultLink : {\n     * //     onClick : function(e, result) {\n     * //       e.preventDefault();\n     * //       // Custom code to execute with the item URI and title.\n     * //       openUriInASpecialTab(result.clickUri, result.title);\n     * //     }\n     * //   }\n     * // });\n     * ```\n     */\n    onClick: ComponentOptions.buildCustomOption<(e: Event, result: IQueryResult) => any>(() => {\n      return null;\n    })\n  };\n\n  private toExecuteOnOpen: (e?: Event) => void;\n\n  /**\n   * Creates a new `ResultLink` component.\n   * @param element The HTMLElement on which to instantiate the component.\n   * @param options The options for the `ResultLink` component.\n   * @param bindings The bindings that the component requires to function normally. If not set, these will be\n   * automatically resolved (with a slower execution time).\n   * @param result The result to associate the component with.\n   * @param os\n   */\n  constructor(\n    public element: HTMLElement,\n    public options: IResultLinkOptions,\n    public bindings?: IResultsComponentBindings,\n    public result?: IQueryResult,\n    public os?: OS_NAME\n  ) {\n    super(element, ResultLink.ID, bindings);\n    this.options = ComponentOptions.initComponentOptions(element, ResultLink, options);\n    this.options = _.extend({}, this.options, this.componentOptionsModel.get(ComponentOptionsModel.attributesEnum.resultLink));\n    this.result = result || this.resolveResult();\n\n    if (this.options.openQuickview == null) {\n      this.options.openQuickview = result.raw['connectortype'] == 'ExchangeCrawler' && DeviceUtils.isMobileDevice();\n    }\n    this.element.setAttribute('tabindex', '0');\n    this.addHeadingRoleIfFirstResultLink();\n\n    Assert.exists(this.componentOptionsModel);\n    Assert.exists(this.result);\n\n    if (!this.quickviewShouldBeOpened()) {\n      // Bind on multiple \"click\" or \"mouse\" events.\n      // Create a function that will be executed only once, so as not to log multiple events\n      // Once a result link has been opened, and that we log at least one analytics event,\n      // it should not matter if the end user open the same link multiple times with different methods.\n      // It's still only one \"click\" event as far as UA is concerned.\n      // Also need to handle \"longpress\" on mobile (the contextual menu), which we assume to be 1 s long.\n\n      const executeOnlyOnce = _.once(() => this.logOpenDocument());\n\n      $$(element).on(['contextmenu', 'click', 'mousedown', 'mouseup'], executeOnlyOnce);\n      let longPressTimer: number;\n      $$(element).on('touchstart', () => {\n        longPressTimer = window.setTimeout(executeOnlyOnce, 1000);\n      });\n      $$(element).on('touchend', () => {\n        if (longPressTimer) {\n          clearTimeout(longPressTimer);\n        }\n      });\n    }\n    this.renderUri(element, result);\n    this.bindEventToOpen();\n  }\n  public renderUri(element: HTMLElement, result?: IQueryResult) {\n    if (/^\\s*$/.test(this.element.innerHTML)) {\n      if (!this.options.titleTemplate) {\n        this.element.innerHTML = this.result.title\n          ? HighlightUtils.highlightString(this.result.title, this.result.titleHighlights, null, 'coveo-highlight')\n          : this.result.clickUri;\n      } else {\n        let newTitle = this.parseStringTemplate(this.options.titleTemplate);\n        this.element.innerHTML = newTitle\n          ? StreamHighlightUtils.highlightStreamText(newTitle, this.result.termsToHighlight, this.result.phrasesToHighlight)\n          : this.result.clickUri;\n      }\n    }\n  }\n  /**\n   * Opens the result in the same window, no matter how the actual component is configured for the end user.\n   * @param logAnalytics Specifies whether the method should log an analytics event.\n   */\n  public openLink(logAnalytics = true) {\n    if (logAnalytics) {\n      this.logOpenDocument();\n    }\n    window.location.href = this.getResultUri();\n  }\n\n  /**\n   * Opens the result in a new window, no matter how the actual component is configured for the end user.\n   * @param logAnalytics Specifies whether the method should log an analytics event.\n   */\n  public openLinkInNewWindow(logAnalytics = true) {\n    if (logAnalytics) {\n      this.logOpenDocument();\n    }\n    window.open(this.getResultUri(), '_blank');\n  }\n\n  /**\n   * Tries to open the result in Microsoft Outlook if the result has an `outlookformacuri` or `outlookuri` field.\n   *\n   * Normally, this implies the result should be a link to an email.\n   *\n   * If the needed fields are not present, this method does nothing.\n   * @param logAnalytics Specifies whether the method should log an analytics event.\n   */\n  public openLinkInOutlook(logAnalytics = true) {\n    if (this.hasOutlookField()) {\n      if (logAnalytics) {\n        this.logOpenDocument();\n      }\n      this.openLink();\n    }\n  }\n\n  /**\n   * Opens the link in the same manner the end user would.\n   *\n   * This essentially simulates a click on the result link.\n   *\n   * @param logAnalytics Specifies whether the method should log an analytics event.\n   */\n  public openLinkAsConfigured(logAnalytics = true) {\n    if (this.toExecuteOnOpen) {\n      if (logAnalytics) {\n        this.logOpenDocument();\n      }\n      this.toExecuteOnOpen();\n    }\n  }\n\n  protected bindEventToOpen(): boolean {\n    return (\n      this.bindOnClickIfNotUndefined() ||\n      this.bindOpenQuickviewIfNotUndefined() ||\n      this.setHrefIfNotAlready() ||\n      this.openLinkThatIsNotAnAnchor()\n    );\n  }\n\n  private addHeadingRoleIfFirstResultLink() {\n    if (!this.isFirstResultLink) {\n      return;\n    }\n\n    this.element.setAttribute('role', 'heading');\n    this.element.setAttribute('aria-level', '2');\n  }\n\n  private get isFirstResultLink() {\n    const resultRoot = $$(this.element).closest('CoveoResult');\n\n    if (!resultRoot) {\n      return false;\n    }\n\n    const resultLinkSelector = `.${Component.computeCssClassNameForType(ResultLink.ID)}`;\n    const firstResultLink = $$(resultRoot).find(resultLinkSelector);\n\n    return firstResultLink === this.element;\n  }\n\n  private bindOnClickIfNotUndefined() {\n    if (this.options.onClick != undefined) {\n      this.toExecuteOnOpen = (e: MouseEvent) => {\n        this.options.onClick.call(this, e, this.result);\n      };\n\n      new AccessibleButton()\n        .withElement(this.element)\n        .withLabel(this.result.title)\n        .withSelectAction((e: Event) => this.toExecuteOnOpen(e))\n        .build();\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  private bindOpenQuickviewIfNotUndefined() {\n    if (this.quickviewShouldBeOpened()) {\n      this.toExecuteOnOpen = () => {\n        $$(this.bindings.resultElement).trigger(ResultListEvents.openQuickview);\n      };\n\n      $$(this.element).on('click', (e: Event) => {\n        e.preventDefault();\n        this.toExecuteOnOpen();\n      });\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  private openLinkThatIsNotAnAnchor() {\n    if (!this.elementIsAnAnchor()) {\n      this.toExecuteOnOpen = () => {\n        if (this.options.alwaysOpenInNewWindow) {\n          if (this.options.openInOutlook) {\n            this.openLinkInOutlook();\n          } else {\n            this.openLinkInNewWindow();\n          }\n        } else {\n          this.openLink();\n        }\n      };\n\n      $$(this.element).on('click', () => {\n        this.toExecuteOnOpen();\n      });\n\n      return true;\n    }\n    return false;\n  }\n\n  private setHrefIfNotAlready() {\n    // Do not erase any value put in href by the template, etc. Allows\n    // using custom click urls while still keeping analytics recording\n    // and other behavior brought by the component.\n    if (this.elementIsAnAnchor() && !Utils.isNonEmptyString($$(this.element).getAttribute('href'))) {\n      $$(this.element).setAttribute('href', this.getResultUri());\n      if (this.options.alwaysOpenInNewWindow && !(this.options.openInOutlook && this.hasOutlookField())) {\n        $$(this.element).setAttribute('target', '_blank');\n      }\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  private logOpenDocument = _.debounce(\n    () => {\n      this.queryController.saveLastQuery();\n      let documentURL = $$(this.element).getAttribute('href');\n      if (documentURL == undefined || documentURL == '') {\n        documentURL = this.result.clickUri;\n      }\n      this.usageAnalytics.logClickEvent(\n        analyticsActionCauseList.documentOpen,\n        {\n          documentURL: documentURL,\n          documentTitle: this.result.title,\n          author: Utils.getFieldValue(this.result, 'author')\n        },\n        this.result,\n        this.root\n      );\n      Defer.flush();\n    },\n    1500,\n    true\n  );\n\n  private getResultUri(): string {\n    if (this.options.hrefTemplate) {\n      return this.parseStringTemplate(this.options.hrefTemplate);\n    }\n    if (this.options.field == undefined && this.options.openInOutlook) {\n      this.setField();\n    }\n    if (this.options.field != undefined) {\n      return Utils.getFieldValue(this.result, <string>this.options.field);\n    } else {\n      return this.result.clickUri;\n    }\n  }\n\n  private elementIsAnAnchor() {\n    return this.element.tagName == 'A';\n  }\n\n  private setField() {\n    let os = Utils.exists(this.os) ? this.os : OSUtils.get();\n    if (os == OS_NAME.MACOSX && this.hasOutlookField()) {\n      this.options.field = '@outlookformacuri';\n    } else if (os == OS_NAME.WINDOWS && this.hasOutlookField()) {\n      this.options.field = '@outlookuri';\n    }\n  }\n\n  private hasOutlookField() {\n    let os = Utils.exists(this.os) ? this.os : OSUtils.get();\n    if (os == OS_NAME.MACOSX && this.result.raw['outlookformacuri'] != undefined) {\n      return true;\n    } else if (os == OS_NAME.WINDOWS && this.result.raw['outlookuri'] != undefined) {\n      return true;\n    }\n    return false;\n  }\n\n  private isUriThatMustBeOpenedInQuickview(): boolean {\n    return this.result.clickUri.toLowerCase().indexOf('ldap://') == 0;\n  }\n\n  private quickviewShouldBeOpened() {\n    return (this.options.openQuickview || this.isUriThatMustBeOpenedInQuickview()) && QueryUtils.hasHTMLVersion(this.result);\n  }\n\n  protected parseStringTemplate(template: string): string {\n    if (!template) {\n      return '';\n    }\n    return template.replace(/\\$\\{(.*?)\\}/g, (value: string) => {\n      let key = value.substring(2, value.length - 1);\n      let newValue = this.readFromObject(this.result, key);\n      if (!newValue) {\n        newValue = this.readFromObject(window, key);\n      }\n      if (!newValue) {\n        this.logger.warn(`${key} used in the ResultLink template is undefined for this result: ${this.result.title}`);\n      }\n      return newValue || value;\n    });\n  }\n\n  private readFromObject(object: Object, key: string): string {\n    if (object && key.indexOf('.') !== -1) {\n      let newKey = key.substring(key.indexOf('.') + 1);\n      key = key.substring(0, key.indexOf('.'));\n      return this.readFromObject(object[key], newKey);\n    }\n    return object ? object[key] : undefined;\n  }\n}\n\nInitialization.registerAutoCreateComponent(ResultLink);\n\n\n\n// WEBPACK FOOTER //\n// ./src/ui/ResultLink/ResultLink.ts"],"sourceRoot":""}