function FrameClient() {
    var _this = this;

    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        _ref$target = _ref.target,
        target = _ref$target === void 0 ? parent : _ref$target,
        _ref$timeout = _ref.timeout,
        timeout = _ref$timeout === void 0 ? 30 : _ref$timeout;

    _classCallCheck(this, FrameClient);

    this.target = target;
    this.timeout = timeout;
    this.utils = Utils; // Dynamically defined methods defined in AllowedMethods

    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
      var _loop = function _loop() {
        var methodName = _step.value;

        _this[methodName] =
        /*#__PURE__*/
        function () {
          var _ref2 = _asyncToGenerator(
          /*#__PURE__*/
          regeneratorRuntime.mark(function _callee(args) {
            var callback;
            return regeneratorRuntime.wrap(function _callee$(_context) {
              while (1) {
                switch (_context.prev = _context.next) {
                  case 0:
                    callback = args && args.callback;

                    if (callback) {
                      delete args.callback;
                    }

                    _context.next = 4;
                    return _this.SendMessage({
                      options: {
                        calledMethod: methodName,
                        args: _this.utils.MakeClonable(args)
                      },
                      callback: callback
                    });

                  case 4:
                    return _context.abrupt("return", _context.sent);

                  case 5:
                  case "end":
                    return _context.stop();
                }
              }
            }, _callee);
          }));

          return function (_x) {
            return _ref2.apply(this, arguments);
          };
        }();
      };

      for (var _iterator = this.AllowedMethods()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        _loop();
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator["return"] != null) {
          _iterator["return"]();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }

    this.userProfileClient = {}; // Dynamically defined user profile methods defined in AllowedUserProfileMethods

    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;

    try {
      var _loop2 = function _loop2() {
        var methodName = _step2.value;

        _this.userProfileClient[methodName] =
        /*#__PURE__*/
        function () {
          var _ref3 = _asyncToGenerator(
          /*#__PURE__*/
          regeneratorRuntime.mark(function _callee2(args) {
            var callback;
            return regeneratorRuntime.wrap(function _callee2$(_context2) {
              while (1) {
                switch (_context2.prev = _context2.next) {
                  case 0:
                    callback = args && args.callback;

                    if (callback) {
                      delete args.callback;
                    }

                    _context2.next = 4;
                    return _this.SendMessage({
                      options: {
                        module: "userProfileClient",
                        calledMethod: methodName,
                        args: _this.utils.MakeClonable(args),
                        prompted: FrameClient.PromptedMethods().includes(methodName)
                      },
                      callback: callback
                    });

                  case 4:
                    return _context2.abrupt("return", _context2.sent);

                  case 5:
                  case "end":
                    return _context2.stop();
                }
              }
            }, _callee2);
          }));

          return function (_x2) {
            return _ref3.apply(this, arguments);
          };
        }();
      };

      for (var _iterator2 = this.AllowedUserProfileMethods()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        _loop2();
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
          _iterator2["return"]();
        }
      } finally {
        if (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }
  }
/**
   * FrameClient is a client that looks to the user like an ElvClient, but works by passing messages
   * to another frame with an actual ElvClient instead of making the calls itself.
   *
   * The purpose of this is to isolate users' private keys and the usage thereof in one trusted application,
   * while still allowing other (possibly less trustworthy) applications to communicate with the content fabric
   * on behalf of the user from a sandboxed IFrame.
   *
   * FrameClient has available almost all of the same methods as ElvClient, and should be transparently
   * interchangable with it from a usage perspective.
   *
   * The methods available in FrameClient are generated automatically from ElvClient. These methods will use a
   * messaging protocol to communicate intent to a specified frame, which can listen for such messages, perform
   * the actions using the real ElvClient, and return the results via a response message.
   *
   * Because the privileged frame is doing the actual work, it may decide to allow or disallow any actions
   * it sees fit - for example, limiting a dependent app to a few safe calls while preventing it from making any
   * significant changes.
   *
   * The most important aspect of this architecture is to prevent leaking of users' private keys. Be careful when
   * setting up a project using this architecture - make sure the untrusted app is properly contained in a sandboxed
   * IFrame and served from a different origin than the privileged app.
   *
   * @see test/frames/Parent.html and test/frames/Client.html for an example setup using this scheme
   *
   * @namedParams
   * @param {Object} target - The window or frame that will listen for messages produced by this client
   * @param {number} timeout - How long to wait for a response after calling a method before giving up
   * and generating a timeout error
   */
FrameClient is a client that looks to the user like an ElvClient, but works by passing messages
to another frame with an actual ElvClient instead of making the calls itself.

The purpose of this is to isolate users' private keys and the usage thereof in one trusted application,
while still allowing other (possibly less trustworthy) applications to communicate with the content fabric
on behalf of the user from a sandboxed IFrame.

FrameClient has available almost all of the same methods as ElvClient, and should be transparently
interchangable with it from a usage perspective.

The methods available in FrameClient are generated automatically from ElvClient. These methods will use a
messaging protocol to communicate intent to a specified frame, which can listen for such messages, perform
the actions using the real ElvClient, and return the results via a response message.

Because the privileged frame is doing the actual work, it may decide to allow or disallow any actions
it sees fit - for example, limiting a dependent app to a few safe calls while preventing it from making any
significant changes.

The most important aspect of this architecture is to prevent leaking of users' private keys. Be careful when
setting up a project using this architecture - make sure the untrusted app is properly contained in a sandboxed
IFrame and served from a different origin than the privileged app.

@see test/frames/Parent.html and test/frames/Client.html for an example setup using this scheme

@namedParams
@param {Object} target - The window or frame that will listen for messages produced by this client
@param {number} timeout - How long to wait for a response after calling a method before giving up
and generating a timeout error
FrameClient is a client that looks to the user like an ElvClient but works by passing messages to another frame with an actual ElvClient instead of making the calls itself . The purpose of this is to isolate users ' private keys and the usage thereof in one trusted application while still allowing other ( possibly less trustworthy ) applications to communicate with the content fabric on behalf of the user from a sandboxed IFrame . FrameClient has available almost all of the same methods as ElvClient and should be transparently interchangable with it from a usage perspective . The methods available in FrameClient are generated automatically from ElvClient . These methods will use a messaging protocol to communicate intent to a specified frame which can listen for such messages perform the actions using the real ElvClient and return the results via a response message . Because the privileged frame is doing the actual work it may decide to allow or disallow any actions it sees fit - for example limiting a dependent app to a few safe calls while preventing it from making any significant changes . The most important aspect of this architecture is to prevent leaking of users ' private keys . Be careful when setting up a project using this architecture - make sure the untrusted app is properly contained in a sandboxed IFrame and served from a different origin than the privileged app . @see test / frames / Parent . html and test / frames / Client . html for an example setup using this scheme @namedParams @param { Object } target - The window or frame that will listen for messages produced by this client @param { number } timeout - How long to wait for a response after calling a method before giving up and generating a timeout error
function FrameClient() {
    var _this = this;
    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        _ref$target = _ref.target,
        target = _ref$target === void 0 ? parent : _ref$target,
        _ref$timeout = _ref.timeout,
        timeout = _ref$timeout === void 0 ? 30 : _ref$timeout;
    _classCallCheck(this, FrameClient);
    this.target = target;
    this.timeout = timeout;
    this.utils = Utils; 
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
    try {
      var _loop = function _loop() {
        var methodName = _step.value;
        _this[methodName] =
        function () {
          var _ref2 = _asyncToGenerator(
          regeneratorRuntime.mark(function _callee(args) {
            var callback;
            return regeneratorRuntime.wrap(function _callee$(_context) {
              while (1) {
                switch (_context.prev = _context.next) {
                  case 0:
                    callback = args && args.callback;
                    if (callback) {
                      delete args.callback;
                    }
                    _context.next = 4;
                    return _this.SendMessage({
                      options: {
                        calledMethod: methodName,
                        args: _this.utils.MakeClonable(args)
                      },
                      callback: callback
                    });
                  case 4:
                    return _context.abrupt("return", _context.sent);
                  case 5:
                  case "end":
                    return _context.stop();
                }
              }
            }, _callee);
          }));
          return function (_x) {
            return _ref2.apply(this, arguments);
          };
        }();
      };
      for (var _iterator = this.AllowedMethods()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        _loop();
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator["return"] != null) {
          _iterator["return"]();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
    this.userProfileClient = {}; 
    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;
    try {
      var _loop2 = function _loop2() {
        var methodName = _step2.value;
        _this.userProfileClient[methodName] =
        function () {
          var _ref3 = _asyncToGenerator(
          regeneratorRuntime.mark(function _callee2(args) {
            var callback;
            return regeneratorRuntime.wrap(function _callee2$(_context2) {
              while (1) {
                switch (_context2.prev = _context2.next) {
                  case 0:
                    callback = args && args.callback;
                    if (callback) {
                      delete args.callback;
                    }
                    _context2.next = 4;
                    return _this.SendMessage({
                      options: {
                        module: "userProfileClient",
                        calledMethod: methodName,
                        args: _this.utils.MakeClonable(args),
                        prompted: FrameClient.PromptedMethods().includes(methodName)
                      },
                      callback: callback
                    });
                  case 4:
                    return _context2.abrupt("return", _context2.sent);
                  case 5:
                  case "end":
                    return _context2.stop();
                }
              }
            }, _callee2);
          }));
          return function (_x2) {
            return _ref3.apply(this, arguments);
          };
        }();
      };
      for (var _iterator2 = this.AllowedUserProfileMethods()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        _loop2();
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
          _iterator2["return"]();
        }
      } finally {
        if (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }
  }
function FrameClient ( ) { var _this = this ; var _ref = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } , _ref$target = _ref . target , target = _ref$target === void 0 ? parent : _ref$target , _ref$timeout = _ref . timeout , timeout = _ref$timeout === void 0 ? 30 : _ref$timeout ; _classCallCheck ( this , FrameClient ) ; this . target = target ; this . timeout = timeout ; this . utils = Utils ; var _iteratorNormalCompletion = true ; var _didIteratorError = false ; var _iteratorError = undefined ; try { var _loop = function _loop ( ) { var methodName = _step . value ; _this [ methodName ] = function ( ) { var _ref2 = _asyncToGenerator ( regeneratorRuntime . mark ( function _callee ( args ) { var callback ; return regeneratorRuntime . wrap ( function _callee$ ( _context ) { while ( 1 ) { switch ( _context . prev = _context . next ) { case 0 : callback = args && args . callback ; if ( callback ) { delete args . callback ; } _context . next = 4 ; return _this . SendMessage ( { options : { calledMethod : methodName , args : _this . utils . MakeClonable ( args ) } , callback : callback } ) ; case 4 : return _context . abrupt ( "return" , _context . sent ) ; case 5 : case "end" : return _context . stop ( ) ; } } } , _callee ) ; } ) ) ; return function ( _x ) { return _ref2 . apply ( this , arguments ) ; } ; } ( ) ; } ; for ( var _iterator = this . AllowedMethods ( ) [ Symbol . iterator ] ( ) , _step ; ! ( _iteratorNormalCompletion = ( _step = _iterator . next ( ) ) . done ) ; _iteratorNormalCompletion = true ) { _loop ( ) ; } } catch ( err ) { _didIteratorError = true ; _iteratorError = err ; } finally { try { if ( ! _iteratorNormalCompletion && _iterator [ "return" ] != null ) { _iterator [ "return" ] ( ) ; } } finally { if ( _didIteratorError ) { throw _iteratorError ; } } } this . userProfileClient = { } ; var _iteratorNormalCompletion2 = true ; var _didIteratorError2 = false ; var _iteratorError2 = undefined ; try { var _loop2 = function _loop2 ( ) { var methodName = _step2 . value ; _this . userProfileClient [ methodName ] = function ( ) { var _ref3 = _asyncToGenerator ( regeneratorRuntime . mark ( function _callee2 ( args ) { var callback ; return regeneratorRuntime . wrap ( function _callee2$ ( _context2 ) { while ( 1 ) { switch ( _context2 . prev = _context2 . next ) { case 0 : callback = args && args . callback ; if ( callback ) { delete args . callback ; } _context2 . next = 4 ; return _this . SendMessage ( { options : { module : "userProfileClient" , calledMethod : methodName , args : _this . utils . MakeClonable ( args ) , prompted : FrameClient . PromptedMethods ( ) . includes ( methodName ) } , callback : callback } ) ; case 4 : return _context2 . abrupt ( "return" , _context2 . sent ) ; case 5 : case "end" : return _context2 . stop ( ) ; } } } , _callee2 ) ; } ) ) ; return function ( _x2 ) { return _ref3 . apply ( this , arguments ) ; } ; } ( ) ; } ; for ( var _iterator2 = this . AllowedUserProfileMethods ( ) [ Symbol . iterator ] ( ) , _step2 ; ! ( _iteratorNormalCompletion2 = ( _step2 = _iterator2 . next ( ) ) . done ) ; _iteratorNormalCompletion2 = true ) { _loop2 ( ) ; } } catch ( err ) { _didIteratorError2 = true ; _iteratorError2 = err ; } finally { try { if ( ! _iteratorNormalCompletion2 && _iterator2 [ "return" ] != null ) { _iterator2 [ "return" ] ( ) ; } } finally { if ( _didIteratorError2 ) { throw _iteratorError2 ; } } } }
FrameClient is a client that looks to the user like an ElvClient, but works by passing messages
 to another frame with an actual ElvClient instead of making the calls itself.
FrameClient is a client that looks to the user like an ElvClient but works by passing messages to another frame with an actual ElvClient instead of making the calls itself .
// Dynamically defined methods defined in AllowedMethods /*#__PURE__*/ /*#__PURE__*/ // Dynamically defined user profile methods defined in AllowedUserProfileMethods /*#__PURE__*/ /*#__PURE__*/