text: "use strict";
  
  var _interopRequireWildcard = require("babel-runtime/helpers/interop-require-wildcard")["default"];
  
  exports.__esModule = true;
  
  var _babelTypes = require("babel-types");
  
  var t = _interopRequireWildcard(_babelTypes);
  
  var metadata = {
    group: "builtin-pre"
  };
  
  exports.metadata = metadata;
  function isUseStrict(node) {
    if (!t.isLiteral(node)) return false;
  
    if (node.raw && node.rawValue === node.value) {
      return node.rawValue === "use strict";
    } else {
      return node.value === "use strict";
    }
  }
  
  var visitor = {
    Program: {
      enter: function enter(path) {
        var first = path.node.body[0];
  
        var directive = undefined;
        if (t.isExpressionStatement(first) && isUseStrict(first.expression)) {
          directive = first;
        } else {
          directive = t.expressionStatement(t.stringLiteral("use strict"));
          path.unshiftContainer("body", directive);
          if (first) {
            directive.leadingComments = first.leadingComments;
            first.leadingComments = [];
          }
        }
        directive._blockHoist = Infinity;
      }
    }
  };
  exports.visitor = visitor;