function createPopperInstance() {
    var popperOptions = instance.props.popperOptions;
    var _instance$popperChild = instance.popperChildren,
        tooltip = _instance$popperChild.tooltip,
        arrow = _instance$popperChild.arrow;
    var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');

    function applyMutations(data) {
      if (instance.props.flip && !instance.props.flipOnUpdate) {
        if (data.flipped) {
          instance.popperInstance.options.placement = data.placement;
        }

        setFlipModifierEnabled(instance.popperInstance.modifiers, false);
      } // Apply all of the popper's attributes to the tootip node as well.
      // Allows users to avoid using the .tippy-popper selector for themes.


      tooltip.setAttribute(PLACEMENT_ATTRIBUTE, data.placement);

      if (data.attributes[OUT_OF_BOUNDARIES_ATTRIBUTE] !== false) {
        tooltip.setAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE, '');
      } else {
        tooltip.removeAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE);
      } // Prevents a transition when changing placements (while tippy is visible)
      // for scroll/resize updates


      if (previousPlacement && previousPlacement !== data.placement && wasVisibleDuringPreviousUpdate) {
        tooltip.style.transition = 'none';
        requestAnimationFrame(function () {
          tooltip.style.transition = '';
        });
      }

      previousPlacement = data.placement;
      wasVisibleDuringPreviousUpdate = instance.state.isVisible;
      var basicPlacement = getBasicPlacement(popper);
      var styles = tooltip.style; // Account for the `distance` offset

      styles.top = styles.bottom = styles.left = styles.right = '';
      styles[basicPlacement] = getOffsetDistanceInPx(instance.props.distance);
      var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
      var isPaddingNumber = typeof padding === 'number';

      var computedPadding = _extends$2({
        top: isPaddingNumber ? padding : padding.top,
        bottom: isPaddingNumber ? padding : padding.bottom,
        left: isPaddingNumber ? padding : padding.left,
        right: isPaddingNumber ? padding : padding.right
      }, !isPaddingNumber && padding);

      computedPadding[basicPlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basicPlacement] || 0) + instance.props.distance;
      instance.popperInstance.modifiers.filter(function (m) {
        return m.name === 'preventOverflow';
      })[0].padding = computedPadding;
      currentComputedPadding = computedPadding;
    }

    var config = _extends$2({
      eventsEnabled: false,
      placement: instance.props.placement
    }, popperOptions, {
      modifiers: _extends$2({}, popperOptions ? popperOptions.modifiers : {}, {
        preventOverflow: _extends$2({
          boundariesElement: instance.props.boundary,
          padding: PADDING
        }, preventOverflowModifier),
        arrow: _extends$2({
          element: arrow,
          enabled: !!arrow
        }, getModifier(popperOptions, 'arrow')),
        flip: _extends$2({
          enabled: instance.props.flip,
          // The tooltip is offset by 10px from the popper in CSS,
          // we need to account for its distance
          padding: instance.props.distance + PADDING,
          behavior: instance.props.flipBehavior
        }, getModifier(popperOptions, 'flip')),
        offset: _extends$2({
          offset: instance.props.offset
        }, getModifier(popperOptions, 'offset'))
      }),
      onCreate: function onCreate(data) {
        applyMutations(data);
        runMountCallback();

        if (popperOptions && popperOptions.onCreate) {
          popperOptions.onCreate(data);
        }
      },
      onUpdate: function onUpdate(data) {
        applyMutations(data);
        runMountCallback();

        if (popperOptions && popperOptions.onUpdate) {
          popperOptions.onUpdate(data);
        }
      }
    });

    instance.popperInstance = new Popper(reference, popper, config);
  }
/**
   * Creates the popper instance for the instance
   */
Creates the popper instance for the instance
Creates the popper instance for the instance
function createPopperInstance() {
    var popperOptions = instance.props.popperOptions;
    var _instance$popperChild = instance.popperChildren,
        tooltip = _instance$popperChild.tooltip,
        arrow = _instance$popperChild.arrow;
    var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
    function applyMutations(data) {
      if (instance.props.flip && !instance.props.flipOnUpdate) {
        if (data.flipped) {
          instance.popperInstance.options.placement = data.placement;
        }
        setFlipModifierEnabled(instance.popperInstance.modifiers, false);
      } 
      tooltip.setAttribute(PLACEMENT_ATTRIBUTE, data.placement);
      if (data.attributes[OUT_OF_BOUNDARIES_ATTRIBUTE] !== false) {
        tooltip.setAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE, '');
      } else {
        tooltip.removeAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE);
      } 
      if (previousPlacement && previousPlacement !== data.placement && wasVisibleDuringPreviousUpdate) {
        tooltip.style.transition = 'none';
        requestAnimationFrame(function () {
          tooltip.style.transition = '';
        });
      }
      previousPlacement = data.placement;
      wasVisibleDuringPreviousUpdate = instance.state.isVisible;
      var basicPlacement = getBasicPlacement(popper);
      var styles = tooltip.style; 
      styles.top = styles.bottom = styles.left = styles.right = '';
      styles[basicPlacement] = getOffsetDistanceInPx(instance.props.distance);
      var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
      var isPaddingNumber = typeof padding === 'number';
      var computedPadding = _extends$2({
        top: isPaddingNumber ? padding : padding.top,
        bottom: isPaddingNumber ? padding : padding.bottom,
        left: isPaddingNumber ? padding : padding.left,
        right: isPaddingNumber ? padding : padding.right
      }, !isPaddingNumber && padding);
      computedPadding[basicPlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basicPlacement] || 0) + instance.props.distance;
      instance.popperInstance.modifiers.filter(function (m) {
        return m.name === 'preventOverflow';
      })[0].padding = computedPadding;
      currentComputedPadding = computedPadding;
    }
    var config = _extends$2({
      eventsEnabled: false,
      placement: instance.props.placement
    }, popperOptions, {
      modifiers: _extends$2({}, popperOptions ? popperOptions.modifiers : {}, {
        preventOverflow: _extends$2({
          boundariesElement: instance.props.boundary,
          padding: PADDING
        }, preventOverflowModifier),
        arrow: _extends$2({
          element: arrow,
          enabled: !!arrow
        }, getModifier(popperOptions, 'arrow')),
        flip: _extends$2({
          enabled: instance.props.flip,
          padding: instance.props.distance + PADDING,
          behavior: instance.props.flipBehavior
        }, getModifier(popperOptions, 'flip')),
        offset: _extends$2({
          offset: instance.props.offset
        }, getModifier(popperOptions, 'offset'))
      }),
      onCreate: function onCreate(data) {
        applyMutations(data);
        runMountCallback();
        if (popperOptions && popperOptions.onCreate) {
          popperOptions.onCreate(data);
        }
      },
      onUpdate: function onUpdate(data) {
        applyMutations(data);
        runMountCallback();
        if (popperOptions && popperOptions.onUpdate) {
          popperOptions.onUpdate(data);
        }
      }
    });
    instance.popperInstance = new Popper(reference, popper, config);
  }
function createPopperInstance ( ) { var popperOptions = instance . props . popperOptions ; var _instance$popperChild = instance . popperChildren , tooltip = _instance$popperChild . tooltip , arrow = _instance$popperChild . arrow ; var preventOverflowModifier = getModifier ( popperOptions , 'preventOverflow' ) ; function applyMutations ( data ) { if ( instance . props . flip && ! instance . props . flipOnUpdate ) { if ( data . flipped ) { instance . popperInstance . options . placement = data . placement ; } setFlipModifierEnabled ( instance . popperInstance . modifiers , false ) ; } tooltip . setAttribute ( PLACEMENT_ATTRIBUTE , data . placement ) ; if ( data . attributes [ OUT_OF_BOUNDARIES_ATTRIBUTE ] !== false ) { tooltip . setAttribute ( OUT_OF_BOUNDARIES_ATTRIBUTE , '' ) ; } else { tooltip . removeAttribute ( OUT_OF_BOUNDARIES_ATTRIBUTE ) ; } if ( previousPlacement && previousPlacement !== data . placement && wasVisibleDuringPreviousUpdate ) { tooltip . style . transition = 'none' ; requestAnimationFrame ( function ( ) { tooltip . style . transition = '' ; } ) ; } previousPlacement = data . placement ; wasVisibleDuringPreviousUpdate = instance . state . isVisible ; var basicPlacement = getBasicPlacement ( popper ) ; var styles = tooltip . style ; styles . top = styles . bottom = styles . left = styles . right = '' ; styles [ basicPlacement ] = getOffsetDistanceInPx ( instance . props . distance ) ; var padding = preventOverflowModifier && preventOverflowModifier . padding !== undefined ? preventOverflowModifier . padding : PADDING ; var isPaddingNumber = typeof padding === 'number' ; var computedPadding = _extends$2 ( { top : isPaddingNumber ? padding : padding . top , bottom : isPaddingNumber ? padding : padding . bottom , left : isPaddingNumber ? padding : padding . left , right : isPaddingNumber ? padding : padding . right } , ! isPaddingNumber && padding ) ; computedPadding [ basicPlacement ] = isPaddingNumber ? padding + instance . props . distance : ( padding [ basicPlacement ] || 0 ) + instance . props . distance ; instance . popperInstance . modifiers . filter ( function ( m ) { return m . name === 'preventOverflow' ; } ) [ 0 ] . padding = computedPadding ; currentComputedPadding = computedPadding ; } var config = _extends$2 ( { eventsEnabled : false , placement : instance . props . placement } , popperOptions , { modifiers : _extends$2 ( { } , popperOptions ? popperOptions . modifiers : { } , { preventOverflow : _extends$2 ( { boundariesElement : instance . props . boundary , padding : PADDING } , preventOverflowModifier ) , arrow : _extends$2 ( { element : arrow , enabled : ! ! arrow } , getModifier ( popperOptions , 'arrow' ) ) , flip : _extends$2 ( { enabled : instance . props . flip , padding : instance . props . distance + PADDING , behavior : instance . props . flipBehavior } , getModifier ( popperOptions , 'flip' ) ) , offset : _extends$2 ( { offset : instance . props . offset } , getModifier ( popperOptions , 'offset' ) ) } ) , onCreate : function onCreate ( data ) { applyMutations ( data ) ; runMountCallback ( ) ; if ( popperOptions && popperOptions . onCreate ) { popperOptions . onCreate ( data ) ; } } , onUpdate : function onUpdate ( data ) { applyMutations ( data ) ; runMountCallback ( ) ; if ( popperOptions && popperOptions . onUpdate ) { popperOptions . onUpdate ( data ) ; } } } ) ; instance . popperInstance = new Popper ( reference , popper , config ) ; }
Creates the popper instance for the instance
Creates the popper instance for the instance
// Apply all of the popper's attributes to the tootip node as well. // Allows users to avoid using the .tippy-popper selector for themes. // Prevents a transition when changing placements (while tippy is visible) // for scroll/resize updates // Account for the `distance` offset // The tooltip is offset by 10px from the popper in CSS, // we need to account for its distance