mail 2.6.4 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +111 -118
  3. data/lib/mail/attachments_list.rb +11 -10
  4. data/lib/mail/body.rb +73 -84
  5. data/lib/mail/check_delivery_params.rb +54 -10
  6. data/lib/mail/configuration.rb +2 -0
  7. data/lib/mail/constants.rb +27 -5
  8. data/lib/mail/elements/address.rb +61 -50
  9. data/lib/mail/elements/address_list.rb +11 -19
  10. data/lib/mail/elements/content_disposition_element.rb +9 -16
  11. data/lib/mail/elements/content_location_element.rb +6 -11
  12. data/lib/mail/elements/content_transfer_encoding_element.rb +6 -11
  13. data/lib/mail/elements/content_type_element.rb +16 -23
  14. data/lib/mail/elements/date_time_element.rb +7 -15
  15. data/lib/mail/elements/envelope_from_element.rb +22 -23
  16. data/lib/mail/elements/message_ids_element.rb +18 -13
  17. data/lib/mail/elements/mime_version_element.rb +7 -15
  18. data/lib/mail/elements/phrase_list.rb +12 -10
  19. data/lib/mail/elements/received_element.rb +27 -19
  20. data/lib/mail/encodings/7bit.rb +9 -14
  21. data/lib/mail/encodings/8bit.rb +2 -21
  22. data/lib/mail/encodings/base64.rb +11 -12
  23. data/lib/mail/encodings/binary.rb +3 -22
  24. data/lib/mail/encodings/identity.rb +24 -0
  25. data/lib/mail/encodings/quoted_printable.rb +6 -6
  26. data/lib/mail/encodings/transfer_encoding.rb +38 -29
  27. data/lib/mail/encodings/unix_to_unix.rb +3 -1
  28. data/lib/mail/encodings.rb +81 -54
  29. data/lib/mail/envelope.rb +11 -14
  30. data/lib/mail/field.rb +119 -98
  31. data/lib/mail/field_list.rb +60 -7
  32. data/lib/mail/fields/bcc_field.rb +34 -52
  33. data/lib/mail/fields/cc_field.rb +28 -49
  34. data/lib/mail/fields/comments_field.rb +27 -37
  35. data/lib/mail/fields/common_address_field.rb +170 -0
  36. data/lib/mail/fields/common_date_field.rb +58 -0
  37. data/lib/mail/fields/common_field.rb +77 -0
  38. data/lib/mail/fields/common_message_id_field.rb +42 -0
  39. data/lib/mail/fields/content_description_field.rb +7 -14
  40. data/lib/mail/fields/content_disposition_field.rb +13 -38
  41. data/lib/mail/fields/content_id_field.rb +24 -51
  42. data/lib/mail/fields/content_location_field.rb +11 -25
  43. data/lib/mail/fields/content_transfer_encoding_field.rb +31 -31
  44. data/lib/mail/fields/content_type_field.rb +50 -80
  45. data/lib/mail/fields/date_field.rb +23 -52
  46. data/lib/mail/fields/from_field.rb +28 -49
  47. data/lib/mail/fields/in_reply_to_field.rb +38 -49
  48. data/lib/mail/fields/keywords_field.rb +18 -31
  49. data/lib/mail/fields/message_id_field.rb +25 -71
  50. data/lib/mail/fields/mime_version_field.rb +19 -30
  51. data/lib/mail/fields/named_structured_field.rb +11 -0
  52. data/lib/mail/fields/named_unstructured_field.rb +11 -0
  53. data/lib/mail/fields/optional_field.rb +9 -7
  54. data/lib/mail/fields/{common/parameter_hash.rb → parameter_hash.rb} +13 -11
  55. data/lib/mail/fields/received_field.rb +43 -57
  56. data/lib/mail/fields/references_field.rb +35 -49
  57. data/lib/mail/fields/reply_to_field.rb +28 -49
  58. data/lib/mail/fields/resent_bcc_field.rb +28 -49
  59. data/lib/mail/fields/resent_cc_field.rb +28 -49
  60. data/lib/mail/fields/resent_date_field.rb +5 -30
  61. data/lib/mail/fields/resent_from_field.rb +28 -49
  62. data/lib/mail/fields/resent_message_id_field.rb +5 -29
  63. data/lib/mail/fields/resent_sender_field.rb +27 -56
  64. data/lib/mail/fields/resent_to_field.rb +28 -49
  65. data/lib/mail/fields/return_path_field.rb +50 -54
  66. data/lib/mail/fields/sender_field.rb +34 -55
  67. data/lib/mail/fields/structured_field.rb +3 -30
  68. data/lib/mail/fields/subject_field.rb +9 -11
  69. data/lib/mail/fields/to_field.rb +28 -49
  70. data/lib/mail/fields/unstructured_field.rb +32 -47
  71. data/lib/mail/header.rb +71 -110
  72. data/lib/mail/mail.rb +2 -10
  73. data/lib/mail/matchers/attachment_matchers.rb +15 -0
  74. data/lib/mail/matchers/has_sent_mail.rb +21 -1
  75. data/lib/mail/message.rb +113 -117
  76. data/lib/mail/multibyte/chars.rb +23 -180
  77. data/lib/mail/multibyte/unicode.rb +10 -10
  78. data/lib/mail/multibyte/utils.rb +26 -43
  79. data/lib/mail/multibyte.rb +55 -16
  80. data/lib/mail/network/delivery_methods/exim.rb +8 -11
  81. data/lib/mail/network/delivery_methods/file_delivery.rb +13 -16
  82. data/lib/mail/network/delivery_methods/logger_delivery.rb +34 -0
  83. data/lib/mail/network/delivery_methods/sendmail.rb +32 -35
  84. data/lib/mail/network/delivery_methods/smtp.rb +76 -54
  85. data/lib/mail/network/delivery_methods/smtp_connection.rb +4 -9
  86. data/lib/mail/network/delivery_methods/test_mailer.rb +8 -9
  87. data/lib/mail/network/retriever_methods/base.rb +8 -8
  88. data/lib/mail/network/retriever_methods/imap.rb +20 -7
  89. data/lib/mail/network/retriever_methods/pop3.rb +5 -3
  90. data/lib/mail/network/retriever_methods/test_retriever.rb +3 -2
  91. data/lib/mail/network.rb +1 -0
  92. data/lib/mail/parser_tools.rb +15 -0
  93. data/lib/mail/parsers/address_lists_parser.rb +33225 -116
  94. data/lib/mail/parsers/address_lists_parser.rl +179 -0
  95. data/lib/mail/parsers/content_disposition_parser.rb +882 -49
  96. data/lib/mail/parsers/content_disposition_parser.rl +89 -0
  97. data/lib/mail/parsers/content_location_parser.rb +809 -23
  98. data/lib/mail/parsers/content_location_parser.rl +78 -0
  99. data/lib/mail/parsers/content_transfer_encoding_parser.rb +509 -21
  100. data/lib/mail/parsers/content_transfer_encoding_parser.rl +71 -0
  101. data/lib/mail/parsers/content_type_parser.rb +1037 -56
  102. data/lib/mail/parsers/content_type_parser.rl +90 -0
  103. data/lib/mail/parsers/date_time_parser.rb +877 -25
  104. data/lib/mail/parsers/date_time_parser.rl +69 -0
  105. data/lib/mail/parsers/envelope_from_parser.rb +3669 -40
  106. data/lib/mail/parsers/envelope_from_parser.rl +89 -0
  107. data/lib/mail/parsers/message_ids_parser.rb +5146 -25
  108. data/lib/mail/parsers/message_ids_parser.rl +93 -0
  109. data/lib/mail/parsers/mime_version_parser.rb +497 -26
  110. data/lib/mail/parsers/mime_version_parser.rl +68 -0
  111. data/lib/mail/parsers/phrase_lists_parser.rb +870 -22
  112. data/lib/mail/parsers/phrase_lists_parser.rl +90 -0
  113. data/lib/mail/parsers/received_parser.rb +8776 -43
  114. data/lib/mail/parsers/received_parser.rl +91 -0
  115. data/lib/mail/parsers/rfc2045_content_transfer_encoding.rl +13 -0
  116. data/lib/mail/parsers/rfc2045_content_type.rl +25 -0
  117. data/lib/mail/parsers/rfc2045_mime.rl +16 -0
  118. data/lib/mail/parsers/rfc2183_content_disposition.rl +15 -0
  119. data/lib/mail/parsers/rfc3629_utf8.rl +19 -0
  120. data/lib/mail/parsers/rfc5234_abnf_core_rules.rl +22 -0
  121. data/lib/mail/parsers/rfc5322.rl +74 -0
  122. data/lib/mail/parsers/rfc5322_address.rl +72 -0
  123. data/lib/mail/parsers/{ragel/date_time.rl → rfc5322_date_time.rl} +8 -1
  124. data/lib/mail/parsers/rfc5322_lexical_tokens.rl +60 -0
  125. data/lib/mail/parsers.rb +11 -25
  126. data/lib/mail/part.rb +6 -10
  127. data/lib/mail/parts_list.rb +62 -6
  128. data/lib/mail/smtp_envelope.rb +57 -0
  129. data/lib/mail/utilities.rb +357 -74
  130. data/lib/mail/version.rb +2 -2
  131. data/lib/mail/yaml.rb +30 -0
  132. data/lib/mail.rb +5 -35
  133. metadata +111 -66
  134. data/CHANGELOG.rdoc +0 -787
  135. data/CONTRIBUTING.md +0 -60
  136. data/Dependencies.txt +0 -2
  137. data/Gemfile +0 -11
  138. data/Rakefile +0 -29
  139. data/TODO.rdoc +0 -9
  140. data/lib/mail/core_extensions/smtp.rb +0 -25
  141. data/lib/mail/core_extensions/string/access.rb +0 -146
  142. data/lib/mail/core_extensions/string/multibyte.rb +0 -79
  143. data/lib/mail/core_extensions/string.rb +0 -21
  144. data/lib/mail/fields/common/address_container.rb +0 -17
  145. data/lib/mail/fields/common/common_address.rb +0 -136
  146. data/lib/mail/fields/common/common_date.rb +0 -36
  147. data/lib/mail/fields/common/common_field.rb +0 -61
  148. data/lib/mail/fields/common/common_message_id.rb +0 -49
  149. data/lib/mail/multibyte/exceptions.rb +0 -9
  150. data/lib/mail/parsers/ragel/common.rl +0 -185
  151. data/lib/mail/parsers/ragel/parser_info.rb +0 -61
  152. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb +0 -14864
  153. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl +0 -37
  154. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb +0 -751
  155. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl +0 -37
  156. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb +0 -614
  157. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl +0 -37
  158. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb +0 -447
  159. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl +0 -37
  160. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb +0 -825
  161. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl +0 -37
  162. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb +0 -817
  163. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl +0 -37
  164. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb +0 -2149
  165. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl +0 -37
  166. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb +0 -1570
  167. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl +0 -37
  168. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb +0 -440
  169. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl +0 -37
  170. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb +0 -564
  171. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl +0 -37
  172. data/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl +0 -51
  173. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb +0 -5144
  174. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl +0 -37
  175. data/lib/mail/parsers/ragel/ruby/parser.rb.rl.erb +0 -37
  176. data/lib/mail/parsers/ragel/ruby.rb +0 -40
  177. data/lib/mail/parsers/ragel.rb +0 -18
  178. data/lib/mail/version_specific/ruby_1_8.rb +0 -126
  179. data/lib/mail/version_specific/ruby_1_9.rb +0 -223
@@ -1,67 +1,1048 @@
1
+
1
2
  # frozen_string_literal: true
2
- module Mail::Parsers
3
- class ContentTypeParser
4
- include Mail::Utilities
5
-
6
- def parse(s)
7
- actions, error = Ragel.parse(:content_type, s)
8
- if error
9
- raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, error)
3
+ require "mail/utilities"
4
+ require "mail/parser_tools"
5
+
6
+ begin
7
+ original_verbose, $VERBOSE = $VERBOSE, nil
8
+
9
+ module Mail::Parsers
10
+ module ContentTypeParser
11
+ extend Mail::ParserTools
12
+
13
+ ContentTypeStruct = Struct.new(:main_type, :sub_type, :parameters, :error)
14
+
15
+ class << self
16
+ attr_accessor :_trans_keys
17
+ private :_trans_keys, :_trans_keys=
10
18
  end
19
+ self._trans_keys = [
20
+ 0, 0, 33, 126, 33, 126,
21
+ 33, 126, 9, 126, 10,
22
+ 10, 9, 32, 33, 126,
23
+ 9, 126, 9, 40, 10, 10,
24
+ 9, 32, 1, 244, 1,
25
+ 244, 10, 10, 9, 32,
26
+ 10, 10, 9, 32, 9, 126,
27
+ 9, 126, 10, 10, 9,
28
+ 32, 9, 126, 0, 244,
29
+ 128, 191, 160, 191, 128, 191,
30
+ 128, 159, 144, 191, 128,
31
+ 191, 128, 143, 9, 40,
32
+ 10, 10, 9, 32, 9, 126,
33
+ 1, 244, 1, 244, 10,
34
+ 10, 9, 32, 0, 244,
35
+ 128, 191, 160, 191, 128, 191,
36
+ 128, 159, 144, 191, 128,
37
+ 191, 128, 143, 9, 126,
38
+ 9, 59, 9, 126, 9, 126,
39
+ 9, 126, 9, 126, 9,
40
+ 126, 0, 0, 0,
41
+ ]
11
42
 
12
- content_type = ContentTypeStruct.new(nil,nil,[])
13
-
14
- content_type.parameters = []
15
-
16
- main_type_s = sub_type_s = param_attr_s = param_attr = nil
17
- qstr_s = qstr = param_val_s = nil
18
- actions.each_slice(2) do |action_id, p|
19
- action = Mail::Parsers::Ragel::ACTIONS[action_id]
20
- case action
21
-
22
- # Main Type
23
- when :main_type_s then main_type_s = p
24
- when :main_type_e then
25
- content_type.main_type = s[main_type_s..(p-1)]
26
- content_type.main_type.downcase!
27
-
28
- # Sub Type
29
- when :sub_type_s then sub_type_s = p
30
- when :sub_type_e
31
- content_type.sub_type = s[sub_type_s..(p-1)]
32
- content_type.sub_type.downcase!
33
-
34
- # Parameter Attribute
35
- when :param_attr_s then param_attr_s = p
36
- when :param_attr_e then param_attr = s[param_attr_s..(p-1)]
37
-
38
- # Quoted String.
39
- when :qstr_s then qstr_s = p
40
- when :qstr_e then qstr = s[qstr_s..(p-1)]
41
-
42
- # Parameter Value
43
- when :param_val_s then param_val_s = p
44
- when :param_val_e
45
- if param_attr.nil?
46
- raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, "no attribute for value")
47
- end
43
+ class << self
44
+ attr_accessor :_key_spans
45
+ private :_key_spans, :_key_spans=
46
+ end
47
+ self._key_spans = [
48
+ 0, 94, 94, 94, 118, 1, 24, 94,
49
+ 118, 32, 1, 24, 244, 244, 1, 24,
50
+ 1, 24, 118, 118, 1, 24, 118, 245,
51
+ 64, 32, 64, 32, 48, 64, 16, 32,
52
+ 1, 24, 118, 244, 244, 1, 24, 245,
53
+ 64, 32, 64, 32, 48, 64, 16, 118,
54
+ 51, 118, 118, 118, 118, 118, 0,
55
+ ]
48
56
 
49
- # Use quoted s value if one exists, otherwise use parameter value
50
- if qstr
51
- value = qstr
52
- else
53
- value = s[param_val_s..(p-1)]
54
- end
57
+ class << self
58
+ attr_accessor :_index_offsets
59
+ private :_index_offsets, :_index_offsets=
60
+ end
61
+ self._index_offsets = [
62
+ 0, 0, 95, 190, 285, 404, 406, 431,
63
+ 526, 645, 678, 680, 705, 950, 1195, 1197,
64
+ 1222, 1224, 1249, 1368, 1487, 1489, 1514, 1633,
65
+ 1879, 1944, 1977, 2042, 2075, 2124, 2189, 2206,
66
+ 2239, 2241, 2266, 2385, 2630, 2875, 2877, 2902,
67
+ 3148, 3213, 3246, 3311, 3344, 3393, 3458, 3475,
68
+ 3594, 3646, 3765, 3884, 4003, 4122, 4241,
69
+ ]
70
+
71
+ class << self
72
+ attr_accessor :_indicies
73
+ private :_indicies, :_indicies=
74
+ end
75
+ self._indicies = [
76
+ 0, 0, 0, 0, 0, 0, 0, 1,
77
+ 1, 0, 0, 0, 0, 0, 1, 0,
78
+ 0, 0, 0, 0, 0, 0, 0, 0,
79
+ 0, 1, 1, 1, 1, 1, 1, 1,
80
+ 0, 0, 0, 0, 0, 0, 0, 0,
81
+ 0, 0, 0, 0, 0, 0, 0, 0,
82
+ 0, 0, 0, 0, 0, 0, 0, 0,
83
+ 0, 0, 1, 1, 1, 0, 0, 0,
84
+ 0, 0, 0, 0, 0, 0, 0, 0,
85
+ 0, 0, 0, 0, 0, 0, 0, 0,
86
+ 0, 0, 0, 0, 0, 0, 0, 0,
87
+ 0, 0, 0, 0, 0, 0, 1, 2,
88
+ 2, 2, 2, 2, 2, 2, 1, 1,
89
+ 2, 2, 2, 2, 2, 3, 2, 2,
90
+ 2, 2, 2, 2, 2, 2, 2, 2,
91
+ 1, 1, 1, 1, 1, 1, 1, 2,
92
+ 2, 2, 2, 2, 2, 2, 2, 2,
93
+ 2, 2, 2, 2, 2, 2, 2, 2,
94
+ 2, 2, 2, 2, 2, 2, 2, 2,
95
+ 2, 1, 1, 1, 2, 2, 2, 2,
96
+ 2, 2, 2, 2, 2, 2, 2, 2,
97
+ 2, 2, 2, 2, 2, 2, 2, 2,
98
+ 2, 2, 2, 2, 2, 2, 2, 2,
99
+ 2, 2, 2, 2, 2, 1, 4, 4,
100
+ 4, 4, 4, 4, 4, 1, 1, 4,
101
+ 4, 4, 4, 4, 1, 4, 4, 4,
102
+ 4, 4, 4, 4, 4, 4, 4, 1,
103
+ 1, 1, 1, 1, 1, 1, 4, 4,
104
+ 4, 4, 4, 4, 4, 4, 4, 4,
105
+ 4, 4, 4, 4, 4, 4, 4, 4,
106
+ 4, 4, 4, 4, 4, 4, 4, 4,
107
+ 1, 1, 1, 4, 4, 4, 4, 4,
108
+ 4, 4, 4, 4, 4, 4, 4, 4,
109
+ 4, 4, 4, 4, 4, 4, 4, 4,
110
+ 4, 4, 4, 4, 4, 4, 4, 4,
111
+ 4, 4, 4, 4, 1, 5, 1, 1,
112
+ 1, 6, 1, 1, 1, 1, 1, 1,
113
+ 1, 1, 1, 1, 1, 1, 1, 1,
114
+ 1, 1, 1, 1, 5, 7, 7, 7,
115
+ 7, 7, 7, 7, 8, 1, 7, 7,
116
+ 7, 7, 7, 1, 7, 7, 7, 7,
117
+ 7, 7, 7, 7, 7, 7, 1, 9,
118
+ 1, 1, 1, 1, 1, 7, 7, 7,
119
+ 7, 7, 7, 7, 7, 7, 7, 7,
120
+ 7, 7, 7, 7, 7, 7, 7, 7,
121
+ 7, 7, 7, 7, 7, 7, 7, 1,
122
+ 1, 1, 7, 7, 7, 7, 7, 7,
123
+ 7, 7, 7, 7, 7, 7, 7, 7,
124
+ 7, 7, 7, 7, 7, 7, 7, 7,
125
+ 7, 7, 7, 7, 7, 7, 7, 7,
126
+ 7, 7, 7, 1, 10, 1, 5, 1,
127
+ 1, 1, 1, 1, 1, 1, 1, 1,
128
+ 1, 1, 1, 1, 1, 1, 1, 1,
129
+ 1, 1, 1, 1, 1, 5, 1, 11,
130
+ 11, 11, 11, 11, 11, 11, 1, 1,
131
+ 11, 11, 11, 11, 11, 1, 11, 11,
132
+ 11, 11, 11, 11, 11, 11, 11, 11,
133
+ 1, 1, 1, 12, 1, 1, 1, 11,
134
+ 11, 11, 11, 11, 11, 11, 11, 11,
135
+ 11, 11, 11, 11, 11, 11, 11, 11,
136
+ 11, 11, 11, 11, 11, 11, 11, 11,
137
+ 11, 1, 1, 1, 11, 11, 11, 11,
138
+ 11, 11, 11, 11, 11, 11, 11, 11,
139
+ 11, 11, 11, 11, 11, 11, 11, 11,
140
+ 11, 11, 11, 11, 11, 11, 11, 11,
141
+ 11, 11, 11, 11, 11, 1, 13, 1,
142
+ 1, 1, 14, 1, 1, 1, 1, 1,
143
+ 1, 1, 1, 1, 1, 1, 1, 1,
144
+ 1, 1, 1, 1, 1, 13, 15, 16,
145
+ 15, 15, 15, 15, 15, 17, 1, 15,
146
+ 15, 15, 15, 15, 1, 15, 15, 15,
147
+ 15, 15, 15, 15, 15, 15, 15, 1,
148
+ 1, 1, 15, 1, 1, 1, 15, 15,
149
+ 15, 15, 15, 15, 15, 15, 15, 15,
150
+ 15, 15, 15, 15, 15, 15, 15, 15,
151
+ 15, 15, 15, 15, 15, 15, 15, 15,
152
+ 1, 1, 1, 15, 15, 15, 15, 15,
153
+ 15, 15, 15, 15, 15, 15, 15, 15,
154
+ 15, 15, 15, 15, 15, 15, 15, 15,
155
+ 15, 15, 15, 15, 15, 15, 15, 15,
156
+ 15, 15, 15, 15, 1, 18, 1, 1,
157
+ 1, 19, 1, 1, 1, 1, 1, 1,
158
+ 1, 1, 1, 1, 1, 1, 1, 1,
159
+ 1, 1, 1, 1, 18, 1, 20, 1,
160
+ 1, 1, 1, 1, 21, 1, 22, 1,
161
+ 18, 1, 1, 1, 1, 1, 1, 1,
162
+ 1, 1, 1, 1, 1, 1, 1, 1,
163
+ 1, 1, 1, 1, 1, 1, 1, 18,
164
+ 1, 23, 23, 23, 23, 23, 23, 23,
165
+ 23, 23, 1, 23, 23, 24, 23, 23,
166
+ 23, 23, 23, 23, 23, 23, 23, 23,
167
+ 23, 23, 23, 23, 23, 23, 23, 23,
168
+ 23, 23, 25, 23, 23, 23, 23, 23,
169
+ 23, 23, 23, 23, 23, 23, 23, 23,
170
+ 23, 23, 23, 23, 23, 23, 23, 23,
171
+ 23, 23, 23, 23, 23, 23, 23, 23,
172
+ 23, 23, 23, 23, 23, 23, 23, 23,
173
+ 23, 23, 23, 23, 23, 23, 23, 23,
174
+ 23, 23, 23, 23, 23, 23, 23, 23,
175
+ 23, 23, 23, 23, 26, 23, 23, 23,
176
+ 23, 23, 23, 23, 23, 23, 23, 23,
177
+ 23, 23, 23, 23, 23, 23, 23, 23,
178
+ 23, 23, 23, 23, 23, 23, 23, 23,
179
+ 23, 23, 23, 23, 23, 23, 23, 23,
180
+ 1, 1, 1, 1, 1, 1, 1, 1,
181
+ 1, 1, 1, 1, 1, 1, 1, 1,
182
+ 1, 1, 1, 1, 1, 1, 1, 1,
183
+ 1, 1, 1, 1, 1, 1, 1, 1,
184
+ 1, 1, 1, 1, 1, 1, 1, 1,
185
+ 1, 1, 1, 1, 1, 1, 1, 1,
186
+ 1, 1, 1, 1, 1, 1, 1, 1,
187
+ 1, 1, 1, 1, 1, 1, 1, 1,
188
+ 1, 1, 27, 27, 27, 27, 27, 27,
189
+ 27, 27, 27, 27, 27, 27, 27, 27,
190
+ 27, 27, 27, 27, 27, 27, 27, 27,
191
+ 27, 27, 27, 27, 27, 27, 27, 27,
192
+ 28, 29, 29, 29, 29, 29, 29, 29,
193
+ 29, 29, 29, 29, 29, 30, 29, 29,
194
+ 31, 32, 32, 32, 33, 1, 34, 34,
195
+ 34, 34, 34, 34, 34, 34, 34, 1,
196
+ 34, 34, 35, 34, 34, 34, 34, 34,
197
+ 34, 34, 34, 34, 34, 34, 34, 34,
198
+ 34, 34, 34, 34, 34, 34, 34, 36,
199
+ 34, 34, 34, 34, 34, 34, 34, 34,
200
+ 34, 34, 34, 34, 34, 34, 34, 34,
201
+ 34, 34, 34, 34, 34, 34, 34, 34,
202
+ 34, 34, 34, 34, 34, 34, 34, 34,
203
+ 34, 34, 34, 34, 34, 34, 34, 34,
204
+ 34, 34, 34, 34, 34, 34, 34, 34,
205
+ 34, 34, 34, 34, 34, 34, 34, 34,
206
+ 34, 37, 34, 34, 34, 34, 34, 34,
207
+ 34, 34, 34, 34, 34, 34, 34, 34,
208
+ 34, 34, 34, 34, 34, 34, 34, 34,
209
+ 34, 34, 34, 34, 34, 34, 34, 34,
210
+ 34, 34, 34, 34, 34, 1, 1, 1,
211
+ 1, 1, 1, 1, 1, 1, 1, 1,
212
+ 1, 1, 1, 1, 1, 1, 1, 1,
213
+ 1, 1, 1, 1, 1, 1, 1, 1,
214
+ 1, 1, 1, 1, 1, 1, 1, 1,
215
+ 1, 1, 1, 1, 1, 1, 1, 1,
216
+ 1, 1, 1, 1, 1, 1, 1, 1,
217
+ 1, 1, 1, 1, 1, 1, 1, 1,
218
+ 1, 1, 1, 1, 1, 1, 1, 38,
219
+ 38, 38, 38, 38, 38, 38, 38, 38,
220
+ 38, 38, 38, 38, 38, 38, 38, 38,
221
+ 38, 38, 38, 38, 38, 38, 38, 38,
222
+ 38, 38, 38, 38, 38, 39, 40, 40,
223
+ 40, 40, 40, 40, 40, 40, 40, 40,
224
+ 40, 40, 41, 40, 40, 42, 43, 43,
225
+ 43, 44, 1, 45, 1, 34, 1, 1,
226
+ 1, 1, 1, 1, 1, 1, 1, 1,
227
+ 1, 1, 1, 1, 1, 1, 1, 1,
228
+ 1, 1, 1, 1, 34, 1, 46, 1,
229
+ 47, 1, 1, 1, 1, 1, 1, 1,
230
+ 1, 1, 1, 1, 1, 1, 1, 1,
231
+ 1, 1, 1, 1, 1, 1, 1, 47,
232
+ 1, 48, 1, 1, 1, 49, 1, 1,
233
+ 1, 1, 1, 1, 1, 1, 1, 1,
234
+ 1, 1, 1, 1, 1, 1, 1, 1,
235
+ 48, 7, 7, 7, 7, 7, 7, 7,
236
+ 50, 1, 7, 7, 7, 7, 7, 1,
237
+ 7, 7, 7, 7, 7, 7, 7, 7,
238
+ 7, 7, 1, 9, 1, 1, 1, 1,
239
+ 1, 7, 7, 7, 7, 7, 7, 7,
240
+ 7, 7, 7, 7, 7, 7, 7, 7,
241
+ 7, 7, 7, 7, 7, 7, 7, 7,
242
+ 7, 7, 7, 1, 1, 1, 7, 7,
243
+ 7, 7, 7, 7, 7, 7, 7, 7,
244
+ 7, 7, 7, 7, 7, 7, 7, 7,
245
+ 7, 7, 7, 7, 7, 7, 7, 7,
246
+ 7, 7, 7, 7, 7, 7, 7, 1,
247
+ 48, 1, 1, 1, 49, 1, 1, 1,
248
+ 1, 1, 1, 1, 1, 1, 1, 1,
249
+ 1, 1, 1, 1, 1, 1, 1, 48,
250
+ 7, 7, 7, 7, 7, 7, 7, 50,
251
+ 1, 7, 7, 7, 7, 7, 1, 7,
252
+ 7, 7, 7, 7, 7, 7, 7, 7,
253
+ 7, 1, 1, 1, 1, 1, 1, 1,
254
+ 7, 7, 7, 7, 7, 7, 7, 7,
255
+ 7, 7, 7, 7, 7, 7, 7, 7,
256
+ 7, 7, 7, 7, 7, 7, 7, 7,
257
+ 7, 7, 1, 1, 1, 7, 7, 7,
258
+ 7, 7, 7, 7, 7, 7, 7, 7,
259
+ 7, 7, 7, 7, 7, 7, 7, 7,
260
+ 7, 7, 7, 7, 7, 7, 7, 7,
261
+ 7, 7, 7, 7, 7, 7, 1, 51,
262
+ 1, 48, 1, 1, 1, 1, 1, 1,
263
+ 1, 1, 1, 1, 1, 1, 1, 1,
264
+ 1, 1, 1, 1, 1, 1, 1, 1,
265
+ 48, 1, 52, 1, 1, 1, 53, 1,
266
+ 1, 1, 1, 1, 1, 1, 1, 1,
267
+ 1, 1, 1, 1, 1, 1, 1, 1,
268
+ 1, 52, 54, 54, 54, 54, 54, 54,
269
+ 54, 55, 1, 54, 54, 54, 54, 54,
270
+ 1, 54, 54, 54, 54, 54, 54, 54,
271
+ 54, 54, 54, 1, 1, 1, 1, 1,
272
+ 1, 1, 54, 54, 54, 54, 54, 54,
273
+ 54, 54, 54, 54, 54, 54, 54, 54,
274
+ 54, 54, 54, 54, 54, 54, 54, 54,
275
+ 54, 54, 54, 54, 1, 1, 1, 54,
276
+ 54, 54, 54, 54, 54, 54, 54, 54,
277
+ 54, 54, 54, 54, 54, 54, 54, 54,
278
+ 54, 54, 54, 54, 54, 54, 54, 54,
279
+ 54, 54, 54, 54, 54, 54, 54, 54,
280
+ 1, 34, 34, 34, 34, 34, 34, 34,
281
+ 34, 34, 34, 34, 34, 34, 34, 34,
282
+ 34, 34, 34, 34, 34, 34, 34, 34,
283
+ 34, 34, 34, 34, 34, 34, 34, 34,
284
+ 34, 34, 34, 34, 34, 34, 34, 34,
285
+ 34, 34, 34, 34, 34, 34, 34, 34,
286
+ 34, 34, 34, 34, 34, 34, 34, 34,
287
+ 34, 34, 34, 34, 34, 34, 34, 34,
288
+ 34, 34, 34, 34, 34, 34, 34, 34,
289
+ 34, 34, 34, 34, 34, 34, 34, 34,
290
+ 34, 34, 34, 34, 34, 34, 34, 34,
291
+ 34, 34, 34, 34, 34, 34, 34, 34,
292
+ 34, 34, 34, 34, 34, 34, 34, 34,
293
+ 34, 34, 34, 34, 34, 34, 34, 34,
294
+ 34, 34, 34, 34, 34, 34, 34, 34,
295
+ 34, 34, 34, 34, 34, 34, 34, 34,
296
+ 34, 1, 1, 1, 1, 1, 1, 1,
297
+ 1, 1, 1, 1, 1, 1, 1, 1,
298
+ 1, 1, 1, 1, 1, 1, 1, 1,
299
+ 1, 1, 1, 1, 1, 1, 1, 1,
300
+ 1, 1, 1, 1, 1, 1, 1, 1,
301
+ 1, 1, 1, 1, 1, 1, 1, 1,
302
+ 1, 1, 1, 1, 1, 1, 1, 1,
303
+ 1, 1, 1, 1, 1, 1, 1, 1,
304
+ 1, 1, 1, 38, 38, 38, 38, 38,
305
+ 38, 38, 38, 38, 38, 38, 38, 38,
306
+ 38, 38, 38, 38, 38, 38, 38, 38,
307
+ 38, 38, 38, 38, 38, 38, 38, 38,
308
+ 38, 39, 40, 40, 40, 40, 40, 40,
309
+ 40, 40, 40, 40, 40, 40, 41, 40,
310
+ 40, 42, 43, 43, 43, 44, 1, 34,
311
+ 34, 34, 34, 34, 34, 34, 34, 34,
312
+ 34, 34, 34, 34, 34, 34, 34, 34,
313
+ 34, 34, 34, 34, 34, 34, 34, 34,
314
+ 34, 34, 34, 34, 34, 34, 34, 34,
315
+ 34, 34, 34, 34, 34, 34, 34, 34,
316
+ 34, 34, 34, 34, 34, 34, 34, 34,
317
+ 34, 34, 34, 34, 34, 34, 34, 34,
318
+ 34, 34, 34, 34, 34, 34, 34, 1,
319
+ 38, 38, 38, 38, 38, 38, 38, 38,
320
+ 38, 38, 38, 38, 38, 38, 38, 38,
321
+ 38, 38, 38, 38, 38, 38, 38, 38,
322
+ 38, 38, 38, 38, 38, 38, 38, 38,
323
+ 1, 38, 38, 38, 38, 38, 38, 38,
324
+ 38, 38, 38, 38, 38, 38, 38, 38,
325
+ 38, 38, 38, 38, 38, 38, 38, 38,
326
+ 38, 38, 38, 38, 38, 38, 38, 38,
327
+ 38, 38, 38, 38, 38, 38, 38, 38,
328
+ 38, 38, 38, 38, 38, 38, 38, 38,
329
+ 38, 38, 38, 38, 38, 38, 38, 38,
330
+ 38, 38, 38, 38, 38, 38, 38, 38,
331
+ 38, 1, 38, 38, 38, 38, 38, 38,
332
+ 38, 38, 38, 38, 38, 38, 38, 38,
333
+ 38, 38, 38, 38, 38, 38, 38, 38,
334
+ 38, 38, 38, 38, 38, 38, 38, 38,
335
+ 38, 38, 1, 40, 40, 40, 40, 40,
336
+ 40, 40, 40, 40, 40, 40, 40, 40,
337
+ 40, 40, 40, 40, 40, 40, 40, 40,
338
+ 40, 40, 40, 40, 40, 40, 40, 40,
339
+ 40, 40, 40, 40, 40, 40, 40, 40,
340
+ 40, 40, 40, 40, 40, 40, 40, 40,
341
+ 40, 40, 40, 1, 40, 40, 40, 40,
342
+ 40, 40, 40, 40, 40, 40, 40, 40,
343
+ 40, 40, 40, 40, 40, 40, 40, 40,
344
+ 40, 40, 40, 40, 40, 40, 40, 40,
345
+ 40, 40, 40, 40, 40, 40, 40, 40,
346
+ 40, 40, 40, 40, 40, 40, 40, 40,
347
+ 40, 40, 40, 40, 40, 40, 40, 40,
348
+ 40, 40, 40, 40, 40, 40, 40, 40,
349
+ 40, 40, 40, 40, 1, 40, 40, 40,
350
+ 40, 40, 40, 40, 40, 40, 40, 40,
351
+ 40, 40, 40, 40, 40, 1, 56, 1,
352
+ 1, 1, 57, 1, 1, 1, 1, 1,
353
+ 1, 1, 1, 1, 1, 1, 1, 1,
354
+ 1, 1, 1, 1, 1, 56, 1, 58,
355
+ 1, 1, 1, 1, 1, 59, 1, 60,
356
+ 1, 61, 1, 1, 1, 1, 1, 1,
357
+ 1, 1, 1, 1, 1, 1, 1, 1,
358
+ 1, 1, 1, 1, 1, 1, 1, 1,
359
+ 61, 1, 62, 1, 1, 1, 63, 1,
360
+ 1, 1, 1, 1, 1, 1, 1, 1,
361
+ 1, 1, 1, 1, 1, 1, 1, 1,
362
+ 1, 62, 54, 54, 54, 54, 54, 54,
363
+ 54, 64, 1, 54, 54, 54, 54, 54,
364
+ 1, 54, 54, 54, 54, 54, 54, 54,
365
+ 54, 54, 54, 1, 65, 1, 1, 1,
366
+ 1, 1, 54, 54, 54, 54, 54, 54,
367
+ 54, 54, 54, 54, 54, 54, 54, 54,
368
+ 54, 54, 54, 54, 54, 54, 54, 54,
369
+ 54, 54, 54, 54, 1, 1, 1, 54,
370
+ 54, 54, 54, 54, 54, 54, 54, 54,
371
+ 54, 54, 54, 54, 54, 54, 54, 54,
372
+ 54, 54, 54, 54, 54, 54, 54, 54,
373
+ 54, 54, 54, 54, 54, 54, 54, 54,
374
+ 1, 66, 66, 66, 66, 66, 66, 66,
375
+ 66, 66, 1, 66, 66, 67, 66, 66,
376
+ 66, 66, 66, 66, 66, 66, 66, 66,
377
+ 66, 66, 66, 66, 66, 66, 66, 66,
378
+ 66, 66, 66, 66, 66, 66, 66, 66,
379
+ 68, 69, 66, 66, 66, 66, 66, 66,
380
+ 66, 66, 66, 66, 66, 66, 66, 66,
381
+ 66, 66, 66, 66, 66, 66, 66, 66,
382
+ 66, 66, 66, 66, 66, 66, 66, 66,
383
+ 66, 66, 66, 66, 66, 66, 66, 66,
384
+ 66, 66, 66, 66, 66, 66, 66, 66,
385
+ 66, 66, 66, 66, 70, 66, 66, 66,
386
+ 66, 66, 66, 66, 66, 66, 66, 66,
387
+ 66, 66, 66, 66, 66, 66, 66, 66,
388
+ 66, 66, 66, 66, 66, 66, 66, 66,
389
+ 66, 66, 66, 66, 66, 66, 66, 66,
390
+ 1, 1, 1, 1, 1, 1, 1, 1,
391
+ 1, 1, 1, 1, 1, 1, 1, 1,
392
+ 1, 1, 1, 1, 1, 1, 1, 1,
393
+ 1, 1, 1, 1, 1, 1, 1, 1,
394
+ 1, 1, 1, 1, 1, 1, 1, 1,
395
+ 1, 1, 1, 1, 1, 1, 1, 1,
396
+ 1, 1, 1, 1, 1, 1, 1, 1,
397
+ 1, 1, 1, 1, 1, 1, 1, 1,
398
+ 1, 1, 71, 71, 71, 71, 71, 71,
399
+ 71, 71, 71, 71, 71, 71, 71, 71,
400
+ 71, 71, 71, 71, 71, 71, 71, 71,
401
+ 71, 71, 71, 71, 71, 71, 71, 71,
402
+ 72, 73, 73, 73, 73, 73, 73, 73,
403
+ 73, 73, 73, 73, 73, 74, 73, 73,
404
+ 75, 76, 76, 76, 77, 1, 78, 78,
405
+ 78, 78, 78, 78, 78, 78, 78, 1,
406
+ 78, 78, 79, 78, 78, 78, 78, 78,
407
+ 78, 78, 78, 78, 78, 78, 78, 78,
408
+ 78, 78, 78, 78, 78, 78, 78, 78,
409
+ 78, 78, 78, 78, 78, 80, 81, 78,
410
+ 78, 78, 78, 78, 78, 78, 78, 78,
411
+ 78, 78, 78, 78, 78, 78, 78, 78,
412
+ 78, 78, 78, 78, 78, 78, 78, 78,
413
+ 78, 78, 78, 78, 78, 78, 78, 78,
414
+ 78, 78, 78, 78, 78, 78, 78, 78,
415
+ 78, 78, 78, 78, 78, 78, 78, 78,
416
+ 78, 82, 78, 78, 78, 78, 78, 78,
417
+ 78, 78, 78, 78, 78, 78, 78, 78,
418
+ 78, 78, 78, 78, 78, 78, 78, 78,
419
+ 78, 78, 78, 78, 78, 78, 78, 78,
420
+ 78, 78, 78, 78, 78, 1, 1, 1,
421
+ 1, 1, 1, 1, 1, 1, 1, 1,
422
+ 1, 1, 1, 1, 1, 1, 1, 1,
423
+ 1, 1, 1, 1, 1, 1, 1, 1,
424
+ 1, 1, 1, 1, 1, 1, 1, 1,
425
+ 1, 1, 1, 1, 1, 1, 1, 1,
426
+ 1, 1, 1, 1, 1, 1, 1, 1,
427
+ 1, 1, 1, 1, 1, 1, 1, 1,
428
+ 1, 1, 1, 1, 1, 1, 1, 83,
429
+ 83, 83, 83, 83, 83, 83, 83, 83,
430
+ 83, 83, 83, 83, 83, 83, 83, 83,
431
+ 83, 83, 83, 83, 83, 83, 83, 83,
432
+ 83, 83, 83, 83, 83, 84, 85, 85,
433
+ 85, 85, 85, 85, 85, 85, 85, 85,
434
+ 85, 85, 86, 85, 85, 87, 88, 88,
435
+ 88, 89, 1, 90, 1, 78, 1, 1,
436
+ 1, 1, 1, 1, 1, 1, 1, 1,
437
+ 1, 1, 1, 1, 1, 1, 1, 1,
438
+ 1, 1, 1, 1, 78, 1, 78, 78,
439
+ 78, 78, 78, 78, 78, 78, 78, 78,
440
+ 78, 78, 78, 78, 78, 78, 78, 78,
441
+ 78, 78, 78, 78, 78, 78, 78, 78,
442
+ 78, 78, 78, 78, 78, 78, 78, 78,
443
+ 78, 78, 78, 78, 78, 78, 78, 78,
444
+ 78, 78, 78, 78, 78, 78, 78, 78,
445
+ 78, 78, 78, 78, 78, 78, 78, 78,
446
+ 78, 78, 78, 78, 78, 78, 78, 78,
447
+ 78, 78, 78, 78, 78, 78, 78, 78,
448
+ 78, 78, 78, 78, 78, 78, 78, 78,
449
+ 78, 78, 78, 78, 78, 78, 78, 78,
450
+ 78, 78, 78, 78, 78, 78, 78, 78,
451
+ 78, 78, 78, 78, 78, 78, 78, 78,
452
+ 78, 78, 78, 78, 78, 78, 78, 78,
453
+ 78, 78, 78, 78, 78, 78, 78, 78,
454
+ 78, 78, 78, 78, 78, 78, 1, 1,
455
+ 1, 1, 1, 1, 1, 1, 1, 1,
456
+ 1, 1, 1, 1, 1, 1, 1, 1,
457
+ 1, 1, 1, 1, 1, 1, 1, 1,
458
+ 1, 1, 1, 1, 1, 1, 1, 1,
459
+ 1, 1, 1, 1, 1, 1, 1, 1,
460
+ 1, 1, 1, 1, 1, 1, 1, 1,
461
+ 1, 1, 1, 1, 1, 1, 1, 1,
462
+ 1, 1, 1, 1, 1, 1, 1, 1,
463
+ 83, 83, 83, 83, 83, 83, 83, 83,
464
+ 83, 83, 83, 83, 83, 83, 83, 83,
465
+ 83, 83, 83, 83, 83, 83, 83, 83,
466
+ 83, 83, 83, 83, 83, 83, 84, 85,
467
+ 85, 85, 85, 85, 85, 85, 85, 85,
468
+ 85, 85, 85, 86, 85, 85, 87, 88,
469
+ 88, 88, 89, 1, 78, 78, 78, 78,
470
+ 78, 78, 78, 78, 78, 78, 78, 78,
471
+ 78, 78, 78, 78, 78, 78, 78, 78,
472
+ 78, 78, 78, 78, 78, 78, 78, 78,
473
+ 78, 78, 78, 78, 78, 78, 78, 78,
474
+ 78, 78, 78, 78, 78, 78, 78, 78,
475
+ 78, 78, 78, 78, 78, 78, 78, 78,
476
+ 78, 78, 78, 78, 78, 78, 78, 78,
477
+ 78, 78, 78, 78, 1, 83, 83, 83,
478
+ 83, 83, 83, 83, 83, 83, 83, 83,
479
+ 83, 83, 83, 83, 83, 83, 83, 83,
480
+ 83, 83, 83, 83, 83, 83, 83, 83,
481
+ 83, 83, 83, 83, 83, 1, 83, 83,
482
+ 83, 83, 83, 83, 83, 83, 83, 83,
483
+ 83, 83, 83, 83, 83, 83, 83, 83,
484
+ 83, 83, 83, 83, 83, 83, 83, 83,
485
+ 83, 83, 83, 83, 83, 83, 83, 83,
486
+ 83, 83, 83, 83, 83, 83, 83, 83,
487
+ 83, 83, 83, 83, 83, 83, 83, 83,
488
+ 83, 83, 83, 83, 83, 83, 83, 83,
489
+ 83, 83, 83, 83, 83, 83, 1, 83,
490
+ 83, 83, 83, 83, 83, 83, 83, 83,
491
+ 83, 83, 83, 83, 83, 83, 83, 83,
492
+ 83, 83, 83, 83, 83, 83, 83, 83,
493
+ 83, 83, 83, 83, 83, 83, 83, 1,
494
+ 85, 85, 85, 85, 85, 85, 85, 85,
495
+ 85, 85, 85, 85, 85, 85, 85, 85,
496
+ 85, 85, 85, 85, 85, 85, 85, 85,
497
+ 85, 85, 85, 85, 85, 85, 85, 85,
498
+ 85, 85, 85, 85, 85, 85, 85, 85,
499
+ 85, 85, 85, 85, 85, 85, 85, 85,
500
+ 1, 85, 85, 85, 85, 85, 85, 85,
501
+ 85, 85, 85, 85, 85, 85, 85, 85,
502
+ 85, 85, 85, 85, 85, 85, 85, 85,
503
+ 85, 85, 85, 85, 85, 85, 85, 85,
504
+ 85, 85, 85, 85, 85, 85, 85, 85,
505
+ 85, 85, 85, 85, 85, 85, 85, 85,
506
+ 85, 85, 85, 85, 85, 85, 85, 85,
507
+ 85, 85, 85, 85, 85, 85, 85, 85,
508
+ 85, 1, 85, 85, 85, 85, 85, 85,
509
+ 85, 85, 85, 85, 85, 85, 85, 85,
510
+ 85, 85, 1, 91, 1, 1, 1, 92,
511
+ 1, 1, 1, 1, 1, 1, 1, 1,
512
+ 1, 1, 1, 1, 1, 1, 1, 1,
513
+ 1, 1, 91, 93, 93, 93, 93, 93,
514
+ 93, 93, 94, 1, 93, 93, 93, 93,
515
+ 93, 1, 93, 93, 93, 93, 93, 93,
516
+ 93, 93, 93, 93, 1, 95, 1, 1,
517
+ 1, 1, 1, 93, 93, 93, 93, 93,
518
+ 93, 93, 93, 93, 93, 93, 93, 93,
519
+ 93, 93, 93, 93, 93, 93, 93, 93,
520
+ 93, 93, 93, 93, 93, 1, 1, 1,
521
+ 93, 93, 93, 93, 93, 93, 93, 93,
522
+ 93, 93, 93, 93, 93, 93, 93, 93,
523
+ 93, 93, 93, 93, 93, 93, 93, 93,
524
+ 93, 93, 93, 93, 93, 93, 93, 93,
525
+ 93, 1, 96, 1, 1, 1, 97, 1,
526
+ 1, 1, 1, 1, 1, 1, 1, 1,
527
+ 1, 1, 1, 1, 1, 1, 1, 1,
528
+ 1, 96, 1, 1, 1, 1, 1, 1,
529
+ 1, 98, 1, 1, 1, 1, 1, 1,
530
+ 1, 1, 1, 1, 1, 1, 1, 1,
531
+ 1, 1, 1, 1, 99, 1, 96, 1,
532
+ 1, 1, 97, 1, 1, 1, 1, 1,
533
+ 1, 1, 1, 1, 1, 1, 1, 1,
534
+ 1, 1, 1, 1, 1, 96, 7, 7,
535
+ 7, 7, 7, 7, 7, 98, 1, 7,
536
+ 7, 7, 7, 7, 1, 7, 7, 7,
537
+ 7, 7, 7, 7, 7, 7, 7, 1,
538
+ 99, 1, 1, 1, 1, 1, 7, 7,
539
+ 7, 7, 7, 7, 7, 7, 7, 7,
540
+ 7, 7, 7, 7, 7, 7, 7, 7,
541
+ 7, 7, 7, 7, 7, 7, 7, 7,
542
+ 1, 1, 1, 7, 7, 7, 7, 7,
543
+ 7, 7, 7, 7, 7, 7, 7, 7,
544
+ 7, 7, 7, 7, 7, 7, 7, 7,
545
+ 7, 7, 7, 7, 7, 7, 7, 7,
546
+ 7, 7, 7, 7, 1, 100, 1, 1,
547
+ 1, 101, 1, 1, 1, 1, 1, 1,
548
+ 1, 1, 1, 1, 1, 1, 1, 1,
549
+ 1, 1, 1, 1, 100, 54, 54, 54,
550
+ 54, 54, 54, 54, 102, 1, 54, 54,
551
+ 54, 54, 54, 1, 54, 54, 54, 54,
552
+ 54, 54, 54, 54, 54, 54, 1, 103,
553
+ 1, 1, 1, 1, 1, 54, 54, 54,
554
+ 54, 54, 54, 54, 54, 54, 54, 54,
555
+ 54, 54, 54, 54, 54, 54, 54, 54,
556
+ 54, 54, 54, 54, 54, 54, 54, 1,
557
+ 1, 1, 54, 54, 54, 54, 54, 54,
558
+ 54, 54, 54, 54, 54, 54, 54, 54,
559
+ 54, 54, 54, 54, 54, 54, 54, 54,
560
+ 54, 54, 54, 54, 54, 54, 54, 54,
561
+ 54, 54, 54, 1, 104, 1, 1, 1,
562
+ 105, 1, 1, 1, 1, 1, 1, 1,
563
+ 1, 1, 1, 1, 1, 1, 1, 1,
564
+ 1, 1, 1, 104, 106, 1, 106, 106,
565
+ 106, 106, 106, 107, 1, 106, 106, 106,
566
+ 106, 106, 1, 106, 106, 106, 106, 106,
567
+ 106, 106, 106, 106, 106, 1, 99, 1,
568
+ 106, 1, 1, 1, 106, 106, 106, 106,
569
+ 106, 106, 106, 106, 106, 106, 106, 106,
570
+ 106, 106, 106, 106, 106, 106, 106, 106,
571
+ 106, 106, 106, 106, 106, 106, 1, 1,
572
+ 1, 106, 106, 106, 106, 106, 106, 106,
573
+ 106, 106, 106, 106, 106, 106, 106, 106,
574
+ 106, 106, 106, 106, 106, 106, 106, 106,
575
+ 106, 106, 106, 106, 106, 106, 106, 106,
576
+ 106, 106, 1, 61, 1, 1, 1, 108,
577
+ 1, 1, 1, 1, 1, 1, 1, 1,
578
+ 1, 1, 1, 1, 1, 1, 1, 1,
579
+ 1, 1, 61, 7, 7, 7, 7, 7,
580
+ 7, 7, 109, 1, 7, 7, 7, 7,
581
+ 7, 1, 7, 7, 7, 7, 7, 7,
582
+ 7, 7, 7, 7, 1, 9, 1, 1,
583
+ 1, 1, 1, 7, 7, 7, 7, 7,
584
+ 7, 7, 7, 7, 7, 7, 7, 7,
585
+ 7, 7, 7, 7, 7, 7, 7, 7,
586
+ 7, 7, 7, 7, 7, 1, 1, 1,
587
+ 7, 7, 7, 7, 7, 7, 7, 7,
588
+ 7, 7, 7, 7, 7, 7, 7, 7,
589
+ 7, 7, 7, 7, 7, 7, 7, 7,
590
+ 7, 7, 7, 7, 7, 7, 7, 7,
591
+ 7, 1, 110, 1, 1, 1, 111, 1,
592
+ 1, 1, 1, 1, 1, 1, 1, 1,
593
+ 1, 1, 1, 1, 1, 1, 1, 1,
594
+ 1, 110, 54, 54, 54, 54, 54, 54,
595
+ 54, 112, 1, 54, 54, 54, 54, 54,
596
+ 1, 54, 54, 54, 54, 54, 54, 54,
597
+ 54, 54, 54, 1, 65, 1, 1, 1,
598
+ 1, 1, 54, 54, 54, 54, 54, 54,
599
+ 54, 54, 54, 54, 54, 54, 54, 54,
600
+ 54, 54, 54, 54, 54, 54, 54, 54,
601
+ 54, 54, 54, 54, 1, 1, 1, 54,
602
+ 54, 54, 54, 54, 54, 54, 54, 54,
603
+ 54, 54, 54, 54, 54, 54, 54, 54,
604
+ 54, 54, 54, 54, 54, 54, 54, 54,
605
+ 54, 54, 54, 54, 54, 54, 54, 54,
606
+ 1, 1, 0,
607
+ ]
608
+
609
+ class << self
610
+ attr_accessor :_trans_targs
611
+ private :_trans_targs, :_trans_targs=
612
+ end
613
+ self._trans_targs = [
614
+ 2, 0, 2, 3, 47, 4, 5, 7,
615
+ 34, 18, 6, 7, 8, 9, 10, 51,
616
+ 12, 31, 9, 10, 12, 31, 11, 13,
617
+ 14, 48, 23, 24, 25, 26, 27, 28,
618
+ 29, 30, 13, 14, 48, 23, 24, 25,
619
+ 26, 27, 28, 29, 30, 15, 17, 49,
620
+ 19, 20, 22, 21, 19, 20, 7, 22,
621
+ 9, 10, 12, 31, 33, 52, 4, 5,
622
+ 34, 18, 36, 37, 36, 54, 39, 40,
623
+ 41, 42, 43, 44, 45, 46, 36, 37,
624
+ 36, 54, 39, 40, 41, 42, 43, 44,
625
+ 45, 46, 38, 4, 5, 47, 34, 18,
626
+ 49, 16, 50, 18, 49, 16, 50, 18,
627
+ 52, 32, 51, 53, 32, 53, 52, 32,
628
+ 53,
629
+ ]
630
+
631
+ class << self
632
+ attr_accessor :_trans_actions
633
+ private :_trans_actions, :_trans_actions=
634
+ end
635
+ self._trans_actions = [
636
+ 1, 0, 0, 2, 3, 0, 0, 4,
637
+ 5, 0, 0, 0, 6, 7, 7, 7,
638
+ 7, 8, 0, 0, 0, 5, 0, 9,
639
+ 9, 10, 9, 9, 9, 9, 9, 9,
640
+ 9, 9, 0, 0, 11, 0, 0, 0,
641
+ 0, 0, 0, 0, 0, 0, 0, 0,
642
+ 0, 0, 5, 0, 12, 12, 13, 14,
643
+ 12, 12, 12, 14, 0, 0, 12, 12,
644
+ 14, 12, 15, 15, 16, 17, 15, 15,
645
+ 15, 15, 15, 15, 15, 15, 0, 0,
646
+ 5, 18, 0, 0, 0, 0, 0, 0,
647
+ 0, 0, 0, 19, 19, 0, 20, 19,
648
+ 21, 21, 22, 21, 23, 23, 24, 23,
649
+ 21, 21, 0, 25, 0, 5, 12, 12,
650
+ 14,
651
+ ]
652
+
653
+ class << self
654
+ attr_accessor :_eof_actions
655
+ private :_eof_actions, :_eof_actions=
656
+ end
657
+ self._eof_actions = [
658
+ 0, 0, 0, 0, 0, 0, 0, 0,
659
+ 0, 0, 0, 0, 0, 0, 0, 0,
660
+ 0, 0, 0, 0, 0, 0, 0, 0,
661
+ 0, 0, 0, 0, 0, 0, 0, 0,
662
+ 0, 0, 0, 0, 0, 0, 0, 0,
663
+ 0, 0, 0, 0, 0, 0, 0, 19,
664
+ 21, 21, 23, 21, 0, 12, 0,
665
+ ]
666
+
667
+ class << self
668
+ attr_accessor :start
669
+ end
670
+ self.start = 1
671
+ class << self
672
+ attr_accessor :first_final
673
+ end
674
+ self.first_final = 47
675
+ class << self
676
+ attr_accessor :error
677
+ end
678
+ self.error = 0
679
+
680
+ class << self
681
+ attr_accessor :en_comment_tail
682
+ end
683
+ self.en_comment_tail = 35
684
+ class << self
685
+ attr_accessor :en_main
686
+ end
687
+ self.en_main = 1
55
688
 
56
- content_type.parameters << { param_attr => value }
57
- param_attr = nil
58
- qstr = nil
689
+ def self.parse(data)
690
+ data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
59
691
 
60
- else
61
- raise Mail::Field::ParseError.new(Mail::ContentTypeElement, s, "Failed to process unknown action: #{action}")
692
+ return ContentTypeStruct.new("text", "plain", []) if Mail::Utilities.blank?(data)
693
+ content_type = ContentTypeStruct.new(nil, nil, [])
694
+
695
+ # Parser state
696
+ main_type_s = sub_type_s = param_attr_s = param_attr = nil
697
+ qstr_s = qstr = param_val_s = nil
698
+
699
+ # 5.1 Variables Used by Ragel
700
+ p = 0
701
+ eof = pe = data.length
702
+ stack = []
703
+
704
+ begin
705
+ p ||= 0
706
+ pe ||= data.length
707
+ cs = start
708
+ top = 0
62
709
  end
710
+
711
+ begin
712
+ testEof = false
713
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
714
+ _goto_level = 0
715
+ _resume = 10
716
+ _eof_trans = 15
717
+ _again = 20
718
+ _test_eof = 30
719
+ _out = 40
720
+ while true
721
+ if _goto_level <= 0
722
+ if p == pe
723
+ _goto_level = _test_eof
724
+ next
725
+ end
726
+ if cs == 0
727
+ _goto_level = _out
728
+ next
729
+ end
730
+ end
731
+ if _goto_level <= _resume
732
+ _keys = cs << 1
733
+ _inds = _index_offsets[cs]
734
+ _slen = _key_spans[cs]
735
+ _wide = data[p].ord
736
+ _trans = if (_slen > 0 &&
737
+ _trans_keys[_keys] <= _wide &&
738
+ _wide <= _trans_keys[_keys + 1])
739
+ _indicies[_inds + _wide - _trans_keys[_keys]]
740
+ else
741
+ _indicies[_inds + _slen]
742
+ end
743
+ cs = _trans_targs[_trans]
744
+ if _trans_actions[_trans] != 0
745
+ case _trans_actions[_trans]
746
+ when 1
747
+ begin
748
+ main_type_s = p
749
+ end
750
+ when 2
751
+ begin
752
+ content_type.main_type = chars(data, main_type_s, p - 1).downcase
753
+ end
754
+ when 3
755
+ begin
756
+ sub_type_s = p
757
+ end
758
+ when 19
759
+ begin
760
+ content_type.sub_type = chars(data, sub_type_s, p - 1).downcase
761
+ end
762
+ when 4
763
+ begin
764
+ param_attr_s = p
765
+ end
766
+ when 6
767
+ begin
768
+ param_attr = chars(data, param_attr_s, p - 1)
769
+ end
770
+ when 9
771
+ begin
772
+ qstr_s = p
773
+ end
774
+ when 11
775
+ begin
776
+ qstr = chars(data, qstr_s, p - 1)
777
+ end
778
+ when 7
779
+ begin
780
+ param_val_s = p
781
+ end
782
+ when 21
783
+ begin
784
+ if param_attr.nil?
785
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
786
+ end
787
+
788
+ # Use quoted s value if one exists, otherwise use parameter value
789
+ value = qstr || chars(data, param_val_s, p - 1)
790
+
791
+ content_type.parameters << {param_attr => value}
792
+ param_attr = nil
793
+ qstr = nil
794
+ end
795
+ when 12
796
+ begin
797
+ end
798
+ when 15
799
+ begin
800
+ end
801
+ when 5
802
+ begin
803
+ begin
804
+ stack[top] = cs
805
+ top += 1
806
+ cs = 35
807
+ _goto_level = _again
808
+ next
809
+ end
810
+ end
811
+ when 18
812
+ begin
813
+ begin
814
+ top -= 1
815
+ cs = stack[top]
816
+ _goto_level = _again
817
+ next
818
+ end
819
+ end
820
+ when 20
821
+ begin
822
+ content_type.sub_type = chars(data, sub_type_s, p - 1).downcase
823
+ end
824
+ begin
825
+ begin
826
+ stack[top] = cs
827
+ top += 1
828
+ cs = 35
829
+ _goto_level = _again
830
+ next
831
+ end
832
+ end
833
+ when 10
834
+ begin
835
+ qstr_s = p
836
+ end
837
+ begin
838
+ qstr = chars(data, qstr_s, p - 1)
839
+ end
840
+ when 8
841
+ begin
842
+ param_val_s = p
843
+ end
844
+ begin
845
+ begin
846
+ stack[top] = cs
847
+ top += 1
848
+ cs = 35
849
+ _goto_level = _again
850
+ next
851
+ end
852
+ end
853
+ when 25
854
+ begin
855
+ if param_attr.nil?
856
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
857
+ end
858
+
859
+ # Use quoted s value if one exists, otherwise use parameter value
860
+ value = qstr || chars(data, param_val_s, p - 1)
861
+
862
+ content_type.parameters << {param_attr => value}
863
+ param_attr = nil
864
+ qstr = nil
865
+ end
866
+ begin
867
+ begin
868
+ stack[top] = cs
869
+ top += 1
870
+ cs = 35
871
+ _goto_level = _again
872
+ next
873
+ end
874
+ end
875
+ when 13
876
+ begin
877
+ end
878
+ begin
879
+ param_attr_s = p
880
+ end
881
+ when 23
882
+ begin
883
+ end
884
+ begin
885
+ if param_attr.nil?
886
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
887
+ end
888
+
889
+ # Use quoted s value if one exists, otherwise use parameter value
890
+ value = qstr || chars(data, param_val_s, p - 1)
891
+
892
+ content_type.parameters << {param_attr => value}
893
+ param_attr = nil
894
+ qstr = nil
895
+ end
896
+ when 14
897
+ begin
898
+ end
899
+ begin
900
+ begin
901
+ stack[top] = cs
902
+ top += 1
903
+ cs = 35
904
+ _goto_level = _again
905
+ next
906
+ end
907
+ end
908
+ when 16
909
+ begin
910
+ end
911
+ begin
912
+ begin
913
+ stack[top] = cs
914
+ top += 1
915
+ cs = 35
916
+ _goto_level = _again
917
+ next
918
+ end
919
+ end
920
+ when 17
921
+ begin
922
+ end
923
+ begin
924
+ begin
925
+ top -= 1
926
+ cs = stack[top]
927
+ _goto_level = _again
928
+ next
929
+ end
930
+ end
931
+ when 22
932
+ begin
933
+ begin
934
+ stack[top] = cs
935
+ top += 1
936
+ cs = 35
937
+ _goto_level = _again
938
+ next
939
+ end
940
+ end
941
+ begin
942
+ if param_attr.nil?
943
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
944
+ end
945
+
946
+ # Use quoted s value if one exists, otherwise use parameter value
947
+ value = qstr || chars(data, param_val_s, p - 1)
948
+
949
+ content_type.parameters << {param_attr => value}
950
+ param_attr = nil
951
+ qstr = nil
952
+ end
953
+ when 24
954
+ begin
955
+ end
956
+ begin
957
+ begin
958
+ stack[top] = cs
959
+ top += 1
960
+ cs = 35
961
+ _goto_level = _again
962
+ next
963
+ end
964
+ end
965
+ begin
966
+ if param_attr.nil?
967
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
968
+ end
969
+
970
+ # Use quoted s value if one exists, otherwise use parameter value
971
+ value = qstr || chars(data, param_val_s, p - 1)
972
+
973
+ content_type.parameters << {param_attr => value}
974
+ param_attr = nil
975
+ qstr = nil
976
+ end
977
+ end
978
+ end
979
+ end
980
+ if _goto_level <= _again
981
+ if cs == 0
982
+ _goto_level = _out
983
+ next
984
+ end
985
+ p += 1
986
+ if p != pe
987
+ _goto_level = _resume
988
+ next
989
+ end
990
+ end
991
+ if _goto_level <= _test_eof
992
+ if p == eof
993
+ case _eof_actions[cs]
994
+ when 19
995
+ begin
996
+ content_type.sub_type = chars(data, sub_type_s, p - 1).downcase
997
+ end
998
+ when 21
999
+ begin
1000
+ if param_attr.nil?
1001
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
1002
+ end
1003
+
1004
+ # Use quoted s value if one exists, otherwise use parameter value
1005
+ value = qstr || chars(data, param_val_s, p - 1)
1006
+
1007
+ content_type.parameters << {param_attr => value}
1008
+ param_attr = nil
1009
+ qstr = nil
1010
+ end
1011
+ when 12
1012
+ begin
1013
+ end
1014
+ when 23
1015
+ begin
1016
+ end
1017
+ begin
1018
+ if param_attr.nil?
1019
+ raise Mail::Field::ParseError.new(Mail::ContentTypeElement, data, "no attribute for value")
1020
+ end
1021
+
1022
+ # Use quoted s value if one exists, otherwise use parameter value
1023
+ value = qstr || chars(data, param_val_s, p - 1)
1024
+
1025
+ content_type.parameters << {param_attr => value}
1026
+ param_attr = nil
1027
+ qstr = nil
1028
+ end
1029
+ end
1030
+ end
1031
+ end
1032
+ if _goto_level <= _out
1033
+ break
1034
+ end
1035
+ end
1036
+ end
1037
+
1038
+ if p != eof || cs < 47
1039
+ raise Mail::Field::IncompleteParseError.new(Mail::ContentTypeElement, data, p)
1040
+ end
1041
+
1042
+ content_type
63
1043
  end
64
- content_type
65
1044
  end
66
1045
  end
1046
+ ensure
1047
+ $VERBOSE = original_verbose
67
1048
  end