all files / document-editor/implementation/viewer/ sfdt-reader.js

83.61% Statements 2086/2495
73.63% Branches 1354/1839
93.8% Functions 121/129
83.61% Lines 2086/2495
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867   501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501× 501×                 2547×         36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 34×   36× 22×   36×       36× 36×   36×     35×   36× 34×   36× 36× 36×   36× 36×   36×   36× 36×   36× 36×   36× 18×   36× 36×   36× 36× 36× 36×     36× 21×   36× 21×   36× 36×   36× 18×   36× 18×   36× 22×   36× 36×   36× 18×   36× 36×   36× 29×   36× 29×   36× 28×   36× 36× 36×     36×     36×   22× 22×         36× 36× 36× 296×               36×   36× 36× 36× 36× 76× 76× 33× 33×     36× 36×   29× 29×   29× 29×   29× 29×     30× 33× 33×                 29× 29×   29× 29×   29× 29×     18×       36× 36×   36× 36×   36× 36×   36× 18×   36× 18×     36× 1042× 1042× 784×       18× 33× 33× 33× 33× 33×                     33×   33× 91×       33× 33×       18× 18× 18×     33× 33× 33× 33× 33×           11419× 76× 76× 76× 76× 76× 76× 76×   76× 76×             18× 18×                                                                                                   17250× 17250× 17250× 17250× 8851× 8851×   17250× 17250× 9412× 9412×   17250× 7816× 7816×   17250× 22× 22×   17250× 17250×   17250× 17250× 15611× 15611×       15611×   15611× 14851× 14851× 14851× 14851×           760× 760× 760× 760×                   760× 760×       760×       17250× 6842× 6842× 6842×     6842× 6842× 6841×                 6841×   6841× 6841×       6841×           17250× 14171×   17250× 8652×   17250× 9434× 2427×     7007× 7007×       7007×   7007× 6995×     12× 12× 12× 12×       12×                   17250× 8851×   17250× 17228×                                                                                 22465× 198051× 22465×         29× 36× 36× 36× 36× 36×   36× 34×   36× 36× 324× 324× 324× 324×         36×     326× 326× 56× 56×     270× 270× 270× 270× 270×           326× 326× 326× 326× 326× 326×   29× 39× 39× 39× 39× 39×   39× 39× 39×   39× 35×       39× 15×       15×     15× 20× 20× 20× 20× 20×   20×     36× 53× 53× 53× 53× 53× 53× 53× 53× 53× 53×   53×     53× 53× 53× 53× 1685×   53×     909× 909× 909× 45× 45× 45×   909× 42× 42× 42×   909× 37× 37× 37×   909× 37× 37× 37×   909× 41× 41× 41×   909× 39× 39× 39×   909×   995×   24× 17× 196× 196×         1629× 1473× 3363× 3363× 3363× 3269× 3269× 3269× 3269× 3269× 2444×   3269× 3259× 3259× 3259× 3259× 3259× 3259× 2260× 2260×   3259× 3259× 3246×   3259×   10×     10×     3269× 3269×   94× 77×   17× 17× 17× 17× 17× 17× 17× 17× 17× 34× 34× 34× 34×                     34×       34× 17× 17×     17× 17×       3363× 37×         77× 77× 77× 77×   77× 77× 77× 77× 263× 263× 263× 263×   263× 263× 263× 263× 701× 701× 701× 701×   701× 701× 701× 701× 701× 701× 701×   701× 701× 871×     701× 701× 701×               701×               701×     263× 263×   77× 77× 77×   77× 77×                     263× 119×   263×   263×   263× 120×   263×   263×     36× 36×   36× 36×   36×   36× 36×   36×   36×   36× 36×   36× 36×   36× 36×   36× 36×   36× 34×   36×         33×           29× 14× 14× 14× 14×       36×                                                                       2459× 2459× 2459× 2444×     15×   2459× 2459× 2459× 2459× 2459× 2459× 2459× 2459× 11697× 11697× 11697× 327× 109×   327×     11697×                   11697×         11697× 10234× 10234× 25× 25×   10209× 76×   10133×       10133×       10133×   299×     9834× 9834×         10234× 10234× 10234× 10234× 10234× 10234×                             10234× 232×                                                       10002×   10234× 10234× 10234× 10234×           10234×       10234×   10234× 405×   10234×   1463× 298× 298× 298× 298× 147×     151×   298× 298× 298× 298× 298× 298× 298× 298× 298× 298×   1165×         1163× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36×       36×       36×     36× 36×     36× 36× 36× 35× 35×                         35×   36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 36×   36× 36×   36× 36× 36×   36× 36×   36× 36×   36× 36×   36× 36× 36×         36×   36× 36×   1127× 109× 109× 109× 109× 109× 109× 109× 14× 14× 14× 14× 13×     109× 109× 109× 109× 108×   109×   1018× 218× 218× 109× 109× 109× 109× 109× 109× 109× 109× 109× 109× 109× 25× 25× 25×         109×       109×   109× 109× 109× 109× 109× 109× 109× 109×   109× 109× 109× 109×   109× 109× 109× 109× 108×   109×   218× 218×   800× 618× 618× 618× 618× 618× 29×   29×     29× 14×   29×   29×   29×     618× 618× 618× 618× 596× 298× 298× 296×         298× 298× 296× 296× 296× 296× 296× 296×               618× 58×     182× 38× 19× 19× 19× 19× 19× 19× 19×   19×   19× 19×     19× 19× 19× 19× 19×     38×   144× 16× 16× 16× 16×   16× 16×     16× 16×               16×             128× 113× 113× 113× 113× 113× 113× 113× 113× 113×   113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113×   113× 113×   113× 113×   113× 113×   113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113× 113×   113× 113× 113× 113× 113×   113× 113× 113× 113× 113× 113× 113× 113× 91× 91×   113× 113× 113×   113× 113× 113× 113×   15× 15× 15× 15× 15× 15× 15× 15× 15× 15× 15× 15× 15× 20× 20×   15× 15×   11697×   2459× 2459× 11697× 11697×   2459× 2459× 2444×   2459×   14×                                             14× 11× 11× 11× 11× 11×         14× 14× 14× 14×   14×   10750× 92× 92×     19× 19× 18×   19× 18×   19× 19×   19×     19× 13× 13× 13×     13×   19×   19× 16× 16×           18× 18× 18× 18×                           14× 14× 14× 14×   14× 14× 14× 14× 14×     14×   14×                                                                     14× 14× 14×   14× 14×                               77× 77× 67×   77× 17×   77× 57×   77× 56×   77× 57×   77× 56×   77× 77×   77× 77× 67×   77× 23×   77× 77×   77× 67×   77× 37×   77× 37×   77× 22×   77×     77×       701× 701× 701× 701×   701× 701×   701× 701×   701× 701×   701× 701× 624×   701× 624×   701× 551×       701× 57×   701× 57×   701× 57×   701× 57×     263× 263× 232×   263× 232×   263× 263×   263× 263×   263× 93×   263× 78×   263× 93×   263× 78×   263× 12×   263×   263× 263×     2561× 2561× 2561× 2561× 2561× 2561× 2561× 2561× 2561× 2561× 2561×     20488× 17323× 1932×   17323× 8065×   17323× 8065×   17323× 8005×   17323× 8005×   17323× 8005×       778× 492× 257×   492× 165×   492× 286×       29657× 24288×       24288× 44×   24288× 138×   24288×     24288× 101×   24288× 9487× 9487× 9487× 3051× 3051× 3051×           9487× 9487×   24288× 16949×     16949× 16949×     16949× 16949× 13252×   16949× 13252×   16949× 13252×     24288× 2157×   24288× 5242×   24288× 201×   24288× 15684×   24288× 176×   24288× 348×   24288× 3209× 3209×   24288× 3885×     3885× 3885×     3885×   24288× 1766×   24288× 712×   24288× 19×   24288× 290×   24288× 111×   24288× 339×   24288× 137×   24288× 86×   24288× 5254×     5254× 5254×     5254×   24288× 3697×     3697× 3697×     3697×   24288× 3697×     3697× 3697×     3697×   24288× 245×   24288×       17× 11×           32× 32× 32× 32×           32× 32× 32× 32× 12×   32× 32×   18074× 18074×   28×   28× 20× 28× 28×   28× 28×     56× 56× 56× 2598× 2598×   56×   56× 56× 168× 168× 168× 168× 168× 168×   56×     13172× 11603× 1520×   11603× 59×   11603× 7482×   11603× 6845×   11603× 7240×   11603× 9292×   11603× 7206×   11603× 133×   11603× 133×   11603× 9068×   11603× 9068×     2535×       11603× 7163×   11603× 6996×   11603× 74×   11603× 219×   11603× 177×   11603× 65×   11603× 11603× 1584×   11603× 196×       1584× 1584× 125× 125×   1584× 71×   1513× 10×   1584× 126×       59× 59×   59× 59×   59× 59×   59× 59×   59× 59×   59× 59×   59× 59×   59× 59×   59× 58×   59× 58×   59× 58×   59× 32×   59× 32×   59× 57×   59× 57×   59× 57×   59× 57×   59× 28×   59× 28×   59× 57×   59×       59× 57×                           196× 196× 324× 324× 324× 324× 324× 324× 324× 324×         36× 36× 36× 36×     36×     36×     36×   109× 109× 237× 237× 96×   141× 13×         44×   13×   25×         138×   89×   20×                                       101×   90×           201×   12×   12×                           137×         9068×   878×       8179×     6996×   58×   36×   34×   33×   33×   33×   33×   33×   33×   33×   6637×     7163×   222×   225×   10×   11×   6695×     706×   201×   99×   380×   26×     67×   58×           8065×   1922×   5384×                                                     706×     286×   236×                                                                                                                                                   263×   237×   12×   14×     624×   413×   188×     20×     596×   30×       182×     138×   12×   138×           56×       18×     326×   304×     10×       52512×   1607×   1370×   48×   49487×     36×   34×                       33×   22×                 298×   147×   151×         114×   106×               114×   50×     52×             348×       167×   178×                                 113×   39×   73×           149×   137×                       149×   135×                     149×   95×         35×       12×           149×   94×         47×                                                                                 113×   106×                                   37×   36×                       324×   31×     29×     28×   31×   203×     324×   103×   13×           203×     11×                 11×                                             36×   16×                                                                                                           185×   34×   100×   12×       36×     149×   146×               72×   64×               113×   112×                   113×   21×     13×                                                                                                                                                                                                                                                                                                                                                                                                                         499× 28×   499× 499× 28×   499× 499× 499×   499× 499× 28×   499× 499× 28×   499× 499× 28×   499× 499× 33×   499× 499× 28×   499× 499× 499×        
define(["require", "exports", "@syncfusion/ej2-base", "../list/list", "../list/list-level", "../list/abstract-list", "../list/level-override", "../format/index", "../format/index", "./page", "../editor/editor-helper", "../../base/dictionary", "@syncfusion/ej2-office-chart", "../track-changes/track-changes", "../index", "../../index"], function (require, exports, ej2_base_1, list_1, list_level_1, abstract_list_1, level_override_1, index_1, index_2, page_1, editor_helper_1, dictionary_1, ej2_office_chart_1, track_changes_1, index_3, index_4) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var SfdtReader = (function () {
        function SfdtReader(documentHelper) {
            this.documentHelper = undefined;
            this.commentStarts = undefined;
            this.commentEnds = undefined;
            this.commentsCollection = undefined;
            this.revisionCollection = undefined;
            this.isPageBreakInsideTable = false;
            this.referedRevisions = [];
            this.isParseHeader = false;
            this.footnotes = undefined;
            this.endnotes = undefined;
            this.keywordIndex = undefined;
            this.themes = undefined;
            this.isCutPerformed = false;
            this.isPaste = false;
            this.isContextBasedPaste = false;
            this.isHtmlPaste = false;
            this.documentHelper = documentHelper;
            this.editableRanges = new dictionary_1.Dictionary();
        }
        Object.defineProperty(SfdtReader.prototype, "isPasting", {
            get: function () {
                return this.viewer && this.viewer.owner.isPastingContent;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(SfdtReader.prototype, "viewer", {
            get: function () {
                return this.documentHelper.owner.viewer;
            },
            enumerable: true,
            configurable: true
        });
        SfdtReader.prototype.convertJsonToDocument = function (json, incrementalOperations) {
            this.commentStarts = new dictionary_1.Dictionary();
            this.commentEnds = new dictionary_1.Dictionary();
            this.commentsCollection = new dictionary_1.Dictionary();
            this.revisionCollection = new dictionary_1.Dictionary();
            this.fontInfoCollection = new dictionary_1.Dictionary();
            this.referedRevisions = [];
            this.keywordIndex = 0;
            this.footnotes = new page_1.Footnote();
            this.endnotes = new page_1.Footnote();
            var sections = [];
            var jsonObject = editor_helper_1.HelperMethods.getSfdtDocument(json);
            if (!ej2_base_1.isNullOrUndefined(jsonObject.optimizeSfdt) && jsonObject.optimizeSfdt) {
                this.keywordIndex = 1;
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.fontSubstitutionTableProperty[this.keywordIndex]])) {
                this.parseFontSubstitutionTable(jsonObject[index_4.fontSubstitutionTableProperty[this.keywordIndex]]);
            }
            Iif (ej2_base_1.isNullOrUndefined(jsonObject[index_4.characterFormatProperty[this.keywordIndex]])) {
                this.parseCharacterFormat(0, this.viewer.owner.characterFormat, this.documentHelper.characterFormat);
            }
            else {
                this.documentHelper.characterFormat.clearFormat();
                this.parseCharacterFormat(this.keywordIndex, jsonObject[index_4.characterFormatProperty[this.keywordIndex]], this.documentHelper.characterFormat);
            }
            if (ej2_base_1.isNullOrUndefined(jsonObject[index_4.paragraphFormatProperty[this.keywordIndex]])) {
                this.parseParagraphFormat(0, this.viewer.owner.paragraphFormat, this.documentHelper.paragraphFormat);
            }
            else {
                this.parseParagraphFormat(this.keywordIndex, jsonObject[index_4.paragraphFormatProperty[this.keywordIndex]], this.documentHelper.paragraphFormat);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.themeFontLanguagesProperty[this.keywordIndex]])) {
                this.parseCharacterFormat(this.keywordIndex, jsonObject[index_4.themeFontLanguagesProperty[this.keywordIndex]], this.documentHelper.themeFontLanguage);
            }
            this.parseDocumentProtection(jsonObject);
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.defaultTabWidthProperty[this.keywordIndex]])) {
                this.documentHelper.defaultTabWidth = jsonObject[index_4.defaultTabWidthProperty[this.keywordIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.trackChangesProperty[this.keywordIndex]])) {
                if (this.documentHelper.owner.enableTrackChanges !== editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.trackChangesProperty[this.keywordIndex]])) {
                    this.documentHelper.owner.skipSettingsOps = true;
                }
                this.documentHelper.owner.enableTrackChanges = editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.trackChangesProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.doNotUseHTMLParagraphAutoSpacingProperty[this.keywordIndex]])) {
                this.documentHelper.dontUseHtmlParagraphAutoSpacing = editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.doNotUseHTMLParagraphAutoSpacingProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.allowSpaceOfSameStyleInTableProperty[this.keywordIndex]])) {
                this.documentHelper.allowSpaceOfSameStyleInTable = editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.allowSpaceOfSameStyleInTableProperty[this.keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.alignTablesRowByRowProperty[this.keywordIndex]])) {
                this.documentHelper.alignTablesRowByRow = editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.alignTablesRowByRowProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.backgroundProperty[this.keywordIndex]])) {
                this.documentHelper.backgroundColor = this.getColor(jsonObject[index_4.backgroundProperty[this.keywordIndex]][index_4.colorProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.compatibilityModeProperty[this.keywordIndex]])) {
                this.documentHelper.compatibilityMode = this.getCompatibilityMode(jsonObject[index_4.compatibilityModeProperty[this.keywordIndex]]);
                Eif (!ej2_base_1.isNullOrUndefined(this.documentHelper.owner.documentSettings)) {
                    this.documentHelper.owner.documentSettings.compatibilityMode = this.getCompatibilityMode(jsonObject[index_4.compatibilityModeProperty[this.keywordIndex]]);
                }
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.abstractListsProperty[this.keywordIndex]])) {
                this.parseAbstractList(jsonObject, this.documentHelper.abstractLists);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.listsProperty[this.keywordIndex]])) {
                this.parseList(jsonObject, this.documentHelper.lists);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.stylesProperty[this.keywordIndex]])) {
                this.parseStyles(jsonObject, this.documentHelper.styles);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.commentsProperty[this.keywordIndex]])) {
                this.parseComments(jsonObject, this.documentHelper.comments);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.revisionsProperty[this.keywordIndex]])) {
                this.parseRevisions(jsonObject, this.viewer.owner.revisionsInternal.changes);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.imagesProperty[this.keywordIndex]])) {
                this.parseImages(jsonObject[index_4.imagesProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.sectionsProperty[this.keywordIndex]])) {
                this.parseSections(jsonObject[index_4.sectionsProperty[this.keywordIndex]], sections);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.customXmlProperty[this.keywordIndex]])) {
                this.parseCustomXml(jsonObject);
            }
            Eif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.formFieldShadingProperty[this.keywordIndex]])) {
                this.documentHelper.owner.documentEditorSettings.formFieldSettings.applyShading = editor_helper_1.HelperMethods.parseBoolValue(jsonObject[index_4.formFieldShadingProperty[this.keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.footnotesProperty[this.keywordIndex]])) {
                this.parseFootnotes(jsonObject[index_4.footnotesProperty[this.keywordIndex]], this.documentHelper.footnotes);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.endnotesProperty[this.keywordIndex]])) {
                this.parseEndtnotes(jsonObject[index_4.endnotesProperty[this.keywordIndex]], this.documentHelper.endnotes);
            }
            if (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.themesProperty[this.keywordIndex]])) {
                this.parseThemes(jsonObject[index_4.themesProperty[this.keywordIndex]], this.documentHelper.themes);
            }
            this.generalizeRevisions();
            this.removeUnmappedBookmark();
            Iif (!ej2_base_1.isNullOrUndefined(jsonObject[index_4.incrementalOps[0]])) {
                incrementalOperations[index_4.incrementalOps[0]] = (jsonObject[index_4.incrementalOps[0]]);
            }
            Iif (this.documentHelper.fieldStacks && this.documentHelper.fieldStacks.length > 0) {
                this.documentHelper.fieldStacks = [];
            }
            return sections;
        };
        SfdtReader.prototype.parseFontSubstitutionTable = function (fontSubstitutionTable) {
            Eif (!ej2_base_1.isNullOrUndefined(this.documentHelper) && !ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)) {
                if (Object.keys(fontSubstitutionTable).length > 0) {
                    var keys = Object.keys(fontSubstitutionTable);
                    for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                        var key = keys_1[_i];
                        this.documentHelper.fontSubstitutionTable.add(key, fontSubstitutionTable[key]);
                    }
                }
            }
        };
        SfdtReader.prototype.removeUnmappedBookmark = function () {
            var bookmarkKeys = this.documentHelper.bookmarks.keys;
            var endBookmark = this.documentHelper.endBookmarksUpdated;
            for (var i = 0; i < bookmarkKeys.length; i++) {
                Iif (endBookmark.indexOf(bookmarkKeys[i]) === -1) {
                    var bookmark = this.documentHelper.bookmarks.get(bookmarkKeys[i]);
                    if (bookmark) {
                        bookmark.line.children.splice(bookmark.line.children.indexOf(bookmark), 1);
                    }
                    this.documentHelper.bookmarks.remove(bookmarkKeys[i]);
                }
            }
            this.documentHelper.endBookmarksUpdated = [];
        };
        SfdtReader.prototype.generalizeRevisions = function () {
            var _this = this;
            var tempRevisionCollection = new dictionary_1.Dictionary();
            var tempRevisons = [];
            this.referedRevisions.forEach(function (element) {
                var revision = _this.documentHelper.revisionsInternal.get(element);
                if (tempRevisons.indexOf(revision) === -1) {
                    tempRevisons.push(revision);
                    tempRevisionCollection.add(element, revision);
                }
            });
            this.viewer.owner.revisionsInternal.changes = tempRevisons;
            this.documentHelper.revisionsInternal = tempRevisionCollection;
        };
        SfdtReader.prototype.parseFootnotes = function (data, footnote) {
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.separatorProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.separatorProperty[this.keywordIndex]], footnote.separator);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.continuationNoticeProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.continuationNoticeProperty[this.keywordIndex]], footnote.continuationNotice);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.continuationSeparatorProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.continuationSeparatorProperty[this.keywordIndex]], footnote.continuationSeparator);
            }
        };
        SfdtReader.prototype.parseImages = function (data) {
            for (var img in data) {
                Eif (Array.isArray(data["" + img])) {
                    this.documentHelper.images.add(parseInt(img), data["" + img]);
                }
                else {
                    var images = [];
                    images.push(data["" + img]);
                    this.documentHelper.images.add(parseInt(img), images);
                }
            }
        };
        SfdtReader.prototype.parseEndtnotes = function (data, endnote) {
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.separatorProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.separatorProperty[this.keywordIndex]], endnote.separator);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.continuationNoticeProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.continuationNoticeProperty[this.keywordIndex]], endnote.continuationNotice);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.continuationSeparatorProperty[this.keywordIndex]])) {
                this.parseBody(data[index_4.continuationSeparatorProperty[this.keywordIndex]], endnote.continuationSeparator);
            }
        };
        SfdtReader.prototype.parseCustomXml = function (data) {
            for (var i = 0; i < data[index_4.customXmlProperty[this.keywordIndex]].length; i++) {
                var xmlData = data[index_4.customXmlProperty[this.keywordIndex]][i];
                Eif (!this.revisionCollection.containsKey(xmlData[index_4.itemIDProperty[this.keywordIndex]])) {
                    this.documentHelper.customXmlData.add(xmlData[index_4.itemIDProperty[this.keywordIndex]], xmlData[index_4.xmlProperty[this.keywordIndex]]);
                }
            }
        };
        SfdtReader.prototype.parseDocumentProtection = function (data) {
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.formattingProperty[this.keywordIndex]])) {
                this.documentHelper.restrictFormatting = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.formattingProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.enforcementProperty[this.keywordIndex]])) {
                this.documentHelper.isDocumentProtected = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.enforcementProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.protectionTypeProperty[this.keywordIndex]])) {
                this.documentHelper.protectionType = this.getProtectionType(data[index_4.protectionTypeProperty[this.keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.hashValueProperty[this.keywordIndex]])) {
                this.documentHelper.hashValue = data[index_4.hashValueProperty[this.keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.saltValueProperty[this.keywordIndex]])) {
                this.documentHelper.saltValue = data[index_4.saltValueProperty[this.keywordIndex]];
            }
        };
        SfdtReader.prototype.parseStyles = function (data, styles) {
            for (var i = 0; i < data[index_4.stylesProperty[this.keywordIndex]].length; i++) {
                var editor = this.documentHelper.owner.editorModule;
                if ((!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) || ej2_base_1.isNullOrUndefined(this.documentHelper.styles.findByName(data[index_4.stylesProperty[this.keywordIndex]][i][index_4.nameProperty[this.keywordIndex]]))) {
                    this.parseStyle(data, data[index_4.stylesProperty[this.keywordIndex]][i], styles);
                }
            }
        };
        SfdtReader.prototype.parseRevisions = function (data, revisions) {
            for (var i = 0; i < data[index_4.revisionsProperty[this.keywordIndex]].length; i++) {
                var revisionData = data[index_4.revisionsProperty[this.keywordIndex]][i];
                Eif (!ej2_base_1.isNullOrUndefined(revisionData[index_4.revisionIdProperty[this.keywordIndex]]) && !ej2_base_1.isNullOrUndefined(revisionData[index_4.revisionTypeProperty[this.keywordIndex]])) {
                    var revision = this.parseRevision(revisionData);
                    var revisionCheck = true;
                    Iif (!this.documentHelper.owner.sfdtExportModule.copyWithTrackChange && this.isPaste) {
                        if (this.getRevisionType(revisionData[index_4.revisionTypeProperty[this.keywordIndex]]) === 'Insertion' && this.isPaste && this.documentHelper.owner.enableTrackChanges) {
                            continue;
                        }
                        else {
                            if (!this.revisionCollection.containsKey(revisionData[index_4.revisionIdProperty[this.keywordIndex]])) {
                                this.revisionCollection.add(revisionData[index_4.revisionIdProperty[this.keywordIndex]], revision);
                            }
                        }
                    }
                    else {
                        this.revisionCollection.add(revisionData[index_4.revisionIdProperty[this.keywordIndex]], revision);
                    }
                    for (var j = 0; j < revisions.length; j++) {
                        Iif (revisions[j].revisionID === revision.revisionID) {
                            revisionCheck = false;
                        }
                    }
                    Eif (revisionCheck && !this.documentHelper.owner.editorModule.isRemoteAction) {
                        revisions.push(revision);
                    }
                }
            }
            this.documentHelper.revisionsInternal = this.revisionCollection;
            Eif (this.documentHelper.owner.sfdtExportModule) {
                this.documentHelper.owner.sfdtExportModule.copyWithTrackChange = false;
            }
        };
        SfdtReader.prototype.parseRevision = function (data) {
            Eif (!ej2_base_1.isNullOrUndefined(data)) {
                var revision = new track_changes_1.Revision(this.viewer.owner, data[index_4.authorProperty[this.keywordIndex]], data[index_4.dateProperty[this.keywordIndex]]);
                revision.revisionID = data[index_4.revisionIdProperty[this.keywordIndex]];
                revision.revisionType = this.getRevisionType(data[index_4.revisionTypeProperty[this.keywordIndex]]);
                return revision;
            }
            else {
                return undefined;
            }
        };
        SfdtReader.prototype.checkAndApplyRevision = function (keyIndex, inline, item) {
            if (!ej2_base_1.isNullOrUndefined(inline[index_4.revisionIdsProperty[keyIndex]]) && inline[index_4.revisionIdsProperty[keyIndex]].length > 0) {
                for (var i = 0; i < inline[index_4.revisionIdsProperty[keyIndex]].length; i++) {
                    var id = inline[index_4.revisionIdsProperty[keyIndex]][i];
                    Eif (this.revisionCollection.containsKey(id)) {
                        this.referedRevisions.push(id);
                        var revision = this.revisionCollection.get(id);
                        Eif (!(item instanceof index_1.WParagraphFormat)) {
                            revision.range.push(item);
                        }
                        item.revisions.push(revision);
                        Iif (this.isPaste && this.documentHelper.owner.editorModule.isRemoteAction && item instanceof index_1.WRowFormat) {
                            this.documentHelper.owner.editorModule.remotePasteRevision.push(revision);
                        }
                    }
                }
            }
        };
        SfdtReader.prototype.parseComments = function (data, comments) {
            var count = 0;
            for (var i = 0; i < data[index_4.commentsProperty[this.keywordIndex]].length; i++) {
                var commentData = data[index_4.commentsProperty[this.keywordIndex]][i];
                var commentElement = undefined;
                commentElement = this.parseComment(commentData, commentElement);
                while (count < commentData[index_4.replyCommentsProperty[this.keywordIndex]].length) {
                    var replyComment = undefined;
                    replyComment = this.parseComment(commentData[index_4.replyCommentsProperty[this.keywordIndex]][count], replyComment);
                    replyComment.ownerComment = commentElement;
                    replyComment.isReply = true;
                    commentElement.replyComments.push(replyComment);
                    this.commentsCollection.add(replyComment.commentId, replyComment);
                    count++;
                }
                this.commentsCollection.add(commentElement.commentId, commentElement);
                comments.push(commentElement);
                count = 0;
            }
        };
        SfdtReader.prototype.parseComment = function (commentData, commentElement) {
            commentElement = new page_1.CommentElementBox(commentData[index_4.dateProperty[this.keywordIndex]]);
            commentElement.author = commentData[index_4.authorProperty[this.keywordIndex]];
            commentElement.initial = commentData[index_4.initialProperty[this.keywordIndex]];
            commentElement.commentId = commentData[index_4.commentIdProperty[this.keywordIndex]];
            commentElement.isResolved = editor_helper_1.HelperMethods.parseBoolValue(commentData[index_4.doneProperty[this.keywordIndex]]);
            commentElement.text = this.parseCommentText(commentData[index_4.blocksProperty[this.keywordIndex]]);
            commentElement.mentions = this.parseCommentMentions(commentData[index_4.blocksProperty[this.keywordIndex]]);
            commentElement.isPosted = true;
            return commentElement;
        };
        SfdtReader.prototype.parseCommentText = function (blocks) {
            var text = '';
            var isFieldDisplayText = false;
            for (var i = 0; i < blocks.length; i++) {
                Iif (i !== 0) {
                    text += '<div>';
                }
                Eif (blocks[i][index_4.inlinesProperty[this.keywordIndex]].length > 0) {
                    var inlines = blocks[i][index_4.inlinesProperty[this.keywordIndex]];
                    for (var j = 0; j < inlines.length; j++) {
                        var inline = inlines[j];
                        Iif ((inline[index_4.fieldTypeProperty[this.keywordIndex]] === 0) || (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 1) || (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 2)) {
                            if (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 0) {
                                j++;
                            }
                            else if (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 2) {
                                isFieldDisplayText = true;
                            }
                            continue;
                        }
                        var textValue = inline[index_4.textProperty[this.keywordIndex]];
                        Iif (isFieldDisplayText) {
                            text = text + '<span contenteditable="false" class="e-mention-chip">' + textValue + '</span>';
                            isFieldDisplayText = false;
                        }
                        else {
                            text = text + textValue;
                        }
                    }
                }
                else {
                    text += i === 0 ? '<div><br></div>' : '<br>';
                }
                Iif (i !== 0) {
                    text += '</div>';
                }
            }
            return text;
        };
        SfdtReader.prototype.parseCommentMentions = function (blocks) {
            var data = [];
            var isFieldCode = false;
            var isFieldDisplayText = false;
            for (var i = 0; i < blocks.length; i++) {
                var inlines = blocks[i][index_4.inlinesProperty[this.keywordIndex]];
                var mention = {};
                for (var j = 0; j < inlines.length; j++) {
                    var inline = inlines[j];
                    Iif ((inline[index_4.fieldTypeProperty[this.keywordIndex]] === 0) || (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 1) || (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 2)) {
                        if (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 0) {
                            isFieldCode = true;
                        }
                        else if (inline[index_4.fieldTypeProperty[this.keywordIndex]] === 2) {
                            isFieldDisplayText = true;
                        }
                        continue;
                    }
                    var textValue = inline[index_4.textProperty[this.keywordIndex]];
                    Iif (isFieldCode) {
                        var updatedText = textValue.replace(/.*"(.*)".*/, '$1');
                        updatedText = updatedText.replace('mailto:', '');
                        mention.value = updatedText;
                        isFieldCode = false;
                    }
                    else Iif (isFieldDisplayText) {
                        mention.text = textValue;
                        isFieldDisplayText = false;
                        data.push(mention);
                        mention = {};
                    }
                }
            }
            return data;
        };
        SfdtReader.prototype.parseStyle = function (data, style, styles, resetKeyIndex) {
            var wStyle;
            var keyIndex = 0;
            var editor = this.documentHelper.owner.editorModule;
            if (!ej2_base_1.isNullOrUndefined(resetKeyIndex) && resetKeyIndex) {
                keyIndex = this.keywordIndex;
                this.keywordIndex = 0;
            }
            Eif (!ej2_base_1.isNullOrUndefined(style[index_4.typeProperty[this.keywordIndex]])) {
                if (this.getStyleType(style[index_4.typeProperty[this.keywordIndex]]) === 'Paragraph') {
                    wStyle = new index_2.WParagraphStyle();
                    wStyle.type = 'Paragraph';
                }
                if (this.getStyleType(style[index_4.typeProperty[this.keywordIndex]]) === 'Character') {
                    wStyle = new index_2.WCharacterStyle();
                    wStyle.type = 'Character';
                }
                if (this.getStyleType(style[index_4.typeProperty[this.keywordIndex]]) === 'Table') {
                    wStyle = new index_2.WTableStyle();
                    wStyle.type = 'Table';
                }
                Eif (!ej2_base_1.isNullOrUndefined(style[index_4.nameProperty[this.keywordIndex]])) {
                    wStyle.name = style[index_4.nameProperty[this.keywordIndex]];
                }
                styles.push(wStyle);
                if (!ej2_base_1.isNullOrUndefined(style[index_4.basedOnProperty[this.keywordIndex]])) {
                    var basedOn = void 0;
                    Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                        basedOn = this.documentHelper.styles.findByName(style[index_4.basedOnProperty[this.keywordIndex]]);
                    }
                    else {
                        basedOn = styles.findByName(style[index_4.basedOnProperty[this.keywordIndex]]);
                    }
                    if (!ej2_base_1.isNullOrUndefined(basedOn)) {
                        Eif (basedOn.type === wStyle.type && basedOn.name !== wStyle.name) {
                            wStyle.basedOn = basedOn;
                            var baseStyle = this.getStyle(style[index_4.basedOnProperty[this.keywordIndex]], data);
                            if (this.isPaste && !ej2_base_1.isNullOrUndefined(baseStyle)) {
                                Eif (wStyle.type === 'Paragraph' && this.getStyleType(baseStyle[index_4.typeProperty[this.keywordIndex]]) === 'Paragraph') {
                                    this.updateParagraphFormatFromBaseStyle(style, baseStyle);
                                }
                            }
                        }
                    }
                    else {
                        var basedStyle = this.getStyle(style[index_4.basedOnProperty[this.keywordIndex]], data);
                        var styleString = void 0;
                        Eif (!ej2_base_1.isNullOrUndefined(basedStyle) && this.getStyleType(basedStyle[index_4.typeProperty[this.keywordIndex]]) === wStyle.type) {
                            styleString = basedStyle;
                        }
                        else {
                            if (wStyle.type === 'Paragraph') {
                                styleString = JSON.parse('{"type":"Paragraph","name":"Normal","next":"Normal"}');
                            }
                            else if (wStyle.type === 'Character') {
                                styleString = JSON.parse('{"type": "Character","name": "Default Paragraph Font"}');
                            }
                        }
                        this.parseStyle(data, styleString, styles);
                        Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                            wStyle.basedOn = this.documentHelper.styles.findByName(styleString[index_4.nameProperty[this.keywordIndex]]);
                        }
                        else {
                            wStyle.basedOn = styles.findByName(styleString[index_4.nameProperty[this.keywordIndex]]);
                        }
                    }
                }
                if (!ej2_base_1.isNullOrUndefined(style[index_4.linkProperty[this.keywordIndex]])) {
                    var link = styles.findByName(style[index_4.linkProperty[this.keywordIndex]]);
                    var linkStyle = this.getStyle(style[index_4.linkProperty[this.keywordIndex]], data);
                    Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                        link = this.documentHelper.styles.findByName(style[index_4.linkProperty[this.keywordIndex]]);
                    }
                    var styleString = void 0;
                    if (ej2_base_1.isNullOrUndefined(link)) {
                        Iif (ej2_base_1.isNullOrUndefined(linkStyle)) {
                            var charaStyle = {};
                            charaStyle.characterFormat = style[index_4.characterFormatProperty[this.keywordIndex]];
                            charaStyle.name = style[index_4.nameProperty[this.keywordIndex]] + ' Char';
                            charaStyle.type = 'Character';
                            charaStyle.basedOn = style[index_4.basedOnProperty[this.keywordIndex]] === 'Normal' ? 'Default Paragraph Font' : (style[index_4.basedOnProperty[this.keywordIndex]] + ' Char');
                            styleString = charaStyle;
                        }
                        else {
                            styleString = linkStyle;
                        }
                        this.parseStyle(data, styleString, styles);
                        Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                            wStyle.link = ej2_base_1.isNullOrUndefined(this.documentHelper.styles.findByName(styleString.name)) ? style[index_4.linkProperty[this.keywordIndex]] : this.documentHelper.styles.findByName(styleString.name);
                        }
                        else {
                            wStyle.link = ej2_base_1.isNullOrUndefined(styles.findByName(styleString.name)) ? style[index_4.linkProperty[this.keywordIndex]] : styles.findByName(styleString.name);
                        }
                    }
                    else {
                        wStyle.link = link;
                    }
                }
                if (!ej2_base_1.isNullOrUndefined(style[index_4.characterFormatProperty[this.keywordIndex]])) {
                    this.parseCharacterFormat(this.keywordIndex, style[index_4.characterFormatProperty[this.keywordIndex]], wStyle.characterFormat);
                }
                if (!ej2_base_1.isNullOrUndefined(style[index_4.paragraphFormatProperty[this.keywordIndex]])) {
                    this.parseParagraphFormat(this.keywordIndex, style[index_4.paragraphFormatProperty[this.keywordIndex]], wStyle.paragraphFormat);
                }
                if (!ej2_base_1.isNullOrUndefined(style[index_4.nextProperty[this.keywordIndex]])) {
                    if (style[index_4.nextProperty[this.keywordIndex]] === style[index_4.nameProperty[this.keywordIndex]]) {
                        wStyle.next = wStyle;
                    }
                    else {
                        var next = void 0;
                        Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                            next = this.documentHelper.styles.findByName(style[index_4.nextProperty[this.keywordIndex]]);
                        }
                        else {
                            next = styles.findByName(style[index_4.nextProperty[this.keywordIndex]]);
                        }
                        if (!ej2_base_1.isNullOrUndefined(next) && next.type === wStyle.type) {
                            wStyle.next = next;
                        }
                        else {
                            var nextStyleString = this.getStyle(style[index_4.nextProperty[this.keywordIndex]], data);
                            Eif (!ej2_base_1.isNullOrUndefined(nextStyleString)) {
                                this.parseStyle(data, nextStyleString, styles);
                                Iif (!ej2_base_1.isNullOrUndefined(editor) && editor.isRemoteAction) {
                                    wStyle.next = this.documentHelper.styles.findByName(nextStyleString.name);
                                }
                                else {
                                    wStyle.next = styles.findByName(nextStyleString.name);
                                }
                            }
                            else {
                                wStyle.next = wStyle;
                            }
                        }
                    }
                }
            }
            if (!ej2_base_1.isNullOrUndefined(resetKeyIndex) && resetKeyIndex) {
                this.keywordIndex = keyIndex;
            }
            if (!ej2_base_1.isNullOrUndefined(wStyle) && wStyle.type !== 'Table') {
                this.documentHelper.addToStylesMap(wStyle);
            }
        };
        SfdtReader.prototype.updateParagraphFormatFromBaseStyle = function (style, baseStyle) {
            Eif (!ej2_base_1.isNullOrUndefined(style[index_4.paragraphFormatProperty[this.keywordIndex]]) && !ej2_base_1.isNullOrUndefined(baseStyle[index_4.paragraphFormatProperty[this.keywordIndex]])) {
                var paragraphFormat = style[index_4.paragraphFormatProperty[this.keywordIndex]];
                var baseParagraphFormat = baseStyle[index_4.paragraphFormatProperty[this.keywordIndex]];
                Iif (!paragraphFormat.hasOwnProperty(index_4.leftIndentProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.leftIndentProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.leftIndentProperty[this.keywordIndex]] = baseParagraphFormat[index_4.leftIndentProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.rightIndentProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.rightIndentProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.rightIndentProperty[this.keywordIndex]] = baseParagraphFormat[index_4.rightIndentProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.beforeSpacingProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.beforeSpacingProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.beforeSpacingProperty[this.keywordIndex]] = baseParagraphFormat[index_4.beforeSpacingProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.afterSpacingProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.afterSpacingProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.afterSpacingProperty[this.keywordIndex]] = baseParagraphFormat[index_4.afterSpacingProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.lineSpacingProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.lineSpacingProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.lineSpacingProperty[this.keywordIndex]] = baseParagraphFormat[index_4.lineSpacingProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.lineSpacingTypeProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.lineSpacingTypeProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.lineSpacingTypeProperty[this.keywordIndex]] = baseParagraphFormat[index_4.lineSpacingTypeProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.textAlignmentProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.textAlignmentProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.textAlignmentProperty[this.keywordIndex]] = baseParagraphFormat[index_4.textAlignmentProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.outlineLevelProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.outlineLevelProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.outlineLevelProperty[this.keywordIndex]] = baseParagraphFormat[index_4.outlineLevelProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.contextualSpacingProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.contextualSpacingProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.contextualSpacingProperty[this.keywordIndex]] = baseParagraphFormat[index_4.contextualSpacingProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.keepWithNextProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.keepWithNextProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.keepWithNextProperty[this.keywordIndex]] = baseParagraphFormat[index_4.keepWithNextProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.keepLinesTogetherProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.keepLinesTogetherProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.keepLinesTogetherProperty[this.keywordIndex]] = baseParagraphFormat[index_4.keepLinesTogetherProperty[this.keywordIndex]];
                }
                Iif (!paragraphFormat.hasOwnProperty(index_4.widowControlProperty[this.keywordIndex])
                    && baseParagraphFormat.hasOwnProperty(index_4.widowControlProperty[this.keywordIndex])) {
                    paragraphFormat[index_4.widowControlProperty[this.keywordIndex]] = baseParagraphFormat[index_4.widowControlProperty[this.keywordIndex]];
                }
            }
        };
        SfdtReader.prototype.getStyle = function (name, data) {
            for (var i = 0; i < data[index_4.stylesProperty[this.keywordIndex]].length; i++) {
                if (data[index_4.stylesProperty[this.keywordIndex]][i][index_4.nameProperty[this.keywordIndex]] === name) {
                    return data[index_4.stylesProperty[this.keywordIndex]][i];
                }
            }
            return undefined;
        };
        SfdtReader.prototype.parseAbstractList = function (data, abstractLists) {
            for (var i = 0; i < data[index_4.abstractListsProperty[this.keywordIndex]].length; i++) {
                var abstractList = new abstract_list_1.WAbstractList();
                var abstract = data[index_4.abstractListsProperty[this.keywordIndex]][i];
                Eif (!ej2_base_1.isNullOrUndefined(abstract)) {
                    Eif (!ej2_base_1.isNullOrUndefined(abstract[index_4.abstractListIdProperty[this.keywordIndex]])) {
                        abstractList.abstractListId = abstract[index_4.abstractListIdProperty[this.keywordIndex]];
                    }
                    if (!ej2_base_1.isNullOrUndefined(abstract[index_4.nsidProperty])) {
                        abstractList.nsid = abstract[index_4.nsidProperty];
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(abstract[index_4.levelsProperty[this.keywordIndex]])) {
                        for (var j = 0; j < abstract[index_4.levelsProperty[this.keywordIndex]].length; j++) {
                            var level = abstract[index_4.levelsProperty[this.keywordIndex]][j];
                            Eif (!ej2_base_1.isNullOrUndefined(level)) {
                                var listLevel = this.parseListLevel(level, abstractList);
                                abstractList.levels.push(listLevel);
                            }
                        }
                    }
                }
                abstractLists.push(abstractList);
            }
        };
        SfdtReader.prototype.parseListLevel = function (data, owner) {
            var listLevel = new list_level_1.WListLevel(owner);
            if (this.getListLevelPattern(data[index_4.listLevelPatternProperty[this.keywordIndex]]) === 'Bullet') {
                listLevel.listLevelPattern = 'Bullet';
                listLevel.numberFormat = !ej2_base_1.isNullOrUndefined(data[index_4.numberFormatProperty[this.keywordIndex]]) ? data[index_4.numberFormatProperty[this.keywordIndex]] : '';
            }
            else {
                listLevel.listLevelPattern = this.getListLevelPattern(data[index_4.listLevelPatternProperty[this.keywordIndex]]);
                listLevel.startAt = data[index_4.startAtProperty[this.keywordIndex]];
                listLevel.numberFormat = !ej2_base_1.isNullOrUndefined(data[index_4.numberFormatProperty[this.keywordIndex]]) ? data[index_4.numberFormatProperty[this.keywordIndex]] : '';
                Eif (data[index_4.restartLevelProperty[this.keywordIndex]] >= 0) {
                    listLevel.restartLevel = data[index_4.restartLevelProperty[this.keywordIndex]];
                }
                else {
                    listLevel.restartLevel = data[index_4.levelNumberProperty[this.keywordIndex]];
                }
            }
            listLevel.paraStyleName = !ej2_base_1.isNullOrUndefined(data[index_4.paraStyleNameProperty[this.keywordIndex]]) ? data[index_4.paraStyleNameProperty[this.keywordIndex]] : '';
            listLevel.isLegalStyleNumbering = !ej2_base_1.isNullOrUndefined(data[index_4.isLegalStyleNumberingProperty[this.keywordIndex]]) ? editor_helper_1.HelperMethods.parseBoolValue(data[index_4.isLegalStyleNumberingProperty[this.keywordIndex]]) : false;
            listLevel.followCharacter = this.getFollowCharacterType(data[index_4.followCharacterProperty[this.keywordIndex]]);
            this.parseCharacterFormat(this.keywordIndex, data[index_4.characterFormatProperty[this.keywordIndex]], listLevel.characterFormat);
            this.parseParagraphFormat(this.keywordIndex, data[index_4.paragraphFormatProperty[this.keywordIndex]], listLevel.paragraphFormat);
            return listLevel;
        };
        SfdtReader.prototype.parseList = function (data, listCollection) {
            for (var i = 0; i < data[index_4.listsProperty[this.keywordIndex]].length; i++) {
                var list = new list_1.WList();
                var lists = data[index_4.listsProperty[this.keywordIndex]][i];
                Eif (!ej2_base_1.isNullOrUndefined(lists[index_4.abstractListIdProperty[this.keywordIndex]])) {
                    list.abstractListId = lists[index_4.abstractListIdProperty[this.keywordIndex]];
                    list.abstractList = this.documentHelper.getAbstractListById(lists[index_4.abstractListIdProperty[this.keywordIndex]]);
                }
                listCollection.push(list);
                Eif (!ej2_base_1.isNullOrUndefined(lists[index_4.listIdProperty[this.keywordIndex]])) {
                    list.listId = lists[index_4.listIdProperty[this.keywordIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(lists[index_4.nsidProperty])) {
                    list.nsid = lists[index_4.nsidProperty];
                }
                else {
                    list.nsid = list.abstractList.nsid;
                }
                if (lists.hasOwnProperty(index_4.levelOverridesProperty[this.keywordIndex])) {
                    this.parseLevelOverride(lists[index_4.levelOverridesProperty[this.keywordIndex]], list);
                }
            }
        };
        SfdtReader.prototype.parseLevelOverride = function (data, list) {
            Iif (ej2_base_1.isNullOrUndefined(data)) {
                return;
            }
            for (var i = 0; i < data.length; i++) {
                var levelOverrides = new level_override_1.WLevelOverride();
                var levelOverride = data[i];
                levelOverrides.startAt = levelOverride[index_4.startAtProperty[this.keywordIndex]];
                levelOverrides.levelNumber = levelOverride[index_4.levelNumberProperty[this.keywordIndex]];
                if (!ej2_base_1.isNullOrUndefined(levelOverride[index_4.overrideListLevelProperty[this.keywordIndex]])) {
                    levelOverrides.overrideListLevel = this.parseListLevel(levelOverride[index_4.overrideListLevelProperty[this.keywordIndex]], levelOverrides);
                }
                list.levelOverrides.push(levelOverrides);
            }
        };
        SfdtReader.prototype.parseSections = function (data, sections) {
            for (var i = 0; i < data.length; i++) {
                var section = new page_1.BodyWidget();
                section.sectionFormat = new index_1.WSectionFormat(section);
                section.index = i;
                var item = data[i];
                var breakCode = '';
                var nextItem = data[i + 1];
                var sectionFormat = nextItem && nextItem[index_4.sectionFormatProperty[this.keywordIndex]] ? nextItem[index_4.sectionFormatProperty[this.keywordIndex]] : undefined;
                breakCode = sectionFormat && sectionFormat[index_4.breakCodeProperty[this.keywordIndex]] ? sectionFormat[index_4.breakCodeProperty[this.keywordIndex]] : 'NewPage';
                Eif (!ej2_base_1.isNullOrUndefined(item[index_4.sectionFormatProperty[this.keywordIndex]])) {
                    this.parseSectionFormat(this.keywordIndex, item[index_4.sectionFormatProperty[this.keywordIndex]], section.sectionFormat);
                }
                Iif (ej2_base_1.isNullOrUndefined(item[index_4.headersFootersProperty[this.keywordIndex]])) {
                    item[index_4.headersFootersProperty[this.keywordIndex]] = {};
                }
                this.documentHelper.headersFooters.push(this.parseHeaderFooter(item[index_4.headersFootersProperty[this.keywordIndex]], this.documentHelper.headersFooters));
                this.isParseHeader = false;
                this.parseTextBody(item[index_4.blocksProperty[this.keywordIndex]], section, i + 1 < data.length, breakCode);
                for (var i_1 = 0; i_1 < section.childWidgets.length; i_1++) {
                    section.childWidgets[i_1].containerWidget = section;
                }
                sections.push(section);
            }
        };
        SfdtReader.prototype.parseHeaderFooter = function (data, headersFooters) {
            this.isParseHeader = true;
            var hfs = {};
            if (!ej2_base_1.isNullOrUndefined(data[index_4.headerProperty[this.keywordIndex]])) {
                var oddHeader = new page_1.HeaderFooterWidget('OddHeader');
                hfs[0] = oddHeader;
                this.parseTextBody(data[index_4.headerProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], oddHeader);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.footerProperty[this.keywordIndex]])) {
                var oddFooter = new page_1.HeaderFooterWidget('OddFooter');
                hfs[1] = oddFooter;
                this.parseTextBody(data[index_4.footerProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], oddFooter);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.evenHeaderProperty[this.keywordIndex]])) {
                var evenHeader = new page_1.HeaderFooterWidget('EvenHeader');
                hfs[2] = evenHeader;
                this.parseTextBody(data[index_4.evenHeaderProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], evenHeader);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.evenFooterProperty[this.keywordIndex]])) {
                var evenFooter = new page_1.HeaderFooterWidget('EvenFooter');
                hfs[3] = evenFooter;
                this.parseTextBody(data[index_4.evenFooterProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], evenFooter);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.firstPageHeaderProperty[this.keywordIndex]])) {
                var firstPageHeader = new page_1.HeaderFooterWidget('FirstPageHeader');
                hfs[4] = firstPageHeader;
                this.parseTextBody(data[index_4.firstPageHeaderProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], firstPageHeader);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.firstPageFooterProperty[this.keywordIndex]])) {
                var firstPageFooter = new page_1.HeaderFooterWidget('FirstPageFooter');
                hfs[5] = firstPageFooter;
                this.parseTextBody(data[index_4.firstPageFooterProperty[this.keywordIndex]][index_4.blocksProperty[this.keywordIndex]], firstPageFooter);
            }
            return hfs;
        };
        SfdtReader.prototype.parseTextBody = function (data, section, isSectionBreak, breakCode) {
            this.parseBody(data, section.childWidgets, section, isSectionBreak, undefined, undefined, breakCode);
        };
        SfdtReader.prototype.addCustomStyles = function (data) {
            if (!ej2_base_1.isNullOrUndefined(data[index_4.stylesProperty[this.keywordIndex]])) {
                for (var i = 0; i < data[index_4.stylesProperty[this.keywordIndex]].length; i++) {
                    var style = this.documentHelper.styles.findByName(data[index_4.stylesProperty[this.keywordIndex]][i][index_4.nameProperty[this.keywordIndex]]);
                    if (style === undefined) {
                        this.parseStyle(data, data[index_4.stylesProperty[this.keywordIndex]][i], this.documentHelper.styles);
                    }
                }
            }
        };
        SfdtReader.prototype.parseBody = function (data, blocks, container, isSectionBreak, contentControlProperties, styles, breakCode, isFootnoteEndnote) {
            if (!ej2_base_1.isNullOrUndefined(data)) {
                for (var i = 0; i < data.length; i++) {
                    var block = data[i];
                    var hasValidElmts = false;
                    if (block.hasOwnProperty(index_4.inlinesProperty[this.keywordIndex])) {
                        var writeInlineFormat = false;
                        var paragraph = new page_1.ParagraphWidget();
                        paragraph.characterFormat = new index_1.WCharacterFormat(paragraph);
                        paragraph.paragraphFormat = new index_1.WParagraphFormat(paragraph);
                        if (block[index_4.inlinesProperty[this.keywordIndex]].length > 0) {
                            hasValidElmts = this.parseParagraph(block[index_4.inlinesProperty[this.keywordIndex]], paragraph, writeInlineFormat, undefined, isFootnoteEndnote && i === 0);
                        }
                        if (!(isSectionBreak && block === data[data.length - 1] && block[index_4.inlinesProperty[this.keywordIndex]].length === 0 && !hasValidElmts)) {
                            this.parseCharacterFormat(this.keywordIndex, block[index_4.characterFormatProperty[this.keywordIndex]], paragraph.characterFormat);
                            this.parseParagraphFormat(this.keywordIndex, block[index_4.paragraphFormatProperty[this.keywordIndex]], paragraph.paragraphFormat);
                            var styleObj = void 0;
                            var styleName = 'Normal';
                            var isParaHasStyleName = false;
                            if (!ej2_base_1.isNullOrUndefined(block[index_4.paragraphFormatProperty[this.keywordIndex]]) && !ej2_base_1.isNullOrUndefined(block[index_4.paragraphFormatProperty[this.keywordIndex]][index_4.styleNameProperty[this.keywordIndex]])) {
                                styleName = block[index_4.paragraphFormatProperty[this.keywordIndex]][index_4.styleNameProperty[this.keywordIndex]];
                                isParaHasStyleName = true;
                            }
                            styleObj = this.documentHelper.styles.findByName(styleName, 'Paragraph');
                            if (!ej2_base_1.isNullOrUndefined(styleObj)) {
                                paragraph.paragraphFormat.applyStyle(styleObj);
                            }
                            blocks.push(paragraph);
                        }
                        else Iif (isSectionBreak && data.length === 1) {
                            blocks.push(paragraph);
                        }
                        else if (isSectionBreak && block === data[data.length - 1] && block[index_4.inlinesProperty[this.keywordIndex]].length === 0 && !hasValidElmts && breakCode != 'NoBreak') {
                            var dataIndex = data.indexOf(block);
                            var previousData = data[dataIndex - 1];
                            if (!ej2_base_1.isNullOrUndefined(previousData) && previousData.hasOwnProperty(index_4.rowsProperty[this.keywordIndex])) {
                                blocks.push(paragraph);
                                paragraph.isSectionBreak = true;
                            }
                        }
                        paragraph.index = blocks.length - 1;
                        paragraph.containerWidget = container;
                    }
                    else if (block.hasOwnProperty(index_4.rowsProperty[this.keywordIndex])) {
                        this.parseTable(block, blocks, blocks.length, container);
                    }
                    else Eif (block.hasOwnProperty(index_4.contentControlPropertiesProperty[this.keywordIndex])) {
                        var blockStartContentControl = new page_1.ContentControl('Block');
                        var blockEndContentControl = new page_1.ContentControl('Block');
                        this.parseContentControlProperties(block[index_4.contentControlPropertiesProperty[this.keywordIndex]], blockStartContentControl.contentControlProperties);
                        blockEndContentControl.contentControlProperties = blockStartContentControl.contentControlProperties;
                        blockStartContentControl.type = 0;
                        blockEndContentControl.type = 1;
                        this.parseBody(block[index_4.blocksProperty[this.keywordIndex]], blocks, container, isSectionBreak, blockStartContentControl.contentControlProperties);
                        for (var j = 0; j < 2; j++) {
                            var para = (blocks.length < block[index_4.blocksProperty[this.keywordIndex]].length) ? blocks[0] : j === 0 ? blocks[blocks.length - block[index_4.blocksProperty[this.keywordIndex]].length] : blocks[blocks.length - 1];
                            var blockWidget = void 0;
                            Eif (para instanceof page_1.ParagraphWidget) {
                                blockWidget = para;
                            }
                            else if (para instanceof page_1.TableWidget) {
                                if (j === 0) {
                                    blockWidget = para.firstChild.firstChild.firstChild;
                                }
                                else {
                                    var cell = para.lastChild.lastChild;
                                    blockWidget = cell.lastChild;
                                }
                            }
                            Iif (!ej2_base_1.isNullOrUndefined(blockWidget) && blockWidget.childWidgets.length === 0) {
                                var lineWidget = new page_1.LineWidget(blockWidget);
                                blockWidget.childWidgets.push(lineWidget);
                            }
                            if (j === 0) {
                                blockWidget.firstChild.children.splice(0, 0, blockStartContentControl);
                                blockStartContentControl.line = blockWidget.firstChild;
                            }
                            else {
                                blockWidget.lastChild.children.push(blockEndContentControl);
                                blockEndContentControl.line = blockWidget.lastChild;
                            }
                        }
                    }
                    if (!ej2_base_1.isNullOrUndefined(contentControlProperties)) {
                        blocks[blocks.length - 1].contentControlProperties = contentControlProperties;
                    }
                }
            }
        };
        SfdtReader.prototype.parseTable = function (block, blocks, index, section) {
            var table = new page_1.TableWidget();
            table.index = index;
            Eif (!ej2_base_1.isNullOrUndefined(block[index_4.tableFormatProperty[this.keywordIndex]])) {
                this.parseTableFormat(block[index_4.tableFormatProperty[this.keywordIndex]], table.tableFormat, this.keywordIndex);
            }
            table.tableFormat.title = block[index_4.titleProperty[this.keywordIndex]];
            table.tableFormat.description = block[index_4.descriptionProperty[this.keywordIndex]];
            this.parseTablePositioning(block, table);
            for (var i = 0; i < block[index_4.rowsProperty[this.keywordIndex]].length; i++) {
                var row = new page_1.TableRowWidget();
                row.rowFormat = new index_1.WRowFormat(row);
                var tableRow = block[index_4.rowsProperty[this.keywordIndex]][i];
                if (!ej2_base_1.isNullOrUndefined(tableRow[index_4.contentControlPropertiesProperty[this.keywordIndex]])) {
                    row.contentControlProperties = new page_1.ContentControlProperties('Row');
                    this.parseContentControlProperties(tableRow[index_4.contentControlPropertiesProperty[this.keywordIndex]], row.contentControlProperties);
                }
                Eif (tableRow.hasOwnProperty(index_4.rowFormatProperty[this.keywordIndex])) {
                    this.parseRowFormat(tableRow[index_4.rowFormatProperty[this.keywordIndex]], row.rowFormat, this.keywordIndex);
                    row.index = i;
                    for (var j = 0; j < tableRow[index_4.cellsProperty[this.keywordIndex]].length; j++) {
                        var cell = new page_1.TableCellWidget();
                        cell.cellFormat = new index_1.WCellFormat(cell);
                        var tableCell = tableRow[index_4.cellsProperty[this.keywordIndex]][j];
                        if (!ej2_base_1.isNullOrUndefined(tableCell[index_4.contentControlPropertiesProperty[this.keywordIndex]])) {
                            cell.contentControlProperties = new page_1.ContentControlProperties('Cell');
                            this.parseContentControlProperties(tableCell[index_4.contentControlPropertiesProperty[this.keywordIndex]], cell.contentControlProperties);
                        }
                        row.childWidgets.push(cell);
                        cell.containerWidget = row;
                        cell.index = j;
                        cell.rowIndex = i;
                        cell.columnIndex = j;
                        Eif (tableCell.hasOwnProperty(index_4.cellFormatProperty[this.keywordIndex])) {
                            this.parseCellFormat(tableCell[index_4.cellFormatProperty[this.keywordIndex]], cell.cellFormat, this.keywordIndex);
                        }
                        var item = tableCell[index_4.blocksProperty[this.keywordIndex]];
                        for (var k = 0; k < item.length; k++) {
                            if (item[k].hasOwnProperty([index_4.rowsProperty[this.keywordIndex]])) {
                                table.isContainInsideTable = true;
                            }
                        }
                        this.isPageBreakInsideTable = true;
                        this.parseTextBody(tableCell[index_4.blocksProperty[this.keywordIndex]], cell, false);
                        if (!ej2_base_1.isNullOrUndefined(cell.contentControlProperties)) {
                            var cellStartContentControl = new page_1.ContentControl('Cell');
                            var cellEndContentControl = new page_1.ContentControl('Cell');
                            cellStartContentControl.contentControlProperties = cell.contentControlProperties;
                            cellEndContentControl.contentControlProperties = cell.contentControlProperties;
                            cellStartContentControl.type = 0;
                            cellEndContentControl.type = 1;
                            Iif (cell.firstChild.childWidgets.length === 0) {
                                var lineWidget = new page_1.LineWidget(cell.firstChild);
                                cell.firstChild.childWidgets.push(lineWidget);
                            }
                            cellStartContentControl.line = cell.firstChild.firstChild;
                            cell.firstChild.firstChild.children.splice(0, 0, cellStartContentControl);
                            Iif (cell.lastChild.childWidgets.length === 0) {
                                var lineWidget = new page_1.LineWidget(cell.lastChild);
                                cell.lastChild.childWidgets.push(lineWidget);
                            }
                            cellEndContentControl.line = cell.lastChild.lastChild;
                            cell.lastChild.lastChild.children.push(cellEndContentControl);
                        }
                        if (!ej2_base_1.isNullOrUndefined(row.contentControlProperties)) {
                            if (row.firstChild === cell) {
                                var rowStartContentControl = new page_1.ContentControl('Row');
                                rowStartContentControl.contentControlProperties = row.contentControlProperties;
                                rowStartContentControl.type = 0;
                                Eif (cell.firstChild.childWidgets.length === 0) {
                                    var lineWidget = new page_1.LineWidget(cell.firstChild);
                                    cell.firstChild.childWidgets.push(lineWidget);
                                }
                                rowStartContentControl.line = cell.firstChild.firstChild;
                                cell.firstChild.firstChild.children.splice(0, 0, rowStartContentControl);
                            }
                            else Eif (row.lastChild === cell) {
                                var rowEndContentControl = new page_1.ContentControl('Row');
                                rowEndContentControl.contentControlProperties = row.contentControlProperties;
                                rowEndContentControl.type = 1;
                                Iif (cell.lastChild.childWidgets.length === 0) {
                                    var lineWidget = new page_1.LineWidget(cell.lastChild);
                                    cell.lastChild.childWidgets.push(lineWidget);
                                }
                                rowEndContentControl.line = cell.lastChild.lastChild;
                                cell.lastChild.lastChild.children.push(rowEndContentControl);
                            }
                        }
                        this.isPageBreakInsideTable = false;
                    }
                }
                table.childWidgets.push(row);
                row.containerWidget = table;
            }
            table.containerWidget = section;
            blocks.push(table);
            table.isGridUpdated = false;
        };
        SfdtReader.prototype.parseTablePositioning = function (block, table) {
            table.wrapTextAround = !ej2_base_1.isNullOrUndefined(block[index_4.wrapTextAroundProperty[this.keywordIndex]]) ? editor_helper_1.HelperMethods.parseBoolValue(block[index_4.wrapTextAroundProperty[this.keywordIndex]]) : false;
            if (table.wrapTextAround) {
                table.positioning = new page_1.TablePosition();
                table.positioning.allowOverlap = editor_helper_1.HelperMethods.parseBoolValue(block[index_4.positioningProperty[this.keywordIndex]][index_4.allowOverlapProperty[this.keywordIndex]]);
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceBottomProperty[this.keywordIndex]])) {
                    table.positioning.distanceBottom = editor_helper_1.HelperMethods.convertPointToPixel(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceBottomProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceLeftProperty[this.keywordIndex]])) {
                    table.positioning.distanceLeft = editor_helper_1.HelperMethods.convertPointToPixel(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceLeftProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceRightProperty[this.keywordIndex]])) {
                    table.positioning.distanceRight = editor_helper_1.HelperMethods.convertPointToPixel(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceRightProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceTopProperty[this.keywordIndex]])) {
                    table.positioning.distanceTop = editor_helper_1.HelperMethods.convertPointToPixel(block[index_4.positioningProperty[this.keywordIndex]][index_4.distanceTopProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.verticalAlignmentProperty[this.keywordIndex]])) {
                    table.positioning.verticalAlignment = this.getTableVerticalPosition(block[index_4.positioningProperty[this.keywordIndex]][index_4.verticalAlignmentProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.verticalOriginProperty[this.keywordIndex]])) {
                    table.positioning.verticalOrigin = this.getTableVerticalRelation(block[index_4.positioningProperty[this.keywordIndex]][index_4.verticalOriginProperty[this.keywordIndex]]);
                }
                table.positioning.verticalPosition = block[index_4.positioningProperty[this.keywordIndex]][index_4.verticalPositionProperty[this.keywordIndex]];
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.horizontalAlignmentProperty[this.keywordIndex]])) {
                    table.positioning.horizontalAlignment = this.getTableHorizontalPosition(block[index_4.positioningProperty[this.keywordIndex]][index_4.horizontalAlignmentProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(block[index_4.positioningProperty[this.keywordIndex]][index_4.horizontalOriginProperty[this.keywordIndex]])) {
                    table.positioning.horizontalOrigin = this.getTableHorizontalRelation(block[index_4.positioningProperty[this.keywordIndex]][index_4.horizontalOriginProperty[this.keywordIndex]]);
                }
                table.positioning.horizontalPosition = block[index_4.positioningProperty[this.keywordIndex]][index_4.horizontalPositionProperty[this.keywordIndex]];
            }
        };
        SfdtReader.prototype.parseRowGridValues = function (data, rowFormat, keyIndex) {
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridBeforeProperty[keyIndex]])) {
                rowFormat.gridBefore = data[index_4.gridBeforeProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridBeforeWidthProperty[keyIndex]])) {
                rowFormat.gridBeforeWidth = data[index_4.gridBeforeWidthProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridBeforeWidthTypeProperty[keyIndex]])) {
                rowFormat.gridBeforeWidthType = this.getWidthType(data[index_4.gridBeforeWidthTypeProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridAfterProperty[keyIndex]])) {
                rowFormat.gridAfter = data[index_4.gridAfterProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridAfterWidthProperty[keyIndex]])) {
                rowFormat.gridAfterWidth = data[index_4.gridAfterWidthProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.gridAfterWidthTypeProperty[keyIndex]])) {
                rowFormat.gridAfterWidthType = this.getWidthType(data[index_4.gridAfterWidthTypeProperty[keyIndex]]);
            }
        };
        SfdtReader.prototype.parseContentControlProperties = function (wContentControlProperties, contentControlProperties) {
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.lockContentControlProperty[this.keywordIndex]])) {
                contentControlProperties.lockContentControl = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.lockContentControlProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.lockContentsProperty[this.keywordIndex]])) {
                contentControlProperties.lockContents = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.lockContentsProperty[this.keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.tagProperty[this.keywordIndex]])) {
                contentControlProperties.tag = wContentControlProperties[index_4.tagProperty[this.keywordIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.colorProperty[this.keywordIndex]])) {
                contentControlProperties.color = wContentControlProperties[index_4.colorProperty[this.keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.titleProperty[this.keywordIndex]])) {
                contentControlProperties.title = wContentControlProperties[index_4.titleProperty[this.keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.appearanceProperty[this.keywordIndex]])) {
                contentControlProperties.appearance = this.getContentControlAppearance(wContentControlProperties[index_4.appearanceProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.typeProperty[this.keywordIndex]])) {
                contentControlProperties.type = this.getContentControlType(wContentControlProperties[index_4.typeProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.hasPlaceHolderTextProperty[this.keywordIndex]])) {
                contentControlProperties.hasPlaceHolderText = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.hasPlaceHolderTextProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.multiLineProperty[this.keywordIndex]])) {
                contentControlProperties.multiline = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.multiLineProperty[this.keywordIndex]]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.isTemporaryProperty[this.keywordIndex]])) {
                contentControlProperties.isTemporary = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.isTemporaryProperty[this.keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.characterFormatProperty[this.keywordIndex]])) {
                this.parseCharacterFormat(this.keywordIndex, wContentControlProperties[index_4.characterFormatProperty[this.keywordIndex]], contentControlProperties.characterFormat);
            }
            if (contentControlProperties.type === 'CheckBox') {
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.isCheckedProperty[this.keywordIndex]])) {
                    contentControlProperties.isChecked = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.isCheckedProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.uncheckedStateProperty[this.keywordIndex]])) {
                    contentControlProperties.uncheckedState = new page_1.CheckBoxState();
                    contentControlProperties.uncheckedState.font = wContentControlProperties[index_4.uncheckedStateProperty[this.keywordIndex]][index_4.fontProperty[this.keywordIndex]];
                    contentControlProperties.uncheckedState.value = wContentControlProperties[index_4.uncheckedStateProperty[this.keywordIndex]][index_4.valueProperty[this.keywordIndex]];
                }
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.checkedStateProperty[this.keywordIndex]])) {
                    contentControlProperties.checkedState = new page_1.CheckBoxState();
                    contentControlProperties.checkedState.font = wContentControlProperties[index_4.checkedStateProperty[this.keywordIndex]][index_4.fontProperty[this.keywordIndex]];
                    contentControlProperties.checkedState.value = wContentControlProperties[index_4.checkedStateProperty[this.keywordIndex]][index_4.valueProperty[this.keywordIndex]];
                }
            }
            else if (contentControlProperties.type === 'Date') {
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.dateCalendarTypeProperty[this.keywordIndex]])) {
                    contentControlProperties.dateCalendarType = this.getDateCalendarType(wContentControlProperties[index_4.dateCalendarTypeProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.dateStorageFormatProperty[this.keywordIndex]])) {
                    contentControlProperties.dateStorageFormat = this.getDateStorageFormat(wContentControlProperties[index_4.dateStorageFormatProperty[this.keywordIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.dateDisplayLocaleProperty[this.keywordIndex]])) {
                    contentControlProperties.dateDisplayLocale = wContentControlProperties[index_4.dateDisplayLocaleProperty[this.keywordIndex]];
                }
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.dateDisplayFormatProperty[this.keywordIndex]])) {
                    contentControlProperties.dateDisplayFormat = wContentControlProperties[index_4.dateDisplayFormatProperty[this.keywordIndex]];
                }
            }
            else if (contentControlProperties.type === 'ComboBox' || contentControlProperties.type === 'DropDownList') {
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.contentControlListItemsProperty[this.keywordIndex]])) {
                    for (var i = 0; i < wContentControlProperties[index_4.contentControlListItemsProperty[this.keywordIndex]].length; i++) {
                        var contentControlListItem = new page_1.ContentControlListItems();
                        contentControlListItem.displayText = wContentControlProperties[index_4.contentControlListItemsProperty[this.keywordIndex]][i][index_4.displayTextProperty[this.keywordIndex]];
                        contentControlListItem.value = wContentControlProperties[index_4.contentControlListItemsProperty[this.keywordIndex]][i][index_4.valueProperty[this.keywordIndex]];
                        contentControlProperties.contentControlListItems.push(contentControlListItem);
                    }
                }
            }
            if (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]])) {
                contentControlProperties.xmlMapping = new page_1.XmlMapping();
                contentControlProperties.xmlMapping.isMapped = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.isMappedProperty[this.keywordIndex]]);
                contentControlProperties.xmlMapping.isWordMl = editor_helper_1.HelperMethods.parseBoolValue(wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.isWordMlProperty[this.keywordIndex]]);
                Iif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.prefixMappingProperty[this.keywordIndex]])) {
                    contentControlProperties.xmlMapping.prefixMapping = wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.prefixMappingProperty[this.keywordIndex]];
                }
                contentControlProperties.xmlMapping.xPath = wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.xPathProperty[this.keywordIndex]];
                contentControlProperties.xmlMapping.storeItemId = wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.storeItemIdProperty[this.keywordIndex]];
                Eif (!ej2_base_1.isNullOrUndefined(wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.customXmlPartProperty[this.keywordIndex]])) {
                    contentControlProperties.xmlMapping.customXmlPart = new page_1.CustomXmlPart();
                    contentControlProperties.xmlMapping.customXmlPart.id = wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.customXmlPartProperty[this.keywordIndex]][index_4.idProperty[this.keywordIndex]];
                    contentControlProperties.xmlMapping.customXmlPart.xml = wContentControlProperties[index_4.xmlMappingProperty[this.keywordIndex]][index_4.customXmlPartProperty[this.keywordIndex]][index_4.xmlProperty[this.keywordIndex]];
                }
            }
        };
        SfdtReader.prototype.parseSymbol = function (fieldCode, lineWidget) {
            var code = fieldCode.split(' ');
            var indexOf = code.indexOf('SYMBOL');
            if (indexOf !== -1) {
                var characterCode = code[indexOf + 1];
                var textElement = new page_1.TextElementBox();
                textElement.characterFormat = new index_1.WCharacterFormat(textElement);
                textElement.text = String.fromCharCode(parseInt(characterCode));
                var fontIndex = code.indexOf('\\f');
                if (fontIndex !== -1) {
                    var fontName = "";
                    for (var j = fontIndex + 1; j < code.length; j++) {
                        if (code[j] === '\\s') {
                            break;
                        }
                        fontName += code[j] + ' ';
                    }
                    if (fontName !== null) {
                        fontName = fontName.replace(/"/g, '');
                        fontName = fontName.trim();
                        textElement.characterFormat.fontFamily = fontName;
                    }
                }
                var sizeIndex = code.indexOf('\\s');
                if (sizeIndex !== -1) {
                    textElement.characterFormat.fontSize = parseInt(code[sizeIndex + 1]);
                }
                textElement.line = lineWidget;
                lineWidget.children.push(textElement);
            }
        };
        SfdtReader.prototype.parseParagraph = function (data, paragraph, writeInlineFormat, lineWidget, isFootnoteEndnote) {
            var _this = this;
            var isContentControl = false;
            if (ej2_base_1.isNullOrUndefined(lineWidget)) {
                lineWidget = new page_1.LineWidget(paragraph);
            }
            else {
                isContentControl = true;
            }
            var hasValidElmts = false;
            var revision;
            var trackChange = this.viewer.owner.enableTrackChanges;
            var count = 0;
            var isCreateTextEleBox = false;
            var isCreateField = false;
            var fieldCode = undefined;
            var _loop_1 = function (i) {
                var inline = data[i];
                isCreateTextEleBox = false;
                if (inline.hasOwnProperty([index_4.fieldTypeProperty[this_1.keywordIndex]])) {
                    if (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 2) {
                        count = i;
                    }
                    if (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 1 && count + 1 === i) {
                        isCreateTextEleBox = true;
                        count = 0;
                    }
                }
                Iif (isCreateTextEleBox && this_1.documentHelper.isPageField) {
                    var textElement = new page_1.FieldTextElementBox();
                    textElement.characterFormat = new index_1.WCharacterFormat(textElement);
                    textElement.text = "";
                    textElement.line = lineWidget;
                    lineWidget.children.push(textElement);
                    hasValidElmts = true;
                    i--;
                    return out_i_1 = i, "continue";
                }
                else Iif (isCreateTextEleBox && !ej2_base_1.isNullOrUndefined(fieldCode) && fieldCode.indexOf('SYMBOL') !== -1) {
                    this_1.parseSymbol(fieldCode, lineWidget);
                    fieldCode = undefined;
                    isCreateTextEleBox = false;
                }
                if (inline.hasOwnProperty(index_4.textProperty[this_1.keywordIndex]) || inline.hasOwnProperty(index_4.breakClearTypeProperty[this_1.keywordIndex])) {
                    var textElement = undefined;
                    if (this_1.documentHelper.isPageField) {
                        textElement = new page_1.FieldTextElementBox();
                        textElement.fieldBegin = this_1.documentHelper.fieldStacks[this_1.documentHelper.fieldStacks.length - 1];
                    }
                    else if (inline[index_4.textProperty[this_1.keywordIndex]] === '\t') {
                        textElement = new page_1.TabElementBox();
                    }
                    else Iif (inline[index_4.textProperty[this_1.keywordIndex]] === '\f' && this_1.isPageBreakInsideTable) {
                        return out_i_1 = i, "continue";
                    }
                    else {
                        Iif (inline.hasOwnProperty(index_4.breakClearTypeProperty[this_1.keywordIndex])) {
                            textElement = new page_1.BreakElementBox();
                            textElement.breakClearType = this_1.getBreakClearType(inline[index_4.breakClearTypeProperty[this_1.keywordIndex]]);
                        }
                        else if (inline[index_4.textProperty[this_1.keywordIndex]] === '\u0002'
                            || (editor_helper_1.HelperMethods.checkTextFormat(inline[index_4.textProperty[this_1.keywordIndex]]) && lineWidget.children.length === 0 && i === 0 && isFootnoteEndnote)) {
                            textElement = new page_1.FootnoteEndnoteMarkerElementBox();
                        }
                        else {
                            textElement = new page_1.TextElementBox();
                            Iif ((inline[index_4.textProperty[this_1.keywordIndex]]).length === 0 && !ej2_base_1.isNullOrUndefined(inline[index_4.revisionIdsProperty[this_1.keywordIndex]])) {
                                return out_i_1 = i, "continue";
                            }
                        }
                    }
                    textElement.characterFormat = new index_1.WCharacterFormat(textElement);
                    this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], textElement.characterFormat, writeInlineFormat);
                    this_1.applyCharacterStyle(inline, textElement);
                    textElement.text = textElement instanceof page_1.BreakElementBox ? "\v" : inline[index_4.textProperty[this_1.keywordIndex]];
                    fieldCode = textElement.text;
                    Iif (this_1.isHtmlPaste && (textElement instanceof page_1.TextElementBox || textElement instanceof page_1.BreakElementBox)) {
                        var previousElement = void 0;
                        if (lineWidget.children.length > 0) {
                            previousElement = lineWidget.children[lineWidget.children.length - 1];
                        }
                        if (this_1.documentHelper.textHelper.isRTLText(textElement.text)) {
                            textElement.characterFormat.bidi = true;
                            if (previousElement instanceof page_1.TextElementBox && previousElement.text === ' ') {
                                previousElement.characterFormat.bidi = true;
                            }
                        }
                        else if (textElement.text === ' ' && previousElement && previousElement.characterFormat.bidi) {
                            textElement.characterFormat.bidi = true;
                        }
                    }
                    if (this_1.documentHelper.owner.parser.isPaste && !(this_1.isCutPerformed)) {
                        Iif (!ej2_base_1.isNullOrUndefined(inline[index_4.revisionIdsProperty[this_1.keywordIndex]])) {
                            for (var j = 0; j < inline[index_4.revisionIdsProperty[this_1.keywordIndex]].length; j++) {
                                if (this_1.revisionCollection.containsKey(inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j])) {
                                    if (trackChange) {
                                        revision = this_1.revisionCollection.get(inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j]);
                                    }
                                    if (!ej2_base_1.isNullOrUndefined(revision) && lineWidget.children.length > 0 && !ej2_base_1.isNullOrUndefined(lineWidget.children[i - 1].revisions[j]) && ((!trackChange) || (trackChange && (revision.revisionType === 'Deletion')))) {
                                        if (revision.revisionID === inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j]) {
                                            inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j] = lineWidget.children[i - 1].revisions[j].revisionID;
                                            this_1.checkAndApplyRevision(this_1.keywordIndex, inline, textElement);
                                            continue;
                                        }
                                    }
                                    if (!trackChange) {
                                        revision = this_1.documentHelper.revisionsInternal.get(inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j]);
                                    }
                                    if (this_1.documentHelper.owner.editorModule.isRemoteAction) {
                                        this_1.documentHelper.owner.editorModule.insertRevision(textElement, revision.revisionType, revision.author, undefined, undefined, false, revision.revisionID);
                                    }
                                    else {
                                        this_1.documentHelper.owner.editorModule.insertRevision(textElement, revision.revisionType, revision.author, undefined, undefined, false);
                                    }
                                    inline[index_4.revisionIdsProperty[this_1.keywordIndex]][j] = textElement.revisions[j].revisionID;
                                }
                            }
                        }
                    }
                    else {
                        this_1.checkAndApplyRevision(this_1.keywordIndex, inline, textElement);
                    }
                    textElement.line = lineWidget;
                    var lineChildren = lineWidget.children;
                    var lastIndex = lineChildren.length - 1;
                    while (lineChildren.length > 0
                        && lineChildren[lastIndex] instanceof page_1.BookmarkElementBox
                        && !ej2_base_1.isNullOrUndefined(lineChildren[lastIndex].properties)
                        && lineChildren[lastIndex].properties['isAfterParagraphMark'] === true) {
                        lastIndex--;
                    }
                    Iif (lastIndex !== lineChildren.length - 1) {
                        lineChildren.splice(lastIndex + 1, 0, textElement);
                    }
                    else {
                        lineChildren.push(textElement);
                    }
                    if (textElement instanceof page_1.TextElementBox && textElement.text.length > 90) {
                        editor_helper_1.HelperMethods.splitWordByMaxLength(textElement, lineWidget, true);
                    }
                    hasValidElmts = true;
                }
                else if (inline.hasOwnProperty(index_4.footnoteTypeProperty[this_1.keywordIndex])) {
                    var footnoteElement = new page_1.FootnoteElementBox();
                    footnoteElement.line = lineWidget;
                    footnoteElement.footnoteType = this_1.getFootnoteType(inline[index_4.footnoteTypeProperty[this_1.keywordIndex]]);
                    if (footnoteElement.footnoteType === 'Footnote') {
                        this_1.documentHelper.footnoteCollection.push(footnoteElement);
                    }
                    else {
                        this_1.documentHelper.endnoteCollection.push(footnoteElement);
                    }
                    footnoteElement.symbolCode = inline[index_4.symbolCodeProperty[this_1.keywordIndex]];
                    footnoteElement.symbolFontName = inline[index_4.symbolFontNameProperty[this_1.keywordIndex]];
                    footnoteElement.customMarker = inline[index_4.customMarkerProperty[this_1.keywordIndex]];
                    footnoteElement.characterFormat = new index_1.WCharacterFormat(footnoteElement);
                    this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], footnoteElement.characterFormat, writeInlineFormat);
                    this_1.applyCharacterStyle(inline, footnoteElement);
                    this_1.checkAndApplyRevision(this_1.keywordIndex, inline, footnoteElement);
                    this_1.parseBody(inline[index_4.blocksProperty[this_1.keywordIndex]], footnoteElement.bodyWidget.childWidgets, footnoteElement.bodyWidget, false, undefined, undefined, undefined, true);
                    lineWidget.children.push(footnoteElement);
                    hasValidElmts = true;
                }
                else if (inline.hasOwnProperty(index_4.chartTypeProperty[this_1.keywordIndex])) {
                    Eif (this_1.documentHelper.owner.editorModule) {
                        this_1.documentHelper.owner.editorModule.chartType = true;
                    }
                    var chartElement = new page_1.ChartElementBox();
                    chartElement.title = inline[index_4.chartTitleProperty[this_1.keywordIndex]];
                    chartElement.type = inline[index_4.chartTypeProperty[this_1.keywordIndex]];
                    chartElement.chartGapWidth = inline[index_4.gapWidthProperty[this_1.keywordIndex]];
                    chartElement.chartOverlap = inline[index_4.overlapProperty[this_1.keywordIndex]];
                    this_1.parseChartTitleArea(inline[index_4.chartTitleAreaProperty[this_1.keywordIndex]], chartElement.chartTitleArea);
                    this_1.parseChartArea(inline[index_4.chartAreaProperty[this_1.keywordIndex]], chartElement.chartArea);
                    this_1.parseChartArea(inline[index_4.plotAreaProperty[this_1.keywordIndex]], chartElement.chartPlotArea);
                    this_1.parseChartLegend(inline[index_4.chartLegendProperty[this_1.keywordIndex]], chartElement.chartLegend);
                    this_1.parseChartData(inline, chartElement);
                    this_1.parseChartCategoryAxis(inline[index_4.chartPrimaryCategoryAxisProperty[this_1.keywordIndex]], chartElement.chartPrimaryCategoryAxis);
                    this_1.parseChartCategoryAxis(inline[index_4.chartPrimaryValueAxisProperty[this_1.keywordIndex]], chartElement.chartPrimaryValueAxis);
                    Iif (inline[index_4.chartDataTableProperty[this_1.keywordIndex]] != null) {
                        this_1.parseChartDataTable(inline[index_4.chartDataTableProperty[this_1.keywordIndex]], chartElement.chartDataTable);
                    }
                    chartElement.line = lineWidget;
                    lineWidget.children.push(chartElement);
                    chartElement.height = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.heightProperty[this_1.keywordIndex]]);
                    chartElement.width = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.widthProperty[this_1.keywordIndex]]);
                    var officeChart = new ej2_office_chart_1.ChartComponent();
                    officeChart.chartRender(inline, this_1.keywordIndex);
                    chartElement.officeChart = officeChart;
                    officeChart.chart.appendTo(chartElement.targetElement);
                    hasValidElmts = true;
                }
                else if (inline.hasOwnProperty(index_4.imageStringProperty[this_1.keywordIndex])) {
                    var image_1 = new page_1.ImageElementBox(editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.isInlineImageProperty[this_1.keywordIndex]]));
                    image_1.isMetaFile = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.isMetaFileProperty[this_1.keywordIndex]]);
                    image_1.isCompressed = inline[index_4.isCompressedProperty[this_1.keywordIndex]];
                    image_1.metaFileImageString = inline[index_4.metaFileImageStringProperty[this_1.keywordIndex]];
                    image_1.characterFormat = new index_1.WCharacterFormat(image_1);
                    image_1.line = lineWidget;
                    this_1.checkAndApplyRevision(this_1.keywordIndex, inline, image_1);
                    lineWidget.children.push(image_1);
                    var imageString = editor_helper_1.HelperMethods.formatClippedString(inline[index_4.imageStringProperty[this_1.keywordIndex]]).formatClippedString;
                    var isValidImage = this_1.validateImageUrl(imageString);
                    Iif (!isValidImage) {
                        image_1.imageString = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEX///8AAADgAADY2Njl5eVcXFxjY2NZWVl/f3+wsLCmpqb4+PiioqKpqam7u7vV1dX2uLj2wsLhFRXzpKT3vb30sbHhCwv74+P40dH+9vbkIyO2trbBwcHLy8tsbGycnJz529v4zMzrbGzlLS3qZmblNzfrdXXoRkbvi4vvgYHlHh7CZsBOAAADpUlEQVR4nO3da1faQBSF4ekAUQlUEFs14AXxVv7/D6yaQiZx5mSEYXF2ut+PNKzyyK5diYDmR9czx34AB49C/CjE759w3jvvWr15Tdgz3atXE54f++EcIArxoxA/CvGjED8K8aMQPwrxoxA/CvGLEeZ9jPJdhfk4GyCUjb3ECGE/Q6m/q3DwfudjP0ERZYN9hKdn2hvd3+0jHJz5/kBVuTk96bbQUEjhYR9ckiikUH8UUqg/CinUH4UU6o9CCvVHIYX6o5BC/VFIof4opFB/FFKoPwop1B+FFOqPQgrjyxfjVC38Lxk9tnAxGqZqdKtSOE4GHA5/fuNJpDCtcNHbv4VqYYqPLjgfUViPQgrjozA2CptRSGF8/59w+Wrt+rr1btNna1cPzg0wwuXavncxabnX7PfHYYXzlYARvlobQZyUR9mXm+1NMEK7SSLONgcVV9vb8IQXv4J3KSeKKlxXxNCzONkeYp8AV3p9UT1+P3FWHVAsq5thhGZSEb1DrSZq7dS5HUdoLiuBZ6jORG3tCwAkNJfCUJ2Jrqe1P0ESCkMNTdSACYNDDU7UoAkDQw1P1MAJvUMVJmrwhJ6hShM1gMIvQxUnahCFjaHKEzWQQneoxR95ogZTWBuqPFEDKnSHKk/UoArdoYoTNbDC5lBDEzW4QjMpYiZqgIXG/S76JhwHK5zVVipcnkIVuv/RW/HyFKhwYhuFr6NiCmdNoDBUSGFjovJQEYXuRN9ahwoorJ8uSZenPsMTNk+X2q6jwgm/ntHL11HhhL4zenmoYEL/Gb04VCxh6KKTNFQoYfiikzBUJKF00Sk8VCChfF00OFQcYdt10dBQYYRT5xn0n9G7Q0X8GfCzNNEyZ6iPgD/HlydaVg11DfhajJaJlm2HugIUrlomWrYZKuJKHz6vHhbSM/hROdRnxNe1meuXYvW0DB6+aflYrB7dlzDiCM3N1dVN6GDhMCDhjlHYjEIK46MwNgqbUUhhfJ/vA07wO8N1vw94ONo/3e/lTpVOYfc/UyG//ZmqW52fi/FuTNW3/lZ+eguF+qOQQv1RSKH+KKRQfxRSqD8KKdQfhRTqj0IK9UchhfqjkEL9UUih/iikUH8UUqg/CmXh6Hsv3jlK+wnvD/vgkrSHMMuyu1P9ZdmuwnycDQYn+svG3n9KEUKT9zHyf6+IEWJHIX4U4kchfhTiRyF+FOJHIX4U4kchfnVhijeZa6sunCf4ZdPamteEHY5C/CjEr/vCv0ec0g+AtS1QAAAAAElFTkSuQmCC';
                    }
                    else {
                        Iif (this_1.isPaste && !ej2_base_1.isNullOrUndefined(this_1.documentHelper.owner.editorModule.pasteImageIndex)) {
                            image_1.imageString = this_1.documentHelper.owner.editorModule.pasteImageIndex.get(inline[index_4.imageStringProperty[this_1.keywordIndex]]);
                        }
                        else {
                            image_1.imageString = inline[index_4.imageStringProperty[this_1.keywordIndex]];
                        }
                    }
                    var imgStrValue = parseInt(inline[index_4.imageStringProperty[this_1.keywordIndex]]);
                    Iif (imgStrValue.toString() === "NaN" ? true : false) {
                        this_1.documentHelper.addBase64StringInCollection(image_1);
                    }
                    image_1.width = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.widthProperty[this_1.keywordIndex]]);
                    image_1.height = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.heightProperty[this_1.keywordIndex]]);
                    if (!this_1.isContextBasedPaste) {
                        var imgStr = this_1.documentHelper.getImageString(image_1);
                        Iif (!ej2_base_1.isNullOrUndefined(imgStr) && (editor_helper_1.HelperMethods.startsWith(imgStr, 'http://') || editor_helper_1.HelperMethods.startsWith(imgStr, 'https://'))) {
                            image_1.element.crossOrigin = 'Anonymous';
                            this_1.viewer.documentHelper.getBase64(imgStr, image_1.width, image_1.height).then(function (imageUrlString) {
                                _this.viewer.documentHelper.images.get(parseInt(image_1.imageString))[1] = imageUrlString;
                            });
                            var url = new URL(imgStr);
                            if (url.search.length > 0) {
                                imgStr += "&t=" + new Date().getTime();
                            }
                            else {
                                imgStr += "?t=" + new Date().getTime();
                            }
                        }
                        image_1.element.src = imgStr;
                    }
                    image_1.top = inline[index_4.topProperty[this_1.keywordIndex]];
                    image_1.left = inline[index_4.leftProperty[this_1.keywordIndex]];
                    image_1.bottom = inline[index_4.bottomProperty[this_1.keywordIndex]];
                    image_1.right = inline[index_4.rightProperty[this_1.keywordIndex]];
                    image_1.cropHeightScale = inline[index_4.getImageHeightProperty[this_1.keywordIndex]];
                    image_1.cropWidthScale = inline[index_4.getImageWidthProperty[this_1.keywordIndex]];
                    image_1.name = inline[index_4.nameProperty[this_1.keywordIndex]];
                    image_1.alternateText = inline[index_4.alternativeTextProperty[this_1.keywordIndex]];
                    image_1.title = inline[index_4.titleProperty[this_1.keywordIndex]];
                    image_1.visible = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.visibleProperty[this_1.keywordIndex]]);
                    image_1.widthScale = inline[index_4.widthScaleProperty[this_1.keywordIndex]];
                    image_1.heightScale = inline[index_4.heightScaleProperty[this_1.keywordIndex]];
                    image_1.verticalPosition = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.verticalPositionProperty[this_1.keywordIndex]]);
                    image_1.verticalOrigin = this_1.getVerticalOrigin(inline[index_4.verticalOriginProperty[this_1.keywordIndex]]);
                    image_1.verticalAlignment = this_1.getShapeVerticalAlignment(inline[index_4.verticalAlignmentProperty[this_1.keywordIndex]]);
                    image_1.horizontalPosition = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.horizontalPositionProperty[this_1.keywordIndex]]);
                    image_1.horizontalOrigin = this_1.getHorizontalOrigin(inline[index_4.horizontalOriginProperty[this_1.keywordIndex]]);
                    image_1.horizontalAlignment = this_1.getShapeHorizontalAlignment(inline[index_4.horizontalAlignmentProperty[this_1.keywordIndex]]);
                    image_1.allowOverlap = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.allowOverlapProperty[this_1.keywordIndex]]);
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.textWrappingStyleProperty[this_1.keywordIndex]])) {
                        image_1.textWrappingStyle = this_1.getTextWrappingStyle(inline[index_4.textWrappingStyleProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.textWrappingTypeProperty[this_1.keywordIndex]])) {
                        image_1.textWrappingType = this_1.getTextWrappingType(inline[index_4.textWrappingTypeProperty[this_1.keywordIndex]]);
                    }
                    image_1.isBelowText = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.belowTextProperty[this_1.keywordIndex]]);
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceBottomProperty[this_1.keywordIndex]])) {
                        image_1.distanceBottom = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceBottomProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceLeftProperty[this_1.keywordIndex]])) {
                        image_1.distanceLeft = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceLeftProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceRightProperty[this_1.keywordIndex]])) {
                        image_1.distanceRight = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceRightProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceTopProperty[this_1.keywordIndex]])) {
                        image_1.distanceTop = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceTopProperty[this_1.keywordIndex]]);
                    }
                    image_1.zOrderPosition = inline[index_4.zOrderPositionProperty[this_1.keywordIndex]];
                    image_1.layoutInCell = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.layoutInCellProperty[this_1.keywordIndex]]);
                    if (!ej2_base_1.isNullOrUndefined(inline[index_4.topProperty[this_1.keywordIndex]]) && inline[index_4.topProperty[this_1.keywordIndex]] !== 0 ||
                        !ej2_base_1.isNullOrUndefined(inline[index_4.bottomProperty[this_1.keywordIndex]]) && inline[index_4.bottomProperty[this_1.keywordIndex]] !== 0 ||
                        !ej2_base_1.isNullOrUndefined(inline[index_4.leftProperty[this_1.keywordIndex]]) && inline[index_4.leftProperty[this_1.keywordIndex]] !== 0 ||
                        !ej2_base_1.isNullOrUndefined(inline[index_4.rightProperty[this_1.keywordIndex]]) && inline[index_4.rightProperty[this_1.keywordIndex]] !== 0) {
                        image_1.isCrop = true;
                    }
                    if (this_1.getTextWrappingStyle(image_1.textWrappingStyle) !== 'Inline') {
                        paragraph.floatingElements.push(image_1);
                    }
                    this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], image_1.characterFormat);
                    hasValidElmts = true;
                }
                else if (inline.hasOwnProperty(index_4.hasFieldEndProperty[this_1.keywordIndex]) || (inline.hasOwnProperty(index_4.fieldTypeProperty[this_1.keywordIndex]) && inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 0)) {
                    isCreateField = true;
                    var fieldBegin = new page_1.FieldElementBox(0);
                    this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], fieldBegin.characterFormat, writeInlineFormat);
                    this_1.applyCharacterStyle(inline, fieldBegin);
                    fieldBegin.fieldCodeType = inline.fieldCodeType;
                    fieldBegin.hasFieldEnd = inline[index_4.hasFieldEndProperty[this_1.keywordIndex]];
                    if (inline.hasOwnProperty(index_4.formFieldDataProperty[this_1.keywordIndex])) {
                        var formFieldData = void 0;
                        formFieldData = this_1.parseFormFieldData(this_1.keywordIndex, inline, formFieldData);
                        fieldBegin.formFieldData = formFieldData;
                        if (!this_1.isContextBasedPaste) {
                            this_1.documentHelper.formFields.push(fieldBegin);
                        }
                    }
                    this_1.documentHelper.fieldStacks.push(fieldBegin);
                    this_1.checkAndApplyRevision(this_1.keywordIndex, inline, fieldBegin);
                    fieldBegin.line = lineWidget;
                    if (!this_1.isContextBasedPaste) {
                        this_1.documentHelper.fields.push(fieldBegin);
                    }
                    lineWidget.children.push(fieldBegin);
                }
                else if (inline.hasOwnProperty([index_4.fieldTypeProperty[this_1.keywordIndex]])) {
                    var field = undefined;
                    if (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 2 || (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 1 && isCreateField)) {
                        field = new page_1.FieldElementBox(2);
                        this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], field.characterFormat, writeInlineFormat);
                        this_1.checkAndApplyRevision(this_1.keywordIndex, inline, field);
                        this_1.fieldSeparator = field;
                        Eif (this_1.documentHelper.fieldStacks.length > 0) {
                            field.fieldBegin = this_1.documentHelper.fieldStacks[this_1.documentHelper.fieldStacks.length - 1];
                            field.fieldBegin.fieldSeparator = field;
                            var lineWidgetCount = lineWidget.children.length;
                            Eif (lineWidgetCount >= 2) {
                                var fieldTextElement = this_1.containsFieldBegin(lineWidget);
                                if (!ej2_base_1.isNullOrUndefined(fieldTextElement) && fieldTextElement instanceof page_1.TextElementBox && (fieldTextElement.text.match('PAGE') || fieldTextElement.text.match('page'))) {
                                    var textField = fieldTextElement.text.replace(/^\s+/g, '');
                                    Eif (!textField.startsWith('HYPERLINK')) {
                                        this_1.documentHelper.isPageField = true;
                                    }
                                }
                            }
                        }
                        Iif (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 1 && isCreateField) {
                            i--;
                            count = i;
                        }
                        isCreateField = false;
                    }
                    else Eif (inline[index_4.fieldTypeProperty[this_1.keywordIndex]] === 1) {
                        field = new page_1.FieldElementBox(1);
                        this_1.parseCharacterFormat(this_1.keywordIndex, inline[index_4.characterFormatProperty[this_1.keywordIndex]], field.characterFormat, writeInlineFormat);
                        this_1.applyCharacterStyle(inline, field);
                        this_1.checkAndApplyRevision(this_1.keywordIndex, inline, field);
                        Eif (this_1.documentHelper.fieldStacks.length > 0) {
                            field.fieldBegin = this_1.documentHelper.fieldStacks[this_1.documentHelper.fieldStacks.length - 1];
                            field.fieldBegin.fieldEnd = field;
                        }
                        Eif (!ej2_base_1.isNullOrUndefined(field.fieldBegin) && field.fieldBegin.fieldSeparator) {
                            field.fieldSeparator = field.fieldBegin.fieldSeparator;
                            field.fieldBegin.fieldSeparator.fieldEnd = field;
                            hasValidElmts = true;
                        }
                        this_1.documentHelper.fieldStacks.splice(this_1.documentHelper.fieldStacks.length - 1, 1);
                        this_1.fieldSeparator = undefined;
                        this_1.documentHelper.isPageField = false;
                        if (!this_1.isContextBasedPaste) {
                            this_1.documentHelper.fieldCollection.push(field.fieldBegin);
                        }
                        fieldCode = undefined;
                    }
                    field.line = lineWidget;
                    lineWidget.children.push(field);
                }
                else if (inline.hasOwnProperty([index_4.bookmarkTypeProperty[this_1.keywordIndex]])) {
                    var bookmark = undefined;
                    bookmark = new page_1.BookmarkElementBox(inline[index_4.bookmarkTypeProperty[this_1.keywordIndex]]);
                    bookmark.name = inline[index_4.nameProperty[this_1.keywordIndex]];
                    bookmark.properties = inline[index_4.propertiesProperty[this_1.keywordIndex]];
                    if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]])) {
                        if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterParagraphMarkProperty[this_1.keywordIndex]])) {
                            bookmark.properties['isAfterParagraphMark'] = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterParagraphMarkProperty[this_1.keywordIndex]]);
                        }
                        Iif (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterTableMarkProperty[this_1.keywordIndex]])) {
                            bookmark.properties['isAfterTableMark'] = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterTableMarkProperty[this_1.keywordIndex]]);
                        }
                        if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterRowMarkProperty[this_1.keywordIndex]])) {
                            bookmark.properties['isAfterRowMark'] = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterRowMarkProperty[this_1.keywordIndex]]);
                        }
                        if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterCellMarkProperty[this_1.keywordIndex]])) {
                            bookmark.properties['isAfterCellMark'] = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.isAfterCellMarkProperty[this_1.keywordIndex]]);
                        }
                        if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.columnFirstProperty[this_1.keywordIndex]])) {
                            bookmark.properties['columnFirst'] = inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.columnFirstProperty[this_1.keywordIndex]];
                        }
                        if (!ej2_base_1.isNullOrUndefined(inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.columnLastProperty[this_1.keywordIndex]])) {
                            bookmark.properties['columnLast'] = inline[index_4.propertiesProperty[this_1.keywordIndex]][index_4.columnLastProperty[this_1.keywordIndex]];
                        }
                    }
                    this_1.checkAndApplyRevision(this_1.keywordIndex, inline, bookmark);
                    lineWidget.children.push(bookmark);
                    bookmark.line = lineWidget;
                    if (!this_1.isParseHeader || this_1.isPaste) {
                        if (inline[index_4.bookmarkTypeProperty[this_1.keywordIndex]] === 0) {
                            var isAdd = this_1.isPaste && !this_1.documentHelper.bookmarks.containsKey(bookmark.name);
                            if (!this_1.isPaste || (isAdd && !this_1.isContextBasedPaste)) {
                                this_1.documentHelper.bookmarks.add(bookmark.name, bookmark);
                            }
                            else Iif (!isAdd) {
                                lineWidget.children.splice(lineWidget.children.indexOf(bookmark), 1);
                            }
                        }
                        else Eif (inline[index_4.bookmarkTypeProperty[this_1.keywordIndex]] === 1) {
                            if (this_1.documentHelper.bookmarks.containsKey(bookmark.name)) {
                                var bookmarkStart = this_1.documentHelper.bookmarks.get(bookmark.name);
                                var isConsider = this_1.isPaste && ej2_base_1.isNullOrUndefined(bookmarkStart.reference);
                                Eif (!this_1.isPaste || (isConsider && !this_1.isContextBasedPaste)) {
                                    bookmarkStart.reference = bookmark;
                                    bookmark.reference = bookmarkStart;
                                    this_1.documentHelper.endBookmarksUpdated.push(bookmark.name);
                                }
                                else if (!isConsider) {
                                    lineWidget.children.splice(lineWidget.children.indexOf(bookmark), 1);
                                }
                            }
                        }
                    }
                    if (bookmark.name.indexOf('_') !== 0) {
                        hasValidElmts = true;
                    }
                }
                else if (inline.hasOwnProperty([index_4.editRangeIdProperty[this_1.keywordIndex]])) {
                    if (inline.hasOwnProperty(index_4.editableRangeStartProperty[this_1.keywordIndex])) {
                        var permEnd = new page_1.EditRangeEndElementBox();
                        Eif (this_1.editableRanges.containsKey(inline[index_4.editRangeIdProperty[this_1.keywordIndex]])) {
                            var start = this_1.editableRanges.get(inline[index_4.editRangeIdProperty[this_1.keywordIndex]]);
                            permEnd.editRangeStart = start;
                            start.editRangeEnd = permEnd;
                            Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.editRangeIdProperty[this_1.keywordIndex]])) {
                                permEnd.editRangeId = inline[index_4.editRangeIdProperty[this_1.keywordIndex]];
                            }
                            this_1.editableRanges.remove(inline[index_4.editRangeIdProperty[this_1.keywordIndex]]);
                        }
                        lineWidget.children.push(permEnd);
                        permEnd.line = lineWidget;
                    }
                    else {
                        var permStart = this_1.parseEditableRangeStart(inline);
                        lineWidget.children.push(permStart);
                        permStart.line = lineWidget;
                        Eif (!this_1.editableRanges.containsKey(inline[index_4.editRangeIdProperty[this_1.keywordIndex]])) {
                            this_1.editableRanges.add(inline[index_4.editRangeIdProperty[this_1.keywordIndex]], permStart);
                        }
                    }
                    hasValidElmts = true;
                }
                else if (inline.hasOwnProperty([index_4.commentIdProperty[this_1.keywordIndex]])) {
                    var commentID = inline[index_4.commentIdProperty[this_1.keywordIndex]];
                    var commentStart = undefined;
                    var comment = void 0;
                    if (this_1.commentStarts.containsKey(commentID)) {
                        commentStart = this_1.commentStarts.get(commentID);
                    }
                    var commentEnd = undefined;
                    Iif (this_1.commentEnds.containsKey(commentID)) {
                        commentEnd = this_1.commentEnds.get(commentID);
                    }
                    Eif (inline.hasOwnProperty([index_4.commentCharacterTypeProperty[this_1.keywordIndex]])) {
                        if (inline[index_4.commentCharacterTypeProperty[this_1.keywordIndex]] === 0) {
                            var commentStartElement = new page_1.CommentCharacterElementBox(0);
                            commentStartElement.commentId = commentID;
                            Eif (!this_1.commentStarts.containsKey(commentID)) {
                                this_1.commentStarts.add(commentID, commentStartElement);
                            }
                            commentStartElement.line = lineWidget;
                            lineWidget.children.push(commentStartElement);
                            comment = this_1.commentsCollection.get(commentID);
                            if (!ej2_base_1.isNullOrUndefined(comment)) {
                                comment.commentStart = commentStartElement;
                                commentStartElement.comment = comment;
                            }
                        }
                        else {
                            var commentEndElement = new page_1.CommentCharacterElementBox(1);
                            commentEndElement.commentId = commentID;
                            Eif (!this_1.commentEnds.containsKey(commentID)) {
                                this_1.commentEnds.add(commentID, commentEndElement);
                            }
                            commentEndElement.line = lineWidget;
                            lineWidget.children.push(commentEndElement);
                            comment = this_1.commentsCollection.get(commentID);
                            if (!ej2_base_1.isNullOrUndefined(comment)) {
                                comment.commentEnd = commentEndElement;
                                commentEndElement.comment = comment;
                            }
                        }
                        if (!ej2_base_1.isNullOrUndefined(comment) && comment.isReply) {
                            Iif (ej2_base_1.isNullOrUndefined(comment.ownerComment.commentStart)) {
                                comment.ownerComment.commentStart = comment.commentStart;
                            }
                            if (ej2_base_1.isNullOrUndefined(comment.ownerComment.commentEnd)) {
                                comment.ownerComment.commentEnd = comment.commentEnd;
                            }
                        }
                    }
                }
                else if (inline.hasOwnProperty([index_4.shapeIdProperty[this_1.keywordIndex]])) {
                    var shape = new page_1.ShapeElementBox();
                    shape.shapeId = inline[index_4.shapeIdProperty[this_1.keywordIndex]];
                    shape.name = inline[index_4.nameProperty[this_1.keywordIndex]];
                    shape.alternateText = inline[index_4.alternativeTextProperty[this_1.keywordIndex]];
                    shape.title = inline[index_4.titleProperty[this_1.keywordIndex]];
                    shape.visible = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.visibleProperty[this_1.keywordIndex]]);
                    shape.width = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.widthProperty[this_1.keywordIndex]]);
                    shape.height = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.heightProperty[this_1.keywordIndex]]);
                    if (shape.height === 0) {
                        shape.isZeroHeight = true;
                    }
                    shape.widthScale = inline[index_4.widthScaleProperty[this_1.keywordIndex]];
                    shape.heightScale = inline[index_4.heightScaleProperty[this_1.keywordIndex]];
                    shape.verticalPosition = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.verticalPositionProperty[this_1.keywordIndex]]);
                    shape.verticalOrigin = this_1.getVerticalOrigin(inline[index_4.verticalOriginProperty[this_1.keywordIndex]]);
                    shape.verticalAlignment = this_1.getShapeVerticalAlignment(inline[index_4.verticalAlignmentProperty[this_1.keywordIndex]]);
                    shape.verticalRelativePercent = inline[index_4.verticalRelativePercentProperty[this_1.keywordIndex]];
                    shape.horizontalPosition = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.horizontalPositionProperty[this_1.keywordIndex]]);
                    shape.horizontalOrigin = this_1.getHorizontalOrigin(inline[index_4.horizontalOriginProperty[this_1.keywordIndex]]);
                    shape.horizontalAlignment = this_1.getShapeHorizontalAlignment(inline[index_4.horizontalAlignmentProperty[this_1.keywordIndex]]);
                    shape.horizontalRelativePercent = inline[index_4.horizontalRelativePercentProperty[this_1.keywordIndex]];
                    shape.heightRelativePercent = inline[index_4.heightRelativePercentProperty[this_1.keywordIndex]];
                    shape.widthRelativePercent = inline[index_4.widthRelativePercentProperty[this_1.keywordIndex]];
                    shape.zOrderPosition = inline[index_4.zOrderPositionProperty[this_1.keywordIndex]];
                    shape.allowOverlap = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.allowOverlapProperty[this_1.keywordIndex]]);
                    shape.textWrappingStyle = this_1.getTextWrappingStyle(inline[index_4.textWrappingStyleProperty[this_1.keywordIndex]]);
                    shape.textWrappingType = this_1.getTextWrappingType(inline[index_4.textWrappingTypeProperty[this_1.keywordIndex]]);
                    shape.isBelowText = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.belowTextProperty[this_1.keywordIndex]]);
                    shape.isHorizontalRule = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.horizontalRuleProperty[this_1.keywordIndex]]);
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceBottomProperty[this_1.keywordIndex]])) {
                        shape.distanceBottom = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceBottomProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceLeftProperty[this_1.keywordIndex]])) {
                        shape.distanceLeft = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceLeftProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceRightProperty[this_1.keywordIndex]])) {
                        shape.distanceRight = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceRightProperty[this_1.keywordIndex]]);
                    }
                    Eif (!ej2_base_1.isNullOrUndefined(inline[index_4.distanceTopProperty[this_1.keywordIndex]])) {
                        shape.distanceTop = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.distanceTopProperty[this_1.keywordIndex]]);
                    }
                    shape.layoutInCell = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.layoutInCellProperty[this_1.keywordIndex]]);
                    shape.lockAnchor = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.lockAnchorProperty[this_1.keywordIndex]]);
                    shape.autoShapeType = this_1.getAutoShapeType(inline[index_4.autoShapeTypeProperty[this_1.keywordIndex]]);
                    shape.editingPoints = inline[index_4.editingPointsProperty[this_1.keywordIndex]];
                    Eif (inline.hasOwnProperty(index_4.lineFormatProperty[this_1.keywordIndex])) {
                        var lineFormat = new page_1.LineFormat();
                        lineFormat.line = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.lineFormatProperty[this_1.keywordIndex]][index_4.lineProperty[this_1.keywordIndex]]);
                        lineFormat.lineFormatType = this_1.getLineFormatType(inline[index_4.lineFormatProperty[this_1.keywordIndex]][index_4.lineFormatTypeProperty[this_1.keywordIndex]]);
                        lineFormat.color = inline[index_4.lineFormatProperty[this_1.keywordIndex]][index_4.colorProperty[this_1.keywordIndex]];
                        lineFormat.weight = inline[index_4.lineFormatProperty[this_1.keywordIndex]][index_4.weightProperty[this_1.keywordIndex]];
                        lineFormat.dashStyle = this_1.getLineDashStyle(inline[index_4.lineFormatProperty[this_1.keywordIndex]][index_4.lineStyleProperty[this_1.keywordIndex]]);
                        shape.lineFormat = lineFormat;
                    }
                    Eif (inline.hasOwnProperty(index_4.fillFormatProperty[this_1.keywordIndex])) {
                        var fillFormat = new page_1.FillFormat();
                        fillFormat.color = inline[index_4.fillFormatProperty[this_1.keywordIndex]][index_4.colorProperty[this_1.keywordIndex]];
                        fillFormat.fill = editor_helper_1.HelperMethods.parseBoolValue(inline[index_4.fillFormatProperty[this_1.keywordIndex]][index_4.fillProperty[this_1.keywordIndex]]);
                        shape.fillFormat = fillFormat;
                    }
                    Eif (inline.hasOwnProperty(index_4.textFrameProperty[this_1.keywordIndex])) {
                        var textFrame = new page_1.TextFrame();
                        textFrame.textVerticalAlignment = this_1.getTextVerticalAlignment(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.textVerticalAlignmentProperty[this_1.keywordIndex]]);
                        textFrame.marginLeft = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.leftMarginProperty[this_1.keywordIndex]]);
                        textFrame.marginRight = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.rightMarginProperty[this_1.keywordIndex]]);
                        textFrame.marginTop = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.topMarginProperty[this_1.keywordIndex]]);
                        textFrame.marginBottom = editor_helper_1.HelperMethods.convertPointToPixel(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.bottomMarginProperty[this_1.keywordIndex]]);
                        if (inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.blocksProperty[this_1.keywordIndex]].length == 0) {
                            var block = { i: [] };
                            inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.blocksProperty[this_1.keywordIndex]].push(block);
                        }
                        this_1.parseBody(inline[index_4.textFrameProperty[this_1.keywordIndex]][index_4.blocksProperty[this_1.keywordIndex]], textFrame.childWidgets, textFrame);
                        shape.textFrame = textFrame;
                        textFrame.containerShape = shape;
                    }
                    shape.line = lineWidget;
                    this_1.checkAndApplyRevision(this_1.keywordIndex, inline, shape);
                    lineWidget.children.push(shape);
                    paragraph.floatingElements.push(shape);
                }
                else Eif (inline.hasOwnProperty(index_4.contentControlPropertiesProperty[this_1.keywordIndex])) {
                    var inlineStartContentControl = new page_1.ContentControl('Inline');
                    var inlineEndContentControl = new page_1.ContentControl('Inline');
                    this_1.parseContentControlProperties(inline[index_4.contentControlPropertiesProperty[this_1.keywordIndex]], inlineStartContentControl.contentControlProperties);
                    inlineEndContentControl.contentControlProperties = inlineStartContentControl.contentControlProperties;
                    inlineStartContentControl.line = lineWidget;
                    inlineEndContentControl.line = lineWidget;
                    inlineStartContentControl.type = 0;
                    inlineEndContentControl.type = 1;
                    lineWidget.children.push(inlineStartContentControl);
                    this_1.parseParagraph(inline[index_4.inlinesProperty[this_1.keywordIndex]], paragraph, writeInlineFormat, lineWidget);
                    var element = lineWidget.children[lineWidget.children.length - 1];
                    while (!(element instanceof page_1.ContentControl)) {
                        element.contentControlProperties = inlineStartContentControl.contentControlProperties;
                        element = element.previousElement;
                    }
                    lineWidget.children.push(inlineEndContentControl);
                    hasValidElmts = true;
                }
                out_i_1 = i;
            };
            var this_1 = this, out_i_1;
            for (var i = 0; i < data.length; i++) {
                _loop_1(i);
                i = out_i_1;
            }
            this.isCutPerformed = false;
            if (!isContentControl) {
                paragraph.childWidgets.push(lineWidget);
            }
            return hasValidElmts;
        };
        SfdtReader.prototype.parseFormFieldData = function (keywordIndex, sourceData, formFieldData) {
            Iif (formFieldData instanceof page_1.TextFormField || formFieldData instanceof page_1.CheckBoxFormField || formFieldData instanceof page_1.DropDownFormField) {
                if (formFieldData instanceof page_1.CheckBoxFormField) {
                    formFieldData.sizeType = sourceData.sizeType;
                    formFieldData.size = sourceData.size;
                    formFieldData.defaultValue = sourceData.defaultValue;
                    formFieldData.checked = sourceData.checked;
                }
                else if (formFieldData instanceof page_1.TextFormField) {
                    formFieldData.type = sourceData.type;
                    formFieldData.maxLength = sourceData.maxLength;
                    formFieldData.defaultValue = sourceData.defaultValue;
                    formFieldData.format = sourceData.format;
                }
                else {
                    formFieldData.dropdownItems = sourceData.dropdownItems;
                    formFieldData.selectedIndex = sourceData.selectedIndex;
                }
                formFieldData.name = sourceData.name;
                formFieldData.enabled = sourceData.enabled;
                formFieldData.helpText = sourceData.helpText;
                formFieldData.statusText = sourceData.statusText;
            }
            else {
                if (sourceData[index_4.formFieldDataProperty[keywordIndex]].hasOwnProperty(index_4.textInputProperty[keywordIndex])) {
                    formFieldData = new page_1.TextFormField();
                    formFieldData.type = this.getTextFormFieldType(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.textInputProperty[keywordIndex]][index_4.typeProperty[keywordIndex]]);
                    formFieldData.maxLength = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.textInputProperty[keywordIndex]][index_4.maxLengthProperty[keywordIndex]];
                    formFieldData.defaultValue = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.textInputProperty[keywordIndex]][index_4.defaultValueProperty[keywordIndex]];
                    formFieldData.format = this.getTextFormFieldFormat(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.textInputProperty[keywordIndex]][index_4.formatProperty[keywordIndex]]);
                }
                else if (sourceData[index_4.formFieldDataProperty[keywordIndex]].hasOwnProperty(index_4.checkBoxProperty[keywordIndex])) {
                    formFieldData = new page_1.CheckBoxFormField();
                    formFieldData.sizeType = this.getCheckBoxSizeType(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.checkBoxProperty[keywordIndex]][index_4.sizeTypeProperty[keywordIndex]]);
                    formFieldData.size = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.checkBoxProperty[keywordIndex]][index_4.sizeProperty[keywordIndex]];
                    formFieldData.defaultValue = editor_helper_1.HelperMethods.parseBoolValue(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.checkBoxProperty[keywordIndex]][index_4.defaultValueProperty[keywordIndex]]);
                    formFieldData.checked = editor_helper_1.HelperMethods.parseBoolValue(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.checkBoxProperty[keywordIndex]][index_4.checkedProperty[keywordIndex]]);
                }
                else {
                    formFieldData = new page_1.DropDownFormField();
                    formFieldData.dropdownItems = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.dropDownListProperty[keywordIndex]][index_4.dropDownItemsProperty[keywordIndex]];
                    formFieldData.selectedIndex = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.dropDownListProperty[keywordIndex]][index_4.selectedIndexProperty[keywordIndex]];
                }
                formFieldData.name = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.nameProperty[keywordIndex]];
                formFieldData.enabled = editor_helper_1.HelperMethods.parseBoolValue(sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.enabledProperty[keywordIndex]]);
                formFieldData.helpText = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.helpTextProperty[keywordIndex]];
                formFieldData.statusText = sourceData[index_4.formFieldDataProperty[keywordIndex]][index_4.statusTextProperty[keywordIndex]];
            }
            return formFieldData;
        };
        SfdtReader.prototype.applyCharacterStyle = function (inline, elementbox) {
            if (!ej2_base_1.isNullOrUndefined(inline[index_4.characterFormatProperty[this.keywordIndex]]) && !ej2_base_1.isNullOrUndefined(inline[index_4.characterFormatProperty[this.keywordIndex]][index_4.styleNameProperty[this.keywordIndex]])) {
                var charStyle = this.documentHelper.styles.findByName(inline[index_4.characterFormatProperty[this.keywordIndex]][index_4.styleNameProperty[this.keywordIndex]], 'Character');
                elementbox.characterFormat.applyStyle(charStyle);
            }
        };
        SfdtReader.prototype.parseEditableRangeStart = function (data) {
            var permStart = new page_1.EditRangeStartElementBox();
            if (!ej2_base_1.isNullOrUndefined(data[index_4.columnFirstProperty[this.keywordIndex]])) {
                permStart.columnFirst = data[index_4.columnFirstProperty[this.keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.columnLastProperty[this.keywordIndex]])) {
                permStart.columnLast = data[index_4.columnLastProperty[this.keywordIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.editRangeIdProperty[this.keywordIndex]])) {
                permStart.editRangeId = data[index_4.editRangeIdProperty[this.keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.userProperty[this.keywordIndex]])) {
                permStart.user = data[index_4.userProperty[this.keywordIndex]];
                if (this.documentHelper.userCollection.indexOf(permStart.user) === -1) {
                    this.documentHelper.userCollection.push(permStart.user);
                }
                this.addEditRangeCollection(permStart.user, permStart);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.groupProperty[this.keywordIndex]]) && data[index_4.groupProperty[this.keywordIndex]] !== '') {
                permStart.group = data[index_4.groupProperty[this.keywordIndex]];
                permStart.group = permStart.group === 'everyone' ? 'Everyone' : permStart.group;
                Iif (this.documentHelper.userCollection.indexOf(permStart.group) === -1) {
                    this.documentHelper.userCollection.push(permStart.group);
                }
                this.addEditRangeCollection(permStart.group, permStart);
            }
            return permStart;
        };
        SfdtReader.prototype.addEditRangeCollection = function (name, permStart) {
            if (this.documentHelper.editRanges.containsKey(name)) {
                var editStartCollection = this.documentHelper.editRanges.get(name);
                editStartCollection.push(permStart);
            }
            else {
                var newEditStartCollection = [];
                newEditStartCollection.push(permStart);
                this.documentHelper.editRanges.add(name, newEditStartCollection);
            }
        };
        SfdtReader.prototype.parseChartTitleArea = function (titleArea, chartTitleArea) {
            chartTitleArea.chartfontName = titleArea[index_4.fontNameProperty[this.keywordIndex]];
            chartTitleArea.chartFontSize = titleArea[index_4.fontSizeProperty[this.keywordIndex]];
            this.parseChartDataFormat(titleArea[index_4.dataFormatProperty[this.keywordIndex]], chartTitleArea.dataFormat);
            this.parseChartLayout(titleArea[index_4.layoutProperty[this.keywordIndex]], chartTitleArea.layout);
        };
        SfdtReader.prototype.parseChartDataFormat = function (format, dataFormat) {
            dataFormat.fill.color = format[index_4.fillProperty[this.keywordIndex]][index_4.foreColorProperty[this.keywordIndex]];
            dataFormat.fill.rgb = format[index_4.fillProperty[this.keywordIndex]][index_4.rgbProperty[this.keywordIndex]];
            dataFormat.line.color = format[index_4.lineProperty[this.keywordIndex]][index_4.colorProperty[this.keywordIndex]];
            dataFormat.line.rgb = format[index_4.lineProperty[this.keywordIndex]][index_4.rgbProperty[this.keywordIndex]];
        };
        SfdtReader.prototype.parseChartLayout = function (layout, chartLayout) {
            chartLayout.chartLayoutLeft = layout[index_4.layoutXProperty[this.keywordIndex]];
            chartLayout.chartLayoutTop = layout[index_4.layoutYProperty[this.keywordIndex]];
        };
        SfdtReader.prototype.parseChartLegend = function (legend, chartLegend) {
            chartLegend.chartLegendPostion = legend[index_4.positionProperty[this.keywordIndex]];
            this.parseChartTitleArea(legend[index_4.chartTitleAreaProperty[this.keywordIndex]], chartLegend.chartTitleArea);
        };
        SfdtReader.prototype.parseChartCategoryAxis = function (categoryAxis, primaryAxis) {
            primaryAxis.categoryAxisType = categoryAxis[index_4.categoryTypeProperty[this.keywordIndex]];
            primaryAxis.categoryNumberFormat = categoryAxis[index_4.numberFormatProperty[this.keywordIndex]];
            if (categoryAxis.hasOwnProperty(index_4.isAutoMajorProperty[this.keywordIndex])) {
                primaryAxis.isAutoInternal = editor_helper_1.HelperMethods.parseBoolValue(categoryAxis[index_4.isAutoMajorProperty[this.keywordIndex]]);
            }
            primaryAxis.interval = categoryAxis[index_4.majorUnitProperty[this.keywordIndex]];
            primaryAxis.axisFontSize = categoryAxis[index_4.fontSizeProperty[this.keywordIndex]];
            primaryAxis.axisFontName = categoryAxis[index_4.fontNameProperty[this.keywordIndex]];
            primaryAxis.max = categoryAxis[index_4.maximumValueProperty[this.keywordIndex]];
            primaryAxis.min = categoryAxis[index_4.minimumValueProperty[this.keywordIndex]];
            primaryAxis.majorGridLines = editor_helper_1.HelperMethods.parseBoolValue(categoryAxis[index_4.hasMajorGridLinesProperty[this.keywordIndex]]);
            primaryAxis.minorGridLines = editor_helper_1.HelperMethods.parseBoolValue(categoryAxis[index_4.hasMinorGridLinesProperty[this.keywordIndex]]);
            primaryAxis.majorTick = categoryAxis[index_4.majorTickMarkProperty[this.keywordIndex]];
            primaryAxis.minorTick = categoryAxis[index_4.minorTickMarkProperty[this.keywordIndex]];
            primaryAxis.tickPosition = categoryAxis[index_4.tickLabelPositionProperty[this.keywordIndex]];
            primaryAxis.categoryAxisTitle = categoryAxis[index_4.chartTitleProperty[this.keywordIndex]];
            Iif (categoryAxis[index_4.chartTitleProperty[this.keywordIndex]] != null) {
                this.parseChartTitleArea(categoryAxis[index_4.chartTitleAreaProperty[this.keywordIndex]], primaryAxis.chartTitleArea);
            }
        };
        SfdtReader.prototype.parseChartDataTable = function (dataTable, chartDataTable) {
            chartDataTable.showSeriesKeys = editor_helper_1.HelperMethods.parseBoolValue(dataTable[index_4.showSeriesKeysProperty[this.keywordIndex]]);
            chartDataTable.hasHorzBorder = editor_helper_1.HelperMethods.parseBoolValue(dataTable[index_4.hasHorizontalBorderProperty[this.keywordIndex]]);
            chartDataTable.hasVertBorder = editor_helper_1.HelperMethods.parseBoolValue(dataTable[index_4.hasVerticalBorderProperty[this.keywordIndex]]);
            chartDataTable.hasBorders = editor_helper_1.HelperMethods.parseBoolValue(dataTable[index_4.hasBordersProperty[this.keywordIndex]]);
        };
        SfdtReader.prototype.parseChartArea = function (area, chartArea) {
            chartArea.chartForeColor = area[index_4.foreColorProperty[this.keywordIndex]];
        };
        SfdtReader.prototype.parseChartData = function (inline, chart) {
            for (var i = 0; i < inline[index_4.chartCategoryProperty[this.keywordIndex]].length; i++) {
                var chartCategory = new page_1.ChartCategory();
                var xData = inline[index_4.chartCategoryProperty[this.keywordIndex]][i];
                Eif (xData.hasOwnProperty(index_4.categoryXNameProperty[this.keywordIndex])) {
                    chartCategory.xName = xData[index_4.categoryXNameProperty[this.keywordIndex]];
                }
                for (var j = 0; j < xData[index_4.chartDataProperty[this.keywordIndex]].length; j++) {
                    var chartData = new page_1.ChartData();
                    var yData = xData[index_4.chartDataProperty[this.keywordIndex]][j];
                    chartData.yAxisValue = yData[index_4.yValueProperty[this.keywordIndex]];
                    Iif (inline[index_4.chartTypeProperty[this.keywordIndex]] === 'Bubble') {
                        chartData.bubbleSize = yData[index_4.sizeProperty[this.keywordIndex]];
                    }
                    chartCategory.chartData.push(chartData);
                }
                chart.chartCategory.push(chartCategory);
            }
            this.parseChartSeries(inline, chart);
        };
        SfdtReader.prototype.parseChartSeries = function (inline, chart) {
            var chartType = inline[index_4.chartTypeProperty[this.keywordIndex]];
            var isPieType = (chartType === 'Pie' || chartType === 'Doughnut');
            for (var i = 0; i < inline[index_4.chartSeriesProperty[this.keywordIndex]].length; i++) {
                var chartSeries = new page_1.ChartSeries();
                var xData = inline[index_4.chartSeriesProperty[this.keywordIndex]][i];
                Eif (xData.hasOwnProperty(index_4.seriesNameProperty[this.keywordIndex])) {
                    chartSeries.seriesName = xData[index_4.seriesNameProperty[this.keywordIndex]];
                    Eif (isPieType) {
                        Iif (xData.hasOwnProperty(index_4.firstSliceAngleProperty[this.keywordIndex])) {
                            chartSeries.firstSliceAngle = xData[index_4.firstSliceAngleProperty[this.keywordIndex]];
                        }
                        if (chartType === 'Doughnut') {
                            chartSeries.doughnutHoleSize = xData[index_4.holeSizeProperty[this.keywordIndex]];
                        }
                    }
                    Iif (xData.hasOwnProperty(index_4.dataLabelProperty[this.keywordIndex])) {
                        this.parseChartDataLabels(xData[index_4.dataLabelProperty[this.keywordIndex]], chartSeries);
                    }
                    Eif (xData.hasOwnProperty(index_4.seriesFormatProperty[this.keywordIndex])) {
                        var seriesFormat = new page_1.ChartSeriesFormat();
                        var format = xData[index_4.seriesFormatProperty[this.keywordIndex]];
                        seriesFormat.markerStyle = format[index_4.markerStyleProperty[this.keywordIndex]];
                        seriesFormat.markerColor = format[index_4.markerColorProperty[this.keywordIndex]];
                        seriesFormat.numberValue = format[index_4.markerSizeProperty[this.keywordIndex]];
                        chartSeries.seriesFormat = seriesFormat;
                    }
                    Iif (xData.hasOwnProperty(index_4.errorBarProperty[this.keywordIndex])) {
                        var errorBar = chartSeries.errorBar;
                        errorBar.errorType = xData[index_4.errorBarProperty[this.keywordIndex]][index_4.typeProperty[this.keywordIndex]];
                        errorBar.errorDirection = xData[index_4.errorBarProperty[this.keywordIndex]][index_4.directionProperty[this.keywordIndex]];
                        errorBar.errorEndStyle = xData[index_4.errorBarProperty[this.keywordIndex]][index_4.endStyleProperty[this.keywordIndex]];
                        errorBar.numberValue = xData[index_4.errorBarProperty[this.keywordIndex]][index_4.numberValueProperty[this.keywordIndex]];
                    }
                    Iif (xData.hasOwnProperty(index_4.trendLinesProperty[this.keywordIndex])) {
                        this.parseChartTrendLines(xData[index_4.trendLinesProperty[this.keywordIndex]], chartSeries);
                    }
                    this.parseChartSeriesDataPoints(xData[index_4.dataPointsProperty[this.keywordIndex]], chartSeries);
                }
                chart.chartSeries.push(chartSeries);
            }
        };
        SfdtReader.prototype.parseChartDataLabels = function (dataLabels, series) {
            var dataLabel = new page_1.ChartDataLabels();
            dataLabel.labelPosition = dataLabels[index_4.positionProperty[this.keywordIndex]];
            dataLabel.fontName = dataLabels[index_4.fontNameProperty[this.keywordIndex]];
            dataLabel.fontColor = dataLabels[index_4.fontColorProperty[this.keywordIndex]];
            dataLabel.fontSize = dataLabels[index_4.fontSizeProperty[this.keywordIndex]];
            dataLabel.isLegendKey = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isLegendKeyProperty[this.keywordIndex]]);
            dataLabel.isBubbleSize = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isBubbleSizeProperty[this.keywordIndex]]);
            dataLabel.isCategoryName = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isCategoryNameProperty[this.keywordIndex]]);
            dataLabel.isSeriesName = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isSeriesNameProperty[this.keywordIndex]]);
            dataLabel.isValue = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isValueProperty[this.keywordIndex]]);
            dataLabel.isPercentage = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isPercentageProperty[this.keywordIndex]]);
            dataLabel.isLeaderLines = editor_helper_1.HelperMethods.parseBoolValue(dataLabels[index_4.isLeaderLinesProperty[this.keywordIndex]]);
            series.dataLabels = dataLabel;
        };
        SfdtReader.prototype.parseChartSeriesDataPoints = function (dataPoints, series) {
            for (var i = 0; i < dataPoints.length; i++) {
                var chartFormat = new page_1.ChartDataFormat();
                Eif (dataPoints[i].hasOwnProperty(index_4.idProperty[this.keywordIndex])) {
                    chartFormat.id = dataPoints[i][index_4.idProperty[this.keywordIndex]];
                }
                this.parseChartDataFormat(dataPoints[i], chartFormat);
                series.chartDataFormat.push(chartFormat);
            }
        };
        SfdtReader.prototype.parseChartTrendLines = function (trendLines, series) {
            for (var i = 0; i < trendLines.length; i++) {
                var data = trendLines[i];
                var trendLine = new page_1.ChartTrendLines();
                trendLine.trendLineName = data[index_4.nameProperty[this.keywordIndex]];
                trendLine.trendLineType = data[index_4.typeProperty[this.keywordIndex]];
                trendLine.forwardValue = data[index_4.forwardProperty[this.keywordIndex]];
                trendLine.backwardValue = data[index_4.backwardProperty[this.keywordIndex]];
                trendLine.interceptValue = data[index_4.interceptProperty[this.keywordIndex]];
                trendLine.isDisplayEquation = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.isDisplayEquationProperty[this.keywordIndex]]);
                trendLine.isDisplayRSquared = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.isDisplayRSquaredProperty[this.keywordIndex]]);
                series.trendLines.push(trendLine);
            }
        };
        SfdtReader.prototype.parseTableFormat = function (sourceFormat, tableFormat, keywordIndex) {
            this.parseBorders(keywordIndex, sourceFormat[index_4.bordersProperty[keywordIndex]], tableFormat.borders);
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.allowAutoFitProperty[keywordIndex]])) {
                tableFormat.allowAutoFit = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.allowAutoFitProperty[keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.cellSpacingProperty[keywordIndex]])) {
                tableFormat.cellSpacing = sourceFormat[index_4.cellSpacingProperty[keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftMarginProperty[keywordIndex]])) {
                tableFormat.leftMargin = sourceFormat[index_4.leftMarginProperty[keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.topMarginProperty[keywordIndex]])) {
                tableFormat.topMargin = sourceFormat[index_4.topMarginProperty[keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.rightMarginProperty[keywordIndex]])) {
                tableFormat.rightMargin = sourceFormat[index_4.rightMarginProperty[keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bottomMarginProperty[keywordIndex]])) {
                tableFormat.bottomMargin = sourceFormat[index_4.bottomMarginProperty[keywordIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftIndentProperty[keywordIndex]])) {
                tableFormat.leftIndent = sourceFormat[index_4.leftIndentProperty[keywordIndex]];
            }
            this.parseShading(sourceFormat[index_4.shadingProperty[keywordIndex]], tableFormat.shading, keywordIndex);
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.tableAlignmentProperty[keywordIndex]])) {
                tableFormat.tableAlignment = this.getTableAlignment(sourceFormat[index_4.tableAlignmentProperty[keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.preferredWidthProperty[keywordIndex]])) {
                tableFormat.preferredWidth = sourceFormat[index_4.preferredWidthProperty[keywordIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.preferredWidthTypeProperty[keywordIndex]])) {
                tableFormat.preferredWidthType = this.getWidthType(sourceFormat[index_4.preferredWidthTypeProperty[keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bidiProperty[keywordIndex]])) {
                tableFormat.bidi = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.bidiProperty[keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.horizontalPositionAbsProperty[keywordIndex]])) {
                tableFormat.horizontalPositionAbs = this.getHorizontalPositionAbs(sourceFormat[index_4.horizontalPositionAbsProperty[keywordIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.horizontalPositionProperty[keywordIndex]])) {
                tableFormat.horizontalPosition = sourceFormat[index_4.horizontalPositionProperty[keywordIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.styleNameProperty[keywordIndex]])) {
                tableFormat.styleName = sourceFormat[index_4.styleNameProperty[keywordIndex]];
            }
            Iif (this.documentHelper.owner.enableCollaborativeEditing && !ej2_base_1.isNullOrUndefined(sourceFormat[index_4.titleProperty[keywordIndex]])) {
                tableFormat.title = sourceFormat[index_4.titleProperty[keywordIndex]];
            }
            Iif (this.documentHelper.owner.enableCollaborativeEditing && !ej2_base_1.isNullOrUndefined(sourceFormat[index_4.descriptionProperty[keywordIndex]])) {
                tableFormat.description = sourceFormat[index_4.descriptionProperty[keywordIndex]];
            }
        };
        SfdtReader.prototype.parseCellFormat = function (sourceFormat, cellFormat, keyIndex) {
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat)) {
                this.parseBorders(keyIndex, sourceFormat[index_4.bordersProperty[keyIndex]], cellFormat.borders);
                Eif (!sourceFormat.isSamePaddingAsTable) {
                    this.parseCellMargin(sourceFormat, cellFormat, keyIndex);
                }
                Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.cellWidthProperty[keyIndex]])) {
                    cellFormat.cellWidth = sourceFormat[index_4.cellWidthProperty[keyIndex]];
                }
                Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.columnSpanProperty[keyIndex]])) {
                    cellFormat.columnSpan = sourceFormat[index_4.columnSpanProperty[keyIndex]];
                }
                Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.rowSpanProperty[keyIndex]])) {
                    cellFormat.rowSpan = sourceFormat[index_4.rowSpanProperty[keyIndex]];
                }
                this.parseShading(sourceFormat[index_4.shadingProperty[keyIndex]], cellFormat.shading, keyIndex);
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.verticalAlignmentProperty[keyIndex]])) {
                    cellFormat.verticalAlignment = this.getCellVerticalAlignment(sourceFormat[index_4.verticalAlignmentProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.preferredWidthTypeProperty[keyIndex]])) {
                    cellFormat.preferredWidthType = this.getWidthType(sourceFormat[index_4.preferredWidthTypeProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.preferredWidthProperty[keyIndex]])) {
                    cellFormat.preferredWidth = sourceFormat[index_4.preferredWidthProperty[keyIndex]];
                }
            }
        };
        SfdtReader.prototype.parseCellMargin = function (sourceFormat, cellFormat, keyIndex) {
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftMarginProperty[keyIndex]])) {
                cellFormat.leftMargin = sourceFormat[index_4.leftMarginProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.rightMarginProperty[keyIndex]])) {
                cellFormat.rightMargin = sourceFormat[index_4.rightMarginProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.topMarginProperty[keyIndex]])) {
                cellFormat.topMargin = sourceFormat[index_4.topMarginProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bottomMarginProperty[keyIndex]])) {
                cellFormat.bottomMargin = sourceFormat[index_4.bottomMarginProperty[keyIndex]];
            }
        };
        SfdtReader.prototype.parseRowFormat = function (sourceFormat, rowFormat, keyIndex) {
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat)) {
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.allowBreakAcrossPagesProperty[keyIndex]])) {
                    rowFormat.allowBreakAcrossPages = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.allowBreakAcrossPagesProperty[this.keywordIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.isHeaderProperty[keyIndex]])) {
                    rowFormat.isHeader = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.isHeaderProperty[keyIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.heightTypeProperty[keyIndex]])) {
                    rowFormat.heightType = this.getHeightType(sourceFormat[index_4.heightTypeProperty[keyIndex]]);
                }
                Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.heightProperty[keyIndex]])) {
                    rowFormat.height = sourceFormat[index_4.heightProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftMarginProperty[keyIndex]])) {
                    rowFormat.leftMargin = sourceFormat[index_4.leftMarginProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.topMarginProperty[keyIndex]])) {
                    rowFormat.topMargin = sourceFormat[index_4.topMarginProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.rightMarginProperty[keyIndex]])) {
                    rowFormat.rightMargin = sourceFormat[index_4.rightMarginProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bottomMarginProperty[keyIndex]])) {
                    rowFormat.bottomMargin = sourceFormat[index_4.bottomMarginProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftIndentProperty[keyIndex]])) {
                    rowFormat.leftIndent = sourceFormat[index_4.leftIndentProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.revisionIdsProperty[keyIndex]]) && sourceFormat[index_4.revisionIdsProperty[keyIndex]].length > 0) {
                    this.checkAndApplyRevision(keyIndex, sourceFormat, rowFormat);
                }
                this.parseRowGridValues(sourceFormat, rowFormat, keyIndex);
                this.parseBorders(keyIndex, sourceFormat[index_4.bordersProperty[keyIndex]], rowFormat.borders);
            }
        };
        SfdtReader.prototype.parseBorders = function (keyIndex, sourceBorders, destBorder) {
            Eif (!ej2_base_1.isNullOrUndefined(sourceBorders)) {
                destBorder.isParsing = true;
                this.parseBorder(keyIndex, sourceBorders[index_4.leftProperty[keyIndex]], destBorder.left);
                this.parseBorder(keyIndex, sourceBorders[index_4.rightProperty[keyIndex]], destBorder.right);
                this.parseBorder(keyIndex, sourceBorders[index_4.topProperty[keyIndex]], destBorder.top);
                this.parseBorder(keyIndex, sourceBorders[index_4.bottomProperty[keyIndex]], destBorder.bottom);
                this.parseBorder(keyIndex, sourceBorders[index_4.verticalProperty[keyIndex]], destBorder.vertical);
                this.parseBorder(keyIndex, sourceBorders[index_4.horizontalProperty[keyIndex]], destBorder.horizontal);
                this.parseBorder(keyIndex, sourceBorders[index_4.diagonalDownProperty[keyIndex]], destBorder.diagonalDown);
                this.parseBorder(keyIndex, sourceBorders[index_4.diagonalUpProperty[keyIndex]], destBorder.diagonalUp);
                destBorder.isParsing = false;
            }
        };
        SfdtReader.prototype.parseBorder = function (keyIndex, sourceBorder, destBorder) {
            if (!ej2_base_1.isNullOrUndefined(sourceBorder)) {
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.colorProperty[keyIndex]])) {
                    destBorder.color = this.getColor(sourceBorder[index_4.colorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.lineStyleProperty[keyIndex]])) {
                    destBorder.lineStyle = this.getLineStyle(sourceBorder[index_4.lineStyleProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.lineWidthProperty[keyIndex]])) {
                    destBorder.lineWidth = sourceBorder[index_4.lineWidthProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.hasNoneStyleProperty[keyIndex]])) {
                    destBorder.hasNoneStyle = editor_helper_1.HelperMethods.parseBoolValue(sourceBorder[index_4.hasNoneStyleProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.spaceProperty[keyIndex]])) {
                    destBorder.space = sourceBorder[index_4.spaceProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceBorder[index_4.shadowProperty[keyIndex]])) {
                    destBorder.shadow = editor_helper_1.HelperMethods.parseBoolValue(sourceBorder[index_4.shadowProperty[keyIndex]]);
                }
            }
        };
        SfdtReader.prototype.parseShading = function (sourceShading, destShading, keyIndex) {
            if (!ej2_base_1.isNullOrUndefined(sourceShading)) {
                if (!ej2_base_1.isNullOrUndefined(sourceShading[index_4.backgroundColorProperty[keyIndex]])) {
                    destShading.backgroundColor = this.getColor(sourceShading[index_4.backgroundColorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceShading[index_4.foregroundColorProperty[keyIndex]])) {
                    destShading.foregroundColor = this.getColor(sourceShading[index_4.foregroundColorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceShading[index_4.textureProperty[keyIndex]]) || !ej2_base_1.isNullOrUndefined(sourceShading.textureStyle)) {
                    destShading.textureStyle = !ej2_base_1.isNullOrUndefined(sourceShading[index_4.textureProperty[keyIndex]]) ? this.getTextureStyle(sourceShading[index_4.textureProperty[keyIndex]]) : this.getTextureStyle(sourceShading.textureStyle);
                }
            }
        };
        SfdtReader.prototype.parseCharacterFormat = function (keyIndex, sourceFormat, characterFormat, writeInlineFormat) {
            if (!ej2_base_1.isNullOrUndefined(sourceFormat)) {
                Iif (writeInlineFormat && sourceFormat.hasOwnProperty(index_4.inlineFormatProperty[keyIndex])) {
                    this.parseCharacterFormat(keyIndex, sourceFormat.inlineFormat, characterFormat);
                    return;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.baselineAlignmentProperty[keyIndex]])) {
                    characterFormat.baselineAlignment = this.getBaseAlignment(sourceFormat[index_4.baselineAlignmentProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.underlineProperty[keyIndex]])) {
                    characterFormat.underline = this.getUnderline(sourceFormat[index_4.underlineProperty[keyIndex]]);
                }
                Iif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.underlineColorProperty[keyIndex]])) {
                    characterFormat.underlineColor = this.getColor(sourceFormat[index_4.underlineColorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.strikethroughProperty[keyIndex]])) {
                    characterFormat.strikethrough = this.getStrikethrough(sourceFormat[index_4.strikethroughProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontSizeProperty[keyIndex]])) {
                    sourceFormat[index_4.fontSizeProperty[keyIndex]] = parseFloat(sourceFormat[index_4.fontSizeProperty[keyIndex]]);
                    var number = sourceFormat[index_4.fontSizeProperty[keyIndex]] * 10;
                    if (number % 10 !== 0) {
                        number = sourceFormat[index_4.fontSizeProperty[keyIndex]].toFixed(1) * 10;
                        Eif (number % 5 === 0) {
                            sourceFormat[index_4.fontSizeProperty[keyIndex]] = sourceFormat[index_4.fontSizeProperty[keyIndex]].toFixed(1);
                        }
                        else {
                            sourceFormat[index_4.fontSizeProperty[keyIndex]] = Math.round(sourceFormat[index_4.fontSizeProperty[keyIndex]]);
                        }
                    }
                    var fontSize = parseFloat(sourceFormat[index_4.fontSizeProperty[keyIndex]]);
                    characterFormat.fontSize = fontSize < 0 ? 0 : fontSize;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyProperty[keyIndex]])) {
                    Iif (sourceFormat[index_4.fontFamilyProperty[keyIndex]].indexOf('"') !== -1) {
                        sourceFormat[index_4.fontFamilyProperty[keyIndex]] = sourceFormat[index_4.fontFamilyProperty[keyIndex]].replace('"', '');
                    }
                    var fontFamily = sourceFormat[index_4.fontFamilyProperty[keyIndex]];
                    Iif (!ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable) && this.documentHelper.fontSubstitutionTable.containsKey(fontFamily) && !this.isFontInstalled(fontFamily)) {
                        fontFamily = this.documentHelper.fontSubstitutionTable.get(fontFamily);
                    }
                    characterFormat.fontFamily = fontFamily;
                    if (ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]])) {
                        characterFormat.fontFamilyFarEast = fontFamily;
                    }
                    if (ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]])) {
                        characterFormat.fontFamilyAscii = fontFamily;
                    }
                    if (ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]])) {
                        characterFormat.fontFamilyNonFarEast = fontFamily;
                    }
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.boldProperty[keyIndex]])) {
                    characterFormat.bold = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.boldProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.italicProperty[keyIndex]])) {
                    characterFormat.italic = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.italicProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.highlightColorProperty[keyIndex]])) {
                    characterFormat.highlightColor = this.getHighlightColor(sourceFormat[index_4.highlightColorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontColorProperty[keyIndex]])) {
                    characterFormat.fontColor = this.getColor(sourceFormat[index_4.fontColorProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bidiProperty[keyIndex]])) {
                    characterFormat.bidi = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.bidiProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bdoProperty[keyIndex]])) {
                    characterFormat.bdo = this.getBiDirectionalOverride(sourceFormat[index_4.bdoProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontSizeBidiProperty[keyIndex]])) {
                    var fontSize = parseFloat(sourceFormat[index_4.fontSizeBidiProperty[keyIndex]]);
                    characterFormat.fontSizeBidi = fontSize < 0 ? 0 : fontSize;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyBidiProperty[keyIndex]])) {
                    Iif (sourceFormat[index_4.fontFamilyBidiProperty[keyIndex]].indexOf('"') !== -1) {
                        sourceFormat[index_4.fontFamilyBidiProperty[keyIndex]] = sourceFormat[index_4.fontFamilyBidiProperty[keyIndex]].replace('"', '');
                    }
                    var fontFamilyBidi = sourceFormat[index_4.fontFamilyBidiProperty[keyIndex]];
                    Iif (!ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable) && this.documentHelper.fontSubstitutionTable.containsKey(fontFamilyBidi) && !this.isFontInstalled(fontFamilyBidi)) {
                        fontFamilyBidi = this.documentHelper.fontSubstitutionTable.get(fontFamilyBidi);
                    }
                    characterFormat.fontFamilyBidi = fontFamilyBidi;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.boldBidiProperty[keyIndex]])) {
                    characterFormat.boldBidi = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.boldBidiProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.italicBidiProperty[keyIndex]])) {
                    characterFormat.italicBidi = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.italicBidiProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.revisionIdsProperty[keyIndex]]) && sourceFormat[index_4.revisionIdsProperty[keyIndex]].length > 0) {
                    this.checkAndApplyRevision(keyIndex, sourceFormat, characterFormat);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.allCapsProperty[keyIndex]])) {
                    characterFormat.allCaps = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.allCapsProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.localeIdBidiProperty[keyIndex]])) {
                    characterFormat.localeIdBidi = sourceFormat[index_4.localeIdBidiProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.localeIdProperty[keyIndex]])) {
                    characterFormat.localeIdAscii = sourceFormat[index_4.localeIdProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.localeIdFarEastProperty[keyIndex]])) {
                    characterFormat.localeIdFarEast = sourceFormat[index_4.localeIdFarEastProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.complexScriptProperty[keyIndex]])) {
                    characterFormat.complexScript = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.complexScriptProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]])) {
                    Iif (sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]].indexOf('"') !== -1) {
                        sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]] = sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]].replace('"', '');
                    }
                    var fontFamilyFarEast = sourceFormat[index_4.fontFamilyFarEastProperty[keyIndex]];
                    Iif (!ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable) && this.documentHelper.fontSubstitutionTable.containsKey(fontFamilyFarEast) && !this.isFontInstalled(fontFamilyFarEast)) {
                        fontFamilyFarEast = this.documentHelper.fontSubstitutionTable.get(fontFamilyFarEast);
                    }
                    characterFormat.fontFamilyFarEast = fontFamilyFarEast;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]])) {
                    Iif (sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]].indexOf('"') !== -1) {
                        sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]] = sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]].replace('"', '');
                    }
                    var fontFamilyAscii = sourceFormat[index_4.fontFamilyAsciiProperty[keyIndex]];
                    Iif (!ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable) && this.documentHelper.fontSubstitutionTable.containsKey(fontFamilyAscii) && !this.isFontInstalled(fontFamilyAscii)) {
                        fontFamilyAscii = this.documentHelper.fontSubstitutionTable.get(fontFamilyAscii);
                    }
                    characterFormat.fontFamilyAscii = fontFamilyAscii;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]])) {
                    Iif (sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]].indexOf('"') !== -1) {
                        sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]] = sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]].replace('"', '');
                    }
                    var fontFamilyNonFarEast = sourceFormat[index_4.fontFamilyNonFarEastProperty[keyIndex]];
                    Iif (!ej2_base_1.isNullOrUndefined(this.documentHelper.fontSubstitutionTable) && this.documentHelper.fontSubstitutionTable.containsKey(fontFamilyNonFarEast) && !this.isFontInstalled(fontFamilyNonFarEast)) {
                        fontFamilyNonFarEast = this.documentHelper.fontSubstitutionTable.get(fontFamilyNonFarEast);
                    }
                    characterFormat.fontFamilyNonFarEast = fontFamilyNonFarEast;
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.characterSpacingProperty[keyIndex]])) {
                    characterFormat.characterSpacing = sourceFormat[index_4.characterSpacingProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.scalingProperty[keyIndex]])) {
                    characterFormat.scaling = sourceFormat[index_4.scalingProperty[keyIndex]];
                }
            }
        };
        SfdtReader.prototype.isFontInstalled = function (fontFamily) {
            if (this.fontInfoCollection && this.fontInfoCollection.containsKey(fontFamily)) {
                return this.fontInfoCollection.get(fontFamily);
            }
            var monoWidth = this.getWidth('monospace');
            var sansWidth = this.getWidth('sans-serif');
            var serifWidth = this.getWidth('serif');
            var isFontInstalled = monoWidth !== this.getWidth(fontFamily + ', monospace', monoWidth) ||
                sansWidth !== this.getWidth(fontFamily + ', sans-serif', sansWidth) ||
                serifWidth !== this.getWidth(fontFamily + ', serif', serifWidth);
            if (this.fontInfoCollection) {
                this.fontInfoCollection.add(fontFamily, isFontInstalled);
            }
            return isFontInstalled;
        };
        SfdtReader.prototype.getWidth = function (fontFamily, defaultWidth) {
            var width;
            var container = document.createElement('span');
            container.innerHTML = Array(100).join('wi');
            container.style.cssText = [
                'position:absolute',
                'width:auto',
                'font-size:128px',
                'left:-99999px'
            ].join(' !important;');
            container.style.fontFamily = fontFamily;
            document.body.appendChild(container);
            width = container.clientWidth;
            if (container.style.fontFamily === "" && !ej2_base_1.isNullOrUndefined(defaultWidth)) {
                width = defaultWidth;
            }
            document.body.removeChild(container);
            return width;
        };
        SfdtReader.prototype.getColor = function (color) {
            var convertColor = color;
            return convertColor || '#ffffff';
        };
        SfdtReader.prototype.parseThemes = function (sourceFormat, themes) {
            this.parseFontScheme(sourceFormat[index_4.fontSchemeProperty[this.keywordIndex]], themes);
        };
        SfdtReader.prototype.parseFontScheme = function (sourceFormat, themes) {
            if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontSchemeNameProperty[this.keywordIndex]]))
                themes.fontScheme.fontSchemeName = sourceFormat[index_4.fontSchemeNameProperty[this.keywordIndex]];
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.majorFontSchemeProperty[this.keywordIndex]])) {
                this.parseMajorMinorFontScheme(sourceFormat[index_4.majorFontSchemeProperty[this.keywordIndex]], themes.fontScheme.majorFontScheme);
            }
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.minorFontSchemeProperty[this.keywordIndex]])) {
                this.parseMajorMinorFontScheme(sourceFormat[index_4.minorFontSchemeProperty[this.keywordIndex]], themes.fontScheme.minorFontScheme);
            }
        };
        SfdtReader.prototype.parseMajorMinorFontScheme = function (sourceFormat, majorMinor) {
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontTypefaceProperty[this.keywordIndex]]) && Object.keys(sourceFormat[index_4.fontTypefaceProperty[this.keywordIndex]]).length > 0) {
                var keys = Object.keys(sourceFormat[index_4.fontTypefaceProperty[this.keywordIndex]]);
                for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
                    var key = keys_2[_i];
                    majorMinor.fontTypeface.add(key, sourceFormat[index_4.fontTypefaceProperty[this.keywordIndex]][key]);
                }
                this.documentHelper.hasThemes = true;
            }
            Eif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.fontSchemeListProperty[this.keywordIndex]]) && sourceFormat[index_4.fontSchemeListProperty[this.keywordIndex]].length > 0) {
                for (var j = 0; j < sourceFormat[index_4.fontSchemeListProperty[this.keywordIndex]].length; j++) {
                    var data = sourceFormat[index_4.fontSchemeListProperty[this.keywordIndex]][j];
                    var fontList = new index_3.FontSchemeStruct();
                    fontList.name = !ej2_base_1.isNullOrUndefined(data.fontName) ? data[index_4.fontNameProperty[this.keywordIndex]] : data[index_4.nameProperty[this.keywordIndex]];
                    fontList.typeface = !ej2_base_1.isNullOrUndefined(data.fontTypeface) ? data.fontTypeface : data[index_4.typefaceProperty[this.keywordIndex]];
                    fontList.panose = !ej2_base_1.isNullOrUndefined(data.pnose) ? data.pnose : data[index_4.panoseProperty[this.keywordIndex]];
                    majorMinor.fontSchemeList.push(fontList);
                }
                this.documentHelper.hasThemes = true;
            }
        };
        SfdtReader.prototype.parseParagraphFormat = function (keyIndex, sourceFormat, paragraphFormat) {
            if (!ej2_base_1.isNullOrUndefined(sourceFormat)) {
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bordersProperty[keyIndex]])) {
                    this.parseBorders(keyIndex, sourceFormat[index_4.bordersProperty[keyIndex]], paragraphFormat.borders);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.bidiProperty[keyIndex]])) {
                    paragraphFormat.bidi = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.bidiProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.leftIndentProperty[keyIndex]])) {
                    paragraphFormat.leftIndent = sourceFormat[index_4.leftIndentProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.rightIndentProperty[keyIndex]])) {
                    paragraphFormat.rightIndent = sourceFormat[index_4.rightIndentProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.firstLineIndentProperty[keyIndex]])) {
                    paragraphFormat.firstLineIndent = sourceFormat[index_4.firstLineIndentProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.afterSpacingProperty[keyIndex]])) {
                    paragraphFormat.afterSpacing = sourceFormat[index_4.afterSpacingProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.beforeSpacingProperty[keyIndex]])) {
                    paragraphFormat.beforeSpacing = sourceFormat[index_4.beforeSpacingProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.spaceBeforeAutoProperty[keyIndex]])) {
                    paragraphFormat.spaceBeforeAuto = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.spaceBeforeAutoProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.spaceAfterAutoProperty[keyIndex]])) {
                    paragraphFormat.spaceAfterAuto = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.spaceAfterAutoProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.lineSpacingProperty[keyIndex]])) {
                    paragraphFormat.lineSpacing = sourceFormat[index_4.lineSpacingProperty[keyIndex]];
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.lineSpacingTypeProperty[keyIndex]])) {
                    paragraphFormat.lineSpacingType = this.getLineSpacingType(sourceFormat[index_4.lineSpacingTypeProperty[keyIndex]]);
                }
                else {
                    Iif (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.lineSpacingProperty[keyIndex]])) {
                        paragraphFormat.lineSpacingType = 'Multiple';
                    }
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.textAlignmentProperty[keyIndex]])) {
                    paragraphFormat.textAlignment = this.getTextAlignment(sourceFormat[index_4.textAlignmentProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.outlineLevelProperty[keyIndex]])) {
                    paragraphFormat.outlineLevel = this.getOutlineLevel(sourceFormat[index_4.outlineLevelProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.contextualSpacingProperty[keyIndex]])) {
                    paragraphFormat.contextualSpacing = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.contextualSpacingProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.keepWithNextProperty[keyIndex]])) {
                    paragraphFormat.keepWithNext = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.keepWithNextProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.keepLinesTogetherProperty[keyIndex]])) {
                    paragraphFormat.keepLinesTogether = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.keepLinesTogetherProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(sourceFormat[index_4.widowControlProperty[keyIndex]])) {
                    paragraphFormat.widowControl = editor_helper_1.HelperMethods.parseBoolValue(sourceFormat[index_4.widowControlProperty[keyIndex]]);
                }
                paragraphFormat.listFormat = new index_1.WListFormat(paragraphFormat);
                if (sourceFormat.hasOwnProperty(index_4.listFormatProperty[keyIndex])) {
                    this.parseListFormat(keyIndex, sourceFormat, paragraphFormat.listFormat);
                }
                if (sourceFormat.hasOwnProperty(index_4.tabsProperty[keyIndex])) {
                    this.parseTabStop(keyIndex, sourceFormat[index_4.tabsProperty[keyIndex]], paragraphFormat.tabs);
                }
            }
        };
        SfdtReader.prototype.parseListFormat = function (keyIndex, block, listFormat) {
            Eif (!ej2_base_1.isNullOrUndefined(block[index_4.listFormatProperty[keyIndex]])) {
                if (!ej2_base_1.isNullOrUndefined(block[index_4.listFormatProperty[keyIndex]][index_4.listIdProperty[keyIndex]])) {
                    listFormat.listId = block[index_4.listFormatProperty[keyIndex]][index_4.listIdProperty[keyIndex]];
                    listFormat.list = this.documentHelper.getListById(block[index_4.listFormatProperty[keyIndex]][index_4.listIdProperty[keyIndex]]);
                }
                if (!ej2_base_1.isNullOrUndefined(block[index_4.listFormatProperty[keyIndex]][index_4.nsidProperty])) {
                    listFormat.nsid = block[index_4.listFormatProperty[keyIndex]][index_4.nsidProperty];
                }
                else if (!ej2_base_1.isNullOrUndefined(listFormat.list)) {
                    listFormat.nsid = listFormat.list.nsid;
                }
                if (!ej2_base_1.isNullOrUndefined(block[index_4.listFormatProperty[keyIndex]][index_4.listLevelNumberProperty[keyIndex]])) {
                    listFormat.listLevelNumber = block[index_4.listFormatProperty[keyIndex]][index_4.listLevelNumberProperty[keyIndex]];
                }
            }
        };
        SfdtReader.prototype.parseSectionFormat = function (keyIndex, data, sectionFormat) {
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.pageWidthProperty[keyIndex]])) {
                sectionFormat.pageWidth = data[index_4.pageWidthProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.pageHeightProperty[keyIndex]])) {
                sectionFormat.pageHeight = data[index_4.pageHeightProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.leftMarginProperty[keyIndex]])) {
                sectionFormat.leftMargin = data[index_4.leftMarginProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.topMarginProperty[keyIndex]])) {
                sectionFormat.topMargin = data[index_4.topMarginProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.rightMarginProperty[keyIndex]])) {
                sectionFormat.rightMargin = data[index_4.rightMarginProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.bottomMarginProperty[keyIndex]])) {
                sectionFormat.bottomMargin = data[index_4.bottomMarginProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.headerDistanceProperty[keyIndex]])) {
                sectionFormat.headerDistance = data[index_4.headerDistanceProperty[keyIndex]];
            }
            Eif (!ej2_base_1.isNullOrUndefined(data[index_4.footerDistanceProperty[keyIndex]])) {
                sectionFormat.footerDistance = data[index_4.footerDistanceProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.differentFirstPageProperty[keyIndex]])) {
                sectionFormat.differentFirstPage = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.differentFirstPageProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.differentOddAndEvenPagesProperty[keyIndex]])) {
                sectionFormat.differentOddAndEvenPages = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.differentOddAndEvenPagesProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.bidiProperty[keyIndex]])) {
                sectionFormat.bidi = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.bidiProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.restartPageNumberingProperty[keyIndex]])) {
                sectionFormat.restartPageNumbering = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.restartPageNumberingProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.pageStartingNumberProperty[keyIndex]])) {
                sectionFormat.pageStartingNumber = data[index_4.pageStartingNumberProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.endnoteNumberFormatProperty[keyIndex]])) {
                sectionFormat.endnoteNumberFormat = this.getFootEndNoteNumberFormat(data[index_4.endnoteNumberFormatProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.footNoteNumberFormatProperty[keyIndex]])) {
                sectionFormat.footNoteNumberFormat = this.getFootEndNoteNumberFormat(data[index_4.footNoteNumberFormatProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.restartIndexForFootnotesProperty[keyIndex]])) {
                sectionFormat.restartIndexForFootnotes = this.getFootnoteRestartIndex(data[index_4.restartIndexForFootnotesProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.restartIndexForEndnotesProperty[keyIndex]])) {
                sectionFormat.restartIndexForEndnotes = this.getFootnoteRestartIndex(data[index_4.restartIndexForEndnotesProperty[keyIndex]]);
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.initialFootNoteNumberProperty[keyIndex]])) {
                sectionFormat.initialFootNoteNumber = data[index_4.initialFootNoteNumberProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.initialEndNoteNumberProperty[keyIndex]])) {
                sectionFormat.initialEndNoteNumber = data[index_4.initialEndNoteNumberProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.pageNumberStyleProperty[keyIndex]])) {
                sectionFormat.pageNumberStyle = data[index_4.pageNumberStyleProperty[keyIndex]];
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.columnsProperty[keyIndex]]) && !ej2_base_1.isNullOrUndefined(data[index_4.numberOfColumnsProperty[keyIndex]]) && data[index_4.numberOfColumnsProperty[keyIndex]] > 1) {
                sectionFormat.numberOfColumns = data[index_4.numberOfColumnsProperty[keyIndex]];
                sectionFormat.equalWidth = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.equalWidthProperty[keyIndex]]);
                sectionFormat.lineBetweenColumns = editor_helper_1.HelperMethods.parseBoolValue(data[index_4.lineBetweenColumnsProperty[keyIndex]]);
                Eif (data[index_4.columnsProperty[keyIndex]]) {
                    for (var i = 0; i < data[index_4.columnsProperty[keyIndex]].length; i++) {
                        var newCol = new index_1.WColumnFormat();
                        newCol.width = editor_helper_1.HelperMethods.convertPointToPixel(data[index_4.columnsProperty[keyIndex]][i][index_4.widthProperty[keyIndex]]);
                        newCol.space = editor_helper_1.HelperMethods.convertPointToPixel(data[index_4.columnsProperty[keyIndex]][i][index_4.spaceProperty[keyIndex]]);
                        newCol.index = i;
                        sectionFormat.columns.push(newCol);
                    }
                }
            }
            if (!ej2_base_1.isNullOrUndefined(data[index_4.breakCodeProperty[keyIndex]])) {
                sectionFormat.breakCode = data[index_4.breakCodeProperty[keyIndex]];
            }
        };
        SfdtReader.prototype.parseColumns = function (wCols, columns) {
            columns = [];
            if (wCols) {
                for (var i = 0; i < wCols.length; i++) {
                    var newCol = new index_1.WColumnFormat();
                    newCol.width = editor_helper_1.HelperMethods.convertPointToPixel(wCols[i][index_4.widthProperty[this.keywordIndex]]);
                    newCol.space = editor_helper_1.HelperMethods.convertPointToPixel(wCols[i][index_4.spaceProperty[this.keywordIndex]]);
                    newCol.index = i;
                    columns.push(newCol);
                }
            }
        };
        SfdtReader.prototype.parseTabStop = function (keyIndex, wTabs, tabs) {
            Eif (wTabs) {
                for (var i = 0; i < wTabs.length; i++) {
                    var tab = wTabs[i];
                    Eif (Object.keys(tab).length > 0) {
                        var tabStop = new index_2.WTabStop();
                        tabStop.position = tab[index_4.positionProperty[keyIndex]];
                        tabStop.tabLeader = this.getTabLeader(tab[index_4.tabLeaderProperty[keyIndex]]);
                        tabStop.deletePosition = tab[index_4.deletePositionProperty[keyIndex]];
                        tabStop.tabJustification = this.getTabJustification(tab[index_4.tabJustificationProperty[keyIndex]]);
                        tabs.push(tabStop);
                    }
                }
            }
        };
        SfdtReader.prototype.validateImageUrl = function (imagestr) {
            var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
            imagestr = imagestr.replace(/[^A-Za-z0-9\+\/\=]/g, '');
            var totalLength = imagestr.length * 3 / 4;
            Iif (imagestr.charAt(imagestr.length - 1) === keyStr.charAt(64)) {
                totalLength--;
            }
            Iif (imagestr.charAt(imagestr.length - 2) === keyStr.charAt(64)) {
                totalLength--;
            }
            Iif (totalLength % 1 !== 0) {
                return false;
            }
            return true;
        };
        SfdtReader.prototype.containsFieldBegin = function (line) {
            var element = undefined;
            for (var i = line.children.length - 1; i >= 0; i--) {
                element = line.children[i];
                if (element instanceof page_1.FieldElementBox && element.hasFieldEnd && element.nextElement instanceof page_1.TextElementBox) {
                    return element.nextElement;
                }
                else if (element instanceof page_1.FieldElementBox) {
                    return undefined;
                }
            }
            return element;
        };
        SfdtReader.prototype.getBaseAlignment = function (baselineAlignment) {
            switch (baselineAlignment) {
                case 0:
                    return 'Normal';
                case 1:
                    return 'Superscript';
                case 2:
                    return 'Subscript';
                default:
                    return baselineAlignment;
            }
        };
        SfdtReader.prototype.getUnderline = function (underline) {
            switch (underline) {
                case 0:
                    return 'None';
                case 1:
                    return 'Single';
                case 2:
                    return 'Words';
                case 3:
                    return 'Double';
                case 4:
                    return 'Dotted';
                case 5:
                    return 'Thick';
                case 6:
                    return 'Dash';
                case 7:
                    return 'DashLong';
                case 8:
                    return 'DotDash';
                case 9:
                    return 'DotDotDash';
                case 10:
                    return 'Wavy';
                case 11:
                    return 'DottedHeavy';
                case 12:
                    return 'DashHeavy';
                case 13:
                    return 'DashLongHeavy';
                case 14:
                    return 'DotDashHeavy';
                case 15:
                    return 'DotDotDashHeavy';
                case 16:
                    return 'WavyHeavy';
                case 17:
                    return 'WavyDouble';
                default:
                    return underline;
            }
        };
        SfdtReader.prototype.getStrikethrough = function (strikethrough) {
            switch (strikethrough) {
                case 0:
                    return 'None';
                case 1:
                    return 'SingleStrike';
                case 2:
                    return 'DoubleStrike';
                default:
                    return strikethrough;
            }
        };
        SfdtReader.prototype.getHighlightColor = function (highlightColor) {
            switch (highlightColor) {
                case 0:
                    return 'NoColor';
                case 1:
                    return 'Yellow';
                case 2:
                    return 'BrightGreen';
                case 3:
                    return 'Turquoise';
                case 4:
                    return 'Pink';
                case 5:
                    return 'Blue';
                case 6:
                    return 'Red';
                case 7:
                    return 'DarkBlue';
                case 8:
                    return 'Teal';
                case 9:
                    return 'Green';
                case 10:
                    return 'Violet';
                case 11:
                    return 'DarkRed';
                case 12:
                    return 'DarkYellow';
                case 13:
                    return 'Gray50';
                case 14:
                    return 'Gray25';
                case 15:
                    return 'Black';
                default:
                    return highlightColor;
            }
        };
        SfdtReader.prototype.getLineSpacingType = function (lineSpacingType) {
            switch (lineSpacingType) {
                case 0:
                    return 'Multiple';
                case 1:
                    return 'AtLeast';
                case 2:
                    return 'Exactly';
                default:
                    return lineSpacingType;
            }
        };
        SfdtReader.prototype.getOutlineLevel = function (outlineLevel) {
            switch (outlineLevel) {
                case 0:
                    return 'BodyText';
                case 1:
                    return 'Level1';
                case 2:
                    return 'Level2';
                case 3:
                    return 'Level3';
                case 4:
                    return 'Level4';
                case 5:
                    return 'Level5';
                case 6:
                    return 'Level6';
                case 7:
                    return 'Level7';
                case 8:
                    return 'Level8';
                case 9:
                    return 'Level9';
                default:
                    return outlineLevel;
            }
        };
        SfdtReader.prototype.getTextAlignment = function (textAlignment) {
            switch (textAlignment) {
                case 0:
                    return 'Left';
                case 1:
                    return 'Center';
                case 2:
                    return 'Right';
                case 3:
                    return 'Justify';
                default:
                    return textAlignment;
            }
        };
        SfdtReader.prototype.getWidthType = function (widthType) {
            switch (widthType) {
                case 0:
                    return 'Auto';
                case 1:
                    return 'Percent';
                case 2:
                    return 'Point';
                default:
                    return widthType;
            }
        };
        SfdtReader.prototype.getTableAlignment = function (tableAlignment) {
            switch (tableAlignment) {
                case 0:
                    return 'Left';
                case 1:
                    return 'Center';
                case 2:
                    return 'Right';
                default:
                    return tableAlignment;
            }
        };
        SfdtReader.prototype.getLineStyle = function (lineStyle) {
            switch (lineStyle) {
                case 0:
                    return 'Single';
                case 1:
                    return 'None';
                case 2:
                    return 'Dot';
                case 3:
                    return 'DashSmallGap';
                case 4:
                    return 'DashLargeGap';
                case 5:
                    return 'DashDot';
                case 6:
                    return 'DashDotDot';
                case 7:
                    return 'Double';
                case 8:
                    return 'Triple';
                case 9:
                    return 'ThinThickSmallGap';
                case 10:
                    return 'ThickThinSmallGap';
                case 11:
                    return 'ThinThickThinSmallGap';
                case 12:
                    return 'ThinThickMediumGap';
                case 13:
                    return 'ThickThinMediumGap';
                case 14:
                    return 'ThinThickThinMediumGap';
                case 15:
                    return 'ThinThickLargeGap';
                case 16:
                    return 'ThickThinLargeGap';
                case 17:
                    return 'ThinThickThinLargeGap';
                case 18:
                    return 'SingleWavy';
                case 19:
                    return 'DoubleWavy';
                case 20:
                    return 'DashDotStroked';
                case 21:
                    return 'Emboss3D';
                case 22:
                    return 'Engrave3D';
                case 23:
                    return 'Outset';
                case 24:
                    return 'Inset';
                case 25:
                    return 'Thick';
                case 26:
                    return 'Cleared';
                default:
                    return lineStyle;
            }
        };
        SfdtReader.prototype.getTextureStyle = function (textureStyle) {
            switch (textureStyle) {
                case 0:
                    return 'TextureNone';
                case 1:
                    return 'Texture2Pt5Percent';
                case 2:
                    return 'Texture5Percent';
                case 3:
                    return 'Texture7Pt5Percent';
                case 4:
                    return 'Texture10Percent';
                case 5:
                    return 'Texture12Pt5Percent';
                case 6:
                    return 'Texture15Percent';
                case 7:
                    return 'Texture17Pt5Percent';
                case 8:
                    return 'Texture20Percent';
                case 9:
                    return 'Texture22Pt5Percent';
                case 10:
                    return 'Texture25Percent';
                case 11:
                    return 'Texture27Pt5Percent';
                case 12:
                    return 'Texture30Percent';
                case 13:
                    return 'Texture32Pt5Percent';
                case 14:
                    return 'Texture35Percent';
                case 15:
                    return 'Texture37Pt5Percent';
                case 16:
                    return 'Texture40Percent';
                case 17:
                    return 'Texture42Pt5Percent';
                case 18:
                    return 'Texture45Percent';
                case 19:
                    return 'Texture47Pt5Percent';
                case 20:
                    return 'Texture50Percent';
                case 21:
                    return 'Texture52Pt5Percent';
                case 22:
                    return 'Texture55Percent';
                case 23:
                    return 'Texture57Pt5Percent';
                case 24:
                    return 'Texture60Percent';
                case 25:
                    return 'Texture62Pt5Percent';
                case 26:
                    return 'Texture65Percent';
                case 27:
                    return 'Texture67Pt5Percent';
                case 28:
                    return 'Texture70Percent';
                case 29:
                    return 'Texture72Pt5Percent';
                case 30:
                    return 'Texture75Percent';
                case 31:
                    return 'Texture77Pt5Percent';
                case 32:
                    return 'Texture80Percent';
                case 33:
                    return 'Texture82Pt5Percent';
                case 34:
                    return 'Texture85Percent';
                case 35:
                    return 'Texture87Pt5Percent';
                case 36:
                    return 'Texture90Percent';
                case 37:
                    return 'Texture92Pt5Percent';
                case 38:
                    return 'Texture95Percent';
                case 39:
                    return 'Texture97Pt5Percent';
                case 40:
                    return 'TextureSolid';
                case 41:
                    return 'TextureDarkHorizontal';
                case 42:
                    return 'TextureDarkVertical';
                case 43:
                    return 'TextureDarkDiagonalDown';
                case 44:
                    return 'TextureDarkDiagonalUp';
                case 45:
                    return 'TextureDarkCross';
                case 46:
                    return 'TextureDarkDiagonalCross';
                case 47:
                    return 'TextureHorizontal';
                case 48:
                    return 'TextureVertical';
                case 49:
                    return 'TextureDiagonalDown';
                case 50:
                    return 'TextureDiagonalUp';
                case 51:
                    return 'TextureCross';
                case 52:
                    return 'TextureDiagonalCross';
                default:
                    return textureStyle;
            }
        };
        SfdtReader.prototype.getHeightType = function (heightType) {
            switch (heightType) {
                case 0:
                    return 'AtLeast';
                case 1:
                    return 'Exactly';
                default:
                    return heightType;
            }
        };
        SfdtReader.prototype.getCellVerticalAlignment = function (cellVerticalAlignment) {
            switch (cellVerticalAlignment) {
                case 0:
                    return 'Top';
                case 1:
                    return 'Center';
                case 2:
                    return 'Bottom';
                default:
                    return cellVerticalAlignment;
            }
        };
        SfdtReader.prototype.getListLevelPattern = function (listLevelPattern) {
            switch (listLevelPattern) {
                case 0:
                    return 'None';
                case 1:
                case 13:
                case 'KanjiDigit':
                    return 'Arabic';
                case 2:
                    return 'UpRoman';
                case 3:
                    return 'LowRoman';
                case 4:
                    return 'UpLetter';
                case 5:
                    return 'LowLetter';
                case 6:
                    return 'Ordinal';
                case 7:
                    return 'Number';
                case 8:
                    return 'OrdinalText';
                case 9:
                    return 'LeadingZero';
                case 10:
                    return 'Bullet';
                case 11:
                    return 'FarEast';
                case 12:
                    return 'Special';
                default:
                    return listLevelPattern;
            }
        };
        SfdtReader.prototype.getFollowCharacterType = function (followCharacterType) {
            switch (followCharacterType) {
                case 0:
                    return 'Tab';
                case 1:
                    return 'Space';
                case 2:
                    return 'None';
                default:
                    return followCharacterType;
            }
        };
        SfdtReader.prototype.getStyleType = function (styleType) {
            switch (styleType) {
                case 0:
                    return 'Paragraph';
                case 1:
                    return 'Character';
                case 2:
                    return 'Table';
                default:
                    return styleType;
            }
        };
        SfdtReader.prototype.getProtectionType = function (protectionType) {
            switch (protectionType) {
                case 0:
                    return 'NoProtection';
                case 1:
                    return 'ReadOnly';
                case 2:
                    return 'FormFieldsOnly';
                case 3:
                    return 'CommentsOnly';
                case 4:
                    return 'RevisionsOnly';
                default:
                    return protectionType;
            }
        };
        SfdtReader.prototype.getRevisionType = function (revisionType) {
            switch (revisionType) {
                case 1:
                    return 'Insertion';
                case 2:
                    return 'Deletion';
                case 3:
                    return 'MoveTo';
                case 4:
                    return 'MoveFrom';
                default:
                    return revisionType;
            }
        };
        SfdtReader.prototype.getFootnoteType = function (footnoteType) {
            switch (footnoteType) {
                case 0:
                    return 'Footnote';
                case 1:
                    return 'Endnote';
                default:
                    return footnoteType;
            }
        };
        SfdtReader.prototype.getFootnoteRestartIndex = function (footnoteRestartIndex) {
            switch (footnoteRestartIndex) {
                case 0:
                    return 'DoNotRestart';
                case 1:
                    return 'RestartForEachSection';
                case 2:
                    return 'RestartForEachPage';
                default:
                    return footnoteRestartIndex;
            }
        };
        SfdtReader.prototype.getFootEndNoteNumberFormat = function (footEndNoteNumberFormat) {
            switch (footEndNoteNumberFormat) {
                case 0:
                    return 'Arabic';
                case 1:
                    return 'UpperCaseRoman';
                case 2:
                    return 'LowerCaseRoman';
                case 3:
                    return 'UpperCaseLetter';
                case 4:
                    return 'LowerCaseLetter';
                default:
                    return footEndNoteNumberFormat;
            }
        };
        SfdtReader.prototype.getBiDirectionalOverride = function (biDirectionalOverride) {
            switch (biDirectionalOverride) {
                case 0:
                    return 'None';
                case 1:
                    return 'LTR';
                case 2:
                    return 'RTL';
                default:
                    return biDirectionalOverride;
            }
        };
        SfdtReader.prototype.getBreakClearType = function (breakClearType) {
            switch (breakClearType) {
                case 0:
                    return 'None';
                case 1:
                    return 'Left';
                case 2:
                    return 'Right';
                case 3:
                    return 'All';
                default:
                    return breakClearType;
            }
        };
        SfdtReader.prototype.getTextVerticalAlignment = function (textVerticalAlignment) {
            switch (textVerticalAlignment) {
                case 0:
                    return 'Top';
                case 1:
                    return 'Center';
                case 2:
                    return 'Bottom';
                default:
                    return textVerticalAlignment;
            }
        };
        SfdtReader.prototype.getShapeVerticalAlignment = function (shapeVerticalAlignment) {
            switch (shapeVerticalAlignment) {
                case 0:
                    return 'None';
                case 1:
                    return 'Top';
                case 2:
                    return 'Center';
                case 3:
                    return 'Bottom';
                case 4:
                    return 'Inline';
                case 5:
                    return 'Inside';
                case 6:
                    return 'Outside';
                default:
                    return shapeVerticalAlignment;
            }
        };
        SfdtReader.prototype.getShapeHorizontalAlignment = function (shapeHorizontalAlignment) {
            switch (shapeHorizontalAlignment) {
                case 0:
                    return 'None';
                case 1:
                    return 'Center';
                case 2:
                    return 'Inside';
                case 3:
                    return 'Left';
                case 4:
                    return 'Outside';
                case 5:
                    return 'Right';
                default:
                    return shapeHorizontalAlignment;
            }
        };
        SfdtReader.prototype.getVerticalOrigin = function (verticalOrigin) {
            switch (verticalOrigin) {
                case 0:
                    return 'Paragraph';
                case 1:
                    return 'BottomMargin';
                case 2:
                    return 'InsideMargin';
                case 3:
                    return 'Line';
                case 4:
                    return 'Margin';
                case 5:
                    return 'OutsideMargin';
                case 6:
                    return 'Page';
                case 7:
                    return 'TopMargin';
                default:
                    return verticalOrigin;
            }
        };
        SfdtReader.prototype.getHorizontalOrigin = function (horizontalOrigin) {
            switch (horizontalOrigin) {
                case 0:
                    return 'Column';
                case 1:
                    return 'Character';
                case 2:
                    return 'InsideMargin';
                case 3:
                    return 'LeftMargin';
                case 4:
                    return 'Margin';
                case 5:
                    return 'OutsideMargin';
                case 6:
                    return 'Page';
                case 7:
                    return 'RightMargin';
                default:
                    return horizontalOrigin;
            }
        };
        SfdtReader.prototype.getTableVerticalRelation = function (tableRelation) {
            switch (tableRelation) {
                case 0:
                    return 'Paragraph';
                case 1:
                    return 'Margin';
                case 2:
                    return 'Page';
                default:
                    return tableRelation;
            }
        };
        SfdtReader.prototype.getTableHorizontalRelation = function (tableRelation) {
            switch (tableRelation) {
                case 0:
                    return 'Column';
                case 1:
                    return 'Margin';
                case 2:
                    return 'Page';
                default:
                    return tableRelation;
            }
        };
        SfdtReader.prototype.getTableVerticalPosition = function (tableVerticalPosition) {
            switch (tableVerticalPosition) {
                case 0:
                    return 'None';
                case 1:
                    return 'Top';
                case 2:
                    return 'Center';
                case 3:
                    return 'Bottom';
                case 4:
                    return 'Inside';
                case 5:
                    return 'Outside';
                default:
                    return tableVerticalPosition;
            }
        };
        SfdtReader.prototype.getTableHorizontalPosition = function (tableHorizontalPosition) {
            switch (tableHorizontalPosition) {
                case 0:
                    return 'Left';
                case 1:
                    return 'Center';
                case 2:
                    return 'Inside';
                case 3:
                    return 'Outside';
                case 4:
                    return 'Right';
                default:
                    return tableHorizontalPosition;
            }
        };
        SfdtReader.prototype.getLineDashStyle = function (lineDashStyle) {
            switch (lineDashStyle) {
                case 0:
                    return 'Solid';
                case 1:
                    return 'Dash';
                case 2:
                    return 'DashDot';
                case 3:
                    return 'DashDotDot';
                case 4:
                    return 'DashDotGEL';
                case 5:
                    return 'DashGEL';
                case 6:
                    return 'Dot';
                case 7:
                    return 'DotGEL';
                case 8:
                    return 'LongDashDotDotGEL';
                case 9:
                    return 'LongDashDotGEL';
                case 10:
                    return 'LongDashGEL';
                default:
                    return lineDashStyle;
            }
        };
        SfdtReader.prototype.getHorizontalPositionAbs = function (horizontalPositionAbs) {
            switch (horizontalPositionAbs) {
                case 0:
                    return 'Left';
                case 1:
                    return 'Center';
                case 2:
                    return 'Right';
                case 3:
                    return 'Inside';
                case 4:
                    return 'Outside';
                default:
                    return horizontalPositionAbs;
            }
        };
        SfdtReader.prototype.getTabJustification = function (tabJustification) {
            switch (tabJustification) {
                case 0:
                    return 'Left';
                case 1:
                    return 'Bar';
                case 2:
                    return 'Center';
                case 3:
                    return 'Decimal';
                case 4:
                    return 'List';
                case 5:
                    return 'Right';
                default:
                    return tabJustification;
            }
        };
        SfdtReader.prototype.getTabLeader = function (tabLeader) {
            switch (tabLeader) {
                case 0:
                    return 'None';
                case 1:
                    return 'Single';
                case 2:
                    return 'Dot';
                case 3:
                    return 'Hyphen';
                case 4:
                    return 'Underscore';
                default:
                    return tabLeader;
            }
        };
        SfdtReader.prototype.getTextFormFieldType = function (textFormFieldType) {
            switch (textFormFieldType) {
                case 0:
                    return 'Text';
                case 1:
                    return 'Number';
                case 2:
                    return 'Date';
                case 3:
                    return 'Calculation';
                default:
                    return textFormFieldType;
            }
        };
        SfdtReader.prototype.getTextFormFieldFormat = function (textFormFieldFormat) {
            switch (textFormFieldFormat) {
                case 0:
                    return 'None';
                case 1:
                    return 'FirstCapital';
                case 2:
                    return 'Lowercase';
                case 3:
                    return 'Uppercase';
                case 4:
                    return 'Titlecase';
                default:
                    return textFormFieldFormat;
            }
        };
        SfdtReader.prototype.getCheckBoxSizeType = function (checkBoxSizeType) {
            switch (checkBoxSizeType) {
                case 0:
                    return 'Auto';
                case 1:
                    return 'Exactly';
                default:
                    return checkBoxSizeType;
            }
        };
        SfdtReader.prototype.getContentControlAppearance = function (contentControlAppearance) {
            switch (contentControlAppearance) {
                case 1:
                    return 'BoundingBox';
                case 2:
                    return 'Hidden';
                case 3:
                    return 'Tags';
                default:
                    return contentControlAppearance;
            }
        };
        SfdtReader.prototype.getContentControlType = function (contentControlType) {
            switch (contentControlType) {
                case 0:
                    return 'RichText';
                case 1:
                    return 'BuildingBlockGallery';
                case 2:
                    return 'CheckBox';
                case 3:
                    return 'ComboBox';
                case 4:
                    return 'Date';
                case 5:
                    return 'DropDownList';
                case 6:
                    return 'Group';
                case 7:
                    return 'Picture';
                case 8:
                    return 'RepeatingSection';
                case 9:
                    return 'Text';
                default:
                    return contentControlType;
            }
        };
        SfdtReader.prototype.getDateCalendarType = function (dateCalendarType) {
            switch (dateCalendarType) {
                case 0:
                    return 'Gregorian';
                case 1:
                    return 'GregorianArabic';
                case 2:
                    return 'GregorianEnglish';
                case 3:
                    return 'GregorianMiddleEastFrench';
                case 4:
                    return 'GregorianTransliteratedEnglish';
                case 5:
                    return 'GregorianTransliteratedFrench';
                case 6:
                    return 'Hebrew';
                case 7:
                    return 'Hijri';
                case 8:
                    return 'Japan';
                case 9:
                    return 'Korean';
                case 10:
                    return 'Saka';
                case 11:
                    return 'Taiwan';
                case 12:
                    return 'Thai';
                default:
                    return dateCalendarType;
            }
        };
        SfdtReader.prototype.getDateStorageFormat = function (dateStorageFormat) {
            switch (dateStorageFormat) {
                case 1:
                    return 'DateStorageDate';
                case 2:
                    return 'DateStorageDateTime';
                case 3:
                    return 'DateStorageText';
                default:
                    return dateStorageFormat;
            }
        };
        SfdtReader.prototype.getTextWrappingStyle = function (textWrappingStyle) {
            switch (textWrappingStyle) {
                case 0:
                    return 'Inline';
                case 1:
                    return 'InFrontOfText';
                case 2:
                    return 'Square';
                case 3:
                    return 'TopAndBottom';
                case 4:
                    return 'Behind';
                default:
                    return textWrappingStyle;
            }
        };
        SfdtReader.prototype.getTextWrappingType = function (textWrappingType) {
            switch (textWrappingType) {
                case 0:
                    return 'Both';
                case 1:
                    return 'Left';
                case 2:
                    return 'Right';
                case 3:
                    return 'Largest';
                default:
                    return textWrappingType;
            }
        };
        SfdtReader.prototype.getCompatibilityMode = function (compatibilityMode) {
            switch (compatibilityMode) {
                case 0:
                    return 'Word2013';
                case 1:
                    return 'Word2003';
                case 2:
                    return 'Word2007';
                case 3:
                    return 'Word2010';
                default:
                    return compatibilityMode;
            }
        };
        SfdtReader.prototype.getLineFormatType = function (lineFormatType) {
            switch (lineFormatType) {
                case 0:
                    return 'Solid';
                case 1:
                    return 'Patterned';
                case 2:
                    return 'Gradient';
                case 3:
                    return 'None';
                default:
                    return lineFormatType;
            }
        };
        SfdtReader.prototype.getAutoShapeType = function (autoShapeType) {
            switch (autoShapeType) {
                case 1:
                    return 'Rectangle';
                case 2:
                    return 'RoundedRectangle';
                case 3:
                    return 'StraightConnector';
                case 4:
                    return "Oval";
                case 5:
                    return "IsoscelesTriangle";
                case 6:
                    return "RightTriangle";
                case 7:
                    return "Parallelogram";
                case 8:
                    return "Trapezoid";
                case 9:
                    return "Diamond";
                case 10:
                    return "RegularPentagon";
                case 11:
                    return "Hexagon";
                case 12:
                    return "Heptagon";
                case 13:
                    return "Octagon";
                case 14:
                    return "Decagon";
                case 15:
                    return "Dodecagon";
                case 16:
                    return "Chord";
                case 17:
                    return "Teardrop";
                case 18:
                    return "Frame";
                case 19:
                    return "HalfFrame";
                case 20:
                    return "L_Shape";
                case 21:
                    return "Pie";
                case 22:
                    return "DiagonalStripe";
                case 23:
                    return "Cross";
                case 24:
                    return "Plaque";
                case 25:
                    return "Can";
                case 26:
                    return "Cube";
                case 27:
                    return "Bevel";
                case 28:
                    return "Donut";
                case 29:
                    return "NoSymbol";
                case 30:
                    return "BlockArc";
                case 31:
                    return "FoldedCorner";
                case 32:
                    return "SmileyFace";
                case 33:
                    return "Heart";
                case 34:
                    return "LightningBolt";
                case 35:
                    return "Sun";
                case 36:
                    return "Moon";
                case 37:
                    return "Cloud";
                case 38:
                    return "Arc";
                case 39:
                    return "DoubleBracket";
                case 40:
                    return "DoubleBrace";
                case 41:
                    return "LeftBracket";
                case 42:
                    return "RightBracket";
                case 43:
                    return "LeftBrace";
                case 44:
                    return "RightBrace";
                case 45:
                    return "FlowChartProcess";
                case 46:
                    return "FlowChartAlternateProcess";
                case 47:
                    return "FlowChartDecision";
                case 48:
                    return "FlowChartData";
                case 49:
                    return "FlowChartPredefinedProcess";
                case 50:
                    return "FlowChartInternalStorage";
                case 51:
                    return "FlowChartDocument";
                case 52:
                    return "FlowChartMultiDocument";
                case 53:
                    return "FlowChartTerminator";
                case 54:
                    return "FlowChartPreparation";
                case 55:
                    return "FlowChartManualInput";
                case 56:
                    return "FlowChartManualOperation";
                case 57:
                    return "FlowChartConnector";
                case 58:
                    return "FlowChartOffPageConnector";
                case 59:
                    return "FlowChartCard";
                case 60:
                    return "FlowChartPunchedTape";
                case 61:
                    return "FlowChartSummingJunction";
                case 62:
                    return "FlowChartOr";
                case 63:
                    return "FlowChartCollate";
                case 64:
                    return "FlowChartSort";
                case 65:
                    return "FlowChartExtract";
                case 66:
                    return "FlowChartMerge";
                case 67:
                    return "FlowChartStoredData";
                case 68:
                    return "FlowChartDelay";
                case 69:
                    return "FlowChartSequentialAccessStorage";
                case 70:
                    return "FlowChartMagneticDisk";
                case 71:
                    return "FlowChartDirectAccessStorage";
                case 72:
                    return "FlowChartDisplay";
                case 73:
                    return "RightArrow";
                case 74:
                    return "LeftArrow";
                case 75:
                    return "UpArrow";
                case 76:
                    return "DownArrow";
                case 77:
                    return "LeftRightArrow";
                case 78:
                    return "UpDownArrow";
                case 79:
                    return "QuadArrow";
                case 80:
                    return "LeftRightUpArrow";
                case 81:
                    return "BentArrow";
                case 82:
                    return "UTurnArrow";
                case 83:
                    return "LeftUpArrow";
                case 84:
                    return "BentUpArrow";
                case 85:
                    return "CurvedRightArrow";
                case 86:
                    return "CurvedLeftArrow";
                case 87:
                    return "CurvedUpArrow";
                case 88:
                    return "CurvedDownArrow";
                case 89:
                    return "StripedRightArrow";
                case 90:
                    return "NotchedRightArrow";
                case 91:
                    return "Pentagon";
                case 92:
                    return "Chevron";
                case 93:
                    return "RightArrowCallout";
                case 94:
                    return "DownArrowCallout";
                case 95:
                    return "LeftArrowCallout";
                case 96:
                    return "UpArrowCallout";
                case 97:
                    return "LeftRightArrowCallout";
                case 98:
                    return "QuadArrowCallout";
                case 99:
                    return "CircularArrow";
                case 100:
                    return "MathPlus";
                case 101:
                    return "MathMinus";
                case 102:
                    return "MathMultiply";
                case 103:
                    return "MathDivision";
                case 104:
                    return "MathEqual";
                case 105:
                    return "MathNotEqual";
                case 106:
                    return "Explosion1";
                case 107:
                    return "Explosion2";
                case 108:
                    return "Star4Point";
                case 109:
                    return "Star5Point";
                case 110:
                    return "Star6Point";
                case 111:
                    return "Star7Point";
                case 112:
                    return "Star8Point";
                case 113:
                    return "Star10Point";
                case 114:
                    return "Star12Point";
                case 115:
                    return "Star16Point";
                case 116:
                    return "Star24Point";
                case 117:
                    return "Star32Point";
                case 118:
                    return "UpRibbon";
                case 119:
                    return "DownRibbon";
                case 120:
                    return "CurvedUpRibbon";
                case 121:
                    return "CurvedDownRibbon";
                case 122:
                    return "VerticalScroll";
                case 123:
                    return "HorizontalScroll";
                case 124:
                    return "Wave";
                case 125:
                    return "DoubleWave";
                case 126:
                    return "SnipSingleCornerRectangle";
                case 127:
                    return "SnipSameSideCornerRectangle";
                case 128:
                    return "SnipDiagonalCornerRectangle";
                case 129:
                    return "SnipAndRoundSingleCornerRectangle";
                case 130:
                    return "RoundSingleCornerRectangle";
                case 131:
                    return "RoundSameSideCornerRectangle";
                case 132:
                    return "RoundDiagonalCornerRectangle";
                case 133:
                    return "Unknown";
                case 134:
                    return "ElbowConnector";
                case 135:
                    return "CurvedConnector";
                default:
                    return autoShapeType;
            }
        };
        SfdtReader.prototype.destroy = function () {
            if (this.footnotes) {
                this.footnotes.destroy();
            }
            this.footnotes = undefined;
            if (this.endnotes) {
                this.endnotes.destroy();
            }
            this.endnotes = undefined;
            Eif (this.editableRanges) {
                this.editableRanges.destroy();
            }
            this.editableRanges = undefined;
            if (this.commentEnds) {
                this.commentEnds.destroy();
            }
            this.commentEnds = undefined;
            if (this.commentStarts) {
                this.commentStarts.destroy();
            }
            this.commentStarts = undefined;
            if (this.commentsCollection) {
                this.commentsCollection.destroy();
            }
            this.commentsCollection = undefined;
            if (this.revisionCollection) {
                this.revisionCollection.destroy();
            }
            this.revisionCollection = undefined;
            if (this.fontInfoCollection) {
                this.fontInfoCollection.destroy();
            }
            this.fontInfoCollection = undefined;
            this.documentHelper = undefined;
            this.keywordIndex = undefined;
        };
        return SfdtReader;
    }());
    exports.SfdtReader = SfdtReader;
});