AnsiResponseParserTests.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Text;
  5. using Xunit.Abstractions;
  6. namespace UnitTests.ConsoleDrivers;
  7. public class AnsiResponseParserTests (ITestOutputHelper output)
  8. {
  9. AnsiResponseParser<int> _parser1 = new AnsiResponseParser<int> ();
  10. AnsiResponseParser _parser2 = new AnsiResponseParser ();
  11. /// <summary>
  12. /// Used for the T value in batches that are passed to the AnsiResponseParser&lt;int&gt; (parser1)
  13. /// </summary>
  14. private int tIndex = 0;
  15. [Fact]
  16. public void TestInputProcessing ()
  17. {
  18. string ansiStream = "\u001b[<0;10;20M" + // ANSI escape for mouse move at (10, 20)
  19. "Hello" + // User types "Hello"
  20. "\u001b[0c"; // Device Attributes response (e.g., terminal identification i.e. DAR)
  21. string? response1 = null;
  22. string? response2 = null;
  23. int i = 0;
  24. // Imagine that we are expecting a DAR
  25. _parser1.ExpectResponse ("c",(s)=> response1 = s, false);
  26. _parser2.ExpectResponse ("c", (s) => response2 = s , false);
  27. // First char is Escape which we must consume incase what follows is the DAR
  28. AssertConsumed (ansiStream, ref i); // Esc
  29. for (int c = 0; c < "[<0;10;20".Length; c++)
  30. {
  31. AssertConsumed (ansiStream, ref i);
  32. }
  33. // We see the M terminator
  34. AssertReleased (ansiStream, ref i, "\u001b[<0;10;20M");
  35. // Regular user typing
  36. for (int c = 0; c < "Hello".Length; c++)
  37. {
  38. AssertIgnored (ansiStream,"Hello"[c], ref i);
  39. }
  40. // Now we have entered the actual DAR we should be consuming these
  41. for (int c = 0; c < "\u001b[0".Length; c++)
  42. {
  43. AssertConsumed (ansiStream, ref i);
  44. }
  45. // Consume the terminator 'c' and expect this to call the above event
  46. Assert.Null (response1);
  47. Assert.Null (response1);
  48. AssertConsumed (ansiStream, ref i);
  49. Assert.NotNull (response2);
  50. Assert.Equal ("\u001b[0c", response2);
  51. Assert.NotNull (response2);
  52. Assert.Equal ("\u001b[0c", response2);
  53. }
  54. [Theory]
  55. [InlineData ("\u001b[<0;10;20MHi\u001b[0c", "c", "\u001b[0c", "\u001b[<0;10;20MHi")]
  56. [InlineData ("\u001b[<1;15;25MYou\u001b[1c", "c", "\u001b[1c", "\u001b[<1;15;25MYou")]
  57. [InlineData ("\u001b[0cHi\u001b[0c", "c", "\u001b[0c", "Hi\u001b[0c")]
  58. [InlineData ("\u001b[<0;0;0MHe\u001b[3c", "c", "\u001b[3c", "\u001b[<0;0;0MHe")]
  59. [InlineData ("\u001b[<0;1;2Da\u001b[0c\u001b[1c", "c", "\u001b[0c", "\u001b[<0;1;2Da\u001b[1c")]
  60. [InlineData ("\u001b[1;1M\u001b[3cAn", "c", "\u001b[3c", "\u001b[1;1MAn")]
  61. [InlineData ("hi\u001b[2c\u001b[<5;5;5m", "c", "\u001b[2c", "hi\u001b[<5;5;5m")]
  62. [InlineData ("\u001b[3c\u001b[4c\u001b[<0;0;0MIn", "c", "\u001b[3c", "\u001b[4c\u001b[<0;0;0MIn")]
  63. [InlineData ("\u001b[<1;2;3M\u001b[0c\u001b[<1;2;3M\u001b[2c", "c", "\u001b[0c", "\u001b[<1;2;3M\u001b[<1;2;3M\u001b[2c")]
  64. [InlineData ("\u001b[<0;1;1MHi\u001b[6c\u001b[2c\u001b[<1;0;0MT", "c", "\u001b[6c", "\u001b[<0;1;1MHi\u001b[2c\u001b[<1;0;0MT")]
  65. [InlineData ("Te\u001b[<2;2;2M\u001b[7c", "c", "\u001b[7c", "Te\u001b[<2;2;2M")]
  66. [InlineData ("\u001b[0c\u001b[<0;0;0M\u001b[3c\u001b[0c\u001b[1;0MT", "c", "\u001b[0c", "\u001b[<0;0;0M\u001b[3c\u001b[0c\u001b[1;0MT")]
  67. [InlineData ("\u001b[0;0M\u001b[<0;0;0M\u001b[3cT\u001b[1c", "c", "\u001b[3c", "\u001b[0;0M\u001b[<0;0;0MT\u001b[1c")]
  68. [InlineData ("\u001b[3c\u001b[<0;0;0M\u001b[0c\u001b[<1;1;1MIn\u001b[1c", "c", "\u001b[3c", "\u001b[<0;0;0M\u001b[0c\u001b[<1;1;1MIn\u001b[1c")]
  69. [InlineData ("\u001b[<5;5;5M\u001b[7cEx\u001b[8c", "c", "\u001b[7c", "\u001b[<5;5;5MEx\u001b[8c")]
  70. // Random characters and mixed inputs
  71. [InlineData ("\u001b[<1;1;1MJJ\u001b[9c", "c", "\u001b[9c", "\u001b[<1;1;1MJJ")] // Mixed text
  72. [InlineData ("Be\u001b[0cAf", "c", "\u001b[0c", "BeAf")] // Escape in the middle of the string
  73. [InlineData ("\u001b[<0;0;0M\u001b[2cNot e", "c", "\u001b[2c", "\u001b[<0;0;0MNot e")] // Unexpected sequence followed by text
  74. [InlineData ("Just te\u001b[<0;0;0M\u001b[3c\u001b[2c\u001b[4c", "c", "\u001b[3c", "Just te\u001b[<0;0;0M\u001b[2c\u001b[4c")] // Multiple unexpected responses
  75. [InlineData ("\u001b[1;2;3M\u001b[0c\u001b[2;2M\u001b[0;0;0MTe", "c", "\u001b[0c", "\u001b[1;2;3M\u001b[2;2M\u001b[0;0;0MTe")] // Multiple commands with responses
  76. [InlineData ("\u001b[<3;3;3Mabc\u001b[4cde", "c", "\u001b[4c", "\u001b[<3;3;3Mabcde")] // Escape sequences mixed with regular text
  77. // Edge cases
  78. [InlineData ("\u001b[0c\u001b[0c\u001b[0c", "c", "\u001b[0c", "\u001b[0c\u001b[0c")] // Multiple identical responses
  79. [InlineData ("", "c", "", "")] // Empty input
  80. [InlineData ("Normal", "c", "", "Normal")] // No escape sequences
  81. [InlineData ("\u001b[<0;0;0M", "c", "", "\u001b[<0;0;0M")] // Escape sequence only
  82. [InlineData ("\u001b[1;2;3M\u001b[0c", "c", "\u001b[0c", "\u001b[1;2;3M")] // Last response consumed
  83. [InlineData ("Inpu\u001b[0c\u001b[1;0;0M", "c", "\u001b[0c", "Inpu\u001b[1;0;0M")] // Single input followed by escape
  84. [InlineData ("\u001b[2c\u001b[<5;6;7MDa", "c", "\u001b[2c", "\u001b[<5;6;7MDa")] // Multiple escape sequences followed by text
  85. [InlineData ("\u001b[0cHi\u001b[1cGo", "c", "\u001b[0c", "Hi\u001b[1cGo")] // Normal text with multiple escape sequences
  86. [InlineData ("\u001b[<1;1;1MTe", "c", "", "\u001b[<1;1;1MTe")]
  87. // Add more test cases here...
  88. public void TestInputSequences (string ansiStream, string expectedTerminator, string expectedResponse, string expectedOutput)
  89. {
  90. var swGenBatches = Stopwatch.StartNew ();
  91. int tests = 0;
  92. var permutations = GetBatchPermutations (ansiStream,5).ToArray ();
  93. swGenBatches.Stop ();
  94. var swRunTest = Stopwatch.StartNew ();
  95. foreach (var batchSet in permutations)
  96. {
  97. tIndex = 0;
  98. string response1 = string.Empty;
  99. string response2 = string.Empty;
  100. // Register the expected response with the given terminator
  101. _parser1.ExpectResponse (expectedTerminator, s => response1 = s, false);
  102. _parser2.ExpectResponse (expectedTerminator, s => response2 = s, false);
  103. // Process the input
  104. StringBuilder actualOutput1 = new StringBuilder ();
  105. StringBuilder actualOutput2 = new StringBuilder ();
  106. foreach (var batch in batchSet)
  107. {
  108. var output1 = _parser1.ProcessInput (StringToBatch (batch));
  109. actualOutput1.Append (BatchToString (output1));
  110. var output2 = _parser2.ProcessInput (batch);
  111. actualOutput2.Append (output2);
  112. }
  113. // Assert the final output minus the expected response
  114. Assert.Equal (expectedOutput, actualOutput1.ToString());
  115. Assert.Equal (expectedResponse, response1);
  116. Assert.Equal (expectedOutput, actualOutput2.ToString ());
  117. Assert.Equal (expectedResponse, response2);
  118. tests++;
  119. }
  120. output.WriteLine ($"Tested {tests} in {swRunTest.ElapsedMilliseconds} ms (gen batches took {swGenBatches.ElapsedMilliseconds} ms)" );
  121. }
  122. public static IEnumerable<object []> TestInputSequencesExact_Cases ()
  123. {
  124. yield return
  125. [
  126. "Esc Only",
  127. null,
  128. new []
  129. {
  130. new StepExpectation ('\u001b',AnsiResponseParserState.ExpectingBracket,string.Empty)
  131. }
  132. ];
  133. yield return
  134. [
  135. "Esc Hi with intermediate",
  136. 'c',
  137. new []
  138. {
  139. new StepExpectation ('\u001b',AnsiResponseParserState.ExpectingBracket,string.Empty),
  140. new StepExpectation ('H',AnsiResponseParserState.Normal,"\u001bH"), // H is known terminator and not expected one so here we release both chars
  141. new StepExpectation ('\u001b',AnsiResponseParserState.ExpectingBracket,string.Empty),
  142. new StepExpectation ('[',AnsiResponseParserState.InResponse,string.Empty),
  143. new StepExpectation ('0',AnsiResponseParserState.InResponse,string.Empty),
  144. new StepExpectation ('c',AnsiResponseParserState.Normal,string.Empty,"\u001b[0c"), // c is expected terminator so here we swallow input and populate expected response
  145. new StepExpectation ('\u001b',AnsiResponseParserState.ExpectingBracket,string.Empty),
  146. }
  147. ];
  148. }
  149. public class StepExpectation ()
  150. {
  151. /// <summary>
  152. /// The input character to feed into the parser at this step of the test
  153. /// </summary>
  154. public char Input { get; }
  155. /// <summary>
  156. /// What should the state of the parser be after the <see cref="Input"/>
  157. /// is fed in.
  158. /// </summary>
  159. public AnsiResponseParserState ExpectedStateAfterOperation { get; }
  160. /// <summary>
  161. /// If this step should release one or more characters, put them here.
  162. /// </summary>
  163. public string ExpectedRelease { get; } = string.Empty;
  164. /// <summary>
  165. /// If this step should result in a completing of detection of ANSI response
  166. /// then put the expected full response sequence here.
  167. /// </summary>
  168. public string ExpectedAnsiResponse { get; } = string.Empty;
  169. public StepExpectation (
  170. char input,
  171. AnsiResponseParserState expectedStateAfterOperation,
  172. string expectedRelease = "",
  173. string expectedAnsiResponse = "") : this ()
  174. {
  175. Input = input;
  176. ExpectedStateAfterOperation = expectedStateAfterOperation;
  177. ExpectedRelease = expectedRelease;
  178. ExpectedAnsiResponse = expectedAnsiResponse;
  179. }
  180. }
  181. [MemberData(nameof(TestInputSequencesExact_Cases))]
  182. [Theory]
  183. public void TestInputSequencesExact (string caseName, char? terminator, IEnumerable<StepExpectation> expectedStates)
  184. {
  185. output.WriteLine ("Running test case:" + caseName);
  186. var parser = new AnsiResponseParser ();
  187. string? response = null;
  188. if (terminator.HasValue)
  189. {
  190. parser.ExpectResponse (terminator.Value.ToString (),(s)=> response = s, false);
  191. }
  192. foreach (var state in expectedStates)
  193. {
  194. // If we expect the response to be detected at this step
  195. if (!string.IsNullOrWhiteSpace (state.ExpectedAnsiResponse))
  196. {
  197. // Then before passing input it should be null
  198. Assert.Null (response);
  199. }
  200. var actual = parser.ProcessInput (state.Input.ToString ());
  201. Assert.Equal (state.ExpectedRelease,actual);
  202. Assert.Equal (state.ExpectedStateAfterOperation, parser.State);
  203. // If we expect the response to be detected at this step
  204. if (!string.IsNullOrWhiteSpace (state.ExpectedAnsiResponse))
  205. {
  206. // And after passing input it shuld be the expected value
  207. Assert.Equal (state.ExpectedAnsiResponse, response);
  208. }
  209. }
  210. }
  211. [Fact]
  212. public void ReleasesEscapeAfterTimeout ()
  213. {
  214. string input = "\u001b";
  215. int i = 0;
  216. // Esc on its own looks like it might be an esc sequence so should be consumed
  217. AssertConsumed (input,ref i);
  218. // We should know when the state changed
  219. Assert.Equal (AnsiResponseParserState.ExpectingBracket, _parser1.State);
  220. Assert.Equal (AnsiResponseParserState.ExpectingBracket, _parser2.State);
  221. Assert.Equal (DateTime.Now.Date, _parser1.StateChangedAt.Date);
  222. Assert.Equal (DateTime.Now.Date, _parser2.StateChangedAt.Date);
  223. AssertManualReleaseIs (input);
  224. }
  225. [Fact]
  226. public void TwoExcapesInARow ()
  227. {
  228. // Example user presses Esc key then a DAR comes in
  229. string input = "\u001b\u001b";
  230. int i = 0;
  231. // First Esc gets grabbed
  232. AssertConsumed (input, ref i);
  233. // Upon getting the second Esc we should release the first
  234. AssertReleased (input, ref i, "\u001b",0);
  235. // Assume 50ms or something has passed, lets force release as no new content
  236. // It should be the second escape that gets released (i.e. index 1)
  237. AssertManualReleaseIs ("\u001b",1);
  238. }
  239. [Fact]
  240. public void TwoExcapesInARowWithTextBetween ()
  241. {
  242. // Example user presses Esc key and types at the speed of light (normally the consumer should be handling Esc timeout)
  243. // then a DAR comes in.
  244. string input = "\u001bfish\u001b";
  245. int i = 0;
  246. // First Esc gets grabbed
  247. AssertConsumed (input, ref i); // Esc
  248. Assert.Equal (AnsiResponseParserState.ExpectingBracket,_parser1.State);
  249. Assert.Equal (AnsiResponseParserState.ExpectingBracket, _parser2.State);
  250. // Because next char is 'f' we do not see a bracket so release both
  251. AssertReleased (input, ref i, "\u001bf", 0,1); // f
  252. Assert.Equal (AnsiResponseParserState.Normal, _parser1.State);
  253. Assert.Equal (AnsiResponseParserState.Normal, _parser2.State);
  254. AssertReleased (input, ref i,"i",2);
  255. AssertReleased (input, ref i, "s", 3);
  256. AssertReleased (input, ref i, "h", 4);
  257. AssertConsumed (input, ref i); // Second Esc
  258. // Assume 50ms or something has passed, lets force release as no new content
  259. AssertManualReleaseIs ("\u001b", 5);
  260. }
  261. [Fact]
  262. public void TestLateResponses ()
  263. {
  264. var p = new AnsiResponseParser ();
  265. string? responseA = null;
  266. string? responseB = null;
  267. p.ExpectResponse ("z",(r)=>responseA=r, false);
  268. // Some time goes by without us seeing a response
  269. p.StopExpecting ("z", false);
  270. // Send our new request
  271. p.ExpectResponse ("z", (r) => responseB = r, false);
  272. // Because we gave up on getting A, we should expect the response to be to our new request
  273. Assert.Empty(p.ProcessInput ("\u001b[<1;2z"));
  274. Assert.Null (responseA);
  275. Assert.Equal ("\u001b[<1;2z", responseB);
  276. // Oh looks like we got one late after all - swallow it
  277. Assert.Empty (p.ProcessInput ("\u001b[0000z"));
  278. // Do not expect late responses to be populated back to your variable
  279. Assert.Null (responseA);
  280. Assert.Equal ("\u001b[<1;2z", responseB);
  281. // We now have no outstanding requests (late or otherwise) so new ansi codes should just fall through
  282. Assert.Equal ("\u001b[111z", p.ProcessInput ("\u001b[111z"));
  283. }
  284. [Fact]
  285. public void TestPersistentResponses ()
  286. {
  287. var p = new AnsiResponseParser ();
  288. int m = 0;
  289. int M = 1;
  290. p.ExpectResponse ("m", _ => m++, true);
  291. p.ExpectResponse ("M", _ => M++, true);
  292. // Act - Feed input strings containing ANSI sequences
  293. p.ProcessInput ("\u001b[<0;10;10m"); // Should match and increment `m`
  294. p.ProcessInput ("\u001b[<0;20;20m"); // Should match and increment `m`
  295. p.ProcessInput ("\u001b[<0;30;30M"); // Should match and increment `M`
  296. p.ProcessInput ("\u001b[<0;40;40M"); // Should match and increment `M`
  297. p.ProcessInput ("\u001b[<0;50;50M"); // Should match and increment `M`
  298. // Assert - Verify that counters reflect the expected counts of each terminator
  299. Assert.Equal (2, m); // Expected two `m` responses
  300. Assert.Equal (4, M); // Expected three `M` responses plus the initial value of 1
  301. }
  302. [Fact]
  303. public void TestPersistentResponses_WithMetadata ()
  304. {
  305. var p = new AnsiResponseParser<int> ();
  306. int m = 0;
  307. var result = new List<Tuple<char,int>> ();
  308. p.ExpectResponseT ("m", (r) =>
  309. {
  310. result = r.ToList ();
  311. m++;
  312. }, true);
  313. // Act - Feed input strings containing ANSI sequences
  314. p.ProcessInput (StringToBatch("\u001b[<0;10;10m")); // Should match and increment `m`
  315. // Prepare expected result:
  316. var expected = new List<Tuple<char, int>>
  317. {
  318. Tuple.Create('\u001b', 0), // Escape character
  319. Tuple.Create('[', 1),
  320. Tuple.Create('<', 2),
  321. Tuple.Create('0', 3),
  322. Tuple.Create(';', 4),
  323. Tuple.Create('1', 5),
  324. Tuple.Create('0', 6),
  325. Tuple.Create(';', 7),
  326. Tuple.Create('1', 8),
  327. Tuple.Create('0', 9),
  328. Tuple.Create('m', 10)
  329. };
  330. Assert.Equal (expected.Count, result.Count); // Ensure the count is as expected
  331. Assert.True (expected.SequenceEqual (result), "The result does not match the expected output."); // Check the actual content
  332. }
  333. private Tuple<char, int> [] StringToBatch (string batch)
  334. {
  335. return batch.Select ((k) => Tuple.Create (k, tIndex++)).ToArray ();
  336. }
  337. public static IEnumerable<string []> GetBatchPermutations (string input, int maxDepth = 3)
  338. {
  339. // Call the recursive method to generate batches with an initial depth of 0
  340. return GenerateBatches (input, 0, maxDepth, 0);
  341. }
  342. private static IEnumerable<string []> GenerateBatches (string input, int start, int maxDepth, int currentDepth)
  343. {
  344. // If we have reached the maximum recursion depth, return no results
  345. if (currentDepth >= maxDepth)
  346. {
  347. yield break; // No more batches can be generated at this depth
  348. }
  349. // If we have reached the end of the string, return an empty list
  350. if (start >= input.Length)
  351. {
  352. yield return new string [0];
  353. yield break;
  354. }
  355. // Iterate over the input string to create batches
  356. for (int i = start + 1; i <= input.Length; i++)
  357. {
  358. // Take a batch from 'start' to 'i'
  359. string batch = input.Substring (start, i - start);
  360. // Recursively get batches from the remaining substring, increasing the depth
  361. foreach (var remainingBatches in GenerateBatches (input, i, maxDepth, currentDepth + 1))
  362. {
  363. // Combine the current batch with the remaining batches
  364. var result = new string [1 + remainingBatches.Length];
  365. result [0] = batch;
  366. Array.Copy (remainingBatches, 0, result, 1, remainingBatches.Length);
  367. yield return result;
  368. }
  369. }
  370. }
  371. private void AssertIgnored (string ansiStream,char expected, ref int i)
  372. {
  373. var c2 = ansiStream [i];
  374. var c1 = NextChar (ansiStream, ref i);
  375. // Parser does not grab this key (i.e. driver can continue with regular operations)
  376. Assert.Equal ( c1,_parser1.ProcessInput (c1));
  377. Assert.Equal (expected,c1.Single().Item1);
  378. Assert.Equal (c2, _parser2.ProcessInput (c2.ToString()).Single());
  379. Assert.Equal (expected, c2 );
  380. }
  381. private void AssertConsumed (string ansiStream, ref int i)
  382. {
  383. // Parser grabs this key
  384. var c2 = ansiStream [i];
  385. var c1 = NextChar (ansiStream, ref i);
  386. Assert.Empty (_parser1.ProcessInput(c1));
  387. Assert.Empty (_parser2.ProcessInput (c2.ToString()));
  388. }
  389. private void AssertReleased (string ansiStream, ref int i, string expectedRelease, params int[] expectedTValues)
  390. {
  391. var c2 = ansiStream [i];
  392. var c1 = NextChar (ansiStream, ref i);
  393. // Parser realizes it has grabbed content that does not belong to an outstanding request
  394. // Parser returns false to indicate to continue
  395. var released1 = _parser1.ProcessInput (c1).ToArray ();
  396. Assert.Equal (expectedRelease, BatchToString (released1));
  397. if (expectedTValues.Length > 0)
  398. {
  399. Assert.True (expectedTValues.SequenceEqual (released1.Select (kv=>kv.Item2)));
  400. }
  401. Assert.Equal (expectedRelease, _parser2.ProcessInput (c2.ToString ()));
  402. }
  403. private string BatchToString (IEnumerable<Tuple<char, int>> processInput)
  404. {
  405. return new string(processInput.Select (a=>a.Item1).ToArray ());
  406. }
  407. private Tuple<char,int>[] NextChar (string ansiStream, ref int i)
  408. {
  409. return StringToBatch(ansiStream [i++].ToString());
  410. }
  411. private void AssertManualReleaseIs (string expectedRelease, params int [] expectedTValues)
  412. {
  413. // Consumer is responsible for determining this based on e.g. after 50ms
  414. var released1 = _parser1.Release ().ToArray ();
  415. Assert.Equal (expectedRelease, BatchToString (released1));
  416. if (expectedTValues.Length > 0)
  417. {
  418. Assert.True (expectedTValues.SequenceEqual (released1.Select (kv => kv.Item2)));
  419. }
  420. Assert.Equal (expectedRelease, _parser2.Release ());
  421. Assert.Equal (AnsiResponseParserState.Normal, _parser1.State);
  422. Assert.Equal (AnsiResponseParserState.Normal, _parser2.State);
  423. }
  424. }