mail 2.6.6 → 2.7.1

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