"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

function _object() {
  const data = _interopRequireDefault(require("../objects/object"));

  _object = function () {
    return data;
  };

  return data;
}

class Source extends _object().default {
  constructor(contents) {
    super();
    this.contents = contents;
  }

  id() {
    return this.contents;
  }

  toBuffer() {
    return this.contents;
  }

  toString() {
    return this.contents.toString();
  }

  static parse(contents) {
    return new Source(contents);
  }

  static from(buffer) {
    return new Source(buffer);
  }

}

exports.default = Source;