Liferay.Loader.define("frontend-js-web@4.0.39/liferay/util/ns.es", ['module', 'exports', 'require', 'frontend-js-web$lodash.memoize'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = _default;

    var _lodash = _interopRequireDefault(require("frontend-js-web$lodash.memoize"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    var cached = function cached(fn) {
      return (0, _lodash.default)(fn, function () {
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }

        return args.length > 1 ? Array.prototype.join.call(args, '_') : String(args[0]);
      });
    };

    var nsCached = cached(function (namespace, str) {
      if (typeof str !== 'undefined' && !(str.lastIndexOf(namespace, 0) === 0)) {
        str = "".concat(namespace).concat(str);
      }

      return str;
    });

    function _default(namespace, obj) {
      var value;

      if (_typeof(obj) !== 'object') {
        value = nsCached(namespace, obj);
      } else {
        value = {};
        var keys = Object.keys(obj);
        keys.forEach(function (item) {
          var originalItem = item;
          item = nsCached(namespace, item);
          value[item] = obj[originalItem];
        });
      }

      return value;
    }
    //# sourceMappingURL=ns.es.js.map
  }
});
//# sourceMappingURL=ns.es.js.map