Liferay.Loader.define('site-navigation-item-selector-web$lodash-es@4.17.15/_createBind', ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    import createCtor from './_createCtor.js';
    import root from './_root.js';

    /** Used to compose bitmasks for function metadata. */
    var WRAP_BIND_FLAG = 1;

    /**
     * Creates a function that wraps `func` to invoke it with the optional `this`
     * binding of `thisArg`.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createBind(func, bitmask, thisArg) {
      var Ctor = createCtor(func);

      function wrapper() {
        var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
        return fn.apply(bitmask & WRAP_BIND_FLAG ? thisArg : this, arguments);
      }
      return wrapper;
    }

    export default createBind;
  }
});
//# sourceMappingURL=_createBind.js.map