0
     	ˆÁÀÆ875¿ÅÄ k    	‹      ÕÛËnÚ@à}žbêEw0ÌÍäb\¥8R‘‚bªªªº0Ø`«€‘=	¡O_ÃZ%j£JUÿs<üÇéo¢ÛþøóèŠ}ß\³ÑÇ÷×ƒ>óZœR}Î£qäžÐíŽàüjè1/·v}Îùf³ioT»¬æ||Çs»\h^Ûª˜ÚvjS/<	vûÂäY’6[ØÂ.²p°J³GVÎ/ïm]¤YsÜ¶æiöÀ§yRq}.¯ï'ÍN›-¹µ[Ù}zp·J³.§…ƒI™nw¯'þzíf‰}Ðd²‰ÝÝ*lÎ’E1_õ<[®½0(–sVWÓžÇ‹i¹ªùd‘¬¾µçÅÌcÉÂö¼/ƒþí×¦ŽÛ|wt$,¯²YÏ{×ï/n{‘“eðäùš›¦æÒ¯“Ú²e™³"K_,Ž]q\|yÁÈÕDY=­Šµ-ÊÕS)oZ<nuZ.êuÒôjšòê¸Ê•¤¿;Éô§“1º¼»Ž£Á�;%én‰§t¯y§¼p”TÙÊ²¨¨²©-«-µáÖ|»šÔë‹ÃCF!«bž[/d¬Åž­|Eg³r‘fÕqo/uµ+/Y“øpï8é/ÑdGú-!ZâŒ‰îyÇgì¿èam—�Mû^úfbšð»[Èì¾ƒ™^¸ô3½té%fzåÒ+ÌôÚ¥×˜é�Ko0Óû.½�™¾ëÒw1ÓŸºô§˜éÏ\ú3Ìô‚°¨Ú¸õV¸T\Aä
Ps¡+@ÕÄ® uW¼T^Aô
P{á+@õÄ¯ õW’¿Ô_IþJPåá/¨¿’ü• þJòW‚ú+É_	ê¯$%¨¿’ü• þJòW‚ú+É_	ê¯"¨¿ŠüU þ*òW�ú«_9ƒú«È_ê¯"¨¿ŠüU þ*òW�ú«È_ê¯"¨¿šüÕ þjòWƒú«É_ê¯&5¨¿úð£/¨¿šüÕ þjòWƒú«É_ê¯&5¨¿šüÕ þò×€úkÈ_ê¯!¨¿†ü5 þò×€úk»õ×�¿Ô_CþPùk@ý5ä¯õ×'}P}ò×õ×'}P}ò×õ7¦ù�Aç?¦ù�Aç?¦ù�Aç?¦ù�ÿÅüÿá•bœ®¡øþê¼€»« ‰¼Tp8        ˆ¾‘äÇò 8àC ¥jYC#ŸÏÇƒh¹ÆÅÄ      0
  !   Ã239Âa–äY>”ji?u8 ]¸È.2â˜´oÅ  ï    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
  D   ˆl–ßi~””†»%�À¶¦-ÿ�þc$‹7!d%y¹F@?ÉƒdÈ_�uÐb&=LyZËcõÀÇ Í    # frozen_string_literal: true

require "reline"
require_relative "nop"
require_relative "../color"

# :stopdoc:
module IRB
  module ExtendCommand
    class Ls < Nop
      def execute(*arg, grep: nil)
        o = Output.new(grep: grep)

        obj    = arg.empty? ? irb_context.workspace.main : arg.first
        locals = arg.empty? ? irb_context.workspace.binding.local_variables : []
        klass  = (obj.class == Class || obj.class == Module ? obj : obj.class)

        o.dump("constants", obj.constants) if obj.respond_to?(:constants)
        dump_methods(o, klass, obj)
        o.dump("instance variables", obj.instance_variables)
        o.dump("class variables", klass.class_variables)
        o.dump("locals", locals)
      end

      def dump_methods(o, klass, obj)
        singleton_class = begin obj.singleton_class; rescue TypeError; nil end
        maps = class_method_map((singleton_class || klass).ancestors)
        maps.each do |mod, methods|
          name = mod == singleton_class ? "#{klass}.methods" : "#{mod}#methods"
          o.dump(name, methods)
        end
      end

      def class_method_map(classes)
        dumped = Array.new
        classes.reject { |mod| mod >= Object }.map do |mod|
          methods = mod.public_instance_methods(false).select do |m|
            dumped.push(m) unless dumped.include?(m)
          end
          [mod, methods]
        end.reverse
      end

      class Output
        MARGIN = "  "

        def initialize(grep: nil)
          @grep = grep
          @line_width = screen_width - MARGIN.length # right padding
        end

        def dump(name, strs)
          strs = strs.grep(@grep) if @grep
          strs = strs.sort
          return if strs.empty?

          # Attempt a single line
          print "#{Color.colorize(name, [:BOLD, :BLUE])}: "
          if fits_on_line?(strs, cols: strs.size, offset: "#{name}: ".length)
            puts strs.join(MARGIN)
            return
          end
          puts

          # Dump with the largest # of columns that fits on a line
          cols = strs.size
          until fits_on_line?(strs, cols: cols, offset: MARGIN.length) || cols == 1
            cols -= 1
          end
          widths = col_widths(strs, cols: cols)
          strs.each_slice(cols) do |ss|
            puts ss.map.with_index { |s, i| "#{MARGIN}%-#{widths[i]}s" % s }.join
          end
        end

        private

        def fits_on_line?(strs, cols:, offset: 0)
          width = col_widths(strs, cols: cols).sum + MARGIN.length * (cols - 1)
          width <= @line_width - offset
        end

        def col_widths(strs, cols:)
          cols.times.map do |col|
            (col...strs.size).step(cols).map do |i|
              strs[i].length
            end.ma